# HG changeset patch # User Mychaela Falconia # Date 1681671646 0 # Node ID 7e490a8efe8a8897cc9d2dea6c395b9660b554ef # Parent 34f8549ff0b10f7a057e396f72c8c5d0d0608454 doc/Binary-file-format: document BFI marker format diff -r 34f8549ff0b1 -r 7e490a8efe8a doc/Binary-file-format --- a/doc/Binary-file-format Sun Apr 16 08:25:19 2023 +0000 +++ b/doc/Binary-file-format Sun Apr 16 19:00:46 2023 +0000 @@ -9,7 +9,7 @@ - a 33-byte GSM FR frame in libgsm/RTP format, 0xD signature - a 31-byte GSM EFR frame in RTP format (ETSI TS 101 318), 0xC signature -- a 2-byte Themyscira-extension BFI marker, 0xBF signature +- a 2-byte Themyscira-extension BFI marker, 0xBF signature, see below File reading functions begin by reading only one byte; this byte, once decoded, tells us how many more bytes need to be read, and frame synchronization is thus @@ -30,3 +30,16 @@ our low-level binary file reading function and gsmrec-dump will grok such mixing just fine, but each higher-level test program (beyond gsmrec-dump) is expected to be written for only one codec, either FR or EFR. + +BFI marker format +================= + +Every 20 ms frame in our gsmx files is either a good FR/EFR frame or a BFI (Bad +Frame Indication) marker. The BFI marker format used in our gsmx file format is +the same format which we (Themyscira Wireless) previously used in our GSM RAN +RTP transport, before switching to our current TRAUlike RTP format. This BFI +marker format is quite simple: + +byte 0: 0xBF signature; +byte 1: least-significant bit encoding TAF per GSM 06.31 or GSM 06.81, + section 6.1.1 in both documents; other bits are reserved.