diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-03-11 20:19:31 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-03-11 20:19:31 +0000 |
commit | 398ec5281786c571d75513a5cf404a2cddea92dc (patch) | |
tree | 898eb5408e92b78df5a789843aaf0b9e4034f105 /apps | |
parent | b4401e589e6a4f138e718cce527c5da95907d240 (diff) | |
download | rockbox-398ec5281786c571d75513a5cf404a2cddea92dc.tar.gz rockbox-398ec5281786c571d75513a5cf404a2cddea92dc.zip |
Refacturate IRAM configuration for musepack codec. No functional change.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25126 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/codecs/libmusepack/mpcdec.h | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/apps/codecs/libmusepack/mpcdec.h b/apps/codecs/libmusepack/mpcdec.h index 97c0f39acb..f97a6458d4 100755 --- a/apps/codecs/libmusepack/mpcdec.h +++ b/apps/codecs/libmusepack/mpcdec.h | |||
@@ -47,35 +47,24 @@ | |||
47 | extern "C" { | 47 | extern "C" { |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | #ifndef IBSS_ATTR_MPC_LARGE_IRAM | 50 | #if (CONFIG_CPU == MCF5250) || defined(CPU_S5L870X) |
51 | #if (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) || (CONFIG_CPU == MCF5250) || defined(CPU_S5L870X) | 51 | /* Enough IRAM but performance suffers with ICODE_ATTR. */ |
52 | /* PP5022/24 and MCF5250 have 128KB of IRAM */ | 52 | #define IBSS_ATTR_MPC_LARGE_IRAM IBSS_ATTR |
53 | #define IBSS_ATTR_MPC_LARGE_IRAM IBSS_ATTR | ||
54 | #else | ||
55 | /* other PP's and MCF5249 have 96KB of IRAM */ | ||
56 | #define IBSS_ATTR_MPC_LARGE_IRAM | ||
57 | #endif | ||
58 | #endif | ||
59 | |||
60 | #ifndef ICODE_ATTR_MPC_LARGE_IRAM | ||
61 | #if (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) | ||
62 | /* PP5022/24 have 128KB of IRAM and have better performance with ICODE_ATTR */ | ||
63 | #define ICODE_ATTR_MPC_LARGE_IRAM ICODE_ATTR | ||
64 | #else | ||
65 | /* all other targets either haven't enough IRAM or performance suffers */ | ||
66 | #define ICODE_ATTR_MPC_LARGE_IRAM | 53 | #define ICODE_ATTR_MPC_LARGE_IRAM |
67 | #endif | 54 | #define ICONST_ATTR_MPC_LARGE_IRAM ICONST_ATTR |
68 | #endif | ||
69 | 55 | ||
70 | #ifndef ICONST_ATTR_MPC_LARGE_IRAM | 56 | #elif (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) |
71 | #if (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) || (CONFIG_CPU == MCF5250) || defined(CPU_S5L870X) | 57 | /* Enough IRAM to move additional data and code to it. */ |
72 | /* PP5022/24 and MCF5250 have 128KB of IRAM */ | 58 | #define IBSS_ATTR_MPC_LARGE_IRAM IBSS_ATTR |
59 | #define ICODE_ATTR_MPC_LARGE_IRAM ICODE_ATTR | ||
73 | #define ICONST_ATTR_MPC_LARGE_IRAM ICONST_ATTR | 60 | #define ICONST_ATTR_MPC_LARGE_IRAM ICONST_ATTR |
61 | |||
74 | #else | 62 | #else |
75 | /* other PP's and MCF5249 have 96KB of IRAM */ | 63 | /* Not enough IRAM available. */ |
64 | #define IBSS_ATTR_MPC_LARGE_IRAM | ||
65 | #define ICODE_ATTR_MPC_LARGE_IRAM | ||
76 | #define ICONST_ATTR_MPC_LARGE_IRAM | 66 | #define ICONST_ATTR_MPC_LARGE_IRAM |
77 | #endif | 67 | #endif |
78 | #endif | ||
79 | 68 | ||
80 | enum { | 69 | enum { |
81 | MPC_FRAME_LENGTH = (36 * 32), ///< Samples per mpc frame | 70 | MPC_FRAME_LENGTH = (36 * 32), ///< Samples per mpc frame |