diff options
author | Joshua Bakita <bakitajoshua@gmail.com> | 2019-10-07 19:13:39 -0400 |
---|---|---|
committer | Joshua Bakita <bakitajoshua@gmail.com> | 2019-10-07 19:13:39 -0400 |
commit | 386b7d3366f1359a265da207a9cafa3edf553b64 (patch) | |
tree | c76120c2c138faed822e4ae386be6ef22a738a78 /baseline/source/gsm_enc/private.h | |
parent | 54a3f7091a2146b29c73a6fdc4b62a5c4ad7a3d8 (diff) |
Reorganize and commit all the modified TACLeBench code and run scripts
Diffstat (limited to 'baseline/source/gsm_enc/private.h')
-rw-r--r-- | baseline/source/gsm_enc/private.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/baseline/source/gsm_enc/private.h b/baseline/source/gsm_enc/private.h new file mode 100644 index 0000000..48786b3 --- /dev/null +++ b/baseline/source/gsm_enc/private.h | |||
@@ -0,0 +1,56 @@ | |||
1 | #ifndef PRIVATE_H | ||
2 | #define PRIVATE_H | ||
3 | |||
4 | typedef short word; /* 16 bit signed int */ | ||
5 | typedef long longword; /* 32 bit signed int */ | ||
6 | |||
7 | typedef unsigned short uword; /* unsigned word */ | ||
8 | typedef unsigned long ulongword; /* unsigned longword */ | ||
9 | |||
10 | struct gsm_state { | ||
11 | |||
12 | word dp0[ 280 ]; | ||
13 | |||
14 | word z1; /* preprocessing.c, Offset_com. */ | ||
15 | longword L_z2; /* Offset_com. */ | ||
16 | int mp; /* Preemphasis */ | ||
17 | |||
18 | word u[8]; /* short_term_aly_filter.c */ | ||
19 | word LARpp[2][8]; /* */ | ||
20 | word j; /* */ | ||
21 | |||
22 | word nrp; /* 40 */ /* long_term.c, synthesis */ | ||
23 | word v[9]; /* short_term.c, synthesis */ | ||
24 | word msr; /* decoder.c, Postprocessing */ | ||
25 | |||
26 | char verbose; /* only used if !NDEBUG */ | ||
27 | char fast; /* only used if FAST */ | ||
28 | |||
29 | }; | ||
30 | |||
31 | |||
32 | #define MIN_WORD ((-32767)-1) | ||
33 | #define MAX_WORD ( 32767) | ||
34 | |||
35 | #define MIN_LONGWORD ((-2147483647)-1) | ||
36 | #define MAX_LONGWORD ( 2147483647) | ||
37 | |||
38 | #define SASR(x, by) ((x) >> (by)) | ||
39 | |||
40 | /* Table 4.3a Decision level of the LTP gain quantizer | ||
41 | */ | ||
42 | /* bc 0 1 2 3 */ | ||
43 | word gsm_enc_DLB[4] = { 6554, 16384, 26214, 32767 }; | ||
44 | |||
45 | |||
46 | /* Table 4.5 Normalized inverse mantissa used to compute xM/xmax | ||
47 | */ | ||
48 | /* i 0 1 2 3 4 5 6 7 */ | ||
49 | word gsm_enc_NRFAC[8] = { 29128, 26215, 23832, 21846, 20165, 18725, 17476, 16384 }; | ||
50 | |||
51 | |||
52 | /* Table 4.6 Normalized direct mantissa used to compute xM/xmax | ||
53 | */ | ||
54 | /* i 0 1 2 3 4 5 6 7 */ | ||
55 | word gsm_enc_FAC[8] = { 18431, 20479, 22527, 24575, 26623, 28671, 30719, 32767 }; | ||
56 | #endif /* PRIVATE_H */ | ||