blob: 6b6327cf144ea6d33e6dab66fcad0c334698e8d6 [file] [log] [blame]
Roman Khassrafd38206c2015-06-07 16:26:29 +02001/*
2* Copyright 2012, 2014 Range Networks, Inc.
3*
4* This software is distributed under multiple licenses; see the COPYING file in the main directory for licensing information for this specific distribution.
5*
6* This use of this software may be subject to additional restrictions.
7* See the LEGAL file in the main directory for details.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
13*/
14
15
16
17#ifndef GSM503TABLES_H
18#define GSM503TABLES_H
19
20
21
22namespace GSM {
23
24// don't change the positions in this enum
25// (pat) The first 8 values are used as indicies into numerous tables.
26// (pat) Encoder/decoder mode includes 8 modes for AMR + TCH_FS makes 9.
27// TODO: Add AFS_SID type. And why is it not type 8?
28enum AMRMode {TCH_AFS12_2, TCH_AFS10_2, TCH_AFS7_95, TCH_AFS7_4, TCH_AFS6_7, TCH_AFS5_9, TCH_AFS5_15, TCH_AFS4_75, TCH_FS};
29
30/** Tables #7-14 from GSM 05.03 */
31extern const unsigned int gAMRBitOrderTCH_AFS12_2[244];
32extern const unsigned int gAMRBitOrderTCH_AFS10_2[204];
33extern const unsigned int gAMRBitOrderTCH_AFS7_95[159];
34extern const unsigned int gAMRBitOrderTCH_AFS7_4[148];
35extern const unsigned int gAMRBitOrderTCH_AFS6_7[134];
36extern const unsigned int gAMRBitOrderTCH_AFS5_9[118];
37extern const unsigned int gAMRBitOrderTCH_AFS5_15[103];
38extern const unsigned int gAMRBitOrderTCH_AFS4_75[95];
39
40/** GSM 05.03 3.9.4.4 */
41extern const unsigned int gAMRPuncturedTCH_AFS12_2[60];
42extern const unsigned int gAMRPuncturedTCH_AFS10_2[194];
43extern const unsigned int gAMRPuncturedTCH_AFS7_95[65];
44extern const unsigned int gAMRPuncturedTCH_AFS7_4[26];
45extern const unsigned int gAMRPuncturedTCH_AFS6_7[128];
46extern const unsigned int gAMRPuncturedTCH_AFS5_9[72];
47extern const unsigned int gAMRPuncturedTCH_AFS5_15[117];
48extern const unsigned int gAMRPuncturedTCH_AFS4_75[87];
49
50/* GSM 05.03 Tables 7-14 */
51extern const unsigned *gAMRBitOrder[8];
52
53/* GSM 05.03 3.9.4.2 */
54extern const unsigned gAMRKd[9];
55
56/* GSM 05.03 3.9.4.2 */
57extern const unsigned gAMRClass1ALth[8];
58
59/* GSM 05.03 3.9.4.4 */
60extern const unsigned gAMRTCHUCLth[8];
61
62/* GSM 05.03 3.9.4.2 */
63extern const unsigned gAMRPunctureLth[8];
64
65/* GSM 05.03 3.9.4.4 */
66extern const unsigned *gAMRPuncture[8];
67
68}
69
70
71#endif