comparison doc/Codec-utils @ 136:8eb0e7a39409

doc: document command line utilities
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 11 Dec 2022 22:20:36 +0000
parents
children 30c7bc064218
comparison
equal deleted inserted replaced
135:22601ae99434 136:8eb0e7a39409
1 Standalone command line utilities for FR and EFR codecs
2 =======================================================
3
4 The pre-existing FOSS opencore-amr package includes amrnb-enc and amrnb-dec test
5 programs: the first reads linear PCM from a WAV file and emits AMR encoder
6 output in a .amr file (RFC 4867 AMR storage format), the second reads this .amr
7 format and emits AMR decoder output as WAV. Inspired by these simple test
8 programs, the present package offers equivalent command line utilities for GSM
9 FR and EFR codecs. Here they are:
10
11 gsmfr-encode This utility reads linear PCM from a WAV file, runs libgsm
12 06.10 encoder and writes the output in the classic .gsm format
13 (directly abutted FR codec frames of 33 bytes each). We don't
14 currently have a Tx-side DTX implementation (VAD etc) for GSM
15 FR, hence the output from gsmfr-encode will always consist of
16 good speech frames only.
17
18 gsmfr-decode This utility reads our gsmx format (see Binary-file-format
19 article), which is a superset of the classic libgsm format.
20 The input to gsmfr-decode may be a pure .gsm recording as
21 produced by gsmfr-encode or toast from libgsm package, or it
22 can also contain SID frames and/or BFI markers. The processing
23 performed by gsmfr-decode begins with our FR1 Rx DTX handler
24 preprocessor, which will be an identity transform for pure .gsm
25 input but becomes important for real-world input containing SIDs
26 and BFIs, and is followed by gsm_decode() from libgsm. The
27 decoded output is written as WAV.
28
29 gsmefr-encode This utility reads linear PCM from a WAV file, runs our EFR
30 encoder (Themyscira libgsmefr) and writes the output in our gsmx
31 format. There is an option to enable or disable DTX: -d enables
32 DTX, otherwise it is disabled. (This option mirrors amrnb-enc.)
33
34 gsmefr-decode This utility reads our gsmx format (which must be EFR, not FR1)
35 and feeds all frames and BFIs to our EFR decoder. The decoded
36 output is written as WAV.
37
38 WAV reading and writing functions used by the above utilities have been lifted
39 out of opencore-amrnb test code.