From a06f651c3e5f52820e5c7233fa06ef21f793c812 Mon Sep 17 00:00:00 2001 From: Michael Giacomelli Date: Sat, 28 Jun 2008 18:56:19 +0000 Subject: Put the WMA windowing and output buffer into IRAM on targets with > 96KB of it. Improves 192k WMA decoding speed by about 2MHz on PP5024, and maybe saves some more when applying DSP. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17853 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libwma/wmadec.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'apps/codecs/libwma/wmadec.h') diff --git a/apps/codecs/libwma/wmadec.h b/apps/codecs/libwma/wmadec.h index f7434ed759..30ba35b533 100644 --- a/apps/codecs/libwma/wmadec.h +++ b/apps/codecs/libwma/wmadec.h @@ -54,6 +54,17 @@ #define LSP_POW_BITS 7 +/*define IRAM for targets with 48k/80k IRAM split*/ +#ifndef IBSS_ATTR_WMA_LARGE_IRAM +#if (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) || (CONFIG_CPU == MCF5250) +/* PP5022/24 and MCF5250 have 128KB of IRAM, with 80KB allocated for codecs */ +#define IBSS_ATTR_WMA_LARGE_IRAM IBSS_ATTR +#else +/* other PP's and MCF5249 have 96KB of IRAM */ +#define IBSS_ATTR_WMA_LARGE_IRAM +#endif +#endif + typedef struct WMADecodeContext { GetBitContext gb; @@ -110,7 +121,8 @@ typedef struct WMADecodeContext MDCTContext mdct_ctx[BLOCK_NB_SIZES]; fixed32 *windows[BLOCK_NB_SIZES]; /* output buffer for one frame and the last for IMDCT windowing */ - fixed32 frame_out[MAX_CHANNELS][BLOCK_MAX_SIZE * 2]; + fixed32 (*frame_out)[MAX_CHANNELS][BLOCK_MAX_SIZE*2]; + /* last frame info */ uint8_t last_superframe[MAX_CODED_SUPERFRAME_SIZE + 4]; /* padding added */ int last_bitoffset; -- cgit v1.2.3