Changeset 202ffa5 for src


Ignore:
Timestamp:
Oct 11, 2009, 12:49:49 PM (15 years ago)
Author:
Paul Brossier <piem@piem.org>
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:
d9b5009
Parents:
74a4865
Message:

src/spectral/mfcc.c: also loop over channels

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/spectral/mfcc.c

    r74a4865 r202ffa5  
    100100aubio_mfcc_do (aubio_mfcc_t * mf, cvec_t * in, fvec_t * out)
    101101{
    102   uint_t i, j;
     102  uint_t i, j, k;
    103103
    104104  /* compute filterbank */
     
    115115
    116116  /* compute discrete cosine transform */
    117   for (i = 0; i < mf->n_filters; i++) {
    118     for (j = 0; j < mf->n_coefs; j++) {
    119       out->data[0][j] += mf->in_dct->data[0][i]
    120           * mf->dct_coeffs->data[i][j];
     117  for (i = 0; i < out->channels; i++) {
     118    for (j = 0; j < mf->n_filters; j++) {
     119      for (k = 0; k < mf->n_coefs; k++) {
     120        out->data[i][k] += mf->in_dct->data[i][j]
     121            * mf->dct_coeffs->data[j][k];
     122      }
    121123    }
    122124  }
Note: See TracChangeset for help on using the changeset viewer.