manfred <[EMAIL PROTECTED]> added the comment:

Hello aurel,
I've testet the two patches from msg2835, both seems to do the work.
The other thing is the efficence of ff_sine_window_init. The old wma.c 
version did the most calculation out of the loop, now all is done 
inside (up to 2048 at a call). Especialy float devides are very slow.
Wouldn't it be faster to do it the "old" way:

diff -ur ffmpeg.orig/libavcodec/mdct.c ffmpeg/libavcodec/mdct.c
--- ffmpeg.orig/libavcodec/mdct.c       2008-08-15 00:38:06.000000000 
+0200
+++ ffmpeg/libavcodec/mdct.c    2008-08-21 21:17:21.000000000 +0200
@@ -60,8 +60,10 @@
 // Generate a sine window.
 void ff_sine_window_init(float *window, int n) {
     int i;
+    float alpha;
+    alpha = M_PI / (2.0 * n);
     for(i = 0; i < n; i++)
-        window[i] = sin((i + 0.5) / (2 * n) * M_PI);
+        window[i] = sin((i + 0.5) * alpha);
 }
 
 /**

______________________________________________________
FFmpeg issue tracker <[EMAIL PROTECTED]>
<https://roundup.mplayerhq.hu/roundup/ffmpeg/issue586>
______________________________________________________

Reply via email to