📄 ld8e.h
字号:
Word16 lspcb2[][M], /* (i) Q13 : Second stage LSP codebook */
Word16 fg[MODE][MA_NP][M], /* (i) Q15 : MA prediction coefficients */
Word16 freq_prev[MA_NP][M], /* (i) Q13 : previous LSP vector */
Word16 fg_sum[MODE][M], /* (i) Q15 : present MA prediction coef.*/
Word16 fg_sum_inv[MODE][M], /* (i) Q12 : inverse coef. */
Word16 code_ana[], /* (o) : codes of the selected LSP */
Word16 freq_cur[] /* (o) Q13 : current LSP MA vector */
);
void D_lspe(
Word16 prm[], /* (i) : indexes of the selected LSP */
Word16 lsp_q[], /* (o) Q15 : Quantized LSP parameters */
Word16 erase, /* (i) : frame erase information */
Word16 freq_prev[MA_NP][M], /* (i/o) Q13 : previous LSP MA vector */
Word16 prev_lsp[], /* (i/o) Q13 : previous LSP vector */
Word16 *prev_ma /* (i/o) previous MA prediction coef.*/
);
void Lsp_decw_resete(
Word16 freq_prev[MA_NP][M], /* (o) Q13 : previous LSP MA vector */
Word16 prev_lsp[], /* (o) Q13 : previous LSP vector */
Word16 *prev_ma /* previous MA prediction coef.*/
);
void Lsp_iqua_cse(
Word16 prm[], /* (i) : indexes of the selected LSP */
Word16 lsp_q[], /* (o) Q13 : Quantized LSP parameters */
Word16 erase, /* (i) : frame erase information */
Word16 freq_prev[MA_NP][M], /* (i/o) Q13 : previous LSP MA vector */
Word16 prev_lsp[], /* (i/o) Q13 : previous LSP vector */
Word16 *prev_ma /* (i/o) previous MA prediction coef.*/
);
/*--------------------------------------------------------------------------*
* Postfilter functions *
*--------------------------------------------------------------------------*/
void Poste(
Word16 t0, /* (i) : 1st subframe delay given by coder */
Word16 *signal_ptr, /* (i) : input signal (pointer to current subframe */
Word16 *coeff, /* (i) : LPC coefficients for current subframe */
Word16 *sig_out, /* (o) : postfiltered output */
Word16 *vo, /* (o) : voicing decision 0 = uv, > 0 delay */
Word16 gamma1, /* input: short term postfilt. den. weighting factor*/
Word16 gamma2, /* input: short term postfilt. num. weighting factor*/
Word16 gamma_harm, /* input: long term postfilter weighting factor*/
Word16 long_h_st, /* input: impulse response length*/
Word16 m_pst /* input: LPC order */
);
/*--------------------------------------------------------------------------*
* protypes of functions containing G729 source code + specific G729E code *
*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*
* gain VQ functions. *
*--------------------------------------------------------------------------*/
void Dec_gaine(
Word16 index, /* (i) :Index of quantization. */
Word16 code[], /* (i) Q13 :Innovative vector. */
Word16 L_subfr, /* (i) :Subframe length. */
Word16 bfi, /* (i) :Bad frame indicator */
Word16 *gain_pit, /* (o) Q14 :Pitch gain. */
Word16 *gain_cod, /* (o) Q1 :Code gain. */
Word16 rate, /* input : rate selector/frame =0 8kbps,= 1 11.8 kbps*/
Word16 gain_pit_mem,
Word16 gain_cod_mem,
Word16 *c_muting,
int count_bfi,
int stationnary
);
/*--------------------------------------------------------------------------*
* Bitstream functions *
*--------------------------------------------------------------------------*/
void bits2prm_ld8e(
Word16 bits[], /* I serial bits (nb_bits) */
Word16 prm[], /* O output: decoded parameters (11 parameters) */
Word16 rate /* input : rate selector/frame =0 8kbps,= 1 11.8 kbps*/
);
void prm2bits_ld8e(
Word16 prm[], /* input : encoded parameters (PRM_SIZE parameters) */
Word16 bits[], /* output: serial bits (SERIAL_SIZE ) bits[0] = bfi
bits[1] = nbbits */
Word16 rate /* input : rate selector/frame =0 8kbps,= 1 11.8 kbps*/
);
/*--------------------------------------------------------------------------*
* functions specific to G729E *
*--------------------------------------------------------------------------*/
/* backward LPC analysis and switch forward/backward */
void autocorr_hyb_window(
Word16 *x, /* Input speech signal */
Word32 *r_bwd, /* (out) Autocorrelations */
Word32 *rexp /* (in/out) */
);
void Lag_window_bwd(Word32 *r_bwd, Word16 *r_h_bwd, Word16 *r_l_bwd);
void Int_bwd(Word16 *a_bwd, Word16 *prev_filter, Word16 *C_int );
void set_lpc_mode(Word16 *signal_ptr, Word16 *a_fwd, Word16 *a_bwd,
Word16 *bwd, Word16 *lspnew, Word16 *lspold, Word16 rate,
Word16 *high_stat, Word16 prev_mode, Word16 *prev_filter, Word16 *C_int,
Word16 *glob_stat, Word16 *stat_bwd, Word16 *val_stat_bwd);
Word16 ener_dB(Word16 *synth, Word16 L);
void tst_bwd_dominant(Word16 *high_stat, Word16 mode);
void perc_vare (
Word16 *gamma1, /* Bandwidth expansion parameter */
Word16 *gamma2, /* Bandwidth expansion parameter */
Word16 high_stat /* high_stat indication (see file bwfw.c) */
);
/*--------------------------------------------------------------------------*
* G729E fixed (ACELP) codebook excitation. *
*--------------------------------------------------------------------------*/
void ACELP_12i40_44bits(
Word16 x[], /* (i) Q0 : target vector */
Word16 cn[], /* (i) Q0 : residual after long term prediction */
Word16 H[], /* (i) Q12: impulse response of weighted synthesis filter */
Word16 code[], /* (o) Q12: algebraic (fixed) codebook excitation */
Word16 y[], /* (o) Q11: filtered fixed codebook excitation */
Word16 indx[] /* (o) : index 5 words: 13,10,7,7,7 = 44 bits */
);
void ACELP_10i40_35bits(
Word16 x[], /* (i) Q0 : target vector */
Word16 cn[], /* (i) Q0 : residual after long term prediction */
Word16 H[], /* (i) Q12: impulse response of weighted synthesis filter */
Word16 code[], /* (o) Q12: algebraic (fixed) codebook excitation */
Word16 y[], /* (o) Q11: filtered fixed codebook excitation */
Word16 indx[] /* (o) : index 5 words: 7,7,7,7,7 = 35 bits */
);
void Dec_ACELP_12i40_44bits(
Word16 *index, /* (i) : 5 words index (positions & sign) */
Word16 cod[] /* (o) Q13 : algebraic (fixed) codebook excitation */
);
void Dec_ACELP_10i40_35bits(
Word16 *index, /* (i) : 5 words index (positions & sign) */
Word16 cod[] /* (o) Q13 : algebraic (fixed) codebook excitation */
);
/* pitch tracking routine */
void track_pit(Word16 *T0, Word16 *T0_frac, Word16 *prev_pitch,
Word16 *stat_pitch, Word16 *pitch_sta, Word16 *frac_sta);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -