summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2010-03-11 20:19:31 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2010-03-11 20:19:31 +0000
commit398ec5281786c571d75513a5cf404a2cddea92dc (patch)
tree898eb5408e92b78df5a789843aaf0b9e4034f105 /apps
parentb4401e589e6a4f138e718cce527c5da95907d240 (diff)
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-xapps/codecs/libmusepack/mpcdec.h35
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 @@
extern "C" {
#endif
-#ifndef IBSS_ATTR_MPC_LARGE_IRAM
-#if (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) || (CONFIG_CPU == MCF5250) || defined(CPU_S5L870X)
-/* PP5022/24 and MCF5250 have 128KB of IRAM */
-#define IBSS_ATTR_MPC_LARGE_IRAM IBSS_ATTR
-#else
-/* other PP's and MCF5249 have 96KB of IRAM */
-#define IBSS_ATTR_MPC_LARGE_IRAM
-#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 */
+#if (CONFIG_CPU == MCF5250) || defined(CPU_S5L870X)
+/* Enough IRAM but performance suffers with ICODE_ATTR. */
+#define IBSS_ATTR_MPC_LARGE_IRAM IBSS_ATTR
#define ICODE_ATTR_MPC_LARGE_IRAM
-#endif
-#endif
+#define ICONST_ATTR_MPC_LARGE_IRAM ICONST_ATTR
-#ifndef ICONST_ATTR_MPC_LARGE_IRAM
-#if (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) || (CONFIG_CPU == MCF5250) || defined(CPU_S5L870X)
-/* PP5022/24 and MCF5250 have 128KB of IRAM */
+#elif (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024)
+/* Enough IRAM to move additional data and code to it. */
+#define IBSS_ATTR_MPC_LARGE_IRAM IBSS_ATTR
+#define ICODE_ATTR_MPC_LARGE_IRAM ICODE_ATTR
#define ICONST_ATTR_MPC_LARGE_IRAM ICONST_ATTR
+
#else
-/* other PP's and MCF5249 have 96KB of IRAM */
+/* Not enough IRAM available. */
+#define IBSS_ATTR_MPC_LARGE_IRAM
+#define ICODE_ATTR_MPC_LARGE_IRAM
#define ICONST_ATTR_MPC_LARGE_IRAM
#endif
-#endif
enum {
MPC_FRAME_LENGTH = (36 * 32), ///< Samples per mpc frame