From 5b2fb3296167da69ab4ad6df2e24b0b87fa1e515 Mon Sep 17 00:00:00 2001 From: Yaowu Xu Date: Wed, 1 Jun 2011 11:41:05 -0700 Subject: further clean up of errorperbit and sadperbit this commit makes the usage errorperbit and sadperbit consistent for encoding modes and passes. Removed all different magic weight factors associated with errorperbit. Now 1/2 is used for both sadperbit16 and sadperbit4, the /2 operation is merged into initializations of the 2 variables. Tests on cif set show .23%, 0.18% and 0.19% gain by avg psnr, overall psnr and ssim respectively. Change-Id: Ifa285c3e065ce0a5a77addfc9f95aabf54ee270d --- vp8/encoder/mcomp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'vp8/encoder/mcomp.c') diff --git a/vp8/encoder/mcomp.c b/vp8/encoder/mcomp.c index aac39d582..50c4745b1 100644 --- a/vp8/encoder/mcomp.c +++ b/vp8/encoder/mcomp.c @@ -1000,7 +1000,8 @@ cal_neighbors: 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 vfp->vf(what, what_stride, this_offset, in_what_stride, &bestsad) + + mv_err_cost(&this_mv, center_mv, mvcost, x->errorperbit) ; } #undef CHECK_BOUNDS #undef CHECK_POINT -- cgit v1.2.3