annotate amrconv/amr_defs.h @ 211:78d1a6513393

amrconv: new program amr-cod-parse
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 20 Apr 2023 01:30:46 +0000
parents
children 934cf92a1c45
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 */
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 enum TXFrameType {
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 TX_SPEECH_GOOD = 0,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 TX_SID_FIRST,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 TX_SID_UPDATE,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 TX_NO_DATA,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 TX_SPEECH_DEGRADED,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 TX_SPEECH_BAD,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 TX_SID_BAD,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 TX_ONSET,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 TX_N_FRAMETYPES /* number of frame types */
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 };
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 enum Mode {
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 MR475 = 0,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 MR515,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 MR59,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 MR67,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 MR74,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 MR795,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 MR102,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 MR122,
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 MRDTX
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 };
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 /* number of speech bits for all modes */
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 #define AMR_NBITS_475 95
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 #define AMR_NBITS_515 103
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 #define AMR_NBITS_59 118
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 #define AMR_NBITS_67 134
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 #define AMR_NBITS_74 148
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 #define AMR_NBITS_795 159
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 #define AMR_NBITS_102 204
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 #define AMR_NBITS_122 244
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 #define AMR_NBITS_SID 35
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 /* number of distinct parameters for all modes */
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 #define PRMNO_MR475 17
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 #define PRMNO_MR515 19
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 #define PRMNO_MR59 19
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 #define PRMNO_MR67 19
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 #define PRMNO_MR74 19
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 #define PRMNO_MR795 23
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 #define PRMNO_MR102 39
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 #define PRMNO_MR122 57
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 #define PRMNO_MRDTX 5
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 /* ETSI/3GPP test sequence file format */
78d1a6513393 amrconv: new program amr-cod-parse
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 #define COD_FORMAT_NWORDS 250