summaryrefslogtreecommitdiff
path: root/vp8/encoder/pickinter.c
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2011-06-01 11:41:05 -0700
committerYaowu Xu <yaowu@google.com>2011-06-01 14:44:06 -0700
commit5b2fb3296167da69ab4ad6df2e24b0b87fa1e515 (patch)
treeeae38145c6c4ef46ada3cf6028722ac617ba69d9 /vp8/encoder/pickinter.c
parent50916c6a7da357eeee43c36b4d6ab6a723ddbe1e (diff)
downloadlibvpx-5b2fb3296167da69ab4ad6df2e24b0b87fa1e515.tar
libvpx-5b2fb3296167da69ab4ad6df2e24b0b87fa1e515.tar.gz
libvpx-5b2fb3296167da69ab4ad6df2e24b0b87fa1e515.tar.bz2
libvpx-5b2fb3296167da69ab4ad6df2e24b0b87fa1e515.zip
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
Diffstat (limited to 'vp8/encoder/pickinter.c')
-rw-r--r--vp8/encoder/pickinter.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/vp8/encoder/pickinter.c b/vp8/encoder/pickinter.c
index 24bd245f0..77e188e30 100644
--- a/vp8/encoder/pickinter.c
+++ b/vp8/encoder/pickinter.c
@@ -713,7 +713,7 @@ void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset,
int step_param;
int further_steps;
int n = 0;
- int sadpb = x->sadperbit16/2;
+ int sadpb = x->sadperbit16;
int col_min;
int col_max;
@@ -817,7 +817,11 @@ void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset,
}
if (bestsme < INT_MAX)
- cpi->find_fractional_mv_step(x, b, d, &d->bmi.mv, &best_ref_mv, x->errorperbit, &cpi->fn_ptr[BLOCK_16X16], cpi->mb.mvcost, &distortion2, &sse);
+ cpi->find_fractional_mv_step(x, b, d, &d->bmi.mv, &best_ref_mv,
+ x->errorperbit,
+ &cpi->fn_ptr[BLOCK_16X16],
+ cpi->mb.mvcost,
+ &distortion2,&sse);
mode_mv[NEWMV].as_int = d->bmi.mv.as_int;