FreeCalypso > hg > gsm-codec-lib
view libgsmefr/cnst.h @ 183:452c1d5a6268
libgsmefr BFI w/o data: emit zero output after decoder reset
In real-life usage, each EFR decoder session will most likely begin
with lots of BFI frames before the first real frame arrives. However,
because the spec-defined home state of the decoder is speech rather
than CN, our regular logic for BFI w/o data would have to feed
pseudorandom noise to the decoder (in the "fixed codebook excitation
pulses" part), which is silly to do at the beginning of the decoder
session right out of reset. Therefore, let's check reset_flag_old,
and if we are still in the reset state, simply emit zero output.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 03 Jan 2023 00:12:18 +0000 |
parents | f9c9dd458d55 |
children |
line wrap: on
line source
/*--------------------------------------------------------------------------* * Codec constant parameters (coder, decoder, and postfilter) * *---------------------------------------------------------------------------*/ #define L_TOTAL 320 /* Total size of speech buffer. */ #define L_WINDOW 240 /* Window size in LP analysis */ #define L_FRAME 160 /* Frame size */ #define L_FRAME_BY2 80 /* Frame size divided by 2 */ #define L_SUBFR 40 /* Subframe size */ #define M 10 /* Order of LP filter */ #define MP1 (M+1) /* Order of LP filter + 1 */ #define AZ_SIZE (4*M+4) /* Size of array of LP filters in 4 subfr.s */ #define PIT_MIN 18 /* Minimum pitch lag */ #define PIT_MAX 143 /* Maximum pitch lag */ #define L_INTERPOL (10+1) /* Length of filter for interpolation */ #define PRM_SIZE 57 /* Size of vector of analysis parameters */ #define MU 26214 /* Factor for tilt compensation filter 0.8 */ #define AGC_FAC 29491 /* Factor for automatic gain control 0.9 */ #define DTX_HANGOVER 7 /* Period when SP=1 although VAD=0. Used for comfort noise averaging */