Commit 2f66fdd3 authored by Marco's avatar Marco

Adjust some logic for dynamic_resize 1 pass mode.

Use drop_frames_water_mark for threshold on buffer underflow,
and change threshold for resize down.

Change-Id: I2de19adce50abe9bcdc0b107528cec8cc1857fcc
parent 7b756183
......@@ -1813,7 +1813,8 @@ int vp9_resize_one_pass_cbr(VP9_COMP *cpi) {
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 < 0)
if (cpi->rc.buffer_level < (int)(cpi->oxcf.drop_frames_water_mark *
rc->optimal_buffer_level / 100))
++cpi->resize_buffer_underflow;
++cpi->resize_count;
// Check for resize action every "window" frames.
......@@ -1824,7 +1825,7 @@ int vp9_resize_one_pass_cbr(VP9_COMP *cpi) {
// Resize back up if average QP is low, and we are currently in a resized
// down state.
if (cpi->resize_state == 0 &&
cpi->resize_buffer_underflow > (cpi->resize_count >> 3)) {
cpi->resize_buffer_underflow > (cpi->resize_count >> 2)) {
resize_now = 1;
} else if (cpi->resize_state == 1 &&
avg_qp < 40 * cpi->rc.worst_quality / 100) {
......
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