shithub: libvpx

Download patch

ref: 3de42ac27bee4efdc83be55fca73ae7c78c0b97b
parent: c2ebd0e6da69b343704e8545c26113b0c33f4405
author: Marco <[email protected]>
date: Mon Jun 6 07:42:09 EDT 2016

vp9: Small ajustment to settings gf_interval, 1 pass vbr.

Add a max condition and lower the min value.

No change in behavior (metrics for yt live set) for the
default min/max_gf_interval=4/16 settings.
Small positive change when min/max_gf_interval=7/16
(for 60fps clips on ytlive set).

Change-Id: I1c1d72425c86c69419ea43fb9730130e81062f91

--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -1558,12 +1558,13 @@
     if (cm->current_video_frame > 30 &&
         rc->avg_frame_qindex[INTER_FRAME] > (7 * rc->worst_quality) >> 3 &&
         rc->avg_size_inter > (5 * rc->avg_frame_bandwidth) >> 1) {
-        rc->baseline_gf_interval = (3 * rc->baseline_gf_interval) >> 1;
+        rc->baseline_gf_interval =
+            VPXMIN(15, (3 * rc->baseline_gf_interval) >> 1);
     } else if (cm->current_video_frame > 30 &&
                rc->avg_frame_low_motion < 20) {
       // Decrease boost and gf interval for high motion case.
       rc->gfu_boost = DEFAULT_GF_BOOST >> 1;
-      rc->baseline_gf_interval = VPXMIN(6, rc->baseline_gf_interval >> 1);
+      rc->baseline_gf_interval = VPXMAX(5, rc->baseline_gf_interval >> 1);
     }
     adjust_gf_key_frame(cpi);
     rc->frames_till_gf_update_due = rc->baseline_gf_interval;