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.zip rockbox-ff78cd84185e44943feca14671b111339030809f.tar.gz rockbox-ff78cd84185e44943feca14671b111339030809f.tar.bz2 rockbox-ff78cd84185e44943feca14671b111339030809f.tar.xz | |
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 e36425b..1f78d53 100644 --- a/apps/codecs/libmusepack/decoder.h +++ b/apps/codecs/libmusepack/decoder.h @@ -113,7 +113,7 @@ typedef struct mpc_decoder_t { mpc_uint8_t SeekTable_Step; #ifdef MPC_FIXED_POINT - unsigned char SCF_shift[256]; + mpc_uint8_t SCF_shift[256]; #endif MPC_SAMPLE_FORMAT V_L[MPC_V_MEM + 960]; diff --git a/apps/codecs/libmusepack/musepack.h b/apps/codecs/libmusepack/musepack.h index 5d1ad0d..9bdebf8 100644 --- a/apps/codecs/libmusepack/musepack.h +++ b/apps/codecs/libmusepack/musepack.h @@ -66,6 +66,16 @@ extern "C" { #endif #endif +#ifndef ICODE_ATTR_MPC_LARGE_IRAM +#if (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) +/* PP5022/24 have 128KB of IRAM and have better performance with ICODE_ATTR */ +#define ICODE_ATTR_MPC_LARGE_IRAM ICODE_ATTR +#else +/* all other targets either haven't enough IRAM or performance suffers */ +#define ICODE_ATTR_MPC_LARGE_IRAM +#endif +#endif + #ifdef ROCKBOX_LITTLE_ENDIAN #define MPC_LITTLE_ENDIAN #endif diff --git a/apps/codecs/libmusepack/synth_filter.c b/apps/codecs/libmusepack/synth_filter.c index aed5d75..faf014c 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 = { #define INVCOS30 MPC_MAKE_INVCOS( 684664578) #define INVCOS31 MPC_MAKE_INVCOS(1367679739) -static inline void +void +mpc_calculate_new_V ( const MPC_SAMPLE_FORMAT * Sample, MPC_SAMPLE_FORMAT * V ) +ICODE_ATTR_MPC_LARGE_IRAM; + +void mpc_calculate_new_V ( const MPC_SAMPLE_FORMAT * Sample, MPC_SAMPLE_FORMAT * V ) { // 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 ) // total: 111 adds, 107 subs, 80 muls, 80 shifts } -static inline void +static void mpc_decoder_windowing_D(MPC_SAMPLE_FORMAT * Data, const MPC_SAMPLE_FORMAT * V) { const MPC_SAMPLE_FORMAT *D = (const MPC_SAMPLE_FORMAT *) &Di_opt; |