From 84dc2d8afa1fce31c6fe97149ef70ba966500f65 Mon Sep 17 00:00:00 2001 From: =?utf8?q?M=C3=A5ns=20Rullg=C3=A5rd?= Date: Sat, 6 Mar 2010 14:24:59 +0000 Subject: [PATCH] Remove DECLARE_ALIGNED_{8,16} macros These macros are redundant. All uses are replaced with the generic DECLARE_ALIGNED macro instead. Originally committed as revision 22233 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/4xm.c | 2 +- libavcodec/aac.h | 8 ++-- libavcodec/aacenc.h | 6 +-- libavcodec/aactab.c | 12 +++--- libavcodec/ac3dec.h | 12 +++--- libavcodec/asv1.c | 2 +- libavcodec/atrac1.c | 20 +++++----- libavcodec/atrac3.c | 6 +-- libavcodec/bink.c | 4 +- libavcodec/binkaudio.c | 4 +- libavcodec/cavs.h | 2 +- libavcodec/cook.c | 2 +- libavcodec/dca.c | 6 +-- libavcodec/dnxhddec.c | 2 +- libavcodec/dnxhdenc.h | 2 +- libavcodec/dsputil.c | 4 +- libavcodec/dsputil.h | 10 ++--- libavcodec/eamad.c | 2 +- libavcodec/eatgq.c | 2 +- libavcodec/eatqi.c | 2 +- libavcodec/h264.h | 12 +++--- libavcodec/h264_loopfilter.c | 8 ++-- libavcodec/imc.c | 4 +- libavcodec/mdec.c | 2 +- libavcodec/mimic.c | 2 +- libavcodec/mjpegdec.h | 2 +- libavcodec/mpc.h | 4 +- libavcodec/mpegaudio.h | 4 +- libavcodec/mpegaudiodec.c | 2 +- libavcodec/nellymoserdec.c | 4 +- libavcodec/nellymoserenc.c | 6 +-- libavcodec/ppc/gmc_altivec.c | 4 +- libavcodec/ppc/h264_altivec.c | 60 ++++++++++++++--------------- libavcodec/ppc/h264_template_altivec.c | 4 +- libavcodec/ppc/mpegvideo_altivec.c | 4 +- libavcodec/qdm2.c | 6 +-- libavcodec/rtjpeg.h | 2 +- libavcodec/rv34.h | 2 +- libavcodec/sipr.h | 2 +- libavcodec/sparc/simple_idct_vis.c | 10 ++--- libavcodec/vorbis_data.c | 16 ++++---- libavcodec/vp3.c | 4 +- libavcodec/vp56.h | 2 +- libavcodec/wma.h | 8 ++-- libavcodec/wmaprodec.c | 4 +- libavcodec/wmv2.h | 2 +- libavcodec/x86/cavsdsp_mmx.c | 4 +- libavcodec/x86/dsputil_h264_template_mmx.c | 4 +- libavcodec/x86/dsputil_mmx.c | 62 +++++++++++++++--------------- libavcodec/x86/dsputilenc_mmx.c | 4 +- libavcodec/x86/fft_3dn2.c | 2 +- libavcodec/x86/h264dsp_mmx.c | 20 +++++----- libavcodec/x86/mpegvideo_mmx_template.c | 2 +- libavcodec/x86/rv40dsp_mmx.c | 2 +- libavcodec/x86/snowdsp_mmx.c | 2 +- libavcodec/x86/vc1dsp_mmx.c | 4 +- libavcodec/x86/vp3dsp_sse2.c | 2 +- libavutil/mem.h | 3 -- 58 files changed, 199 insertions(+), 202 deletions(-) diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c index bf3c07e..92ff9f6 100644 --- a/libavcodec/4xm.c +++ b/libavcodec/4xm.c @@ -137,7 +137,7 @@ typedef struct FourXContext{ int mv[256]; VLC pre_vlc; int last_dc; - DECLARE_ALIGNED_16(DCTELEM, block)[6][64]; + DECLARE_ALIGNED(16, DCTELEM, block)[6][64]; void *bitstream_buffer; unsigned int bitstream_buffer_size; int version; diff --git a/libavcodec/aac.h b/libavcodec/aac.h index d95e588..f123d9f 100644 --- a/libavcodec/aac.h +++ b/libavcodec/aac.h @@ -214,9 +214,9 @@ typedef struct { float sf[120]; ///< scalefactors int sf_idx[128]; ///< scalefactor indices (used by encoder) uint8_t zeroes[128]; ///< band is not coded (used by encoder) - DECLARE_ALIGNED_16(float, coeffs)[1024]; ///< coefficients for IMDCT - DECLARE_ALIGNED_16(float, saved)[1024]; ///< overlap - DECLARE_ALIGNED_16(float, ret)[1024]; ///< PCM output + DECLARE_ALIGNED(16, float, coeffs)[1024]; ///< coefficients for IMDCT + DECLARE_ALIGNED(16, float, saved)[1024]; ///< overlap + DECLARE_ALIGNED(16, float, ret)[1024]; ///< PCM output PredictorState predictor_state[MAX_PREDICTORS]; } SingleChannelElement; @@ -261,7 +261,7 @@ typedef struct { * @defgroup temporary aligned temporary buffers (We do not want to have these on the stack.) * @{ */ - DECLARE_ALIGNED_16(float, buf_mdct)[1024]; + DECLARE_ALIGNED(16, float, buf_mdct)[1024]; /** @} */ /** diff --git a/libavcodec/aacenc.h b/libavcodec/aacenc.h index 9186108..e99be98 100644 --- a/libavcodec/aacenc.h +++ b/libavcodec/aacenc.h @@ -52,7 +52,7 @@ typedef struct AACEncContext { FFTContext mdct1024; ///< long (1024 samples) frame transform context FFTContext mdct128; ///< short (128 samples) frame transform context DSPContext dsp; - DECLARE_ALIGNED_16(FFTSample, output)[2048]; ///< temporary buffer for MDCT input coefficients + DECLARE_ALIGNED(16, FFTSample, output)[2048]; ///< temporary buffer for MDCT input coefficients int16_t* samples; ///< saved preprocessed input int samplerate_index; ///< MPEG-4 samplerate index @@ -64,8 +64,8 @@ typedef struct AACEncContext { int cur_channel; int last_frame; float lambda; - DECLARE_ALIGNED_16(int, qcoefs)[96][2]; ///< quantized coefficients - DECLARE_ALIGNED_16(float, scoefs)[1024]; ///< scaled coefficients + DECLARE_ALIGNED(16, int, qcoefs)[96][2]; ///< quantized coefficients + DECLARE_ALIGNED(16, float, scoefs)[1024]; ///< scaled coefficients } AACEncContext; #endif /* AVCODEC_AACENC_H */ diff --git a/libavcodec/aactab.c b/libavcodec/aactab.c index edb6619..15fb040 100644 --- a/libavcodec/aactab.c +++ b/libavcodec/aactab.c @@ -409,7 +409,7 @@ const uint16_t ff_aac_spectral_sizes[11] = { * 64.0f is a special value indicating the existence of an escape code in the * bitstream. */ -static const DECLARE_ALIGNED_16(float, codebook_vector0)[324] = { +static const DECLARE_ALIGNED(16, float, codebook_vector0)[324] = { -1.0000000, -1.0000000, -1.0000000, -1.0000000, -1.0000000, -1.0000000, -1.0000000, 0.0000000, -1.0000000, -1.0000000, -1.0000000, 1.0000000, @@ -493,7 +493,7 @@ static const DECLARE_ALIGNED_16(float, codebook_vector0)[324] = { 1.0000000, 1.0000000, 1.0000000, 1.0000000, }; -static const DECLARE_ALIGNED_16(float, codebook_vector2)[324] = { +static const DECLARE_ALIGNED(16, float, codebook_vector2)[324] = { 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 1.0000000, 0.0000000, 0.0000000, 0.0000000, 2.5198421, @@ -577,7 +577,7 @@ static const DECLARE_ALIGNED_16(float, codebook_vector2)[324] = { 2.5198421, 2.5198421, 2.5198421, 2.5198421, }; -static const DECLARE_ALIGNED_16(float, codebook_vector4)[162] = { +static const DECLARE_ALIGNED(16, float, codebook_vector4)[162] = { -6.3496042, -6.3496042, -6.3496042, -4.3267487, -6.3496042, -2.5198421, -6.3496042, -1.0000000, -6.3496042, 0.0000000, -6.3496042, 1.0000000, @@ -621,7 +621,7 @@ static const DECLARE_ALIGNED_16(float, codebook_vector4)[162] = { 6.3496042, 6.3496042, }; -static const DECLARE_ALIGNED_16(float, codebook_vector6)[128] = { +static const DECLARE_ALIGNED(16, float, codebook_vector6)[128] = { 0.0000000, 0.0000000, 0.0000000, 1.0000000, 0.0000000, 2.5198421, 0.0000000, 4.3267487, 0.0000000, 6.3496042, 0.0000000, 8.5498797, @@ -656,7 +656,7 @@ static const DECLARE_ALIGNED_16(float, codebook_vector6)[128] = { 13.3905183, 10.9027236, 13.3905183, 13.3905183, }; -static const DECLARE_ALIGNED_16(float, codebook_vector8)[338] = { +static const DECLARE_ALIGNED(16, float, codebook_vector8)[338] = { 0.0000000, 0.0000000, 0.0000000, 1.0000000, 0.0000000, 2.5198421, 0.0000000, 4.3267487, 0.0000000, 6.3496042, 0.0000000, 8.5498797, @@ -744,7 +744,7 @@ static const DECLARE_ALIGNED_16(float, codebook_vector8)[338] = { 27.4731418, 27.4731418, }; -static const DECLARE_ALIGNED_16(float, codebook_vector10)[578] = { +static const DECLARE_ALIGNED(16, float, codebook_vector10)[578] = { 0.0000000, 0.0000000, 0.0000000, 1.0000000, 0.0000000, 2.5198421, 0.0000000, 4.3267487, 0.0000000, 6.3496042, 0.0000000, 8.5498797, diff --git a/libavcodec/ac3dec.h b/libavcodec/ac3dec.h index cac0395..3fd67af 100644 --- a/libavcodec/ac3dec.h +++ b/libavcodec/ac3dec.h @@ -157,12 +157,12 @@ typedef struct { ///@} ///@defgroup arrays aligned arrays - DECLARE_ALIGNED_16(int, fixed_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///> fixed-point transform coefficients - DECLARE_ALIGNED_16(float, transform_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///< transform coefficients - DECLARE_ALIGNED_16(float, delay)[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE]; ///< delay - added to the next block - DECLARE_ALIGNED_16(float, window)[AC3_BLOCK_SIZE]; ///< window coefficients - DECLARE_ALIGNED_16(float, tmp_output)[AC3_BLOCK_SIZE]; ///< temporary storage for output before windowing - DECLARE_ALIGNED_16(float, output)[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE]; ///< output after imdct transform and windowing + DECLARE_ALIGNED(16, int, fixed_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///> fixed-point transform coefficients + DECLARE_ALIGNED(16, float, transform_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///< transform coefficients + DECLARE_ALIGNED(16, float, delay)[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE]; ///< delay - added to the next block + DECLARE_ALIGNED(16, float, window)[AC3_BLOCK_SIZE]; ///< window coefficients + DECLARE_ALIGNED(16, float, tmp_output)[AC3_BLOCK_SIZE]; ///< temporary storage for output before windowing + DECLARE_ALIGNED(16, float, output)[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE]; ///< output after imdct transform and windowing ///@} } AC3DecodeContext; diff --git a/libavcodec/asv1.c b/libavcodec/asv1.c index 1460553..078fc65 100644 --- a/libavcodec/asv1.c +++ b/libavcodec/asv1.c @@ -48,7 +48,7 @@ typedef struct ASV1Context{ int mb_height; int mb_width2; int mb_height2; - DECLARE_ALIGNED_16(DCTELEM, block)[6][64]; + DECLARE_ALIGNED(16, DCTELEM, block)[6][64]; uint16_t intra_matrix[64]; int q_intra_matrix[64]; uint8_t *bitstream_buffer; diff --git a/libavcodec/atrac1.c b/libavcodec/atrac1.c index bf2f7c4..a4b57f1 100644 --- a/libavcodec/atrac1.c +++ b/libavcodec/atrac1.c @@ -58,11 +58,11 @@ typedef struct { int log2_block_count[AT1_QMF_BANDS]; ///< log2 number of blocks in a band int num_bfus; ///< number of Block Floating Units float* spectrum[2]; - DECLARE_ALIGNED_16(float, spec1)[AT1_SU_SAMPLES]; ///< mdct buffer - DECLARE_ALIGNED_16(float, spec2)[AT1_SU_SAMPLES]; ///< mdct buffer - DECLARE_ALIGNED_16(float, fst_qmf_delay)[46]; ///< delay line for the 1st stacked QMF filter - DECLARE_ALIGNED_16(float, snd_qmf_delay)[46]; ///< delay line for the 2nd stacked QMF filter - DECLARE_ALIGNED_16(float, last_qmf_delay)[256+23]; ///< delay line for the last stacked QMF filter + DECLARE_ALIGNED(16, float, spec1)[AT1_SU_SAMPLES]; ///< mdct buffer + DECLARE_ALIGNED(16, float, spec2)[AT1_SU_SAMPLES]; ///< mdct buffer + DECLARE_ALIGNED(16, float, fst_qmf_delay)[46]; ///< delay line for the 1st stacked QMF filter + DECLARE_ALIGNED(16, float, snd_qmf_delay)[46]; ///< delay line for the 2nd stacked QMF filter + DECLARE_ALIGNED(16, float, last_qmf_delay)[256+23]; ///< delay line for the last stacked QMF filter } AT1SUCtx; /** @@ -70,13 +70,13 @@ typedef struct { */ typedef struct { AT1SUCtx SUs[AT1_MAX_CHANNELS]; ///< channel sound unit - DECLARE_ALIGNED_16(float, spec)[AT1_SU_SAMPLES]; ///< the mdct spectrum buffer + DECLARE_ALIGNED(16, float, spec)[AT1_SU_SAMPLES]; ///< the mdct spectrum buffer - DECLARE_ALIGNED_16(float, low)[256]; - DECLARE_ALIGNED_16(float, mid)[256]; - DECLARE_ALIGNED_16(float, high)[512]; + DECLARE_ALIGNED(16, float, low)[256]; + DECLARE_ALIGNED(16, float, mid)[256]; + DECLARE_ALIGNED(16, float, high)[512]; float* bands[3]; - DECLARE_ALIGNED_16(float, out_samples)[AT1_MAX_CHANNELS][AT1_SU_SAMPLES]; + DECLARE_ALIGNED(16, float, out_samples)[AT1_MAX_CHANNELS][AT1_SU_SAMPLES]; FFTContext mdct_ctx[3]; int channels; DSPContext dsp; diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c index d980d4d..86d4892 100644 --- a/libavcodec/atrac3.c +++ b/libavcodec/atrac3.c @@ -73,8 +73,8 @@ typedef struct { int gcBlkSwitch; gain_block gainBlock[2]; - DECLARE_ALIGNED_16(float, spectrum)[1024]; - DECLARE_ALIGNED_16(float, IMDCT_buf)[1024]; + DECLARE_ALIGNED(16, float, spectrum)[1024]; + DECLARE_ALIGNED(16, float, IMDCT_buf)[1024]; float delayBuf1[46]; ///pic.linesize[plane_idx]; diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c index fd197a8..d27a142 100644 --- a/libavcodec/binkaudio.c +++ b/libavcodec/binkaudio.c @@ -49,8 +49,8 @@ typedef struct { int num_bands; unsigned int *bands; float root; - DECLARE_ALIGNED_16(FFTSample, coeffs)[BINK_BLOCK_MAX_SIZE]; - DECLARE_ALIGNED_16(short, previous)[BINK_BLOCK_MAX_SIZE / 16]; ///< coeffs from previous audio block + DECLARE_ALIGNED(16, FFTSample, coeffs)[BINK_BLOCK_MAX_SIZE]; + DECLARE_ALIGNED(16, short, previous)[BINK_BLOCK_MAX_SIZE / 16]; ///< coeffs from previous audio block float *coeffs_ptr[MAX_CHANNELS]; ///< pointers to the coeffs arrays for float_to_int16_interleave union { RDFTContext rdft; diff --git a/libavcodec/cavs.h b/libavcodec/cavs.h index 1271855..729c83e 100644 --- a/libavcodec/cavs.h +++ b/libavcodec/cavs.h @@ -136,7 +136,7 @@ enum cavs_mv_loc { MV_BWD_X3 }; -DECLARE_ALIGNED_8(typedef, struct) { +DECLARE_ALIGNED(8, typedef, struct) { int16_t x; int16_t y; int16_t dist; diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 262e4eb..0003a38 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -150,7 +150,7 @@ typedef struct cook { /* data buffers */ uint8_t* decoded_bytes_buffer; - DECLARE_ALIGNED_16(float,mono_mdct_output)[2048]; + DECLARE_ALIGNED(16, float,mono_mdct_output)[2048]; float decode_buffer_1[1024]; float decode_buffer_2[1024]; float decode_buffer_0[1060]; /* static allocation for joint decode */ diff --git a/libavcodec/dca.c b/libavcodec/dca.c index e10ced7..86a929e 100644 --- a/libavcodec/dca.c +++ b/libavcodec/dca.c @@ -228,16 +228,16 @@ typedef struct { /* Subband samples history (for ADPCM) */ float subband_samples_hist[DCA_PRIM_CHANNELS_MAX][DCA_SUBBANDS][4]; - DECLARE_ALIGNED_16(float, subband_fir_hist)[DCA_PRIM_CHANNELS_MAX][512]; + DECLARE_ALIGNED(16, float, subband_fir_hist)[DCA_PRIM_CHANNELS_MAX][512]; float subband_fir_noidea[DCA_PRIM_CHANNELS_MAX][32]; int hist_index[DCA_PRIM_CHANNELS_MAX]; - DECLARE_ALIGNED_16(float, raXin)[32]; + DECLARE_ALIGNED(16, float, raXin)[32]; int output; ///< type of output float add_bias; ///< output bias float scale_bias; ///< output scale - DECLARE_ALIGNED_16(float, samples)[1536]; /* 6 * 256 = 1536, might only need 5 */ + DECLARE_ALIGNED(16, float, samples)[1536]; /* 6 * 256 = 1536, might only need 5 */ const float *samples_chanptr[6]; uint8_t dca_buffer[DCA_MAX_FRAME_SIZE]; diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c index c52e3e1..83b25a5 100644 --- a/libavcodec/dnxhddec.c +++ b/libavcodec/dnxhddec.c @@ -39,7 +39,7 @@ typedef struct { VLC ac_vlc, dc_vlc, run_vlc; int last_dc[3]; DSPContext dsp; - DECLARE_ALIGNED_16(DCTELEM, blocks)[8][64]; + DECLARE_ALIGNED(16, DCTELEM, blocks)[8][64]; ScanTable scantable; const CIDEntry *cid_table; } DNXHDContext; diff --git a/libavcodec/dnxhdenc.h b/libavcodec/dnxhdenc.h index 3b91bf0..eaf33d5 100644 --- a/libavcodec/dnxhdenc.h +++ b/libavcodec/dnxhdenc.h @@ -55,7 +55,7 @@ typedef struct DNXHDEncContext { int interlaced; int cur_field; - DECLARE_ALIGNED_16(DCTELEM, blocks)[8][64]; + DECLARE_ALIGNED(16, DCTELEM, blocks)[8][64]; int (*qmatrix_c) [64]; int (*qmatrix_l) [64]; diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 64703d6..1670c23 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -92,7 +92,7 @@ const uint8_t ff_zigzag248_direct[64] = { }; /* not permutated inverse zigzag_direct + 1 for MMX quantizer */ -DECLARE_ALIGNED_16(uint16_t, inv_zigzag_direct16)[64]; +DECLARE_ALIGNED(16, uint16_t, inv_zigzag_direct16)[64]; const uint8_t ff_alternate_horizontal_scan[64] = { 0, 1, 2, 3, 8, 9, 16, 17, @@ -4535,7 +4535,7 @@ av_cold void dsputil_static_init(void) int ff_check_alignment(void){ static int did_fail=0; - DECLARE_ALIGNED_16(int, aligned); + DECLARE_ALIGNED(16, int, aligned); if((intptr_t)&aligned & 15){ if(!did_fail){ diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h index 44946e1..c68ab3a 100644 --- a/libavcodec/dsputil.h +++ b/libavcodec/dsputil.h @@ -709,13 +709,13 @@ static inline void emms(void) t (*v) __VA_ARGS__ = (void *)FFALIGN((uintptr_t)la_##v, a) #if HAVE_LOCAL_ALIGNED_8 -# define LOCAL_ALIGNED_8(t, v, s, ...) DECLARE_ALIGNED_8(t, v) s __VA_ARGS__ +# define LOCAL_ALIGNED_8(t, v, s, ...) DECLARE_ALIGNED(8, t, v) s __VA_ARGS__ #else # define LOCAL_ALIGNED_8(t, v, s, ...) LOCAL_ALIGNED(8, t, v, s, __VA_ARGS__) #endif #if HAVE_LOCAL_ALIGNED_16 -# define LOCAL_ALIGNED_16(t, v, s, ...) DECLARE_ALIGNED_16(t, v) s __VA_ARGS__ +# define LOCAL_ALIGNED_16(t, v, s, ...) DECLARE_ALIGNED(16, t, v) s __VA_ARGS__ #else # define LOCAL_ALIGNED_16(t, v, s, ...) LOCAL_ALIGNED(16, t, v, s, __VA_ARGS__) #endif @@ -769,11 +769,11 @@ typedef struct FFTContext { #endif #define COSTABLE(size) \ - COSTABLE_CONST DECLARE_ALIGNED_16(FFTSample, ff_cos_##size)[size/2] + COSTABLE_CONST DECLARE_ALIGNED(16, FFTSample, ff_cos_##size)[size/2] #define SINTABLE(size) \ - SINTABLE_CONST DECLARE_ALIGNED_16(FFTSample, ff_sin_##size)[size/2] + SINTABLE_CONST DECLARE_ALIGNED(16, FFTSample, ff_sin_##size)[size/2] #define SINETABLE(size) \ - SINETABLE_CONST DECLARE_ALIGNED_16(float, ff_sine_##size)[size] + SINETABLE_CONST DECLARE_ALIGNED(16, float, ff_sine_##size)[size] extern COSTABLE(16); extern COSTABLE(32); extern COSTABLE(64); diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c index 3c6064f..2e9fa8b 100644 --- a/libavcodec/eamad.c +++ b/libavcodec/eamad.c @@ -46,7 +46,7 @@ typedef struct MadContext { AVFrame last_frame; void *bitstream_buf; unsigned int bitstream_buf_size; - DECLARE_ALIGNED_16(DCTELEM, block)[64]; + DECLARE_ALIGNED(16, DCTELEM, block)[64]; } MadContext; static void bswap16_buf(uint16_t *dst, const uint16_t *src, int count) diff --git a/libavcodec/eatgq.c b/libavcodec/eatgq.c index 8099dbd..e5c3991 100644 --- a/libavcodec/eatgq.c +++ b/libavcodec/eatgq.c @@ -42,7 +42,7 @@ typedef struct TgqContext { int width,height; ScanTable scantable; int qtable[64]; - DECLARE_ALIGNED_16(DCTELEM, block)[6][64]; + DECLARE_ALIGNED(16, DCTELEM, block)[6][64]; } TgqContext; static av_cold int tgq_decode_init(AVCodecContext *avctx){ diff --git a/libavcodec/eatqi.c b/libavcodec/eatqi.c index 17c7ef5..e917be9 100644 --- a/libavcodec/eatqi.c +++ b/libavcodec/eatqi.c @@ -40,7 +40,7 @@ typedef struct TqiContext { AVFrame frame; void *bitstream_buf; unsigned int bitstream_buf_size; - DECLARE_ALIGNED_16(DCTELEM, block)[6][64]; + DECLARE_ALIGNED(16, DCTELEM, block)[6][64]; } TqiContext; static av_cold int tqi_decode_init(AVCodecContext *avctx) diff --git a/libavcodec/h264.h b/libavcodec/h264.h index 0ca6ed1..cac32db 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -299,7 +299,7 @@ typedef struct H264Context{ * non zero coeff count cache. * is 64 if not available. */ - DECLARE_ALIGNED_8(uint8_t, non_zero_count_cache)[6*8]; + DECLARE_ALIGNED(8, uint8_t, non_zero_count_cache)[6*8]; /* .UU.YYYY @@ -312,8 +312,8 @@ typedef struct H264Context{ /** * Motion vector cache. */ - DECLARE_ALIGNED_16(int16_t, mv_cache)[2][5*8][2]; - DECLARE_ALIGNED_8(int8_t, ref_cache)[2][5*8]; + DECLARE_ALIGNED(16, int16_t, mv_cache)[2][5*8][2]; + DECLARE_ALIGNED(8, int8_t, ref_cache)[2][5*8]; #define LIST_NOT_USED -1 //FIXME rename? #define PART_NOT_AVAILABLE -2 @@ -366,7 +366,7 @@ typedef struct H264Context{ int mb_field_decoding_flag; int mb_mbaff; ///< mb_aff_frame && mb_field_decoding_flag - DECLARE_ALIGNED_8(uint16_t, sub_mb_type)[4]; + DECLARE_ALIGNED(8, uint16_t, sub_mb_type)[4]; //Weighted pred stuff int use_weight; @@ -403,7 +403,7 @@ typedef struct H264Context{ GetBitContext *intra_gb_ptr; GetBitContext *inter_gb_ptr; - DECLARE_ALIGNED_16(DCTELEM, mb)[16*24]; + DECLARE_ALIGNED(16, DCTELEM, mb)[16*24]; 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 /** @@ -421,7 +421,7 @@ typedef struct H264Context{ uint8_t *chroma_pred_mode_table; int last_qscale_diff; uint8_t (*mvd_table[2])[2]; - DECLARE_ALIGNED_16(uint8_t, mvd_cache)[2][5*8][2]; + DECLARE_ALIGNED(16, uint8_t, mvd_cache)[2][5*8][2]; uint8_t *direct_table; uint8_t direct_cache[5*8]; diff --git a/libavcodec/h264_loopfilter.c b/libavcodec/h264_loopfilter.c index 7855ba5..0fca3d4 100644 --- a/libavcodec/h264_loopfilter.c +++ b/libavcodec/h264_loopfilter.c @@ -477,7 +477,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 += s->mb_stride){ - DECLARE_ALIGNED_8(int16_t, bS)[4]; + DECLARE_ALIGNED(8, int16_t, bS)[4]; int qp; if( IS_INTRA(mb_type|s->current_picture.mb_type[mbn_xy]) ) { AV_WN64A(bS, 0x0003000300030003ULL); @@ -507,7 +507,7 @@ static av_always_inline void filter_mb_dir(H264Context *h, int mb_x, int mb_y, u ( h->chroma_qp[1] + get_chroma_qp( h, 1, s->current_picture.qscale_table[mbn_xy] ) + 1 ) >> 1, h); } }else{ - DECLARE_ALIGNED_8(int16_t, bS)[4]; + DECLARE_ALIGNED(8, int16_t, bS)[4]; int qp; if( IS_INTRA(mb_type|mbm_type)) { @@ -584,7 +584,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]; + DECLARE_ALIGNED(8, int16_t, bS)[4]; int qp; if( IS_8x8DCT(mb_type & (edge<<24)) ) // (edge&1) && IS_8x8DCT(mb_type) @@ -669,7 +669,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]; + DECLARE_ALIGNED(8, int16_t, bS)[8]; int qp[2]; int bqp[2]; int rqp[2]; diff --git a/libavcodec/imc.c b/libavcodec/imc.c index 1bbd0b4..54c22df 100644 --- a/libavcodec/imc.c +++ b/libavcodec/imc.c @@ -84,8 +84,8 @@ typedef struct { DSPContext dsp; FFTContext fft; - DECLARE_ALIGNED_16(FFTComplex, samples)[COEFFS/2]; - DECLARE_ALIGNED_16(float, out_samples)[COEFFS]; + DECLARE_ALIGNED(16, FFTComplex, samples)[COEFFS/2]; + DECLARE_ALIGNED(16, float, out_samples)[COEFFS]; } IMCContext; static VLC huffman_vlc[4][4]; diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c index 9ae2258..8e73771 100644 --- a/libavcodec/mdec.c +++ b/libavcodec/mdec.c @@ -44,7 +44,7 @@ typedef struct MDECContext{ int mb_width; int mb_height; int mb_x, mb_y; - DECLARE_ALIGNED_16(DCTELEM, block)[6][64]; + DECLARE_ALIGNED(16, DCTELEM, block)[6][64]; uint8_t *bitstream_buffer; unsigned int bitstream_buffer_size; int block_last_index[6]; diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c index 6e2f610..8cac02f 100644 --- a/libavcodec/mimic.c +++ b/libavcodec/mimic.c @@ -45,7 +45,7 @@ typedef struct { AVFrame buf_ptrs [16]; AVPicture flipped_ptrs[16]; - DECLARE_ALIGNED_16(DCTELEM, dct_block)[64]; + DECLARE_ALIGNED(16, DCTELEM, dct_block)[64]; GetBitContext gb; ScanTable scantable; diff --git a/libavcodec/mjpegdec.h b/libavcodec/mjpegdec.h index 3e8aa44..359ddb9 100644 --- a/libavcodec/mjpegdec.h +++ b/libavcodec/mjpegdec.h @@ -84,7 +84,7 @@ typedef struct MJpegDecodeContext { int got_picture; ///< we found a SOF and picture is valid, too. int linesize[MAX_COMPONENTS]; ///< linesize << interlaced int8_t *qscale_table; - DECLARE_ALIGNED_16(DCTELEM, block)[64]; + DECLARE_ALIGNED(16, DCTELEM, block)[64]; DCTELEM (*blocks[MAX_COMPONENTS])[64]; ///< intermediate sums (progressive mode) uint8_t *last_nnz[MAX_COMPONENTS]; uint64_t coefs_finished[MAX_COMPONENTS]; ///< bitmask of which coefs have been completely decoded (progressive mode) diff --git a/libavcodec/mpc.h b/libavcodec/mpc.h index fe69b06..51bee75 100644 --- a/libavcodec/mpc.h +++ b/libavcodec/mpc.h @@ -65,9 +65,9 @@ typedef struct { AVLFG rnd; int frames_to_skip; /* for synthesis */ - DECLARE_ALIGNED_16(MPA_INT, synth_buf)[MPA_MAX_CHANNELS][512*2]; + DECLARE_ALIGNED(16, MPA_INT, synth_buf)[MPA_MAX_CHANNELS][512*2]; int synth_buf_offset[MPA_MAX_CHANNELS]; - DECLARE_ALIGNED_16(int32_t, sb_samples)[MPA_MAX_CHANNELS][36][SBLIMIT]; + DECLARE_ALIGNED(16, int32_t, sb_samples)[MPA_MAX_CHANNELS][36][SBLIMIT]; } MPCContext; void ff_mpc_init(void); diff --git a/libavcodec/mpegaudio.h b/libavcodec/mpegaudio.h index 9662171..94e9f59 100644 --- a/libavcodec/mpegaudio.h +++ b/libavcodec/mpegaudio.h @@ -132,9 +132,9 @@ typedef struct MPADecodeContext { uint32_t free_format_next_header; GetBitContext gb; GetBitContext in_gb; - DECLARE_ALIGNED_16(MPA_INT, synth_buf)[MPA_MAX_CHANNELS][512 * 2]; + DECLARE_ALIGNED(16, MPA_INT, synth_buf)[MPA_MAX_CHANNELS][512 * 2]; int synth_buf_offset[MPA_MAX_CHANNELS]; - DECLARE_ALIGNED_16(int32_t, sb_samples)[MPA_MAX_CHANNELS][36][SBLIMIT]; + DECLARE_ALIGNED(16, int32_t, sb_samples)[MPA_MAX_CHANNELS][36][SBLIMIT]; int32_t mdct_buf[MPA_MAX_CHANNELS][SBLIMIT * 18]; /* previous samples, for layer 3 MDCT */ GranuleDef granules[2][2]; /* Used in Layer 3 */ #ifdef DEBUG diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 5dc5971..4458941 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -95,7 +95,7 @@ static const int32_t scale_factor_mult2[3][3] = { SCALE_GEN(4.0 / 9.0), /* 9 steps */ }; -DECLARE_ALIGNED_16(MPA_INT, ff_mpa_synth_window)[512]; +DECLARE_ALIGNED(16, MPA_INT, ff_mpa_synth_window)[512]; /** * Convert region offsets to region sizes and truncate diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c index 38f4b42..911d3ae 100644 --- a/libavcodec/nellymoserdec.c +++ b/libavcodec/nellymoserdec.c @@ -43,7 +43,7 @@ typedef struct NellyMoserDecodeContext { AVCodecContext* avctx; - DECLARE_ALIGNED_16(float,float_buf)[NELLY_SAMPLES]; + DECLARE_ALIGNED(16, float,float_buf)[NELLY_SAMPLES]; float state[128]; AVLFG random_state; GetBitContext gb; @@ -51,7 +51,7 @@ typedef struct NellyMoserDecodeContext { float scale_bias; DSPContext dsp; FFTContext imdct_ctx; - DECLARE_ALIGNED_16(float,imdct_out)[NELLY_BUF_LEN * 2]; + DECLARE_ALIGNED(16, float,imdct_out)[NELLY_BUF_LEN * 2]; } NellyMoserDecodeContext; static void overlap_and_window(NellyMoserDecodeContext *s, float *state, float *audio, float *a_in) diff --git a/libavcodec/nellymoserenc.c b/libavcodec/nellymoserenc.c index 41603f3..6f413a1 100644 --- a/libavcodec/nellymoserenc.c +++ b/libavcodec/nellymoserenc.c @@ -53,9 +53,9 @@ typedef struct NellyMoserEncodeContext { int have_saved; DSPContext dsp; FFTContext mdct_ctx; - DECLARE_ALIGNED_16(float, mdct_out)[NELLY_SAMPLES]; - DECLARE_ALIGNED_16(float, in_buff)[NELLY_SAMPLES]; - DECLARE_ALIGNED_16(float, buf)[2][3 * NELLY_BUF_LEN]; ///< sample buffer + DECLARE_ALIGNED(16, float, mdct_out)[NELLY_SAMPLES]; + DECLARE_ALIGNED(16, float, in_buff)[NELLY_SAMPLES]; + DECLARE_ALIGNED(16, float, buf)[2][3 * NELLY_BUF_LEN]; ///< sample buffer float (*opt )[NELLY_BANDS]; uint8_t (*path)[NELLY_BANDS]; } NellyMoserEncodeContext; diff --git a/libavcodec/ppc/gmc_altivec.c b/libavcodec/ppc/gmc_altivec.c index 3b582c6..7d3a62c 100644 --- a/libavcodec/ppc/gmc_altivec.c +++ b/libavcodec/ppc/gmc_altivec.c @@ -33,8 +33,8 @@ void gmc1_altivec(uint8_t *dst /* align 8 */, uint8_t *src /* align1 */, int stride, int h, int x16, int y16, int rounder) { POWERPC_PERF_DECLARE(altivec_gmc1_num, GMC1_PERF_COND); - const DECLARE_ALIGNED_16(unsigned short, rounder_a) = rounder; - const DECLARE_ALIGNED_16(unsigned short, ABCD)[8] = + const DECLARE_ALIGNED(16, unsigned short, rounder_a) = rounder; + const DECLARE_ALIGNED(16, unsigned short, ABCD)[8] = { (16-x16)*(16-y16), /* A */ ( x16)*(16-y16), /* B */ diff --git a/libavcodec/ppc/h264_altivec.c b/libavcodec/ppc/h264_altivec.c index 0af9cf7..0036233 100644 --- a/libavcodec/ppc/h264_altivec.c +++ b/libavcodec/ppc/h264_altivec.c @@ -79,7 +79,7 @@ static void OPNAME ## h264_qpel ## SIZE ## _mc00_ ## CODETYPE (uint8_t *dst, uin }\ \ static void OPNAME ## h264_qpel ## SIZE ## _mc10_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){ \ - DECLARE_ALIGNED_16(uint8_t, half)[SIZE*SIZE];\ + DECLARE_ALIGNED(16, uint8_t, half)[SIZE*SIZE];\ put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(half, src, SIZE, stride);\ OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src, half, stride, stride, SIZE);\ }\ @@ -89,13 +89,13 @@ static void OPNAME ## h264_qpel ## SIZE ## _mc20_ ## CODETYPE(uint8_t *dst, uint }\ \ static void OPNAME ## h264_qpel ## SIZE ## _mc30_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\ - DECLARE_ALIGNED_16(uint8_t, half)[SIZE*SIZE];\ + DECLARE_ALIGNED(16, uint8_t, half)[SIZE*SIZE];\ put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(half, src, SIZE, stride);\ OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src+1, half, stride, stride, SIZE);\ }\ \ static void OPNAME ## h264_qpel ## SIZE ## _mc01_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\ - DECLARE_ALIGNED_16(uint8_t, half)[SIZE*SIZE];\ + DECLARE_ALIGNED(16, uint8_t, half)[SIZE*SIZE];\ put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(half, src, SIZE, stride);\ OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src, half, stride, stride, SIZE);\ }\ @@ -105,79 +105,79 @@ static void OPNAME ## h264_qpel ## SIZE ## _mc02_ ## CODETYPE(uint8_t *dst, uint }\ \ static void OPNAME ## h264_qpel ## SIZE ## _mc03_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\ - DECLARE_ALIGNED_16(uint8_t, half)[SIZE*SIZE];\ + DECLARE_ALIGNED(16, uint8_t, half)[SIZE*SIZE];\ put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(half, src, SIZE, stride);\ OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src+stride, half, stride, stride, SIZE);\ }\ \ static void OPNAME ## h264_qpel ## SIZE ## _mc11_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\ - DECLARE_ALIGNED_16(uint8_t, halfH)[SIZE*SIZE];\ - DECLARE_ALIGNED_16(uint8_t, halfV)[SIZE*SIZE];\ + DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\ + DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\ put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src, SIZE, stride);\ put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src, SIZE, stride);\ OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfH, halfV, stride, SIZE, SIZE);\ }\ \ static void OPNAME ## h264_qpel ## SIZE ## _mc31_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\ - DECLARE_ALIGNED_16(uint8_t, halfH)[SIZE*SIZE];\ - DECLARE_ALIGNED_16(uint8_t, halfV)[SIZE*SIZE];\ + DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\ + DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\ put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src, SIZE, stride);\ put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src+1, SIZE, stride);\ OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfH, halfV, stride, SIZE, SIZE);\ }\ \ static void OPNAME ## h264_qpel ## SIZE ## _mc13_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\ - DECLARE_ALIGNED_16(uint8_t, halfH)[SIZE*SIZE];\ - DECLARE_ALIGNED_16(uint8_t, halfV)[SIZE*SIZE];\ + DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\ + DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\ put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src + stride, SIZE, stride);\ put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src, SIZE, stride);\ OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfH, halfV, stride, SIZE, SIZE);\ }\ \ static void OPNAME ## h264_qpel ## SIZE ## _mc33_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\ - DECLARE_ALIGNED_16(uint8_t, halfH)[SIZE*SIZE];\ - DECLARE_ALIGNED_16(uint8_t, halfV)[SIZE*SIZE];\ + DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\ + DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\ put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src + stride, SIZE, stride);\ put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src+1, SIZE, stride);\ OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfH, halfV, stride, SIZE, SIZE);\ }\ \ static void OPNAME ## h264_qpel ## SIZE ## _mc22_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\ - DECLARE_ALIGNED_16(int16_t, tmp)[SIZE*(SIZE+8)];\ + DECLARE_ALIGNED(16, int16_t, tmp)[SIZE*(SIZE+8)];\ OPNAME ## h264_qpel ## SIZE ## _hv_lowpass_ ## CODETYPE(dst, tmp, src, stride, SIZE, stride);\ }\ \ static void OPNAME ## h264_qpel ## SIZE ## _mc21_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\ - DECLARE_ALIGNED_16(uint8_t, halfH)[SIZE*SIZE];\ - DECLARE_ALIGNED_16(uint8_t, halfHV)[SIZE*SIZE];\ - DECLARE_ALIGNED_16(int16_t, tmp)[SIZE*(SIZE+8)];\ + DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\ + DECLARE_ALIGNED(16, uint8_t, halfHV)[SIZE*SIZE];\ + DECLARE_ALIGNED(16, int16_t, tmp)[SIZE*(SIZE+8)];\ put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src, SIZE, stride);\ put_h264_qpel ## SIZE ## _hv_lowpass_ ## CODETYPE(halfHV, tmp, src, SIZE, SIZE, stride);\ OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfH, halfHV, stride, SIZE, SIZE);\ }\ \ static void OPNAME ## h264_qpel ## SIZE ## _mc23_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\ - DECLARE_ALIGNED_16(uint8_t, halfH)[SIZE*SIZE];\ - DECLARE_ALIGNED_16(uint8_t, halfHV)[SIZE*SIZE];\ - DECLARE_ALIGNED_16(int16_t, tmp)[SIZE*(SIZE+8)];\ + DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\ + DECLARE_ALIGNED(16, uint8_t, halfHV)[SIZE*SIZE];\ + DECLARE_ALIGNED(16, int16_t, tmp)[SIZE*(SIZE+8)];\ put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src + stride, SIZE, stride);\ put_h264_qpel ## SIZE ## _hv_lowpass_ ## CODETYPE(halfHV, tmp, src, SIZE, SIZE, stride);\ OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfH, halfHV, stride, SIZE, SIZE);\ }\ \ static void OPNAME ## h264_qpel ## SIZE ## _mc12_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\ - DECLARE_ALIGNED_16(uint8_t, halfV)[SIZE*SIZE];\ - DECLARE_ALIGNED_16(uint8_t, halfHV)[SIZE*SIZE];\ - DECLARE_ALIGNED_16(int16_t, tmp)[SIZE*(SIZE+8)];\ + DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\ + DECLARE_ALIGNED(16, uint8_t, halfHV)[SIZE*SIZE];\ + DECLARE_ALIGNED(16, int16_t, tmp)[SIZE*(SIZE+8)];\ put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src, SIZE, stride);\ put_h264_qpel ## SIZE ## _hv_lowpass_ ## CODETYPE(halfHV, tmp, src, SIZE, SIZE, stride);\ OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfV, halfHV, stride, SIZE, SIZE);\ }\ \ static void OPNAME ## h264_qpel ## SIZE ## _mc32_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){\ - DECLARE_ALIGNED_16(uint8_t, halfV)[SIZE*SIZE];\ - DECLARE_ALIGNED_16(uint8_t, halfHV)[SIZE*SIZE];\ - DECLARE_ALIGNED_16(int16_t, tmp)[SIZE*(SIZE+8)];\ + DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\ + DECLARE_ALIGNED(16, uint8_t, halfHV)[SIZE*SIZE];\ + DECLARE_ALIGNED(16, int16_t, tmp)[SIZE*(SIZE+8)];\ put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src+1, SIZE, stride);\ put_h264_qpel ## SIZE ## _hv_lowpass_ ## CODETYPE(halfHV, tmp, src, SIZE, SIZE, stride);\ OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfV, halfHV, stride, SIZE, SIZE);\ @@ -480,7 +480,7 @@ static av_always_inline void h264_idct_dc_add_internal(uint8_t *dst, DCTELEM *bl vec_s16 dc16; vec_u8 dcplus, dcminus, v0, v1, v2, v3, aligner; LOAD_ZERO; - DECLARE_ALIGNED_16(int, dc); + DECLARE_ALIGNED(16, int, dc); int i; dc = (block[0] + 32) >> 6; @@ -590,7 +590,7 @@ static void ff_h264_idct_add8_altivec(uint8_t **dest, const int *block_offset, D static inline void write16x4(uint8_t *dst, int dst_stride, register vec_u8 r0, register vec_u8 r1, register vec_u8 r2, register vec_u8 r3) { - DECLARE_ALIGNED_16(unsigned char, result)[64]; + DECLARE_ALIGNED(16, unsigned char, result)[64]; uint32_t *src_int = (uint32_t *)result, *dst_int = (uint32_t *)dst; int int_dst_stride = dst_stride/4; @@ -770,7 +770,7 @@ static inline vec_u8 h264_deblock_q1(register vec_u8 p0, } #define h264_loop_filter_luma_altivec(p2, p1, p0, q0, q1, q2, alpha, beta, tc0) { \ - DECLARE_ALIGNED_16(unsigned char, temp)[16]; \ + DECLARE_ALIGNED(16, unsigned char, temp)[16]; \ register vec_u8 alphavec; \ register vec_u8 betavec; \ register vec_u8 mask; \ @@ -850,7 +850,7 @@ void weight_h264_WxH_altivec(uint8_t *block, int stride, int log2_denom, int wei vec_u8 vblock; vec_s16 vtemp, vweight, voffset, v0, v1; vec_u16 vlog2_denom; - DECLARE_ALIGNED_16(int32_t, temp)[4]; + DECLARE_ALIGNED(16, int32_t, temp)[4]; LOAD_ZERO; offset <<= log2_denom; @@ -896,7 +896,7 @@ void biweight_h264_WxH_altivec(uint8_t *dst, uint8_t *src, int stride, int log2_ vec_u8 vsrc, vdst; vec_s16 vtemp, vweights, vweightd, voffset, v0, v1, v2, v3; vec_u16 vlog2_denom; - DECLARE_ALIGNED_16(int32_t, temp)[4]; + DECLARE_ALIGNED(16, int32_t, temp)[4]; LOAD_ZERO; offset = ((offset + 1) | 1) << log2_denom; diff --git a/libavcodec/ppc/h264_template_altivec.c b/libavcodec/ppc/h264_template_altivec.c index 3ed7511..061d5bf 100644 --- a/libavcodec/ppc/h264_template_altivec.c +++ b/libavcodec/ppc/h264_template_altivec.c @@ -78,7 +78,7 @@ void PREFIX_h264_chroma_mc8_altivec(uint8_t * dst, uint8_t * src, int stride, int h, int x, int y) { POWERPC_PERF_DECLARE(PREFIX_h264_chroma_mc8_num, 1); - DECLARE_ALIGNED_16(signed int, ABCD)[4] = + DECLARE_ALIGNED(16, signed int, ABCD)[4] = {((8 - x) * (8 - y)), (( x) * (8 - y)), ((8 - x) * ( y)), @@ -208,7 +208,7 @@ void PREFIX_h264_chroma_mc8_altivec(uint8_t * dst, uint8_t * src, /* this code assume that stride % 16 == 0 */ void PREFIX_no_rnd_vc1_chroma_mc8_altivec(uint8_t * dst, uint8_t * src, int stride, int h, int x, int y) { - DECLARE_ALIGNED_16(signed int, ABCD)[4] = + DECLARE_ALIGNED(16, signed int, ABCD)[4] = {((8 - x) * (8 - y)), (( x) * (8 - y)), ((8 - x) * ( y)), diff --git a/libavcodec/ppc/mpegvideo_altivec.c b/libavcodec/ppc/mpegvideo_altivec.c index 8348e68..a1f0e0c 100644 --- a/libavcodec/ppc/mpegvideo_altivec.c +++ b/libavcodec/ppc/mpegvideo_altivec.c @@ -506,8 +506,8 @@ POWERPC_PERF_START_COUNT(altivec_dct_unquantize_h263_num, 1); { register const vector signed short vczero = (const vector signed short)vec_splat_s16(0); - DECLARE_ALIGNED_16(short, qmul8) = qmul; - DECLARE_ALIGNED_16(short, qadd8) = qadd; + DECLARE_ALIGNED(16, short, qmul8) = qmul; + DECLARE_ALIGNED(16, short, qadd8) = qadd; register vector signed short blockv, qmulv, qaddv, nqaddv, temp1; register vector bool short blockv_null, blockv_neg; register short backup_0 = block[0]; diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c index 182637d..275befb 100644 --- a/libavcodec/qdm2.c +++ b/libavcodec/qdm2.c @@ -122,7 +122,7 @@ typedef struct { } FFTCoefficient; typedef struct { - DECLARE_ALIGNED_16(QDM2Complex, complex)[MPA_MAX_CHANNELS][256]; + DECLARE_ALIGNED(16, QDM2Complex, complex)[MPA_MAX_CHANNELS][256]; } QDM2FFT; /** @@ -172,9 +172,9 @@ typedef struct { float output_buffer[1024]; /// Synthesis filter - DECLARE_ALIGNED_16(MPA_INT, synth_buf)[MPA_MAX_CHANNELS][512*2]; + DECLARE_ALIGNED(16, MPA_INT, synth_buf)[MPA_MAX_CHANNELS][512*2]; int synth_buf_offset[MPA_MAX_CHANNELS]; - DECLARE_ALIGNED_16(int32_t, sb_samples)[MPA_MAX_CHANNELS][128][SBLIMIT]; + DECLARE_ALIGNED(16, int32_t, sb_samples)[MPA_MAX_CHANNELS][128][SBLIMIT]; /// Mixed temporary data used in decoding float tone_level[MPA_MAX_CHANNELS][30][64]; diff --git a/libavcodec/rtjpeg.h b/libavcodec/rtjpeg.h index 787e890..4bcb9f7 100644 --- a/libavcodec/rtjpeg.h +++ b/libavcodec/rtjpeg.h @@ -31,7 +31,7 @@ typedef struct { uint8_t scan[64]; uint32_t lquant[64]; uint32_t cquant[64]; - DECLARE_ALIGNED_16(DCTELEM, block)[64]; + DECLARE_ALIGNED(16, DCTELEM, block)[64]; } RTJpegContext; void rtjpeg_decode_init(RTJpegContext *c, DSPContext *dsp, diff --git a/libavcodec/rv34.h b/libavcodec/rv34.h index fdf95af..3c0a61b 100644 --- a/libavcodec/rv34.h +++ b/libavcodec/rv34.h @@ -111,7 +111,7 @@ typedef struct RV34DecContext{ int *deblock_coefs; ///< deblock coefficients for each macroblock /** 8x8 block available flags (for MV prediction) */ - DECLARE_ALIGNED_8(uint32_t, avail_cache)[3*4]; + DECLARE_ALIGNED(8, uint32_t, avail_cache)[3*4]; int (*parse_slice_header)(struct RV34DecContext *r, GetBitContext *gb, SliceInfo *si); int (*decode_mb_info)(struct RV34DecContext *r); diff --git a/libavcodec/sipr.h b/libavcodec/sipr.h index 662d18e..66e7696 100644 --- a/libavcodec/sipr.h +++ b/libavcodec/sipr.h @@ -64,7 +64,7 @@ typedef struct { float excitation[L_INTERPOL + PITCH_MAX + 2 * L_SUBFR_16k]; - DECLARE_ALIGNED_16(float, synth_buf)[LP_FILTER_ORDER + 5*SUBFR_SIZE + 6]; + DECLARE_ALIGNED(16, float, synth_buf)[LP_FILTER_ORDER + 5*SUBFR_SIZE + 6]; float lsp_history[LP_FILTER_ORDER]; float gain_mem; diff --git a/libavcodec/sparc/simple_idct_vis.c b/libavcodec/sparc/simple_idct_vis.c index 6f5359a..8346a36 100644 --- a/libavcodec/sparc/simple_idct_vis.c +++ b/libavcodec/sparc/simple_idct_vis.c @@ -24,7 +24,7 @@ #include "libavcodec/dsputil.h" -static const DECLARE_ALIGNED_8(int16_t, coeffs)[28] = { +static const DECLARE_ALIGNED(8, int16_t, coeffs)[28] = { - 1259,- 1259,- 1259,- 1259, - 4989,- 4989,- 4989,- 4989, -11045,-11045,-11045,-11045, @@ -33,13 +33,13 @@ static const DECLARE_ALIGNED_8(int16_t, coeffs)[28] = { 25080, 25080, 25080, 25080, 12785, 12785, 12785, 12785 }; -static const DECLARE_ALIGNED_8(uint16_t, scale)[4] = { +static const DECLARE_ALIGNED(8, uint16_t, scale)[4] = { 65536>>6, 65536>>6, 65536>>6, 65536>>6 }; -static const DECLARE_ALIGNED_8(uint16_t, rounder)[4] = { +static const DECLARE_ALIGNED(8, uint16_t, rounder)[4] = { 1<<5, 1<<5, 1<<5, 1<<5 }; -static const DECLARE_ALIGNED_8(uint16_t, expand)[4] = { +static const DECLARE_ALIGNED(8, uint16_t, expand)[4] = { 1<<14, 1<<14, 1<<14, 1<<14 }; @@ -386,7 +386,7 @@ static const DECLARE_ALIGNED_8(uint16_t, expand)[4] = { void ff_simple_idct_vis(DCTELEM *data) { int out1, out2, out3, out4; - DECLARE_ALIGNED_8(int16_t, temp)[8*8]; + DECLARE_ALIGNED(8, int16_t, temp)[8*8]; __asm__ volatile( INIT_IDCT diff --git a/libavcodec/vorbis_data.c b/libavcodec/vorbis_data.c index 2df8566..9bc7979 100644 --- a/libavcodec/vorbis_data.c +++ b/libavcodec/vorbis_data.c @@ -44,7 +44,7 @@ const int64_t ff_vorbis_channel_layouts[9] = { 0 }; -DECLARE_ALIGNED_16(static const float, vwin64)[32] = { +DECLARE_ALIGNED(16, static const float, vwin64)[32] = { 0.0009460463F, 0.0085006468F, 0.0235352254F, 0.0458950567F, 0.0753351908F, 0.1115073077F, 0.1539457973F, 0.2020557475F, 0.2551056759F, 0.3122276645F, 0.3724270287F, 0.4346027792F, @@ -55,7 +55,7 @@ DECLARE_ALIGNED_16(static const float, vwin64)[32] = { 0.9989462667F, 0.9997230082F, 0.9999638688F, 0.9999995525F, }; -DECLARE_ALIGNED_16(static const float, vwin128)[64] = { +DECLARE_ALIGNED(16, static const float, vwin128)[64] = { 0.0002365472F, 0.0021280687F, 0.0059065254F, 0.0115626550F, 0.0190823442F, 0.0284463735F, 0.0396300935F, 0.0526030430F, 0.0673285281F, 0.0837631763F, 0.1018564887F, 0.1215504095F, @@ -74,7 +74,7 @@ DECLARE_ALIGNED_16(static const float, vwin128)[64] = { 0.9999331503F, 0.9999825563F, 0.9999977357F, 0.9999999720F, }; -DECLARE_ALIGNED_16(static const float, vwin256)[128] = { +DECLARE_ALIGNED(16, static const float, vwin256)[128] = { 0.0000591390F, 0.0005321979F, 0.0014780301F, 0.0028960636F, 0.0047854363F, 0.0071449926F, 0.0099732775F, 0.0132685298F, 0.0170286741F, 0.0212513119F, 0.0259337111F, 0.0310727950F, @@ -109,7 +109,7 @@ DECLARE_ALIGNED_16(static const float, vwin256)[128] = { 0.9999958064F, 0.9999989077F, 0.9999998584F, 0.9999999983F, }; -DECLARE_ALIGNED_16(static const float, vwin512)[256] = { +DECLARE_ALIGNED(16, static const float, vwin512)[256] = { 0.0000147849F, 0.0001330607F, 0.0003695946F, 0.0007243509F, 0.0011972759F, 0.0017882983F, 0.0024973285F, 0.0033242588F, 0.0042689632F, 0.0053312973F, 0.0065110982F, 0.0078081841F, @@ -176,7 +176,7 @@ DECLARE_ALIGNED_16(static const float, vwin512)[256] = { 0.9999997377F, 0.9999999317F, 0.9999999911F, 0.9999999999F, }; -DECLARE_ALIGNED_16(static const float, vwin1024)[512] = { +DECLARE_ALIGNED(16, static const float, vwin1024)[512] = { 0.0000036962F, 0.0000332659F, 0.0000924041F, 0.0001811086F, 0.0002993761F, 0.0004472021F, 0.0006245811F, 0.0008315063F, 0.0010679699F, 0.0013339631F, 0.0016294757F, 0.0019544965F, @@ -307,7 +307,7 @@ DECLARE_ALIGNED_16(static const float, vwin1024)[512] = { 0.9999999836F, 0.9999999957F, 0.9999999994F, 1.0000000000F, }; -DECLARE_ALIGNED_16(static const float, vwin2048)[1024] = { +DECLARE_ALIGNED(16, static const float, vwin2048)[1024] = { 0.0000009241F, 0.0000083165F, 0.0000231014F, 0.0000452785F, 0.0000748476F, 0.0001118085F, 0.0001561608F, 0.0002079041F, 0.0002670379F, 0.0003335617F, 0.0004074748F, 0.0004887765F, @@ -566,7 +566,7 @@ DECLARE_ALIGNED_16(static const float, vwin2048)[1024] = { 0.9999999990F, 0.9999999997F, 1.0000000000F, 1.0000000000F, }; -DECLARE_ALIGNED_16(static const float, vwin4096)[2048] = { +DECLARE_ALIGNED(16, static const float, vwin4096)[2048] = { 0.0000002310F, 0.0000020791F, 0.0000057754F, 0.0000113197F, 0.0000187121F, 0.0000279526F, 0.0000390412F, 0.0000519777F, 0.0000667623F, 0.0000833949F, 0.0001018753F, 0.0001222036F, @@ -1081,7 +1081,7 @@ DECLARE_ALIGNED_16(static const float, vwin4096)[2048] = { 0.9999999999F, 1.0000000000F, 1.0000000000F, 1.0000000000F, }; -DECLARE_ALIGNED_16(static const float, vwin8192)[4096] = { +DECLARE_ALIGNED(16, static const float, vwin8192)[4096] = { 0.0000000578F, 0.0000005198F, 0.0000014438F, 0.0000028299F, 0.0000046780F, 0.0000069882F, 0.0000097604F, 0.0000129945F, 0.0000166908F, 0.0000208490F, 0.0000254692F, 0.0000305515F, diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 170896f..44f0986 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -221,7 +221,7 @@ typedef struct Vp3DecodeContext { /* these arrays need to be on 16-byte boundaries since SSE2 operations * index into them */ - DECLARE_ALIGNED_16(int16_t, qmat)[3][2][3][64]; //=0; dir-- ) { const x86_reg d_idx = dir ? -8 : -1; const int mask_mv = dir ? mask_mv1 : mask_mv0; - DECLARE_ALIGNED_8(const uint64_t, mask_dir) = dir ? 0 : 0xffffffffffffffffULL; + DECLARE_ALIGNED(8, const uint64_t, mask_dir) = dir ? 0 : 0xffffffffffffffffULL; int b_idx, edge; for( b_idx=12, edge=0; edge>1; - DECLARE_ALIGNED_16(IDWTELEM, temp)[width>>1]; + DECLARE_ALIGNED(16, IDWTELEM, temp)[width>>1]; const int w_l= (width>>1); const int w_r= w2 - 1; int i; diff --git a/libavcodec/x86/vc1dsp_mmx.c b/libavcodec/x86/vc1dsp_mmx.c index bf96f24..ef1ce1a 100644 --- a/libavcodec/x86/vc1dsp_mmx.c +++ b/libavcodec/x86/vc1dsp_mmx.c @@ -73,7 +73,7 @@ "movq %%mm"#R1", "#OFF"(%1) \n\t" \ "add %2, %0 \n\t" -DECLARE_ALIGNED_16(const uint64_t, ff_pw_9) = 0x0009000900090009ULL; +DECLARE_ALIGNED(16, const uint64_t, ff_pw_9) = 0x0009000900090009ULL; /** Sacrifying mm6 allows to pipeline loads from src */ static void vc1_put_ver_16b_shift2_mmx(int16_t *dst, @@ -442,7 +442,7 @@ static void OP ## vc1_mspel_mc(uint8_t *dst, const uint8_t *src, int stride,\ static const int shift_value[] = { 0, 5, 1, 5 };\ int shift = (shift_value[hmode]+shift_value[vmode])>>1;\ int r;\ - DECLARE_ALIGNED_16(int16_t, tmp)[12*8];\ + DECLARE_ALIGNED(16, int16_t, tmp)[12*8];\ \ r = (1<<(shift-1)) + rnd-1;\ vc1_put_shift_ver_16bits[vmode](tmp, src-1, stride, r, shift);\ diff --git a/libavcodec/x86/vp3dsp_sse2.c b/libavcodec/x86/vp3dsp_sse2.c index dfe368b..f3db6da 100644 --- a/libavcodec/x86/vp3dsp_sse2.c +++ b/libavcodec/x86/vp3dsp_sse2.c @@ -26,7 +26,7 @@ #include "libavcodec/dsputil.h" #include "dsputil_mmx.h" -DECLARE_ALIGNED_16(const uint16_t, ff_vp3_idct_data)[7 * 8] = +DECLARE_ALIGNED(16, const uint16_t, ff_vp3_idct_data)[7 * 8] = { 64277,64277,64277,64277,64277,64277,64277,64277, 60547,60547,60547,60547,60547,60547,60547,60547, diff --git a/libavutil/mem.h b/libavutil/mem.h index 36a2cf1..d8d1d72 100644 --- a/libavutil/mem.h +++ b/libavutil/mem.h @@ -49,9 +49,6 @@ #define DECLARE_ASM_CONST(n,t,v) static const t v #endif -#define DECLARE_ALIGNED_16(t, v) DECLARE_ALIGNED(16, t, v) -#define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(8, t, v) - #if AV_GCC_VERSION_AT_LEAST(3,1) #define av_malloc_attrib __attribute__((__malloc__)) #else -- 2.7.4