summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encodeframe.c
diff options
context:
space:
mode:
authorPaul Wilkins <paulwilkins@google.com>2014-11-20 18:32:44 -0800
committerPaul Wilkins <paulwilkins@google.com>2014-11-21 08:51:58 -0800
commitf5209d7e018eee95e75ee03d519a8ba65987f264 (patch)
treed9052c1d477417768d44d6c395d6359cb5a76981 /vp9/encoder/vp9_encodeframe.c
parent1663eff7f8e8e820c6037157fcc9917d8ece9c28 (diff)
downloadlibvpx-f5209d7e018eee95e75ee03d519a8ba65987f264.tar
libvpx-f5209d7e018eee95e75ee03d519a8ba65987f264.tar.gz
libvpx-f5209d7e018eee95e75ee03d519a8ba65987f264.tar.bz2
libvpx-f5209d7e018eee95e75ee03d519a8ba65987f264.zip
Remove rate component adjustment for AQ1
In AQ1 a rate adjustment was applied for blocks coded with a deltaq. This tends to skew the partition selection and cause rate overshoot. For example, consider a 64x64 super block where some but not all sub blocks are in a low q segment and some are in a high q segment. The choice of Q when considering large partition and transform sizes is defined by the lowest sub block segment id (currently this implies the lowest Q). If some parts of the larger partition are very hard this will cause a high rate component. The correct behavior here is for the rd code to discard the large partition choice and break down to sub blocks where some have low and some have high Q. However the rate correction factor above mask the high cost of coding at a larger partition size. Change-Id: Ie077edd0b1b43c094898f481df772ea280b35960
Diffstat (limited to 'vp9/encoder/vp9_encodeframe.c')
-rw-r--r--vp9/encoder/vp9_encodeframe.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 7ab240b01..49272590d 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -807,10 +807,8 @@ static void rd_pick_sb_modes(VP9_COMP *cpi,
struct macroblockd_plane *const pd = xd->plane;
const AQ_MODE aq_mode = cpi->oxcf.aq_mode;
int i, orig_rdmult;
- double rdmult_ratio;
vp9_clear_system_state();
- rdmult_ratio = 1.0; // avoid uninitialized warnings
// Use the lower precision, but faster, 32x32 fdct for mode selection.
x->use_lp32x32fdct = 1;
@@ -866,8 +864,6 @@ static void rd_pick_sb_modes(VP9_COMP *cpi,
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];
@@ -901,12 +897,6 @@ static void rd_pick_sb_modes(VP9_COMP *cpi,
}
}
- if (aq_mode == VARIANCE_AQ && rd_cost->rate != INT_MAX) {
- vp9_clear_system_state();
- rd_cost->rate = (int)round(rd_cost->rate * rdmult_ratio);
- rd_cost->rdcost = RDCOST(x->rdmult, x->rddiv, rd_cost->rate, rd_cost->dist);
- }
-
x->rdmult = orig_rdmult;
// TODO(jingning) The rate-distortion optimization flow needs to be