From: Marco Date: Thu, 20 Oct 2016 18:28:48 +0000 (-0700) Subject: vp8: Apply gf target-size boost only when refresh_golden_frame = 1. X-Git-Tag: v1.6.1~158^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9fdae9385875449d061336cf863f7eea8c89f4b7;p=libvpx vp8: Apply gf target-size boost only when refresh_golden_frame = 1. Change only affects 1 pass cbr, error resilience off. Change-Id: I68b896b09d722995a71c44331233e97bd862bcfc --- diff --git a/vp8/encoder/ratectrl.c b/vp8/encoder/ratectrl.c index c0de39093..e89247ae4 100644 --- a/vp8/encoder/ratectrl.c +++ b/vp8/encoder/ratectrl.c @@ -1011,12 +1011,13 @@ static void calc_pframe_target_size(VP8_COMP *cpi) { // 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; }