#include <stdint.h>
Go to the source code of this file.
Defines | |
#define | G729_TILT_FACTOR_PLUS 6554 |
tilt compensation factor (G.729, k1>0) 0.2 in Q15 | |
#define | G729_TILT_FACTOR_MINUS 29491 |
tilt compensation factor (G.729, k1<0) 0.9 in Q15 | |
#define | FORMANT_PP_FACTOR_NUM 18022 |
#define | FORMANT_PP_FACTOR_DEN 22938 |
#define | G729_AGC_FACTOR 32358 |
gain adjustment factor (G.729, 4.2.4) 0.9875 in Q15 | |
#define | G729_AGC_FAC1 (32768-G729_AGC_FACTOR) |
#define | MIN_LT_FILT_FACTOR_A 21845 |
1.0 / (1.0 + 0.5) in Q15 where 0.5 is the minimum value of weight factor, controlling amount of long-term postfiltering | |
#define | SHORT_INT_FILT_LEN 2 |
Short interpolation filter length. | |
#define | LONG_INT_FILT_LEN 8 |
Long interpolation filter length. | |
#define | ANALYZED_FRAC_DELAYS 7 |
Number of analyzed fractional pitch delays in second stage of long-term postfilter. | |
#define | RES_PREV_DATA_SIZE (PITCH_DELAY_MAX + LONG_INT_FILT_LEN + 1) |
Amount of past residual signal data stored in buffer. | |
Functions | |
void | ff_g729_postfilter (DSPContext *dsp, int16_t *ht_prev_data, int *voicing, const int16_t *lp_filter_coeffs, int pitch_delay_int, int16_t *residual, int16_t *res_filter_data, int16_t *pos_filter_data, int16_t *speech, int subframe_size) |
Signal postfiltering (4.2). | |
int16_t | ff_g729_adaptive_gain_control (int gain_before, int gain_after, int16_t *speech, int subframe_size, int16_t gain_prev) |
Adaptive gain control (4.2.4). |
#define ANALYZED_FRAC_DELAYS 7 |
Number of analyzed fractional pitch delays in second stage of long-term postfilter.
Definition at line 70 of file g729postfilter.h.
Referenced by long_term_filter().
#define FORMANT_PP_FACTOR_DEN 22938 |
Definition at line 40 of file g729postfilter.h.
#define FORMANT_PP_FACTOR_NUM 18022 |
Definition at line 39 of file g729postfilter.h.
#define G729_AGC_FAC1 (32768-G729_AGC_FACTOR) |
#define G729_AGC_FACTOR 32358 |
gain adjustment factor (G.729, 4.2.4) 0.9875 in Q15
Definition at line 46 of file g729postfilter.h.
Referenced by ff_g729_adaptive_gain_control().
#define G729_TILT_FACTOR_MINUS 29491 |
tilt compensation factor (G.729, k1<0) 0.9 in Q15
Definition at line 36 of file g729postfilter.h.
Referenced by apply_tilt_comp().
#define G729_TILT_FACTOR_PLUS 6554 |
tilt compensation factor (G.729, k1>0) 0.2 in Q15
Definition at line 30 of file g729postfilter.h.
Referenced by apply_tilt_comp().
#define LONG_INT_FILT_LEN 8 |
Long interpolation filter length.
Definition at line 64 of file g729postfilter.h.
Referenced by long_term_filter().
#define MIN_LT_FILT_FACTOR_A 21845 |
1.0 / (1.0 + 0.5) in Q15 where 0.5 is the minimum value of weight factor, controlling amount of long-term postfiltering
Definition at line 54 of file g729postfilter.h.
Referenced by long_term_filter().
#define RES_PREV_DATA_SIZE (PITCH_DELAY_MAX + LONG_INT_FILT_LEN + 1) |
Amount of past residual signal data stored in buffer.
Definition at line 75 of file g729postfilter.h.
Referenced by ff_g729_postfilter(), and long_term_filter().
#define SHORT_INT_FILT_LEN 2 |
Short interpolation filter length.
Definition at line 59 of file g729postfilter.h.
Referenced by long_term_filter().
int16_t ff_g729_adaptive_gain_control | ( | int | gain_before, | |
int | gain_after, | |||
int16_t * | speech, | |||
int | subframe_size, | |||
int16_t | gain_prev | |||
) |
Adaptive gain control (4.2.4).
gain_before | (Q0) gain of speech before applying postfilters | |
gain_after | (Q0) gain of speech after applying postfilters | |
speech | [in/out] (Q0) signal buffer | |
subframe_size | length of subframe | |
gain_prev | (Q12) previous value of gain coefficient |
gain_before | gain of speech before applying postfilters | |
gain_after | gain of speech after applying postfilters | |
speech | [in/out] signal buffer | |
subframe_size | length of subframe | |
gain_prev | (3.12) previous value of gain coefficient |
Definition at line 574 of file g729postfilter.c.
Referenced by decode_frame().
void ff_g729_postfilter | ( | DSPContext * | dsp, | |
int16_t * | ht_prev_data, | |||
int * | voicing, | |||
const int16_t * | lp_filter_coeffs, | |||
int | pitch_delay_int, | |||
int16_t * | residual, | |||
int16_t * | res_filter_data, | |||
int16_t * | pos_filter_data, | |||
int16_t * | speech, | |||
int | subframe_size | |||
) |
Signal postfiltering (4.2).
dsp | initialized DSP context | |
ht_prev_data | [in/out] (Q12) pointer to variable receiving tilt compensation filter data from previous subframe | |
voicing | [in/out] (Q0) pointer to variable receiving voicing decision | |
lp_filter_coeffs | (Q12) LP filter coefficients | |
pitch_delay_int | integer part of the pitch delay | |
residual | [in/out] (Q0) residual signal buffer (used in long-term postfilter) | |
res_filter_data | [in/out] (Q0) speech data of previous subframe | |
pos_filter_data | [in/out] (Q0) previous speech data for short-term postfilter | |
speech | [in/out] (Q0) signal buffer | |
subframe_size | size of subframe |
Definition at line 514 of file g729postfilter.c.
Referenced by decode_frame().