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};
const int16_t ff_g723_1_adaptive_cb_gain170[170 *20]
static const uint8_t frame_size[4]
G723.1 unpacked data subframe.
static const int8_t pulses[4]
Number of non-zero pulses in the MP-MLQ excitation.
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
int ff_g723_1_normalize_bits(int num, int width)
Calculate the number of left-shifts required for normalizing the input.
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...
const int16_t ff_g723_1_fixed_cb_gain[GAIN_LEVELS]
Optimized fixed codebook excitation parameters.
int hpf_iir_mem
and iir memories
int pf_gain
formant postfilter gain scaling unit memory
FrameType
G723.1 frame types.
void ff_g723_1_gen_dirac_train(int16_t *buf, int pitch_lag)
Generate a train of dirac functions with period as pitch lag.
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.
const int16_t ff_g723_1_adaptive_cb_gain85[85 *20]
const int16_t ff_g723_1_cos_tab[COS_TBL_SIZE+1]
int index
postfilter backward/forward lag
int16_t opt_gain
optimal gain
static const int16_t dc_lsp[LPC_ORDER]
LSP DC component.
Silence Insertion Descriptor frame.
const int16_t ff_g723_1_lsp_band2[LSP_CB_SIZE][4]
Describe the class of an AVClass context structure.
int16_t sc_gain
scaling gain
const int16_t ff_g723_1_lsp_band1[LSP_CB_SIZE][3]
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.
Pitch postfilter parameters.
const int16_t ff_g723_1_lsp_band0[LSP_CB_SIZE][3]
LSP VQ tables.
int16_t hpf_fir_mem
highpass filter fir
Harmonic filter parameters.
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.
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.
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.
int ad_cb_lag
adaptive codebook lag