From f2ed7ffaaa7b6de9ba1c230a77d4a32caf3eee6e Mon Sep 17 00:00:00 2001 From: Mohamed Tarek Date: Wed, 28 Jul 2010 14:01:10 +0000 Subject: Enable wmapro compilation for lowmem targets by excluding multichannel buffers for them. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27593 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/SOURCES | 3 --- apps/codecs/libwmapro/wmaprodec.c | 8 +++++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/codecs/SOURCES b/apps/codecs/SOURCES index bce5c32a56..d950ffd46f 100644 --- a/apps/codecs/SOURCES +++ b/apps/codecs/SOURCES @@ -32,10 +32,7 @@ au.c vox.c wav64.c tta.c - -#if MEMORYSIZE > 2 wmapro.c -#endif #ifdef HAVE_RECORDING diff --git a/apps/codecs/libwmapro/wmaprodec.c b/apps/codecs/libwmapro/wmaprodec.c index e2dff46dc9..0b5caff2f2 100644 --- a/apps/codecs/libwmapro/wmaprodec.c +++ b/apps/codecs/libwmapro/wmaprodec.c @@ -156,7 +156,11 @@ static VLC coef_vlc[2]; ///< coefficient run length vlc codes static int32_t g_tmp[WMAPRO_BLOCK_MAX_SIZE] IBSS_ATTR_WMAPRO_LARGE_IRAM; static int32_t g_out_ch0[WMAPRO_OUT_BUF_SIZE] IBSS_ATTR; static int32_t g_out_ch1[WMAPRO_OUT_BUF_SIZE] IBSS_ATTR_WMAPRO_LARGE_IRAM; -static int32_t g_out_multichannel[WMAPRO_MAX_CHANNELS-2][WMAPRO_OUT_BUF_SIZE]; +#if MEMORYSIZE > 2 + /* Enable multichannel for large-memory targets only */ + static int32_t g_out_multichannel[WMAPRO_MAX_CHANNELS-2][WMAPRO_OUT_BUF_SIZE]; +# define MC_ENABLED +#endif /** * @brief frame specific decoder context for a single channel @@ -301,8 +305,10 @@ int decode_init(asf_waveformatex_t *wfx) /* Use globally defined arrays. Allows IRAM usage for up to 2 channels. */ s->channel[0].out = g_out_ch0; s->channel[1].out = g_out_ch1; +#ifdef MC_ENABLED for (i=2; ichannel[i].out = g_out_multichannel[i-2]; +#endif #if defined(CPU_COLDFIRE) coldfire_set_macsr(EMAC_FRACTIONAL | EMAC_SATURATE); -- cgit v1.2.3