Revision 68b51e58

View differences:

libavcodec/4xm.c
121 121
    int mv[256];
122 122
    VLC pre_vlc;
123 123
    int last_dc;
124
    DCTELEM __align8 block[6][64];
124
    DECLARE_ALIGNED_8(DCTELEM, block[6][64]);
125 125
    uint8_t *bitstream_buffer;
126 126
    unsigned int bitstream_buffer_size;
127 127
    CFrameBuffer cfrm[CFRAME_BUFFER_COUNT];
libavcodec/asv1.c
44 44
    int mb_height;
45 45
    int mb_width2;
46 46
    int mb_height2;
47
    DCTELEM __align8 block[6][64];
48
    uint16_t __align8 intra_matrix[64];
49
    int __align8 q_intra_matrix[64];
47
    DECLARE_ALIGNED_8(DCTELEM, block[6][64]);
48
    DECLARE_ALIGNED_8(uint16_t, intra_matrix[64]);
49
    DECLARE_ALIGNED_8(int, q_intra_matrix[64]);
50 50
    uint8_t *bitstream_buffer;
51 51
    unsigned int bitstream_buffer_size;
52 52
} ASV1Context;
libavcodec/dsputil.c
62 62
};
63 63

  
64 64
/* not permutated inverse zigzag_direct + 1 for MMX quantizer */
65
uint16_t __align8 inv_zigzag_direct16[64] = {0, };
65
DECLARE_ALIGNED_8(uint16_t, inv_zigzag_direct16[64]) = {0, };
66 66

  
67 67
const uint8_t ff_alternate_horizontal_scan[64] = {
68 68
    0,  1,   2,  3,  8,  9, 16, 17,
......
3402 3402

  
3403 3403
static int dct_sad8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){
3404 3404
    MpegEncContext * const s= (MpegEncContext *)c;
3405
    uint64_t __align8 aligned_temp[sizeof(DCTELEM)*64/8];
3405
    DECLARE_ALIGNED_8(uint64_t, aligned_temp[sizeof(DCTELEM)*64/8]);
3406 3406
    DCTELEM * const temp= (DCTELEM*)aligned_temp;
3407 3407
    int sum=0, i;
3408 3408

  
......
3472 3472

  
3473 3473
static int dct_max8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){
3474 3474
    MpegEncContext * const s= (MpegEncContext *)c;
3475
    uint64_t __align8 aligned_temp[sizeof(DCTELEM)*64/8];
3475
    DECLARE_ALIGNED_8(uint64_t, aligned_temp[sizeof(DCTELEM)*64/8]);
3476 3476
    DCTELEM * const temp= (DCTELEM*)aligned_temp;
3477 3477
    int sum=0, i;
3478 3478

  
......
3491 3491

  
3492 3492
static int quant_psnr8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){
3493 3493
    MpegEncContext * const s= (MpegEncContext *)c;
3494
    uint64_t __align8 aligned_temp[sizeof(DCTELEM)*64*2/8];
3494
    DECLARE_ALIGNED_8 (uint64_t, aligned_temp[sizeof(DCTELEM)*64*2/8]);
3495 3495
    DCTELEM * const temp= (DCTELEM*)aligned_temp;
3496 3496
    DCTELEM * const bak = ((DCTELEM*)aligned_temp)+64;
3497 3497
    int sum=0, i;
......
3516 3516
static int rd8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){
3517 3517
    MpegEncContext * const s= (MpegEncContext *)c;
3518 3518
    const uint8_t *scantable= s->intra_scantable.permutated;
3519
    uint64_t __align8 aligned_temp[sizeof(DCTELEM)*64/8];
3520
    uint64_t __align8 aligned_bak[stride];
3519
    DECLARE_ALIGNED_8 (uint64_t, aligned_temp[sizeof(DCTELEM)*64/8]);
3520
    DECLARE_ALIGNED_8 (uint64_t, aligned_bak[stride]);
3521 3521
    DCTELEM * const temp= (DCTELEM*)aligned_temp;
3522 3522
    uint8_t * const bak= (uint8_t*)aligned_bak;
3523 3523
    int i, last, run, bits, level, distoration, start_i;
......
3595 3595
static int bit8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){
3596 3596
    MpegEncContext * const s= (MpegEncContext *)c;
3597 3597
    const uint8_t *scantable= s->intra_scantable.permutated;
3598
    uint64_t __align8 aligned_temp[sizeof(DCTELEM)*64/8];
3598
    DECLARE_ALIGNED_8 (uint64_t, aligned_temp[sizeof(DCTELEM)*64/8]);
3599 3599
    DCTELEM * const temp= (DCTELEM*)aligned_temp;
3600 3600
    int i, last, run, bits, level, start_i;
3601 3601
    const int esc_length= s->ac_esc_length;
libavcodec/dsputil.h
390 390
   one or more MultiMedia extension */
391 391
int mm_support(void);
392 392

  
393
#define __align16 __attribute__ ((aligned (16)))
393
#ifdef __GNUC__
394
  #define DECLARE_ALIGNED_16(t,v)       t v __attribute__ ((aligned (16)))
395
#else
396
  #define DECLARE_ALIGNED_16(t,v)      __declspec(align(16)) t v
397
#endif
394 398

  
395 399
#if defined(HAVE_MMX)
396 400

  
......
421 425
        emms();\
422 426
}
423 427

  
424
#define __align8 __attribute__ ((aligned (8)))
428
#ifdef __GNUC__
429
  #define DECLARE_ALIGNED_8(t,v)       t v __attribute__ ((aligned (8)))
430
#else
431
  #define DECLARE_ALIGNED_8(t,v)      __declspec(align(8)) t v
432
#endif
433

  
425 434
#define STRIDE_ALIGN 8
426 435

  
427 436
void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx);
......
431 440

  
432 441
/* This is to use 4 bytes read to the IDCT pointers for some 'zero'
433 442
   line optimizations */
434
#define __align8 __attribute__ ((aligned (4)))
443
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (4)))
435 444
#define STRIDE_ALIGN 4
436 445

  
437 446
#define MM_IWMMXT    0x0100 /* XScale IWMMXT */
......
443 452
#elif defined(HAVE_MLIB)
444 453

  
445 454
/* SPARC/VIS IDCT needs 8-byte aligned DCT blocks */
446
#define __align8 __attribute__ ((aligned (8)))
455
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (8)))
447 456
#define STRIDE_ALIGN 8
448 457

  
449 458
void dsputil_init_mlib(DSPContext* c, AVCodecContext *avctx);
......
451 460
#elif defined(ARCH_SPARC)
452 461

  
453 462
/* SPARC/VIS IDCT needs 8-byte aligned DCT blocks */
454
#define __align8 __attribute__ ((aligned (8)))
463
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (8)))
455 464
#define STRIDE_ALIGN 8
456 465
void dsputil_init_vis(DSPContext* c, AVCodecContext *avctx);
457 466

  
458 467
#elif defined(ARCH_ALPHA)
459 468

  
460
#define __align8 __attribute__ ((aligned (8)))
469
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (8)))
461 470
#define STRIDE_ALIGN 8
462 471

  
463 472
void dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx);
......
474 483
#undef pixel
475 484
#endif
476 485

  
477
#define __align8 __attribute__ ((aligned (16)))
486
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (16)))
478 487
#define STRIDE_ALIGN 16
479 488

  
480 489
void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx);
481 490

  
482 491
#elif defined(HAVE_MMI)
483 492

  
484
#define __align8 __attribute__ ((aligned (16)))
493
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (16)))
485 494
#define STRIDE_ALIGN 16
486 495

  
487 496
void dsputil_init_mmi(DSPContext* c, AVCodecContext *avctx);
488 497

  
489 498
#elif defined(ARCH_SH4)
490 499

  
491
#define __align8 __attribute__ ((aligned (8)))
500
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (8)))
492 501
#define STRIDE_ALIGN 8
493 502

  
494 503
void dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx);
495 504

  
496 505
#else
497 506

  
498
#define __align8 __attribute__ ((aligned (8)))
507
#define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (8)))
499 508
#define STRIDE_ALIGN 8
500 509

  
501 510
#endif
libavcodec/dv.c
379 379
    PutBitContext pb, vs_pb;
380 380
    GetBitContext gb;
381 381
    BlockInfo mb_data[5 * 6], *mb, *mb1;
382
    DCTELEM sblock[5*6][64] __align8;
383
    uint8_t mb_bit_buffer[80 + 4] __align8; /* allow some slack */
384
    uint8_t vs_bit_buffer[5 * 80 + 4] __align8; /* allow some slack */
382
    DECLARE_ALIGNED_8(DCTELEM, sblock[5*6][64]);
383
    DECLARE_ALIGNED_8(uint8_t, mb_bit_buffer[80 + 4]); /* allow some slack */
384
    DECLARE_ALIGNED_8(uint8_t, vs_bit_buffer[5 * 80 + 4]); /* allow some slack */
385 385
    const int log2_blocksize= 3-s->avctx->lowres;
386 386

  
387 387
    assert((((int)mb_bit_buffer)&7)==0);
......
779 779
    uint8_t*  data;
780 780
    uint8_t*  ptr;
781 781
    int       do_edge_wrap;
782
    DCTELEM   block[64] __align8;
782
    DECLARE_ALIGNED_8(DCTELEM, block[64]);
783 783
    EncBlockInfo  enc_blks[5*6];
784 784
    PutBitContext pbs[5*6];
785 785
    PutBitContext* pb;
libavcodec/h264.c
199 199
     * non zero coeff count cache.
200 200
     * is 64 if not available.
201 201
     */
202
    uint8_t non_zero_count_cache[6*8] __align8;
202
    DECLARE_ALIGNED_8(uint8_t, non_zero_count_cache[6*8]);
203 203
    uint8_t (*non_zero_count)[16];
204 204

  
205 205
    /**
206 206
     * Motion vector cache.
207 207
     */
208
    int16_t mv_cache[2][5*8][2] __align8;
209
    int8_t ref_cache[2][5*8] __align8;
208
    DECLARE_ALIGNED_8(int16_t, mv_cache[2][5*8][2]);
209
    DECLARE_ALIGNED_8(int8_t, ref_cache[2][5*8]);
210 210
#define LIST_NOT_USED -1 //FIXME rename?
211 211
#define PART_NOT_AVAILABLE -2
212 212

  
......
335 335
    GetBitContext *intra_gb_ptr;
336 336
    GetBitContext *inter_gb_ptr;
337 337

  
338
    DCTELEM mb[16*24] __align8;
338
    DECLARE_ALIGNED_8(DCTELEM, mb[16*24]);
339 339

  
340 340
    /**
341 341
     * Cabac
......
352 352
    uint8_t     *chroma_pred_mode_table;
353 353
    int         last_qscale_diff;
354 354
    int16_t     (*mvd_table[2])[2];
355
    int16_t     mvd_cache[2][5*8][2] __align8;
355
    DECLARE_ALIGNED_8(int16_t, mvd_cache[2][5*8][2]);
356 356
    uint8_t     *direct_table;
357 357
    uint8_t     direct_cache[5*8];
358 358

  
libavcodec/i386/dsputil_h264_template_mmx.c
25 25
 */
26 26
static void H264_CHROMA_MC8_TMPL(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y)
27 27
{
28
    uint64_t AA __align8;
29
    uint64_t DD __align8;
28
    DECLARE_ALIGNED_8(uint64_t, AA);
29
    DECLARE_ALIGNED_8(uint64_t, DD);
30 30
    int i;
31 31

  
32 32
    if(y==0 && x==0) {
......
242 242

  
243 243
static void H264_CHROMA_MC4_TMPL(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y)
244 244
{
245
    uint64_t AA __align8;
246
    uint64_t DD __align8;
245
    DECLARE_ALIGNED_8(uint64_t, AA);
246
    DECLARE_ALIGNED_8(uint64_t, DD);
247 247
    int i;
248 248

  
249 249
    /* no special case for mv=(0,0) in 4x*, since it's much less common than in 8x*.
libavcodec/i386/dsputil_mmx.c
303 303
            :"memory");
304 304
}
305 305

  
306
static const unsigned char __align8 vector128[8] =
306
static DECLARE_ALIGNED_8(const unsigned char, vector128[8]) =
307 307
  { 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 };
308 308

  
309 309
void put_signed_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size)
......
1546 1546
        "movq "#d", "#o"+48(%1)       \n\t"\
1547 1547

  
1548 1548
static int hadamard8_diff_mmx(void *s, uint8_t *src1, uint8_t *src2, int stride, int h){
1549
    uint64_t temp[16] __align8;
1549
    DECLARE_ALIGNED_8(uint64_t, temp[16]);
1550 1550
    int sum=0;
1551 1551

  
1552 1552
    assert(h==8);
......
1633 1633
}
1634 1634

  
1635 1635
static int hadamard8_diff_mmx2(void *s, uint8_t *src1, uint8_t *src2, int stride, int h){
1636
    uint64_t temp[16] __align8;
1636
    DECLARE_ALIGNED_8(uint64_t, temp[16]);
1637 1637
    int sum=0;
1638 1638

  
1639 1639
    assert(h==8);
libavcodec/i386/mpegvideo_mmx_template.c
51 51
    long last_non_zero_p1;
52 52
    int level=0, q; //=0 is cuz gcc says uninitalized ...
53 53
    const uint16_t *qmat, *bias;
54
    __align8 int16_t temp_block[64];
54
    DECLARE_ALIGNED_8(int16_t, temp_block[64]);
55 55

  
56 56
    assert((7&(int)(&temp_block[0])) == 0); //did gcc align it correctly?
57 57

  
libavcodec/i386/vp3dsp_sse2.c
24 24
#include "../dsputil.h"
25 25
#include "mmx.h"
26 26

  
27
static const unsigned short __align16 SSE2_dequant_const[] =
27
static DECLARE_ALIGNED_16(const unsigned short, SSE2_dequant_const[]) =
28 28
{
29 29
    0,65535,65535,0,0,0,0,0,    // 0x0000 0000 0000 0000 0000 FFFF FFFF 0000
30 30
    0,0,0,0,65535,65535,0,0,    // 0x0000 0000 FFFF FFFF 0000 0000 0000 0000
......
35 35
    0,0,65535,65535, 0,0,0,0    // 0x0000 0000 0000 0000 FFFF FFFF 0000 0000
36 36
};
37 37

  
38
static const unsigned int __align16 eight_data[] =
38
static DECLARE_ALIGNED_16(const unsigned int, eight_data[]) =
39 39
{
40 40
    0x00080008,
41 41
    0x00080008,
......
43 43
    0x00080008
44 44
};
45 45

  
46
static const unsigned short __align16 SSE2_idct_data[7 * 8] =
46
static DECLARE_ALIGNED_16(const unsigned short, SSE2_idct_data[7 * 8]) =
47 47
{
48 48
    64277,64277,64277,64277,64277,64277,64277,64277,
49 49
    60547,60547,60547,60547,60547,60547,60547,60547,
libavcodec/imgresample.c
50 50
    int padtop, padbottom, padleft, padright;
51 51
    int pad_owidth, pad_oheight;
52 52
    int h_incr, v_incr;
53
    int16_t h_filters[NB_PHASES][NB_TAPS] __align8; /* horizontal filters */
54
    int16_t v_filters[NB_PHASES][NB_TAPS] __align8; /* vertical filters */
53
    DECLARE_ALIGNED_8(int16_t, h_filters[NB_PHASES][NB_TAPS]); /* horizontal filters */
54
    DECLARE_ALIGNED_8(int16_t, v_filters[NB_PHASES][NB_TAPS]); /* vertical filters */
55 55
    uint8_t *line_buf;
56 56
};
57 57

  
libavcodec/mdec.c
45 45
    int mb_width;
46 46
    int mb_height;
47 47
    int mb_x, mb_y;
48
    DCTELEM __align8 block[6][64];
49
    uint16_t __align8 intra_matrix[64];
50
    int __align8 q_intra_matrix[64];
48
    DECLARE_ALIGNED_8(DCTELEM, block[6][64]);
49
    DECLARE_ALIGNED_8(uint16_t, intra_matrix[64]);
50
    DECLARE_ALIGNED_8(int, q_intra_matrix[64]);
51 51
    uint8_t *bitstream_buffer;
52 52
    unsigned int bitstream_buffer_size;
53 53
    int block_last_index[6];
libavcodec/mjpeg.c
873 873
    AVFrame picture; /* picture structure */
874 874
    int linesize[MAX_COMPONENTS];                   ///< linesize << interlaced
875 875
    int8_t *qscale_table;
876
    DCTELEM block[64] __align8;
876
    DECLARE_ALIGNED_8(DCTELEM, block[64]);
877 877
    ScanTable scantable;
878 878
    void (*idct_put)(uint8_t *dest/*align 8*/, int line_size, DCTELEM *block/*align 16*/);
879 879

  
libavcodec/mpegvideo.c
5963 5963
                        DCTELEM *block, int16_t *weight, DCTELEM *orig,
5964 5964
                        int n, int qscale){
5965 5965
    int16_t rem[64];
5966
    DCTELEM d1[64] __align16;
5966
    DECLARE_ALIGNED_16(DCTELEM, d1[64]);
5967 5967
    const int *qmat;
5968 5968
    const uint8_t *scantable= s->intra_scantable.scantable;
5969 5969
    const uint8_t *perm_scantable= s->intra_scantable.permutated;
libavcodec/mpegvideo.h
134 134
    uint8_t raster_end[64];
135 135
#ifdef ARCH_POWERPC
136 136
                /** Used by dct_quantise_alitvec to find last-non-zero */
137
    uint8_t __align8 inverse[64];
137
    DECLARE_ALIGNED_8(uint8_t, inverse[64]);
138 138
#endif
139 139
} ScanTable;
140 140

  
......
494 494
    uint16_t (*q_inter_matrix16)[2][64];
495 495
    int block_last_index[12];  ///< last non zero coefficient in block
496 496
    /* scantables */
497
    ScanTable __align8 intra_scantable;
497
    DECLARE_ALIGNED_8(ScanTable, intra_scantable);
498 498
    ScanTable intra_h_scantable;
499 499
    ScanTable intra_v_scantable;
500 500
    ScanTable inter_scantable; ///< if inter == intra then intra should be used to reduce tha cache usage
libavcodec/ppc/dsputil_h264_altivec.c
71 71
}\
72 72
\
73 73
static void OPNAME ## h264_qpel ## SIZE ## _mc10_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){ \
74
    uint64_t temp[SIZE*SIZE/8] __align16;\
74
    DECLARE_ALIGNED_16(uint64_t, temp[SIZE*SIZE/8]);\
75 75
    uint8_t * const half= (uint8_t*)temp;\
76 76
    put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(half, src, SIZE, stride);\
77 77
    OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src, half, stride, stride, SIZE);\
......
82 82
}\
83 83
\
84 84
static void OPNAME ## h264_qpel ## SIZE ## _mc30_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
85
    uint64_t temp[SIZE*SIZE/8] __align16;\
85
    DECLARE_ALIGNED_16(uint64_t, temp[SIZE*SIZE/8]);\
86 86
    uint8_t * const half= (uint8_t*)temp;\
87 87
    put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(half, src, SIZE, stride);\
88 88
    OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src+1, half, stride, stride, SIZE);\
89 89
}\
90 90
\
91 91
static void OPNAME ## h264_qpel ## SIZE ## _mc01_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
92
    uint64_t temp[SIZE*SIZE/8] __align16;\
92
    DECLARE_ALIGNED_16(uint64_t, temp[SIZE*SIZE/8]);\
93 93
    uint8_t * const half= (uint8_t*)temp;\
94 94
    put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(half, src, SIZE, stride);\
95 95
    OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src, half, stride, stride, SIZE);\
......
100 100
}\
101 101
\
102 102
static void OPNAME ## h264_qpel ## SIZE ## _mc03_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
103
    uint64_t temp[SIZE*SIZE/8] __align16;\
103
    DECLARE_ALIGNED_16(uint64_t, temp[SIZE*SIZE/8]);\
104 104
    uint8_t * const half= (uint8_t*)temp;\
105 105
    put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(half, src, SIZE, stride);\
106 106
    OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src+stride, half, stride, stride, SIZE);\
107 107
}\
108 108
\
109 109
static void OPNAME ## h264_qpel ## SIZE ## _mc11_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
110
    uint64_t temp[SIZE*SIZE/4] __align16;\
110
    DECLARE_ALIGNED_16(uint64_t, temp[SIZE*SIZE/4]);\
111 111
    uint8_t * const halfH= (uint8_t*)temp;\
112 112
    uint8_t * const halfV= ((uint8_t*)temp) + SIZE*SIZE;\
113 113
    put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src, SIZE, stride);\
......
116 116
}\
117 117
\
118 118
static void OPNAME ## h264_qpel ## SIZE ## _mc31_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
119
    uint64_t temp[SIZE*SIZE/4] __align16;\
119
    DECLARE_ALIGNED_16(uint64_t, temp[SIZE*SIZE/4]);\
120 120
    uint8_t * const halfH= (uint8_t*)temp;\
121 121
    uint8_t * const halfV= ((uint8_t*)temp) + SIZE*SIZE;\
122 122
    put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src, SIZE, stride);\
......
125 125
}\
126 126
\
127 127
static void OPNAME ## h264_qpel ## SIZE ## _mc13_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
128
    uint64_t temp[SIZE*SIZE/4] __align16;\
128
    DECLARE_ALIGNED_16(uint64_t, temp[SIZE*SIZE/4]);\
129 129
    uint8_t * const halfH= (uint8_t*)temp;\
130 130
    uint8_t * const halfV= ((uint8_t*)temp) + SIZE*SIZE;\
131 131
    put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src + stride, SIZE, stride);\
......
134 134
}\
135 135
\
136 136
static void OPNAME ## h264_qpel ## SIZE ## _mc33_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
137
    uint64_t temp[SIZE*SIZE/4] __align16;\
137
    DECLARE_ALIGNED_16(uint64_t, temp[SIZE*SIZE/4]);\
138 138
    uint8_t * const halfH= (uint8_t*)temp;\
139 139
    uint8_t * const halfV= ((uint8_t*)temp) + SIZE*SIZE;\
140 140
    put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src + stride, SIZE, stride);\
......
143 143
}\
144 144
\
145 145
static void OPNAME ## h264_qpel ## SIZE ## _mc22_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
146
    uint64_t temp[SIZE*(SIZE+8)/4] __align16;\
146
    DECLARE_ALIGNED_16(uint64_t, temp[SIZE*(SIZE+8)/4]);\
147 147
    int16_t * const tmp= (int16_t*)temp;\
148 148
    OPNAME ## h264_qpel ## SIZE ## _hv_lowpass_ ## CODETYPE(dst, tmp, src, stride, SIZE, stride);\
149 149
}\
150 150
\
151 151
static void OPNAME ## h264_qpel ## SIZE ## _mc21_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
152
    uint64_t temp[SIZE*(SIZE+8)/4 + SIZE*SIZE/4] __align16;\
152
    DECLARE_ALIGNED_16(uint64_t, temp[SIZE*(SIZE+8)/4 + SIZE*SIZE/4]);\
153 153
    uint8_t * const halfH= (uint8_t*)temp;\
154 154
    uint8_t * const halfHV= ((uint8_t*)temp) + SIZE*SIZE;\
155 155
    int16_t * const tmp= ((int16_t*)temp) + SIZE*SIZE;\
......
159 159
}\
160 160
\
161 161
static void OPNAME ## h264_qpel ## SIZE ## _mc23_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
162
    uint64_t temp[SIZE*(SIZE+8)/4 + SIZE*SIZE/4] __align16;\
162
    DECLARE_ALIGNED_16(uint64_t, temp[SIZE*(SIZE+8)/4 + SIZE*SIZE/4]);\
163 163
    uint8_t * const halfH= (uint8_t*)temp;\
164 164
    uint8_t * const halfHV= ((uint8_t*)temp) + SIZE*SIZE;\
165 165
    int16_t * const tmp= ((int16_t*)temp) + SIZE*SIZE;\
......
169 169
}\
170 170
\
171 171
static void OPNAME ## h264_qpel ## SIZE ## _mc12_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
172
    uint64_t temp[SIZE*(SIZE+8)/4 + SIZE*SIZE/4] __align16;\
172
    DECLARE_ALIGNED_16(uint64_t, temp[SIZE*(SIZE+8)/4 + SIZE*SIZE/4]);\
173 173
    uint8_t * const halfV= (uint8_t*)temp;\
174 174
    uint8_t * const halfHV= ((uint8_t*)temp) + SIZE*SIZE;\
175 175
    int16_t * const tmp= ((int16_t*)temp) + SIZE*SIZE;\
......
179 179
}\
180 180
\
181 181
static void OPNAME ## h264_qpel ## SIZE ## _mc32_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
182
    uint64_t temp[SIZE*(SIZE+8)/4 + SIZE*SIZE/4] __align16;\
182
    DECLARE_ALIGNED_16(uint64_t, temp[SIZE*(SIZE+8)/4 + SIZE*SIZE/4]);\
183 183
    uint8_t * const halfV= (uint8_t*)temp;\
184 184
    uint8_t * const halfHV= ((uint8_t*)temp) + SIZE*SIZE;\
185 185
    int16_t * const tmp= ((int16_t*)temp) + SIZE*SIZE;\
libavcodec/vp3.c
285 285

  
286 286
    /* these arrays need to be on 16-byte boundaries since SSE2 operations
287 287
     * index into them */
288
    int16_t __align16 intra_y_dequant[64];
289
    int16_t __align16 intra_c_dequant[64];
290
    int16_t __align16 inter_dequant[64];
288
    DECLARE_ALIGNED_16(int16_t, intra_y_dequant[64]);
289
    DECLARE_ALIGNED_16(int16_t, intra_c_dequant[64]);
290
    DECLARE_ALIGNED_16(int16_t, inter_dequant[64]);
291 291

  
292 292
    /* This table contains superblock_count * 16 entries. Each set of 16
293 293
     * numbers corresponds to the fragment indices 0..15 of the superblock.
......
1711 1711
    int m, n;
1712 1712
    int i;  /* indicates current fragment */
1713 1713
    int16_t *dequantizer;
1714
    DCTELEM __align16 block[64];
1714
    DECLARE_ALIGNED_16(DCTELEM, block[64]);
1715 1715
    unsigned char *output_plane;
1716 1716
    unsigned char *last_plane;
1717 1717
    unsigned char *golden_plane;
libavcodec/wmadec.c
102 102
    int block_pos; /* current position in frame */
103 103
    uint8_t ms_stereo; /* true if mid/side stereo mode */
104 104
    uint8_t channel_coded[MAX_CHANNELS]; /* true if channel is coded */
105
    float exponents[MAX_CHANNELS][BLOCK_MAX_SIZE] __attribute__((aligned(16)));
105
    DECLARE_ALIGNED_16(float, exponents[MAX_CHANNELS][BLOCK_MAX_SIZE]);
106 106
    float max_exponent[MAX_CHANNELS];
107 107
    int16_t coefs1[MAX_CHANNELS][BLOCK_MAX_SIZE];
108
    float coefs[MAX_CHANNELS][BLOCK_MAX_SIZE] __attribute__((aligned(16)));
108
    DECLARE_ALIGNED_16(float, coefs[MAX_CHANNELS][BLOCK_MAX_SIZE]);
109 109
    MDCTContext mdct_ctx[BLOCK_NB_SIZES];
110 110
    float *windows[BLOCK_NB_SIZES];
111
    FFTSample mdct_tmp[BLOCK_MAX_SIZE] __attribute__((aligned(16))); /* temporary storage for imdct */
111
    DECLARE_ALIGNED_16(FFTSample, mdct_tmp[BLOCK_MAX_SIZE]); /* temporary storage for imdct */
112 112
    /* output buffer for one frame and the last for IMDCT windowing */
113
    float frame_out[MAX_CHANNELS][BLOCK_MAX_SIZE * 2] __attribute__((aligned(16)));
113
    DECLARE_ALIGNED_16(float, frame_out[MAX_CHANNELS][BLOCK_MAX_SIZE * 2]);
114 114
    /* last frame info */
115 115
    uint8_t last_superframe[MAX_CODED_SUPERFRAME_SIZE + 4]; /* padding added */
116 116
    int last_bitoffset;
......
1097 1097

  
1098 1098
    for(ch = 0; ch < s->nb_channels; ch++) {
1099 1099
        if (s->channel_coded[ch]) {
1100
            FFTSample output[BLOCK_MAX_SIZE * 2] __attribute__((aligned(16)));
1100
            DECLARE_ALIGNED_16(FFTSample, output[BLOCK_MAX_SIZE * 2]);
1101 1101
            float *ptr;
1102 1102
            int i, n4, index, n;
1103 1103

  
libavcodec/wmv2.c
49 49
    int hshift;
50 50

  
51 51
    ScanTable abt_scantable[2];
52
    DCTELEM abt_block2[6][64] __align8;
52
    DECLARE_ALIGNED_8(DCTELEM, abt_block2[6][64]);
53 53
}Wmv2Context;
54 54

  
55 55
static void wmv2_common_init(Wmv2Context * w){

Also available in: Unified diff