FreeCalypso > hg > gsm-net-reveng
annotate doc/TFO-xform/EFR @ 36:d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 03 Sep 2024 07:08:24 +0000 |
parents | |
children | 4ab7cc414ed2 |
rev | line source |
---|---|
36
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 TFO transform for EFR |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 ===================== |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 Unlike the situation with FRv1 and HRv1, the standard endpoint decoder for EFR |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 provides no help for implementing a TFO transform. The reference EFR decoder |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 source from ETSI includes bad frame handling and Rx DTX functions, but the logic |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 that implements these functions is interwoven throughout the body of the decoder |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 and does not form a separable front-end. Most saliently, this Rx DTX and ECU |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 logic in the reference decoder does not operate on coded parameters as would be |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 needed for a TFO transform, instead it operates on linear values deeper in the |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 decoder after parameter dequantization. |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 Given that Abis is a de facto proprietary interface that is not interoperable |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 between different vendors (and the same holds for Ater in those BSS designs |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 that separate the TRAU from the BSC), and given how daunting it seems to |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 implement a true TFO transform for EFR, prior to getting our Nokia TCSM2 lab |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 setup I was wondering if historical TRAU vendors really did implement this |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 TFO transform, or if perhaps they used some kind of "cheating" trick on their |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 Abis similar to what we did in OsmoBTS in mid-2023. However, once I got our |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 Nokia TCSM2 gear working, set up a TFO connection between two active TRAU |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 channels in EFR mode and passed some test sequences through it, it became clear |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 that Nokia did implement a real "honest-to-god" TFO transform for EFR: the |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 TRAU-DL frame stream is 100% valid "speech" frames (no idle frames or other |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 aberrations inserted) even when the TRAU-UL stream fed via TFO contains BFI |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 speech frames and DTXu pauses - the TRAU really does apply bad frame handling |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 and comfort noise insertion on parameter level. |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 Seeing that at least one major historical vendor did implement TFO transform |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 for EFR, and seeing the output from that transform, has set up a sportive |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 challenge for me: I no longer have a valid excuse to not do it. I now have a |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 desire to produce a FOSS implementation of TFO transform for EFR in Themyscira |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 libraries (probably in libgsmefr), and make it no worse than Nokia's |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 implementation in TCSM2. |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 Bad frame handling in speech mode |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 ================================= |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 Looking at the DL speech frames that were synthesized by the TRAU in those |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 frame positions where the incoming UL stream via TFO had BFIs, we can make the |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 following observations: |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 * The 5 LPC parameters are different in each generated substitution/muting |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 frame, hence it looks like the TFO transform is running the quantization |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 algorithm for each output frame to produce LPC parameters that aim for the |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 substitution/muting LSFs of the official "example solution". |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 * LTP lag parameters remain constant for each run of BFIs between good speech |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 frames; the lag value encoded therein matches the LTP lag (integer part only) |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 from the 4th subframe of the last good speech frame, just like in the official |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 endpoint decoder. |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 * Surprising bit: the 4 LTP gain values from the last good speech frame are |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 endlessly regurgitated verbatim in each substitution/muting frame, without |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 any signs of the attenuation I expected to see based on the official "example |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 solution". |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 * Another surprising bit: the 35-bit fixed codebook sequence in each subframe |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 is taken from the corresponding subframe of the last good speech frame, |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 contrary to the official "example solution" that takes these bits from the |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 errored frames. |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 * The four fixed codebook gain parameters in the emitted substitution/muting |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 frames differ from one frame to the next in the case of multiple BFI frames |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 in a row, and they also differ between subframes in the same frame - hence |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 these parameters are clearly being regenerated as output progresses. However, |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 the quantization algorithm for this parameter is so complex that I haven't |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 been able to make a more intelligent analysis yet. |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 Looking at the first good speech frame that follows each BFI substitution/muting |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 insert, we see that it is mostly unaltered: no alterations were seen to LPC or |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 LTP parameters, in particular. However, in the case of the fixed codebook gain |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 parameter we see a different behavioral pattern: most of the time it is also |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 unaltered, but sometimes we see reduction in this parameter, and even then it |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 is only in certain subframes. Are we perhaps seeing a capping of the fixed |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 codebook gain in the first good frame following BFI, similar to that implemented |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 in the reference endpoint decoder? A better understanding of the quantization |
d9553c7ac6ea
doc/TFO-xform/EFR: beginning of article
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 mechanism for this parameter will be needed. |