From: Matthias Räncker Date: Sun, 23 Sep 2018 08:34:44 +0000 (+0200) Subject: segfault: fix missing alignment declaration X-Git-Tag: v1.8.0~293^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a1d8aec6b4463994bffc040395fddb0812ec483e;p=libvpx segfault: fix missing alignment declaration These variables are being fed to sse2 functions, that use aligned loads. Signed-off-by: Matthias Räncker Change-Id: I796c3483c6f3425d63d9262b02b19da59d536600 --- diff --git a/vpx_dsp/psnrhvs.c b/vpx_dsp/psnrhvs.c index b3910152c..3b533decd 100644 --- a/vpx_dsp/psnrhvs.c +++ b/vpx_dsp/psnrhvs.c @@ -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;