Commit c6727809 authored by Måns Rullgård's avatar Måns Rullgård
Browse files

Move array specifiers outside DECLARE_ALIGNED() invocations

Originally committed as revision 21377 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 27ce1be8
......@@ -133,8 +133,8 @@ typedef struct VideoState {
int audio_hw_buf_size;
/* samples output by the codec. we reserve more space for avsync
compensation */
DECLARE_ALIGNED(16,uint8_t,audio_buf1[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2]);
DECLARE_ALIGNED(16,uint8_t,audio_buf2[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2]);
DECLARE_ALIGNED(16,uint8_t,audio_buf1)[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2];
DECLARE_ALIGNED(16,uint8_t,audio_buf2)[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2];
uint8_t *audio_buf;
unsigned int audio_buf_size; /* in bytes */
int audio_buf_index; /* in bytes */
......
......@@ -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;
......
......@@ -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];
/** @} */
/**
......@@ -284,7 +284,7 @@ typedef struct {
int sf_offset; ///< offset into pow2sf_tab as appropriate for dsp.float_to_int16
/** @} */
DECLARE_ALIGNED(16, float, temp[128]);
DECLARE_ALIGNED(16, float, temp)[128];
enum OCStatus output_configured;
} AACContext;
......
......@@ -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 */
......@@ -32,8 +32,8 @@
#include <stdint.h>
DECLARE_ALIGNED(16, float, ff_aac_kbd_long_1024[1024]);
DECLARE_ALIGNED(16, float, ff_aac_kbd_short_128[128]);
DECLARE_ALIGNED(16, float, ff_aac_kbd_long_1024)[1024];
DECLARE_ALIGNED(16, float, ff_aac_kbd_short_128)[128];
const uint8_t ff_aac_num_swb_1024[] = {
41, 41, 47, 49, 49, 51, 47, 47, 43, 43, 43, 40, 40
......@@ -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,
......
......@@ -43,8 +43,8 @@
/* @name window coefficients
* @{
*/
DECLARE_ALIGNED(16, extern float, ff_aac_kbd_long_1024[1024]);
DECLARE_ALIGNED(16, extern float, ff_aac_kbd_short_128[128]);
DECLARE_ALIGNED(16, extern float, ff_aac_kbd_long_1024)[1024];
DECLARE_ALIGNED(16, extern float, ff_aac_kbd_short_128)[128];
// @}
/* @name number of scalefactor window bands for long and short transform windows respectively
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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]; ///<qmf delay buffers
float delayBuf2[46];
......@@ -119,7 +119,7 @@ typedef struct {
//@}
} ATRAC3Context;
static DECLARE_ALIGNED_16(float,mdct_window[512]);
static DECLARE_ALIGNED_16(float,mdct_window)[512];
static VLC spectral_coeff_tab[7];
static float gain_tab1[16];
static float gain_tab2[31];
......
......@@ -73,7 +73,7 @@ static inline int get_bs(cavs_vector *mvP, cavs_vector *mvQ, int b) {
*
*/
void ff_cavs_filter(AVSContext *h, enum cavs_mb mb_type) {
DECLARE_ALIGNED_8(uint8_t, bs[8]);
DECLARE_ALIGNED_8(uint8_t, bs)[8];
int qp_avg, alpha, beta, tc;
int i;
......
......@@ -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 */
......
......@@ -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];
......
......@@ -186,9 +186,9 @@ static void idct_mmx_init(void)
}
}
DECLARE_ALIGNED(16, static DCTELEM, block[64]);
DECLARE_ALIGNED(8, static DCTELEM, block1[64]);
DECLARE_ALIGNED(8, static DCTELEM, block_org[64]);
DECLARE_ALIGNED(16, static DCTELEM, block)[64];
DECLARE_ALIGNED(8, static DCTELEM, block1)[64];
DECLARE_ALIGNED(8, static DCTELEM, block_org)[64];
static inline void mmx_emms(void)
{
......@@ -384,8 +384,8 @@ static void dct_error(const char *name, int is_idct,
#endif
}
DECLARE_ALIGNED(8, static uint8_t, img_dest[64]);
DECLARE_ALIGNED(8, static uint8_t, img_dest1[64]);
DECLARE_ALIGNED(8, static uint8_t, img_dest)[64];
DECLARE_ALIGNED(8, static uint8_t, img_dest1)[64];
static void idct248_ref(uint8_t *dest, int linesize, int16_t *block)
{
......
......@@ -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;
......
......@@ -414,7 +414,7 @@ static int dnxhd_calc_bits_thread(AVCodecContext *avctx, void *arg, int jobnr, i
dnxhd_get_blocks(ctx, mb_x, mb_y);
for (i = 0; i < 8; i++) {
DECLARE_ALIGNED_16(DCTELEM, block[64]);
DECLARE_ALIGNED_16(DCTELEM, block)[64];
DCTELEM *src_block = ctx->blocks[i];
int overflow, nbits, diff, last_index;
int n = dnxhd_switch_matrix(ctx, i);
......
......@@ -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];
......
......@@ -87,7 +87,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_8(uint16_t, inv_zigzag_direct16)[64];
const uint8_t ff_alternate_horizontal_scan[64] = {
0, 1, 2, 3, 8, 9, 16, 17,
......@@ -3788,7 +3788,7 @@ static int hadamard8_intra8x8_c(/*MpegEncContext*/ void *s, uint8_t *src, uint8_
static int dct_sad8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){
MpegEncContext * const s= (MpegEncContext *)c;
DECLARE_ALIGNED_16(uint64_t, aligned_temp[sizeof(DCTELEM)*64/8]);
DECLARE_ALIGNED_16(uint64_t, aligned_temp)[sizeof(DCTELEM)*64/8];
DCTELEM * const temp= (DCTELEM*)aligned_temp;
assert(h==8);
......@@ -3853,7 +3853,7 @@ static int dct264_sad8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *s
static int dct_max8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){
MpegEncContext * const s= (MpegEncContext *)c;
DECLARE_ALIGNED_16(uint64_t, aligned_temp[sizeof(DCTELEM)*64/8]);
DECLARE_ALIGNED_16(uint64_t, aligned_temp)[sizeof(DCTELEM)*64/8];
DCTELEM * const temp= (DCTELEM*)aligned_temp;
int sum=0, i;
......@@ -3870,7 +3870,7 @@ static int dct_max8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2
static int quant_psnr8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){
MpegEncContext * const s= (MpegEncContext *)c;
DECLARE_ALIGNED_16(uint64_t, aligned_temp[sizeof(DCTELEM)*64*2/8]);
DECLARE_ALIGNED_16(uint64_t, aligned_temp)[sizeof(DCTELEM)*64*2/8];
DCTELEM * const temp= (DCTELEM*)aligned_temp;
DCTELEM * const bak = ((DCTELEM*)aligned_temp)+64;
int sum=0, i;
......@@ -3895,9 +3895,9 @@ static int quant_psnr8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *s
static int rd8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){
MpegEncContext * const s= (MpegEncContext *)c;
const uint8_t *scantable= s->intra_scantable.permutated;
DECLARE_ALIGNED_16(uint64_t, aligned_temp[sizeof(DCTELEM)*64/8]);
DECLARE_ALIGNED_16(uint64_t, aligned_src1[8]);
DECLARE_ALIGNED_16(uint64_t, aligned_src2[8]);
DECLARE_ALIGNED_16(uint64_t, aligned_temp)[sizeof(DCTELEM)*64/8];
DECLARE_ALIGNED_16(uint64_t, aligned_src1)[8];
DECLARE_ALIGNED_16(uint64_t, aligned_src2)[8];
DCTELEM * const temp= (DCTELEM*)aligned_temp;
uint8_t * const lsrc1 = (uint8_t*)aligned_src1;
uint8_t * const lsrc2 = (uint8_t*)aligned_src2;
......@@ -3974,7 +3974,7 @@ static int rd8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int
static int bit8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){
MpegEncContext * const s= (MpegEncContext *)c;
const uint8_t *scantable= s->intra_scantable.permutated;
DECLARE_ALIGNED_16(uint64_t, aligned_temp[sizeof(DCTELEM)*64/8]);
DECLARE_ALIGNED_16(uint64_t, aligned_temp)[sizeof(DCTELEM)*64/8];
DCTELEM * const temp= (DCTELEM*)aligned_temp;
int i, last, run, bits, level, start_i;
const int esc_length= s->ac_esc_length;
......
......@@ -178,7 +178,7 @@ typedef struct ScanTable{
uint8_t raster_end[64];
#if ARCH_PPC
/** Used by dct_quantize_altivec to find last-non-zero */
DECLARE_ALIGNED(16, uint8_t, inverse[64]);
DECLARE_ALIGNED(16, uint8_t, inverse)[64];
#endif
} ScanTable;
......@@ -656,8 +656,8 @@ void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx);
void dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx);
void dsputil_init_vis(DSPContext* c, AVCodecContext *avctx);
#define DECLARE_ALIGNED_16(t, v) DECLARE_ALIGNED(16, t, v)
#define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(8, t, v)
#define DECLARE_ALIGNED_16(t, v, ...) DECLARE_ALIGNED(16, t, v)
#define DECLARE_ALIGNED_8(t, v, ...) DECLARE_ALIGNED(8, t, v)
#if HAVE_MMX
......@@ -749,11 +749,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);
......
......@@ -532,9 +532,9 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg)
PutBitContext pb, vs_pb;
GetBitContext gb;
BlockInfo mb_data[5 * DV_MAX_BPM], *mb, *mb1;
DECLARE_ALIGNED_16(DCTELEM, sblock[5*DV_MAX_BPM][64]);
DECLARE_ALIGNED_16(uint8_t, mb_bit_buffer[80 + 4]); /* allow some slack */
DECLARE_ALIGNED_16(uint8_t, vs_bit_buffer[5 * 80 + 4]); /* allow some slack */
DECLARE_ALIGNED_16(DCTELEM, sblock)[5*DV_MAX_BPM][64];
DECLARE_ALIGNED_16(uint8_t, mb_bit_buffer)[80 + 4]; /* allow some slack */
DECLARE_ALIGNED_16(uint8_t, vs_bit_buffer)[5 * 80 + 4]; /* allow some slack */
const int log2_blocksize = 3-s->avctx->lowres;
int is_field_mode[5];
......@@ -833,7 +833,7 @@ static av_always_inline int dv_init_enc_block(EncBlockInfo* bi, uint8_t *data, i
{
const int *weight;
const uint8_t* zigzag_scan;
DECLARE_ALIGNED_16(DCTELEM, blk[64]);
DECLARE_ALIGNED_16(DCTELEM, blk)[64];
int i, area;
/* We offer two different methods for class number assignment: the
method suggested in SMPTE 314M Table 22, and an improved
......
......@@ -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)
......
......@@ -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){
......
......@@ -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)
......
......@@ -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_8(int16_t, mv_cache[2][5*8][2]);
DECLARE_ALIGNED_8(int8_t, ref_cache[2][5*8]);
DECLARE_ALIGNED_8(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
......@@ -377,7 +377,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];
//POC stuff
int poc_lsb;
......@@ -456,7 +456,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
/**
......@@ -475,7 +475,7 @@ typedef struct H264Context{
uint8_t *chroma_pred_mode_table;
int last_qscale_diff;
int16_t (*mvd_table[2])[2];
DECLARE_ALIGNED_8(int16_t, mvd_cache[2][5*8][2]);
DECLARE_ALIGNED_8(int16_t, mvd_cache)[2][5*8][2];
uint8_t *direct_table;
uint8_t direct_cache[5*8];
......
......@@ -1041,7 +1041,7 @@ static av_always_inline int get_cabac_cbf_ctx( H264Context *h, int cat, int idx,
return ctx + 4 * cat;
}
DECLARE_ASM_CONST(1, uint8_t, last_coeff_flag_offset_8x8[63]) = {
DECLARE_ASM_CONST(1, uint8_t, last_coeff_flag_offset_8x8)[63] = {
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,
......
......@@ -372,7 +372,7 @@ void ff_h264_filter_mb_fast( H264Context *h, int mb_x, int mb_y, uint8_t *img_y,
filter_mb_edgech( &img_cr[2*2*uvlinesize], uvlinesize, bS3, qpc, h);
return;
} else {
DECLARE_ALIGNED_8(int16_t, bS[2][4][4]);
DECLARE_ALIGNED_8(int16_t, bS)[2][4][4];
uint64_t (*bSv)[4] = (uint64_t(*)[4])bS;
int edges;
if( IS_8x8DCT(mb_type) && (h->cbp&7) == 7 ) {
......@@ -457,7 +457,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]) ) {
*(uint64_t*)bS= 0x0003000300030003ULL;
......@@ -488,7 +488,7 @@ static av_always_inline void filter_mb_dir(H264Context *h, int mb_x, int mb_y, u
/* mbn_xy: neighbor macroblock */
const int mbn_xy = edge > 0 ? mb_xy : mbm_xy;
const int mbn_type = s->current_picture.mb_type[mbn_xy];
DECLARE_ALIGNED_8(int16_t, bS[4]);
DECLARE_ALIGNED_8(int16_t, bS)[4];
int qp;
if( (edge&1) && IS_8x8DCT(mb_type) )
......@@ -632,7 +632,7 @@ void ff_h264_filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint
*/
const int pair_xy = mb_x + (mb_y&~1)*s->mb_stride;
const int left_mb_xy[2] = { pair_xy-1, pair_xy-1+s->mb_stride };
DECLARE_ALIGNED_8(int16_t, bS[8]);
DECLARE_ALIGNED_8(int16_t, bS)[8];
int qp[2];
int bqp[2];
int rqp[2];
......
......@@ -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];
......