FFmpeg
|
Go to the source code of this file.
Macros | |
#define | G729_TILT_FACTOR_PLUS 6554 |
tilt compensation factor (G.729, k1>0) 0.2 in Q15 More... | |
#define | G729_TILT_FACTOR_MINUS 29491 |
tilt compensation factor (G.729, k1<0) 0.9 in Q15 More... | |
#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 More... | |
#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 More... | |
#define | SHORT_INT_FILT_LEN 2 |
Short interpolation filter length. More... | |
#define | LONG_INT_FILT_LEN 8 |
Long interpolation filter length. More... | |
#define | ANALYZED_FRAC_DELAYS 7 |
Number of analyzed fractional pitch delays in second stage of long-term postfilter. More... | |
#define | RES_PREV_DATA_SIZE (PITCH_DELAY_MAX + LONG_INT_FILT_LEN + 1) |
Amount of past residual signal data stored in buffer. More... | |
Functions | |
void | ff_g729_postfilter (AudioDSPContext *adsp, 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) More... | |
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) More... | |
#define G729_TILT_FACTOR_PLUS 6554 |
tilt compensation factor (G.729, k1>0) 0.2 in Q15
Definition at line 32 of file g729postfilter.h.
#define G729_TILT_FACTOR_MINUS 29491 |
tilt compensation factor (G.729, k1<0) 0.9 in Q15
Definition at line 38 of file g729postfilter.h.
#define FORMANT_PP_FACTOR_NUM 18022 |
Definition at line 41 of file g729postfilter.h.
#define FORMANT_PP_FACTOR_DEN 22938 |
Definition at line 42 of file g729postfilter.h.
#define G729_AGC_FACTOR 32358 |
gain adjustment factor (G.729, 4.2.4) 0.9875 in Q15
Definition at line 48 of file g729postfilter.h.
#define G729_AGC_FAC1 (32768-G729_AGC_FACTOR) |
Definition at line 49 of file g729postfilter.h.
#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 56 of file g729postfilter.h.
#define SHORT_INT_FILT_LEN 2 |
Short interpolation filter length.
Definition at line 61 of file g729postfilter.h.
#define LONG_INT_FILT_LEN 8 |
Long interpolation filter length.
Definition at line 66 of file g729postfilter.h.
#define ANALYZED_FRAC_DELAYS 7 |
Number of analyzed fractional pitch delays in second stage of long-term postfilter.
Definition at line 72 of file g729postfilter.h.
#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 77 of file g729postfilter.h.
void ff_g729_postfilter | ( | AudioDSPContext * | adsp, |
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 | |
[in,out] | ht_prev_data | (Q12) pointer to variable receiving tilt compensation filter data from previous subframe |
[in,out] | voicing | (Q0) pointer to variable receiving voicing decision |
lp_filter_coeffs | (Q12) LP filter coefficients | |
pitch_delay_int | integer part of the pitch delay | |
[in,out] | residual | (Q0) residual signal buffer (used in long-term postfilter) |
[in,out] | res_filter_data | (Q0) speech data of previous subframe |
[in,out] | pos_filter_data | (Q0) previous speech data for short-term postfilter |
[in,out] | speech | (Q0) signal buffer |
subframe_size | size of subframe |
Filtering has the following stages: Long-term postfilter (4.2.1) Short-term postfilter (4.2.2). Tilt-compensation (4.2.3)
Definition at line 520 of file g729postfilter.c.
Referenced by decode_frame().
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 | |
[in,out] | speech | (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 | |
[in,out] | speech | signal buffer |
subframe_size | length of subframe | |
gain_prev | (3.12) previous value of gain coefficient |
Definition at line 581 of file g729postfilter.c.
Referenced by decode_frame().