summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2013-05-07 11:22:07 -0700
committerJingning Han <jingning@google.com>2013-05-07 12:06:16 -0700
commitcfea74bcf4df637755b7dc28bcc02a319ed260cb (patch)
tree551010b4a7c90f6f7d50b11e6df3c423968adc54
parent776c1482a302f5ea42dfe4517f51c0f1e48f2670 (diff)
downloadlibvpx-cfea74bcf4df637755b7dc28bcc02a319ed260cb.tar
libvpx-cfea74bcf4df637755b7dc28bcc02a319ed260cb.tar.gz
libvpx-cfea74bcf4df637755b7dc28bcc02a319ed260cb.tar.bz2
libvpx-cfea74bcf4df637755b7dc28bcc02a319ed260cb.zip
Cosmetic changes in handle_inter_mode_
Use unified function pointers to variance_. Change-Id: I78891bede56e73306851808d96f09dc0d3d8074e
-rw-r--r--vp9/encoder/vp9_rdopt.c50
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;