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
This commit is contained in:
Ian Braithwaite
2007-03-26 10:03:57 +00:00
committed by Benjamin Larsson
parent f39c3c8855
commit 1890c2acf4
4 changed files with 60 additions and 60 deletions

View File

@ -302,7 +302,7 @@ int ff_wma_init(AVCodecContext * avctx, int flags2)
window = av_malloc(sizeof(float) * n);
alpha = M_PI / (2.0 * n);
for(j=0;j<n;j++) {
window[n - j - 1] = sin((j + 0.5) * alpha);
window[j] = sin((j + 0.5) * alpha);
}
s->windows[i] = window;
}