For CBR mode: clamp the Q to worst/best quality in
adjust_q_cbr().
Under certain conditions, when the worst/best quality is
suddenly changed by a large amount mid-stream, the Q
adjustment from the final Q from adjust_q_cbr may not respect
the worst/best qualiy limits.
Change-Id: I3776129325d89882d422b22e6247d44660dd90ac
}
if (cpi->oxcf.content == VP9E_CONTENT_SCREEN)
vp9_cyclic_refresh_limit_q(cpi, &q);
- return q;
+ return VPXMAX(VPXMIN(q, cpi->rc.worst_quality), cpi->rc.best_quality);
}
static double get_rate_correction_factor(const VP9_COMP *cpi) {
q = *top_index;
}
}
+
assert(*top_index <= rc->worst_quality && *top_index >= rc->best_quality);
assert(*bottom_index <= rc->worst_quality &&
*bottom_index >= rc->best_quality);