diff options
author | Paul Wilkins <paulwilkins@google.com> | 2014-11-12 12:36:16 -0800 |
---|---|---|
committer | Paul Wilkins <paulwilkins@google.com> | 2014-11-20 15:50:15 -0800 |
commit | 6a760d483db372b048234e0db67d66bb7b6f81ae (patch) | |
tree | d775e449a52c499493dd61e769f044739fb8d639 /vp9/encoder/vp9_encodeframe.c | |
parent | b74eeb8675a2653c4961a22a747a7a75b107ed15 (diff) | |
download | libvpx-6a760d483db372b048234e0db67d66bb7b6f81ae.tar libvpx-6a760d483db372b048234e0db67d66bb7b6f81ae.tar.gz libvpx-6a760d483db372b048234e0db67d66bb7b6f81ae.tar.bz2 libvpx-6a760d483db372b048234e0db67d66bb7b6f81ae.zip |
Initial AQ1 restructuring.
This is the first of a series of patches to restructure and
improve AQ mode 1 (variance based AQ).
Change-Id: Idcf693131a3ea2459dcfd957a54a65b971fa4a2a
Diffstat (limited to 'vp9/encoder/vp9_encodeframe.c')
-rw-r--r-- | vp9/encoder/vp9_encodeframe.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index 31683da40..93e85292a 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -851,6 +851,7 @@ static void rd_pick_sb_modes(VP9_COMP *cpi, if (aq_mode == VARIANCE_AQ) { const int energy = bsize <= BLOCK_16X16 ? x->mb_energy : vp9_block_energy(cpi, x, bsize); + int segment_qindex; if (cm->frame_type == KEY_FRAME || cpi->refresh_alt_ref_frame || (cpi->refresh_golden_frame && !cpi->rc.is_src_frame_alt_ref)) { @@ -860,11 +861,13 @@ static void rd_pick_sb_modes(VP9_COMP *cpi, : cm->last_frame_seg_map; mbmi->segment_id = vp9_get_segment_id(cm, map, bsize, mi_row, mi_col); } - - rdmult_ratio = vp9_vaq_rdmult_ratio(energy); vp9_init_plane_quantizers(cpi, x); vp9_clear_system_state(); - x->rdmult = (int)round(x->rdmult * rdmult_ratio); + segment_qindex = vp9_get_qindex(&cm->seg, mbmi->segment_id, + cm->base_qindex); + x->rdmult = vp9_compute_rd_mult(cpi, segment_qindex + cm->y_dc_delta_q); + vp9_clear_system_state(); + rdmult_ratio = (double)x->rdmult / orig_rdmult; } else if (aq_mode == COMPLEXITY_AQ) { const int mi_offset = mi_row * cm->mi_cols + mi_col; unsigned char complexity = cpi->complexity_map[mi_offset]; |