summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco <marpan@google.com>2017-04-12 17:06:03 -0700
committerMarco <marpan@google.com>2017-04-13 11:44:35 -0700
commit6bff6cb5a9efe88c2cbe2c5f967560f68ee3ce29 (patch)
treeb762c22d2cc977991361380166f38efce3e02886
parentf22b828d685adee4c7a561990302e2d21b5e0047 (diff)
downloadlibvpx-6bff6cb5a9efe88c2cbe2c5f967560f68ee3ce29.tar
libvpx-6bff6cb5a9efe88c2cbe2c5f967560f68ee3ce29.tar.gz
libvpx-6bff6cb5a9efe88c2cbe2c5f967560f68ee3ce29.tar.bz2
libvpx-6bff6cb5a9efe88c2cbe2c5f967560f68ee3ce29.zip
vp9: 1 pass VBR: Fix to rate control at low min-q.
Fix to avoid getting stuck at very low Q even though content is changing, which can happen for --min-q=0. Fix is to more aggressively increase active_worst_quality when detecting significant rate_deviation at very low Q. Change will only affect 1 pass VBR for --min-q < 4, so no change in ytlive metrics for --min-q >= 4. Change-Id: I4dd77dd7c08a30a4390da0ff2c8bda6fccfa76d7
-rw-r--r--vp9/encoder/vp9_ratectrl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c
index f79b7c6fc..b1866cd8a 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -2172,6 +2172,11 @@ void adjust_gf_boost_lag_one_pass_vbr(VP9_COMP *cpi, uint64_t avg_sad_current) {
if (rate_err < 2.0 && !high_content) {
rc->fac_active_worst_inter = 120;
rc->fac_active_worst_gf = 90;
+ } else if (rate_err > 8.0 && rc->avg_frame_qindex[INTER_FRAME] < 16) {
+ // Increase active_worst faster at low Q if rate fluctuation is high.
+ rc->fac_active_worst_inter = 200;
+ if (rc->avg_frame_qindex[INTER_FRAME] < 8)
+ rc->fac_active_worst_inter = 400;
}
if (low_content && rc->avg_frame_low_motion > 80) {
rc->af_ratio_onepass_vbr = 15;