diff options
author | Deb Mukherjee <debargha@google.com> | 2014-02-10 17:52:44 -0800 |
---|---|---|
committer | Deb Mukherjee <debargha@google.com> | 2014-02-11 16:59:56 -0800 |
commit | d23e339202b46f6d54595d2464f9312a95f26075 (patch) | |
tree | 3a4b6c7aac820174c359d5a7c063143e630b0d63 /vp9/encoder/vp9_onyx_if.c | |
parent | 992500b8cb5144a6e0505a33eb9a312d4b78ab00 (diff) | |
download | libvpx-d23e339202b46f6d54595d2464f9312a95f26075.tar libvpx-d23e339202b46f6d54595d2464f9312a95f26075.tar.gz libvpx-d23e339202b46f6d54595d2464f9312a95f26075.tar.bz2 libvpx-d23e339202b46f6d54595d2464f9312a95f26075.zip |
Removes active_worst_quality feedback
Removes certain cases of feedback of active_worst_quality,
and removes it from the RATE_CONTROL structure. Now active
worst quality is expected to be computed locally in the
q picking function during the encode.
Making temporal filter strength depend on avg_frame_qindex
rather than on active_worst_quality actually improves
performance esp. for yt.
derf: +0.038%
yt: +0.359%
Change-Id: I1fe5a343034b55af9322289165321f00ac0827b1
Diffstat (limited to 'vp9/encoder/vp9_onyx_if.c')
-rw-r--r-- | vp9/encoder/vp9_onyx_if.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c index a81aa0a71..55ee6ca42 100644 --- a/vp9/encoder/vp9_onyx_if.c +++ b/vp9/encoder/vp9_onyx_if.c @@ -1155,10 +1155,9 @@ static void init_layer_context(VP9_COMP *const cpi) { ++temporal_layer) { LAYER_CONTEXT *const lc = &cpi->svc.layer_context[temporal_layer]; RATE_CONTROL *const lrc = &lc->rc; - lrc->active_worst_quality = q_trans[oxcf->worst_allowed_q]; - lrc->avg_frame_qindex[INTER_FRAME] = lrc->active_worst_quality; - lrc->last_q[INTER_FRAME] = lrc->active_worst_quality; - lrc->ni_av_qi = lrc->active_worst_quality; + lrc->avg_frame_qindex[INTER_FRAME] = q_trans[oxcf->worst_allowed_q]; + lrc->last_q[INTER_FRAME] = q_trans[oxcf->worst_allowed_q]; + lrc->ni_av_qi = q_trans[oxcf->worst_allowed_q]; lrc->total_actual_bits = 0; lrc->total_target_vs_actual = 0; lrc->ni_tot_qi = 0; @@ -1203,7 +1202,6 @@ static void update_layer_context_change_config(VP9_COMP *const cpi, // Update qp-related quantities. lrc->worst_quality = rc->worst_quality; lrc->best_quality = rc->best_quality; - lrc->active_worst_quality = rc->active_worst_quality; } } @@ -1302,8 +1300,6 @@ static void init_config(VP9_PTR ptr, VP9_CONFIG *oxcf) { vp9_change_config(ptr, oxcf); // Initialize active best and worst q and average q values. - cpi->rc.active_worst_quality = cpi->oxcf.worst_allowed_q; - if (cpi->pass == 0 && cpi->oxcf.end_usage == USAGE_STREAM_FROM_SERVER) { cpi->rc.avg_frame_qindex[0] = cpi->oxcf.worst_allowed_q; cpi->rc.avg_frame_qindex[1] = cpi->oxcf.worst_allowed_q; @@ -1449,9 +1445,6 @@ void vp9_change_config(VP9_PTR ptr, VP9_CONFIG *oxcf) { cpi->rc.best_quality = cpi->oxcf.best_allowed_q; // active values should only be modified if out of new range - cpi->rc.active_worst_quality = clamp(cpi->rc.active_worst_quality, - cpi->rc.best_quality, - cpi->rc.worst_quality); cpi->cq_target_quality = cpi->oxcf.cq_level; @@ -2727,7 +2720,7 @@ static void output_frame_level_debug_stats(VP9_COMP *cpi) { if (cpi->twopass.total_left_stats.coded_error != 0.0) fprintf(f, "%10u %10d %10d %10d %10d %10d " "%10"PRId64" %10"PRId64" %10d " - "%7.2lf %7.2lf %7.2lf %7.2lf %7.2lf %7.2lf" + "%7.2lf %7.2lf %7.2lf %7.2lf %7.2lf" "%6d %6d %5d %5d %5d " "%10"PRId64" %10.3lf" "%10lf %8u %10d %10d %10d\n", @@ -2740,7 +2733,7 @@ static void output_frame_level_debug_stats(VP9_COMP *cpi) { cpi->rc.total_actual_bits, cm->base_qindex, vp9_convert_qindex_to_q(cm->base_qindex), (double)vp9_dc_quant(cm->base_qindex, 0) / 4.0, - vp9_convert_qindex_to_q(cpi->rc.active_worst_quality), cpi->rc.avg_q, + cpi->rc.avg_q, vp9_convert_qindex_to_q(cpi->rc.ni_av_qi), vp9_convert_qindex_to_q(cpi->cq_target_quality), cpi->refresh_last_frame, cpi->refresh_golden_frame, @@ -3209,9 +3202,7 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi, #endif // Decide q and q bounds. - q = vp9_rc_pick_q_and_adjust_q_bounds(cpi, - &bottom_index, - &top_index); + q = vp9_rc_pick_q_and_bounds(cpi, &bottom_index, &top_index); if (!frame_is_intra_only(cm)) { cm->interp_filter = DEFAULT_INTERP_FILTER; |