shithub: libvpx

Download patch

ref: 32e63efcfb5fcba373328965981a3beaf72c1b0b
parent: 83ca63582a8837599ec2676e9012f4fb807cc2f7
parent: 9fdae9385875449d061336cf863f7eea8c89f4b7
author: Marco Paniconi <marpan@google.com>
date: Thu Oct 20 18:38:55 EDT 2016

Merge "vp8: Apply gf target-size boost only when refresh_golden_frame = 1."

--- a/vp8/encoder/ratectrl.c
+++ b/vp8/encoder/ratectrl.c
@@ -1011,12 +1011,13 @@
       // gf_noboost_onepass_cbr = 1, which forces the gf to use the same
       // rate correction factor as last.
       cpi->gf_noboost_onepass_cbr = (cpi->oxcf.gf_cbr_boost_pct <= 100);
-      cpi->this_frame_target =
-          (cpi->this_frame_target * (100 + cpi->oxcf.gf_cbr_boost_pct)) / 100;
       cpi->baseline_gf_interval = cpi->gf_interval_onepass_cbr;
       // Skip this update if the zero_mvcount is low.
-      if (cpi->zeromv_count > (cpi->common.MBs >> 1))
+      if (cpi->zeromv_count > (cpi->common.MBs >> 1)) {
         cpi->common.refresh_golden_frame = 1;
+        cpi->this_frame_target =
+            (cpi->this_frame_target * (100 + cpi->oxcf.gf_cbr_boost_pct)) / 100;
+      }
       cpi->frames_till_gf_update_due = cpi->baseline_gf_interval;
       cpi->current_gf_interval = cpi->frames_till_gf_update_due;
     }