Go to the documentation of this file.
28 #ifndef AVCODEC_G723_1_H
29 #define AVCODEC_G723_1_H
36 #define SUBFRAME_LEN 60
37 #define FRAME_LEN (SUBFRAME_LEN << 2)
38 #define HALF_FRAME_LEN (FRAME_LEN / 2)
39 #define LPC_FRAME (HALF_FRAME_LEN + SUBFRAME_LEN)
42 #define LSP_CB_SIZE 256
44 #define PITCH_MAX (PITCH_MIN + 127)
48 #define GAIN_LEVELS 24
49 #define COS_TBL_SIZE 512
58 ((((a) >> 16) * (b) * 2) + (((a) & 0xffff) * (b) >> 15))
220 uint8_t *lsp_index,
int bad_frame);
242 #define G723_1_COS_TAB_FIRST_ELEMENT 16384
260 static const int8_t
pulses[4] = {6, 5, 6, 5};
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.
int16_t prev_data[HALF_FRAME_LEN]
int index
postfilter backward/forward lag
static const uint8_t frame_size[4]
const int16_t ff_g723_1_adaptive_cb_gain170[170 *20]
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.
int ad_cb_lag
adaptive codebook lag
int16_t prev_excitation[PITCH_MAX]
int16_t synth_mem[LPC_ORDER]
int16_t hpf_fir_mem
highpass filter fir
int16_t prev_weight_sig[PITCH_MAX]
enum FrameType cur_frame_type
const int16_t ff_g723_1_fixed_cb_gain[GAIN_LEVELS]
int ff_g723_1_normalize_bits(int num, int width)
Calculate the number of left-shifts required for normalizing the input.
Harmonic filter parameters.
int16_t perf_fir_mem[LPC_ORDER]
perceptual filter fir
int pf_gain
formant postfilter gain scaling unit memory
int16_t fir_mem[LPC_ORDER]
int16_t audio[FRAME_LEN+LPC_ORDER+PITCH_MAX+4]
const int16_t ff_g723_1_cos_tab[COS_TBL_SIZE+1]
Optimized fixed codebook excitation parameters.
FrameType
G723.1 frame types.
Describe the class of an AVClass context structure.
int ff_g723_1_dot_product(const int16_t *a, const int16_t *b, int length)
int16_t sid_lsp[LPC_ORDER]
void ff_g723_1_get_residual(int16_t *residual, int16_t *prev_excitation, int lag)
Get delayed contribution from the previous excitation vector.
G723_1_Subframe subframe[4]
enum FrameType past_frame_type
G723_1_ChannelContext ch[2]
int pulse_sign[PULSE_MAX]
void ff_g723_1_gen_dirac_train(int16_t *buf, int pitch_lag)
Generate a train of dirac functions with period as pitch lag.
uint8_t lsp_index[LSP_BANDS]
@ ACTIVE_FRAME
Active speech.
int16_t excitation[PITCH_MAX+FRAME_LEN+4]
G723.1 unpacked data subframe.
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
int16_t perf_iir_mem[LPC_ORDER]
and iir memories
const int16_t ff_g723_1_adaptive_cb_gain85[85 *20]
const int16_t ff_g723_1_lsp_band1[LSP_CB_SIZE][3]
int16_t opt_gain
optimal gain
const int16_t ff_g723_1_lsp_band2[LSP_CB_SIZE][4]
const int16_t ff_g723_1_lsp_band0[LSP_CB_SIZE][3]
LSP VQ tables.
int16_t prev_lsp[LPC_ORDER]
static const int16_t dc_lsp[LPC_ORDER]
LSP DC component.
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.
@ SID_FRAME
Silence Insertion Descriptor 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.
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.
int16_t harmonic_mem[PITCH_MAX]
int hpf_iir_mem
and iir memories
static const int8_t pulses[4]
Number of non-zero pulses in the MP-MLQ excitation.
int16_t sc_gain
scaling gain
Pitch postfilter parameters.