Mercurial > hg > qm-dsp
comparison dsp/segmentation/ClusterMeltSegmenter.cpp @ 114:f6ccde089491 pvoc
Tidy real-to-complex FFT -- forward and inverse have different arguments, so make them separate functions; document
author | Chris Cannam |
---|---|
date | Wed, 02 Oct 2013 15:04:38 +0100 |
parents | e5907ae6de17 |
children | e4a57215ddee |
comparison
equal
deleted
inserted
replaced
113:3cb359d043f0 | 114:f6ccde089491 |
---|---|
207 frame[i + fftsize/2] = value; | 207 frame[i + fftsize/2] = value; |
208 } | 208 } |
209 | 209 |
210 window->cut(frame); | 210 window->cut(frame); |
211 | 211 |
212 fft->process(false, frame, real, imag); | 212 fft->forward(frame, real, imag); |
213 | 213 |
214 constq->process(real, imag, cqre, cqim); | 214 constq->process(real, imag, cqre, cqim); |
215 | 215 |
216 for (int i = 0; i < ncoeff; ++i) { | 216 for (int i = 0; i < ncoeff; ++i) { |
217 cq[i] += sqrt(cqre[i] * cqre[i] + cqim[i] * cqim[i]); | 217 cq[i] += sqrt(cqre[i] * cqre[i] + cqim[i] * cqim[i]); |