view libgsmhr1/dec_state.h @ 596:8e4ecdfadf5a

libgsmhr1: capture decoder state
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 04 Dec 2025 06:25:54 +0000
parents 1e75556ab6c0
children 5809165fb140
line wrap: on
line source

/*
 * This library-internal header file provides definition for
 * struct gsmhr_decoder_state, the state structure for our speech
 * decoder engine - the full endpoint version, as opposed to TFO
 * transform.
 */

#ifndef dec_state_h
#define dec_state_h

#include "typedefs.h"
#include "rxfe.h"

#define  LTP_LEN      147              /* 147==0x93 length of LTP history */

struct gsmhr_decoder_state {
	struct gsmhr_rxfe_state rxfe;
	int is_homed;
	/* state variables from err_conc.c */
	Longword plSubfrEnergyMem[4];
	Shortword swLevelMem[4];
	/* state variables from sp_dec.c */
	Shortword gswPostFiltAgcGain;
	Shortword gpswPostFiltStateNum[NP];
	Shortword gpswPostFiltStateDenom[NP];
	Shortword swPostEmphasisState;
	Shortword pswSynthFiltState[NP];
	Shortword pswOldFrmKsDec[NP];
	Shortword pswOldFrmAsDec[NP];
	Shortword pswOldFrmPFNum[NP];
	Shortword pswOldFrmPFDenom[NP];
	Shortword swOldR0Dec;
	Shortword pswLtpStateBaseDec[LTP_LEN + S_LEN];
	Shortword pswPPreState[LTP_LEN + S_LEN];
	Shortword swMuteFlagOld;
	Shortword swRxDTXState;
};

#endif