Changeset d37400c


Ignore:
Timestamp:
Sep 28, 2009, 9:19:40 PM (10 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
6940b55
Parents:
fd6b90f
Message:

src/spectral/filterbank.c: move log10 to mfcc.c

Location:
src/spectral
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/spectral/filterbank.c

    rfd6b90f rd37400c  
    2525#include "spectral/filterbank.h"
    2626#include "mathutils.h"
    27 
    28 #define VERY_SMALL_NUMBER 2e-42
    2927
    3028/** \brief A structure to store a set of n_filters filters of lenghts win_s */
     
    7977        out->data[i][fn] += in->norm[i][j] * f->filters->data[fn][j];
    8078      }
    81 
    82       /* threshold to VERY_SMALL_NUMBER to avoid log oveflow */
    83       out->data[i][fn] = MAX (VERY_SMALL_NUMBER, out->data[i][fn]);
    84 
    85       /* compute logarithm */
    86       out->data[i][fn] = LOG10 (out->data[i][fn]);
    8779    }
    8880  }
  • src/spectral/mfcc.c

    rfd6b90f rd37400c  
    2323#include "fvec.h"
    2424#include "cvec.h"
     25#include "mathutils.h"
    2526#include "spectral/fft.h"
    2627#include "spectral/filterbank_mel.h"
     
    102103  aubio_filterbank_do (mf->fb, in, mf->in_dct);
    103104
     105  /* compute log10 */
     106  fvec_log10 (mf->in_dct);
     107
     108  /* raise power */
     109  //vec_pow (mf->in_dct, 3.);
     110
    104111  /* zeros output */
    105112  fvec_zeros(out);
Note: See TracChangeset for help on using the changeset viewer.