1 /* 2 * SpanDSP - a series of DSP components for telephony 3 * 4 * v29tx_constellation_maps.h - ITU V.29 modem transmit part. 5 * Constellation mapping. 6 * 7 * Written by Steve Underwood <steveu@coppice.org> 8 * 9 * Copyright (C) 2008, 2012 Steve Underwood 10 * 11 * All rights reserved. 12 * 13 * This program is free software; you can redistribute it and/or modify 14 * it under the terms of the GNU Lesser General Public License version 2.1, 15 * as published by the Free Software Foundation. 16 * 17 * This program is distributed in the hope that it will be useful, 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 * GNU Lesser General Public License for more details. 21 * 22 * You should have received a copy of the GNU Lesser General Public 23 * License along with this program; if not, write to the Free Software 24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 25 */ 26 27 #if defined(SPANDSP_USE_FIXED_POINT) 28 static const complexi16_t v29_abab_constellation[6] = 29 #else 30 static const complexf_t v29_abab_constellation[6] = 31 #endif 32 { 33 {FP_CONSTELLATION_SCALE( 3.0f), FP_CONSTELLATION_SCALE(-3.0f)}, /* 315deg high 9600 */ 34 {FP_CONSTELLATION_SCALE(-3.0f), FP_CONSTELLATION_SCALE( 0.0f)}, /* 180deg low */ 35 {FP_CONSTELLATION_SCALE( 1.0f), FP_CONSTELLATION_SCALE(-1.0f)}, /* 315deg low 7200 */ 36 {FP_CONSTELLATION_SCALE(-3.0f), FP_CONSTELLATION_SCALE( 0.0f)}, /* 180deg low */ 37 {FP_CONSTELLATION_SCALE( 0.0f), FP_CONSTELLATION_SCALE(-3.0f)}, /* 270deg low 4800 */ 38 {FP_CONSTELLATION_SCALE(-3.0f), FP_CONSTELLATION_SCALE( 0.0f)} /* 180deg low */ 39 }; 40 41 #if defined(SPANDSP_USE_FIXED_POINT) 42 static const complexi16_t v29_cdcd_constellation[6] = 43 #else 44 static const complexf_t v29_cdcd_constellation[6] = 45 #endif 46 { 47 {FP_CONSTELLATION_SCALE( 3.0f), FP_CONSTELLATION_SCALE( 0.0f)}, /* 0deg low 9600 */ 48 {FP_CONSTELLATION_SCALE(-3.0f), FP_CONSTELLATION_SCALE( 3.0f)}, /* 135deg high */ 49 {FP_CONSTELLATION_SCALE( 3.0f), FP_CONSTELLATION_SCALE( 0.0f)}, /* 0deg low 7200 */ 50 {FP_CONSTELLATION_SCALE(-1.0f), FP_CONSTELLATION_SCALE( 1.0f)}, /* 135deg low */ 51 {FP_CONSTELLATION_SCALE( 3.0f), FP_CONSTELLATION_SCALE( 0.0f)}, /* 0deg low 4800 */ 52 {FP_CONSTELLATION_SCALE( 0.0f), FP_CONSTELLATION_SCALE( 3.0f)} /* 90deg low */ 53 }; 54 55 #if defined(SPANDSP_USE_FIXED_POINT) 56 static const complexi16_t v29_9600_constellation[16] = 57 #else 58 static const complexf_t v29_9600_constellation[16] = 59 #endif 60 { 61 {FP_CONSTELLATION_SCALE( 3.0f), FP_CONSTELLATION_SCALE( 0.0f)}, /* 0deg low */ 62 {FP_CONSTELLATION_SCALE( 1.0f), FP_CONSTELLATION_SCALE( 1.0f)}, /* 45deg low */ 63 {FP_CONSTELLATION_SCALE( 0.0f), FP_CONSTELLATION_SCALE( 3.0f)}, /* 90deg low */ 64 {FP_CONSTELLATION_SCALE(-1.0f), FP_CONSTELLATION_SCALE( 1.0f)}, /* 135deg low */ 65 {FP_CONSTELLATION_SCALE(-3.0f), FP_CONSTELLATION_SCALE( 0.0f)}, /* 180deg low */ 66 {FP_CONSTELLATION_SCALE(-1.0f), FP_CONSTELLATION_SCALE(-1.0f)}, /* 225deg low */ 67 {FP_CONSTELLATION_SCALE( 0.0f), FP_CONSTELLATION_SCALE(-3.0f)}, /* 270deg low */ 68 {FP_CONSTELLATION_SCALE( 1.0f), FP_CONSTELLATION_SCALE(-1.0f)}, /* 315deg low */ 69 {FP_CONSTELLATION_SCALE( 5.0f), FP_CONSTELLATION_SCALE( 0.0f)}, /* 0deg high */ 70 {FP_CONSTELLATION_SCALE( 3.0f), FP_CONSTELLATION_SCALE( 3.0f)}, /* 45deg high */ 71 {FP_CONSTELLATION_SCALE( 0.0f), FP_CONSTELLATION_SCALE( 5.0f)}, /* 90deg high */ 72 {FP_CONSTELLATION_SCALE(-3.0f), FP_CONSTELLATION_SCALE( 3.0f)}, /* 135deg high */ 73 {FP_CONSTELLATION_SCALE(-5.0f), FP_CONSTELLATION_SCALE( 0.0f)}, /* 180deg high */ 74 {FP_CONSTELLATION_SCALE(-3.0f), FP_CONSTELLATION_SCALE(-3.0f)}, /* 225deg high */ 75 {FP_CONSTELLATION_SCALE( 0.0f), FP_CONSTELLATION_SCALE(-5.0f)}, /* 270deg high */ 76 {FP_CONSTELLATION_SCALE( 3.0f), FP_CONSTELLATION_SCALE(-3.0f)} /* 315deg high */ 77 }; 78 79 /*- End of file ------------------------------------------------------------*/ 80