shithub: libvpx

Download patch

ref: f6f544278e0d02f00e9e0e9299011e1703dcc392
parent: e96f0c3db3f61b65bdd63c1ed8867218111dbb62
author: Marco <marpan@google.com>
date: Thu Apr 7 07:57:49 EDT 2016

vp9: Some adjustments to scene-cut detection.

Change only affects 1 pass vbr mode, speed >=5.
Increase min_thresh, decrease boost, and set a min/max
value for gf_interval.

Change-Id: I9c1e1a1ab0c5780064eb62714ee39a72ea4d2107

--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -2048,7 +2048,7 @@
     // for cases where there is small change from content that is completely
     // static.
     if (cpi->oxcf.rc_mode == VPX_VBR) {
-      min_thresh = 30000;
+      min_thresh = 40000;
       thresh = 2.0f;
     }
     if (avg_sad >
@@ -2062,14 +2062,15 @@
     // For VBR, under scene change/high content change, force golden refresh.
     if (cpi->oxcf.rc_mode == VPX_VBR &&
         rc->high_source_sad &&
-        cpi->refresh_golden_frame == 0 &&
         cpi->ext_refresh_frame_flags_pending == 0) {
       int target;
       cpi->refresh_golden_frame = 1;
+      rc->gfu_boost = DEFAULT_GF_BOOST >> 1;
+      rc->baseline_gf_interval = VPXMIN(20,
+          VPXMAX(10, rc->baseline_gf_interval));
       rc->frames_till_gf_update_due = rc->baseline_gf_interval;
       if (rc->frames_till_gf_update_due > rc->frames_to_key)
         rc->frames_till_gf_update_due = rc->frames_to_key;
-      rc->gfu_boost = DEFAULT_GF_BOOST;
       target = calc_pframe_target_size_one_pass_vbr(cpi);
       vp9_rc_set_frame_target(cpi, target);
     }