Functions | |
static void | adaptive_gain_control (float *out, const float *in, const float *speech_synth, int size, float alpha, float *gain_mem) |
Adaptive gain control (as used in postfilter). | |
static int | kalman_smoothen (WMAVoiceContext *s, int pitch, const float *in, float *out, int size) |
Kalman smoothing function. | |
static float | tilt_factor (const float *lpcs, int n_lpcs) |
Get the tilt factor of a formant filter from its transfer function. | |
static void | calc_input_response (WMAVoiceContext *s, float *lpcs, int fcb_type, float *coeffs, int remainder) |
Derive denoise filter coefficients (in real domain) from the LPCs. | |
static void | wiener_denoise (WMAVoiceContext *s, int fcb_type, float *synth_pf, int size, const float *lpcs) |
This function applies a Wiener filter on the (noisy) speech signal as a means to denoise it. | |
static void | postfilter (WMAVoiceContext *s, const float *synth, float *samples, int size, const float *lpcs, float *zero_exc_pf, int fcb_type, int pitch) |
Averaging projection filter, the postfilter used in WMAVoice. |
static void adaptive_gain_control | ( | float * | out, | |
const float * | in, | |||
const float * | speech_synth, | |||
int | size, | |||
float | alpha, | |||
float * | gain_mem | |||
) | [static] |
Adaptive gain control (as used in postfilter).
Identical to ff_adaptive_gain_control() in acelp_vectors.c, except that the energy here is calculated using sum(abs(...)), whereas the other codecs (e.g. AMR-NB, SIPRO) use sqrt(dotproduct(...)).
out | output buffer for filtered samples | |
in | input buffer containing the samples as they are after the postfilter steps so far | |
speech_synth | input buffer containing speech synth before postfilter | |
size | input buffer size | |
alpha | exponential filter factor | |
gain_mem | pointer to filter memory (single float) |
Definition at line 454 of file wmavoice.c.
Referenced by postfilter().
static void calc_input_response | ( | WMAVoiceContext * | s, | |
float * | lpcs, | |||
int | fcb_type, | |||
float * | coeffs, | |||
int | remainder | |||
) | [static] |
Derive denoise filter coefficients (in real domain) from the LPCs.
Definition at line 553 of file wmavoice.c.
Referenced by wiener_denoise().
static int kalman_smoothen | ( | WMAVoiceContext * | s, | |
int | pitch, | |||
const float * | in, | |||
float * | out, | |||
int | size | |||
) | [static] |
Kalman smoothing function.
This function looks back pitch +/- 3 samples back into history to find the best fitting curve (that one giving the optimal gain of the two signals, i.e. the highest dot product between the two), and then uses that signal history to smoothen the output of the speech synthesis filter.
s | WMA Voice decoding context | |
pitch | pitch of the speech signal | |
in | input speech signal | |
out | output pointer for smoothened signal | |
size | input/output buffer size |
Definition at line 494 of file wmavoice.c.
Referenced by postfilter().
static void postfilter | ( | WMAVoiceContext * | s, | |
const float * | synth, | |||
float * | samples, | |||
int | size, | |||
const float * | lpcs, | |||
float * | zero_exc_pf, | |||
int | fcb_type, | |||
int | pitch | |||
) | [static] |
Averaging projection filter, the postfilter used in WMAVoice.
This uses the following steps:
s | WMAVoice decoding context | |
synth | Speech synthesis output (before postfilter) | |
samples | Output buffer for filtered samples | |
size | Buffer size of synth & samples | |
lpcs | Generated LPCs used for speech synthesis | |
fcb_type | Frame type (silence, hardcoded, AW-pulses or FCB-pulses) | |
pitch | Pitch of the input signal |
Definition at line 750 of file wmavoice.c.
static float tilt_factor | ( | const float * | lpcs, | |
int | n_lpcs | |||
) | [static] |
Get the tilt factor of a formant filter from its transfer function.
lpcs | LPC coefficients | |
n_lpcs | Size of LPC buffer |
Definition at line 540 of file wmavoice.c.
static void wiener_denoise | ( | WMAVoiceContext * | s, | |
int | fcb_type, | |||
float * | synth_pf, | |||
int | size, | |||
const float * | lpcs | |||
) | [static] |
This function applies a Wiener filter on the (noisy) speech signal as a means to denoise it.
s | WMA Voice decoding context | |
s | fcb_type Frame (codebook) type | |
synth_pf | input: the noisy speech signal, output: denoised speech data; should be 16-byte aligned (for ASM purposes) | |
size | size of the speech data | |
lpcs | LPCs used to synthesize this frame's speech data |
Definition at line 669 of file wmavoice.c.
Referenced by postfilter().