Commit 6141cc8b authored by Debargha Mukherjee's avatar Debargha Mukherjee

Adjust lag_in_frames to not use more than needed

Change-Id: I8a78ed1342c0066c3fef591d7c6749308044f305
parent 28983f72
......@@ -573,6 +573,9 @@ static aom_codec_err_t set_encoder_config(
oxcf->render_width = extra_cfg->render_width;
oxcf->render_height = extra_cfg->render_height;
oxcf->arnr_max_frames = extra_cfg->arnr_max_frames;
// Adjust g_lag_in_frames down if not needed
oxcf->lag_in_frames =
AOMMIN(MAX_GF_INTERVAL + oxcf->arnr_max_frames / 2, oxcf->lag_in_frames);
oxcf->arnr_strength = extra_cfg->arnr_strength;
oxcf->min_gf_interval = extra_cfg->min_gf_interval;
oxcf->max_gf_interval = extra_cfg->max_gf_interval;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment