aboutsummaryrefslogtreecommitdiff
path: root/xtract
diff options
context:
space:
mode:
Diffstat (limited to 'xtract')
-rw-r--r--xtract/libxtract.h8
-rw-r--r--xtract/xtract_helper.h3
-rw-r--r--xtract/xtract_macros.h1
3 files changed, 10 insertions, 2 deletions
diff --git a/xtract/libxtract.h b/xtract/libxtract.h
index 1b787b0..ae70efb 100644
--- a/xtract/libxtract.h
+++ b/xtract/libxtract.h
@@ -68,7 +68,7 @@ extern "C" {
* @{
*/
-#define XTRACT_FEATURES 58
+#define XTRACT_FEATURES 59
/** \brief Enumeration of features, elements are used as indixes to an array of pointers to feature extracton functions */
enum xtract_features_ {
@@ -136,7 +136,8 @@ enum xtract_features_ {
/** \brief Enumeration of feature initialisation functions */
enum xtract_feature_init_ {
XTRACT_INIT_MFCC = 100,
- XTRACT_INIT_BARK
+ XTRACT_INIT_BARK,
+ XTRACT_INIT_WINDOWED
};
/** \brief Enumeration of feature types */
@@ -153,6 +154,7 @@ enum xtract_mfcc_types_ {
};
enum xtract_lnorm_filter_types_ {
+ XTRACT_NO_LNORM_FILTER,
XTRACT_POSITIVE_SLOPE,
XTRACT_NEGATIVE_SLOPE
};
@@ -240,6 +242,7 @@ typedef enum xtract_vector_ {
XTRACT_LPC_COEFFS,
XTRACT_LPCC_COEFFS,
XTRACT_BARK_COEFFS,
+ XTRACT_SUBFRAMES,
XTRACT_NO_DATA
} xtract_vector_t;
@@ -272,6 +275,7 @@ typedef struct _xtract_function_descriptor {
} argv;
xtract_bool_t is_scalar;
+ xtract_bool_t is_delta; /* features in xtract_delta.h can be scalar or vector */
/* The result.<> entries in descritors.c need to be checked */
union {
diff --git a/xtract/xtract_helper.h b/xtract/xtract_helper.h
index 31a2183..645f1cd 100644
--- a/xtract/xtract_helper.h
+++ b/xtract/xtract_helper.h
@@ -57,6 +57,9 @@ int xtract_windowed(const float *data, const int N, const void *argv, float *res
* \param *argv a pointer to the argument vector to be passed to the feature extraction function as determined by feature
* \param *result a pointer to the 'packed' results of the feature calculation. This may be passed in as *data to xtract_features_from_subframes() to calculate further features on the subframes, or xtract_difference_vector(), to get the difference between the subframes.
*
+ *
+ * It is important to ensure that any _init_*() functions that are called in preparation for functions that are called on subframes are given the subframe size as 'N', and not the frame size. i.e. if xtract_features_from_subframes() is called with N=64, and feature=XTRACT_SPECTRUM, then xtract_init_fft() should be called with N=32.
+ *
*/
int xtract_features_from_subframes(const float *data, const int N, const int feature, const void *argv, float *result);
diff --git a/xtract/xtract_macros.h b/xtract/xtract_macros.h
index bd01ab7..2eed28e 100644
--- a/xtract/xtract_macros.h
+++ b/xtract/xtract_macros.h
@@ -30,6 +30,7 @@ extern "C" {
#endif
#define XTRACT_BARK_BANDS 26
+#define XTRACT_WINDOW_SIZE 1024/* dummy macro for descriptors where argc is window size */
#define XTRACT_NONE 0
#define XTRACT_ANY -1
#define XTRACT_UNKNOWN -2