diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2009-08-30 14:14:22 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2009-08-30 14:14:22 +0000 |
commit | 2dbb424eb934bfb5516aef96d541098348c058a0 (patch) | |
tree | 68b9ad1858ab2ae0c67c64b86e9bf9e70ee6434f /apps/codecs/libatrac/atrac3.h | |
parent | 2a49ff672edaaff5978ca9ef0f75edb5bca49a1a (diff) | |
download | rockbox-2dbb424eb934bfb5516aef96d541098348c058a0.tar.gz rockbox-2dbb424eb934bfb5516aef96d541098348c058a0.zip |
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
Diffstat (limited to 'apps/codecs/libatrac/atrac3.h')
-rw-r--r-- | apps/codecs/libatrac/atrac3.h | 11 |
1 files changed, 9 insertions, 2 deletions
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 @@ | |||
1 | #include "ffmpeg_bitstream.h" | 1 | #include "ffmpeg_bitstream.h" |
2 | #include "../librm/rm.h" | 2 | #include "../librm/rm.h" |
3 | 3 | ||
4 | #if (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) || (CONFIG_CPU == MCF5250) | ||
5 | /* PP5022/24 and MCF5250 have larger IRAM */ | ||
6 | #define IBSS_ATTR_LARGE_IRAM IBSS_ATTR | ||
7 | #else | ||
8 | /* other CPUs IRAM is not large enough */ | ||
9 | #define IBSS_ATTR_LARGE_IRAM | ||
10 | #endif | ||
11 | |||
4 | /* These structures are needed to store the parsed gain control data. */ | 12 | /* These structures are needed to store the parsed gain control data. */ |
5 | typedef struct { | 13 | typedef struct { |
6 | int num_gain_data; | 14 | int num_gain_data; |
@@ -75,6 +83,5 @@ typedef struct { | |||
75 | int atrac3_decode_init(ATRAC3Context *q, RMContext *rmctx); | 83 | int atrac3_decode_init(ATRAC3Context *q, RMContext *rmctx); |
76 | 84 | ||
77 | int atrac3_decode_frame(RMContext *rmctx, ATRAC3Context *q, | 85 | int atrac3_decode_frame(RMContext *rmctx, ATRAC3Context *q, |
78 | void *data, int *data_size, | 86 | int *data_size, const uint8_t *buf, int buf_size); |
79 | const uint8_t *buf, int buf_size); | ||
80 | 87 | ||