]> granicus.if.org Git - libvpx/commitdiff
Use correct buffer size in vp8 subpixel variance
authorJohann <johannkoenig@google.com>
Tue, 3 Feb 2015 17:02:50 +0000 (09:02 -0800)
committerJohann <johannkoenig@google.com>
Tue, 3 Feb 2015 17:11:05 +0000 (09:11 -0800)
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

index 8308d555b3727f69eaefe5df85edda4eb5cf9238..f2bb162068ff3c69e2049ffe19cdc8ada61f0d06 100644 (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);
 }
-