]> granicus.if.org Git - libvpx/commitdiff
Cap arf boost in perceptual quality mode
authorJingning Han <jingning@google.com>
Mon, 6 May 2019 21:09:18 +0000 (14:09 -0700)
committerJingning Han <jingning@google.com>
Mon, 6 May 2019 21:20:24 +0000 (14:20 -0700)
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

vp9/encoder/vp9_firstpass.c

index 8c38d941cbfd3c63052c84c8b84ebbe8cb1246b1..d8c6da1136417fb8f89697f0920f7bb63c31290a 100644 (file)
@@ -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.