Changeset 49b19d4
- Timestamp:
- Sep 15, 2018, 4:19:24 PM (6 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master
- Children:
- 95e3cba
- Parents:
- 52c1de9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/spectral/dct_accelerate.c
r52c1de9 r49b19d4 29 29 #endif 30 30 31 struct _aubio_dct_ t {31 struct _aubio_dct_accelerate_t { 32 32 uint_t size; 33 33 fvec_t *tmp; … … 36 36 }; 37 37 38 aubio_dct_t * new_aubio_dct (uint_t size) { 39 aubio_dct_t * s = AUBIO_NEW(aubio_dct_t); 38 typedef struct _aubio_dct_accelerate_t aubio_dct_accelerate_t; 39 40 void del_aubio_dct_accelerate (aubio_dct_accelerate_t *s); 41 42 aubio_dct_accelerate_t * new_aubio_dct_accelerate (uint_t size) { 43 aubio_dct_accelerate_t * s = AUBIO_NEW(aubio_dct_accelerate_t); 40 44 41 45 if ((sint_t)size < 16 || !aubio_is_power_of_two(size)) { 42 46 AUBIO_ERR("dct: can only create with sizes greater than 16 and" 43 " that are powers of two, requested %d\n", size);47 " that are powers of two, requested %d\n", size); 44 48 goto beach; 45 49 } … … 56 60 57 61 beach: 58 del_aubio_dct (s);62 del_aubio_dct_accelerate(s); 59 63 return NULL; 60 64 } 61 65 62 void del_aubio_dct (aubio_dct_t *s) {66 void del_aubio_dct_accelerate(aubio_dct_accelerate_t *s) { 63 67 if (s->setup) vDSP_DFT_DestroySetup(s->setup); 64 68 if (s->setupInv) vDSP_DFT_DestroySetup(s->setupInv); … … 66 70 } 67 71 68 void aubio_dct_ do(aubio_dct_t *s, const fvec_t *input, fvec_t *output) {72 void aubio_dct_accelerate_do(aubio_dct_accelerate_t *s, const fvec_t *input, fvec_t *output) { 69 73 70 74 vDSP_DCT_Execute(s->setup, (const float *)input->data, (float *)output->data); … … 79 83 } 80 84 81 void aubio_dct_ rdo(aubio_dct_t *s, const fvec_t *input, fvec_t *output) {85 void aubio_dct_accelerate_rdo(aubio_dct_accelerate_t *s, const fvec_t *input, fvec_t *output) { 82 86 83 87 output->data[0] = input->data[0] / SQRT(1./s->size);
Note: See TracChangeset
for help on using the changeset viewer.