From aba54e63d39ee3ae2774461f4a8b859c8dc7b2b8 Mon Sep 17 00:00:00 2001 From: Buschel Date: Thu, 11 Mar 2010 20:19:31 +0000 Subject: [PATCH] Refacturate IRAM configuration for musepack codec. No functional change. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25126 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libmusepack/mpcdec.h | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/apps/codecs/libmusepack/mpcdec.h b/apps/codecs/libmusepack/mpcdec.h index 97c0f39ac..f97a6458d 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 -- 2.11.4.GIT