forked from len0rd/rockbox
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:
parent
ab46e463bd
commit
ff78cd8418
3 changed files with 17 additions and 3 deletions
|
|
@ -113,7 +113,7 @@ typedef struct mpc_decoder_t {
|
||||||
mpc_uint8_t SeekTable_Step;
|
mpc_uint8_t SeekTable_Step;
|
||||||
|
|
||||||
#ifdef MPC_FIXED_POINT
|
#ifdef MPC_FIXED_POINT
|
||||||
unsigned char SCF_shift[256];
|
mpc_uint8_t SCF_shift[256];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
MPC_SAMPLE_FORMAT V_L[MPC_V_MEM + 960];
|
MPC_SAMPLE_FORMAT V_L[MPC_V_MEM + 960];
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,16 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
#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
|
#ifdef ROCKBOX_LITTLE_ENDIAN
|
||||||
#define MPC_LITTLE_ENDIAN
|
#define MPC_LITTLE_ENDIAN
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -198,7 +198,11 @@ static const MPC_SAMPLE_FORMAT Di_opt [32] [16] ICONST_ATTR = {
|
||||||
#define INVCOS30 MPC_MAKE_INVCOS( 684664578)
|
#define INVCOS30 MPC_MAKE_INVCOS( 684664578)
|
||||||
#define INVCOS31 MPC_MAKE_INVCOS(1367679739)
|
#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 )
|
mpc_calculate_new_V ( const MPC_SAMPLE_FORMAT * Sample, MPC_SAMPLE_FORMAT * V )
|
||||||
{
|
{
|
||||||
// Calculating new V-buffer values for left channel
|
// 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
|
// 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)
|
mpc_decoder_windowing_D(MPC_SAMPLE_FORMAT * Data, const MPC_SAMPLE_FORMAT * V)
|
||||||
{
|
{
|
||||||
const MPC_SAMPLE_FORMAT *D = (const MPC_SAMPLE_FORMAT *) &Di_opt;
|
const MPC_SAMPLE_FORMAT *D = (const MPC_SAMPLE_FORMAT *) &Di_opt;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue