summaryrefslogtreecommitdiff
path: root/libavcodec/vorbis_dec.c
diff options
context:
space:
mode:
authorLoren Merritt <lorenm@u.washington.edu>2008-08-12 00:33:34 +0000
committerLoren Merritt <lorenm@u.washington.edu>2008-08-12 00:33:34 +0000
commit46803f4f67e821f6e62793d876be164fc04622b2 (patch)
treecc86c780395e6a14bcd92b37da29ac8194715ce3 /libavcodec/vorbis_dec.c
parent49c0dd754c85e2cbb7dfe8d63dbb7141cddaeb61 (diff)
optimize imdct_half:
remove tmp buffer. skip fft reinterleave pass, leaving data in a format more convenient for simd. merge post-rotate with post-reorder. Originally committed as revision 14700 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vorbis_dec.c')
-rw-r--r--libavcodec/vorbis_dec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/vorbis_dec.c b/libavcodec/vorbis_dec.c
index 46ec7b690f..87e8afe96c 100644
--- a/libavcodec/vorbis_dec.c
+++ b/libavcodec/vorbis_dec.c
@@ -1517,18 +1517,18 @@ static int vorbis_parse_audio_packet(vorbis_context *vc) {
// MDCT, overlap/add, save data for next overlapping FPMATH
retlen = (blocksize + vc->blocksize[previous_window])/4;
- dir = retlen <= blocksize/2; // pick an order so that ret[] can reuse residues[] without stepping on any data we need
+ dir = retlen <= blocksize/2; // pick an order so that ret[] can reuse floors[] without stepping on any data we need
for(j=dir?0:vc->audio_channels-1; (unsigned)j<vc->audio_channels; j+=dir*2-1) {
uint_fast16_t bs0=vc->blocksize[0];
uint_fast16_t bs1=vc->blocksize[1];
float *residue=vc->channel_residues+res_chan[j]*blocksize/2;
float *floor=vc->channel_floors+j*blocksize/2;
float *saved=vc->saved+j*bs1/4;
- float *ret=vc->channel_residues+j*retlen;
- float *buf=floor;
+ float *ret=vc->channel_floors+j*retlen;
+ float *buf=residue;
const float *win=vc->win[blockflag&previous_window];
- vc->mdct[0].fft.imdct_half(&vc->mdct[blockflag], buf, floor, residue);
+ vc->mdct[0].fft.imdct_half(&vc->mdct[blockflag], buf, floor);
if(blockflag == previous_window) {
vc->dsp.vector_fmul_window(ret, saved, buf, win, fadd_bias, blocksize/4);
@@ -1583,7 +1583,7 @@ static int vorbis_decode_frame(AVCodecContext *avccontext,
AV_DEBUG("parsed %d bytes %d bits, returned %d samples (*ch*bits) \n", get_bits_count(gb)/8, get_bits_count(gb)%8, len);
for(i=0; i<vc->audio_channels; i++)
- channel_ptrs[i] = vc->channel_residues+i*len;
+ channel_ptrs[i] = vc->channel_floors+i*len;
vc->dsp.float_to_int16_interleave(data, channel_ptrs, len, vc->audio_channels);
*data_size=len*2*vc->audio_channels;