v17tx_constellation_maps.h

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

Generated on Tue Oct 7 20:25:50 2008 for spandsp by  doxygen 1.5.6