Commit 11b34f1e authored by Paul Wilkins's avatar Paul Wilkins
Browse files

Adjust arf Q limits with multi-arf.

Adjust enforced minimum arf Q deltas for non primary arfs
in the middle of an arf/gf group.

Change-Id: Ie8034ffb3ac00f887d74ae1586d4cac91d6cace2
Showing with 13 additions and 14 deletions
...@@ -892,21 +892,20 @@ static int rc_pick_q_and_bounds_two_pass(const VP9_COMP *cpi, ...@@ -892,21 +892,20 @@ static int rc_pick_q_and_bounds_two_pass(const VP9_COMP *cpi,
*bottom_index = active_best_quality; *bottom_index = active_best_quality;
#if LIMIT_QRANGE_FOR_ALTREF_AND_KEY #if LIMIT_QRANGE_FOR_ALTREF_AND_KEY
vp9_clear_system_state();
{ {
int qdelta = 0; const GF_GROUP *const gf_group = &cpi->twopass.gf_group;
vp9_clear_system_state(); const double rate_factor_deltas[RATE_FACTOR_LEVELS] = {
1.00, // INTER_NORMAL
// Limit Q range for the adaptive loop. 1.00, // INTER_HIGH
if ((cm->frame_type == KEY_FRAME || vp9_is_upper_layer_key_frame(cpi)) && 1.50, // GF_ARF_LOW
!rc->this_key_frame_forced) { 1.75, // GF_ARF_STD
qdelta = vp9_compute_qdelta_by_rate(&cpi->rc, cm->frame_type, 2.00, // KF_STD
active_worst_quality, 2.0); };
} else if (!rc->is_src_frame_alt_ref && const double rate_factor =
(oxcf->rc_mode != VPX_CBR) && rate_factor_deltas[gf_group->rf_level[gf_group->index]];
(cpi->refresh_alt_ref_frame)) { int qdelta = vp9_compute_qdelta_by_rate(&cpi->rc, cm->frame_type,
qdelta = vp9_compute_qdelta_by_rate(&cpi->rc, cm->frame_type, active_worst_quality, rate_factor);
active_worst_quality, 1.75);
}
*top_index = active_worst_quality + qdelta; *top_index = active_worst_quality + qdelta;
*top_index = (*top_index > *bottom_index) ? *top_index : *bottom_index; *top_index = (*top_index > *bottom_index) ? *top_index : *bottom_index;
} }
......
Supports Markdown
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