Cosmetic changes in handle_inter_mode_

Use unified function pointers to variance_.

Change-Id: I78891bede56e73306851808d96f09dc0d3d8074e
This commit is contained in:
Jingning Han
2013-05-07 11:22:07 -07:00
parent 776c1482a3
commit cfea74bcf4

View File

@@ -2229,7 +2229,6 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
if (pred_exists) { if (pred_exists) {
// FIXME(rbultje): mb code still predicts into xd->predictor
for (i = 0; i < bh * MI_SIZE; ++i) for (i = 0; i < bh * MI_SIZE; ++i)
vpx_memcpy(xd->plane[0].dst.buf + i * xd->plane[0].dst.stride, vpx_memcpy(xd->plane[0].dst.buf + i * xd->plane[0].dst.stride,
tmp_ybuf + i * bw * MI_SIZE, 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) if (threshold < x->encode_breakout)
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, var = cpi->fn_ptr[block_size].vf(x->plane[0].src.buf,
x->plane[0].src.stride, x->plane[0].src.stride,
xd->plane[0].dst.buf, xd->plane[0].dst.buf,
xd->plane[0].dst.stride, xd->plane[0].dst.stride,
&sse); &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);
}
if ((int)sse < threshold) { if ((int)sse < threshold) {
unsigned int q2dc = xd->plane[0].dequant[0]; unsigned int q2dc = xd->plane[0].dequant[0];
@@ -2284,10 +2277,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
(sse / 2 > var && sse - var < 64)) { (sse / 2 > var && sse - var < 64)) {
// Check u and v to make sure skip is ok // Check u and v to make sure skip is ok
int sse2; int sse2;
if (bsize != BLOCK_SIZE_MB16X16) {
unsigned int sse2u, sse2v; 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, var = cpi->fn_ptr[uv_block_size].vf(x->plane[1].src.buf,
x->plane[1].src.stride, x->plane[1].src.stride,
xd->plane[1].dst.buf, xd->plane[1].dst.buf,
@@ -2297,16 +2287,6 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
xd->plane[2].dst.buf, xd->plane[2].dst.buf,
xd->plane[1].dst.stride, &sse2v); xd->plane[1].dst.stride, &sse2v);
sse2 = sse2u + 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;
}
if (sse2 * 2 < threshold) { if (sse2 * 2 < threshold) {
x->skip = 1; x->skip = 1;