FreeCalypso > hg > gsmhr-codec-ref
comparison dtx.h @ 0:9008dbc8ca74
import original C code from GSM 06.06
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 14 Jun 2024 23:27:16 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:9008dbc8ca74 |
---|---|
1 #ifndef __DTX | |
2 #define __DTX | |
3 | |
4 #include "typedefs.h" | |
5 | |
6 | |
7 #define PN_INIT_SEED (Longword)0x1091988L /* initial seed for Comfort | |
8 * noise pn-generator */ | |
9 | |
10 #define CNINTPER 12 /* inperpolation period of CN | |
11 * parameters */ | |
12 | |
13 #define SPEECH 1 | |
14 #define CNIFIRSTSID 2 | |
15 #define CNICONT 3 | |
16 #define CNIBFI 4 | |
17 | |
18 #define VALIDSID 11 | |
19 #define INVALIDSID 22 | |
20 #define GOODSPEECH 33 | |
21 #define UNUSABLE 44 | |
22 | |
23 /*________________________________________________________________________ | |
24 | | | |
25 | Function Prototypes | | |
26 |________________________________________________________________________| | |
27 */ | |
28 | |
29 void avgCNHist(Longword pL_R0History[], | |
30 Longword ppL_CorrHistory[OVERHANG][NP + 1], | |
31 Longword *pL_AvgdR0, | |
32 Longword pL_AvgdCorrSeq[]); | |
33 | |
34 void avgGsHistQntz(Longword pL_GsHistory[], Longword *pL_GsAvgd); | |
35 | |
36 Shortword swComfortNoise(Shortword swVadFlag, | |
37 Longword L_UnqntzdR0, Longword *pL_UnqntzdCorr); | |
38 | |
39 Shortword getPnBits(int iBits, Longword *L_PnSeed); | |
40 | |
41 Shortword gsQuant(Longword L_GsIn, Shortword swVoicingMode); | |
42 | |
43 void updateCNHist(Longword L_UnqntzdR0, | |
44 Longword *pL_UnqntzdCorr, | |
45 Longword pL_R0Hist[], | |
46 Longword ppL_CorrHist[OVERHANG][NP + 1]); | |
47 | |
48 void lpcCorrQntz(Longword pL_CorrelSeq[], | |
49 Shortword pswFinalRc[], | |
50 int piVQCodewds[]); | |
51 | |
52 Longword linInterpSid(Longword L_New, Longword L_Old, Shortword swDtxState); | |
53 | |
54 Shortword linInterpSidShort(Shortword swNew, | |
55 Shortword swOld, | |
56 Shortword swDtxState); | |
57 | |
58 void rxInterpR0Lpc(Shortword *pswOldKs, Shortword *pswNewKs, | |
59 Shortword swRxDTXState, | |
60 Shortword swDecoMode, Shortword swFrameType); | |
61 | |
62 #endif |