diff transform/FeatureExtractionModelTransformer.h @ 890:4cbf8c6a462d tony_integration

Merge from branch tonioni
author Chris Cannam
date Tue, 11 Mar 2014 17:30:35 +0000
parents b109b88bfa85
children 06579b8ffb7b
line wrap: on
line diff
--- a/transform/FeatureExtractionModelTransformer.h	Tue Jan 28 15:01:54 2014 +0000
+++ b/transform/FeatureExtractionModelTransformer.h	Tue Mar 11 17:30:35 2014 +0000
@@ -23,8 +23,10 @@
 #include <vamp-hostsdk/Plugin.h>
 
 #include <iostream>
+#include <map>
 
 class DenseTimeValueModel;
+class SparseTimeValueModel;
 
 class FeatureExtractionModelTransformer : public ModelTransformer
 {
@@ -42,6 +44,10 @@
 
     virtual ~FeatureExtractionModelTransformer();
 
+    // ModelTransformer method, retrieve the additional models
+    Models getAdditionalOutputModels();
+    bool willHaveAdditionalOutputModels();
+
 protected:
     bool initialise();
 
@@ -50,9 +56,14 @@
     Vamp::Plugin *m_plugin;
     std::vector<Vamp::Plugin::OutputDescriptor *> m_descriptors; // per transform
     std::vector<int> m_fixedRateFeatureNos; // to assign times to FixedSampleRate features
-    std::vector<int> m_outputNos;
+    std::vector<int> m_outputNos; // list of plugin output indexes required for this group of transforms
 
-    void createOutputModel(int n);
+    void createOutputModels(int n);
+
+    std::map<int, bool> m_needAdditionalModels; // transformNo -> necessity
+    typedef std::map<int, std::map<int, SparseTimeValueModel *> > AdditionalModelMap;
+    AdditionalModelMap m_additionalModels;
+    SparseTimeValueModel *getAdditionalModel(int transformNo, int binNo);
 
     void addFeature(int n,
                     size_t blockFrame,