void init_decod_ld8a(struct dec_state_t * state) { /* Initialize static pointer */ state->exc = state->old_exc + PIT_MAX + L_INTERPOL; /* Static vectors to zero */ set_zero(state->old_exc, PIT_MAX+L_INTERPOL); set_zero(state->mem_syn, M); state->sharp = SHARPMIN; state->old_t0 = 60; state->gain_code = (F)0.0; state->gain_pitch = (F)0.0; lsp_decw_reset(&state->lsp_s); init_exc_err(state->cng_s.exc_err); // ? copy(lsp_reset, state->lsp_old, M); /* for G.729B */ state->seed_fer = 21845; state->past_ftyp = 1; state->seed = INIT_SEED; state->sid_sav = (F)0.; init_lsfq_noise(&state->cng_s.lsfq_s); // ? gain_past_reset(&state->gain_s); state->bad_lsf = 0; /* Initialize bad LSF indicator */ }
/*-------------------------------------------------------------------------- * init_decod_ld8c - Initialization of variables for the decoder section. *-------------------------------------------------------------------------- */ void init_decod_ld8c(void) { /* Initialize static pointer */ exc = old_exc + PIT_MAX + L_INTERPOL; /* Static vectors to zero */ set_zero(old_exc, PIT_MAX+L_INTERPOL); set_zero(mem_syn, M_BWD); sharp = SHARPMIN; prev_t0 = 60; prev_t0_frac = 0; gain_code = (F)0.; gain_pitch = (F)0.; lsp_decw_resete(freq_prev, prev_lsp, &prev_ma); set_zero(A_bwd_mem, M_BWDP1); set_zero(A_t_bwd_mem, M_BWDP1); A_bwd_mem[0] = (F)1.; A_t_bwd_mem[0] = (F)1.; prev_voicing = 0; prev_bfi = 0; prev_lp_mode = 0; c_fe = (F)0.; c_int = (F)1.1; /* Filter interpolation parameter */ set_zero(prev_filter, M_BWDP1); prev_filter[0] = (F)1.; prev_pitch = 30; stat_pitch = 0; set_zero(old_A_bwd, M_BWDP1); set_zero(rexp, M_BWDP1); old_A_bwd[0] = (F)1.; set_zero(old_rc_bwd, 2); gain_pit_mem = (F)0.; gain_cod_mem = (F)0.; c_muting = (F)1.; count_bfi = 0; stat_bwd = 0; /* for G.729B */ seed_fer = (INT16)21845; past_ftyp = 3; seed = INIT_SEED; sid_sav = (FLOAT)0.; init_lsfq_noise(); return; }