FreeCalypso > hg > gsm-codec-lib
comparison libtwamr/gains_tab.c @ 338:5db2c920fc23
libtwamr: gains.tab integrated
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 18 Apr 2024 23:28:29 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
337:190c4c9a3693 | 338:5db2c920fc23 |
---|---|
1 /* | |
2 ******************************************************************************** | |
3 * | |
4 * GSM AMR-NB speech codec R98 Version 7.6.0 December 12, 2001 | |
5 * R99 Version 3.3.0 | |
6 * REL-4 Version 4.1.0 | |
7 * | |
8 ******************************************************************************** | |
9 * | |
10 * File : gains.tab | |
11 * Purpose : Scalar quantization tables of the pitch gain and | |
12 * : the codebook gain. | |
13 * $Id $ | |
14 * | |
15 ******************************************************************************** | |
16 */ | |
17 | |
18 #include "namespace.h" | |
19 #include "typedef.h" | |
20 #include "gains_tab.h" | |
21 | |
22 const Word16 qua_gain_pitch[NB_QUA_PITCH] = | |
23 { | |
24 0, 3277, 6556, 8192, 9830, 11469, 12288, 13107, | |
25 13926, 14746, 15565, 16384, 17203, 18022, 18842, 19661 | |
26 }; | |
27 | |
28 const Word16 qua_gain_code[NB_QUA_CODE*3] = | |
29 { | |
30 /* gain factor (g_fac) and quantized energy error (qua_ener_MR122, qua_ener) | |
31 * are stored: | |
32 * | |
33 * qua_ener_MR122 = log2(g_fac) (not the rounded floating point value, but | |
34 * the value the original EFR algorithm | |
35 * calculates from g_fac [using Log2]) | |
36 * qua_ener = 20*log10(g_fac); (rounded floating point value) | |
37 * | |
38 * | |
39 * g_fac (Q11), qua_ener_MR122 (Q10), qua_ener (Q10) | |
40 */ | |
41 159, -3776, -22731, | |
42 206, -3394, -20428, | |
43 268, -3005, -18088, | |
44 349, -2615, -15739, | |
45 419, -2345, -14113, | |
46 482, -2138, -12867, | |
47 554, -1932, -11629, | |
48 637, -1726, -10387, | |
49 733, -1518, -9139, | |
50 842, -1314, -7906, | |
51 969, -1106, -6656, | |
52 1114, -900, -5416, | |
53 1281, -694, -4173, | |
54 1473, -487, -2931, | |
55 1694, -281, -1688, | |
56 1948, -75, -445, | |
57 2241, 133, 801, | |
58 2577, 339, 2044, | |
59 2963, 545, 3285, | |
60 3408, 752, 4530, | |
61 3919, 958, 5772, | |
62 4507, 1165, 7016, | |
63 5183, 1371, 8259, | |
64 5960, 1577, 9501, | |
65 6855, 1784, 10745, | |
66 7883, 1991, 11988, | |
67 9065, 2197, 13231, | |
68 10425, 2404, 14474, | |
69 12510, 2673, 16096, | |
70 16263, 3060, 18429, | |
71 21142, 3448, 20763, | |
72 27485, 3836, 23097 | |
73 }; |