ref:0db9f73e6b0d4399b1e5da605123642be64334d4

feat(nvenc): support intraRefresh for h264, add outputRecoveryPointSEI=1 to intra-refresh config for h264 and hevc (#5091)

SHA: 0db9f73e6b0d4399b1e5da605123642be64334d4
Author: Andy Grundman <andy@hybridized.org>
Date: 2026-05-10 00:22
Parents: 810783d
1 files changed +16 -0
Type
src/nvenc/nvenc_base.cpp +16 −0
@@ -340,5 +340,20 @@
set_ref_frames(format_config.maxNumRefFrames, format_config.numRefL0, 5);
set_minqp_if_enabled(config.min_qp_h264);
fill_h264_hevc_vui(format_config.h264VUIParameters);
if (client_config.enableIntraRefresh == 1) {
if (get_encoder_cap(NV_ENC_CAPS_SUPPORT_INTRA_REFRESH)) {
format_config.enableIntraRefresh = 1;
format_config.intraRefreshPeriod = 300;
format_config.intraRefreshCnt = 299;
format_config.outputRecoveryPointSEI = 1;
if (get_encoder_cap(NV_ENC_CAPS_SINGLE_SLICE_INTRA_REFRESH)) {
format_config.singleSliceIntraRefresh = 1;
} else {
BOOST_LOG(warning) << "NvEnc: Single Slice Intra Refresh not supported";
}
} else {
BOOST_LOG(error) << "NvEnc: Client asked for intra-refresh but the encoder does not support intra-refresh";
}
}
break;
}
@@ -360,6 +375,7 @@
format_config.enableIntraRefresh = 1;
format_config.intraRefreshPeriod = 300;
format_config.intraRefreshCnt = 299;
format_config.outputRecoveryPointSEI = 1;
if (get_encoder_cap(NV_ENC_CAPS_SINGLE_SLICE_INTRA_REFRESH)) {
format_config.singleSliceIntraRefresh = 1;
} else {