summaryrefslogtreecommitdiff
path: root/apps/codecs/libwma/wmadec.h
diff options
context:
space:
mode:
authorMichael Giacomelli <giac2000@hotmail.com>2008-06-28 18:56:19 +0000
committerMichael Giacomelli <giac2000@hotmail.com>2008-06-28 18:56:19 +0000
commita06f651c3e5f52820e5c7233fa06ef21f793c812 (patch)
tree9f62f8c8308512ad1093bdcac2e90dd04a02ed28 /apps/codecs/libwma/wmadec.h
parent54635b74a57e31877ac3c9dd9a7b9bf2b012e0e9 (diff)
downloadrockbox-a06f651c3e5f52820e5c7233fa06ef21f793c812.tar.gz
rockbox-a06f651c3e5f52820e5c7233fa06ef21f793c812.zip
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
Diffstat (limited to 'apps/codecs/libwma/wmadec.h')
-rw-r--r--apps/codecs/libwma/wmadec.h14
1 files changed, 13 insertions, 1 deletions
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 @@
54 54
55#define LSP_POW_BITS 7 55#define LSP_POW_BITS 7
56 56
57/*define IRAM for targets with 48k/80k IRAM split*/
58#ifndef IBSS_ATTR_WMA_LARGE_IRAM
59#if (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) || (CONFIG_CPU == MCF5250)
60/* PP5022/24 and MCF5250 have 128KB of IRAM, with 80KB allocated for codecs */
61#define IBSS_ATTR_WMA_LARGE_IRAM IBSS_ATTR
62#else
63/* other PP's and MCF5249 have 96KB of IRAM */
64#define IBSS_ATTR_WMA_LARGE_IRAM
65#endif
66#endif
67
57typedef struct WMADecodeContext 68typedef struct WMADecodeContext
58{ 69{
59 GetBitContext gb; 70 GetBitContext gb;
@@ -110,7 +121,8 @@ typedef struct WMADecodeContext
110 MDCTContext mdct_ctx[BLOCK_NB_SIZES]; 121 MDCTContext mdct_ctx[BLOCK_NB_SIZES];
111 fixed32 *windows[BLOCK_NB_SIZES]; 122 fixed32 *windows[BLOCK_NB_SIZES];
112 /* output buffer for one frame and the last for IMDCT windowing */ 123 /* output buffer for one frame and the last for IMDCT windowing */
113 fixed32 frame_out[MAX_CHANNELS][BLOCK_MAX_SIZE * 2]; 124 fixed32 (*frame_out)[MAX_CHANNELS][BLOCK_MAX_SIZE*2];
125
114 /* last frame info */ 126 /* last frame info */
115 uint8_t last_superframe[MAX_CODED_SUPERFRAME_SIZE + 4]; /* padding added */ 127 uint8_t last_superframe[MAX_CODED_SUPERFRAME_SIZE + 4]; /* padding added */
116 int last_bitoffset; 128 int last_bitoffset;