summaryrefslogtreecommitdiff
path: root/vp8
diff options
context:
space:
mode:
authorMarco <marpan@chromium.org>2015-09-24 15:15:29 -0700
committerMarco <marpan@chromium.org>2015-09-24 16:40:29 -0700
commitece841f03f1440d0b1b0f839a8730888bb2ad577 (patch)
tree14e26b99ea3478ce84953f5bb40e2607507cae32 /vp8
parent20b770eecd2fe3ff4b8be7c58fb9d67b32fee591 (diff)
downloadlibvpx-ece841f03f1440d0b1b0f839a8730888bb2ad577.tar
libvpx-ece841f03f1440d0b1b0f839a8730888bb2ad577.tar.gz
libvpx-ece841f03f1440d0b1b0f839a8730888bb2ad577.tar.bz2
libvpx-ece841f03f1440d0b1b0f839a8730888bb2ad577.zip
VP8: Adjust rate correction factor for drop due to overshoot.
Change-Id: Id70ca2e18a46247720eb631ae13a8430bd8b0954
Diffstat (limited to 'vp8')
-rw-r--r--vp8/encoder/ratectrl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/vp8/encoder/ratectrl.c b/vp8/encoder/ratectrl.c
index f2642227b..63c8e68f9 100644
--- a/vp8/encoder/ratectrl.c
+++ b/vp8/encoder/ratectrl.c
@@ -1596,6 +1596,10 @@ int vp8_drop_encodedframe_overshoot(VP8_COMP *cpi, int Q) {
// Drop this frame: advance frame counters, and set force_maxqp flag.
cpi->common.current_video_frame++;
cpi->frames_since_key++;
+ // Adjust rate correction factor upwards.
+ cpi->rate_correction_factor *= 2.0;
+ if (cpi->rate_correction_factor > MAX_BPB_FACTOR)
+ cpi->rate_correction_factor = MAX_BPB_FACTOR;
// Flag to indicate we will force next frame to be encoded at max QP.
cpi->force_maxqp = 1;
return 1;