juce-framework / JUCE

JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, LV2 and AAX audio plug-ins.
https://juce.com
Other
6.3k stars 1.67k forks source link

RFFT improvement: remove the double size memory requirement #1367

Open yairchu opened 3 months ago

yairchu commented 3 months ago

On 2017, the JUCE team showed interest in fixing the double size memory requirement of juce::FFT, this PR does this while also removing duplication and complication in the code.

Fabian originally suggested making the FFTFallback's real transform more efficient and avoid producing the intermediate redundant results, but given that it is simply the fallback engine, I chose a method that makes it even less efficient (by using additional memory buffers), as I don't see making it efficient as any priority. In fact, I would consider simplifying the fallback engine even further by removing the conditional allocas in it.