fix the mix use of errorperbit and sadperbit
authorYaowu Xu <yaowu@google.com>
Wed, 25 May 2011 23:07:37 +0000 (16:07 -0700)
committerYaowu Xu <yaowu@google.com>
Wed, 25 May 2011 23:48:10 +0000 (16:48 -0700)
commitd8c525b8b1726dc1de18d7e729140592eb3d0b16
tree6e5f5078c4b12631f11c06f63c0218db744c25d9
parent13b56eeb7a6a61c599c397a3b8cd5b6f77c2f07b
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.c
vp8/encoder/mcomp.h