]> granicus.if.org Git - libvpx/commitdiff
segfault: fix missing alignment declaration
authorMatthias Räncker <theonetruecamper@gmx.de>
Sun, 23 Sep 2018 08:34:44 +0000 (10:34 +0200)
committerMatthias Räncker <theonetruecamper@gmx.de>
Sun, 23 Sep 2018 15:04:14 +0000 (17:04 +0200)
These variables are being fed to sse2 functions, that use aligned
loads.

Signed-off-by: Matthias Räncker <theonetruecamper@gmx.de>
Change-Id: I796c3483c6f3425d63d9262b02b19da59d536600

vpx_dsp/psnrhvs.c

index b3910152c472e5264c711c51e981384f2fef94f6..3b533decd62b0fa14c531757495c865958caed23 100644 (file)
@@ -126,8 +126,10 @@ static double calc_psnrhvs(const unsigned char *src, int _systride,
   const uint8_t *_dst8 = dst;
   const uint16_t *_src16 = CONVERT_TO_SHORTPTR(src);
   const uint16_t *_dst16 = CONVERT_TO_SHORTPTR(dst);
-  int16_t dct_s[8 * 8], dct_d[8 * 8];
-  tran_low_t dct_s_coef[8 * 8], dct_d_coef[8 * 8];
+  DECLARE_ALIGNED(16, int16_t, dct_s[8 * 8]);
+  DECLARE_ALIGNED(16, int16_t, dct_d[8 * 8]);
+  DECLARE_ALIGNED(16, tran_low_t, dct_s_coef[8 * 8]);
+  DECLARE_ALIGNED(16, tran_low_t, dct_d_coef[8 * 8]);
   double mask[8][8];
   int pixels;
   int x;