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