aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/wmaenc.c
diff options
context:
space:
mode:
authorIan Braithwaite <ian@braithwaite.dk>2007-03-26 10:03:57 +0000
committerBenjamin Larsson <banan@ludd.ltu.se>2007-03-26 10:03:57 +0000
commit1890c2acf48eb6471d812915db092e32ed5c9b14 (patch)
tree516242e46b8758467267c56ef1476bb560001901 /libavcodec/wmaenc.c
parentf39c3c885599a3a30abbbca698480b033670ec86 (diff)
downloadffmpeg-1890c2acf48eb6471d812915db092e32ed5c9b14.tar.gz
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
Diffstat (limited to 'libavcodec/wmaenc.c')
-rw-r--r--libavcodec/wmaenc.c4
1 files changed, 2 insertions, 2 deletions
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);
}