Mercurial > hg > vamp-fanchirp
diff FChTransformF0gram.h @ 14:44b86c346a5a perf
Switch to Vamp SDK FFT implementation (it is close enough in performance - FFTs aren't really a bottleneck here - and simpler for the build) and use bqvec allocators
author | Chris Cannam |
---|---|
date | Tue, 02 Oct 2018 16:38:52 +0100 |
parents | fc8f351d2cd6 |
children | 0a860992b4f4 |
line wrap: on
line diff
--- a/FChTransformF0gram.h Tue Oct 02 16:38:16 2018 +0100 +++ b/FChTransformF0gram.h Tue Oct 02 16:38:52 2018 +0100 @@ -22,8 +22,8 @@ #define _USE_MATH_DEFINES #include <cmath> #include <vamp-sdk/Plugin.h> +#include <vamp-sdk/FFT.h> #include <complex> -#include <fftw3.h> #include <iostream> #include <fstream> #include <string.h> @@ -31,6 +31,8 @@ using namespace std; using std::string; +using _VampPlugin::Vamp::FFTReal; + class FChTransformF0gram : public Vamp::Plugin { public: FChTransformF0gram(float inputSampleRate); @@ -137,9 +139,9 @@ // LPFWindow double *mp_LPFWindow; double *LPF_time; - fftw_complex *LPF_frequency; - fftw_plan plan_backward_LPF; - fftw_plan plan_forward_LPF; + double *LPF_frequency; + FFTReal *fft_forward_LPF; // two of these as they have different sizes + FFTReal *fft_inverse_LPF; // timeWindow double *m_timeWindow; // Warpings @@ -148,8 +150,8 @@ double *mp_HanningWindow; // FChT plan & transformed data structs double *m_absFanChirpTransform; - fftw_complex *m_auxFanChirpTransform; - fftw_plan plan_forward_xwarping; + double *m_auxFanChirpTransform; + FFTReal *fft_xwarping; // GLogS double *m_glogs_f0; double *m_glogs; @@ -170,7 +172,6 @@ double *m_glogs_f0_preference_weights; double *m_glogs_median_correction; double *m_glogs_sigma_correction; - double *m_glogs_hf_smoothing_window; // auxiliar methods void design_GLogS(); void design_FChT();