ref: 03973017a7138e196a3e2a8aecf4877780de7fd8
parent: 04edde2b114da4ac94cea13bbe9a6fe0ed474576
author: Yunqing Wang <yunqingwang@google.com>
date: Thu Jun 2 10:47:06 EDT 2011
Remove hex search's variance calculation while in real-time mode In real-time mode motion search, there is no need to calculate variance. This change improved encoding speed by 1% ~ 2%(speed=-5). Change-Id: I65b874901eb599ac38fe8cf9cad898c14138d431
--- a/vp8/encoder/mcomp.c
+++ b/vp8/encoder/mcomp.c
@@ -842,7 +842,6 @@
int_mv *best_mv,
int search_param,
int sad_per_bit,
- int *num00,
const vp8_variance_fn_ptr_t *vfp,
int *mvsadcost[2],
int *mvcost[2],
@@ -996,12 +995,8 @@
best_mv->as_mv.row = br;
best_mv->as_mv.col = bc;
- this_mv.as_mv.row = br<<3;
- this_mv.as_mv.col = bc<<3;
- this_offset = (unsigned char *)(*(d->base_pre) + d->pre + (br * (in_what_stride)) + bc);
- return vfp->vf(what, what_stride, this_offset, in_what_stride, &bestsad)
- + mv_err_cost(&this_mv, center_mv, mvcost, x->errorperbit) ;
+ return bestsad;
}
#undef CHECK_BOUNDS
#undef CHECK_POINT
--- a/vp8/encoder/mcomp.h
+++ b/vp8/encoder/mcomp.h
@@ -40,7 +40,6 @@
int_mv *best_mv,
int search_param,
int error_per_bit,
- int *num00,
const vp8_variance_fn_ptr_t *vf,
int *mvsadcost[2],
int *mvcost[2],
--- a/vp8/encoder/pickinter.c
+++ b/vp8/encoder/pickinter.c
@@ -762,7 +762,7 @@
if (cpi->sf.search_method == HEX)
{
bestsme = vp8_hex_search(x, b, d, &mvp, &d->bmi.mv, step_param,
- sadpb, &num00, &cpi->fn_ptr[BLOCK_16X16],
+ sadpb, &cpi->fn_ptr[BLOCK_16X16],
x->mvsadcost, x->mvcost, &best_ref_mv);
mode_mv[NEWMV].as_int = d->bmi.mv.as_int;
}
--- a/vp8/encoder/temporal_filter.c
+++ b/vp8/encoder/temporal_filter.c
@@ -153,7 +153,6 @@
int further_steps;
int sadpb = x->sadperbit16;
int bestsme = INT_MAX;
- int num00 = 0;
BLOCK *b = &x->block[0];
BLOCKD *d = &x->e_mbd.block[0];
@@ -201,7 +200,7 @@
&best_ref_mv1, &d->bmi.mv,
step_param,
sadpb,
- &num00, &cpi->fn_ptr[BLOCK_16X16],
+ &cpi->fn_ptr[BLOCK_16X16],
mvsadcost, mvcost, &best_ref_mv1);
#if ALT_REF_SUBPEL_ENABLED
--
⑨