fix(nvenc): Enable opt-in client refresh by client (#3415)
This commit is contained in:
@@ -321,6 +321,22 @@ namespace nvenc {
|
||||
set_ref_frames(format_config.maxNumRefFramesInDPB, format_config.numRefL0, 5);
|
||||
set_minqp_if_enabled(config.min_qp_hevc);
|
||||
fill_h264_hevc_vui(format_config.hevcVUIParameters);
|
||||
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;
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user