Exemple #1
0
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 */
}
Exemple #2
0
void init_coder_ld8a(void)

{



	/*----------------------------------------------------------------------*

	*      Initialize pointers to speech vector.                            *

	*                                                                       *

	*                                                                       *

	*   |--------------------|-------------|-------------|------------|     *

	*     previous speech           sf1           sf2         L_NEXT        *

	*                                                                       *

	*   <----------------  Total speech vector (L_TOTAL)   ----------->     *

	*   <----------------  LPC analysis window (L_WINDOW)  ----------->     *

	*   |                   <-- present frame (L_FRAME) -->                 *

	* old_speech            |              <-- new speech (L_FRAME) -->     *

	* p_window              |              |                                *

	*                     speech           |                                *

	*                             new_speech                                *

	*-----------------------------------------------------------------------*/



	new_speech = old_speech + L_TOTAL - L_FRAME;         /* New speech     */

	speech     = new_speech - L_NEXT;                    /* Present frame  */

	p_window   = old_speech + L_TOTAL - L_WINDOW;        /* For LPC window */


	printf("new_speech in init is:%d\n",new_speech);
	/* Initialize static pointers */



	wsp    = old_wsp + PIT_MAX;

	exc    = old_exc + PIT_MAX + L_INTERPOL;



	/* Static vectors to zero */



	set_zero(old_speech, L_TOTAL);

	set_zero(old_exc, PIT_MAX+L_INTERPOL);

	set_zero(old_wsp, PIT_MAX);

	set_zero(mem_w,   M);

	set_zero(mem_w0,  M);

	set_zero(mem_zero, M);

	sharp = SHARPMIN;



	copy(lsp_old, lsp_old_q, M);



	lsp_encw_reset() ;

	init_exc_err();



	return;

}