|
FFmpeg
|
Go to the source code of this file.
Data Structures | |
| struct | G723_1_Subframe |
| G723.1 unpacked data subframe. More... | |
| struct | PPFParam |
| Pitch postfilter parameters. More... | |
| struct | HFParam |
| Harmonic filter parameters. More... | |
| struct | FCBParam |
| Optimized fixed codebook excitation parameters. More... | |
| struct | G723_1_ChannelContext |
| struct | G723_1_Context |
Macros | |
| #define | SUBFRAMES 4 |
| #define | SUBFRAME_LEN 60 |
| #define | FRAME_LEN (SUBFRAME_LEN << 2) |
| #define | HALF_FRAME_LEN (FRAME_LEN / 2) |
| #define | LPC_FRAME (HALF_FRAME_LEN + SUBFRAME_LEN) |
| #define | LPC_ORDER 10 |
| #define | LSP_BANDS 3 |
| #define | LSP_CB_SIZE 256 |
| #define | PITCH_MIN 18 |
| #define | PITCH_MAX (PITCH_MIN + 127) |
| #define | PITCH_ORDER 5 |
| #define | GRID_SIZE 2 |
| #define | PULSE_MAX 6 |
| #define | GAIN_LEVELS 24 |
| #define | COS_TBL_SIZE 512 |
| #define | MULL2(a, b) ((((a) >> 16) * (b) * 2) + (((a) & 0xffff) * (b) >> 15)) |
| Bitexact implementation of 2ab scaled by 1/2^16. More... | |
| #define | G723_1_COS_TAB_FIRST_ELEMENT 16384 |
Enumerations | |
| enum | FrameType { ACTIVE_FRAME, SID_FRAME, UNTRANSMITTED_FRAME, INTRA_FRAME = 0, INTER_FRAME, SKIP_FRAME, FIRST_FRAME, INNER_FRAME, FINAL_FRAME, LINEAR_MODE, FRAME_NB } |
| G723.1 frame types. More... | |
| enum | Rate { RATE_6300, RATE_5300 } |
| G723.1 rate values. More... | |
Functions | |
| int | ff_g723_1_scale_vector (int16_t *dst, const int16_t *vector, int length) |
| Scale vector contents based on the largest of their absolutes. More... | |
| int | ff_g723_1_normalize_bits (int num, int width) |
| Calculate the number of left-shifts required for normalizing the input. More... | |
| int | ff_g723_1_dot_product (const int16_t *a, const int16_t *b, int length) |
| void | ff_g723_1_get_residual (int16_t *residual, int16_t *prev_excitation, int lag) |
| Get delayed contribution from the previous excitation vector. More... | |
| void | ff_g723_1_gen_dirac_train (int16_t *buf, int pitch_lag) |
| Generate a train of dirac functions with period as pitch lag. More... | |
| void | ff_g723_1_gen_acb_excitation (int16_t *vector, int16_t *prev_excitation, int pitch_lag, G723_1_Subframe *subfrm, enum Rate cur_rate) |
| Generate adaptive codebook excitation. More... | |
| void | ff_g723_1_lsp_interpolate (int16_t *lpc, int16_t *cur_lsp, int16_t *prev_lsp) |
| Quantize LSP frequencies by interpolation and convert them to the corresponding LPC coefficients. More... | |
| void | ff_g723_1_inverse_quant (int16_t *cur_lsp, int16_t *prev_lsp, uint8_t *lsp_index, int bad_frame) |
| Perform inverse quantization of LSP frequencies. More... | |
Variables | |
| static const uint8_t | frame_size [4] = { 24, 20, 4, 1 } |
| static const int16_t | dc_lsp [LPC_ORDER] |
| LSP DC component. More... | |
| const int16_t | ff_g723_1_cos_tab [COS_TBL_SIZE+1] |
| const int16_t | ff_g723_1_lsp_band0 [LSP_CB_SIZE][3] |
| LSP VQ tables. More... | |
| const int16_t | ff_g723_1_lsp_band1 [LSP_CB_SIZE][3] |
| const int16_t | ff_g723_1_lsp_band2 [LSP_CB_SIZE][4] |
| const int32_t | ff_g723_1_combinatorial_table [PULSE_MAX][SUBFRAME_LEN/GRID_SIZE] |
| Used for the coding/decoding of the pulses positions for the MP-MLQ codebook. More... | |
| static const int8_t | pulses [4] = {6, 5, 6, 5} |
| Number of non-zero pulses in the MP-MLQ excitation. More... | |
| const int16_t | ff_g723_1_fixed_cb_gain [GAIN_LEVELS] |
| const int16_t | ff_g723_1_adaptive_cb_gain85 [85 *20] |
| const int16_t | ff_g723_1_adaptive_cb_gain170 [170 *20] |
G.723.1 types, functions and data tables
Definition in file g723_1.h.
| #define FRAME_LEN (SUBFRAME_LEN << 2) |
| #define LPC_FRAME (HALF_FRAME_LEN + SUBFRAME_LEN) |
| enum FrameType |
Scale vector contents based on the largest of their absolutes.
Definition at line 1104 of file g723_1.c.
Referenced by comp_autocorr(), comp_interp_index(), formant_postfilter(), and g723_1_encode_frame().
Calculate the number of left-shifts required for normalizing the input.
| num | input number |
| width | width of the input, 16 bits(0) / 32 bits(1) |
Definition at line 1121 of file g723_1.c.
Referenced by acb_search(), comp_autocorr(), comp_harmonic_coeff(), comp_ppf_coeff(), estimate_pitch(), gain_scale(), get_fcb_param(), lpc2lsp(), and lsp_quantize().
Definition at line 1126 of file g723_1.c.
Referenced by acb_search(), autocorr_max(), comp_interp_index(), comp_ppf_coeff(), formant_postfilter(), and get_fcb_param().
| void ff_g723_1_get_residual | ( | int16_t * | residual, |
| int16_t * | prev_excitation, | ||
| int | lag | ||
| ) |
Get delayed contribution from the previous excitation vector.
Definition at line 1132 of file g723_1.c.
Referenced by acb_search(), and ff_g723_1_gen_acb_excitation().
| void ff_g723_1_gen_dirac_train | ( | int16_t * | buf, |
| int | pitch_lag | ||
| ) |
Generate a train of dirac functions with period as pitch lag.
Definition at line 1146 of file g723_1.c.
Referenced by fcb_search(), gen_fcb_excitation(), and get_fcb_param().
| void ff_g723_1_gen_acb_excitation | ( | int16_t * | vector, |
| int16_t * | prev_excitation, | ||
| int | pitch_lag, | ||
| G723_1_Subframe * | subfrm, | ||
| enum Rate | cur_rate | ||
| ) |
Generate adaptive codebook excitation.
Definition at line 1158 of file g723_1.c.
Referenced by g723_1_decode_frame(), g723_1_encode_frame(), and generate_noise().
| void ff_g723_1_lsp_interpolate | ( | int16_t * | lpc, |
| int16_t * | cur_lsp, | ||
| int16_t * | prev_lsp | ||
| ) |
Quantize LSP frequencies by interpolation and convert them to the corresponding LPC coefficients.
| lpc | buffer for LPC coefficients |
| cur_lsp | the current LSP vector |
| prev_lsp | the previous LSP vector |
Definition at line 1252 of file g723_1.c.
Referenced by g723_1_decode_frame(), and g723_1_encode_frame().
| void ff_g723_1_inverse_quant | ( | int16_t * | cur_lsp, |
| int16_t * | prev_lsp, | ||
| uint8_t * | lsp_index, | ||
| int | bad_frame | ||
| ) |
Perform inverse quantization of LSP frequencies.
| cur_lsp | the current LSP vector |
| prev_lsp | the previous LSP vector |
| lsp_index | VQ indices |
| bad_frame | bad frame flag |
Definition at line 1273 of file g723_1.c.
Referenced by g723_1_decode_frame(), and g723_1_encode_frame().
|
static |
LSP DC component.
Definition at line 227 of file g723_1.h.
Referenced by ff_g723_1_inverse_quant(), g723_1_decode_init(), g723_1_encode_init(), and lsp_quantize().
| const int16_t ff_g723_1_cos_tab[COS_TBL_SIZE+1] |
| const int16_t ff_g723_1_lsp_band0[LSP_CB_SIZE][3] |
| const int16_t ff_g723_1_lsp_band1[LSP_CB_SIZE][3] |
Definition at line 190 of file g723_1.c.
Referenced by ff_g723_1_inverse_quant().
| const int16_t ff_g723_1_lsp_band2[LSP_CB_SIZE][4] |
Definition at line 279 of file g723_1.c.
Referenced by ff_g723_1_inverse_quant().
| const int32_t ff_g723_1_combinatorial_table[PULSE_MAX][SUBFRAME_LEN/GRID_SIZE] |
Used for the coding/decoding of the pulses positions for the MP-MLQ codebook.
Definition at line 410 of file g723_1.c.
Referenced by gen_fcb_excitation(), and pack_fcb_param().
|
static |
Number of non-zero pulses in the MP-MLQ excitation.
Definition at line 260 of file g723_1.h.
Referenced by celt_pulses2bits(), convolute_with_sparse(), decode_fixed_sparse(), fcb_search(), gen_fcb_excitation(), generate_noise(), and synth_block_fcb_acb().
| const int16_t ff_g723_1_fixed_cb_gain[GAIN_LEVELS] |
Definition at line 454 of file g723_1.c.
Referenced by g723_1_decode_frame(), gen_fcb_excitation(), and get_fcb_param().
| const int16_t ff_g723_1_adaptive_cb_gain85[85 *20] |
Definition at line 460 of file g723_1.c.
Referenced by acb_search(), and ff_g723_1_gen_acb_excitation().
| const int16_t ff_g723_1_adaptive_cb_gain170[170 *20] |
Definition at line 676 of file g723_1.c.
Referenced by acb_search(), and ff_g723_1_gen_acb_excitation().
1.8.17