annotate libgsmfr2/xmaxc_mean.c @ 455:287063b9cf43

CHANGES: document the build process change
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 10 May 2024 06:22:42 +0000
parents a33edf624061
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
248
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * The function implemented in this module computes a mean Xmaxc
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * for comfort noise generation from the 4 subframe Xmaxc parameters
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 * extracted from an input frame.
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 */
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 #include <stdint.h>
256
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents: 248
diff changeset
8 #include "tw_gsmfr.h"
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents: 248
diff changeset
9 #include "pp_internal.h"
248
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 static const uint16_t dequant_table[64] = {
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 0, 1, 2, 3, 4, 5, 6, 7,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 8, 9, 10, 11, 12, 13, 14, 15,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 16, 18, 20, 22, 24, 26, 28, 30,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 32, 36, 40, 44, 48, 52, 56, 60,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 64, 72, 80, 88, 96, 104, 112, 120,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 128, 144, 160, 176, 192, 208, 224, 240,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 256, 288, 320, 352, 384, 416, 448, 480,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 512, 576, 640, 704, 768, 832, 896, 960,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 };
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 static const uint8_t requant_table[1024] = {
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 27,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 28, 28, 28, 28, 29, 29, 29, 29, 30, 30, 30, 30, 31, 31, 31, 31,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 32, 32, 32, 32, 32, 32, 32, 32, 33, 33, 33, 33, 33, 33, 33, 33,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 34, 34, 34, 34, 34, 34, 34, 34, 35, 35, 35, 35, 35, 35, 35, 35,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 36, 36, 36, 36, 36, 36, 36, 36, 37, 37, 37, 37, 37, 37, 37, 37,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 38, 38, 38, 38, 38, 38, 38, 38, 39, 39, 39, 39, 39, 39, 39, 39,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 };
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88
256
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents: 248
diff changeset
89 uint8_t gsmfr_preproc_xmaxc_mean(const uint8_t *frame)
248
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 {
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 unsigned sub, xmaxc, sum;
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 sum = 0;
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 for (sub = 0; sub < 4; sub++) {
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 xmaxc = ((frame[sub*7+6] & 0x1F) << 1) | (frame[sub*7+7] >> 7);
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 sum += dequant_table[xmaxc];
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 }
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 xmaxc = requant_table[sum >> 2];
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 return xmaxc;
6ac547f0b903 libgsmfrp: yet another invalid SID logic change, for 1.0.2
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 }