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
This commit is contained in:
Yunqing Wang 2011-06-02 14:47:06 -04:00
parent 04edde2b11
commit 03973017a7
4 changed files with 3 additions and 10 deletions

View File

@ -842,7 +842,6 @@ int vp8_hex_search
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 @@ cal_neighbors:
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

View File

@ -40,7 +40,6 @@ extern int vp8_hex_search
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],

View File

@ -762,7 +762,7 @@ void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset,
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;
}

View File

@ -153,7 +153,6 @@ static int vp8_temporal_filter_find_matching_mb_c
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 @@ static int vp8_temporal_filter_find_matching_mb_c
&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