From: Johann Date: Tue, 3 Feb 2015 17:02:50 +0000 (-0800) Subject: Use correct buffer size in vp8 subpixel variance X-Git-Tag: v1.4.0~189^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eabb793f3b80d564a90e4fc58b6f6ac4fa2e91cb;p=libvpx 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 --- diff --git a/vp8/common/arm/neon/vp8_subpixelvariance_neon.c b/vp8/common/arm/neon/vp8_subpixelvariance_neon.c index 8308d555b..f2bb16206 100644 --- a/vp8/common/arm/neon/vp8_subpixelvariance_neon.c +++ b/vp8/common/arm/neon/vp8_subpixelvariance_neon.c @@ -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); } -