comparison wmadec.c @ 3089:072dbc669253 libavcodec

MSVC-compatible __align8/__align16 declaration patch by Steve Lhomme, steve .dot. lhomme .at. free .dot. fr
author diego
date Sun, 05 Feb 2006 13:35:17 +0000
parents 0b546eab515d
children ab01ee59324f
comparison
equal deleted inserted replaced
3088:03582724f3de 3089:072dbc669253
100 int block_len; /* block length in samples */ 100 int block_len; /* block length in samples */
101 int block_num; /* block number in current frame */ 101 int block_num; /* block number in current frame */
102 int block_pos; /* current position in frame */ 102 int block_pos; /* current position in frame */
103 uint8_t ms_stereo; /* true if mid/side stereo mode */ 103 uint8_t ms_stereo; /* true if mid/side stereo mode */
104 uint8_t channel_coded[MAX_CHANNELS]; /* true if channel is coded */ 104 uint8_t channel_coded[MAX_CHANNELS]; /* true if channel is coded */
105 float exponents[MAX_CHANNELS][BLOCK_MAX_SIZE] __attribute__((aligned(16))); 105 DECLARE_ALIGNED_16(float, exponents[MAX_CHANNELS][BLOCK_MAX_SIZE]);
106 float max_exponent[MAX_CHANNELS]; 106 float max_exponent[MAX_CHANNELS];
107 int16_t coefs1[MAX_CHANNELS][BLOCK_MAX_SIZE]; 107 int16_t coefs1[MAX_CHANNELS][BLOCK_MAX_SIZE];
108 float coefs[MAX_CHANNELS][BLOCK_MAX_SIZE] __attribute__((aligned(16))); 108 DECLARE_ALIGNED_16(float, coefs[MAX_CHANNELS][BLOCK_MAX_SIZE]);
109 MDCTContext mdct_ctx[BLOCK_NB_SIZES]; 109 MDCTContext mdct_ctx[BLOCK_NB_SIZES];
110 float *windows[BLOCK_NB_SIZES]; 110 float *windows[BLOCK_NB_SIZES];
111 FFTSample mdct_tmp[BLOCK_MAX_SIZE] __attribute__((aligned(16))); /* temporary storage for imdct */ 111 DECLARE_ALIGNED_16(FFTSample, mdct_tmp[BLOCK_MAX_SIZE]); /* temporary storage for imdct */
112 /* output buffer for one frame and the last for IMDCT windowing */ 112 /* output buffer for one frame and the last for IMDCT windowing */
113 float frame_out[MAX_CHANNELS][BLOCK_MAX_SIZE * 2] __attribute__((aligned(16))); 113 DECLARE_ALIGNED_16(float, frame_out[MAX_CHANNELS][BLOCK_MAX_SIZE * 2]);
114 /* last frame info */ 114 /* last frame info */
115 uint8_t last_superframe[MAX_CODED_SUPERFRAME_SIZE + 4]; /* padding added */ 115 uint8_t last_superframe[MAX_CODED_SUPERFRAME_SIZE + 4]; /* padding added */
116 int last_bitoffset; 116 int last_bitoffset;
117 int last_superframe_len; 117 int last_superframe_len;
118 float noise_table[NOISE_TAB_SIZE]; 118 float noise_table[NOISE_TAB_SIZE];
1095 } 1095 }
1096 1096
1097 1097
1098 for(ch = 0; ch < s->nb_channels; ch++) { 1098 for(ch = 0; ch < s->nb_channels; ch++) {
1099 if (s->channel_coded[ch]) { 1099 if (s->channel_coded[ch]) {
1100 FFTSample output[BLOCK_MAX_SIZE * 2] __attribute__((aligned(16))); 1100 DECLARE_ALIGNED_16(FFTSample, output[BLOCK_MAX_SIZE * 2]);
1101 float *ptr; 1101 float *ptr;
1102 int i, n4, index, n; 1102 int i, n4, index, n;
1103 1103
1104 n = s->block_len; 1104 n = s->block_len;
1105 n4 = s->block_len / 2; 1105 n4 = s->block_len / 2;