From 1890c2acf48eb6471d812915db092e32ed5c9b14 Mon Sep 17 00:00:00 2001 From: Ian Braithwaite Date: Mon, 26 Mar 2007 10:03:57 +0000 Subject: Optimize by building the mdct window and multipying/adding at the same time. Patch by Ian Braithwaite ian .. braithwaite . dk [Ffmpeg-devel] WMA decoder speedup 2007-03-22 22:56 Originally committed as revision 8526 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/wmaenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavcodec/wmaenc.c') diff --git a/libavcodec/wmaenc.c b/libavcodec/wmaenc.c index 4fe3083b8c..e902a6aff4 100644 --- a/libavcodec/wmaenc.c +++ b/libavcodec/wmaenc.c @@ -92,8 +92,8 @@ static void apply_window_and_mdct(AVCodecContext * avctx, signed short * audio, memcpy(s->output, s->frame_out[channel], sizeof(float)*window_len); j = channel; for (i = 0; i < len; i++, j += avctx->channels){ - s->output[i+window_len] = audio[j] / n * win[i]; - s->frame_out[channel][i] = audio[j] / n * win[window_len - i - 1]; + s->output[i+window_len] = audio[j] / n * win[window_len - i - 1]; + s->frame_out[channel][i] = audio[j] / n * win[i]; } ff_mdct_calc(&s->mdct_ctx[window_index], s->coefs[channel], s->output, s->mdct_tmp); } -- cgit v1.2.3