From fab630fac9255e80e79597c174b377a407f1f808 Mon Sep 17 00:00:00 2001 From: Marco Date: Wed, 27 Jan 2016 12:01:58 -0800 Subject: [PATCH] vp9-aqmode=3: Limit on period for golden update. For aqmode=3, golden period update is set based on period of cyclic refresh. Put a limit on max golden period update, for now set to 40. And fix comment. Change-Id: Icb61dd87c796cce2a5f5f7331c6a129540994696 --- vp9/encoder/vp9_aq_cyclicrefresh.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vp9/encoder/vp9_aq_cyclicrefresh.c b/vp9/encoder/vp9_aq_cyclicrefresh.c index de09519..de6deb5 100644 --- a/vp9/encoder/vp9_aq_cyclicrefresh.c +++ b/vp9/encoder/vp9_aq_cyclicrefresh.c @@ -321,11 +321,11 @@ void vp9_cyclic_refresh_postencode(VP9_COMP *const cpi) { void vp9_cyclic_refresh_set_golden_update(VP9_COMP *const cpi) { RATE_CONTROL *const rc = &cpi->rc; CYCLIC_REFRESH *const cr = cpi->cyclic_refresh; - // Set minimum gf_interval for GF update to a multiple (== 2) of refresh - // period. Depending on past encoding stats, GF flag may be reset and update - // may not occur until next baseline_gf_interval. + // Set minimum gf_interval for GF update to a multiple of the refresh period, + // with some max limit. Depending on past encoding stats, GF flag may be + // reset and update may not occur until next baseline_gf_interval. if (cr->percent_refresh > 0) - rc->baseline_gf_interval = 4 * (100 / cr->percent_refresh); + rc->baseline_gf_interval = VPXMIN(4 * (100 / cr->percent_refresh), 40); else rc->baseline_gf_interval = 40; } -- 2.7.4