diff options
-rw-r--r-- | apps/codecs/atrac3_rm.c | 2 | ||||
-rw-r--r-- | apps/codecs/libatrac/atrac3.c | 16 | ||||
-rw-r--r-- | apps/codecs/libatrac/atrac3.h | 12 | ||||
-rw-r--r-- | 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 | |||
30 | 30 | ||
31 | static RMContext rmctx; | 31 | static RMContext rmctx; |
32 | static RMPacket pkt; | 32 | static RMPacket pkt; |
33 | static ATRAC3Context q IBSS_ATTR __attribute__ ((aligned (32))); | 33 | static ATRAC3Context q IBSS_ATTR; |
34 | 34 | ||
35 | static void init_rm(RMContext *rmctx) | 35 | static void init_rm(RMContext *rmctx) |
36 | { | 36 | { |
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 @@ | |||
54 | #define FFMIN(a,b) ((a) > (b) ? (b) : (a)) | 54 | #define FFMIN(a,b) ((a) > (b) ? (b) : (a)) |
55 | #define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0) | 55 | #define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0) |
56 | 56 | ||
57 | static VLC spectral_coeff_tab[7]; | 57 | #if defined(CPU_ARM) && (ARM_ARCH >= 5) |
58 | #if defined(CPU_ARM) && (ARM_ARCH >= 5) /*ARMv5e+ uses 32x16 multiplication*/ | 58 | #define QMFWIN_TYPE int16_t /* ARMv5e+ uses 32x16 multiplication */ |
59 | static int16_t qmf_window[48] IBSS_ATTR __attribute__ ((aligned (32))); | ||
60 | #else | 59 | #else |
61 | static int32_t qmf_window[48] IBSS_ATTR __attribute__ ((aligned (16))); | 60 | #define QMFWIN_TYPE int32_t |
62 | #endif | 61 | #endif |
63 | static int32_t atrac3_spectrum [2][1024] IBSS_ATTR __attribute__((aligned(16))); | 62 | |
64 | static int32_t atrac3_IMDCT_buf[2][ 512] IBSS_ATTR __attribute__((aligned(16))); | 63 | static VLC spectral_coeff_tab[7]; |
65 | static int32_t atrac3_prevFrame[2][1024] IBSS_ATTR; | 64 | static QMFWIN_TYPE qmf_window[48] IBSS_ATTR MEM_ALIGN_ATTR; |
65 | static int32_t atrac3_spectrum [2][1024] IBSS_ATTR MEM_ALIGN_ATTR; | ||
66 | static int32_t atrac3_IMDCT_buf[2][ 512] IBSS_ATTR MEM_ALIGN_ATTR; | ||
67 | static int32_t atrac3_prevFrame[2][1024] IBSS_ATTR MEM_ALIGN_ATTR; | ||
66 | static channel_unit channel_units[2] IBSS_ATTR_LARGE_IRAM; | 68 | static channel_unit channel_units[2] IBSS_ATTR_LARGE_IRAM; |
67 | 69 | ||
68 | 70 | ||
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 { | |||
61 | int32_t *spectrum; | 61 | int32_t *spectrum; |
62 | int32_t *IMDCT_buf; | 62 | int32_t *IMDCT_buf; |
63 | 63 | ||
64 | int32_t delayBuf1[46]; ///<qmf delay buffers | 64 | int32_t delayBuf1[46] MEM_ALIGN_ATTR; ///<qmf delay buffers |
65 | int32_t delayBuf2[46]; | 65 | int32_t delayBuf2[46] MEM_ALIGN_ATTR; |
66 | int32_t delayBuf3[46]; | 66 | int32_t delayBuf3[46] MEM_ALIGN_ATTR; |
67 | } channel_unit; | 67 | } channel_unit; |
68 | 68 | ||
69 | typedef struct { | 69 | typedef struct { |
70 | int32_t outSamples[2048]; | 70 | int32_t outSamples[2048] MEM_ALIGN_ATTR; |
71 | GetBitContext gb; | 71 | GetBitContext gb; |
72 | //@{ | 72 | //@{ |
73 | /** stream data */ | 73 | /** stream data */ |
@@ -92,8 +92,8 @@ typedef struct { | |||
92 | //@} | 92 | //@} |
93 | //@{ | 93 | //@{ |
94 | /** data buffers */ | 94 | /** data buffers */ |
95 | uint8_t decoded_bytes_buffer[1024]; | 95 | uint8_t decoded_bytes_buffer[1024] MEM_ALIGN_ATTR; |
96 | int32_t tempBuf[1070]; | 96 | int32_t tempBuf[1070] MEM_ALIGN_ATTR; |
97 | //@} | 97 | //@} |
98 | //@{ | 98 | //@{ |
99 | /** extradata */ | 99 | /** extradata */ |
diff --git a/apps/codecs/libatrac/atrac3data_fixed.h b/apps/codecs/libatrac/atrac3data_fixed.h index b733ee71c4..9eb79731ce 100644 --- a/apps/codecs/libatrac/atrac3data_fixed.h +++ b/apps/codecs/libatrac/atrac3data_fixed.h | |||
@@ -52,7 +52,7 @@ static const int32_t qmf_48tap_half_fix[24] = { | |||
52 | 52 | ||
53 | /* mdct window scaled by 2^31 */ | 53 | /* mdct window scaled by 2^31 */ |
54 | /* Remark: The preceding sign corrects the sign of the hexadecimal values */ | 54 | /* Remark: The preceding sign corrects the sign of the hexadecimal values */ |
55 | static const int32_t window_lookup[128] ICONST_ATTR = { | 55 | static const int32_t window_lookup[128] ICONST_ATTR MEM_ALIGN_ATTR = { |
56 | -0xffffb10c, -0xfffd394b, -0xfff8494f, -0xfff0e025, -0xffe6fc5f, -0xffda9c15, | 56 | -0xffffb10c, -0xfffd394b, -0xfff8494f, -0xfff0e025, -0xffe6fc5f, -0xffda9c15, |
57 | -0xffcbbce6, -0xffba5bf4, -0xffa675e8, -0xff9006f0, -0xff770aba, -0xff5b7c7e, | 57 | -0xffcbbce6, -0xffba5bf4, -0xffa675e8, -0xff9006f0, -0xff770aba, -0xff5b7c7e, |
58 | -0xff3d56f2, -0xff1c9452, -0xfef92e59, -0xfed31e45, -0xfeaa5cd5, -0xfe7ee247, | 58 | -0xff3d56f2, -0xff1c9452, -0xfef92e59, -0xfed31e45, -0xfeaa5cd5, -0xfe7ee247, |