From 5e6b9f7ed442264c91292d6312a35a8b2fdfa72a Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Mon, 22 Nov 2010 23:41:57 +0000 Subject: Use MEM_ALIGN_ATTR in libatrac3. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28643 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/atrac3_rm.c | 2 +- apps/codecs/libatrac/atrac3.c | 16 +++++++++------- apps/codecs/libatrac/atrac3.h | 12 ++++++------ apps/codecs/libatrac/atrac3data_fixed.h | 2 +- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/apps/codecs/atrac3_rm.c b/apps/codecs/atrac3_rm.c index bad9831a25..6c559ec868 100644 --- a/apps/codecs/atrac3_rm.c +++ b/apps/codecs/atrac3_rm.c @@ -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) { diff --git a/apps/codecs/libatrac/atrac3.c b/apps/codecs/libatrac/atrac3.c index 499a9f6572..be41df5aad 100644 --- a/apps/codecs/libatrac/atrac3.c +++ b/apps/codecs/libatrac/atrac3.c @@ -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; diff --git a/apps/codecs/libatrac/atrac3.h b/apps/codecs/libatrac/atrac3.h index afe582ab72..941bb6d2ad 100644 --- a/apps/codecs/libatrac/atrac3.h +++ b/apps/codecs/libatrac/atrac3.h @@ -61,13 +61,13 @@ typedef struct { int32_t *spectrum; int32_t *IMDCT_buf; - int32_t delayBuf1[46]; ///