int32 fe_logspec_dct2(fe_t * fe, const mfcc_t * fr_spec, mfcc_t * fr_cep) { #ifdef FIXED_POINT fe_dct2(fe, fr_spec, fr_cep, 0); #else /* ! FIXED_POINT */ powspec_t *powspec; int32 i; powspec = ckd_malloc(fe->mel_fb->num_filters * sizeof(powspec_t)); for (i = 0; i < fe->mel_fb->num_filters; ++i) powspec[i] = (powspec_t) fr_spec[i]; fe_dct2(fe, powspec, fr_cep, 0); ckd_free(powspec); #endif /* ! FIXED_POINT */ return 0; }
int32 fe_logspec_dct2(fe_t * FE, const mfcc_t * fr_spec, mfcc_t * fr_cep) { #ifdef FIXED_POINT fe_dct2(FE, fr_spec, fr_cep, 0); #else /* ! FIXED_POINT */ powspec_t *powspec; int32 i; powspec = malloc(FE->MEL_FB->num_filters * sizeof(powspec_t)); for (i = 0; i < FE->MEL_FB->num_filters; ++i) powspec[i] = (powspec_t) fr_spec[i]; fe_dct2(FE, powspec, fr_cep, 0); free(powspec); #endif /* ! FIXED_POINT */ return 0; }