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