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 00028 #if defined(SPANDSP_USE_FIXED_POINTx) 00029 static const complexi16_t v17_v32bis_14400_constellation[128] = 00030 #else 00031 static const complexf_t v17_v32bis_14400_constellation[128] = 00032 #endif 00033 { 00034 {-8, -3}, /* 0x00 */ 00035 { 9, 2}, /* 0x01 */ 00036 { 2, -9}, /* 0x02 */ 00037 {-3, 8}, /* 0x03 */ 00038 { 8, 3}, /* 0x04 */ 00039 {-9, -2}, /* 0x05 */ 00040 {-2, 9}, /* 0x06 */ 00041 { 3, -8}, /* 0x07 */ 00042 {-8, 1}, /* 0x08 */ 00043 { 9, -2}, /* 0x09 */ 00044 {-2, -9}, /* 0x0A */ 00045 { 1, 8}, /* 0x0B */ 00046 { 8, -1}, /* 0x0C */ 00047 {-9, 2}, /* 0x0D */ 00048 { 2, 9}, /* 0x0E */ 00049 {-1, -8}, /* 0x0F */ 00050 {-4, -3}, /* 0x10 */ 00051 { 5, 2}, /* 0x11 */ 00052 { 2, -5}, /* 0x12 */ 00053 {-3, 4}, /* 0x13 */ 00054 { 4, 3}, /* 0x14 */ 00055 {-5, -2}, /* 0x15 */ 00056 {-2, 5}, /* 0x16 */ 00057 { 3, -4}, /* 0x17 */ 00058 {-4, 1}, /* 0x18 */ 00059 { 5, -2}, /* 0x19 */ 00060 {-2, -5}, /* 0x1A */ 00061 { 1, 4}, /* 0x1B */ 00062 { 4, -1}, /* 0x1C */ 00063 {-5, 2}, /* 0x1D */ 00064 { 2, 5}, /* 0x1E */ 00065 {-1, -4}, /* 0x1F */ 00066 { 4, -3}, /* 0x20 */ 00067 {-3, 2}, /* 0x21 */ 00068 { 2, 3}, /* 0x22 */ 00069 {-3, -4}, /* 0x23 */ 00070 {-4, 3}, /* 0x24 */ 00071 { 3, -2}, /* 0x25 */ 00072 {-2, -3}, /* 0x26 */ 00073 { 3, 4}, /* 0x27 */ 00074 { 4, 1}, /* 0x28 */ 00075 {-3, -2}, /* 0x29 */ 00076 {-2, 3}, /* 0x2A */ 00077 { 1, -4}, /* 0x2B */ 00078 {-4, -1}, /* 0x2C */ 00079 { 3, 2}, /* 0x2D */ 00080 { 2, -3}, /* 0x2E */ 00081 {-1, 4}, /* 0x2F */ 00082 { 0, -3}, /* 0x30 */ 00083 { 1, 2}, /* 0x31 */ 00084 { 2, -1}, /* 0x32 */ 00085 {-3, 0}, /* 0x33 */ 00086 { 0, 3}, /* 0x34 */ 00087 {-1, -2}, /* 0x35 */ 00088 {-2, 1}, /* 0x36 */ 00089 { 3, 0}, /* 0x37 */ 00090 { 0, 1}, /* 0x38 */ 00091 { 1, -2}, /* 0x39 */ 00092 {-2, -1}, /* 0x3A */ 00093 { 1, 0}, /* 0x3B */ 00094 { 0, -1}, /* 0x3C */ 00095 {-1, 2}, /* 0x3D */ 00096 { 2, 1}, /* 0x3E */ 00097 {-1, 0}, /* 0x3F */ 00098 { 8, -3}, /* 0x40 */ 00099 {-7, 2}, /* 0x41 */ 00100 { 2, 7}, /* 0x42 */ 00101 {-3, -8}, /* 0x43 */ 00102 {-8, 3}, /* 0x44 */ 00103 { 7, -2}, /* 0x45 */ 00104 {-2, -7}, /* 0x46 */ 00105 { 3, 8}, /* 0x47 */ 00106 { 8, 1}, /* 0x48 */ 00107 {-7, -2}, /* 0x49 */ 00108 {-2, 7}, /* 0x4A */ 00109 { 1, -8}, /* 0x4B */ 00110 {-8, -1}, /* 0x4C */ 00111 { 7, 2}, /* 0x4D */ 00112 { 2, -7}, /* 0x4E */ 00113 {-1, 8}, /* 0x4F */ 00114 {-4, -7}, /* 0x50 */ 00115 { 5, 6}, /* 0x51 */ 00116 { 6, -5}, /* 0x52 */ 00117 {-7, 4}, /* 0x53 */ 00118 { 4, 7}, /* 0x54 */ 00119 {-5, -6}, /* 0x55 */ 00120 {-6, 5}, /* 0x56 */ 00121 { 7, -4}, /* 0x57 */ 00122 {-4, 5}, /* 0x58 */ 00123 { 5, -6}, /* 0x59 */ 00124 {-6, -5}, /* 0x5A */ 00125 { 5, 4}, /* 0x5B */ 00126 { 4, -5}, /* 0x5C */ 00127 {-5, 6}, /* 0x5D */ 00128 { 6, 5}, /* 0x5E */ 00129 {-5, -4}, /* 0x5F */ 00130 { 4, -7}, /* 0x60 */ 00131 {-3, 6}, /* 0x61 */ 00132 { 6, 3}, /* 0x62 */ 00133 {-7, -4}, /* 0x63 */ 00134 {-4, 7}, /* 0x64 */ 00135 { 3, -6}, /* 0x65 */ 00136 {-6, -3}, /* 0x66 */ 00137 { 7, 4}, /* 0x67 */ 00138 { 4, 5}, /* 0x68 */ 00139 {-3, -6}, /* 0x69 */ 00140 {-6, 3}, /* 0x6A */ 00141 { 5, -4}, /* 0x6B */ 00142 {-4, -5}, /* 0x6C */ 00143 { 3, 6}, /* 0x6D */ 00144 { 6, -3}, /* 0x6E */ 00145 {-5, 4}, /* 0x6F */ 00146 { 0, -7}, /* 0x70 */ 00147 { 1, 6}, /* 0x71 */ 00148 { 6, -1}, /* 0x72 */ 00149 {-7, 0}, /* 0x73 */ 00150 { 0, 7}, /* 0x74 */ 00151 {-1, -6}, /* 0x75 */ 00152 {-6, 1}, /* 0x76 */ 00153 { 7, 0}, /* 0x77 */ 00154 { 0, 5}, /* 0x78 */ 00155 { 1, -6}, /* 0x79 */ 00156 {-6, -1}, /* 0x7A */ 00157 { 5, 0}, /* 0x7B */ 00158 { 0, -5}, /* 0x7C */ 00159 {-1, 6}, /* 0x7D */ 00160 { 6, 1}, /* 0x7E */ 00161 {-5, 0} /* 0x7F */ 00162 }; 00163 00164 #if defined(SPANDSP_USE_FIXED_POINTx) 00165 static const complexi16_t v17_v32bis_12000_constellation[64] = 00166 #else 00167 static const complexf_t v17_v32bis_12000_constellation[64] = 00168 #endif 00169 { 00170 { 7, 1}, /* 0x00 */ 00171 {-5, -1}, /* 0x01 */ 00172 {-1, 5}, /* 0x02 */ 00173 { 1, -7}, /* 0x03 */ 00174 {-7, -1}, /* 0x04 */ 00175 { 5, 1}, /* 0x05 */ 00176 { 1, -5}, /* 0x06 */ 00177 {-1, 7}, /* 0x07 */ 00178 { 3, -3}, /* 0x08 */ 00179 {-1, 3}, /* 0x09 */ 00180 { 3, 1}, /* 0x0A */ 00181 {-3, -3}, /* 0x0B */ 00182 {-3, 3}, /* 0x0C */ 00183 { 1, -3}, /* 0x0D */ 00184 {-3, -1}, /* 0x0E */ 00185 { 3, 3}, /* 0x0F */ 00186 { 7, -7}, /* 0x10 */ 00187 {-5, 7}, /* 0x11 */ 00188 { 7, 5}, /* 0x12 */ 00189 {-7, -7}, /* 0x13 */ 00190 {-7, 7}, /* 0x14 */ 00191 { 5, -7}, /* 0x15 */ 00192 {-7, -5}, /* 0x16 */ 00193 { 7, 7}, /* 0x17 */ 00194 {-1, -7}, /* 0x18 */ 00195 { 3, 7}, /* 0x19 */ 00196 { 7, -3}, /* 0x1A */ 00197 {-7, 1}, /* 0x1B */ 00198 { 1, 7}, /* 0x1C */ 00199 {-3, -7}, /* 0x1D */ 00200 {-7, 3}, /* 0x1E */ 00201 { 7, -1}, /* 0x1F */ 00202 { 3, 5}, /* 0x20 */ 00203 {-1, -5}, /* 0x21 */ 00204 {-5, 1}, /* 0x22 */ 00205 { 5, -3}, /* 0x23 */ 00206 {-3, -5}, /* 0x24 */ 00207 { 1, 5}, /* 0x25 */ 00208 { 5, -1}, /* 0x26 */ 00209 {-5, 3}, /* 0x27 */ 00210 {-1, 1}, /* 0x28 */ 00211 { 3, -1}, /* 0x29 */ 00212 {-1, -3}, /* 0x2A */ 00213 { 1, 1}, /* 0x2B */ 00214 { 1, -1}, /* 0x2C */ 00215 {-3, 1}, /* 0x2D */ 00216 { 1, 3}, /* 0x2E */ 00217 {-1, -1}, /* 0x2F */ 00218 {-5, 5}, /* 0x30 */ 00219 { 7, -5}, /* 0x31 */ 00220 {-5, -7}, /* 0x32 */ 00221 { 5, 5}, /* 0x33 */ 00222 { 5, -5}, /* 0x34 */ 00223 {-7, 5}, /* 0x35 */ 00224 { 5, 7}, /* 0x36 */ 00225 {-5, -5}, /* 0x37 */ 00226 {-5, -3}, /* 0x38 */ 00227 { 7, 3}, /* 0x39 */ 00228 { 3, -7}, /* 0x3A */ 00229 {-3, 5}, /* 0x3B */ 00230 { 5, 3}, /* 0x3C */ 00231 {-7, -3}, /* 0x3D */ 00232 {-3, 7}, /* 0x3E */ 00233 { 3, -5} /* 0x3F */ 00234 }; 00235 00236 #if defined(SPANDSP_USE_FIXED_POINTx) 00237 static const complexi16_t v17_v32bis_9600_constellation[32] = 00238 #else 00239 static const complexf_t v17_v32bis_9600_constellation[32] = 00240 #endif 00241 { 00242 {-8, 2}, /* 0x00 */ 00243 {-6, -4}, /* 0x01 */ 00244 {-4, 6}, /* 0x02 */ 00245 { 2, 8}, /* 0x03 */ 00246 { 8, -2}, /* 0x04 */ 00247 { 6, 4}, /* 0x05 */ 00248 { 4, -6}, /* 0x06 */ 00249 {-2, -8}, /* 0x07 */ 00250 { 0, 2}, /* 0x08 */ 00251 {-6, 4}, /* 0x09 */ 00252 { 4, 6}, /* 0x0A */ 00253 { 2, 0}, /* 0x0B */ 00254 { 0, -2}, /* 0x0C */ 00255 { 6, -4}, /* 0x0D */ 00256 {-4, -6}, /* 0x0E */ 00257 {-2, 0}, /* 0x0F */ 00258 { 0, -6}, /* 0x10 */ 00259 { 2, -4}, /* 0x11 */ 00260 {-4, -2}, /* 0x12 */ 00261 {-6, 0}, /* 0x13 */ 00262 { 0, 6}, /* 0x14 */ 00263 {-2, 4}, /* 0x15 */ 00264 { 4, 2}, /* 0x16 */ 00265 { 6, 0}, /* 0x17 */ 00266 { 8, 2}, /* 0x18 */ 00267 { 2, 4}, /* 0x19 */ 00268 { 4, -2}, /* 0x1A */ 00269 { 2, -8}, /* 0x1B */ 00270 {-8, -2}, /* 0x1C */ 00271 {-2, -4}, /* 0x1D */ 00272 {-4, 2}, /* 0x1E */ 00273 {-2, 8} /* 0x1F */ 00274 }; 00275 00276 #if defined(SPANDSP_USE_FIXED_POINTx) 00277 static const complexi16_t v17_v32bis_7200_constellation[16] = 00278 #else 00279 static const complexf_t v17_v32bis_7200_constellation[16] = 00280 #endif 00281 { 00282 { 6, -6}, /* 0x00 */ 00283 {-2, 6}, /* 0x01 */ 00284 { 6, 2}, /* 0x02 */ 00285 {-6, -6}, /* 0x03 */ 00286 {-6, 6}, /* 0x04 */ 00287 { 2, -6}, /* 0x05 */ 00288 {-6, -2}, /* 0x06 */ 00289 { 6, 6}, /* 0x07 */ 00290 {-2, 2}, /* 0x08 */ 00291 { 6, -2}, /* 0x09 */ 00292 {-2, -6}, /* 0x0A */ 00293 { 2, 2}, /* 0x0B */ 00294 { 2, -2}, /* 0x0C */ 00295 {-6, 2}, /* 0x0D */ 00296 { 2, 6}, /* 0x0E */ 00297 {-2, -2} /* 0x0F */ 00298 }; 00299 00300 /* This one does not exist in V.17 as a data constellation. It is only 00301 the equaliser training constellation. In V.32/V.32bis it is a data mode. */ 00302 #if defined(SPANDSP_USE_FIXED_POINTx) 00303 static const complexi16_t v17_v32bis_4800_constellation[4] = 00304 #else 00305 static const complexf_t v17_v32bis_4800_constellation[4] = 00306 #endif 00307 { 00308 {-6, -2}, /* 0x00 */ 00309 {-2, 6}, /* 0x01 */ 00310 { 2, -6}, /* 0x02 */ 00311 { 6, 2} /* 0x03 */ 00312 }; 00313 00314 #if defined(SPANDSP_USE_FIXED_POINTx) 00315 static const complexi16_t v17_v32bis_abcd_constellation[4] = 00316 #else 00317 static const complexf_t v17_v32bis_abcd_constellation[4] = 00318 #endif 00319 { 00320 {-6, -2}, /* A */ 00321 { 2, -6}, /* B */ 00322 { 6, 2}, /* C */ 00323 {-2, 6} /* D */ 00324 }; 00325 00326 /*- End of file ------------------------------------------------------------*/