HydrogenAudio

Hydrogenaudio Forum => Scientific Discussion => Topic started by: mudlord on 2011-04-18 07:07:07

Title: Best FFT library?
Post by: mudlord on 2011-04-18 07:07:07
Hi,

Since FB2K seems to lack a FFT library for general use (apart from the visualization API) I figured I'd ask here.
I am wondering on people's recommendations for FFT calculation, to be more precise 1 dimensional DFTs.

I am somewhat limited by license since GPL stuff is forbidden under foobar2000. And I already got hounded personally before, for not sticking to the GPL, so I don't wanna make the same mistakes twice, since some certain projects are VERY vocal about their GPL and licensing rights.

Any suggestions as to what library has good ease of use, and above all, processing speed would be great. Libraries which can be used natively in C++ would be preferred, but plain C ones could do.
Thanks.
Title: Best FFT library?
Post by: saratoga on 2011-04-18 07:15:24
Do you need non-power of 2 sizes?  The ffmpeg FFT is fairly efficient, not too complicated and LGPL, but I think is restricted to powers of 2.  Sucks that you can't use fftw . . .
Title: Best FFT library?
Post by: mudlord on 2011-04-18 07:19:58
Nope, dont need non power of twos.  Plain POT FFT sizes are fine.
I will take a look at FFMPEG.
Title: Best FFT library?
Post by: Garf on 2011-04-18 08:17:19
Intel IPP (needs a license, but can be compatible with fb2k) or AMD CML (is free I think?)

djbfft: http://cr.yp.to (http://cr.yp.to)

FXT: http://www.jjj.de/fxt/ (http://www.jjj.de/fxt/) Edit: is GPL

Ooura 2,4 and split-radix: http://www.kurims.kyoto-u.ac.jp/~ooura/fft.html (http://www.kurims.kyoto-u.ac.jp/~ooura/fft.html)

KISSFFT: http://sourceforge.net/projects/kissfft/ (http://sourceforge.net/projects/kissfft/)

Of these, Ooura is very fast and still simple, so if you don't know what to pick, that is my bet.
Title: Best FFT library?
Post by: mudlord on 2011-04-18 08:22:50
Nice!

Thanks a lot Garf!
Will def. take a look at Ooura. KISSFFT looks quite nice, I like how simple it is to implement.
Will take a look at the others as well.

Thanks again! Really appreciate it!
Title: Best FFT library?
Post by: honestguv on 2011-04-18 09:29:52
Nice!

Thanks a lot Garf!
Will def. take a look at Ooura. KISSFFT looks quite nice, I like how simple it is to implement.
Will take a look at the others as well.

Thanks again! Really appreciate it!


I have tended to use this one over the years:

http://www.fftw.org/ (http://www.fftw.org/)

Title: Best FFT library?
Post by: kode54 on 2011-04-18 10:37:22
I have tended to use this one over the years:

http://www.fftw.org/ (http://www.fftw.org/)

Thanks for reading the original post that says he can't use FFTW because it's GPL.
Title: Best FFT library?
Post by: mudlord on 2011-04-18 11:50:47
Yes, I made it crystal clear that any GPL related software is avoided.
Unless its under LGPL.
Title: Best FFT library?
Post by: lvqcl on 2011-04-18 16:03:19
The ffmpeg FFT is fairly efficient, not too complicated and LGPL, but I think is restricted to powers of 2.

And FFT length is limited by 216.

AMD CML (is free I think?)

I don' t understand this legal jargon:
Quote
You may:
a) use the Software; and
b) make a reasonable number of copies necessary for the purposes of this License. You must reproduce on such copy AMD's copyright notice and any other proprietary legends that were on the original copy of the Software.

You may not:
a) decompile, reverse engineer, disassemble or otherwise reduce the Software to a human-perceivable form;
b) modify, network, rent, lend, loan, distribute or create derivative works based upon the Software in whole or in part; or
c) transfer or sublicense the Software to another end user or otherwise transfer the Software except as permitted by this License.
Title: Best FFT library?
Post by: mudlord on 2011-04-20 04:05:52
Quote
I don' t understand this legal jargon:


yeah, the derivative works clause is interesting. In that case, has AMD lawyers thought of people using the library at all?

Title: Best FFT library?
Post by: Garf on 2011-04-20 08:46:40
yeah, the derivative works clause is interesting. In that case, has AMD lawyers thought of people using the library at all?


Good catch. I filed a bug on this. Wonder if they care.
Title: Best FFT library?
Post by: Garf on 2011-04-20 18:36:07
yeah, the derivative works clause is interesting. In that case, has AMD lawyers thought of people using the library at all?


Good catch. I filed a bug on this. Wonder if they care.


They pointed to this license, which should avoid the gaffe you found, but contains even more legalese:

http://developer.amd.com/cpu/Libraries/acm...es/default.aspx (http://developer.amd.com/cpu/Libraries/acml/redistribution/pages/default.aspx)
Title: Best FFT library?
Post by: mudlord on 2011-04-21 08:17:14
Yep...
Quote
5.  Restrictions.  Restrictions regarding Your use of the Materials are as follows.  You may not: 
a)  distribute, publish or sublicense the Documentation, the Sample Source, the Libraries (except when built
into the Distributed Software), the Tools or any Source Code in the Materials to any one;
b)  reproduce copies of the Materials other than what is reasonably required for the Licensed Purpose;
c)  decompile, reverse engineer, disassemble or otherwise reduce the Object Code contained in the
Materials to a human-perceivable form; 
d)  alter any copyright, trademark or patent notice(s) in the Materials;
e)  use AMD’s trademarks in Your software or product names or in a way that suggests the Distributed
Software comes from AMD or is endorsed by AMD;
f)  use AMD’s trademarks in Your software or product names or in a way that that suggests that any of the
Materials are endorsed by AMD;
g)  include contents in malicious, deceptive or unlawful programs; 
h)  modify and/or distribute  any of the Materials so that any part of thereof becomes subject to a Free
Software License; or
i)  rent, lease or lend the Materials or transfer the Materials to any third party except as expressly provided
herein.


Much more sane