Commit 7501de26 authored by Marco's avatar Marco

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
parent b8ff84b7
......@@ -1810,13 +1810,12 @@ int vp9_resize_one_pass_cbr(VP9_COMP *cpi) {
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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment