]> granicus.if.org Git - libvpx/commitdiff
Enable emergency fast Q adaptation for VBR test case.
authorpaulwilkins <paulwilkins@google.com>
Tue, 1 Aug 2017 16:06:29 +0000 (17:06 +0100)
committerpaulwilkins <paulwilkins@google.com>
Thu, 3 Aug 2017 11:06:07 +0000 (12:06 +0100)
Enable fast adaptation of Q when there is a large overshoot
for the  #ifdef AGGRESSIVE_VBR test case.

AGGRESSIVE_VBR  is not currently enabled by default.

Change-Id: I7240bb6589795964b6b0b66df4468e4f21504e0f

vp9/encoder/vp9_encoder.c

index 4888c20f4f1bc9136bf40ddb2d948e745fd0a377..a9d43ef02da0dacb199778c1b0f3bd1bcafb0606 100644 (file)
@@ -3907,16 +3907,16 @@ static void encode_with_recode_loop(VP9_COMP *cpi, size_t *size,
   if (two_pass_first_group_inter(cpi)) {
     cpi->twopass.active_worst_quality =
         VPXMIN(q + qrange_adj, cpi->oxcf.worst_allowed_q);
-  }
+  } else if (!frame_is_kf_gf_arf(cpi)) {
 #else
   if (!frame_is_kf_gf_arf(cpi)) {
+#endif
     // Have we been forced to adapt Q outside the expected range by an extreme
     // rate miss. If so adjust the active maxQ for the subsequent frames.
     if (q > cpi->twopass.active_worst_quality) {
       cpi->twopass.active_worst_quality = q;
     }
   }
-#endif
 
   if (enable_acl) {
     // Skip recoding, if model diff is below threshold