Mercurial > hg > audiostuff
comparison spandsp-0.0.6pre17/src/v17_v32bis_tx_constellation_maps.h @ 4:26cd8f1ef0b1
import spandsp-0.0.6pre17
author | Peter Meerwald <pmeerw@cosy.sbg.ac.at> |
---|---|
date | Fri, 25 Jun 2010 15:50:58 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
3:c6c5a16ce2f2 | 4:26cd8f1ef0b1 |
---|---|
1 /* | |
2 * SpanDSP - a series of DSP components for telephony | |
3 * | |
4 * v17_v32bis_tx_constellation_maps.h - ITU V.17 and V.32bis modems | |
5 * transmit part. | |
6 * Constellation mapping. | |
7 * | |
8 * Written by Steve Underwood <steveu@coppice.org> | |
9 * | |
10 * Copyright (C) 2004 Steve Underwood | |
11 * | |
12 * All rights reserved. | |
13 * | |
14 * This program is free software; you can redistribute it and/or modify | |
15 * it under the terms of the GNU Lesser General Public License version 2.1, | |
16 * as published by the Free Software Foundation. | |
17 * | |
18 * This program is distributed in the hope that it will be useful, | |
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 * GNU Lesser General Public License for more details. | |
22 * | |
23 * You should have received a copy of the GNU Lesser General Public | |
24 * License along with this program; if not, write to the Free Software | |
25 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
26 * | |
27 * $Id: v17_v32bis_tx_constellation_maps.h,v 1.1.4.1 2009/12/24 16:52:30 steveu Exp $ | |
28 */ | |
29 | |
30 #if defined(SPANDSP_USE_FIXED_POINTx) | |
31 static const complexi16_t v17_v32bis_14400_constellation[128] = | |
32 #else | |
33 static const complexf_t v17_v32bis_14400_constellation[128] = | |
34 #endif | |
35 { | |
36 {-8, -3}, /* 0x00 */ | |
37 { 9, 2}, /* 0x01 */ | |
38 { 2, -9}, /* 0x02 */ | |
39 {-3, 8}, /* 0x03 */ | |
40 { 8, 3}, /* 0x04 */ | |
41 {-9, -2}, /* 0x05 */ | |
42 {-2, 9}, /* 0x06 */ | |
43 { 3, -8}, /* 0x07 */ | |
44 {-8, 1}, /* 0x08 */ | |
45 { 9, -2}, /* 0x09 */ | |
46 {-2, -9}, /* 0x0A */ | |
47 { 1, 8}, /* 0x0B */ | |
48 { 8, -1}, /* 0x0C */ | |
49 {-9, 2}, /* 0x0D */ | |
50 { 2, 9}, /* 0x0E */ | |
51 {-1, -8}, /* 0x0F */ | |
52 {-4, -3}, /* 0x10 */ | |
53 { 5, 2}, /* 0x11 */ | |
54 { 2, -5}, /* 0x12 */ | |
55 {-3, 4}, /* 0x13 */ | |
56 { 4, 3}, /* 0x14 */ | |
57 {-5, -2}, /* 0x15 */ | |
58 {-2, 5}, /* 0x16 */ | |
59 { 3, -4}, /* 0x17 */ | |
60 {-4, 1}, /* 0x18 */ | |
61 { 5, -2}, /* 0x19 */ | |
62 {-2, -5}, /* 0x1A */ | |
63 { 1, 4}, /* 0x1B */ | |
64 { 4, -1}, /* 0x1C */ | |
65 {-5, 2}, /* 0x1D */ | |
66 { 2, 5}, /* 0x1E */ | |
67 {-1, -4}, /* 0x1F */ | |
68 { 4, -3}, /* 0x20 */ | |
69 {-3, 2}, /* 0x21 */ | |
70 { 2, 3}, /* 0x22 */ | |
71 {-3, -4}, /* 0x23 */ | |
72 {-4, 3}, /* 0x24 */ | |
73 { 3, -2}, /* 0x25 */ | |
74 {-2, -3}, /* 0x26 */ | |
75 { 3, 4}, /* 0x27 */ | |
76 { 4, 1}, /* 0x28 */ | |
77 {-3, -2}, /* 0x29 */ | |
78 {-2, 3}, /* 0x2A */ | |
79 { 1, -4}, /* 0x2B */ | |
80 {-4, -1}, /* 0x2C */ | |
81 { 3, 2}, /* 0x2D */ | |
82 { 2, -3}, /* 0x2E */ | |
83 {-1, 4}, /* 0x2F */ | |
84 { 0, -3}, /* 0x30 */ | |
85 { 1, 2}, /* 0x31 */ | |
86 { 2, -1}, /* 0x32 */ | |
87 {-3, 0}, /* 0x33 */ | |
88 { 0, 3}, /* 0x34 */ | |
89 {-1, -2}, /* 0x35 */ | |
90 {-2, 1}, /* 0x36 */ | |
91 { 3, 0}, /* 0x37 */ | |
92 { 0, 1}, /* 0x38 */ | |
93 { 1, -2}, /* 0x39 */ | |
94 {-2, -1}, /* 0x3A */ | |
95 { 1, 0}, /* 0x3B */ | |
96 { 0, -1}, /* 0x3C */ | |
97 {-1, 2}, /* 0x3D */ | |
98 { 2, 1}, /* 0x3E */ | |
99 {-1, 0}, /* 0x3F */ | |
100 { 8, -3}, /* 0x40 */ | |
101 {-7, 2}, /* 0x41 */ | |
102 { 2, 7}, /* 0x42 */ | |
103 {-3, -8}, /* 0x43 */ | |
104 {-8, 3}, /* 0x44 */ | |
105 { 7, -2}, /* 0x45 */ | |
106 {-2, -7}, /* 0x46 */ | |
107 { 3, 8}, /* 0x47 */ | |
108 { 8, 1}, /* 0x48 */ | |
109 {-7, -2}, /* 0x49 */ | |
110 {-2, 7}, /* 0x4A */ | |
111 { 1, -8}, /* 0x4B */ | |
112 {-8, -1}, /* 0x4C */ | |
113 { 7, 2}, /* 0x4D */ | |
114 { 2, -7}, /* 0x4E */ | |
115 {-1, 8}, /* 0x4F */ | |
116 {-4, -7}, /* 0x50 */ | |
117 { 5, 6}, /* 0x51 */ | |
118 { 6, -5}, /* 0x52 */ | |
119 {-7, 4}, /* 0x53 */ | |
120 { 4, 7}, /* 0x54 */ | |
121 {-5, -6}, /* 0x55 */ | |
122 {-6, 5}, /* 0x56 */ | |
123 { 7, -4}, /* 0x57 */ | |
124 {-4, 5}, /* 0x58 */ | |
125 { 5, -6}, /* 0x59 */ | |
126 {-6, -5}, /* 0x5A */ | |
127 { 5, 4}, /* 0x5B */ | |
128 { 4, -5}, /* 0x5C */ | |
129 {-5, 6}, /* 0x5D */ | |
130 { 6, 5}, /* 0x5E */ | |
131 {-5, -4}, /* 0x5F */ | |
132 { 4, -7}, /* 0x60 */ | |
133 {-3, 6}, /* 0x61 */ | |
134 { 6, 3}, /* 0x62 */ | |
135 {-7, -4}, /* 0x63 */ | |
136 {-4, 7}, /* 0x64 */ | |
137 { 3, -6}, /* 0x65 */ | |
138 {-6, -3}, /* 0x66 */ | |
139 { 7, 4}, /* 0x67 */ | |
140 { 4, 5}, /* 0x68 */ | |
141 {-3, -6}, /* 0x69 */ | |
142 {-6, 3}, /* 0x6A */ | |
143 { 5, -4}, /* 0x6B */ | |
144 {-4, -5}, /* 0x6C */ | |
145 { 3, 6}, /* 0x6D */ | |
146 { 6, -3}, /* 0x6E */ | |
147 {-5, 4}, /* 0x6F */ | |
148 { 0, -7}, /* 0x70 */ | |
149 { 1, 6}, /* 0x71 */ | |
150 { 6, -1}, /* 0x72 */ | |
151 {-7, 0}, /* 0x73 */ | |
152 { 0, 7}, /* 0x74 */ | |
153 {-1, -6}, /* 0x75 */ | |
154 {-6, 1}, /* 0x76 */ | |
155 { 7, 0}, /* 0x77 */ | |
156 { 0, 5}, /* 0x78 */ | |
157 { 1, -6}, /* 0x79 */ | |
158 {-6, -1}, /* 0x7A */ | |
159 { 5, 0}, /* 0x7B */ | |
160 { 0, -5}, /* 0x7C */ | |
161 {-1, 6}, /* 0x7D */ | |
162 { 6, 1}, /* 0x7E */ | |
163 {-5, 0} /* 0x7F */ | |
164 }; | |
165 | |
166 #if defined(SPANDSP_USE_FIXED_POINTx) | |
167 static const complexi16_t v17_v32bis_12000_constellation[64] = | |
168 #else | |
169 static const complexf_t v17_v32bis_12000_constellation[64] = | |
170 #endif | |
171 { | |
172 { 7, 1}, /* 0x00 */ | |
173 {-5, -1}, /* 0x01 */ | |
174 {-1, 5}, /* 0x02 */ | |
175 { 1, -7}, /* 0x03 */ | |
176 {-7, -1}, /* 0x04 */ | |
177 { 5, 1}, /* 0x05 */ | |
178 { 1, -5}, /* 0x06 */ | |
179 {-1, 7}, /* 0x07 */ | |
180 { 3, -3}, /* 0x08 */ | |
181 {-1, 3}, /* 0x09 */ | |
182 { 3, 1}, /* 0x0A */ | |
183 {-3, -3}, /* 0x0B */ | |
184 {-3, 3}, /* 0x0C */ | |
185 { 1, -3}, /* 0x0D */ | |
186 {-3, -1}, /* 0x0E */ | |
187 { 3, 3}, /* 0x0F */ | |
188 { 7, -7}, /* 0x10 */ | |
189 {-5, 7}, /* 0x11 */ | |
190 { 7, 5}, /* 0x12 */ | |
191 {-7, -7}, /* 0x13 */ | |
192 {-7, 7}, /* 0x14 */ | |
193 { 5, -7}, /* 0x15 */ | |
194 {-7, -5}, /* 0x16 */ | |
195 { 7, 7}, /* 0x17 */ | |
196 {-1, -7}, /* 0x18 */ | |
197 { 3, 7}, /* 0x19 */ | |
198 { 7, -3}, /* 0x1A */ | |
199 {-7, 1}, /* 0x1B */ | |
200 { 1, 7}, /* 0x1C */ | |
201 {-3, -7}, /* 0x1D */ | |
202 {-7, 3}, /* 0x1E */ | |
203 { 7, -1}, /* 0x1F */ | |
204 { 3, 5}, /* 0x20 */ | |
205 {-1, -5}, /* 0x21 */ | |
206 {-5, 1}, /* 0x22 */ | |
207 { 5, -3}, /* 0x23 */ | |
208 {-3, -5}, /* 0x24 */ | |
209 { 1, 5}, /* 0x25 */ | |
210 { 5, -1}, /* 0x26 */ | |
211 {-5, 3}, /* 0x27 */ | |
212 {-1, 1}, /* 0x28 */ | |
213 { 3, -1}, /* 0x29 */ | |
214 {-1, -3}, /* 0x2A */ | |
215 { 1, 1}, /* 0x2B */ | |
216 { 1, -1}, /* 0x2C */ | |
217 {-3, 1}, /* 0x2D */ | |
218 { 1, 3}, /* 0x2E */ | |
219 {-1, -1}, /* 0x2F */ | |
220 {-5, 5}, /* 0x30 */ | |
221 { 7, -5}, /* 0x31 */ | |
222 {-5, -7}, /* 0x32 */ | |
223 { 5, 5}, /* 0x33 */ | |
224 { 5, -5}, /* 0x34 */ | |
225 {-7, 5}, /* 0x35 */ | |
226 { 5, 7}, /* 0x36 */ | |
227 {-5, -5}, /* 0x37 */ | |
228 {-5, -3}, /* 0x38 */ | |
229 { 7, 3}, /* 0x39 */ | |
230 { 3, -7}, /* 0x3A */ | |
231 {-3, 5}, /* 0x3B */ | |
232 { 5, 3}, /* 0x3C */ | |
233 {-7, -3}, /* 0x3D */ | |
234 {-3, 7}, /* 0x3E */ | |
235 { 3, -5} /* 0x3F */ | |
236 }; | |
237 | |
238 #if defined(SPANDSP_USE_FIXED_POINTx) | |
239 static const complexi16_t v17_v32bis_9600_constellation[32] = | |
240 #else | |
241 static const complexf_t v17_v32bis_9600_constellation[32] = | |
242 #endif | |
243 { | |
244 {-8, 2}, /* 0x00 */ | |
245 {-6, -4}, /* 0x01 */ | |
246 {-4, 6}, /* 0x02 */ | |
247 { 2, 8}, /* 0x03 */ | |
248 { 8, -2}, /* 0x04 */ | |
249 { 6, 4}, /* 0x05 */ | |
250 { 4, -6}, /* 0x06 */ | |
251 {-2, -8}, /* 0x07 */ | |
252 { 0, 2}, /* 0x08 */ | |
253 {-6, 4}, /* 0x09 */ | |
254 { 4, 6}, /* 0x0A */ | |
255 { 2, 0}, /* 0x0B */ | |
256 { 0, -2}, /* 0x0C */ | |
257 { 6, -4}, /* 0x0D */ | |
258 {-4, -6}, /* 0x0E */ | |
259 {-2, 0}, /* 0x0F */ | |
260 { 0, -6}, /* 0x10 */ | |
261 { 2, -4}, /* 0x11 */ | |
262 {-4, -2}, /* 0x12 */ | |
263 {-6, 0}, /* 0x13 */ | |
264 { 0, 6}, /* 0x14 */ | |
265 {-2, 4}, /* 0x15 */ | |
266 { 4, 2}, /* 0x16 */ | |
267 { 6, 0}, /* 0x17 */ | |
268 { 8, 2}, /* 0x18 */ | |
269 { 2, 4}, /* 0x19 */ | |
270 { 4, -2}, /* 0x1A */ | |
271 { 2, -8}, /* 0x1B */ | |
272 {-8, -2}, /* 0x1C */ | |
273 {-2, -4}, /* 0x1D */ | |
274 {-4, 2}, /* 0x1E */ | |
275 {-2, 8} /* 0x1F */ | |
276 }; | |
277 | |
278 #if defined(SPANDSP_USE_FIXED_POINTx) | |
279 static const complexi16_t v17_v32bis_7200_constellation[16] = | |
280 #else | |
281 static const complexf_t v17_v32bis_7200_constellation[16] = | |
282 #endif | |
283 { | |
284 { 6, -6}, /* 0x00 */ | |
285 {-2, 6}, /* 0x01 */ | |
286 { 6, 2}, /* 0x02 */ | |
287 {-6, -6}, /* 0x03 */ | |
288 {-6, 6}, /* 0x04 */ | |
289 { 2, -6}, /* 0x05 */ | |
290 {-6, -2}, /* 0x06 */ | |
291 { 6, 6}, /* 0x07 */ | |
292 {-2, 2}, /* 0x08 */ | |
293 { 6, -2}, /* 0x09 */ | |
294 {-2, -6}, /* 0x0A */ | |
295 { 2, 2}, /* 0x0B */ | |
296 { 2, -2}, /* 0x0C */ | |
297 {-6, 2}, /* 0x0D */ | |
298 { 2, 6}, /* 0x0E */ | |
299 {-2, -2} /* 0x0F */ | |
300 }; | |
301 | |
302 /* This one does not exist in V.17 as a data constellation. It is only | |
303 the equaliser training constellation. In V.32/V.32bis it is a data mode. */ | |
304 #if defined(SPANDSP_USE_FIXED_POINTx) | |
305 static const complexi16_t v17_v32bis_4800_constellation[4] = | |
306 #else | |
307 static const complexf_t v17_v32bis_4800_constellation[4] = | |
308 #endif | |
309 { | |
310 {-6, -2}, /* 0x00 */ | |
311 {-2, 6}, /* 0x01 */ | |
312 { 2, -6}, /* 0x02 */ | |
313 { 6, 2} /* 0x03 */ | |
314 }; | |
315 | |
316 #if defined(SPANDSP_USE_FIXED_POINTx) | |
317 static const complexi16_t v17_v32bis_abcd_constellation[4] = | |
318 #else | |
319 static const complexf_t v17_v32bis_abcd_constellation[4] = | |
320 #endif | |
321 { | |
322 {-6, -2}, /* A */ | |
323 { 2, -6}, /* B */ | |
324 { 6, 2}, /* C */ | |
325 {-2, 6} /* D */ | |
326 }; | |
327 | |
328 /*- End of file ------------------------------------------------------------*/ |