Use correct buffer size in vp8 subpixel variance

In vp8_sub_pixel_variance8x8_neon the temp2 buffer is only initialized
to kHeight8 * kWidth8. However, in the case that xoffset != 0 and
yoffset == 0, var_filter_block2d_bil_w8 is called with output_width
kHeight8PlusOne.

Thanks to cmugurel for diagnosing and yulius for the patch.

Change-Id: Ib71ffd96ffad963c92b8b7ca23f303942785b8e0
https://code.google.com/p/webrtc/issues/detail?id=4190
This commit is contained in:
Johann 2015-02-03 09:02:50 -08:00
parent 4ed539f22e
commit eabb793f3b

View File

@ -1003,7 +1003,7 @@ unsigned int vp8_sub_pixel_variance8x8_neon(
const unsigned char *dst,
int dst_stride,
unsigned int *sse) {
DECLARE_ALIGNED_ARRAY(kAlign16, uint8_t, temp2, kHeight8 * kWidth8);
DECLARE_ALIGNED_ARRAY(kAlign16, uint8_t, temp2, kHeight8PlusOne * kWidth8);
DECLARE_ALIGNED_ARRAY(kAlign16, uint8_t, fdata3, kHeight8PlusOne * kWidth8);
if (xoffset == 0) {
var_filter_block2d_bil_w8(src, temp2, src_stride, kWidth8, kHeight8,
@ -1021,4 +1021,3 @@ unsigned int vp8_sub_pixel_variance8x8_neon(
}
return variance8x8_neon(temp2, kWidth8, dst, dst_stride, sse);
}