Use DECLARE_ALIGNED to ease porting

Originally committed as revision 9031 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Reimar Döffinger 2007-05-15 20:47:55 +00:00
parent b9a793eec8
commit c6bcbb2cd3
2 changed files with 7 additions and 7 deletions

View File

@ -79,9 +79,9 @@ typedef struct MPADecodeContext {
int mode; int mode;
int mode_ext; int mode_ext;
int lsf; int lsf;
MPA_INT synth_buf[MPA_MAX_CHANNELS][512 * 2] __attribute__((aligned(16))); DECLARE_ALIGNED_16(MPA_INT, synth_buf[MPA_MAX_CHANNELS][512 * 2]);
int synth_buf_offset[MPA_MAX_CHANNELS]; int synth_buf_offset[MPA_MAX_CHANNELS];
int32_t sb_samples[MPA_MAX_CHANNELS][36][SBLIMIT] __attribute__((aligned(16))); 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 */ int32_t mdct_buf[MPA_MAX_CHANNELS][SBLIMIT * 18]; /* previous samples, for layer 3 MDCT */
#ifdef DEBUG #ifdef DEBUG
int frame_count; int frame_count;
@ -170,7 +170,7 @@ static const int32_t scale_factor_mult2[3][3] = {
SCALE_GEN(4.0 / 9.0), /* 9 steps */ SCALE_GEN(4.0 / 9.0), /* 9 steps */
}; };
static MPA_INT window[512] __attribute__((aligned(16))); static DECLARE_ALIGNED_16(MPA_INT, window[512]);
/* layer 1 unscaling */ /* layer 1 unscaling */
/* n = number of bits of the mantissa minus 1 */ /* n = number of bits of the mantissa minus 1 */

View File

@ -129,7 +129,7 @@ typedef struct {
} QDM2Complex; } QDM2Complex;
typedef struct { typedef struct {
QDM2Complex complex[256 + 1] __attribute__((aligned(16))); DECLARE_ALIGNED_16(QDM2Complex, complex[256 + 1]);
float samples_im[MPA_MAX_CHANNELS][256]; float samples_im[MPA_MAX_CHANNELS][256];
float samples_re[MPA_MAX_CHANNELS][256]; float samples_re[MPA_MAX_CHANNELS][256];
} QDM2FFT; } QDM2FFT;
@ -182,9 +182,9 @@ typedef struct {
float output_buffer[1024]; float output_buffer[1024];
/// Synthesis filter /// Synthesis filter
MPA_INT synth_buf[MPA_MAX_CHANNELS][512*2] __attribute__((aligned(16))); DECLARE_ALIGNED_16(MPA_INT, synth_buf[MPA_MAX_CHANNELS][512*2]);
int synth_buf_offset[MPA_MAX_CHANNELS]; int synth_buf_offset[MPA_MAX_CHANNELS];
int32_t sb_samples[MPA_MAX_CHANNELS][128][SBLIMIT] __attribute__((aligned(16))); DECLARE_ALIGNED_16(int32_t, sb_samples[MPA_MAX_CHANNELS][128][SBLIMIT]);
/// Mixed temporary data used in decoding /// Mixed temporary data used in decoding
float tone_level[MPA_MAX_CHANNELS][30][64]; float tone_level[MPA_MAX_CHANNELS][30][64];
@ -229,7 +229,7 @@ static uint8_t random_dequant_index[256][5];
static uint8_t random_dequant_type24[128][3]; static uint8_t random_dequant_type24[128][3];
static float noise_samples[128]; static float noise_samples[128];
static MPA_INT mpa_window[512] __attribute__((aligned(16))); static DECLARE_ALIGNED_16(MPA_INT, mpa_window[512]);
static void softclip_table_init(void) { static void softclip_table_init(void) {