summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaulwilkins <paulwilkins@google.com>2015-12-15 10:27:51 +0000
committerpaulwilkins <paulwilkins@google.com>2015-12-15 10:27:51 +0000
commitcea5e1c1e362ea37612346ed1585ae28089c1f45 (patch)
tree9176457ab36cb326f05c2d6431c57beefd777813
parent449e46958cd8d644f7713dd8312636f7aa72b139 (diff)
downloadlibvpx-cea5e1c1e362ea37612346ed1585ae28089c1f45.tar
libvpx-cea5e1c1e362ea37612346ed1585ae28089c1f45.tar.gz
libvpx-cea5e1c1e362ea37612346ed1585ae28089c1f45.tar.bz2
libvpx-cea5e1c1e362ea37612346ed1585ae28089c1f45.zip
1 pass VBR mode bug fix.
The one pass VBR mode selects a Q range based on a moving average of recent Q values. This calculation should have been excluding arf overlay frames as these are usually coded at the highest allowed value. Their inclusion skews the average and can cause it to drift upwards even when the clip as a whole is undershooting. As such it can undermine correct adaptation of the allowed Q range especially for easy content. Change-Id: I7d10fe4227262376aa2dc2a7aec0f1fd82bf11f9
-rw-r--r--vp9/encoder/vp9_ratectrl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c
index 8ab51cd20..22b0f8c1b 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -1313,9 +1313,9 @@ void vp9_rc_postencode_update(VP9_COMP *cpi, uint64_t bytes_used) {
}
}
} else {
- if (rc->is_src_frame_alt_ref ||
- !(cpi->refresh_golden_frame || cpi->refresh_alt_ref_frame) ||
- (cpi->use_svc && oxcf->rc_mode == VPX_CBR)) {
+ if ((cpi->use_svc && oxcf->rc_mode == VPX_CBR) ||
+ (!rc->is_src_frame_alt_ref &&
+ !(cpi->refresh_golden_frame || cpi->refresh_alt_ref_frame))) {
rc->last_q[INTER_FRAME] = qindex;
rc->avg_frame_qindex[INTER_FRAME] =
ROUND_POWER_OF_TWO(3 * rc->avg_frame_qindex[INTER_FRAME] + qindex, 2);