diff options
author | Christophe Gisquet <christophe.gisquet@gmail.com> | 2015-03-14 14:26:16 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-14 20:36:43 +0100 |
commit | 3814f92fd77f8f09fa6f88333b8d06512b6ced82 (patch) | |
tree | 5b4b5dd038827408aa0bfeaabd3ae5af98795343 | |
parent | 238db7cc56be4c4e71ff98758b7b8ef077ebd4ca (diff) | |
download | ffmpeg-3814f92fd77f8f09fa6f88333b8d06512b6ced82.tar.gz |
lavc: use LOCAL_ALIGNED instead of DECLARE_ALIGNED
The later may yield incorrect code for on-stack variables.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/dct-test.c | 2 | ||||
-rw-r--r-- | libavcodec/h264_loopfilter.c | 10 | ||||
-rw-r--r-- | libavcodec/proresenc_anatoliy.c | 3 | ||||
-rw-r--r-- | libavcodec/vp8.c | 2 |
4 files changed, 9 insertions, 8 deletions
diff --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c index 30eca3e818..56e1a629a7 100644 --- a/libavcodec/dct-test.c +++ b/libavcodec/dct-test.c @@ -66,7 +66,7 @@ static const struct algo fdct_tab[] = { }; static void ff_prores_idct_wrap(int16_t *dst){ - DECLARE_ALIGNED(16, static int16_t, qmat)[64]; + LOCAL_ALIGNED(16, int16_t, qmat, [64]); int i; for(i=0; i<64; i++){ diff --git a/libavcodec/h264_loopfilter.c b/libavcodec/h264_loopfilter.c index a7b6878394..c221f98125 100644 --- a/libavcodec/h264_loopfilter.c +++ b/libavcodec/h264_loopfilter.c @@ -355,7 +355,7 @@ static av_always_inline void h264_filter_mb_fast_internal(H264Context *h, } return; } else { - LOCAL_ALIGNED_8(int16_t, bS, [2], [4][4]); + LOCAL_ALIGNED(8, int16_t, bS, [2], [4][4]); int edges; if( IS_8x8DCT(mb_type) && (h->cbp&7) == 7 && !chroma444 ) { edges = 4; @@ -492,7 +492,7 @@ static av_always_inline void filter_mb_dir(H264Context *h, int mb_x, int mb_y, u int j; for(j=0; j<2; j++, mbn_xy += h->mb_stride){ - DECLARE_ALIGNED(8, int16_t, bS)[4]; + LOCAL_ALIGNED(8, int16_t, bS, [4]); int qp; if (IS_INTRA(mb_type | h->cur_pic.mb_type[mbn_xy])) { AV_WN64A(bS, 0x0003000300030003ULL); @@ -529,7 +529,7 @@ static av_always_inline void filter_mb_dir(H264Context *h, int mb_x, int mb_y, u } } }else{ - DECLARE_ALIGNED(8, int16_t, bS)[4]; + LOCAL_ALIGNED(8, int16_t, bS, [4]); int qp; if( IS_INTRA(mb_type|mbm_type)) { @@ -612,7 +612,7 @@ static av_always_inline void filter_mb_dir(H264Context *h, int mb_x, int mb_y, u /* Calculate bS */ for( edge = 1; edge < edges; edge++ ) { - DECLARE_ALIGNED(8, int16_t, bS)[4]; + LOCAL_ALIGNED(8, int16_t, bS, [4]); int qp; const int deblock_edge = !IS_8x8DCT(mb_type & (edge<<24)); // (edge&1) && IS_8x8DCT(mb_type) @@ -719,7 +719,7 @@ void ff_h264_filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint /* First vertical edge is different in MBAFF frames * There are 8 different bS to compute and 2 different Qp */ - DECLARE_ALIGNED(8, int16_t, bS)[8]; + LOCAL_ALIGNED(8, int16_t, bS, [8]); int qp[2]; int bqp[2]; int rqp[2]; diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c index 634ff08732..bf6e671570 100644 --- a/libavcodec/proresenc_anatoliy.c +++ b/libavcodec/proresenc_anatoliy.c @@ -286,7 +286,8 @@ static int encode_slice_plane(AVCodecContext *avctx, int mb_count, { ProresContext* ctx = avctx->priv_data; FDCTDSPContext *fdsp = &ctx->fdsp; - DECLARE_ALIGNED(16, int16_t, blocks)[DEFAULT_SLICE_MB_WIDTH << 8], *block; + LOCAL_ALIGNED(16, int16_t, blocks, [DEFAULT_SLICE_MB_WIDTH << 8]); + int16_t *block; int i, blocks_per_slice; PutBitContext pb; diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 4b3234714b..8d6cbe1ef9 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -1615,7 +1615,7 @@ void intra_predict(VP8Context *s, VP8ThreadData *td, uint8_t *dst[3], for (x = 0; x < 4; x++) { int copy = 0, linesize = s->linesize; uint8_t *dst = ptr + 4 * x; - DECLARE_ALIGNED(4, uint8_t, copy_dst)[5 * 8]; + LOCAL_ALIGNED(4, uint8_t, copy_dst, [5 * 8]); if ((y == 0 || x == 3) && mb_y == 0) { topright = tr_top; |