And here's a patch for Intel Math Kernel Library. This allows commercial users of Speex to use a high-speed FFT library that isn't GPL'd. (You do need to pay for it though). This is 3 times faster than the default FFT in speex, and also faster than FFTW3 since MKL has native support for the complex packing Speex uses. Since Intel hasn't supplied any pkg-config files, and which libraries to use depend on the platform and compiler, this requires a bit of setup to get working. For me, the correct configure line is: bash autogen.sh && CFLAGS="-O2 -g -I/opt/intel/mkl/10.0.3.020/include/" LDFLAGS="-L/opt/intel/mkl/10.0.3.020/lib/em64t -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lm" ./configure --with-intel-mkl If you use the intel compiler, you can replace all of the '-lmkl_xx' with a single '-lmkl', and if you want threaded support, replace mkl_sequential with mkl_gnu_thread. If there are anyone from Intel reading this list: Fix your build environments; it's currently way too hard to use your fancy tools in a generic package. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: speex-mkl.diff Url: http://lists.xiph.org/pipermail/speex-dev/attachments/20080527/50eb289d/attachment.txt
Hi, On 5/27/08, Thorvald Natvig <thorvald at natvig.com> wrote:> And here's a patch for Intel Math Kernel Library. This allows commercial > users of Speex to use a high-speed FFT library that isn't GPL'd. (You do > need to pay for it though). This is 3 times faster than the default FFT in > speex, and also faster than FFTW3 since MKL has native support for the > complex packing Speex uses.That's definitely cool, but from what I can see on this FAQ I do need to pay if I'm willing to use it for commercial purposes: http://www.intel.com/cd/software/products/asmo-na/eng/266854.htm Btw, have you benchmarked speex with this and without this optimization as a hole and how much percents do you achieve? I assume FFT is a big portion of Speex's CPU load, but it would be great to see numbers. :) -- Regards, Alexander Chemeris. SIPez LLC. SIP VoIP, IM and Presence Consulting http://www.SIPez.com tel: +1 (617) 273-4000
Alexander Chemeris wrote:> Hi, > > On 5/27/08, Thorvald Natvig <thorvald at natvig.com> wrote: > >> And here's a patch for Intel Math Kernel Library. This allows commercial >> users of Speex to use a high-speed FFT library that isn't GPL'd. (You do >> need to pay for it though). This is 3 times faster than the default FFT in >> speex, and also faster than FFTW3 since MKL has native support for the >> complex packing Speex uses. >> > > That's definitely cool, but from what I can see on this FAQ I do need to pay > if I'm willing to use it for commercial purposes: > http://www.intel.com/cd/software/products/asmo-na/eng/266854.htm > > Btw, have you benchmarked speex with this and without this optimization > as a hole and how much percents do you achieve? I assume FFT is a big > portion of Speex's CPU load, but it would be great to see numbers. :) > >Yes, MKL is commercial software and you do need to pay for it, but unlike FFTW it's not GPL. FFTW is useless for any closed-source program that wishes to use Speex, so this is the non-GPL alternative. Speex itself doesn't use FFT, it's only used for the preprocessor and the echo canceller. The last time I benchmarked, FFTs were about 60% of the preprocessor CPU (and 64% was mentioned in the IRC channel). So in theory, using MKL will halve the CPU requirement of the preprocessor.
Thanks, Committed. Jean-Marc Thorvald Natvig a ?crit :> > And here's a patch for Intel Math Kernel Library. This allows commercial > users of Speex to use a high-speed FFT library that isn't GPL'd. (You do > need to pay for it though). This is 3 times faster than the default FFT > in speex, and also faster than FFTW3 since MKL has native support for > the complex packing Speex uses. > > Since Intel hasn't supplied any pkg-config files, and which libraries to > use depend on the platform and compiler, this requires a bit of setup to > get working. For me, the correct configure line is: > bash autogen.sh && CFLAGS="-O2 -g -I/opt/intel/mkl/10.0.3.020/include/" > LDFLAGS="-L/opt/intel/mkl/10.0.3.020/lib/em64t -lmkl_intel_lp64 > -lmkl_sequential -lmkl_core -lm" ./configure --with-intel-mkl > > If you use the intel compiler, you can replace all of the '-lmkl_xx' > with a single '-lmkl', and if you want threaded support, replace > mkl_sequential with mkl_gnu_thread. If there are anyone from Intel > reading this list: Fix your build environments; it's currently way too > hard to use your fancy tools in a generic package. > > > ------------------------------------------------------------------------ > > _______________________________________________ > Speex-dev mailing list > Speex-dev at xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev