summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorDebargha Mukherjee <debargha@google.com>2015-04-07 16:15:11 -0700
committerDebargha Mukherjee <debargha@google.com>2015-04-07 16:29:21 -0700
commit60bd744c8800423fe28deb65d9129030f2928332 (patch)
tree7461bc42dc488a150772e2a0f55f01c2b5c8e924 /vp9/encoder
parent5eee2a88f88ff1d475b12e62357c38399b583802 (diff)
downloadlibvpx-60bd744c8800423fe28deb65d9129030f2928332.tar
libvpx-60bd744c8800423fe28deb65d9129030f2928332.tar.gz
libvpx-60bd744c8800423fe28deb65d9129030f2928332.tar.bz2
libvpx-60bd744c8800423fe28deb65d9129030f2928332.zip
Improve accuracy of rate control in CQ mode
Modifies a special handling that improves rate control accuracy in the constrained quality mode, when the undershoot and overshoot limits are set tighter. Change-Id: If62103f0ef3ed1cac92807400678c93da50cf046
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_firstpass.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c
index 380f0b78a..bf9e50047 100644
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -2612,6 +2612,7 @@ void vp9_rc_get_second_pass_params(VP9_COMP *cpi) {
}
#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 @@ void vp9_twopass_postencode_update(VP9_COMP *cpi) {
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) {