Revision 84dc2d8a

View differences:

libavcodec/4xm.c
137 137
    int mv[256];
138 138
    VLC pre_vlc;
139 139
    int last_dc;
140
    DECLARE_ALIGNED_16(DCTELEM, block)[6][64];
140
    DECLARE_ALIGNED(16, DCTELEM, block)[6][64];
141 141
    void *bitstream_buffer;
142 142
    unsigned int bitstream_buffer_size;
143 143
    int version;
libavcodec/aac.h
214 214
    float sf[120];                            ///< scalefactors
215 215
    int sf_idx[128];                          ///< scalefactor indices (used by encoder)
216 216
    uint8_t zeroes[128];                      ///< band is not coded (used by encoder)
217
    DECLARE_ALIGNED_16(float, coeffs)[1024];  ///< coefficients for IMDCT
218
    DECLARE_ALIGNED_16(float, saved)[1024];   ///< overlap
219
    DECLARE_ALIGNED_16(float, ret)[1024];     ///< PCM output
217
    DECLARE_ALIGNED(16, float, coeffs)[1024]; ///< coefficients for IMDCT
218
    DECLARE_ALIGNED(16, float, saved)[1024];  ///< overlap
219
    DECLARE_ALIGNED(16, float, ret)[1024];    ///< PCM output
220 220
    PredictorState predictor_state[MAX_PREDICTORS];
221 221
} SingleChannelElement;
222 222

  
......
261 261
     * @defgroup temporary aligned temporary buffers (We do not want to have these on the stack.)
262 262
     * @{
263 263
     */
264
    DECLARE_ALIGNED_16(float, buf_mdct)[1024];
264
    DECLARE_ALIGNED(16, float, buf_mdct)[1024];
265 265
    /** @} */
266 266

  
267 267
    /**
libavcodec/aacenc.h
52 52
    FFTContext mdct1024;                         ///< long (1024 samples) frame transform context
53 53
    FFTContext mdct128;                          ///< short (128 samples) frame transform context
54 54
    DSPContext  dsp;
55
    DECLARE_ALIGNED_16(FFTSample, output)[2048]; ///< temporary buffer for MDCT input coefficients
55
    DECLARE_ALIGNED(16, FFTSample, output)[2048]; ///< temporary buffer for MDCT input coefficients
56 56
    int16_t* samples;                            ///< saved preprocessed input
57 57

  
58 58
    int samplerate_index;                        ///< MPEG-4 samplerate index
......
64 64
    int cur_channel;
65 65
    int last_frame;
66 66
    float lambda;
67
    DECLARE_ALIGNED_16(int,   qcoefs)[96][2];    ///< quantized coefficients
68
    DECLARE_ALIGNED_16(float, scoefs)[1024];     ///< scaled coefficients
67
    DECLARE_ALIGNED(16, int,   qcoefs)[96][2];   ///< quantized coefficients
68
    DECLARE_ALIGNED(16, float, scoefs)[1024];    ///< scaled coefficients
69 69
} AACEncContext;
70 70

  
71 71
#endif /* AVCODEC_AACENC_H */
libavcodec/aactab.c
409 409
 * 64.0f is a special value indicating the existence of an escape code in the
410 410
 * bitstream.
411 411
 */
412
static const DECLARE_ALIGNED_16(float, codebook_vector0)[324] = {
412
static const DECLARE_ALIGNED(16, float, codebook_vector0)[324] = {
413 413
 -1.0000000, -1.0000000, -1.0000000, -1.0000000,
414 414
 -1.0000000, -1.0000000, -1.0000000,  0.0000000,
415 415
 -1.0000000, -1.0000000, -1.0000000,  1.0000000,
......
493 493
  1.0000000,  1.0000000,  1.0000000,  1.0000000,
494 494
};
495 495

  
496
static const DECLARE_ALIGNED_16(float, codebook_vector2)[324] = {
496
static const DECLARE_ALIGNED(16, float, codebook_vector2)[324] = {
497 497
  0.0000000,  0.0000000,  0.0000000,  0.0000000,
498 498
  0.0000000,  0.0000000,  0.0000000,  1.0000000,
499 499
  0.0000000,  0.0000000,  0.0000000,  2.5198421,
......
577 577
  2.5198421,  2.5198421,  2.5198421,  2.5198421,
578 578
};
579 579

  
580
static const DECLARE_ALIGNED_16(float, codebook_vector4)[162] = {
580
static const DECLARE_ALIGNED(16, float, codebook_vector4)[162] = {
581 581
 -6.3496042, -6.3496042, -6.3496042, -4.3267487,
582 582
 -6.3496042, -2.5198421, -6.3496042, -1.0000000,
583 583
 -6.3496042,  0.0000000, -6.3496042,  1.0000000,
......
621 621
  6.3496042,  6.3496042,
622 622
};
623 623

  
624
static const DECLARE_ALIGNED_16(float, codebook_vector6)[128] = {
624
static const DECLARE_ALIGNED(16, float, codebook_vector6)[128] = {
625 625
  0.0000000,  0.0000000,  0.0000000,  1.0000000,
626 626
  0.0000000,  2.5198421,  0.0000000,  4.3267487,
627 627
  0.0000000,  6.3496042,  0.0000000,  8.5498797,
......
656 656
 13.3905183, 10.9027236, 13.3905183, 13.3905183,
657 657
};
658 658

  
659
static const DECLARE_ALIGNED_16(float, codebook_vector8)[338] = {
659
static const DECLARE_ALIGNED(16, float, codebook_vector8)[338] = {
660 660
  0.0000000,  0.0000000,  0.0000000,  1.0000000,
661 661
  0.0000000,  2.5198421,  0.0000000,  4.3267487,
662 662
  0.0000000,  6.3496042,  0.0000000,  8.5498797,
......
744 744
 27.4731418, 27.4731418,
745 745
};
746 746

  
747
static const DECLARE_ALIGNED_16(float, codebook_vector10)[578] = {
747
static const DECLARE_ALIGNED(16, float, codebook_vector10)[578] = {
748 748
  0.0000000,  0.0000000,  0.0000000,  1.0000000,
749 749
  0.0000000,  2.5198421,  0.0000000,  4.3267487,
750 750
  0.0000000,  6.3496042,  0.0000000,  8.5498797,
libavcodec/ac3dec.h
157 157
///@}
158 158

  
159 159
///@defgroup arrays aligned arrays
160
    DECLARE_ALIGNED_16(int,   fixed_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS];       ///> fixed-point transform coefficients
161
    DECLARE_ALIGNED_16(float, transform_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS];   ///< transform coefficients
162
    DECLARE_ALIGNED_16(float, delay)[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE];             ///< delay - added to the next block
163
    DECLARE_ALIGNED_16(float, window)[AC3_BLOCK_SIZE];                              ///< window coefficients
164
    DECLARE_ALIGNED_16(float, tmp_output)[AC3_BLOCK_SIZE];                          ///< temporary storage for output before windowing
165
    DECLARE_ALIGNED_16(float, output)[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE];            ///< output after imdct transform and windowing
160
    DECLARE_ALIGNED(16, int,   fixed_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS];       ///> fixed-point transform coefficients
161
    DECLARE_ALIGNED(16, float, transform_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS];   ///< transform coefficients
162
    DECLARE_ALIGNED(16, float, delay)[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE];             ///< delay - added to the next block
163
    DECLARE_ALIGNED(16, float, window)[AC3_BLOCK_SIZE];                              ///< window coefficients
164
    DECLARE_ALIGNED(16, float, tmp_output)[AC3_BLOCK_SIZE];                          ///< temporary storage for output before windowing
165
    DECLARE_ALIGNED(16, float, output)[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE];            ///< output after imdct transform and windowing
166 166
///@}
167 167
} AC3DecodeContext;
168 168

  
libavcodec/asv1.c
48 48
    int mb_height;
49 49
    int mb_width2;
50 50
    int mb_height2;
51
    DECLARE_ALIGNED_16(DCTELEM, block)[6][64];
51
    DECLARE_ALIGNED(16, DCTELEM, block)[6][64];
52 52
    uint16_t intra_matrix[64];
53 53
    int q_intra_matrix[64];
54 54
    uint8_t *bitstream_buffer;
libavcodec/atrac1.c
58 58
    int                 log2_block_count[AT1_QMF_BANDS];    ///< log2 number of blocks in a band
59 59
    int                 num_bfus;                           ///< number of Block Floating Units
60 60
    float*              spectrum[2];
61
    DECLARE_ALIGNED_16(float, spec1)[AT1_SU_SAMPLES];     ///< mdct buffer
62
    DECLARE_ALIGNED_16(float, spec2)[AT1_SU_SAMPLES];     ///< mdct buffer
63
    DECLARE_ALIGNED_16(float, fst_qmf_delay)[46];         ///< delay line for the 1st stacked QMF filter
64
    DECLARE_ALIGNED_16(float, snd_qmf_delay)[46];         ///< delay line for the 2nd stacked QMF filter
65
    DECLARE_ALIGNED_16(float, last_qmf_delay)[256+23];    ///< delay line for the last stacked QMF filter
61
    DECLARE_ALIGNED(16, float, spec1)[AT1_SU_SAMPLES];     ///< mdct buffer
62
    DECLARE_ALIGNED(16, float, spec2)[AT1_SU_SAMPLES];     ///< mdct buffer
63
    DECLARE_ALIGNED(16, float, fst_qmf_delay)[46];         ///< delay line for the 1st stacked QMF filter
64
    DECLARE_ALIGNED(16, float, snd_qmf_delay)[46];         ///< delay line for the 2nd stacked QMF filter
65
    DECLARE_ALIGNED(16, float, last_qmf_delay)[256+23];    ///< delay line for the last stacked QMF filter
66 66
} AT1SUCtx;
67 67

  
68 68
/**
......
70 70
 */
71 71
typedef struct {
72 72
    AT1SUCtx            SUs[AT1_MAX_CHANNELS];              ///< channel sound unit
73
    DECLARE_ALIGNED_16(float, spec)[AT1_SU_SAMPLES];      ///< the mdct spectrum buffer
73
    DECLARE_ALIGNED(16, float, spec)[AT1_SU_SAMPLES];      ///< the mdct spectrum buffer
74 74

  
75
    DECLARE_ALIGNED_16(float,  low)[256];
76
    DECLARE_ALIGNED_16(float,  mid)[256];
77
    DECLARE_ALIGNED_16(float, high)[512];
75
    DECLARE_ALIGNED(16, float,  low)[256];
76
    DECLARE_ALIGNED(16, float,  mid)[256];
77
    DECLARE_ALIGNED(16, float, high)[512];
78 78
    float*              bands[3];
79
    DECLARE_ALIGNED_16(float, out_samples)[AT1_MAX_CHANNELS][AT1_SU_SAMPLES];
79
    DECLARE_ALIGNED(16, float, out_samples)[AT1_MAX_CHANNELS][AT1_SU_SAMPLES];
80 80
    FFTContext          mdct_ctx[3];
81 81
    int                 channels;
82 82
    DSPContext          dsp;
libavcodec/atrac3.c
73 73
    int               gcBlkSwitch;
74 74
    gain_block        gainBlock[2];
75 75

  
76
    DECLARE_ALIGNED_16(float, spectrum)[1024];
77
    DECLARE_ALIGNED_16(float, IMDCT_buf)[1024];
76
    DECLARE_ALIGNED(16, float, spectrum)[1024];
77
    DECLARE_ALIGNED(16, float, IMDCT_buf)[1024];
78 78

  
79 79
    float             delayBuf1[46]; ///<qmf delay buffers
80 80
    float             delayBuf2[46];
......
119 119
    //@}
120 120
} ATRAC3Context;
121 121

  
122
static DECLARE_ALIGNED_16(float,mdct_window)[512];
122
static DECLARE_ALIGNED(16, float,mdct_window)[512];
123 123
static VLC              spectral_coeff_tab[7];
124 124
static float            gain_tab1[16];
125 125
static float            gain_tab2[31];
libavcodec/bink.c
681 681
    int v, col[2];
682 682
    const uint8_t *scan;
683 683
    int xoff, yoff;
684
    DECLARE_ALIGNED_16(DCTELEM, block[64]);
685
    DECLARE_ALIGNED_16(uint8_t, ublock[64]);
684
    DECLARE_ALIGNED(16, DCTELEM, block[64]);
685
    DECLARE_ALIGNED(16, uint8_t, ublock[64]);
686 686
    int coordmap[64];
687 687

  
688 688
    const int stride = c->pic.linesize[plane_idx];
libavcodec/binkaudio.c
49 49
    int num_bands;
50 50
    unsigned int *bands;
51 51
    float root;
52
    DECLARE_ALIGNED_16(FFTSample, coeffs)[BINK_BLOCK_MAX_SIZE];
53
    DECLARE_ALIGNED_16(short, previous)[BINK_BLOCK_MAX_SIZE / 16];  ///< coeffs from previous audio block
52
    DECLARE_ALIGNED(16, FFTSample, coeffs)[BINK_BLOCK_MAX_SIZE];
53
    DECLARE_ALIGNED(16, short, previous)[BINK_BLOCK_MAX_SIZE / 16];  ///< coeffs from previous audio block
54 54
    float *coeffs_ptr[MAX_CHANNELS]; ///< pointers to the coeffs arrays for float_to_int16_interleave
55 55
    union {
56 56
        RDFTContext rdft;
libavcodec/cavs.h
136 136
  MV_BWD_X3
137 137
};
138 138

  
139
DECLARE_ALIGNED_8(typedef, struct) {
139
DECLARE_ALIGNED(8, typedef, struct) {
140 140
    int16_t x;
141 141
    int16_t y;
142 142
    int16_t dist;
libavcodec/cook.c
150 150
    /* data buffers */
151 151

  
152 152
    uint8_t*            decoded_bytes_buffer;
153
    DECLARE_ALIGNED_16(float,mono_mdct_output)[2048];
153
    DECLARE_ALIGNED(16, float,mono_mdct_output)[2048];
154 154
    float               decode_buffer_1[1024];
155 155
    float               decode_buffer_2[1024];
156 156
    float               decode_buffer_0[1060]; /* static allocation for joint decode */
libavcodec/dca.c
228 228

  
229 229
    /* Subband samples history (for ADPCM) */
230 230
    float subband_samples_hist[DCA_PRIM_CHANNELS_MAX][DCA_SUBBANDS][4];
231
    DECLARE_ALIGNED_16(float, subband_fir_hist)[DCA_PRIM_CHANNELS_MAX][512];
231
    DECLARE_ALIGNED(16, float, subband_fir_hist)[DCA_PRIM_CHANNELS_MAX][512];
232 232
    float subband_fir_noidea[DCA_PRIM_CHANNELS_MAX][32];
233 233
    int hist_index[DCA_PRIM_CHANNELS_MAX];
234
    DECLARE_ALIGNED_16(float, raXin)[32];
234
    DECLARE_ALIGNED(16, float, raXin)[32];
235 235

  
236 236
    int output;                 ///< type of output
237 237
    float add_bias;             ///< output bias
238 238
    float scale_bias;           ///< output scale
239 239

  
240
    DECLARE_ALIGNED_16(float, samples)[1536];  /* 6 * 256 = 1536, might only need 5 */
240
    DECLARE_ALIGNED(16, float, samples)[1536];  /* 6 * 256 = 1536, might only need 5 */
241 241
    const float *samples_chanptr[6];
242 242

  
243 243
    uint8_t dca_buffer[DCA_MAX_FRAME_SIZE];
libavcodec/dnxhddec.c
39 39
    VLC ac_vlc, dc_vlc, run_vlc;
40 40
    int last_dc[3];
41 41
    DSPContext dsp;
42
    DECLARE_ALIGNED_16(DCTELEM, blocks)[8][64];
42
    DECLARE_ALIGNED(16, DCTELEM, blocks)[8][64];
43 43
    ScanTable scantable;
44 44
    const CIDEntry *cid_table;
45 45
} DNXHDContext;
libavcodec/dnxhdenc.h
55 55
    int interlaced;
56 56
    int cur_field;
57 57

  
58
    DECLARE_ALIGNED_16(DCTELEM, blocks)[8][64];
58
    DECLARE_ALIGNED(16, DCTELEM, blocks)[8][64];
59 59

  
60 60
    int      (*qmatrix_c)     [64];
61 61
    int      (*qmatrix_l)     [64];
libavcodec/dsputil.c
92 92
};
93 93

  
94 94
/* not permutated inverse zigzag_direct + 1 for MMX quantizer */
95
DECLARE_ALIGNED_16(uint16_t, inv_zigzag_direct16)[64];
95
DECLARE_ALIGNED(16, uint16_t, inv_zigzag_direct16)[64];
96 96

  
97 97
const uint8_t ff_alternate_horizontal_scan[64] = {
98 98
    0,  1,   2,  3,  8,  9, 16, 17,
......
4535 4535

  
4536 4536
int ff_check_alignment(void){
4537 4537
    static int did_fail=0;
4538
    DECLARE_ALIGNED_16(int, aligned);
4538
    DECLARE_ALIGNED(16, int, aligned);
4539 4539

  
4540 4540
    if((intptr_t)&aligned & 15){
4541 4541
        if(!did_fail){
libavcodec/dsputil.h
709 709
    t (*v) __VA_ARGS__ = (void *)FFALIGN((uintptr_t)la_##v, a)
710 710

  
711 711
#if HAVE_LOCAL_ALIGNED_8
712
#   define LOCAL_ALIGNED_8(t, v, s, ...) DECLARE_ALIGNED_8(t, v) s __VA_ARGS__
712
#   define LOCAL_ALIGNED_8(t, v, s, ...) DECLARE_ALIGNED(8, t, v) s __VA_ARGS__
713 713
#else
714 714
#   define LOCAL_ALIGNED_8(t, v, s, ...) LOCAL_ALIGNED(8, t, v, s, __VA_ARGS__)
715 715
#endif
716 716

  
717 717
#if HAVE_LOCAL_ALIGNED_16
718
#   define LOCAL_ALIGNED_16(t, v, s, ...) DECLARE_ALIGNED_16(t, v) s __VA_ARGS__
718
#   define LOCAL_ALIGNED_16(t, v, s, ...) DECLARE_ALIGNED(16, t, v) s __VA_ARGS__
719 719
#else
720 720
#   define LOCAL_ALIGNED_16(t, v, s, ...) LOCAL_ALIGNED(16, t, v, s, __VA_ARGS__)
721 721
#endif
......
769 769
#endif
770 770

  
771 771
#define COSTABLE(size) \
772
    COSTABLE_CONST DECLARE_ALIGNED_16(FFTSample, ff_cos_##size)[size/2]
772
    COSTABLE_CONST DECLARE_ALIGNED(16, FFTSample, ff_cos_##size)[size/2]
773 773
#define SINTABLE(size) \
774
    SINTABLE_CONST DECLARE_ALIGNED_16(FFTSample, ff_sin_##size)[size/2]
774
    SINTABLE_CONST DECLARE_ALIGNED(16, FFTSample, ff_sin_##size)[size/2]
775 775
#define SINETABLE(size) \
776
    SINETABLE_CONST DECLARE_ALIGNED_16(float, ff_sine_##size)[size]
776
    SINETABLE_CONST DECLARE_ALIGNED(16, float, ff_sine_##size)[size]
777 777
extern COSTABLE(16);
778 778
extern COSTABLE(32);
779 779
extern COSTABLE(64);
libavcodec/eamad.c
46 46
    AVFrame last_frame;
47 47
    void *bitstream_buf;
48 48
    unsigned int bitstream_buf_size;
49
    DECLARE_ALIGNED_16(DCTELEM, block)[64];
49
    DECLARE_ALIGNED(16, DCTELEM, block)[64];
50 50
} MadContext;
51 51

  
52 52
static void bswap16_buf(uint16_t *dst, const uint16_t *src, int count)
libavcodec/eatgq.c
42 42
    int width,height;
43 43
    ScanTable scantable;
44 44
    int qtable[64];
45
    DECLARE_ALIGNED_16(DCTELEM, block)[6][64];
45
    DECLARE_ALIGNED(16, DCTELEM, block)[6][64];
46 46
} TgqContext;
47 47

  
48 48
static av_cold int tgq_decode_init(AVCodecContext *avctx){
libavcodec/eatqi.c
40 40
    AVFrame frame;
41 41
    void *bitstream_buf;
42 42
    unsigned int bitstream_buf_size;
43
    DECLARE_ALIGNED_16(DCTELEM, block)[6][64];
43
    DECLARE_ALIGNED(16, DCTELEM, block)[6][64];
44 44
} TqiContext;
45 45

  
46 46
static av_cold int tqi_decode_init(AVCodecContext *avctx)
libavcodec/h264.h
299 299
     * non zero coeff count cache.
300 300
     * is 64 if not available.
301 301
     */
302
    DECLARE_ALIGNED_8(uint8_t, non_zero_count_cache)[6*8];
302
    DECLARE_ALIGNED(8, uint8_t, non_zero_count_cache)[6*8];
303 303

  
304 304
    /*
305 305
    .UU.YYYY
......
312 312
    /**
313 313
     * Motion vector cache.
314 314
     */
315
    DECLARE_ALIGNED_16(int16_t, mv_cache)[2][5*8][2];
316
    DECLARE_ALIGNED_8(int8_t, ref_cache)[2][5*8];
315
    DECLARE_ALIGNED(16, int16_t, mv_cache)[2][5*8][2];
316
    DECLARE_ALIGNED(8, int8_t, ref_cache)[2][5*8];
317 317
#define LIST_NOT_USED -1 //FIXME rename?
318 318
#define PART_NOT_AVAILABLE -2
319 319

  
......
366 366
    int mb_field_decoding_flag;
367 367
    int mb_mbaff;              ///< mb_aff_frame && mb_field_decoding_flag
368 368

  
369
    DECLARE_ALIGNED_8(uint16_t, sub_mb_type)[4];
369
    DECLARE_ALIGNED(8, uint16_t, sub_mb_type)[4];
370 370

  
371 371
    //Weighted pred stuff
372 372
    int use_weight;
......
403 403
    GetBitContext *intra_gb_ptr;
404 404
    GetBitContext *inter_gb_ptr;
405 405

  
406
    DECLARE_ALIGNED_16(DCTELEM, mb)[16*24];
406
    DECLARE_ALIGNED(16, DCTELEM, mb)[16*24];
407 407
    DCTELEM mb_padding[256];        ///< as mb is addressed by scantable[i] and scantable is uint8_t we can either check that i is not too large or ensure that there is some unused stuff after mb
408 408

  
409 409
    /**
......
421 421
    uint8_t     *chroma_pred_mode_table;
422 422
    int         last_qscale_diff;
423 423
    uint8_t     (*mvd_table[2])[2];
424
    DECLARE_ALIGNED_16(uint8_t, mvd_cache)[2][5*8][2];
424
    DECLARE_ALIGNED(16, uint8_t, mvd_cache)[2][5*8][2];
425 425
    uint8_t     *direct_table;
426 426
    uint8_t     direct_cache[5*8];
427 427

  
libavcodec/h264_loopfilter.c
477 477
            int j;
478 478

  
479 479
            for(j=0; j<2; j++, mbn_xy += s->mb_stride){
480
                DECLARE_ALIGNED_8(int16_t, bS)[4];
480
                DECLARE_ALIGNED(8, int16_t, bS)[4];
481 481
                int qp;
482 482
                if( IS_INTRA(mb_type|s->current_picture.mb_type[mbn_xy]) ) {
483 483
                    AV_WN64A(bS, 0x0003000300030003ULL);
......
507 507
                                ( h->chroma_qp[1] + get_chroma_qp( h, 1, s->current_picture.qscale_table[mbn_xy] ) + 1 ) >> 1, h);
508 508
            }
509 509
        }else{
510
            DECLARE_ALIGNED_8(int16_t, bS)[4];
510
            DECLARE_ALIGNED(8, int16_t, bS)[4];
511 511
            int qp;
512 512

  
513 513
            if( IS_INTRA(mb_type|mbm_type)) {
......
584 584

  
585 585
    /* Calculate bS */
586 586
    for( edge = 1; edge < edges; edge++ ) {
587
        DECLARE_ALIGNED_8(int16_t, bS)[4];
587
        DECLARE_ALIGNED(8, int16_t, bS)[4];
588 588
        int qp;
589 589

  
590 590
        if( IS_8x8DCT(mb_type & (edge<<24)) ) // (edge&1) && IS_8x8DCT(mb_type)
......
669 669
        /* First vertical edge is different in MBAFF frames
670 670
         * There are 8 different bS to compute and 2 different Qp
671 671
         */
672
        DECLARE_ALIGNED_8(int16_t, bS)[8];
672
        DECLARE_ALIGNED(8, int16_t, bS)[8];
673 673
        int qp[2];
674 674
        int bqp[2];
675 675
        int rqp[2];
libavcodec/imc.c
84 84

  
85 85
    DSPContext dsp;
86 86
    FFTContext fft;
87
    DECLARE_ALIGNED_16(FFTComplex, samples)[COEFFS/2];
88
    DECLARE_ALIGNED_16(float, out_samples)[COEFFS];
87
    DECLARE_ALIGNED(16, FFTComplex, samples)[COEFFS/2];
88
    DECLARE_ALIGNED(16, float, out_samples)[COEFFS];
89 89
} IMCContext;
90 90

  
91 91
static VLC huffman_vlc[4][4];
libavcodec/mdec.c
44 44
    int mb_width;
45 45
    int mb_height;
46 46
    int mb_x, mb_y;
47
    DECLARE_ALIGNED_16(DCTELEM, block)[6][64];
47
    DECLARE_ALIGNED(16, DCTELEM, block)[6][64];
48 48
    uint8_t *bitstream_buffer;
49 49
    unsigned int bitstream_buffer_size;
50 50
    int block_last_index[6];
libavcodec/mimic.c
45 45
    AVFrame         buf_ptrs    [16];
46 46
    AVPicture       flipped_ptrs[16];
47 47

  
48
    DECLARE_ALIGNED_16(DCTELEM, dct_block)[64];
48
    DECLARE_ALIGNED(16, DCTELEM, dct_block)[64];
49 49

  
50 50
    GetBitContext   gb;
51 51
    ScanTable       scantable;
libavcodec/mjpegdec.h
84 84
    int got_picture;                                ///< we found a SOF and picture is valid, too.
85 85
    int linesize[MAX_COMPONENTS];                   ///< linesize << interlaced
86 86
    int8_t *qscale_table;
87
    DECLARE_ALIGNED_16(DCTELEM, block)[64];
87
    DECLARE_ALIGNED(16, DCTELEM, block)[64];
88 88
    DCTELEM (*blocks[MAX_COMPONENTS])[64]; ///< intermediate sums (progressive mode)
89 89
    uint8_t *last_nnz[MAX_COMPONENTS];
90 90
    uint64_t coefs_finished[MAX_COMPONENTS]; ///< bitmask of which coefs have been completely decoded (progressive mode)
libavcodec/mpc.h
65 65
    AVLFG rnd;
66 66
    int frames_to_skip;
67 67
    /* for synthesis */
68
    DECLARE_ALIGNED_16(MPA_INT, synth_buf)[MPA_MAX_CHANNELS][512*2];
68
    DECLARE_ALIGNED(16, MPA_INT, synth_buf)[MPA_MAX_CHANNELS][512*2];
69 69
    int synth_buf_offset[MPA_MAX_CHANNELS];
70
    DECLARE_ALIGNED_16(int32_t, sb_samples)[MPA_MAX_CHANNELS][36][SBLIMIT];
70
    DECLARE_ALIGNED(16, int32_t, sb_samples)[MPA_MAX_CHANNELS][36][SBLIMIT];
71 71
} MPCContext;
72 72

  
73 73
void ff_mpc_init(void);
libavcodec/mpegaudio.h
132 132
    uint32_t free_format_next_header;
133 133
    GetBitContext gb;
134 134
    GetBitContext in_gb;
135
    DECLARE_ALIGNED_16(MPA_INT, synth_buf)[MPA_MAX_CHANNELS][512 * 2];
135
    DECLARE_ALIGNED(16, MPA_INT, synth_buf)[MPA_MAX_CHANNELS][512 * 2];
136 136
    int synth_buf_offset[MPA_MAX_CHANNELS];
137
    DECLARE_ALIGNED_16(int32_t, sb_samples)[MPA_MAX_CHANNELS][36][SBLIMIT];
137
    DECLARE_ALIGNED(16, int32_t, sb_samples)[MPA_MAX_CHANNELS][36][SBLIMIT];
138 138
    int32_t mdct_buf[MPA_MAX_CHANNELS][SBLIMIT * 18]; /* previous samples, for layer 3 MDCT */
139 139
    GranuleDef granules[2][2]; /* Used in Layer 3 */
140 140
#ifdef DEBUG
libavcodec/mpegaudiodec.c
95 95
    SCALE_GEN(4.0 / 9.0), /* 9 steps */
96 96
};
97 97

  
98
DECLARE_ALIGNED_16(MPA_INT, ff_mpa_synth_window)[512];
98
DECLARE_ALIGNED(16, MPA_INT, ff_mpa_synth_window)[512];
99 99

  
100 100
/**
101 101
 * Convert region offsets to region sizes and truncate
libavcodec/nellymoserdec.c
43 43

  
44 44
typedef struct NellyMoserDecodeContext {
45 45
    AVCodecContext* avctx;
46
    DECLARE_ALIGNED_16(float,float_buf)[NELLY_SAMPLES];
46
    DECLARE_ALIGNED(16, float,float_buf)[NELLY_SAMPLES];
47 47
    float           state[128];
48 48
    AVLFG           random_state;
49 49
    GetBitContext   gb;
......
51 51
    float           scale_bias;
52 52
    DSPContext      dsp;
53 53
    FFTContext      imdct_ctx;
54
    DECLARE_ALIGNED_16(float,imdct_out)[NELLY_BUF_LEN * 2];
54
    DECLARE_ALIGNED(16, float,imdct_out)[NELLY_BUF_LEN * 2];
55 55
} NellyMoserDecodeContext;
56 56

  
57 57
static void overlap_and_window(NellyMoserDecodeContext *s, float *state, float *audio, float *a_in)
libavcodec/nellymoserenc.c
53 53
    int             have_saved;
54 54
    DSPContext      dsp;
55 55
    FFTContext      mdct_ctx;
56
    DECLARE_ALIGNED_16(float, mdct_out)[NELLY_SAMPLES];
57
    DECLARE_ALIGNED_16(float, in_buff)[NELLY_SAMPLES];
58
    DECLARE_ALIGNED_16(float, buf)[2][3 * NELLY_BUF_LEN];     ///< sample buffer
56
    DECLARE_ALIGNED(16, float, mdct_out)[NELLY_SAMPLES];
57
    DECLARE_ALIGNED(16, float, in_buff)[NELLY_SAMPLES];
58
    DECLARE_ALIGNED(16, float, buf)[2][3 * NELLY_BUF_LEN];     ///< sample buffer
59 59
    float           (*opt )[NELLY_BANDS];
60 60
    uint8_t         (*path)[NELLY_BANDS];
61 61
} NellyMoserEncodeContext;
libavcodec/ppc/gmc_altivec.c
33 33
void gmc1_altivec(uint8_t *dst /* align 8 */, uint8_t *src /* align1 */, int stride, int h, int x16, int y16, int rounder)
34 34
{
35 35
POWERPC_PERF_DECLARE(altivec_gmc1_num, GMC1_PERF_COND);
36
    const DECLARE_ALIGNED_16(unsigned short, rounder_a) = rounder;
37
    const DECLARE_ALIGNED_16(unsigned short, ABCD)[8] =
36
    const DECLARE_ALIGNED(16, unsigned short, rounder_a) = rounder;
37
    const DECLARE_ALIGNED(16, unsigned short, ABCD)[8] =
38 38
        {
39 39
            (16-x16)*(16-y16), /* A */
40 40
            (   x16)*(16-y16), /* B */
libavcodec/ppc/h264_altivec.c
79 79
}\
80 80
\
81 81
static void OPNAME ## h264_qpel ## SIZE ## _mc10_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){ \
82
    DECLARE_ALIGNED_16(uint8_t, half)[SIZE*SIZE];\
82
    DECLARE_ALIGNED(16, uint8_t, half)[SIZE*SIZE];\
83 83
    put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(half, src, SIZE, stride);\
84 84
    OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src, half, stride, stride, SIZE);\
85 85
}\
......
89 89
}\
90 90
\
91 91
static void OPNAME ## h264_qpel ## SIZE ## _mc30_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
92
    DECLARE_ALIGNED_16(uint8_t, half)[SIZE*SIZE];\
92
    DECLARE_ALIGNED(16, uint8_t, half)[SIZE*SIZE];\
93 93
    put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(half, src, SIZE, stride);\
94 94
    OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src+1, half, stride, stride, SIZE);\
95 95
}\
96 96
\
97 97
static void OPNAME ## h264_qpel ## SIZE ## _mc01_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
98
    DECLARE_ALIGNED_16(uint8_t, half)[SIZE*SIZE];\
98
    DECLARE_ALIGNED(16, uint8_t, half)[SIZE*SIZE];\
99 99
    put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(half, src, SIZE, stride);\
100 100
    OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src, half, stride, stride, SIZE);\
101 101
}\
......
105 105
}\
106 106
\
107 107
static void OPNAME ## h264_qpel ## SIZE ## _mc03_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
108
    DECLARE_ALIGNED_16(uint8_t, half)[SIZE*SIZE];\
108
    DECLARE_ALIGNED(16, uint8_t, half)[SIZE*SIZE];\
109 109
    put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(half, src, SIZE, stride);\
110 110
    OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src+stride, half, stride, stride, SIZE);\
111 111
}\
112 112
\
113 113
static void OPNAME ## h264_qpel ## SIZE ## _mc11_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
114
    DECLARE_ALIGNED_16(uint8_t, halfH)[SIZE*SIZE];\
115
    DECLARE_ALIGNED_16(uint8_t, halfV)[SIZE*SIZE];\
114
    DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\
115
    DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\
116 116
    put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src, SIZE, stride);\
117 117
    put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src, SIZE, stride);\
118 118
    OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfH, halfV, stride, SIZE, SIZE);\
119 119
}\
120 120
\
121 121
static void OPNAME ## h264_qpel ## SIZE ## _mc31_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
122
    DECLARE_ALIGNED_16(uint8_t, halfH)[SIZE*SIZE];\
123
    DECLARE_ALIGNED_16(uint8_t, halfV)[SIZE*SIZE];\
122
    DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\
123
    DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\
124 124
    put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src, SIZE, stride);\
125 125
    put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src+1, SIZE, stride);\
126 126
    OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfH, halfV, stride, SIZE, SIZE);\
127 127
}\
128 128
\
129 129
static void OPNAME ## h264_qpel ## SIZE ## _mc13_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
130
    DECLARE_ALIGNED_16(uint8_t, halfH)[SIZE*SIZE];\
131
    DECLARE_ALIGNED_16(uint8_t, halfV)[SIZE*SIZE];\
130
    DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\
131
    DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\
132 132
    put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src + stride, SIZE, stride);\
133 133
    put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src, SIZE, stride);\
134 134
    OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfH, halfV, stride, SIZE, SIZE);\
135 135
}\
136 136
\
137 137
static void OPNAME ## h264_qpel ## SIZE ## _mc33_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
138
    DECLARE_ALIGNED_16(uint8_t, halfH)[SIZE*SIZE];\
139
    DECLARE_ALIGNED_16(uint8_t, halfV)[SIZE*SIZE];\
138
    DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\
139
    DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\
140 140
    put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src + stride, SIZE, stride);\
141 141
    put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src+1, SIZE, stride);\
142 142
    OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfH, halfV, stride, SIZE, SIZE);\
143 143
}\
144 144
\
145 145
static void OPNAME ## h264_qpel ## SIZE ## _mc22_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
146
    DECLARE_ALIGNED_16(int16_t, tmp)[SIZE*(SIZE+8)];\
146
    DECLARE_ALIGNED(16, int16_t, tmp)[SIZE*(SIZE+8)];\
147 147
    OPNAME ## h264_qpel ## SIZE ## _hv_lowpass_ ## CODETYPE(dst, tmp, src, stride, SIZE, stride);\
148 148
}\
149 149
\
150 150
static void OPNAME ## h264_qpel ## SIZE ## _mc21_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
151
    DECLARE_ALIGNED_16(uint8_t, halfH)[SIZE*SIZE];\
152
    DECLARE_ALIGNED_16(uint8_t, halfHV)[SIZE*SIZE];\
153
    DECLARE_ALIGNED_16(int16_t, tmp)[SIZE*(SIZE+8)];\
151
    DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\
152
    DECLARE_ALIGNED(16, uint8_t, halfHV)[SIZE*SIZE];\
153
    DECLARE_ALIGNED(16, int16_t, tmp)[SIZE*(SIZE+8)];\
154 154
    put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src, SIZE, stride);\
155 155
    put_h264_qpel ## SIZE ## _hv_lowpass_ ## CODETYPE(halfHV, tmp, src, SIZE, SIZE, stride);\
156 156
    OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfH, halfHV, stride, SIZE, SIZE);\
157 157
}\
158 158
\
159 159
static void OPNAME ## h264_qpel ## SIZE ## _mc23_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
160
    DECLARE_ALIGNED_16(uint8_t, halfH)[SIZE*SIZE];\
161
    DECLARE_ALIGNED_16(uint8_t, halfHV)[SIZE*SIZE];\
162
    DECLARE_ALIGNED_16(int16_t, tmp)[SIZE*(SIZE+8)];\
160
    DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\
161
    DECLARE_ALIGNED(16, uint8_t, halfHV)[SIZE*SIZE];\
162
    DECLARE_ALIGNED(16, int16_t, tmp)[SIZE*(SIZE+8)];\
163 163
    put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src + stride, SIZE, stride);\
164 164
    put_h264_qpel ## SIZE ## _hv_lowpass_ ## CODETYPE(halfHV, tmp, src, SIZE, SIZE, stride);\
165 165
    OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfH, halfHV, stride, SIZE, SIZE);\
166 166
}\
167 167
\
168 168
static void OPNAME ## h264_qpel ## SIZE ## _mc12_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
169
    DECLARE_ALIGNED_16(uint8_t, halfV)[SIZE*SIZE];\
170
    DECLARE_ALIGNED_16(uint8_t, halfHV)[SIZE*SIZE];\
171
    DECLARE_ALIGNED_16(int16_t, tmp)[SIZE*(SIZE+8)];\
169
    DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\
170
    DECLARE_ALIGNED(16, uint8_t, halfHV)[SIZE*SIZE];\
171
    DECLARE_ALIGNED(16, int16_t, tmp)[SIZE*(SIZE+8)];\
172 172
    put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src, SIZE, stride);\
173 173
    put_h264_qpel ## SIZE ## _hv_lowpass_ ## CODETYPE(halfHV, tmp, src, SIZE, SIZE, stride);\
174 174
    OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfV, halfHV, stride, SIZE, SIZE);\
175 175
}\
176 176
\
177 177
static void OPNAME ## h264_qpel ## SIZE ## _mc32_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\
178
    DECLARE_ALIGNED_16(uint8_t, halfV)[SIZE*SIZE];\
179
    DECLARE_ALIGNED_16(uint8_t, halfHV)[SIZE*SIZE];\
180
    DECLARE_ALIGNED_16(int16_t, tmp)[SIZE*(SIZE+8)];\
178
    DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\
179
    DECLARE_ALIGNED(16, uint8_t, halfHV)[SIZE*SIZE];\
180
    DECLARE_ALIGNED(16, int16_t, tmp)[SIZE*(SIZE+8)];\
181 181
    put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src+1, SIZE, stride);\
182 182
    put_h264_qpel ## SIZE ## _hv_lowpass_ ## CODETYPE(halfHV, tmp, src, SIZE, SIZE, stride);\
183 183
    OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfV, halfHV, stride, SIZE, SIZE);\
......
480 480
    vec_s16 dc16;
481 481
    vec_u8 dcplus, dcminus, v0, v1, v2, v3, aligner;
482 482
    LOAD_ZERO;
483
    DECLARE_ALIGNED_16(int, dc);
483
    DECLARE_ALIGNED(16, int, dc);
484 484
    int i;
485 485

  
486 486
    dc = (block[0] + 32) >> 6;
......
590 590
static inline void write16x4(uint8_t *dst, int dst_stride,
591 591
                             register vec_u8 r0, register vec_u8 r1,
592 592
                             register vec_u8 r2, register vec_u8 r3) {
593
    DECLARE_ALIGNED_16(unsigned char, result)[64];
593
    DECLARE_ALIGNED(16, unsigned char, result)[64];
594 594
    uint32_t *src_int = (uint32_t *)result, *dst_int = (uint32_t *)dst;
595 595
    int int_dst_stride = dst_stride/4;
596 596

  
......
770 770
}
771 771

  
772 772
#define h264_loop_filter_luma_altivec(p2, p1, p0, q0, q1, q2, alpha, beta, tc0) {            \
773
    DECLARE_ALIGNED_16(unsigned char, temp)[16];                                             \
773
    DECLARE_ALIGNED(16, unsigned char, temp)[16];                                             \
774 774
    register vec_u8 alphavec;                                                              \
775 775
    register vec_u8 betavec;                                                               \
776 776
    register vec_u8 mask;                                                                  \
......
850 850
    vec_u8 vblock;
851 851
    vec_s16 vtemp, vweight, voffset, v0, v1;
852 852
    vec_u16 vlog2_denom;
853
    DECLARE_ALIGNED_16(int32_t, temp)[4];
853
    DECLARE_ALIGNED(16, int32_t, temp)[4];
854 854
    LOAD_ZERO;
855 855

  
856 856
    offset <<= log2_denom;
......
896 896
    vec_u8 vsrc, vdst;
897 897
    vec_s16 vtemp, vweights, vweightd, voffset, v0, v1, v2, v3;
898 898
    vec_u16 vlog2_denom;
899
    DECLARE_ALIGNED_16(int32_t, temp)[4];
899
    DECLARE_ALIGNED(16, int32_t, temp)[4];
900 900
    LOAD_ZERO;
901 901

  
902 902
    offset = ((offset + 1) | 1) << log2_denom;
libavcodec/ppc/h264_template_altivec.c
78 78
void PREFIX_h264_chroma_mc8_altivec(uint8_t * dst, uint8_t * src,
79 79
                                    int stride, int h, int x, int y) {
80 80
  POWERPC_PERF_DECLARE(PREFIX_h264_chroma_mc8_num, 1);
81
    DECLARE_ALIGNED_16(signed int, ABCD)[4] =
81
    DECLARE_ALIGNED(16, signed int, ABCD)[4] =
82 82
                        {((8 - x) * (8 - y)),
83 83
                         ((    x) * (8 - y)),
84 84
                         ((8 - x) * (    y)),
......
208 208

  
209 209
/* this code assume that stride % 16 == 0 */
210 210
void PREFIX_no_rnd_vc1_chroma_mc8_altivec(uint8_t * dst, uint8_t * src, int stride, int h, int x, int y) {
211
   DECLARE_ALIGNED_16(signed int, ABCD)[4] =
211
   DECLARE_ALIGNED(16, signed int, ABCD)[4] =
212 212
                        {((8 - x) * (8 - y)),
213 213
                         ((    x) * (8 - y)),
214 214
                         ((8 - x) * (    y)),
libavcodec/ppc/mpegvideo_altivec.c
506 506

  
507 507
    {
508 508
        register const vector signed short vczero = (const vector signed short)vec_splat_s16(0);
509
        DECLARE_ALIGNED_16(short, qmul8) = qmul;
510
        DECLARE_ALIGNED_16(short, qadd8) = qadd;
509
        DECLARE_ALIGNED(16, short, qmul8) = qmul;
510
        DECLARE_ALIGNED(16, short, qadd8) = qadd;
511 511
        register vector signed short blockv, qmulv, qaddv, nqaddv, temp1;
512 512
        register vector bool short blockv_null, blockv_neg;
513 513
        register short backup_0 = block[0];
libavcodec/qdm2.c
122 122
} FFTCoefficient;
123 123

  
124 124
typedef struct {
125
    DECLARE_ALIGNED_16(QDM2Complex, complex)[MPA_MAX_CHANNELS][256];
125
    DECLARE_ALIGNED(16, QDM2Complex, complex)[MPA_MAX_CHANNELS][256];
126 126
} QDM2FFT;
127 127

  
128 128
/**
......
172 172
    float output_buffer[1024];
173 173

  
174 174
    /// Synthesis filter
175
    DECLARE_ALIGNED_16(MPA_INT, synth_buf)[MPA_MAX_CHANNELS][512*2];
175
    DECLARE_ALIGNED(16, MPA_INT, synth_buf)[MPA_MAX_CHANNELS][512*2];
176 176
    int synth_buf_offset[MPA_MAX_CHANNELS];
177
    DECLARE_ALIGNED_16(int32_t, sb_samples)[MPA_MAX_CHANNELS][128][SBLIMIT];
177
    DECLARE_ALIGNED(16, int32_t, sb_samples)[MPA_MAX_CHANNELS][128][SBLIMIT];
178 178

  
179 179
    /// Mixed temporary data used in decoding
180 180
    float tone_level[MPA_MAX_CHANNELS][30][64];
libavcodec/rtjpeg.h
31 31
    uint8_t scan[64];
32 32
    uint32_t lquant[64];
33 33
    uint32_t cquant[64];
34
    DECLARE_ALIGNED_16(DCTELEM, block)[64];
34
    DECLARE_ALIGNED(16, DCTELEM, block)[64];
35 35
} RTJpegContext;
36 36

  
37 37
void rtjpeg_decode_init(RTJpegContext *c, DSPContext *dsp,
libavcodec/rv34.h
111 111
    int      *deblock_coefs; ///< deblock coefficients for each macroblock
112 112

  
113 113
    /** 8x8 block available flags (for MV prediction) */
114
    DECLARE_ALIGNED_8(uint32_t, avail_cache)[3*4];
114
    DECLARE_ALIGNED(8, uint32_t, avail_cache)[3*4];
115 115

  
116 116
    int (*parse_slice_header)(struct RV34DecContext *r, GetBitContext *gb, SliceInfo *si);
117 117
    int (*decode_mb_info)(struct RV34DecContext *r);
libavcodec/sipr.h
64 64

  
65 65
    float excitation[L_INTERPOL + PITCH_MAX + 2 * L_SUBFR_16k];
66 66

  
67
    DECLARE_ALIGNED_16(float, synth_buf)[LP_FILTER_ORDER + 5*SUBFR_SIZE + 6];
67
    DECLARE_ALIGNED(16, float, synth_buf)[LP_FILTER_ORDER + 5*SUBFR_SIZE + 6];
68 68

  
69 69
    float lsp_history[LP_FILTER_ORDER];
70 70
    float gain_mem;
libavcodec/sparc/simple_idct_vis.c
24 24

  
25 25
#include "libavcodec/dsputil.h"
26 26

  
27
static const DECLARE_ALIGNED_8(int16_t, coeffs)[28] = {
27
static const DECLARE_ALIGNED(8, int16_t, coeffs)[28] = {
28 28
    - 1259,- 1259,- 1259,- 1259,
29 29
    - 4989,- 4989,- 4989,- 4989,
30 30
    -11045,-11045,-11045,-11045,
......
33 33
     25080, 25080, 25080, 25080,
34 34
     12785, 12785, 12785, 12785
35 35
};
36
static const DECLARE_ALIGNED_8(uint16_t, scale)[4] = {
36
static const DECLARE_ALIGNED(8, uint16_t, scale)[4] = {
37 37
    65536>>6, 65536>>6, 65536>>6, 65536>>6
38 38
};
39
static const DECLARE_ALIGNED_8(uint16_t, rounder)[4] = {
39
static const DECLARE_ALIGNED(8, uint16_t, rounder)[4] = {
40 40
    1<<5, 1<<5, 1<<5, 1<<5
41 41
};
42
static const DECLARE_ALIGNED_8(uint16_t, expand)[4] = {
42
static const DECLARE_ALIGNED(8, uint16_t, expand)[4] = {
43 43
    1<<14, 1<<14, 1<<14, 1<<14
44 44
};
45 45

  
......
386 386

  
387 387
void ff_simple_idct_vis(DCTELEM *data) {
388 388
    int out1, out2, out3, out4;
389
    DECLARE_ALIGNED_8(int16_t, temp)[8*8];
389
    DECLARE_ALIGNED(8, int16_t, temp)[8*8];
390 390

  
391 391
    __asm__ volatile(
392 392
        INIT_IDCT
libavcodec/vorbis_data.c
44 44
    0
45 45
};
46 46

  
47
DECLARE_ALIGNED_16(static const float, vwin64)[32] = {
47
DECLARE_ALIGNED(16, static const float, vwin64)[32] = {
48 48
    0.0009460463F, 0.0085006468F, 0.0235352254F, 0.0458950567F,
49 49
    0.0753351908F, 0.1115073077F, 0.1539457973F, 0.2020557475F,
50 50
    0.2551056759F, 0.3122276645F, 0.3724270287F, 0.4346027792F,
......
55 55
    0.9989462667F, 0.9997230082F, 0.9999638688F, 0.9999995525F,
56 56
};
57 57

  
58
DECLARE_ALIGNED_16(static const float, vwin128)[64] = {
58
DECLARE_ALIGNED(16, static const float, vwin128)[64] = {
59 59
    0.0002365472F, 0.0021280687F, 0.0059065254F, 0.0115626550F,
60 60
    0.0190823442F, 0.0284463735F, 0.0396300935F, 0.0526030430F,
61 61
    0.0673285281F, 0.0837631763F, 0.1018564887F, 0.1215504095F,
......
74 74
    0.9999331503F, 0.9999825563F, 0.9999977357F, 0.9999999720F,
75 75
};
76 76

  
77
DECLARE_ALIGNED_16(static const float, vwin256)[128] = {
77
DECLARE_ALIGNED(16, static const float, vwin256)[128] = {
78 78
    0.0000591390F, 0.0005321979F, 0.0014780301F, 0.0028960636F,
79 79
    0.0047854363F, 0.0071449926F, 0.0099732775F, 0.0132685298F,
80 80
    0.0170286741F, 0.0212513119F, 0.0259337111F, 0.0310727950F,
......
109 109
    0.9999958064F, 0.9999989077F, 0.9999998584F, 0.9999999983F,
110 110
};
111 111

  
112
DECLARE_ALIGNED_16(static const float, vwin512)[256] = {
112
DECLARE_ALIGNED(16, static const float, vwin512)[256] = {
113 113
    0.0000147849F, 0.0001330607F, 0.0003695946F, 0.0007243509F,
114 114
    0.0011972759F, 0.0017882983F, 0.0024973285F, 0.0033242588F,
115 115
    0.0042689632F, 0.0053312973F, 0.0065110982F, 0.0078081841F,
......
176 176
    0.9999997377F, 0.9999999317F, 0.9999999911F, 0.9999999999F,
177 177
};
178 178

  
179
DECLARE_ALIGNED_16(static const float, vwin1024)[512] = {
179
DECLARE_ALIGNED(16, static const float, vwin1024)[512] = {
180 180
    0.0000036962F, 0.0000332659F, 0.0000924041F, 0.0001811086F,
181 181
    0.0002993761F, 0.0004472021F, 0.0006245811F, 0.0008315063F,
182 182
    0.0010679699F, 0.0013339631F, 0.0016294757F, 0.0019544965F,
......
307 307
    0.9999999836F, 0.9999999957F, 0.9999999994F, 1.0000000000F,
308 308
};
309 309

  
310
DECLARE_ALIGNED_16(static const float, vwin2048)[1024] = {
310
DECLARE_ALIGNED(16, static const float, vwin2048)[1024] = {
311 311
    0.0000009241F, 0.0000083165F, 0.0000231014F, 0.0000452785F,
312 312
    0.0000748476F, 0.0001118085F, 0.0001561608F, 0.0002079041F,
313 313
    0.0002670379F, 0.0003335617F, 0.0004074748F, 0.0004887765F,
......
566 566
    0.9999999990F, 0.9999999997F, 1.0000000000F, 1.0000000000F,
567 567
};
568 568

  
569
DECLARE_ALIGNED_16(static const float, vwin4096)[2048] = {
569
DECLARE_ALIGNED(16, static const float, vwin4096)[2048] = {
570 570
    0.0000002310F, 0.0000020791F, 0.0000057754F, 0.0000113197F,
571 571
    0.0000187121F, 0.0000279526F, 0.0000390412F, 0.0000519777F,
572 572
    0.0000667623F, 0.0000833949F, 0.0001018753F, 0.0001222036F,
......
1081 1081
    0.9999999999F, 1.0000000000F, 1.0000000000F, 1.0000000000F,
1082 1082
};
1083 1083

  
1084
DECLARE_ALIGNED_16(static const float, vwin8192)[4096] = {
1084
DECLARE_ALIGNED(16, static const float, vwin8192)[4096] = {
1085 1085
    0.0000000578F, 0.0000005198F, 0.0000014438F, 0.0000028299F,
1086 1086
    0.0000046780F, 0.0000069882F, 0.0000097604F, 0.0000129945F,
1087 1087
    0.0000166908F, 0.0000208490F, 0.0000254692F, 0.0000305515F,
libavcodec/vp3.c
221 221

  
222 222
    /* these arrays need to be on 16-byte boundaries since SSE2 operations
223 223
     * index into them */
224
    DECLARE_ALIGNED_16(int16_t, qmat)[3][2][3][64];     //<qmat[qpi][is_inter][plane]
224
    DECLARE_ALIGNED(16, int16_t, qmat)[3][2][3][64];     //<qmat[qpi][is_inter][plane]
225 225

  
226 226
    /* This table contains superblock_count * 16 entries. Each set of 16
227 227
     * numbers corresponds to the fragment indexes 0..15 of the superblock.
......
244 244
    uint16_t huffman_table[80][32][2];
245 245

  
246 246
    uint8_t filter_limit_values[64];
247
    DECLARE_ALIGNED_8(int, bounding_values_array)[256+2];
247
    DECLARE_ALIGNED(8, int, bounding_values_array)[256+2];
248 248
} Vp3DecodeContext;
249 249

  
250 250
/************************************************************************
libavcodec/vp56.h
121 121
    /* blocks / macroblock */
122 122
    VP56mb mb_type;
123 123
    VP56Macroblock *macroblocks;
124
    DECLARE_ALIGNED_16(DCTELEM, block_coeff)[6][64];
124
    DECLARE_ALIGNED(16, DCTELEM, block_coeff)[6][64];
125 125

  
126 126
    /* motion vectors */
127 127
    VP56mv mv[6];  /* vectors for each block in MB */
libavcodec/wma.h
111 111
    uint8_t ms_stereo;                      ///< true if mid/side stereo mode
112 112
    uint8_t channel_coded[MAX_CHANNELS];    ///< true if channel is coded
113 113
    int exponents_bsize[MAX_CHANNELS];      ///< log2 ratio frame/exp. length
114
    DECLARE_ALIGNED_16(float, exponents)[MAX_CHANNELS][BLOCK_MAX_SIZE];
114
    DECLARE_ALIGNED(16, float, exponents)[MAX_CHANNELS][BLOCK_MAX_SIZE];
115 115
    float max_exponent[MAX_CHANNELS];
116 116
    WMACoef coefs1[MAX_CHANNELS][BLOCK_MAX_SIZE];
117
    DECLARE_ALIGNED_16(float, coefs)[MAX_CHANNELS][BLOCK_MAX_SIZE];
118
    DECLARE_ALIGNED_16(FFTSample, output)[BLOCK_MAX_SIZE * 2];
117
    DECLARE_ALIGNED(16, float, coefs)[MAX_CHANNELS][BLOCK_MAX_SIZE];
118
    DECLARE_ALIGNED(16, FFTSample, output)[BLOCK_MAX_SIZE * 2];
119 119
    FFTContext mdct_ctx[BLOCK_NB_SIZES];
120 120
    float *windows[BLOCK_NB_SIZES];
121 121
    /* output buffer for one frame and the last for IMDCT windowing */
122
    DECLARE_ALIGNED_16(float, frame_out)[MAX_CHANNELS][BLOCK_MAX_SIZE * 2];
122
    DECLARE_ALIGNED(16, float, frame_out)[MAX_CHANNELS][BLOCK_MAX_SIZE * 2];
123 123
    /* last frame info */
124 124
    uint8_t last_superframe[MAX_CODED_SUPERFRAME_SIZE + 4]; /* padding added */
125 125
    int last_bitoffset;
libavcodec/wmaprodec.c
142 142
    int*     scale_factors;                           ///< pointer to the scale factor values used for decoding
143 143
    uint8_t  table_idx;                               ///< index in sf_offsets for the scale factor reference block
144 144
    float*   coeffs;                                  ///< pointer to the subframe decode buffer
145
    DECLARE_ALIGNED_16(float, out)[WMAPRO_BLOCK_MAX_SIZE + WMAPRO_BLOCK_MAX_SIZE / 2]; ///< output buffer
145
    DECLARE_ALIGNED(16, float, out)[WMAPRO_BLOCK_MAX_SIZE + WMAPRO_BLOCK_MAX_SIZE / 2]; ///< output buffer
146 146
} WMAProChannelCtx;
147 147

  
148 148
/**
......
167 167
                      FF_INPUT_BUFFER_PADDING_SIZE];///< compressed frame data
168 168
    PutBitContext    pb;                            ///< context for filling the frame_data buffer
169 169
    FFTContext       mdct_ctx[WMAPRO_BLOCK_SIZES];  ///< MDCT context per block size
170
    DECLARE_ALIGNED_16(float, tmp)[WMAPRO_BLOCK_MAX_SIZE]; ///< IMDCT output buffer
170
    DECLARE_ALIGNED(16, float, tmp)[WMAPRO_BLOCK_MAX_SIZE]; ///< IMDCT output buffer
171 171
    float*           windows[WMAPRO_BLOCK_SIZES];   ///< windows for the different block sizes
172 172

  
173 173
    /* frame size dependent frame information (set during initialization) */
libavcodec/wmv2.h
50 50
    int hshift;
51 51

  
52 52
    ScanTable abt_scantable[2];
53
    DECLARE_ALIGNED_16(DCTELEM, abt_block2)[6][64];
53
    DECLARE_ALIGNED(16, DCTELEM, abt_block2)[6][64];
54 54
}Wmv2Context;
55 55

  
56 56
void ff_wmv2_common_init(Wmv2Context * w);
libavcodec/x86/cavsdsp_mmx.c
113 113
static void cavs_idct8_add_mmx(uint8_t *dst, int16_t *block, int stride)
114 114
{
115 115
    int i;
116
    DECLARE_ALIGNED_8(int16_t, b2)[64];
116
    DECLARE_ALIGNED(8, int16_t, b2)[64];
117 117

  
118 118
    for(i=0; i<2; i++){
119
        DECLARE_ALIGNED_8(uint64_t, tmp);
119
        DECLARE_ALIGNED(8, uint64_t, tmp);
120 120

  
121 121
        cavs_idct8_1d(block+4*i, ff_pw_4);
122 122

  
libavcodec/x86/dsputil_h264_template_mmx.c
27 27
 */
28 28
static void H264_CHROMA_MC8_TMPL(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y, const uint64_t *rnd_reg)
29 29
{
30
    DECLARE_ALIGNED_8(uint64_t, AA);
31
    DECLARE_ALIGNED_8(uint64_t, DD);
30
    DECLARE_ALIGNED(8, uint64_t, AA);
31
    DECLARE_ALIGNED(8, uint64_t, DD);
32 32
    int i;
33 33

  
34 34
    if(y==0 && x==0) {
libavcodec/x86/dsputil_mmx.c
39 39
int mm_flags; /* multimedia extension flags */
40 40

  
41 41
/* pixel operations */
42
DECLARE_ALIGNED_8 (const uint64_t, ff_bone) = 0x0101010101010101ULL;
43
DECLARE_ALIGNED_8 (const uint64_t, ff_wtwo) = 0x0002000200020002ULL;
42
DECLARE_ALIGNED(8,  const uint64_t, ff_bone) = 0x0101010101010101ULL;
43
DECLARE_ALIGNED(8,  const uint64_t, ff_wtwo) = 0x0002000200020002ULL;
44 44

  
45
DECLARE_ALIGNED_16(const uint64_t, ff_pdw_80000000)[2] =
45
DECLARE_ALIGNED(16, const uint64_t, ff_pdw_80000000)[2] =
46 46
{0x8000000080000000ULL, 0x8000000080000000ULL};
47 47

  
48
DECLARE_ALIGNED_8 (const uint64_t, ff_pw_3  ) = 0x0003000300030003ULL;
49
DECLARE_ALIGNED_8 (const uint64_t, ff_pw_4  ) = 0x0004000400040004ULL;
50
DECLARE_ALIGNED_16(const xmm_reg,  ff_pw_5  ) = {0x0005000500050005ULL, 0x0005000500050005ULL};
51
DECLARE_ALIGNED_16(const xmm_reg,  ff_pw_8  ) = {0x0008000800080008ULL, 0x0008000800080008ULL};
52
DECLARE_ALIGNED_8 (const uint64_t, ff_pw_15 ) = 0x000F000F000F000FULL;
53
DECLARE_ALIGNED_16(const xmm_reg,  ff_pw_16 ) = {0x0010001000100010ULL, 0x0010001000100010ULL};
54
DECLARE_ALIGNED_8 (const uint64_t, ff_pw_20 ) = 0x0014001400140014ULL;
55
DECLARE_ALIGNED_16(const xmm_reg,  ff_pw_28 ) = {0x001C001C001C001CULL, 0x001C001C001C001CULL};
56
DECLARE_ALIGNED_16(const xmm_reg,  ff_pw_32 ) = {0x0020002000200020ULL, 0x0020002000200020ULL};
57
DECLARE_ALIGNED_8 (const uint64_t, ff_pw_42 ) = 0x002A002A002A002AULL;
58
DECLARE_ALIGNED_16(const xmm_reg,  ff_pw_64 ) = {0x0040004000400040ULL, 0x0040004000400040ULL};
59
DECLARE_ALIGNED_8 (const uint64_t, ff_pw_96 ) = 0x0060006000600060ULL;
60
DECLARE_ALIGNED_8 (const uint64_t, ff_pw_128) = 0x0080008000800080ULL;
61
DECLARE_ALIGNED_8 (const uint64_t, ff_pw_255) = 0x00ff00ff00ff00ffULL;
62

  
63
DECLARE_ALIGNED_8 (const uint64_t, ff_pb_1  ) = 0x0101010101010101ULL;
64
DECLARE_ALIGNED_8 (const uint64_t, ff_pb_3  ) = 0x0303030303030303ULL;
65
DECLARE_ALIGNED_8 (const uint64_t, ff_pb_7  ) = 0x0707070707070707ULL;
66
DECLARE_ALIGNED_8 (const uint64_t, ff_pb_1F ) = 0x1F1F1F1F1F1F1F1FULL;
67
DECLARE_ALIGNED_8 (const uint64_t, ff_pb_3F ) = 0x3F3F3F3F3F3F3F3FULL;
68
DECLARE_ALIGNED_8 (const uint64_t, ff_pb_81 ) = 0x8181818181818181ULL;
69
DECLARE_ALIGNED_8 (const uint64_t, ff_pb_A1 ) = 0xA1A1A1A1A1A1A1A1ULL;
70
DECLARE_ALIGNED_8 (const uint64_t, ff_pb_FC ) = 0xFCFCFCFCFCFCFCFCULL;
71

  
72
DECLARE_ALIGNED_16(const double, ff_pd_1)[2] = { 1.0, 1.0 };
73
DECLARE_ALIGNED_16(const double, ff_pd_2)[2] = { 2.0, 2.0 };
48
DECLARE_ALIGNED(8,  const uint64_t, ff_pw_3  ) = 0x0003000300030003ULL;
49
DECLARE_ALIGNED(8,  const uint64_t, ff_pw_4  ) = 0x0004000400040004ULL;
50
DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_5  ) = {0x0005000500050005ULL, 0x0005000500050005ULL};
51
DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_8  ) = {0x0008000800080008ULL, 0x0008000800080008ULL};
52
DECLARE_ALIGNED(8,  const uint64_t, ff_pw_15 ) = 0x000F000F000F000FULL;
53
DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_16 ) = {0x0010001000100010ULL, 0x0010001000100010ULL};
54
DECLARE_ALIGNED(8,  const uint64_t, ff_pw_20 ) = 0x0014001400140014ULL;
55
DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_28 ) = {0x001C001C001C001CULL, 0x001C001C001C001CULL};
56
DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_32 ) = {0x0020002000200020ULL, 0x0020002000200020ULL};
57
DECLARE_ALIGNED(8,  const uint64_t, ff_pw_42 ) = 0x002A002A002A002AULL;
58
DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_64 ) = {0x0040004000400040ULL, 0x0040004000400040ULL};
59
DECLARE_ALIGNED(8,  const uint64_t, ff_pw_96 ) = 0x0060006000600060ULL;
60
DECLARE_ALIGNED(8,  const uint64_t, ff_pw_128) = 0x0080008000800080ULL;
61
DECLARE_ALIGNED(8,  const uint64_t, ff_pw_255) = 0x00ff00ff00ff00ffULL;
62

  
63
DECLARE_ALIGNED(8,  const uint64_t, ff_pb_1  ) = 0x0101010101010101ULL;
64
DECLARE_ALIGNED(8,  const uint64_t, ff_pb_3  ) = 0x0303030303030303ULL;
65
DECLARE_ALIGNED(8,  const uint64_t, ff_pb_7  ) = 0x0707070707070707ULL;
66
DECLARE_ALIGNED(8,  const uint64_t, ff_pb_1F ) = 0x1F1F1F1F1F1F1F1FULL;
67
DECLARE_ALIGNED(8,  const uint64_t, ff_pb_3F ) = 0x3F3F3F3F3F3F3F3FULL;
68
DECLARE_ALIGNED(8,  const uint64_t, ff_pb_81 ) = 0x8181818181818181ULL;
69
DECLARE_ALIGNED(8,  const uint64_t, ff_pb_A1 ) = 0xA1A1A1A1A1A1A1A1ULL;
70
DECLARE_ALIGNED(8,  const uint64_t, ff_pb_FC ) = 0xFCFCFCFCFCFCFCFCULL;
71

  
72
DECLARE_ALIGNED(16, const double, ff_pd_1)[2] = { 1.0, 1.0 };
73
DECLARE_ALIGNED(16, const double, ff_pd_2)[2] = { 2.0, 2.0 };
74 74

  
75 75
#define JUMPALIGN() __asm__ volatile (ASMALIGN(3)::)
76 76
#define MOVQ_ZERO(regd)  __asm__ volatile ("pxor %%" #regd ", %%" #regd ::)
......
2026 2026
    } else if(in_ch == 5 && out_ch == 1 && matrix_cmp[0][0]==matrix_cmp[2][0] && matrix_cmp[3][0]==matrix_cmp[4][0]) {
2027 2027
        MIX5(IF1,IF0);
2028 2028
    } else {
2029
        DECLARE_ALIGNED_16(float, matrix_simd)[in_ch][2][4];
2029
        DECLARE_ALIGNED(16, float, matrix_simd)[in_ch][2][4];
2030 2030
        j = 2*in_ch*sizeof(float);
2031 2031
        __asm__ volatile(
2032 2032
            "1: \n"
......
2413 2413
#define FLOAT_TO_INT16_INTERLEAVE(cpu, body) \
2414 2414
/* gcc pessimizes register allocation if this is in the same function as float_to_int16_interleave_sse2*/\
2415 2415
static av_noinline void float_to_int16_interleave_misc_##cpu(int16_t *dst, const float **src, long len, int channels){\
2416
    DECLARE_ALIGNED_16(int16_t, tmp)[len];\
2416
    DECLARE_ALIGNED(16, int16_t, tmp)[len];\
2417 2417
    int i,j,c;\
2418 2418
    for(c=0; c<channels; c++){\
2419 2419
        float_to_int16_##cpu(tmp, src[c], len);\
libavcodec/x86/dsputilenc_mmx.c
1063 1063

  
1064 1064
#define HADAMARD8_DIFF_MMX(cpu) \
1065 1065
static int hadamard8_diff_##cpu(void *s, uint8_t *src1, uint8_t *src2, int stride, int h){\
1066
    DECLARE_ALIGNED_8(uint64_t, temp)[13];\
1066
    DECLARE_ALIGNED(8, uint64_t, temp)[13];\
1067 1067
    int sum;\
1068 1068
\
1069 1069
    assert(h==8);\
......
1146 1146

  
1147 1147
#define HADAMARD8_DIFF_SSE2(cpu) \
1148 1148
static int hadamard8_diff_##cpu(void *s, uint8_t *src1, uint8_t *src2, int stride, int h){\
1149
    DECLARE_ALIGNED_16(uint64_t, temp)[4];\
1149
    DECLARE_ALIGNED(16, uint64_t, temp)[4];\
1150 1150
    int sum;\
1151 1151
\
1152 1152
    assert(h==8);\
libavcodec/x86/fft_3dn2.c
23 23
#include "libavcodec/dsputil.h"
24 24
#include "fft.h"
25 25

  
26
DECLARE_ALIGNED_8(static const int, m1m1)[2] = { 1<<31, 1<<31 };
26
DECLARE_ALIGNED(8, static const int, m1m1)[2] = { 1<<31, 1<<31 };
27 27

  
28 28
#ifdef EMULATE_3DNOWEXT
29 29
#define PSWAPD(s,d)\
libavcodec/x86/h264dsp_mmx.c
20 20

  
21 21
#include "dsputil_mmx.h"
22 22

  
23
DECLARE_ALIGNED_8 (static const uint64_t, ff_pb_3_1  ) = 0x0103010301030103ULL;
24
DECLARE_ALIGNED_8 (static const uint64_t, ff_pb_7_3  ) = 0x0307030703070307ULL;
23
DECLARE_ALIGNED(8, static const uint64_t, ff_pb_3_1  ) = 0x0103010301030103ULL;
24
DECLARE_ALIGNED(8, static const uint64_t, ff_pb_7_3  ) = 0x0307030703070307ULL;
25 25

  
26 26
/***********************************/
27 27
/* IDCT */
......
157 157
static void ff_h264_idct8_add_mmx(uint8_t *dst, int16_t *block, int stride)
158 158
{
159 159
    int i;
160
    DECLARE_ALIGNED_8(int16_t, b2)[64];
160
    DECLARE_ALIGNED(8, int16_t, b2)[64];
161 161

  
162 162
    block[0] += 32;
163 163

  
164 164
    for(i=0; i<2; i++){
165
        DECLARE_ALIGNED_8(uint64_t, tmp);
165
        DECLARE_ALIGNED(8, uint64_t, tmp);
166 166

  
167 167
        h264_idct8_1d(block+4*i);
168 168

  
......
628 628

  
629 629
static inline void h264_loop_filter_luma_mmx2(uint8_t *pix, int stride, int alpha1, int beta1, int8_t *tc0)
630 630
{
631
    DECLARE_ALIGNED_8(uint64_t, tmp0)[2];
631
    DECLARE_ALIGNED(8, uint64_t, tmp0)[2];
632 632

  
633 633
    __asm__ volatile(
634 634
        "movq    (%2,%4), %%mm0    \n\t" //p1
......
690 690
{
691 691
    //FIXME: could cut some load/stores by merging transpose with filter
692 692
    // also, it only needs to transpose 6x8
693
    DECLARE_ALIGNED_8(uint8_t, trans)[8*8];
693
    DECLARE_ALIGNED(8, uint8_t, trans)[8*8];
694 694
    int i;
695 695
    for(i=0; i<2; i++, pix+=8*stride, tc0+=2) {
696 696
        if((tc0[0] & tc0[1]) < 0)
......
734 734
static void h264_h_loop_filter_chroma_mmx2(uint8_t *pix, int stride, int alpha, int beta, int8_t *tc0)
735 735
{
736 736
    //FIXME: could cut some load/stores by merging transpose with filter
737
    DECLARE_ALIGNED_8(uint8_t, trans)[8*4];
737
    DECLARE_ALIGNED(8, uint8_t, trans)[8*4];
738 738
    transpose4x4(trans, pix-2, 8, stride);
739 739
    transpose4x4(trans+4, pix-2+4*stride, 8, stride);
740 740
    h264_loop_filter_chroma_mmx2(trans+2*8, 8, alpha-1, beta-1, tc0);
......
784 784
static void h264_h_loop_filter_chroma_intra_mmx2(uint8_t *pix, int stride, int alpha, int beta)
785 785
{
786 786
    //FIXME: could cut some load/stores by merging transpose with filter
787
    DECLARE_ALIGNED_8(uint8_t, trans)[8*4];
787
    DECLARE_ALIGNED(8, uint8_t, trans)[8*4];
788 788
    transpose4x4(trans, pix-2, 8, stride);
789 789
    transpose4x4(trans+4, pix-2+4*stride, 8, stride);
790 790
    h264_loop_filter_chroma_intra_mmx2(trans+2*8, 8, alpha-1, beta-1);
......
815 815
    for( dir=1; dir>=0; dir-- ) {
816 816
        const x86_reg d_idx = dir ? -8 : -1;
817 817
        const int mask_mv = dir ? mask_mv1 : mask_mv0;
818
        DECLARE_ALIGNED_8(const uint64_t, mask_dir) = dir ? 0 : 0xffffffffffffffffULL;
818
        DECLARE_ALIGNED(8, const uint64_t, mask_dir) = dir ? 0 : 0xffffffffffffffffULL;
819 819
        int b_idx, edge;
820 820
        for( b_idx=12, edge=0; edge<edges; edge+=step, b_idx+=8*step ) {
821 821
            __asm__ volatile(
......
2106 2106
#endif
2107 2107

  
2108 2108
/* rnd interleaved with rnd div 8, use p+1 to access rnd div 8 */
2109
DECLARE_ALIGNED_8(static const uint64_t, h264_rnd_reg)[4] = {
2109
DECLARE_ALIGNED(8, static const uint64_t, h264_rnd_reg)[4] = {
2110 2110
    0x0020002000200020ULL, 0x0004000400040004ULL, 0x001C001C001C001CULL, 0x0003000300030003ULL
2111 2111
};
2112 2112

  
libavcodec/x86/mpegvideo_mmx_template.c
98 98
    x86_reg last_non_zero_p1;
99 99
    int level=0, q; //=0 is because gcc says uninitialized ...
100 100
    const uint16_t *qmat, *bias;
101
    DECLARE_ALIGNED_16(int16_t, temp_block)[64];
101
    DECLARE_ALIGNED(16, int16_t, temp_block)[64];
102 102

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

  
libavcodec/x86/rv40dsp_mmx.c
24 24
#include "dsputil_mmx.h"
25 25

  
26 26
/* bias interleaved with bias div 8, use p+1 to access bias div 8 */
27
DECLARE_ALIGNED_8(static const uint64_t, rv40_bias_reg)[4][8] = {
27
DECLARE_ALIGNED(8, static const uint64_t, rv40_bias_reg)[4][8] = {
28 28
    { 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0010001000100010ULL, 0x0002000200020002ULL,
29 29
      0x0020002000200020ULL, 0x0004000400040004ULL, 0x0010001000100010ULL, 0x0002000200020002ULL },
30 30
    { 0x0020002000200020ULL, 0x0004000400040004ULL, 0x001C001C001C001CULL, 0x0003000300030003ULL,
libavcodec/x86/snowdsp_mmx.c
25 25

  
26 26
void ff_snow_horizontal_compose97i_sse2(IDWTELEM *b, int width){
27 27
    const int w2= (width+1)>>1;
28
    DECLARE_ALIGNED_16(IDWTELEM, temp)[width>>1];
28
    DECLARE_ALIGNED(16, IDWTELEM, temp)[width>>1];
29 29
    const int w_l= (width>>1);
30 30
    const int w_r= w2 - 1;
31 31
    int i;
libavcodec/x86/vc1dsp_mmx.c
73 73
    "movq      %%mm"#R1", "#OFF"(%1)   \n\t"    \
74 74
    "add       %2, %0                  \n\t"
75 75

  
76
DECLARE_ALIGNED_16(const uint64_t, ff_pw_9) = 0x0009000900090009ULL;
76
DECLARE_ALIGNED(16, const uint64_t, ff_pw_9) = 0x0009000900090009ULL;
77 77

  
78 78
/** Sacrifying mm6 allows to pipeline loads from src */
79 79
static void vc1_put_ver_16b_shift2_mmx(int16_t *dst,
......
442 442
            static const int shift_value[] = { 0, 5, 1, 5 };\
443 443
            int              shift = (shift_value[hmode]+shift_value[vmode])>>1;\
444 444
            int              r;\
445
            DECLARE_ALIGNED_16(int16_t, tmp)[12*8];\
445
            DECLARE_ALIGNED(16, int16_t, tmp)[12*8];\
446 446
\
447 447
            r = (1<<(shift-1)) + rnd-1;\
448 448
            vc1_put_shift_ver_16bits[vmode](tmp, src-1, stride, r, shift);\
libavcodec/x86/vp3dsp_sse2.c
26 26
#include "libavcodec/dsputil.h"
27 27
#include "dsputil_mmx.h"
28 28

  
29
DECLARE_ALIGNED_16(const uint16_t, ff_vp3_idct_data)[7 * 8] =
29
DECLARE_ALIGNED(16, const uint16_t, ff_vp3_idct_data)[7 * 8] =
30 30
{
31 31
    64277,64277,64277,64277,64277,64277,64277,64277,
32 32
    60547,60547,60547,60547,60547,60547,60547,60547,
libavutil/mem.h
49 49
    #define DECLARE_ASM_CONST(n,t,v)    static const t v
50 50
#endif
51 51

  
52
#define DECLARE_ALIGNED_16(t, v) DECLARE_ALIGNED(16, t, v)
53
#define DECLARE_ALIGNED_8(t, v)  DECLARE_ALIGNED(8, t, v)
54

  
55 52
#if AV_GCC_VERSION_AT_LEAST(3,1)
56 53
    #define av_malloc_attrib __attribute__((__malloc__))
57 54
#else

Also available in: Unified diff