mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-04-05 05:04:49 +00:00
vcomp/lavc: h264_nvenc: fix pulsation w intra-refr
Avoid pulsation with inra-refresh by repeating the missing SPS/PPS with header inseter. Unfortunately this is doesn't work well with HEVC because it seems that the NVIDIA encoder keeps the reference almost forever in specific cases, eg. `testcard:patt=text`. However, it _may_ work under some circumstances.
This commit is contained in:
@@ -24,14 +24,6 @@ diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
|
||||
index 0b6417674e..70adc26f08 100644
|
||||
--- a/libavcodec/nvenc.c
|
||||
+++ b/libavcodec/nvenc.c
|
||||
@@ -1173,7 +1173,6 @@ static av_cold int nvenc_setup_h264_config(AVCodecContext *avctx)
|
||||
h264->enableIntraRefresh = 1;
|
||||
h264->intraRefreshPeriod = cc->gopLength;
|
||||
h264->intraRefreshCnt = cc->gopLength - 1;
|
||||
- cc->gopLength = NVENC_INFINITE_GOPLENGTH;
|
||||
#ifdef NVENC_HAVE_SINGLE_SLICE_INTRA_REFRESH
|
||||
h264->singleSliceIntraRefresh = ctx->single_slice_intra_refresh;
|
||||
#endif
|
||||
@@ -1294,7 +1293,6 @@ static av_cold int nvenc_setup_hevc_config(AVCodecContext *avctx)
|
||||
hevc->enableIntraRefresh = 1;
|
||||
hevc->intraRefreshPeriod = cc->gopLength;
|
||||
|
||||
Reference in New Issue
Block a user