Changeset bafe71d for src/temporal/filter.c
- Timestamp:
- Nov 3, 2009, 4:22:39 PM (14 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, pitchshift, sampler, timestretch, yinfft+
- Children:
- 31907fd
- Parents:
- fddfa64
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/temporal/filter.c
rfddfa64 rbafe71d 81 81 82 82 /* The rough way: reset memory of filter between each run to avoid end effects. */ 83 void aubio_filter_do_filtfilt(aubio_filter_t * f, fvec_t * in, fvec_t * tmp) { 84 uint_t j,i=0; 83 void 84 aubio_filter_do_filtfilt (aubio_filter_t * f, fvec_t * in, fvec_t * tmp) 85 { 86 uint_t j, i = 0; 85 87 uint_t length = in->length; 86 88 /* apply filtering */ 87 aubio_filter_do (f,in);88 aubio_filter_do_reset (f);89 aubio_filter_do (f, in); 90 aubio_filter_do_reset (f); 89 91 /* mirror */ 90 92 for (j = 0; j < length; j++) 91 tmp->data[i][length -j-1] = in->data[i][j];93 tmp->data[i][length - j - 1] = in->data[i][j]; 92 94 /* apply filtering on mirrored */ 93 aubio_filter_do (f,tmp);94 aubio_filter_do_reset (f);95 aubio_filter_do (f, tmp); 96 aubio_filter_do_reset (f); 95 97 /* invert back */ 96 98 for (j = 0; j < length; j++) 97 in->data[i][j] = tmp->data[i][length -j-1];99 in->data[i][j] = tmp->data[i][length - j - 1]; 98 100 } 99 101 … … 132 134 aubio_filter_do_reset (aubio_filter_t * f) 133 135 { 134 lvec_zeros (f->x);135 lvec_zeros (f->y);136 lvec_zeros (f->x); 137 lvec_zeros (f->y); 136 138 } 137 139
Note: See TracChangeset
for help on using the changeset viewer.