vpx/vp8
Johann fea3556e20 Fix variance overflow
In the variance calculations the difference is summed and later squared.
When the sum exceeds sqrt(2^31) the value is treated as a negative when
it is shifted which gives incorrect results.

To fix this we cast the result of the multiplication as unsigned.

The alternative fix is to shift sum down by 4 before multiplying.
However that will reduce precision.

For 16x16 blocks the maximum sum is 65280 and sqrt(2^31) is 46340 (and
change).

PPC change is untested.

Change-Id: I1bad27ea0720067def6d71a6da5f789508cec265
2012-02-09 12:38:31 -08:00
..
common Merge "Add OS/2 supports" 2012-02-08 11:00:55 -08:00
decoder Removed frames_till_alt_ref_frame from MACROBLOCKD 2012-02-02 13:34:13 -05:00
encoder Fix variance overflow 2012-02-09 12:38:31 -08:00
exports_dec Add getter functions for the interface data symbols 2010-09-23 14:58:43 -04:00
exports_enc Add getter functions for the interface data symbols 2010-09-23 14:58:43 -04:00
vp8_common.mk RTCD: add subpixel functions 2012-01-30 12:08:29 -08:00
vp8_cx_iface.c Fixed bugs in multi-layer code related to changing params 2012-01-13 16:52:25 -08:00
vp8_dx_iface.c Hook up VP8D_GET_LAST_REF_USED 2012-01-27 10:13:20 -08:00
vp8cx_arm.mk RTCD: finalize removal of old RTCD system 2012-01-30 12:10:48 -08:00
vp8cx.mk RTCD: finalize removal of old RTCD system 2012-01-30 12:10:48 -08:00
vp8dx.mk New RTCD implementation 2012-01-30 12:06:27 -08:00