File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -340,6 +340,21 @@ namespace nvenc {
340340 set_ref_frames (format_config.maxNumRefFrames , format_config.numRefL0 , 5 );
341341 set_minqp_if_enabled (config.min_qp_h264 );
342342 fill_h264_hevc_vui (format_config.h264VUIParameters );
343+ if (client_config.enableIntraRefresh == 1 ) {
344+ if (get_encoder_cap (NV_ENC_CAPS_SUPPORT_INTRA_REFRESH)) {
345+ format_config.enableIntraRefresh = 1 ;
346+ format_config.intraRefreshPeriod = 300 ;
347+ format_config.intraRefreshCnt = 299 ;
348+ format_config.outputRecoveryPointSEI = 1 ;
349+ if (get_encoder_cap (NV_ENC_CAPS_SINGLE_SLICE_INTRA_REFRESH)) {
350+ format_config.singleSliceIntraRefresh = 1 ;
351+ } else {
352+ BOOST_LOG (warning) << " NvEnc: Single Slice Intra Refresh not supported" ;
353+ }
354+ } else {
355+ BOOST_LOG (error) << " NvEnc: Client asked for intra-refresh but the encoder does not support intra-refresh" ;
356+ }
357+ }
343358 break ;
344359 }
345360
@@ -360,6 +375,7 @@ namespace nvenc {
360375 format_config.enableIntraRefresh = 1 ;
361376 format_config.intraRefreshPeriod = 300 ;
362377 format_config.intraRefreshCnt = 299 ;
378+ format_config.outputRecoveryPointSEI = 1 ;
363379 if (get_encoder_cap (NV_ENC_CAPS_SINGLE_SLICE_INTRA_REFRESH)) {
364380 format_config.singleSliceIntraRefresh = 1 ;
365381 } else {
You can’t perform that action at this time.
0 commit comments