diff dsp/chromagram/ConstantQ.h @ 276:4c901426b9f3

* Do not calculate CQ sparse kernel when chromagram is constructed: only when it's actually used * Pre-calculate CQ sparse kernels in the sizes required for the default configurations of some of our transforms
author Chris Cannam <c.cannam@qmul.ac.uk>
date Thu, 04 Dec 2008 11:59:29 +0000
parents 9619d6995b73
children e5907ae6de17
line wrap: on
line diff
--- a/dsp/chromagram/ConstantQ.h	Tue Nov 25 16:00:05 2008 +0000
+++ b/dsp/chromagram/ConstantQ.h	Thu Dec 04 11:59:29 2008 +0000
@@ -63,10 +63,15 @@
     unsigned int m_BPO;
     unsigned int m_FFTLength;
     unsigned int m_uK;
-    std::vector<unsigned> m_sparseKernelIs;
-    std::vector<unsigned> m_sparseKernelJs;
-    std::vector<double> m_sparseKernelImagValues;
-    std::vector<double> m_sparseKernelRealValues;
+
+    struct SparseKernel {
+        std::vector<unsigned> is;
+        std::vector<unsigned> js;
+        std::vector<double> imag;
+        std::vector<double> real;
+    };
+
+    SparseKernel *m_sparseKernel;
 };