shithub: libvpx

Download patch

ref: 0308e2ee6dbefa7558374b0470d2c3ea17786a04
parent: 340260585c9becb8c905ca8679904b78e0364a43
author: Deb Mukherjee <debargha@google.com>
date: Tue Mar 10 13:25:10 EDT 2015

Some rate control adjustments to control overshoot

Some rate control adjustments to control overshoot
in the constrained quality mode.

Change-Id: I8907b9a883642d779009d0a138adfa6ba67e7f41

--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -754,7 +754,7 @@
 
 static int get_active_cq_level(const RATE_CONTROL *rc,
                                const VP9EncoderConfig *const oxcf) {
-  static const double cq_adjust_threshold = 0.5;
+  static const double cq_adjust_threshold = 0.1;
   int active_cq_level = oxcf->cq_level;
   if (oxcf->rc_mode == VPX_CQ &&
       rc->total_target_bits > 0) {
@@ -1687,7 +1687,7 @@
   int target_rate = rc->base_frame_target;
 
   // Correction to rate target based on prior over or under shoot.
-  if (cpi->oxcf.rc_mode == VPX_VBR)
+  if (cpi->oxcf.rc_mode == VPX_VBR || cpi->oxcf.rc_mode == VPX_CQ)
     vbr_rate_correction(cpi, &target_rate, rc->vbr_bits_off_target);
   vp9_rc_set_frame_target(cpi, target_rate);
 }