Go to the source code of this file.
|
| int16_t | psy_hz_to_mel (int16_t hz) |
| | Convert Hz to Mel.
|
| int16_t | psy_mel_to_hz (int16_t mel) |
| | Convert Mel to Hz See Wikipedia https://en.wikipedia.org/wiki/Mel_scale hz = 700 * (exp(mel / 1126.9941805389) - 1).
|
| int | mod_psy_get_mel_filterbank (struct processing_module *mod, struct psy_mel_filterbank *mel_fb) |
| int | mod_psy_free_mel_filterbank (struct processing_module *mod, struct psy_mel_filterbank *mel_fb) |
| void | psy_apply_mel_filterbank_16 (struct psy_mel_filterbank *mel_fb, struct icomplex16 *fft_out, int32_t *power_spectra, int16_t *mel_log, int bitshift) |
| | Convert linear complex spectra from FFT into Mel band energies in desired logarithmic format.
|
| void | psy_apply_mel_filterbank_32 (struct psy_mel_filterbank *mel_fb, struct icomplex32 *fft_out, int32_t *power_spectra, int32_t *mel_log, int bitshift) |
| | Convert linear complex spectra from FFT into Mel band energies in desired logarithmic format.
|
◆ AUDITORY_EPS_Q31
| #define AUDITORY_EPS_Q31 1 /* Smallest nonzero Q1.31 value */ |
◆ AUDITORY_LOG2_2P25_Q16
◆ AUDITORY_MAX_MEL_BANDS
| #define AUDITORY_MAX_MEL_BANDS 256 |
◆ psy_mel_log_scale
| Enumerator |
|---|
| MEL_LOG | |
| MEL_LOG10 | |
| MEL_DB | |
◆ mod_psy_free_mel_filterbank()
| int mod_psy_free_mel_filterbank |
( |
struct processing_module * | mod, |
|
|
struct psy_mel_filterbank * | mel_fb ) |
◆ mod_psy_get_mel_filterbank()
| int mod_psy_get_mel_filterbank |
( |
struct processing_module * | mod, |
|
|
struct psy_mel_filterbank * | mel_fb ) |
◆ psy_apply_mel_filterbank_16()
| void psy_apply_mel_filterbank_16 |
( |
struct psy_mel_filterbank * | mel_fb, |
|
|
struct icomplex16 * | fft_out, |
|
|
int32_t * | power_spectra, |
|
|
int16_t * | mel_log, |
|
|
int | bitshift ) |
Convert linear complex spectra from FFT into Mel band energies in desired logarithmic format.
- Parameters
-
| [in] | mel_fb | Struct with filterbank parameters and filter coefficients to apply. |
| [in] | fft_out | Array of complex numbers from FFT in Q1.15 format. |
| [out] | power_spectra | Array of linear power spectra, needed scratch are that is half + 1 side of fft_out. The data can be discarded after if no use. |
| [out] | mel_log | Array of Q9.7 log/log10/10log10 format Mel band energies. |
| [in] | bitshift | A shift left scale that has been possibly applied to FFT. This will be subtracted from the log or decibels notation. |
◆ psy_apply_mel_filterbank_32()
| void psy_apply_mel_filterbank_32 |
( |
struct psy_mel_filterbank * | mel_fb, |
|
|
struct icomplex32 * | fft_out, |
|
|
int32_t * | power_spectra, |
|
|
int32_t * | mel_log, |
|
|
int | bitshift ) |
Convert linear complex spectra from FFT into Mel band energies in desired logarithmic format.
- Parameters
-
| [in] | mel_fb | Struct with filterbank parameters and filter coefficients to apply. |
| [in] | fft_out | Array of complex numbers from FFT in Q1.31 format. |
| [out] | power_spectra | Array of linear power spectra, needed scratch are that is half + 1 side of fft_out. The data can be discarded after if no use. |
| [out] | mel_log | Array of Q9.23 log/log10/10log10 format Mel band energies. |
| [in] | bitshift | A shift left scale that has been possibly applied to FFT. This will be subtracted from the log or decibels notation. |
◆ psy_hz_to_mel()
| int16_t psy_hz_to_mel |
( |
int16_t | hz | ) |
|
Convert Hz to Mel.
- Parameters
-
| [in] | hz | Frequency as Q16.0 Hz. |
- Returns
- Value as Q14.2 Mel.
◆ psy_mel_to_hz()
| int16_t psy_mel_to_hz |
( |
int16_t | mel | ) |
|
Convert Mel to Hz See Wikipedia https://en.wikipedia.org/wiki/Mel_scale hz = 700 * (exp(mel / 1126.9941805389) - 1).
- Parameters
-
| [in] | mel | Value as Q14.2 Mel, max 4358.4 Mel. |
- Returns
- hz Frequency as Q16.0 Hz, max 32767 Hz.