diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2008-05-17 11:11:01 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2008-05-17 11:11:01 +0000 |
commit | ff78cd84185e44943feca14671b111339030809f (patch) | |
tree | 5cd1e05e68d4ac6d415cfb16426b9b1c7f05f22e /apps/codecs | |
parent | ab46e463bdd4df6f2f956179da4ef8b619f83f50 (diff) | |
download | rockbox-ff78cd84185e44943feca14671b111339030809f.tar.gz rockbox-ff78cd84185e44943feca14671b111339030809f.zip |
Commit FS#9000. Speed up Musepack decoder by 3% on PP5022/24 via using ICODE_ATTR for calc_new_V(). Additionally correct a type in decoder-struct.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17552 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
-rw-r--r-- | apps/codecs/libmusepack/decoder.h | 2 | ||||
-rw-r--r-- | apps/codecs/libmusepack/musepack.h | 10 | ||||
-rw-r--r-- | apps/codecs/libmusepack/synth_filter.c | 8 |
3 files changed, 17 insertions, 3 deletions
diff --git a/apps/codecs/libmusepack/decoder.h b/apps/codecs/libmusepack/decoder.h index e36425bd1e..1f78d53c8d 100644 --- a/apps/codecs/libmusepack/decoder.h +++ b/apps/codecs/libmusepack/decoder.h | |||
@@ -113,7 +113,7 @@ typedef struct mpc_decoder_t { | |||
113 | mpc_uint8_t SeekTable_Step; | 113 | mpc_uint8_t SeekTable_Step; |
114 | 114 | ||
115 | #ifdef MPC_FIXED_POINT | 115 | #ifdef MPC_FIXED_POINT |
116 | unsigned char SCF_shift[256]; | 116 | mpc_uint8_t SCF_shift[256]; |
117 | #endif | 117 | #endif |
118 | 118 | ||
119 | MPC_SAMPLE_FORMAT V_L[MPC_V_MEM + 960]; | 119 | MPC_SAMPLE_FORMAT V_L[MPC_V_MEM + 960]; |
diff --git a/apps/codecs/libmusepack/musepack.h b/apps/codecs/libmusepack/musepack.h index 5d1ad0de3f..9bdebf8b04 100644 --- a/apps/codecs/libmusepack/musepack.h +++ b/apps/codecs/libmusepack/musepack.h | |||
@@ -66,6 +66,16 @@ extern "C" { | |||
66 | #endif | 66 | #endif |
67 | #endif | 67 | #endif |
68 | 68 | ||
69 | #ifndef ICODE_ATTR_MPC_LARGE_IRAM | ||
70 | #if (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) | ||
71 | /* PP5022/24 have 128KB of IRAM and have better performance with ICODE_ATTR */ | ||
72 | #define ICODE_ATTR_MPC_LARGE_IRAM ICODE_ATTR | ||
73 | #else | ||
74 | /* all other targets either haven't enough IRAM or performance suffers */ | ||
75 | #define ICODE_ATTR_MPC_LARGE_IRAM | ||
76 | #endif | ||
77 | #endif | ||
78 | |||
69 | #ifdef ROCKBOX_LITTLE_ENDIAN | 79 | #ifdef ROCKBOX_LITTLE_ENDIAN |
70 | #define MPC_LITTLE_ENDIAN | 80 | #define MPC_LITTLE_ENDIAN |
71 | #endif | 81 | #endif |
diff --git a/apps/codecs/libmusepack/synth_filter.c b/apps/codecs/libmusepack/synth_filter.c index aed5d75fb1..faf014c90d 100644 --- a/apps/codecs/libmusepack/synth_filter.c +++ b/apps/codecs/libmusepack/synth_filter.c | |||
@@ -198,7 +198,11 @@ static const MPC_SAMPLE_FORMAT Di_opt [32] [16] ICONST_ATTR = { | |||
198 | #define INVCOS30 MPC_MAKE_INVCOS( 684664578) | 198 | #define INVCOS30 MPC_MAKE_INVCOS( 684664578) |
199 | #define INVCOS31 MPC_MAKE_INVCOS(1367679739) | 199 | #define INVCOS31 MPC_MAKE_INVCOS(1367679739) |
200 | 200 | ||
201 | static inline void | 201 | void |
202 | mpc_calculate_new_V ( const MPC_SAMPLE_FORMAT * Sample, MPC_SAMPLE_FORMAT * V ) | ||
203 | ICODE_ATTR_MPC_LARGE_IRAM; | ||
204 | |||
205 | void | ||
202 | mpc_calculate_new_V ( const MPC_SAMPLE_FORMAT * Sample, MPC_SAMPLE_FORMAT * V ) | 206 | mpc_calculate_new_V ( const MPC_SAMPLE_FORMAT * Sample, MPC_SAMPLE_FORMAT * V ) |
203 | { | 207 | { |
204 | // Calculating new V-buffer values for left channel | 208 | // Calculating new V-buffer values for left channel |
@@ -453,7 +457,7 @@ mpc_calculate_new_V ( const MPC_SAMPLE_FORMAT * Sample, MPC_SAMPLE_FORMAT * V ) | |||
453 | // total: 111 adds, 107 subs, 80 muls, 80 shifts | 457 | // total: 111 adds, 107 subs, 80 muls, 80 shifts |
454 | } | 458 | } |
455 | 459 | ||
456 | static inline void | 460 | static void |
457 | mpc_decoder_windowing_D(MPC_SAMPLE_FORMAT * Data, const MPC_SAMPLE_FORMAT * V) | 461 | mpc_decoder_windowing_D(MPC_SAMPLE_FORMAT * Data, const MPC_SAMPLE_FORMAT * V) |
458 | { | 462 | { |
459 | const MPC_SAMPLE_FORMAT *D = (const MPC_SAMPLE_FORMAT *) &Di_opt; | 463 | const MPC_SAMPLE_FORMAT *D = (const MPC_SAMPLE_FORMAT *) &Di_opt; |