annotate libgsmefr/window2.tab @ 581:e2d5cad04cbf

libgsmhr1 RxFE: store CN R0+LPC separately from speech In the original GSM 06.06 code the ECU for speech mode is entirely separate from the CN generator, maintaining separate state. (The main intertie between them is the speech vs CN state variable, distinguishing between speech and CN BFIs, in addition to the CN-specific function of distinguishing between initial and update SIDs.) In the present RxFE implementation I initially thought that we could use the same saved_frame buffer for both ECU and CN, overwriting just the first 4 params (R0 and LPC) when a valid SID comes in. However, I now realize it was a bad idea: the original code has a corner case (long sequence of speech-mode BFIs to put the ECU in state 6, then SID and CN-mode BFIs, then a good speech frame) that would be broken by that buffer reuse approach. We could eliminate this corner case by resetting the ECU state when passing through a CN insertion period, but doing so would needlessly increase the behavioral diffs between GSM 06.06 and our version. Solution: use a separate CN-specific buffer for CN R0+LPC parameters, and match the behavior of GSM 06.06 code in this regard.
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 13 Feb 2025 10:02:45 +0000
parents 37e39cad5838
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
41
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /* Hamming_cos window for LPC analysis. */
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 static const Word16 window_232_8[L_WINDOW] =
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 {
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 2621, 2623, 2627, 2634, 2644, 2656, 2671, 2689, 2710, 2734,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 2760, 2789, 2821, 2855, 2893, 2933, 2975, 3021, 3069, 3120,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 3173, 3229, 3288, 3350, 3414, 3481, 3550, 3622, 3697, 3774,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 3853, 3936, 4021, 4108, 4198, 4290, 4385, 4482, 4582, 4684,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 4788, 4895, 5004, 5116, 5230, 5346, 5464, 5585, 5708, 5833,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 5960, 6090, 6221, 6355, 6491, 6629, 6769, 6910, 7054, 7200,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 7348, 7498, 7649, 7803, 7958, 8115, 8274, 8434, 8597, 8761,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 8926, 9093, 9262, 9432, 9604, 9778, 9952, 10129, 10306, 10485,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 10665, 10847, 11030, 11214, 11399, 11586, 11773, 11962, 12152, 12342,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 12534, 12727, 12920, 13115, 13310, 13506, 13703, 13901, 14099, 14298,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 14497, 14698, 14898, 15100, 15301, 15504, 15706, 15909, 16112, 16316,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 16520, 16724, 16928, 17132, 17337, 17541, 17746, 17950, 18155, 18359,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 18564, 18768, 18972, 19175, 19379, 19582, 19785, 19987, 20189, 20390,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 20591, 20792, 20992, 21191, 21390, 21588, 21785, 21981, 22177, 22372,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 22566, 22759, 22951, 23143, 23333, 23522, 23710, 23897, 24083, 24268,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 24451, 24633, 24814, 24994, 25172, 25349, 25525, 25699, 25871, 26042,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 26212, 26380, 26546, 26711, 26874, 27035, 27195, 27353, 27509, 27664,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 27816, 27967, 28115, 28262, 28407, 28550, 28691, 28830, 28967, 29102,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 29234, 29365, 29493, 29619, 29743, 29865, 29985, 30102, 30217, 30330,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 30440, 30548, 30654, 30757, 30858, 30956, 31052, 31146, 31237, 31326,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 31412, 31495, 31576, 31655, 31730, 31804, 31874, 31942, 32008, 32071,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 32131, 32188, 32243, 32295, 32345, 32392, 32436, 32477, 32516, 32552,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 32585, 32615, 32643, 32668, 32690, 32709, 32726, 32740, 32751, 32759,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 32765, 32767, 32767, 32097, 30112, 26895, 22576, 17333, 11380, 4962
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 };
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 /* Hamming-cosine window for LPC analysis. */
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 static const Word16 window_160_80[L_WINDOW] =
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 {
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 2621, 2624, 2633, 2648, 2668, 2695, 2727, 2765, 2809, 2859,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 2915, 2976, 3043, 3116, 3194, 3279, 3368, 3464, 3565, 3671,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 3783, 3900, 4023, 4151, 4285, 4423, 4567, 4716, 4870, 5029,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 5193, 5362, 5535, 5714, 5897, 6084, 6277, 6473, 6674, 6880,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 7089, 7303, 7521, 7742, 7968, 8197, 8430, 8667, 8907, 9151,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 9398, 9648, 9902, 10158, 10417, 10680, 10945, 11212, 11482, 11755,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 12030, 12307, 12586, 12867, 13150, 13435, 13722, 14010, 14299, 14590,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 14882, 15175, 15469, 15764, 16060, 16356, 16653, 16950, 17248, 17546,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 17844, 18141, 18439, 18736, 19033, 19330, 19625, 19920, 20214, 20507,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 20799, 21090, 21380, 21668, 21954, 22239, 22522, 22803, 23083, 23360,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 23635, 23907, 24177, 24445, 24710, 24972, 25231, 25488, 25741, 25991,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 26238, 26482, 26722, 26959, 27192, 27422, 27647, 27869, 28087, 28300,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 28510, 28715, 28916, 29113, 29305, 29493, 29676, 29854, 30028, 30197,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 30361, 30519, 30673, 30822, 30966, 31105, 31238, 31366, 31489, 31606,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 31718, 31825, 31926, 32021, 32111, 32195, 32273, 32346, 32413, 32475,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 32530, 32580, 32624, 32662, 32695, 32721, 32742, 32756, 32765, 32767,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 32767, 32756, 32720, 32661, 32578, 32471, 32341, 32188, 32012, 31813,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 31592, 31349, 31084, 30798, 30492, 30165, 29818, 29453, 29068, 28666,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 28247, 27810, 27358, 26891, 26408, 25913, 25404, 24883, 24350, 23807,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 23255, 22693, 22124, 21548, 20965, 20378, 19786, 19191, 18593, 17994,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 17395, 16796, 16199, 15604, 15012, 14424, 13842, 13265, 12696, 12135,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 11582, 11039, 10507, 9986, 9477, 8981, 8499, 8031, 7579, 7143,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 6723, 6321, 5937, 5571, 5225, 4898, 4591, 4305, 4041, 3798,
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 3577, 3378, 3202, 3048, 2918, 2812, 2729, 2669, 2633, 2621
37e39cad5838 libgsmefr/*.tab: import from ETSI code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 };