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
This commit is contained in:
Andree Buschmann 2008-05-17 11:11:01 +00:00
parent ab46e463bd
commit ff78cd8418
3 changed files with 17 additions and 3 deletions

View file

@ -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];

View file

@ -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

View file

@ -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;