comparison doc/Binary-file-format @ 210:7e490a8efe8a

doc/Binary-file-format: document BFI marker format
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 16 Apr 2023 19:00:46 +0000
parents b4b1c3a192c7
children f469bad44c0e
comparison
equal deleted inserted replaced
209:34f8549ff0b1 210:7e490a8efe8a
7 directly abutted sequence of binary records, but each record is now one of 3 7 directly abutted sequence of binary records, but each record is now one of 3
8 possibilities: 8 possibilities:
9 9
10 - a 33-byte GSM FR frame in libgsm/RTP format, 0xD signature 10 - a 33-byte GSM FR frame in libgsm/RTP format, 0xD signature
11 - a 31-byte GSM EFR frame in RTP format (ETSI TS 101 318), 0xC signature 11 - a 31-byte GSM EFR frame in RTP format (ETSI TS 101 318), 0xC signature
12 - a 2-byte Themyscira-extension BFI marker, 0xBF signature 12 - a 2-byte Themyscira-extension BFI marker, 0xBF signature, see below
13 13
14 File reading functions begin by reading only one byte; this byte, once decoded, 14 File reading functions begin by reading only one byte; this byte, once decoded,
15 tells us how many more bytes need to be read, and frame synchronization is thus 15 tells us how many more bytes need to be read, and frame synchronization is thus
16 maintained. 16 maintained.
17 17
28 28
29 FR and EFR frames are not expected to be mixed in the same stream recording; 29 FR and EFR frames are not expected to be mixed in the same stream recording;
30 our low-level binary file reading function and gsmrec-dump will grok such mixing 30 our low-level binary file reading function and gsmrec-dump will grok such mixing
31 just fine, but each higher-level test program (beyond gsmrec-dump) is expected 31 just fine, but each higher-level test program (beyond gsmrec-dump) is expected
32 to be written for only one codec, either FR or EFR. 32 to be written for only one codec, either FR or EFR.
33
34 BFI marker format
35 =================
36
37 Every 20 ms frame in our gsmx files is either a good FR/EFR frame or a BFI (Bad
38 Frame Indication) marker. The BFI marker format used in our gsmx file format is
39 the same format which we (Themyscira Wireless) previously used in our GSM RAN
40 RTP transport, before switching to our current TRAUlike RTP format. This BFI
41 marker format is quite simple:
42
43 byte 0: 0xBF signature;
44 byte 1: least-significant bit encoding TAF per GSM 06.31 or GSM 06.81,
45 section 6.1.1 in both documents; other bits are reserved.