From 15255eef8251eb645b9b89f6e211663e6f22563d Mon Sep 17 00:00:00 2001 From: John Koleszar Date: Wed, 24 Apr 2013 14:48:17 -0700 Subject: Move dequant from BLOCKD to per-plane MACROBLOCKD This data can vary per-plane, but not per-block. Change-Id: I1971b0b2c2e697d2118e38b54ef446e52f63c65a --- vp9/encoder/vp9_rdopt.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'vp9/encoder/vp9_rdopt.c') diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index a33abb8ea..de08e83cb 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -3050,7 +3050,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, // Hence quantizer step is also 8 times. To get effective quantizer // we need to divide by 8 before sending to modeling function. model_rd_from_var_lapndz(var, 16 * bw * 16 * bh, - xd->block[0].dequant[1] >> 3, + xd->plane[0].dequant[1] >> 3, &tmp_rate_y, &tmp_dist_y); var = cpi->fn_ptr[uv_block_size].vf(x->plane[1].src.buf, x->plane[1].src.stride, @@ -3058,7 +3058,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, xd->plane[1].dst.stride, &sse); model_rd_from_var_lapndz(var, 8 * bw * 8 * bh, - xd->block[16].dequant[1] >> 3, + xd->plane[1].dequant[1] >> 3, &tmp_rate_u, &tmp_dist_u); var = cpi->fn_ptr[uv_block_size].vf(x->plane[2].src.buf, x->plane[1].src.stride, @@ -3066,7 +3066,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, xd->plane[1].dst.stride, &sse); model_rd_from_var_lapndz(var, 8 * bw * 8 * bh, - xd->block[20].dequant[1] >> 3, + xd->plane[2].dequant[1] >> 3, &tmp_rate_v, &tmp_dist_v); rd = RDCOST(x->rdmult, x->rddiv, rs + tmp_rate_y + tmp_rate_u + tmp_rate_v, @@ -3138,17 +3138,17 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, // Note our transform coeffs are 8 times an orthogonal transform. // Hence quantizer step is also 8 times. To get effective quantizer // we need to divide by 8 before sending to modeling function. - model_rd_from_var_lapndz(var, 16 * 16, xd->block[0].dequant[1] >> 3, + model_rd_from_var_lapndz(var, 16 * 16, xd->plane[0].dequant[1] >> 3, &tmp_rate_y, &tmp_dist_y); var = vp9_variance8x8(x->plane[1].src.buf, x->plane[1].src.stride, xd->plane[1].dst.buf, xd->plane[1].dst.stride, &sse); - model_rd_from_var_lapndz(var, 8 * 8, xd->block[16].dequant[1] >> 3, + model_rd_from_var_lapndz(var, 8 * 8, xd->plane[1].dequant[1] >> 3, &tmp_rate_u, &tmp_dist_u); var = vp9_variance8x8(x->plane[2].src.buf, x->plane[1].src.stride, xd->plane[2].dst.buf, xd->plane[1].dst.stride, &sse); - model_rd_from_var_lapndz(var, 8 * 8, xd->block[20].dequant[1] >> 3, + model_rd_from_var_lapndz(var, 8 * 8, xd->plane[2].dequant[1] >> 3, &tmp_rate_v, &tmp_dist_v); rd = RDCOST(x->rdmult, x->rddiv, rs + tmp_rate_y + tmp_rate_u + tmp_rate_v, @@ -3225,8 +3225,8 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, x->skip = 1; else if (x->encode_breakout) { unsigned int var, sse; - int threshold = (xd->block[0].dequant[1] - * xd->block[0].dequant[1] >> 4); + int threshold = (xd->plane[0].dequant[1] + * xd->plane[0].dequant[1] >> 4); if (threshold < x->encode_breakout) threshold = x->encode_breakout; @@ -3244,7 +3244,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, } if ((int)sse < threshold) { - unsigned int q2dc = xd->block[0].dequant[0]; + unsigned int q2dc = xd->plane[0].dequant[0]; /* If there is no codeable 2nd order dc or a very small uniform pixel change change */ if ((sse - var < q2dc * q2dc >> 4) || -- cgit v1.2.3