From d8c525b8b1726dc1de18d7e729140592eb3d0b16 Mon Sep 17 00:00:00 2001 From: Yaowu Xu Date: Wed, 25 May 2011 16:07:37 -0700 Subject: fix the mix use of errorperbit and sadperbit error_per_bit and sad_per_bit were designed as estimates of a bit worth of sum squared error and sum absolute difference respectively. Under this assumption, error_per_bit should be used in combination with 2nd order errors (variance or sum squared error) while sad_per_bit should be used in combination with 1st order SADs in motion estimation. There were a few places where sad_per_bit has been misused with variances, this commit changes to use error_per_bit for those places, also changes parameter names to properly indicate which constant is being used. On cif set, the change has a universal gain by all metrics: 0.13% by average/overall psnr and 0.1% by ssim. Change-Id: I4850fdcc3fd6886b30f784bd843f13dd401215fb --- vp8/encoder/mcomp.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'vp8/encoder/mcomp.h') diff --git a/vp8/encoder/mcomp.h b/vp8/encoder/mcomp.h index 85c7513ec..bf9fa6f76 100644 --- a/vp8/encoder/mcomp.h +++ b/vp8/encoder/mcomp.h @@ -63,7 +63,7 @@ extern fractional_mv_step_fp vp8_skip_fractional_mv_step; BLOCK *b, \ BLOCKD *d, \ int_mv *ref_mv, \ - int error_per_bit, \ + int sad_per_bit, \ int distance, \ vp8_variance_fn_ptr_t *fn_ptr, \ int *mvcost[2], \ @@ -77,7 +77,7 @@ extern fractional_mv_step_fp vp8_skip_fractional_mv_step; BLOCK *b, \ BLOCKD *d, \ int_mv *ref_mv, \ - int error_per_bit, \ + int sad_per_bit, \ int distance, \ vp8_variance_fn_ptr_t *fn_ptr, \ int *mvcost[2], \ @@ -93,7 +93,7 @@ extern fractional_mv_step_fp vp8_skip_fractional_mv_step; int_mv *ref_mv, \ int_mv *best_mv, \ int search_param, \ - int error_per_bit, \ + int sad_per_bit, \ int *num00, \ vp8_variance_fn_ptr_t *fn_ptr, \ int *mvcost[2], \ -- cgit v1.2.3