shithub: libvpx

Download patch

ref: 59681be0a04a275daf5345274b61cebb6000f594
parent: 2ed0cf06f9984a6c1ae2762c9fa0b5347027fbc6
parent: 60bd744c8800423fe28deb65d9129030f2928332
author: Debargha Mukherjee <debargha@google.com>
date: Wed Apr 8 06:48:17 EDT 2015

Merge "Improve accuracy of rate control in CQ mode"

--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -2612,6 +2612,7 @@
 }
 
 #define MINQ_ADJ_LIMIT 48
+#define MINQ_ADJ_LIMIT_CQ 20
 void vp9_twopass_postencode_update(VP9_COMP *cpi) {
   TWO_PASS *const twopass = &cpi->twopass;
   RATE_CONTROL *const rc = &cpi->rc;
@@ -2651,7 +2652,7 @@
     const int maxq_adj_limit =
       rc->worst_quality - twopass->active_worst_quality;
     const int minq_adj_limit =
-      (cpi->oxcf.rc_mode == VPX_CQ) ? 0 : MINQ_ADJ_LIMIT;
+        (cpi->oxcf.rc_mode == VPX_CQ ? MINQ_ADJ_LIMIT_CQ : MINQ_ADJ_LIMIT);
 
     // Undershoot.
     if (rc->rate_error_estimate > cpi->oxcf.under_shoot_pct) {