shithub: libvpx

Download patch

ref: 479c669a6107933d24d5b159bdca9585b029f822
parent: 4735edd00f6a7b4131b9b9c33b220bfaf0d5a68a
parent: 7501de267c1e8bb7083a16ec2e6d38b150301f3c
author: Marco <[email protected]>
date: Fri Jul 17 17:31:55 EDT 2015

Merge "Dynamic resize 1 pass mode: fix buffer underflow threshold."

--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -1810,13 +1810,12 @@
     cpi->resize_count = 0;
     return 0;
   }
-  // Resize based on average QP over some window.
+  // Resize based on average buffer underflow and QP over some window.
   // Ignore samples close to key frame, since QP is usually high after key.
   if (cpi->rc.frames_since_key > 2 * cpi->framerate) {
     const int window = (int)(5 * cpi->framerate);
     cpi->resize_avg_qp += cm->base_qindex;
-    if (cpi->rc.buffer_level < (int)(cpi->oxcf.drop_frames_water_mark *
-        rc->optimal_buffer_level / 100))
+    if (cpi->rc.buffer_level < (int)(30 * rc->optimal_buffer_level / 100))
       ++cpi->resize_buffer_underflow;
     ++cpi->resize_count;
     // Check for resize action every "window" frames.