FreeCalypso > hg > gsm-codec-lib
annotate doc/FR1-Rx-DTX @ 397:9b699f30e6f3
libtwamr: integrate pre_proc.c
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 06 May 2024 19:02:44 +0000 |
parents | 4034c2b06ec8 |
children |
rev | line source |
---|---|
135
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 At the level of provided functionality and architectural structure, ETSI GSM |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 specifications for DTX (discontinuous transmission) are very symmetric between |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 FR and EFR: the same DTX functionality is specified for both codecs, with the |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 same overall architecture. However, there is one important difference: in the |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 case of EFR the complete implementation of all DTX functions (for both Tx and |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 Rx) forms an integral and inseparable part of the reference codec (implemented |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 in C) from the beginning, whereas in the case of FR1 the addition of DTX is |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 somewhat of an afterthought. GSM 06.10 defines a "pure" FR codec without any |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 DTX functions, and this most basic spec can be and has been implemented in this |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 "pure" form - classic Unix libgsm from 1990s is a proper, fully compliant |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 implementation of GSM 06.10, but only this spec, without any DTX. In contrast, |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 there has never existed a "pure" implementation of GSM 06.60 EFR codec without |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 associated Tx and Rx DTX functions. Furthermore, there is an important |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 distinction between Tx and Rx DTX handlers for FR1: |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 * Anyone who seeks to implement Tx DTX for FR1 would have to dig into the guts |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 of GSM 06.10 encoder and augment it with VAD and SID encoding functions per |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 GSM 06.32 and 06.12 specs. |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 * In contrast, the Rx DTX handler for FR1 is modular: the way it is specified |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 in GSM 06.11, 06.12 and 06.31 is a front-end to unmodified GSM 06.10 decoder. |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 On the Rx side, the interface from the radio subsystem to the Rx DTX handler |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 consists of 260 bits of frame plus BFI and TAF flags (the spec also defines a |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 SID flag, but it is determined from frame payload bits), and then the |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 interface from the Rx DTX handler to the GSM 06.10 decoder is another FR frame |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 of 260 bits. |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 What are the implications of this situation for the GSM published-source |
303
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
29 software community? Prior to the present Themyscira offering, there has always |
135
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 been libgsm, but no Rx DTX handler. If you are working with a GSM uplink RTP |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 stream from a BTS or a GSM downlink frame stream read out of TI Calypso DSP or |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 some other GSM MS PHY, feeding that stream directly to libgsm (without passing |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 through an Rx DTX handler) is NOT acceptable: a "bare" GSM 06.10 decoder won't |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 recognize SID frames and won't produce the expected comfort noise output, and |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 what are you going to do in those 20 ms windows in which no good traffic frame |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 was received? The situation becomes especially bad (unkind on ears) if you are |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 reading received downlink frames out of TI Calypso DSP: the DSP's buffer will |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 have *some* bit content in every 20 ms window, but naturally this bit content |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 will be garbage during those frame windows when no good frame was received; |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 feeding that garbage to libgsm produces noises that are very unkind on ears. |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 The correct solution is to implement an Rx DTX handler, pass the stream of |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 frames and flags from the BTS or the MS PHY to this handler first, and then pass |
303
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
44 the output of this handler to the standard GSM 06.10 decoder (classic libgsm or |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
45 some updated port thereof). Themyscira libgsmfrp was our first Free Software |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
46 implementation of Rx DTX handler for GSM-FR, implementing SID classification, |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
47 comfort noise generation and error concealment. Our new libgsmfr2 offering |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
48 takes the harmonization effort (between GSM-FR and other GSM codecs) one step |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
49 further, eliminating the dependency on old libgsm and putting all GSM-FR codec |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
50 functions "under one roof". |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
51 |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
52 libgsmfrp/libgsmfr2 API documentation |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
53 ===================================== |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
54 |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
55 The Rx DTX component of libgsmfr2 has the same API as our previous libgsmfrp, |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
56 except for dropping the use of <gsm.h> and its types and needing to include our |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
57 new API header <tw_gsmfr.h>. The present article previously contained the full |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
58 description of this API; that description has now been moved to FR1-library-API |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
59 article, where the whole of libgsmfr2 is documented. |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
60 |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
61 Standalone exerciser utility |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
62 ============================ |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
63 |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
64 The present GSM codec libraries and utilities package includes a standalone |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
65 utility that exercises our Rx DTX handler for GSM-FR. This utility is |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
66 gsmfr-preproc, to be run as follows: |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
67 |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
68 gsmfr-preproc input.gsmx output.gsm |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
69 |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
70 The input is an extended-libgsm file that can contain SIDs and BFI frame gaps |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
71 in addition to regular GSM 06.10 speech frames (see Binary-file-format article); |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
72 the output is GSM 06.10 speech frames only. |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
73 |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
74 False SID detection |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
75 =================== |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
76 |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
77 The intent of GSM-FR spec authors was that the sets of possible speech frames |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
78 and possible SID frames be disjoint. Prior to introduction of DTX, there were |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
79 only regular speech frames per GSM 06.10, no SID, and a receiver had to deal |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
80 with only two possibilities: either a good speech frame was received, or the |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
81 frame was lost to radio errors or FACCH stealing (unusable frame). When SID |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
82 frames were introduced for the purpose of intentional DTX as distinct from |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
83 radio errors, the intent was that SID was to be a "new animal" not seen before, |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
84 distinct from regular speech frames. There is, however, a small blemish in the |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
85 actual system as realized: if the SID frame detector and the Rx DTX handler |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
86 that follows it in the Rx chain follow the rules of GSM 06.31 sections 6.1.1 |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
87 and 6.1.2, respectively (like our implementation does), then some speech frames |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
88 may be mistaken for invalid SID, or perhaps even for valid SID, producing a |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
89 nonzero failure rate in this mechanism. |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
90 |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
91 Official test sequence 02 in the set of 5 provided by ETSI exhibits this effect: |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
92 Seq02.inp is a legitimate 13-bit linear PCM input to the speech encoder, and the |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
93 corresponding output of GSM 06.10 encoder is contained in Seq02.cod. However, |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
94 that output contains some frames that are mistakenly classified as SID=1 |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
95 (invalid SID) by the rules of GSM 06.31 section 6.1.1! It is true that these |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
96 ancient test sequences chronologically predate the invention of DTX and |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
97 GSM 06.31, but we still need to bear in mind that this problematic Seq02.cod is |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
98 not an artificially constructed sequence of 06.10 codec parameters: it is the |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
99 required output of the prescribed bit-exact encoder given a legitimate PCM |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
100 input! There does not exist a perfect solution to this problem: as usual, |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
101 real-world engineering is all about trade-offs and compromises, and occasionally |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
102 a gear will slip. The best we can do is to model the probability of such |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
103 gear-slip or wrong detection events, and engineer our systems to reduce this |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
104 probability to a level that is deemed acceptable - which is exactly what GSM |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
105 spec designers did here. |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
106 |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
107 As of gsm-codec-lib-r3, gsmrec-dump utility shows the SID classification result |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
108 (GSM 06.31 section 6.1.1) in addition to parsed 06.10 codec parameters for each |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
109 frame, thus one can inspect FR-encoded streams and check for this blemish. |
135
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 Effect of extra preprocessing |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 ============================= |
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 |
303
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
114 What will happen if the output of our Rx DTX preprocessor (e.g., the output of |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
115 gsmfr-preproc utility) is fed to another utility such as gsmfr-decode that also |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
116 applies the same preprocessor to its input? In other words, what is the effect |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
117 of a secondary preprocessor application to previous preprocessor output? |
135
22601ae99434
doc/FR1-Rx-DTX article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 |
303
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
119 Most of the time, the second preprocessor pass will be an identity transform |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
120 under these conditions, as the input to that second pass will consist entirely |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
121 of good speech frames, no SIDs and no BFIs. Any speech frames in the original |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
122 input that were mistakenly classified as SID (valid or invalid) have already |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
123 been converted to comfort noise (or to the silence frame in one corner case of |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
124 invalid SID), hence they are no longer present in the output to trigger this |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
125 effect a second time. However, there is still a small possibility that a |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
126 second pass will be a non-identity transform: pseudorandom RPE pulse parameters |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
127 in our comfort noise output are uniformly distributed between 1 and 6 (GSM 06.12 |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
128 section 6.1), and if PRNG dice roll such that at least 80 out of 95 SID codeword |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
129 bit positions (all in the xMc part of the frame) are all zeros, the resulting |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
130 CN frame will be liable to misinterpretation as SID (invalid SID most of the |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
131 time, or even more rarely valid SID if at least 94 out of 95 SID codeword bit |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
132 positions are all zeros) if fed to the preprocessor a second time. That second |
4034c2b06ec8
doc/FR1-Rx-DTX: update for libgsmfr2 and the new landscape
Mychaela Falconia <falcon@freecalypso.org>
parents:
250
diff
changeset
|
133 pass would then further alter those affected frames, but no others. |