From eabb793f3b80d564a90e4fc58b6f6ac4fa2e91cb Mon Sep 17 00:00:00 2001 From: Johann Date: Tue, 3 Feb 2015 09:02:50 -0800 Subject: [PATCH] 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 --- vp8/common/arm/neon/vp8_subpixelvariance_neon.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); } - -- 2.40.0