summaryrefslogtreecommitdiff
path: root/apps/codecs/libwma
diff options
context:
space:
mode:
authorMichael Giacomelli <giac2000@hotmail.com>2008-08-10 02:31:01 +0000
committerMichael Giacomelli <giac2000@hotmail.com>2008-08-10 02:31:01 +0000
commitd016402fec642d4d15816719a056079141af2ed6 (patch)
treeb993c5e441684b9929c3d2bd21e147f8bcc56e16 /apps/codecs/libwma
parent99fa8cddb81f387af2542c6eb8356388669123e1 (diff)
Actually put the output in IRAM this time by combining some buffers that weren't used at the same time.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18231 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libwma')
-rw-r--r--apps/codecs/libwma/mdct2.h6
-rw-r--r--apps/codecs/libwma/wmadeci.c13
2 files changed, 7 insertions, 12 deletions
diff --git a/apps/codecs/libwma/mdct2.h b/apps/codecs/libwma/mdct2.h
index a1c3a0b01d..f062f48a72 100644
--- a/apps/codecs/libwma/mdct2.h
+++ b/apps/codecs/libwma/mdct2.h
@@ -32,8 +32,6 @@ typedef long long ogg_int64_t;
# define LOOKUP_T const ogg_int32_t
#endif
-//#include "ivorbiscodec.h"
-
#include <codecs.h>
#include "asm_arm.h"
#include "asm_mcf5249.h"
@@ -65,10 +63,8 @@ typedef long long ogg_int64_t;
#define cPI1_8 (0x7641af3d)
#endif
-//extern void mdct_forward(int n, DATA_TYPE *in, DATA_TYPE *out);
+
extern void mdct_backward(int n, ogg_int32_t *in, DATA_TYPE *out);
-//extern void mdct_bitreverse(DATA_TYPE *x,int n,int step,int shift);
-//extern void mdct_butterflies(DATA_TYPE *x,int points,int shift);
#endif
diff --git a/apps/codecs/libwma/wmadeci.c b/apps/codecs/libwma/wmadeci.c
index b8996c1b16..a96907135d 100644
--- a/apps/codecs/libwma/wmadeci.c
+++ b/apps/codecs/libwma/wmadeci.c
@@ -918,7 +918,7 @@ static int decode_exp_vlc(WMADecodeContext *s, int ch)
/* return 0 if OK. return 1 if last block of frame. return -1 if
unrecorrable error. */
-static int wma_decode_block(WMADecodeContext *s)
+static int wma_decode_block(WMADecodeContext *s, int32_t *scratch_buffer)
{
int n, v, a, ch, code, bsize;
int coef_nb_bits, total_gain;
@@ -1383,14 +1383,13 @@ static int wma_decode_block(WMADecodeContext *s)
{
if (s->channel_coded[ch])
{
- static fixed32 output[BLOCK_MAX_SIZE * 2] IBSS_ATTR;
int n4, index, n;
n = s->block_len;
n4 = s->block_len >>1;
/*faster IMDCT from Vorbis*/
- mdct_backward( (1 << (12-bsize)), (int*)(*(s->coefs))[ch], (int*)output);
+ mdct_backward( (1 << (12-bsize)), (int*)(*(s->coefs))[ch], (int*)scratch_buffer);
/*slower but more easily understood IMDCT from FFMPEG*/
//ff_imdct_calc(&s->mdct_ctx[bsize],
@@ -1400,7 +1399,7 @@ static int wma_decode_block(WMADecodeContext *s)
/* add in the frame */
index = (s->frame_len / 2) + s->block_pos - n4;
- wma_window(s, output, &((*s->frame_out)[ch][index]));
+ wma_window(s, scratch_buffer, &((*s->frame_out)[ch][index]));
@@ -1408,7 +1407,7 @@ static int wma_decode_block(WMADecodeContext *s)
channel if it is not coded */
if (s->ms_stereo && !s->channel_coded[1])
{
- wma_window(s, output, &((*s->frame_out)[1][index]));
+ wma_window(s, scratch_buffer, &((*s->frame_out)[1][index]));
}
}
}
@@ -1440,7 +1439,7 @@ static int wma_decode_frame(WMADecodeContext *s, int32_t *samples)
for(;;)
{
- ret = wma_decode_block(s);
+ ret = wma_decode_block(s, samples);
if (ret < 0)
{
@@ -1485,7 +1484,7 @@ int wma_decode_superframe_init(WMADecodeContext* s,
s->last_superframe_len = 0;
return 0;
}
-
+
s->current_frame = 0;
init_get_bits(&s->gb, buf, buf_size*8);