comparison data/fft/FFTapi.h @ 1095:b66734b5f806 simple-fft-model

Fix to fft cache
author Chris Cannam
date Sat, 13 Jun 2015 08:47:05 +0100
parents 44b079427b36
children db946591a391
comparison
equal deleted inserted replaced
1094:b386363ff6c8 1095:b66734b5f806
71 71
72 std::vector<std::complex<float> > process(std::vector<float> in) const { 72 std::vector<std::complex<float> > process(std::vector<float> in) const {
73 const int hs = m_size/2; 73 const int hs = m_size/2;
74 for (int i = 0; i < hs; ++i) { 74 for (int i = 0; i < hs; ++i) {
75 m_input[i] = in[i + hs]; 75 m_input[i] = in[i + hs];
76 }
77 for (int i = 0; i < hs; ++i) {
76 m_input[i + hs] = in[i]; 78 m_input[i + hs] = in[i];
77 } 79 }
78 fftf_execute(m_plan); 80 fftf_execute(m_plan);
79 std::vector<std::complex<float> > result; 81 std::vector<std::complex<float> > result;
80 result.reserve(hs + 1); 82 result.reserve(hs + 1);