ref: 98ceec5d61bf2537ecf8e9187a627078c37d3989
parent: 8c5019445e83d74702d6a68af7b1789a9afd8369
author: Paul Brossier <piem@piem.org>
date: Wed Aug 8 12:50:06 EDT 2018
src/spectral/dct_ooura.c: rename to aubio_dct_ooura
--- a/src/spectral/dct_ooura.c
+++ b/src/spectral/dct_ooura.c
@@ -24,9 +24,11 @@
#if !defined(HAVE_ACCELERATE) && !defined(HAVE_FFTW3) && !defined(HAVE_INTEL_IPP)
+typedef struct _aubio_dct_ooura_t aubio_dct_ooura_t;
+
extern void aubio_ooura_ddct(int, int, smpl_t *, int *, smpl_t *);
-struct _aubio_dct_t {
+struct _aubio_dct_ooura_t {
uint_t size;
fvec_t *input;
smpl_t *w;
@@ -34,8 +36,8 @@
smpl_t scalers[5];
};
-aubio_dct_t * new_aubio_dct (uint_t size) {
- aubio_dct_t * s = AUBIO_NEW(aubio_dct_t);
+aubio_dct_ooura_t * new_aubio_dct_ooura (uint_t size) {
+ aubio_dct_ooura_t * s = AUBIO_NEW(aubio_dct_ooura_t);
if (aubio_is_power_of_two(size) != 1) {
AUBIO_ERR("dct: can only create with sizes power of two, requested %d\n",
size);
@@ -57,7 +59,7 @@
return NULL;
}
-void del_aubio_dct(aubio_dct_t *s) {
+void del_aubio_dct_ooura(aubio_dct_ooura_t *s) {
del_fvec(s->input);
AUBIO_FREE(s->ip);
AUBIO_FREE(s->w);
@@ -64,7 +66,7 @@
AUBIO_FREE(s);
}
-void aubio_dct_do(aubio_dct_t *s, const fvec_t *input, fvec_t *output) {
+void aubio_dct_ooura_do(aubio_dct_ooura_t *s, const fvec_t *input, fvec_t *output) {
uint_t i = 0;
fvec_copy(input, s->input);
aubio_ooura_ddct(s->size, -1, s->input->data, s->ip, s->w);
@@ -76,7 +78,7 @@
fvec_copy(s->input, output);
}
-void aubio_dct_rdo(aubio_dct_t *s, const fvec_t *input, fvec_t *output) {
+void aubio_dct_ooura_rdo(aubio_dct_ooura_t *s, const fvec_t *input, fvec_t *output) {
uint_t i = 0;
fvec_copy(input, s->input);
s->input->data[0] *= s->scalers[2];