FreeCalypso > hg > gsm-codec-lib
diff libgsmfrp/internal.h @ 4:286d5f097eb4
libgsmfrp: implement comfort noise generation
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 19 Nov 2022 20:16:09 +0000 |
parents | 3cd5ad24b1d4 |
children | 3b64f255689a |
line wrap: on
line diff
--- a/libgsmfrp/internal.h Sat Nov 19 09:03:57 2022 +0000 +++ b/libgsmfrp/internal.h Sat Nov 19 20:16:09 2022 +0000 @@ -11,12 +11,19 @@ LOST_SID, }; -typedef unsigned char cparam; - struct gsmfr_preproc_state { enum rx_state rx_state; int got_valid_sid; gsm_frame speech_frame; - cparam cnoise_larc[8]; - cparam cnoise_xmaxc[4]; + gsm_byte sid_prefix[5]; + uint8_t sid_xmaxc[4]; + uint32_t cn_random_lfsr; + unsigned cn_random_6fold; }; + +/* we use the same LFSR PRNG for CN as ETSI EFR implementation */ +#define PN_INITIAL_SEED 0x70816958L /* Pseudo noise generator seed value */ + +/* internal function */ +extern void gsmfr_preproc_gen_cn(struct gsmfr_preproc_state *state, + gsm_byte *frame);