Commit 1c7b1f9a authored by Marco's avatar Marco
Browse files

Update to dynamic resize logic for 1pass CBR.

Only do the check for resizing if the feature is selected
(i.e., resize_mode = RESIZE_DYNAMIC).

And modify condition for checking to be resize_count >= window,
(since framerate can change).

Change-Id: Idceb4e50956bb965a1492b4993b0dcb393c9be4d
parent 3393243d
......@@ -1596,7 +1596,10 @@ void vp9_rc_get_one_pass_cbr_params(VP9_COMP *cpi) {
target = calc_pframe_target_size_one_pass_cbr(cpi);
vp9_rc_set_frame_target(cpi, target);
if (cpi->oxcf.resize_mode == RESIZE_DYNAMIC)
cpi->resize_state = vp9_resize_one_pass_cbr(cpi);
else
cpi->resize_state = 0;
}
int vp9_compute_qdelta(const RATE_CONTROL *rc, double qstart, double qtarget,
......@@ -1781,7 +1784,7 @@ int vp9_resize_one_pass_cbr(VP9_COMP *cpi) {
++cpi->resize_buffer_underflow;
++cpi->resize_count;
// Check for resize action every "window" frames.
if (cpi->resize_count == window) {
if (cpi->resize_count >= window) {
int avg_qp = cpi->resize_avg_qp / cpi->resize_count;
// Resize down if buffer level has underflowed sufficent amount in past
// window, and we are at original resolution.
......
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