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>
pull/125/head
Christophe Gisquet 10 years ago committed by Michael Niedermayer
parent 238db7cc56
commit 3814f92fd7
  1. 2
      libavcodec/dct-test.c
  2. 10
      libavcodec/h264_loopfilter.c
  3. 3
      libavcodec/proresenc_anatoliy.c
  4. 2
      libavcodec/vp8.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++){

@ -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];

@ -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;

@ -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;

Loading…
Cancel
Save