diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2014-09-17 00:45:33 +0400 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2017-08-04 20:16:46 +0300 |
commit | c0a1ff8a3df8f6a7b478a190c6e4cbaf0a051940 (patch) | |
tree | dbde20576e5d9acbda0f1964d0ef818f6bacc6f6 /libavcodec | |
parent | de198fc00353e4dd389a920763e10581c2d4fb2b (diff) |
x86/hevc: use DECLARE_ALIGNED for on-stack tmp arrays to avoid crashes
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/x86/hevc_idct_intrinsic.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/x86/hevc_idct_intrinsic.c b/libavcodec/x86/hevc_idct_intrinsic.c index 672e00f61c..9011e58523 100644 --- a/libavcodec/x86/hevc_idct_intrinsic.c +++ b/libavcodec/x86/hevc_idct_intrinsic.c @@ -577,7 +577,7 @@ void ff_hevc_transform_4x4_ ## D ## _sse2 (int16_t *_coeffs, int col_limit) { \ } #define TRANSFORM_8x8(D) \ void ff_hevc_transform_8x8_ ## D ## _sse2 (int16_t *coeffs, int col_limit) { \ - int16_t tmp[8*8]; \ + DECLARE_ALIGNED(16, int16_t, tmp[8*8]); \ int16_t *src = coeffs; \ int16_t *p_dst1 = tmp; \ int16_t *p_dst; \ @@ -640,8 +640,8 @@ TRANSFORM_8x8(12) #define TR_32(dst, dst_stride, in, sstep) \ { \ int i; \ - int e32[16*16]; \ - int o32[16*16]; \ + DECLARE_ALIGNED(16, int, e32[16*16]); \ + DECLARE_ALIGNED(16, int, o32[16*16]); \ LOAD16x16_O(e, in, sstep); \ for (i = 0; i < 16; i++) { \ src0 = _mm_setzero_si128(); \ @@ -674,8 +674,8 @@ void ff_hevc_transform_ ## H ## x ## H ## _ ## D ## _sse2 ( \ int i, j, k, add; \ int shift = 7; \ int16_t *src = coeffs; \ - int16_t tmp[H*H]; \ - int16_t tmp_2[H*H]; \ + DECLARE_ALIGNED(16, int16_t, tmp[H*H]); \ + DECLARE_ALIGNED(16, int16_t, tmp_2[H*H]); \ int16_t *p_dst, *p_tra = tmp_2; \ __m128i src0, src1, src2, src3; \ __m128i tmp0, tmp1, tmp2, tmp3, tmp4; \ |