Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2014-09-17 00:45:33 +0400
committerHendrik Leppkes <h.leppkes@gmail.com>2014-09-17 00:46:26 +0400
commitabb1112ada2586dfc83a9b17610a79f4d23f60ba (patch)
treee9010d2d51d6c8c288860524cafb30e7bcb14cd1
parent09592d07d6c2df2cd7f58982b9c7e2df5d034cbe (diff)
x86/hevc: use DECLARE_ALIGNED for on-stack tmp arrays to avoid crashesmpc-hc-1.7.6-5
-rw-r--r--libavcodec/x86/hevc_idct_intrinsic.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/x86/hevc_idct_intrinsic.c b/libavcodec/x86/hevc_idct_intrinsic.c
index 7f732d2a49..ef970d7141 100644
--- a/libavcodec/x86/hevc_idct_intrinsic.c
+++ b/libavcodec/x86/hevc_idct_intrinsic.c
@@ -625,7 +625,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; \
@@ -692,8 +692,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(); \
@@ -726,8 +726,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; \