dcherednik / atracdenc

Dirty implementation of ATRAC1, ATRAC3 encoder
GNU Lesser General Public License v2.1
56 stars 14 forks source link

Evaluate other fft libraries? #32

Open diizzyy opened 9 months ago

diizzyy commented 9 months ago

Haven't looked closely at the code but at least pffft is usually quite a bit faster than kissfft so might be worth looking at, the license should work as far as I can tell.

dcherednik commented 9 months ago

Hi. In theory it is possible to make such replacement. But actually fft is not the hottest routine now. Stacked QMF consumes more cpu and probably should be rewritten using SIMD instructions.

dcherednik commented 2 months ago

Oh... After trying to use pffft instead of kissfft i have found limitation of pffft - min FFT size is 16 for complex FFT and 32 for real FFT https://github.com/marton78/pffft/blob/master/pffft_priv_impl.h#L74-L77

It is not a problem for atrac1 and atrac3. But that limitation makes difficult to use this library as part of PQF for atrac3plus, where I need DCT of size 16 which performed via complex FFT of size 8. Second issue is libgha, where I also need real FFT and I am not sure I could implement gha encoding part without splitting subband to short parts...

I keep this ticket opened - for PQF probably it is better just to write custom DCT4 implementation. GHA issue - nobody know, AT3PLUS is only one codec which is used such approach so I need to make some experiments with it first...