ref: 4b2b90fed3e905b852ed7c3cffec5a85ba1687e6
parent: 9e612763f0eeab6c231afe6a2821ebed529715c9
author: Alex Converse <[email protected]>
date: Mon Jan 25 07:03:50 EST 2016
vp9: Be more responsive to massive overshoot. Limit oscilation detection in the case where overshoot is very very large. This keeps the 9-bit cost patch from breaking the DownUp reisze test. The patch pushed us to an 11% undershoot right before a scene cut causing a 1200% overshoot. (Whereas before we were undershooting by only 6% before overshooting by 1200%). Change-Id: Id90ccfab8aba872ccadc45b73b3bb097b895677f
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -500,6 +500,12 @@
else
cpi->rc.rc_1_frame = 0;
+ // Turn off oscilation detection in the case of massive overshoot.
+ if (cpi->rc.rc_1_frame == -1 && cpi->rc.rc_2_frame == 1 &&
+ correction_factor > 1000) {
+ cpi->rc.rc_2_frame = 0;
+ }
+
if (correction_factor > 102) {
// We are not already at the worst allowable quality
correction_factor = (int)(100 + ((correction_factor - 100) *