spandsp 0.0.6
|
00001 /* 00002 * SpanDSP - a series of DSP components for telephony 00003 * 00004 * v17_v32bis_tx_constellation_maps.h - ITU V.17 and V.32bis modems 00005 * transmit part. 00006 * Constellation mapping. 00007 * 00008 * Written by Steve Underwood <steveu@coppice.org> 00009 * 00010 * Copyright (C) 2004 Steve Underwood 00011 * 00012 * All rights reserved. 00013 * 00014 * This program is free software; you can redistribute it and/or modify 00015 * it under the terms of the GNU Lesser General Public License version 2.1, 00016 * as published by the Free Software Foundation. 00017 * 00018 * This program is distributed in the hope that it will be useful, 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 * GNU Lesser General Public License for more details. 00022 * 00023 * You should have received a copy of the GNU Lesser General Public 00024 * License along with this program; if not, write to the Free Software 00025 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00026 * 00027 * $Id: v17_v32bis_tx_constellation_maps.h,v 1.1.4.1 2009/12/24 16:52:30 steveu Exp $ 00028 */ 00029 00030 #if defined(SPANDSP_USE_FIXED_POINTx) 00031 static const complexi16_t v17_v32bis_14400_constellation[128] = 00032 #else 00033 static const complexf_t v17_v32bis_14400_constellation[128] = 00034 #endif 00035 { 00036 {-8, -3}, /* 0x00 */ 00037 { 9, 2}, /* 0x01 */ 00038 { 2, -9}, /* 0x02 */ 00039 {-3, 8}, /* 0x03 */ 00040 { 8, 3}, /* 0x04 */ 00041 {-9, -2}, /* 0x05 */ 00042 {-2, 9}, /* 0x06 */ 00043 { 3, -8}, /* 0x07 */ 00044 {-8, 1}, /* 0x08 */ 00045 { 9, -2}, /* 0x09 */ 00046 {-2, -9}, /* 0x0A */ 00047 { 1, 8}, /* 0x0B */ 00048 { 8, -1}, /* 0x0C */ 00049 {-9, 2}, /* 0x0D */ 00050 { 2, 9}, /* 0x0E */ 00051 {-1, -8}, /* 0x0F */ 00052 {-4, -3}, /* 0x10 */ 00053 { 5, 2}, /* 0x11 */ 00054 { 2, -5}, /* 0x12 */ 00055 {-3, 4}, /* 0x13 */ 00056 { 4, 3}, /* 0x14 */ 00057 {-5, -2}, /* 0x15 */ 00058 {-2, 5}, /* 0x16 */ 00059 { 3, -4}, /* 0x17 */ 00060 {-4, 1}, /* 0x18 */ 00061 { 5, -2}, /* 0x19 */ 00062 {-2, -5}, /* 0x1A */ 00063 { 1, 4}, /* 0x1B */ 00064 { 4, -1}, /* 0x1C */ 00065 {-5, 2}, /* 0x1D */ 00066 { 2, 5}, /* 0x1E */ 00067 {-1, -4}, /* 0x1F */ 00068 { 4, -3}, /* 0x20 */ 00069 {-3, 2}, /* 0x21 */ 00070 { 2, 3}, /* 0x22 */ 00071 {-3, -4}, /* 0x23 */ 00072 {-4, 3}, /* 0x24 */ 00073 { 3, -2}, /* 0x25 */ 00074 {-2, -3}, /* 0x26 */ 00075 { 3, 4}, /* 0x27 */ 00076 { 4, 1}, /* 0x28 */ 00077 {-3, -2}, /* 0x29 */ 00078 {-2, 3}, /* 0x2A */ 00079 { 1, -4}, /* 0x2B */ 00080 {-4, -1}, /* 0x2C */ 00081 { 3, 2}, /* 0x2D */ 00082 { 2, -3}, /* 0x2E */ 00083 {-1, 4}, /* 0x2F */ 00084 { 0, -3}, /* 0x30 */ 00085 { 1, 2}, /* 0x31 */ 00086 { 2, -1}, /* 0x32 */ 00087 {-3, 0}, /* 0x33 */ 00088 { 0, 3}, /* 0x34 */ 00089 {-1, -2}, /* 0x35 */ 00090 {-2, 1}, /* 0x36 */ 00091 { 3, 0}, /* 0x37 */ 00092 { 0, 1}, /* 0x38 */ 00093 { 1, -2}, /* 0x39 */ 00094 {-2, -1}, /* 0x3A */ 00095 { 1, 0}, /* 0x3B */ 00096 { 0, -1}, /* 0x3C */ 00097 {-1, 2}, /* 0x3D */ 00098 { 2, 1}, /* 0x3E */ 00099 {-1, 0}, /* 0x3F */ 00100 { 8, -3}, /* 0x40 */ 00101 {-7, 2}, /* 0x41 */ 00102 { 2, 7}, /* 0x42 */ 00103 {-3, -8}, /* 0x43 */ 00104 {-8, 3}, /* 0x44 */ 00105 { 7, -2}, /* 0x45 */ 00106 {-2, -7}, /* 0x46 */ 00107 { 3, 8}, /* 0x47 */ 00108 { 8, 1}, /* 0x48 */ 00109 {-7, -2}, /* 0x49 */ 00110 {-2, 7}, /* 0x4A */ 00111 { 1, -8}, /* 0x4B */ 00112 {-8, -1}, /* 0x4C */ 00113 { 7, 2}, /* 0x4D */ 00114 { 2, -7}, /* 0x4E */ 00115 {-1, 8}, /* 0x4F */ 00116 {-4, -7}, /* 0x50 */ 00117 { 5, 6}, /* 0x51 */ 00118 { 6, -5}, /* 0x52 */ 00119 {-7, 4}, /* 0x53 */ 00120 { 4, 7}, /* 0x54 */ 00121 {-5, -6}, /* 0x55 */ 00122 {-6, 5}, /* 0x56 */ 00123 { 7, -4}, /* 0x57 */ 00124 {-4, 5}, /* 0x58 */ 00125 { 5, -6}, /* 0x59 */ 00126 {-6, -5}, /* 0x5A */ 00127 { 5, 4}, /* 0x5B */ 00128 { 4, -5}, /* 0x5C */ 00129 {-5, 6}, /* 0x5D */ 00130 { 6, 5}, /* 0x5E */ 00131 {-5, -4}, /* 0x5F */ 00132 { 4, -7}, /* 0x60 */ 00133 {-3, 6}, /* 0x61 */ 00134 { 6, 3}, /* 0x62 */ 00135 {-7, -4}, /* 0x63 */ 00136 {-4, 7}, /* 0x64 */ 00137 { 3, -6}, /* 0x65 */ 00138 {-6, -3}, /* 0x66 */ 00139 { 7, 4}, /* 0x67 */ 00140 { 4, 5}, /* 0x68 */ 00141 {-3, -6}, /* 0x69 */ 00142 {-6, 3}, /* 0x6A */ 00143 { 5, -4}, /* 0x6B */ 00144 {-4, -5}, /* 0x6C */ 00145 { 3, 6}, /* 0x6D */ 00146 { 6, -3}, /* 0x6E */ 00147 {-5, 4}, /* 0x6F */ 00148 { 0, -7}, /* 0x70 */ 00149 { 1, 6}, /* 0x71 */ 00150 { 6, -1}, /* 0x72 */ 00151 {-7, 0}, /* 0x73 */ 00152 { 0, 7}, /* 0x74 */ 00153 {-1, -6}, /* 0x75 */ 00154 {-6, 1}, /* 0x76 */ 00155 { 7, 0}, /* 0x77 */ 00156 { 0, 5}, /* 0x78 */ 00157 { 1, -6}, /* 0x79 */ 00158 {-6, -1}, /* 0x7A */ 00159 { 5, 0}, /* 0x7B */ 00160 { 0, -5}, /* 0x7C */ 00161 {-1, 6}, /* 0x7D */ 00162 { 6, 1}, /* 0x7E */ 00163 {-5, 0} /* 0x7F */ 00164 }; 00165 00166 #if defined(SPANDSP_USE_FIXED_POINTx) 00167 static const complexi16_t v17_v32bis_12000_constellation[64] = 00168 #else 00169 static const complexf_t v17_v32bis_12000_constellation[64] = 00170 #endif 00171 { 00172 { 7, 1}, /* 0x00 */ 00173 {-5, -1}, /* 0x01 */ 00174 {-1, 5}, /* 0x02 */ 00175 { 1, -7}, /* 0x03 */ 00176 {-7, -1}, /* 0x04 */ 00177 { 5, 1}, /* 0x05 */ 00178 { 1, -5}, /* 0x06 */ 00179 {-1, 7}, /* 0x07 */ 00180 { 3, -3}, /* 0x08 */ 00181 {-1, 3}, /* 0x09 */ 00182 { 3, 1}, /* 0x0A */ 00183 {-3, -3}, /* 0x0B */ 00184 {-3, 3}, /* 0x0C */ 00185 { 1, -3}, /* 0x0D */ 00186 {-3, -1}, /* 0x0E */ 00187 { 3, 3}, /* 0x0F */ 00188 { 7, -7}, /* 0x10 */ 00189 {-5, 7}, /* 0x11 */ 00190 { 7, 5}, /* 0x12 */ 00191 {-7, -7}, /* 0x13 */ 00192 {-7, 7}, /* 0x14 */ 00193 { 5, -7}, /* 0x15 */ 00194 {-7, -5}, /* 0x16 */ 00195 { 7, 7}, /* 0x17 */ 00196 {-1, -7}, /* 0x18 */ 00197 { 3, 7}, /* 0x19 */ 00198 { 7, -3}, /* 0x1A */ 00199 {-7, 1}, /* 0x1B */ 00200 { 1, 7}, /* 0x1C */ 00201 {-3, -7}, /* 0x1D */ 00202 {-7, 3}, /* 0x1E */ 00203 { 7, -1}, /* 0x1F */ 00204 { 3, 5}, /* 0x20 */ 00205 {-1, -5}, /* 0x21 */ 00206 {-5, 1}, /* 0x22 */ 00207 { 5, -3}, /* 0x23 */ 00208 {-3, -5}, /* 0x24 */ 00209 { 1, 5}, /* 0x25 */ 00210 { 5, -1}, /* 0x26 */ 00211 {-5, 3}, /* 0x27 */ 00212 {-1, 1}, /* 0x28 */ 00213 { 3, -1}, /* 0x29 */ 00214 {-1, -3}, /* 0x2A */ 00215 { 1, 1}, /* 0x2B */ 00216 { 1, -1}, /* 0x2C */ 00217 {-3, 1}, /* 0x2D */ 00218 { 1, 3}, /* 0x2E */ 00219 {-1, -1}, /* 0x2F */ 00220 {-5, 5}, /* 0x30 */ 00221 { 7, -5}, /* 0x31 */ 00222 {-5, -7}, /* 0x32 */ 00223 { 5, 5}, /* 0x33 */ 00224 { 5, -5}, /* 0x34 */ 00225 {-7, 5}, /* 0x35 */ 00226 { 5, 7}, /* 0x36 */ 00227 {-5, -5}, /* 0x37 */ 00228 {-5, -3}, /* 0x38 */ 00229 { 7, 3}, /* 0x39 */ 00230 { 3, -7}, /* 0x3A */ 00231 {-3, 5}, /* 0x3B */ 00232 { 5, 3}, /* 0x3C */ 00233 {-7, -3}, /* 0x3D */ 00234 {-3, 7}, /* 0x3E */ 00235 { 3, -5} /* 0x3F */ 00236 }; 00237 00238 #if defined(SPANDSP_USE_FIXED_POINTx) 00239 static const complexi16_t v17_v32bis_9600_constellation[32] = 00240 #else 00241 static const complexf_t v17_v32bis_9600_constellation[32] = 00242 #endif 00243 { 00244 {-8, 2}, /* 0x00 */ 00245 {-6, -4}, /* 0x01 */ 00246 {-4, 6}, /* 0x02 */ 00247 { 2, 8}, /* 0x03 */ 00248 { 8, -2}, /* 0x04 */ 00249 { 6, 4}, /* 0x05 */ 00250 { 4, -6}, /* 0x06 */ 00251 {-2, -8}, /* 0x07 */ 00252 { 0, 2}, /* 0x08 */ 00253 {-6, 4}, /* 0x09 */ 00254 { 4, 6}, /* 0x0A */ 00255 { 2, 0}, /* 0x0B */ 00256 { 0, -2}, /* 0x0C */ 00257 { 6, -4}, /* 0x0D */ 00258 {-4, -6}, /* 0x0E */ 00259 {-2, 0}, /* 0x0F */ 00260 { 0, -6}, /* 0x10 */ 00261 { 2, -4}, /* 0x11 */ 00262 {-4, -2}, /* 0x12 */ 00263 {-6, 0}, /* 0x13 */ 00264 { 0, 6}, /* 0x14 */ 00265 {-2, 4}, /* 0x15 */ 00266 { 4, 2}, /* 0x16 */ 00267 { 6, 0}, /* 0x17 */ 00268 { 8, 2}, /* 0x18 */ 00269 { 2, 4}, /* 0x19 */ 00270 { 4, -2}, /* 0x1A */ 00271 { 2, -8}, /* 0x1B */ 00272 {-8, -2}, /* 0x1C */ 00273 {-2, -4}, /* 0x1D */ 00274 {-4, 2}, /* 0x1E */ 00275 {-2, 8} /* 0x1F */ 00276 }; 00277 00278 #if defined(SPANDSP_USE_FIXED_POINTx) 00279 static const complexi16_t v17_v32bis_7200_constellation[16] = 00280 #else 00281 static const complexf_t v17_v32bis_7200_constellation[16] = 00282 #endif 00283 { 00284 { 6, -6}, /* 0x00 */ 00285 {-2, 6}, /* 0x01 */ 00286 { 6, 2}, /* 0x02 */ 00287 {-6, -6}, /* 0x03 */ 00288 {-6, 6}, /* 0x04 */ 00289 { 2, -6}, /* 0x05 */ 00290 {-6, -2}, /* 0x06 */ 00291 { 6, 6}, /* 0x07 */ 00292 {-2, 2}, /* 0x08 */ 00293 { 6, -2}, /* 0x09 */ 00294 {-2, -6}, /* 0x0A */ 00295 { 2, 2}, /* 0x0B */ 00296 { 2, -2}, /* 0x0C */ 00297 {-6, 2}, /* 0x0D */ 00298 { 2, 6}, /* 0x0E */ 00299 {-2, -2} /* 0x0F */ 00300 }; 00301 00302 /* This one does not exist in V.17 as a data constellation. It is only 00303 the equaliser training constellation. In V.32/V.32bis it is a data mode. */ 00304 #if defined(SPANDSP_USE_FIXED_POINTx) 00305 static const complexi16_t v17_v32bis_4800_constellation[4] = 00306 #else 00307 static const complexf_t v17_v32bis_4800_constellation[4] = 00308 #endif 00309 { 00310 {-6, -2}, /* 0x00 */ 00311 {-2, 6}, /* 0x01 */ 00312 { 2, -6}, /* 0x02 */ 00313 { 6, 2} /* 0x03 */ 00314 }; 00315 00316 #if defined(SPANDSP_USE_FIXED_POINTx) 00317 static const complexi16_t v17_v32bis_abcd_constellation[4] = 00318 #else 00319 static const complexf_t v17_v32bis_abcd_constellation[4] = 00320 #endif 00321 { 00322 {-6, -2}, /* A */ 00323 { 2, -6}, /* B */ 00324 { 6, 2}, /* C */ 00325 {-2, 6} /* D */ 00326 }; 00327 00328 /*- End of file ------------------------------------------------------------*/