aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Stowell <danstowell@gmail.com>2007-10-03 13:43:16 +0000
committerDan Stowell <danstowell@gmail.com>2007-10-03 13:43:16 +0000
commit06aa68eff5b0756aec960a9efaa8ab9b5fe32a75 (patch)
tree3b96aaa545a106389f468f5c53c901e202428419
parentdb5598d74855ceddcbff2be23e531302a7bbfe08 (diff)
downloadLibXtract-06aa68eff5b0756aec960a9efaa8ab9b5fe32a75.tar.gz
LibXtract-06aa68eff5b0756aec960a9efaa8ab9b5fe32a75.tar.bz2
LibXtract-06aa68eff5b0756aec960a9efaa8ab9b5fe32a75.zip
Dan Stowell: Removed strange "zeroing" part of xtract_mfcc() which was zeroing a load of elements despite the fact that they're ignored by the DCT process called next, and never used for anything. This was writing to an assumed large result array (same size as number of FFT bins) despite the fact that only a small number of MFCCs (typically less than 50) are required, therefore either wasting memory or writing to memory it shouldn't do!
-rw-r--r--src/vector.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/vector.c b/src/vector.c
index 0df7048..19596ff 100644
--- a/src/vector.c
+++ b/src/vector.c
@@ -221,8 +221,6 @@ int xtract_mfcc(const float *data, const int N, const void *argv, float *result)
result[filter] = log(result[filter] < XTRACT_LOG_LIMIT ? XTRACT_LOG_LIMIT : result[filter]);
}
- for(n = filter + 1; n < N; n++) result[n] = 0;
-
xtract_dct(result, f->n_filters, NULL, result);
return XTRACT_SUCCESS;