diff options
author | Jingning Han <jingning@google.com> | 2013-05-07 15:33:12 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2013-05-07 15:33:12 -0700 |
commit | c0102fd88bb1e36fcf5607612720113e633f08f8 (patch) | |
tree | 5220ba381e11078e080500e6e89cfc0ba3f4158e | |
parent | 74096cbae868d7a0bb52ac4e562c3614df392117 (diff) | |
parent | cfea74bcf4df637755b7dc28bcc02a319ed260cb (diff) | |
download | libvpx-c0102fd88bb1e36fcf5607612720113e633f08f8.tar libvpx-c0102fd88bb1e36fcf5607612720113e633f08f8.tar.gz libvpx-c0102fd88bb1e36fcf5607612720113e633f08f8.tar.bz2 libvpx-c0102fd88bb1e36fcf5607612720113e633f08f8.zip |
Merge "Cosmetic changes in handle_inter_mode_" into experimental
-rw-r--r-- | vp9/encoder/vp9_rdopt.c | 50 |
1 files changed, 15 insertions, 35 deletions
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index 90d56b2d2..28df6f802 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -2229,7 +2229,6 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, if (pred_exists) { - // FIXME(rbultje): mb code still predicts into xd->predictor for (i = 0; i < bh * MI_SIZE; ++i) vpx_memcpy(xd->plane[0].dst.buf + i * xd->plane[0].dst.stride, tmp_ybuf + i * bw * MI_SIZE, @@ -2264,17 +2263,11 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, if (threshold < x->encode_breakout) threshold = x->encode_breakout; - if (bsize != BLOCK_SIZE_MB16X16) { - var = cpi->fn_ptr[block_size].vf(x->plane[0].src.buf, - x->plane[0].src.stride, - xd->plane[0].dst.buf, - xd->plane[0].dst.stride, - &sse); - } else { - var = vp9_variance16x16(x->plane[0].src.buf, x->plane[0].src.stride, - xd->plane[0].dst.buf, xd->plane[0].dst.stride, - &sse); - } + var = cpi->fn_ptr[block_size].vf(x->plane[0].src.buf, + x->plane[0].src.stride, + xd->plane[0].dst.buf, + xd->plane[0].dst.stride, + &sse); if ((int)sse < threshold) { unsigned int q2dc = xd->plane[0].dequant[0]; @@ -2284,29 +2277,16 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, (sse / 2 > var && sse - var < 64)) { // Check u and v to make sure skip is ok int sse2; - - if (bsize != BLOCK_SIZE_MB16X16) { - unsigned int sse2u, sse2v; - // FIXME(rbultje): mb predictors predict into xd->predictor - var = cpi->fn_ptr[uv_block_size].vf(x->plane[1].src.buf, - x->plane[1].src.stride, - xd->plane[1].dst.buf, - xd->plane[1].dst.stride, &sse2u); - var = cpi->fn_ptr[uv_block_size].vf(x->plane[2].src.buf, - x->plane[1].src.stride, - xd->plane[2].dst.buf, - xd->plane[1].dst.stride, &sse2v); - sse2 = sse2u + sse2v; - } else { - unsigned int sse2u, sse2v; - var = vp9_variance8x8(x->plane[1].src.buf, x->plane[1].src.stride, - xd->plane[1].dst.buf, xd->plane[1].dst.stride, - &sse2u); - var = vp9_variance8x8(x->plane[2].src.buf, x->plane[1].src.stride, - xd->plane[2].dst.buf, xd->plane[1].dst.stride, - &sse2v); - sse2 = sse2u + sse2v; - } + unsigned int sse2u, sse2v; + var = cpi->fn_ptr[uv_block_size].vf(x->plane[1].src.buf, + x->plane[1].src.stride, + xd->plane[1].dst.buf, + xd->plane[1].dst.stride, &sse2u); + var = cpi->fn_ptr[uv_block_size].vf(x->plane[2].src.buf, + x->plane[1].src.stride, + xd->plane[2].dst.buf, + xd->plane[1].dst.stride, &sse2v); + sse2 = sse2u + sse2v; if (sse2 * 2 < threshold) { x->skip = 1; |