Mercurial > hg > vamp-fanchirp
comparison FChTransformUtils.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 | af59167b3d35 |
children | 37917af73ae9 |
comparison
equal
deleted
inserted
replaced
13:69069fc86e18 | 14:44b86c346a5a |
---|---|
13 | 13 |
14 You should have received a copy of the GNU General Public License | 14 You should have received a copy of the GNU General Public License |
15 along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 */ | 16 */ |
17 | 17 |
18 #ifndef FCHTRANSFORMUTILS_H | |
19 #define FCHTRANSFORMUTILS_H | |
20 | |
18 #include <string.h> | 21 #include <string.h> |
19 | 22 |
20 void interp1(const double *x1,const double *y1, int N1, const double *x2, double *y2, int N2); | 23 class Utils |
24 { | |
25 public: | |
26 static void interp1(const double *x1,const double *y1, int N1, const double *x2, double *y2, int N2); | |
21 | 27 |
22 void interp1q(const double *y1, const int *x2_int, const double *x2_frac, double *y2, int N2); | 28 static void interp1q(const double *y1, const int *x2_int, const double *x2_frac, double *y2, int N2){ |
29 for(int i=0;i<N2;i++){ | |
30 y2[i] = y1[x2_int[i]]*(1.0-x2_frac[i])+y1[x2_int[i]+1]*x2_frac[i]; | |
31 } // for | |
32 } | |
23 | 33 |
24 void cumtrapz(const double *x, const double *y, int N, double *accum); | 34 static void cumtrapz(const double *x, const double *y, int N, double *accum); |
25 | 35 |
26 void hanning_window(double *p_window, int n, bool normalize); | 36 static void hanning_window(double *p_window, int n, bool normalize); |
37 }; | |
38 | |
39 #endif | |
40 |