From 3de42ac27bee4efdc83be55fca73ae7c78c0b97b Mon Sep 17 00:00:00 2001 From: Marco Date: Mon, 6 Jun 2016 11:42:09 -0700 Subject: [PATCH] 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 --- vp9/encoder/vp9_ratectrl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c index 7636dcf3f..6c3f91951 100644 --- a/vp9/encoder/vp9_ratectrl.c +++ b/vp9/encoder/vp9_ratectrl.c @@ -1558,12 +1558,13 @@ void vp9_rc_get_one_pass_vbr_params(VP9_COMP *cpi) { 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; -- 2.40.0