diff options
author | Loren Merritt <lorenm@u.washington.edu> | 2008-08-12 00:33:34 +0000 |
---|---|---|
committer | Loren Merritt <lorenm@u.washington.edu> | 2008-08-12 00:33:34 +0000 |
commit | 46803f4f67e821f6e62793d876be164fc04622b2 (patch) | |
tree | cc86c780395e6a14bcd92b37da29ac8194715ce3 /libavcodec/vorbis_dec.c | |
parent | 49c0dd754c85e2cbb7dfe8d63dbb7141cddaeb61 (diff) | |
download | ffmpeg-streaming-46803f4f67e821f6e62793d876be164fc04622b2.zip ffmpeg-streaming-46803f4f67e821f6e62793d876be164fc04622b2.tar.gz |
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.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/vorbis_dec.c b/libavcodec/vorbis_dec.c index 46ec7b6..87e8afe 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; |