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
This commit is contained in:
parent
99fa8cddb8
commit
d016402fec
3 changed files with 8 additions and 13 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -35,7 +35,7 @@ int packet_count=0;
|
|||
BLOCK_MAX_SIZE is 2048 (samples) and MAX_CHANNELS is 2.
|
||||
*/
|
||||
|
||||
static uint32_t decoded[BLOCK_MAX_SIZE * MAX_CHANNELS];
|
||||
static uint32_t decoded[BLOCK_MAX_SIZE * MAX_CHANNELS] IBSS_ATTR;
|
||||
|
||||
/* NOTE: WMADecodeContext is 120152 bytes (on x86) */
|
||||
static WMADecodeContext wmadec;
|
||||
|
|
Loading…
Reference in a new issue