1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-01-11 07:05:47 +01:00

Code cleanup: removed the old real FFT code not used since at least 2009.

I confirmed that the currently used real FFT code in RealFFTf.cpp is faster
than the old one with a quick benchmark that calls PowerSpectrum() on 4-minute
audio file, with different sizes of computation windows:

Window_size: 256 method: new FFT time_s: 0.393
Window_size: 256 method: old FFT time_s: 1.065
Window_size: 1024 method: new FFT time_s: 0.38
Window_size: 1024 method: old FFT time_s: 0.958
Window_size: 4096 method: new FFT time_s: 0.413
Window_size: 4096 method: old FFT time_s: 1.084
Window_size: 16384 method: new FFT time_s: 0.518
Window_size: 16384 method: old FFT time_s: 1.338
Window_size: 65536 method: new FFT time_s: 0.655
Window_size: 65536 method: old FFT time_s: 1.524
Window_size: 262144 method: new FFT time_s: 0.735
Window_size: 262144 method: old FFT time_s: 1.873
This commit is contained in:
Raphaël Marinier
2016-06-25 16:23:56 +02:00
parent cf79f91da0
commit 6ac68db5be
10 changed files with 8 additions and 210 deletions

View File

@@ -1296,11 +1296,7 @@ bool EffectEqualization::CalcFilter()
//transfer to time domain to do the padding and windowing
float *outr = new float[mWindowSize];
float *outi = new float[mWindowSize];
#ifdef EXPERIMENTAL_USE_REALFFTF
InverseRealFFT(mWindowSize, mFilterFuncR, NULL, outr); // To time domain
#else
FFT(mWindowSize,true,mFilterFuncR,NULL,outr,outi); //To time domain
#endif
for(i=0;i<=(mM-1)/2;i++)
{ //Windowing - could give a choice, fixed for now - MJS
@@ -2944,11 +2940,7 @@ void EqualizationPanel::Recalc()
mOuti = new float[mEffect->mWindowSize];
mEffect->CalcFilter(); //to calculate the actual response
#ifdef EXPERIMENTAL_USE_REALFFTF
InverseRealFFT(mEffect->mWindowSize, mEffect->mFilterFuncR, mEffect->mFilterFuncI, mOutr);
#else
FFT(mWindowSize,true,mFilterFuncR,mFilterFuncI,mOutr,mOuti); //work out FIR response - note mOuti will be all zeros
#endif // EXPERIMENTAL_USE_REALFFTF
}
void EqualizationPanel::OnSize(wxSizeEvent & WXUNUSED(event))