From 2dbb424eb934bfb5516aef96d541098348c058a0 Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Sun, 30 Aug 2009 14:14:22 +0000 Subject: Further performance optimization of the atrac3 decoder. Rework the internal sample representation and usage of dsp routines. For now a quick and dirty solution is used to add a fract part of 2 bits. Through this several buffers and functions as well as copy loops could be removed. Furthermore add some ASM for coldfire and place some additional data in IRAM on PP5022/24 and X5/M5. Speedup on ARM: +3%, speedup on Coldfire: +639%. Both ARM and Coldfire can decode in realtime now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22561 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libatrac/atrac3.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'apps/codecs/libatrac/atrac3.h') diff --git a/apps/codecs/libatrac/atrac3.h b/apps/codecs/libatrac/atrac3.h index f81fc0a734..a817db2b55 100644 --- a/apps/codecs/libatrac/atrac3.h +++ b/apps/codecs/libatrac/atrac3.h @@ -1,6 +1,14 @@ #include "ffmpeg_bitstream.h" #include "../librm/rm.h" +#if (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) || (CONFIG_CPU == MCF5250) +/* PP5022/24 and MCF5250 have larger IRAM */ +#define IBSS_ATTR_LARGE_IRAM IBSS_ATTR +#else +/* other CPUs IRAM is not large enough */ +#define IBSS_ATTR_LARGE_IRAM +#endif + /* These structures are needed to store the parsed gain control data. */ typedef struct { int num_gain_data; @@ -75,6 +83,5 @@ typedef struct { int atrac3_decode_init(ATRAC3Context *q, RMContext *rmctx); int atrac3_decode_frame(RMContext *rmctx, ATRAC3Context *q, - void *data, int *data_size, - const uint8_t *buf, int buf_size); + int *data_size, const uint8_t *buf, int buf_size); -- cgit v1.2.3