vp9: Fix to active_best for GF/ARF in 1 pass vbr.

Correct the setting of Q basis of GF/ARF in 1 pass vbr.

Existing logic would switch to using avg_QP of key frame if
avg_QP of inter is less than active worst (even if key frame is
not last frame).

Instead fix the logic (as per the comment) to use the lower of
active_worst_quality and avg_Q for inter as basis for GF/ARF
active_best_quality (unless last frame was key frame).

Increase in metrics: AvgPSNR/SSIM up by ~0.7/0.3 on ytlive set.

Change-Id: I9a628378ec6684bfda9457ebfc2384ef6d8579f7
This commit is contained in:
Marco 2016-04-07 17:20:16 -07:00
Родитель 5b3d3b1909
Коммит 3861b25be1
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -882,9 +882,12 @@ static int rc_pick_q_and_bounds_one_pass_vbr(const VP9_COMP *cpi,
// Use the lower of active_worst_quality and recent
// average Q as basis for GF/ARF best Q limit unless last frame was
// a key frame.
if (rc->frames_since_key > 1 &&
rc->avg_frame_qindex[INTER_FRAME] < active_worst_quality) {
if (rc->frames_since_key > 1) {
if (rc->avg_frame_qindex[INTER_FRAME] < active_worst_quality) {
q = rc->avg_frame_qindex[INTER_FRAME];
} else {
q = active_worst_quality;
}
} else {
q = rc->avg_frame_qindex[KEY_FRAME];
}