ref: 7501de267c1e8bb7083a16ec2e6d38b150301f3c
parent: b8ff84b7f88a022a0b101156fc2a1157eece813f
author: Marco <[email protected]>
date: Fri Jul 17 07:21:47 EDT 2015
Dynamic resize 1 pass mode: fix buffer underflow threshold. Remove the use of drop_frames_water_mark, as this is used for frame dropping control. Use fixed threshold for now on buffer underflow. Change-Id: If0ddda9f7f6fa96067cdcb0eccb42e17bda37c32
--- 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.