diff wmaenc.c @ 4737:99d9dd34903b libavcodec

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
author banan
date Mon, 26 Mar 2007 10:03:57 +0000
parents 2ba8d13a66bc
children bff60ecc02f9
line wrap: on
line diff
--- a/wmaenc.c	Mon Mar 26 00:54:29 2007 +0000
+++ b/wmaenc.c	Mon Mar 26 10:03:57 2007 +0000
@@ -92,8 +92,8 @@
         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);
     }