shithub: libvpx

Download patch

ref: 4bd2a59e9bd667460830b5500f47cbc5d0472758
parent: ea14a1a965c51a4220427d9e8b34eec92d58a997
parent: 607e45f42027cde9cab7a017559ea02fd397fffd
author: Paul Wilkins <paulwilkins@google.com>
date: Fri Nov 17 05:34:26 EST 2017

Merge "Add clause to alt ref group breakout."

--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -2091,8 +2091,8 @@
   }
   arf_boost += (int)boost_score;
 
-  if (arf_boost < ((b_frames + f_frames) * 20))
-    arf_boost = ((b_frames + f_frames) * 20);
+  if (arf_boost < ((b_frames + f_frames) * 40))
+    arf_boost = ((b_frames + f_frames) * 40);
   arf_boost = VPXMAX(arf_boost, MIN_ARF_GF_BOOST);
 
   return arf_boost;
@@ -2562,7 +2562,6 @@
     }
 
     // Calculate a boost number for this frame.
-    sr_accumulator = 0.0;
     boost_score += decay_accumulator *
                    calc_frame_boost(cpi, &next_frame, &sr_accumulator,
                                     this_frame_mv_in_out, GF_MAX_BOOST);
@@ -2580,7 +2579,8 @@
             ((mv_ratio_accumulator > mv_ratio_accumulator_thresh) ||
              (abs_mv_in_out_accumulator > abs_mv_in_out_thresh) ||
              (mv_in_out_accumulator < -mv_in_out_thresh) ||
-             (decay_accumulator < ARF_DECAY_BREAKOUT)))) {
+             (decay_accumulator < ARF_DECAY_BREAKOUT) ||
+             (sr_accumulator > next_frame.intra_error)))) {
       boost_score = old_boost_score;
       break;
     }