Commit 479c669a authored by Marco's avatar Marco Committed by Gerrit Code Review

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

parents 4735edd0 7501de26
......@@ -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