2
|
1 /*
|
|
2 * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
|
|
3 * Universitaet Berlin. See the accompanying file "COPYRIGHT" for
|
|
4 * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
|
|
5 */
|
|
6
|
|
7 /* $Header: /home/kbs/jutta/src/gsm/gsm-1.0/src/RCS/table.c,v 1.1 1992/10/28 00:15:50 jutta Exp $ */
|
|
8
|
|
9 /* Most of these tables are inlined at their point of use.
|
|
10 */
|
|
11
|
|
12 /* 4.4 TABLES USED IN THE FIXED POINT IMPLEMENTATION OF THE RPE-LTP
|
|
13 * CODER AND DECODER
|
|
14 *
|
|
15 * (Most of them inlined, so watch out.)
|
|
16 */
|
|
17
|
|
18 #define GSM_TABLE_C
|
|
19 #include "private.h"
|
|
20 #include "gsm.h"
|
|
21
|
|
22 /* Table 4.1 Quantization of the Log.-Area Ratios
|
|
23 */
|
|
24 /* i 1 2 3 4 5 6 7 8 */
|
|
25 word gsm_A[8] =
|
|
26 { 20480, 20480, 20480, 20480, 13964, 15360, 8534, 9036 };
|
|
27 word gsm_B[8] = { 0, 0, 2048, -2560, 94, -1792, -341, -1144 };
|
|
28 word gsm_MIC[8] = { -32, -32, -16, -16, -8, -8, -4, -4 };
|
|
29 word gsm_MAC[8] = { 31, 31, 15, 15, 7, 7, 3, 3 };
|
|
30
|
|
31
|
|
32 /* Table 4.2 Tabulation of 1/A[1..8]
|
|
33 */
|
|
34 word gsm_INVA[8] =
|
|
35 { 13107, 13107, 13107, 13107, 19223, 17476, 31454, 29708 };
|
|
36
|
|
37
|
|
38 /* Table 4.3a Decision level of the LTP gain quantizer
|
|
39 */
|
|
40 /* bc 0 1 2 3 */
|
|
41 word gsm_DLB[4] = { 6554, 16384, 26214, 32767 };
|
|
42
|
|
43
|
|
44 /* Table 4.3b Quantization levels of the LTP gain quantizer
|
|
45 */
|
|
46 /* bc 0 1 2 3 */
|
|
47 word gsm_QLB[4] = { 3277, 11469, 21299, 32767 };
|
|
48
|
|
49
|
|
50 /* Table 4.4 Coefficients of the weighting filter
|
|
51 */
|
|
52 /* i 0 1 2 3 4 5 6 7 8 9 10 */
|
|
53 word gsm_H[11] =
|
|
54 { -134, -374, 0, 2054, 5741, 8192, 5741, 2054, 0, -374, -134 };
|
|
55
|
|
56
|
|
57 /* Table 4.5 Normalized inverse mantissa used to compute xM/xmax
|
|
58 */
|
|
59 /* i 0 1 2 3 4 5 6 7 */
|
|
60 word gsm_NRFAC[8] =
|
|
61 { 29128, 26215, 23832, 21846, 20165, 18725, 17476, 16384 };
|
|
62
|
|
63
|
|
64 /* Table 4.6 Normalized direct mantissa used to compute xM/xmax
|
|
65 */
|
|
66 /* i 0 1 2 3 4 5 6 7 */
|
|
67 word gsm_FAC[8] =
|
|
68 { 18431, 20479, 22527, 24575, 26623, 28671, 30719, 32767 };
|