FreeCalypso > hg > gsm-codec-lib
comparison doc/AMR-library-tests @ 481:cc0c244bd233
doc/AMR-library-tests: new article
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 20 May 2024 01:02:37 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
480:332397bc80aa | 481:cc0c244bd233 |
---|---|
1 The present suite includes a pair of command line programs that exercise | |
2 libtwamr encoder and decoder in 3GPP test sequence format, allowing this library | |
3 to be tested against the official test sequences of 3GPP TS 26.074. | |
4 | |
5 twamr-tseq-enc | |
6 ============== | |
7 | |
8 This program reads a *.inp file from the collection of TS 26.074, encodes it | |
9 per selected AMR mode using libtwamr functions, and emits the encoder output in | |
10 3GPP-defined .cod format. The command line structure of twamr-tseq-enc is as | |
11 follows: | |
12 | |
13 twamr-tseq-enc [-d] [-2] input.inp mode output.cod | |
14 | |
15 The middle argument specifies the codec mode to be used; there is no default. | |
16 Ordinarily the mode argument is one of these 8 keywords: | |
17 | |
18 MR475 | |
19 MR515 | |
20 MR59 | |
21 MR67 | |
22 MR74 | |
23 MR795 | |
24 MR102 | |
25 MR122 | |
26 | |
27 However, this mode argument can also take the form of "file:$modefile", where | |
28 $modefile is an ASCII text file giving one of the above mode keywords per line. | |
29 This form is needed when testing the encoding of t21.inp per t21.mod control | |
30 file. | |
31 | |
32 twamr-tseq-enc flag options: -d enables DTX, -2 switches the VAD algorithm from | |
33 VAD1 default to VAD2 alternative. The two options can be combined as -d2. | |
34 | |
35 twamr-tseq-dec | |
36 ============== | |
37 | |
38 This program reads a *.cod file in 3GPP AMR test sequence format, decodes it | |
39 using libtwamr functions, and emits the decoder output in a raw PCM *.out file. | |
40 The command line structure of twamr-tseq-dec is as follows: | |
41 | |
42 twamr-tseq-dec [-r] input.cod output.out | |
43 | |
44 By default the first word of each *.cod frame is expected to be a Tx frame type | |
45 as in enum TXFrameType; with -r option this first word is expected to be an Rx | |
46 frame type as in enum RXFrameType instead. This option directly corresponds to | |
47 -rxframetype in the reference decoder program from 3GPP. | |
48 | |
49 Byte order considerations | |
50 ========================= | |
51 | |
52 Both twamr-tseq-enc and twamr-tseq-dec read and write their input and output | |
53 files (16-bit linear PCM on one end and 3GPP *.cod test sequence format on the | |
54 other end) in the local machine's native byte order. 3GPP shipped their | |
55 TS 26.074 collection of AMR test sequences in little-endian byte order; given | |
56 that most GSM software developers are now largely forced by economic pressures | |
57 to work on x86 or ARM architecture machines rather than more noble SPARC or | |
58 PowerPC systems, the local byte order of the developer's machine will typically | |
59 be LE, matching TS 26.074 files as published. |