Libav
|
G.723.1 types, functions and data tables. More...
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_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) << 1) + (((a) & 0xffff) * (b) >> 15)) |
Bitexact implementation of 2ab scaled by 1/2^16. More... | |
Enumerations | |
enum | FrameType { ACTIVE_FRAME, SID_FRAME, UNTRANSMITTED_FRAME, INTRA_FRAME = 0, INTER_FRAME, SKIP_FRAME } |
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 | ppf_gain_weight [2] = { 0x1800, 0x2000 } |
static const int16_t | dc_lsp [LPC_ORDER] |
static const int16_t | cos_tab [COS_TBL_SIZE+1] |
static const int16_t | lsp_band0 [LSP_CB_SIZE][3] |
static const int16_t | lsp_band1 [LSP_CB_SIZE][3] |
static const int16_t | lsp_band2 [LSP_CB_SIZE][4] |
static const int32_t | combinatorial_table [PULSE_MAX][SUBFRAME_LEN/GRID_SIZE] |
static const int16_t | pitch_contrib [340] |
static const int8_t | pulses [4] = {6, 5, 6, 5} |
static const int32_t | max_pos [4] = {593775, 142506, 593775, 142506} |
static const int16_t | fixed_cb_gain [GAIN_LEVELS] |
static const int16_t | adaptive_cb_gain85 [85 *20] |
static const int16_t | adaptive_cb_gain170 [170 *20] |
static const int16_t | postfilter_tbl [2][LPC_ORDER] |
static const int16_t | hamming_window [LPC_FRAME] |
Hamming window coefficients scaled by 2^15. More... | |
static const int16_t | binomial_window [LPC_ORDER] |
Binomial window coefficients scaled by 2^15. More... | |
static const int16_t | bandwidth_expand [LPC_ORDER] |
0.994^i scaled by 2^15 More... | |
static const int16_t | percept_flt_tbl [2][LPC_ORDER] |
0.5^i scaled by 2^15 More... | |
static const int | cng_adaptive_cb_lag [4] = { 1, 0, 1, 3 } |
static const int | cng_filt [4] = { 273, 998, 499, 333 } |
static const int | cng_bseg [3] = { 2048, 18432, 231233 } |
G.723.1 types, functions and data tables.
Definition in file g723_1.h.
#define SUBFRAME_LEN 60 |
Definition at line 36 of file g723_1.h.
Referenced by acb_search(), comp_harmonic_coeff(), comp_interp_index(), comp_lpc_coeff(), comp_ppf_coeff(), fcb_search(), ff_g723_1_gen_acb_excitation(), ff_g723_1_gen_dirac_train(), ff_g723_1_get_residual(), formant_postfilter(), g723_1_decode_frame(), g723_1_encode_frame(), gain_scale(), gen_fcb_excitation(), generate_noise(), get_fcb_param(), harmonic_filter(), harmonic_noise_sub(), iir_filter(), perceptual_filter(), sub_acb_contrib(), synth_percept_filter(), and unpack_bitstream().
#define FRAME_LEN (SUBFRAME_LEN << 2) |
Definition at line 37 of file g723_1.h.
Referenced by autocorr_max(), comp_interp_index(), formant_postfilter(), g723_1_decode_frame(), g723_1_encode_frame(), generate_noise(), highpass_filter(), perceptual_filter(), and residual_interp().
#define HALF_FRAME_LEN (FRAME_LEN / 2) |
Definition at line 38 of file g723_1.h.
Referenced by estimate_pitch(), and g723_1_encode_frame().
#define LPC_FRAME (HALF_FRAME_LEN + SUBFRAME_LEN) |
Definition at line 39 of file g723_1.h.
Referenced by comp_autocorr().
#define LPC_ORDER 10 |
Definition at line 40 of file g723_1.h.
Referenced by adaptive_cb_search(), comp_autocorr(), comp_interp_index(), comp_lpc_coeff(), comp_ppf_coeff(), ff_eval_coefs(), ff_eval_refl(), ff_g723_1_inverse_quant(), ff_g723_1_lsp_interpolate(), ff_int_to_int16(), ff_interp(), ff_rms(), ff_subblock_synthesis(), fixed_cb_search(), formant_postfilter(), g723_1_decode_frame(), g723_1_decode_init(), g723_1_encode_frame(), g723_1_encode_init(), generate_noise(), get_match_score(), iir_filter(), levinson_durbin(), lpc2lsp(), lsp2lpc(), lsp_quantize(), perceptual_filter(), ra144_decode_frame(), ra144_encode_frame(), ra144_encode_init(), ra144_encode_subblock(), and synth_percept_filter().
#define PITCH_MIN 18 |
Definition at line 43 of file g723_1.h.
Referenced by acb_search(), estimate_pitch(), ff_sipr_decode_frame_16k(), pack_bitstream(), and unpack_bitstream().
#define PITCH_MAX (PITCH_MIN + 127) |
Definition at line 44 of file g723_1.h.
Referenced by acb_search(), autocorr_max(), comp_interp_index(), estimate_pitch(), ff_g723_1_get_residual(), ff_sipr_decode_frame_16k(), g723_1_decode_frame(), g723_1_encode_frame(), generate_noise(), and residual_interp().
#define PITCH_ORDER 5 |
Definition at line 45 of file g723_1.h.
Referenced by acb_search(), ff_g723_1_gen_acb_excitation(), ff_g723_1_get_residual(), and g723_1_encode_frame().
#define GRID_SIZE 2 |
Definition at line 46 of file g723_1.h.
Referenced by gen_fcb_excitation(), and get_fcb_param().
#define GAIN_LEVELS 24 |
Definition at line 48 of file g723_1.h.
Referenced by get_fcb_param(), pack_bitstream(), and unpack_bitstream().
Bitexact implementation of 2ab scaled by 1/2^16.
a | 32 bit multiplicand |
b | 16 bit multiplier |
Definition at line 57 of file g723_1.h.
Referenced by comp_autocorr(), highpass_filter(), levinson_durbin(), and lsp2lpc().
enum FrameType |
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.
Definition at line 32 of file g723_1.c.
Referenced by comp_autocorr(), comp_interp_index(), formant_postfilter(), and g723_1_encode_frame().
int ff_g723_1_normalize_bits | ( | int | num, |
int | width | ||
) |
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 49 of file g723_1.c.
Referenced by acb_search(), comp_autocorr(), comp_harmonic_coeff(), comp_ppf_coeff(), estimate_pitch(), ff_g723_1_scale_vector(), gain_scale(), get_fcb_param(), lpc2lsp(), and lsp_quantize().
int ff_g723_1_dot_product | ( | const int16_t * | a, |
const int16_t * | b, | ||
int | length | ||
) |
Definition at line 54 of file g723_1.c.
Referenced by acb_search(), autocorr_max(), comp_interp_index(), comp_ppf_coeff(), ff_g723_1_gen_acb_excitation(), 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 60 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 74 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 86 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 181 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 202 of file g723_1.c.
Referenced by g723_1_decode_frame(), and g723_1_encode_frame().
|
static |
Definition at line 219 of file g723_1.h.
Referenced by aic_decode_header(), alac_entropy_coder(), alac_linear_predictor(), amr_handle_packet(), avpriv_mpegaudio_decode_header(), build_frame_code(), decode_frame(), decode_packet(), dfa_read_packet(), dvvideo_decode_frame(), encode_frame(), escape124_decode_frame(), ff_celt_decode_frame(), ff_compute_frame_duration(), ff_dca_xll_decode_header(), ff_mpa_decode_header(), ff_psy_preprocess(), ff_put_wav_header(), ff_rtp_send_h261(), ff_sipr_decode_frame_16k(), ff_vbv_update(), find_expected_header(), flic_decode_frame_15_16BPP(), flic_decode_frame_8BPP(), g723_1_decode_frame(), init_output_frame(), libopus_encode_init(), lmlm4_read_packet(), load_encode_and_write(), mpegts_write_header(), msrle_decode_pal4(), mxf_write_d10_audio_packet(), new_video_stream(), on2avc_decode_frame(), opus_packet(), opus_rc_trimodel(), pack_bitstream(), poll_filter(), qdm2_decode(), return_stored_frame(), rm_write_header(), rpl_read_packet(), rtp_send_ilbc(), rv10_write_header(), s302m_decode_frame(), s302m_parse_frame_header(), smacker_read_packet(), store_packet(), str_read_packet(), swf_write_video(), vc1t_read_packet(), wavpack_decode_frame(), and xmv_fetch_video_packet().
|
static |
Definition at line 222 of file g723_1.h.
Referenced by comp_ppf_gains().
|
static |
Definition at line 225 of file g723_1.h.
Referenced by ff_g723_1_inverse_quant(), g723_1_decode_init(), g723_1_encode_init(), and lsp_quantize().
|
static |
Definition at line 231 of file g723_1.h.
Referenced by eval_lpcenv_or_interp(), lpc2lsp(), and lsp2lpc().
|
static |
Definition at line 300 of file g723_1.h.
Referenced by ff_g723_1_inverse_quant().
|
static |
Definition at line 389 of file g723_1.h.
Referenced by ff_g723_1_inverse_quant().
|
static |
Definition at line 478 of file g723_1.h.
Referenced by ff_g723_1_inverse_quant().
|
static |
Definition at line 613 of file g723_1.h.
Referenced by gen_fcb_excitation(), and pack_fcb_param().
|
static |
Definition at line 657 of file g723_1.h.
Referenced by gen_fcb_excitation().
|
static |
Definition at line 704 of file g723_1.h.
Referenced by celt_pulses2bits(), fcb_search(), gen_fcb_excitation(), generate_noise(), and synth_block_fcb_acb().
|
static |
Definition at line 707 of file g723_1.h.
Referenced by gen_fcb_excitation().
|
static |
Definition at line 709 of file g723_1.h.
Referenced by g723_1_decode_frame(), gen_fcb_excitation(), and get_fcb_param().
|
static |
Definition at line 715 of file g723_1.h.
Referenced by acb_search(), and ff_g723_1_gen_acb_excitation().
|
static |
Definition at line 931 of file g723_1.h.
Referenced by acb_search(), and ff_g723_1_gen_acb_excitation().
|
static |
Definition at line 1360 of file g723_1.h.
Referenced by formant_postfilter().
|
static |
Hamming window coefficients scaled by 2^15.
Definition at line 1371 of file g723_1.h.
Referenced by comp_autocorr().
|
static |
Binomial window coefficients scaled by 2^15.
Definition at line 1395 of file g723_1.h.
Referenced by comp_autocorr().
|
static |
|
static |
0.5^i scaled by 2^15
Definition at line 1409 of file g723_1.h.
Referenced by perceptual_filter().
|
static |
Definition at line 1416 of file g723_1.h.
Referenced by generate_noise().
|
static |
Definition at line 1418 of file g723_1.h.
Referenced by estimate_sid_gain().
|
static |
Definition at line 1420 of file g723_1.h.
Referenced by estimate_sid_gain().