#include <avr32/io.h>
#include "cycle_counter.h"
#include "power_clocks_lib.h"
#include "dsp.h"
#include "conf_mfcc.h"
Macros | |
#define | INPUT_FRAME_NB_SAMPLES ((MFCC_INPUT_FS * MFCC_FRAME_SIZE_MS) / 1000) |
Input frame size in number of samples. More... | |
#define | INPUT_FRAME_SHIFT_NB_SAMPLES ((MFCC_INPUT_FS * MFCC_FRAME_SHIFT_MS) / 1000) |
frame shift in number of samples More... | |
Functions | |
dsp16_t * | generate_input_signal () |
int | main (void) |
S32 * | mfcc_dct_13_pts (S32 *buffer, int size) |
dsp16_t * | mfcc_fft_512pts (dsp16_t *buffer, int size) |
dsp16_t * | mfcc_hamming_window (dsp16_t *buffer, int size) |
void | mfcc_init () |
S32 | mfcc_lin_to_mel (S32 f_hz) |
S32 * | mfcc_log (S32 *buffer, int size) |
S32 * | mfcc_mel_scale_filter_bank (dsp16_t *buffer, int size) |
void | mfcc_mel_scale_filter_bank_init () |
S32 | mfcc_mel_to_lin (S32 f_mel_hz) |
S32 * | mfcc_numerical_diff_13 (S32 *cepstrum) |
dsp16_t * | mfcc_pre_emphasis (dsp16_t *buffer, int size) |
void | mfcc_process () |
This function should be called every MFCC_FRAME_SHIFT_MS ms. More... | |
Variables | |
A_ALIGNED dsp16_t | hamming_window [INPUT_FRAME_NB_SAMPLES] |
A_ALIGNED dsp16_t | input_frame [INPUT_FRAME_NB_SAMPLES] |
int | pt_mel [MEL_FILTER_BANK_NB_CHANNELS+2] |
A_ALIGNED dsp16_t | temp_buffer [1024] |
#define INPUT_FRAME_NB_SAMPLES ((MFCC_INPUT_FS * MFCC_FRAME_SIZE_MS) / 1000) |
Input frame size in number of samples.
Referenced by generate_input_signal(), mfcc_init(), and mfcc_process().
#define INPUT_FRAME_SHIFT_NB_SAMPLES ((MFCC_INPUT_FS * MFCC_FRAME_SHIFT_MS) / 1000) |
frame shift in number of samples
Referenced by generate_input_signal().
dsp16_t* generate_input_signal | ( | ) |
< To generate frequency in the pass band.
References A_ALIGNED, dsp16_gen_sin(), DSP16_Q, dsp16_vect_add(), dsp16_vect_max(), dsp16_vect_realdiv(), dsp16_vect_realmul(), GEN_INPUT_NB_SINES, i, input_frame, INPUT_FRAME_NB_SAMPLES, INPUT_FRAME_SHIFT_NB_SAMPLES, max, and MFCC_INPUT_FS.
Referenced by mfcc_init(), and mfcc_process().
int main | ( | void | ) |
References gc_dfllif_ref_opt, i, if(), mfcc_init(), mfcc_process(), pcl_configure_clocks(), pcl_dfll_freq_param, pcl_freq_param_t, PCL_MC_DFLL0, SCIF_GCCTRL_SLOWCLOCK, and UNUSED.
References dsp16_op_cos(), DSP16_Q, DSP16_QB, n, and temp.
Referenced by mfcc_process().
References A_ALIGNED, dsp16_op_mul(), DSP16_Q, dsp16_trans_realcomplexfft(), dsp16_vect_max(), dsp16_vect_zeropad(), FFT_INTEGER_GAIN, i, and max.
Referenced by mfcc_process().
References dsp16_vect_dotmul(), and hamming_window.
Referenced by mfcc_process().
void mfcc_init | ( | ) |
References DSP16_Q, dsp16_vect_zeropad(), dsp16_win_hamm(), generate_input_signal(), hamming_window, i, input_frame, INPUT_FRAME_NB_SAMPLES, mfcc_mel_scale_filter_bank_init(), and temp_buffer.
Referenced by main().
References CST_LN_10, dsp16_op_ln_raw(), DSP16_Q, DSP16_QB, and DSP_Q.
Referenced by mfcc_mel_scale_filter_bank_init().
References dsp16_op_ln_raw(), and i.
Referenced by mfcc_process().
References dsp16_op_mul(), DSP16_Q, i, j, length, MEL_FILTER_BANK_NB_CHANNELS, and pt_mel.
Referenced by mfcc_process().
void mfcc_mel_scale_filter_bank_init | ( | ) |
References i, MEL_FILTER_BANK_NB_CHANNELS, MFCC_INPUT_FS, mfcc_lin_to_mel(), mfcc_mel_to_lin(), and pt_mel.
Referenced by mfcc_init().
References DSP16_QB, and DSP_Q.
Referenced by mfcc_mel_scale_filter_bank_init().
References i.
Referenced by mfcc_process().
References dsp16_op_mul(), DSP16_Q, i, and PRE_EMPHASIS_ALPHA.
Referenced by mfcc_process().
void mfcc_process | ( | ) |
This function should be called every MFCC_FRAME_SHIFT_MS ms.
References generate_input_signal(), Get_sys_count, input_frame, INPUT_FRAME_NB_SAMPLES, MEL_FILTER_BANK_NB_CHANNELS, mfcc_dct_13_pts(), mfcc_fft_512pts(), mfcc_hamming_window(), mfcc_log(), mfcc_mel_scale_filter_bank(), mfcc_numerical_diff_13(), mfcc_pre_emphasis(), and temp_buffer.
Referenced by main().
A_ALIGNED dsp16_t hamming_window[INPUT_FRAME_NB_SAMPLES] |
Referenced by mfcc_hamming_window(), and mfcc_init().
A_ALIGNED dsp16_t input_frame[INPUT_FRAME_NB_SAMPLES] |
Referenced by generate_input_signal(), mfcc_init(), and mfcc_process().
int pt_mel[MEL_FILTER_BANK_NB_CHANNELS+2] |
Referenced by mfcc_mel_scale_filter_bank(), and mfcc_mel_scale_filter_bank_init().
Referenced by mfcc_init(), and mfcc_process().