Add option for intra refresh (resolves #86)

This commit is contained in:
Yukino Song
2024-10-26 21:31:28 +08:00
parent 90ed57eeb3
commit 11e0bad4f3
8 changed files with 28 additions and 5 deletions

View File

@@ -321,10 +321,14 @@ 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);
format_config.enableIntraRefresh = 1;
format_config.singleSliceIntraRefresh = 1;
format_config.intraRefreshPeriod = 300;
format_config.intraRefreshCnt = 299;
if (config.intra_refresh) {
format_config.enableIntraRefresh = 1;
format_config.singleSliceIntraRefresh = 1;
format_config.intraRefreshPeriod = 300;
format_config.intraRefreshCnt = 299;
}
break;
}

View File

@@ -48,6 +48,9 @@ namespace nvenc {
// Add filler data to encoded frames to stay at target bitrate, mainly for testing
bool insert_filler_data = false;
// Intra refresh for clients that doesn't request keyframe correctly
bool intra_refresh = false;
};
} // namespace nvenc