From: Jingning Han Date: Mon, 6 May 2019 21:09:18 +0000 (-0700) Subject: Cap arf boost in perceptual quality mode X-Git-Tag: v1.8.1~66^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c3689f7ad814fd64e9e31ec6b56ba93f1f9d12f1;p=libvpx Cap arf boost in perceptual quality mode When the perceptual AQ mode is enabled, cap the ARF boost to 2.5x of the regular frame. This allows more consistent frame quality across consecutive frames and sufficient bit rate allocation at frame level for AQ mode. Change-Id: I10f5e2860a3e4b412efe25cca635405bae293ebf --- diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index 8c38d941c..d8c6da113 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -2647,6 +2647,13 @@ static void define_gf_group(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) { rc->gfu_boost = VPXMIN((int)rc->gfu_boost, i * 200); #endif + // Cap the ARF boost when perceptual quality AQ mode is enabled. This is + // designed to improve the perceptual quality of high value content and to + // make consistent quality across consecutive frames. It will hurt objective + // quality. + if (oxcf->aq_mode == PERCEPTUAL_AQ) + rc->gfu_boost = VPXMIN(rc->gfu_boost, MIN_ARF_GF_BOOST); + rc->baseline_gf_interval = i - rc->source_alt_ref_pending; // Reset the file position.