]> granicus.if.org Git - libvpx/commitdiff
vp8 bilinear: ensure non-16x16 arrays are aligned
authorJohann Koenig <johannkoenig@google.com>
Mon, 29 Oct 2018 18:59:56 +0000 (18:59 +0000)
committerJohann Koenig <johannkoenig@google.com>
Mon, 29 Oct 2018 19:01:50 +0000 (19:01 +0000)
The 16x16 array was changed to aligned. The 8xN and 4x4 functions
use aligned loads/stores on their internal arrays as well.

BUG=webm:1570

Change-Id: I9cfe53d7c8ed76e8854c2688eb9a509b876471d8

vp8/common/x86/bilinear_filter_sse2.c

index 017d43df7160c90d5e42d2ce64a0504faaab7cba..9bf65d8045e89d7514ab389673d8eab7455d86f3 100644 (file)
@@ -222,7 +222,7 @@ static INLINE void vertical_8xN(uint16_t *src, uint8_t *dst, const int stride,
 void vp8_bilinear_predict8x8_sse2(uint8_t *src_ptr, int src_pixels_per_line,
                                   int xoffset, int yoffset, uint8_t *dst_ptr,
                                   int dst_pitch) {
-  uint16_t FData[8 * 9];
+  DECLARE_ALIGNED(16, uint16_t, FData[8 * 9]);
 
   assert((xoffset | yoffset) != 0);
 
@@ -234,7 +234,7 @@ void vp8_bilinear_predict8x8_sse2(uint8_t *src_ptr, int src_pixels_per_line,
 void vp8_bilinear_predict8x4_sse2(uint8_t *src_ptr, int src_pixels_per_line,
                                   int xoffset, int yoffset, uint8_t *dst_ptr,
                                   int dst_pitch) {
-  uint16_t FData[8 * 5];
+  DECLARE_ALIGNED(16, uint16_t, FData[8 * 5]);
 
   assert((xoffset | yoffset) != 0);
 
@@ -326,7 +326,7 @@ static INLINE void vertical_4x4(uint16_t *src, uint8_t *dst, const int stride,
 void vp8_bilinear_predict4x4_sse2(uint8_t *src_ptr, int src_pixels_per_line,
                                   int xoffset, int yoffset, uint8_t *dst_ptr,
                                   int dst_pitch) {
-  uint16_t FData[4 * 5];
+  DECLARE_ALIGNED(16, uint16_t, FData[4 * 5]);
 
   assert((xoffset | yoffset) != 0);