comparison amrdiff/amr_defs.h @ 0:a03c87a2abc6

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