Merge "vp9-1 pass vbr: Use average QP for active_worst_quality, for inter-frames."
This commit is contained in:
Коммит
e96f0c3db3
|
@ -621,15 +621,16 @@ static int calc_active_worst_quality_one_pass_vbr(const VP9_COMP *cpi) {
|
|||
|
||||
if (cpi->common.frame_type == KEY_FRAME) {
|
||||
active_worst_quality = curr_frame == 0 ? rc->worst_quality
|
||||
: rc->last_q[KEY_FRAME] * 2;
|
||||
: rc->last_q[KEY_FRAME] << 1;
|
||||
} else {
|
||||
if (!rc->is_src_frame_alt_ref &&
|
||||
(cpi->refresh_golden_frame || cpi->refresh_alt_ref_frame)) {
|
||||
active_worst_quality = curr_frame == 1 ? rc->last_q[KEY_FRAME] * 5 / 4
|
||||
active_worst_quality = curr_frame == 1 ? rc->last_q[KEY_FRAME] * 5 >> 2
|
||||
: rc->last_q[INTER_FRAME];
|
||||
} else {
|
||||
active_worst_quality = curr_frame == 1 ? rc->last_q[KEY_FRAME] * 2
|
||||
: rc->last_q[INTER_FRAME] * 2;
|
||||
active_worst_quality = curr_frame == 1 ? rc->last_q[KEY_FRAME] << 1 :
|
||||
VPXMIN(rc->last_q[INTER_FRAME] << 1,
|
||||
(rc->avg_frame_qindex[INTER_FRAME] * 3 >> 1));
|
||||
}
|
||||
}
|
||||
return VPXMIN(active_worst_quality, rc->worst_quality);
|
||||
|
@ -662,7 +663,7 @@ static int calc_active_worst_quality_one_pass_cbr(const VP9_COMP *cpi) {
|
|||
VPXMIN(rc->avg_frame_qindex[INTER_FRAME],
|
||||
rc->avg_frame_qindex[KEY_FRAME]) :
|
||||
rc->avg_frame_qindex[INTER_FRAME];
|
||||
active_worst_quality = VPXMIN(rc->worst_quality, ambient_qp * 5 / 4);
|
||||
active_worst_quality = VPXMIN(rc->worst_quality, ambient_qp * 5 >> 2);
|
||||
if (rc->buffer_level > rc->optimal_buffer_level) {
|
||||
// Adjust down.
|
||||
// Maximum limit for down adjustment, ~30%.
|
||||
|
|
Загрузка…
Ссылка в новой задаче