annotate amrconv/amr_defs.h @ 299:59751c8fc773

doc/FR1-library-API: finish in first pass
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 15 Apr 2024 18:04:02 +0000
parents 934cf92a1c45
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
211
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * This header file holds some miscellaneous definitions for AMR,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * to be used by parsing and conversion debug utilities.
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 */
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 #define MAX_PRM_SIZE 57 /* max. num. of params */
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 #define MAX_SERIAL_SIZE 244 /* max. num. of serial bits */
214
934cf92a1c45 amrconv: new program amr-ietf-parse
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
8 #define MAX_IF1_BYTES 31 /* max bytes in AMR IF1 packing */
934cf92a1c45 amrconv: new program amr-ietf-parse
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
9 #define IETF_HDR_LEN 6 /* .amr file header bytes */
211
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 enum TXFrameType {
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 TX_SPEECH_GOOD = 0,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 TX_SID_FIRST,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 TX_SID_UPDATE,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 TX_NO_DATA,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 TX_SPEECH_DEGRADED,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 TX_SPEECH_BAD,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 TX_SID_BAD,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 TX_ONSET,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 TX_N_FRAMETYPES /* number of frame types */
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 };
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 enum Mode {
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 MR475 = 0,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 MR515,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 MR59,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 MR67,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 MR74,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 MR795,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 MR102,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 MR122,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 MRDTX
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 };
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34
214
934cf92a1c45 amrconv: new program amr-ietf-parse
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
35 #define MODE_NO_DATA 15
934cf92a1c45 amrconv: new program amr-ietf-parse
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
36
211
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 /* number of speech bits for all modes */
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 #define AMR_NBITS_475 95
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 #define AMR_NBITS_515 103
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 #define AMR_NBITS_59 118
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 #define AMR_NBITS_67 134
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 #define AMR_NBITS_74 148
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 #define AMR_NBITS_795 159
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 #define AMR_NBITS_102 204
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 #define AMR_NBITS_122 244
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 #define AMR_NBITS_SID 35
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 /* number of distinct parameters for all modes */
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 #define PRMNO_MR475 17
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 #define PRMNO_MR515 19
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 #define PRMNO_MR59 19
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 #define PRMNO_MR67 19
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 #define PRMNO_MR74 19
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 #define PRMNO_MR795 23
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 #define PRMNO_MR102 39
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 #define PRMNO_MR122 57
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 #define PRMNO_MRDTX 5
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 /* ETSI/3GPP test sequence file format */
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 #define COD_FORMAT_NWORDS 250