Use MEM_ALIGN_ATTR in libatrac3.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28643 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Andree Buschmann 2010-11-22 23:41:57 +00:00
parent dedffd3f40
commit 5e6b9f7ed4
4 changed files with 17 additions and 15 deletions

View file

@ -30,7 +30,7 @@ CODEC_HEADER
static RMContext rmctx;
static RMPacket pkt;
static ATRAC3Context q IBSS_ATTR __attribute__ ((aligned (32)));
static ATRAC3Context q IBSS_ATTR;
static void init_rm(RMContext *rmctx)
{

View file

@ -54,15 +54,17 @@
#define FFMIN(a,b) ((a) > (b) ? (b) : (a))
#define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)
static VLC spectral_coeff_tab[7];
#if defined(CPU_ARM) && (ARM_ARCH >= 5) /*ARMv5e+ uses 32x16 multiplication*/
static int16_t qmf_window[48] IBSS_ATTR __attribute__ ((aligned (32)));
#if defined(CPU_ARM) && (ARM_ARCH >= 5)
#define QMFWIN_TYPE int16_t /* ARMv5e+ uses 32x16 multiplication */
#else
static int32_t qmf_window[48] IBSS_ATTR __attribute__ ((aligned (16)));
#define QMFWIN_TYPE int32_t
#endif
static int32_t atrac3_spectrum [2][1024] IBSS_ATTR __attribute__((aligned(16)));
static int32_t atrac3_IMDCT_buf[2][ 512] IBSS_ATTR __attribute__((aligned(16)));
static int32_t atrac3_prevFrame[2][1024] IBSS_ATTR;
static VLC spectral_coeff_tab[7];
static QMFWIN_TYPE qmf_window[48] IBSS_ATTR MEM_ALIGN_ATTR;
static int32_t atrac3_spectrum [2][1024] IBSS_ATTR MEM_ALIGN_ATTR;
static int32_t atrac3_IMDCT_buf[2][ 512] IBSS_ATTR MEM_ALIGN_ATTR;
static int32_t atrac3_prevFrame[2][1024] IBSS_ATTR MEM_ALIGN_ATTR;
static channel_unit channel_units[2] IBSS_ATTR_LARGE_IRAM;

View file

@ -61,13 +61,13 @@ typedef struct {
int32_t *spectrum;
int32_t *IMDCT_buf;
int32_t delayBuf1[46]; ///<qmf delay buffers
int32_t delayBuf2[46];
int32_t delayBuf3[46];
int32_t delayBuf1[46] MEM_ALIGN_ATTR; ///<qmf delay buffers
int32_t delayBuf2[46] MEM_ALIGN_ATTR;
int32_t delayBuf3[46] MEM_ALIGN_ATTR;
} channel_unit;
typedef struct {
int32_t outSamples[2048];
int32_t outSamples[2048] MEM_ALIGN_ATTR;
GetBitContext gb;
//@{
/** stream data */
@ -92,8 +92,8 @@ typedef struct {
//@}
//@{
/** data buffers */
uint8_t decoded_bytes_buffer[1024];
int32_t tempBuf[1070];
uint8_t decoded_bytes_buffer[1024] MEM_ALIGN_ATTR;
int32_t tempBuf[1070] MEM_ALIGN_ATTR;
//@}
//@{
/** extradata */

View file

@ -52,7 +52,7 @@ static const int32_t qmf_48tap_half_fix[24] = {
/* mdct window scaled by 2^31 */
/* Remark: The preceding sign corrects the sign of the hexadecimal values */
static const int32_t window_lookup[128] ICONST_ATTR = {
static const int32_t window_lookup[128] ICONST_ATTR MEM_ALIGN_ATTR = {
-0xffffb10c, -0xfffd394b, -0xfff8494f, -0xfff0e025, -0xffe6fc5f, -0xffda9c15,
-0xffcbbce6, -0xffba5bf4, -0xffa675e8, -0xff9006f0, -0xff770aba, -0xff5b7c7e,
-0xff3d56f2, -0xff1c9452, -0xfef92e59, -0xfed31e45, -0xfeaa5cd5, -0xfe7ee247,