comparison libgsmhr1/typedefs.h @ 498:65f672c43dc8

libgsmhr1/typedefs.h: import original
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 19 Jun 2024 00:49:48 +0000
parents
children 446a4a2955ba
comparison
equal deleted inserted replaced
497:a1599eaf51f9 498:65f672c43dc8
1 /*******************************************************************
2 *
3 * typedef statements of types used in all half-rate GSM routines
4 *
5 ******************************************************************/
6
7 #ifndef __TYPEDEFS
8 #define __TYPEDEFS
9
10 #define DATE "August 8, 1996 "
11 #define VERSION "Version 4.2 "
12
13 #define LW_SIGN (long)0x80000000 /* sign bit */
14 #define LW_MIN (long)0x80000000
15 #define LW_MAX (long)0x7fffffff
16
17 #define SW_SIGN (short)0x8000 /* sign bit for Shortword type */
18 #define SW_MIN (short)0x8000 /* smallest Ram */
19 #define SW_MAX (short)0x7fff /* largest Ram */
20
21 /* Definition of Types *
22 ***********************/
23
24 typedef long int Longword; /* 32 bit "accumulator" (L_*) */
25 typedef short int Shortword; /* 16 bit "register" (sw*) */
26 typedef short int ShortwordRom; /* 16 bit ROM data (sr*) */
27 typedef long int LongwordRom; /* 32 bit ROM data (L_r*) */
28
29 struct NormSw
30 { /* normalized Shortword fractional
31 * number snr.man precedes snr.sh (the
32 * shift count)i */
33 Shortword man; /* "mantissa" stored in 16 bit
34 * location */
35 Shortword sh; /* the shift count, stored in 16 bit
36 * location */
37 };
38
39 /* Global constants *
40 ********************/
41
42 #define NP 10 /* order of the lpc filter */
43 #define N_SUB 4 /* number of subframes */
44 #define F_LEN 160 /* number of samples in a frame */
45 #define S_LEN 40 /* number of samples in a subframe */
46 #define A_LEN 170 /* LPC analysis length */
47 #define OS_FCTR 6 /* maximum LTP lag oversampling
48 * factor */
49
50 #define OVERHANG 8 /* vad parameter */
51 #define strStr strStr16
52
53 /* global variables */
54 /********************/
55
56 extern int giFrmCnt; /* 0,1,2,3,4..... */
57 extern int giSfrmCnt; /* 0,1,2,3 */
58
59 extern int giDTXon; /* DTX Mode on/off */
60
61 #endif