From be6739e19856c0e84b7d973dc46c4f40cef3ecac Mon Sep 17 00:00:00 2001 From: Steve Underwood Date: Sat, 21 Jul 2012 21:46:07 +0800 Subject: [PATCH] Updates to spands test data --- libs/spandsp/spandsp/tones.dtd | 2 + libs/spandsp/spandsp/tsb85.xml | 150 +++--- .../src/v17_v32bis_tx_constellation_maps.h | 496 +++++++++--------- libs/spandsp/src/v29tx_constellation_maps.h | 64 ++- 4 files changed, 363 insertions(+), 349 deletions(-) diff --git a/libs/spandsp/spandsp/tones.dtd b/libs/spandsp/spandsp/tones.dtd index 6f0fe46ba6..023f8d0783 100644 --- a/libs/spandsp/spandsp/tones.dtd +++ b/libs/spandsp/spandsp/tones.dtd @@ -35,6 +35,7 @@ diff --git a/libs/spandsp/spandsp/tsb85.xml b/libs/spandsp/spandsp/tsb85.xml index cd0d5db807..af38a9a3fe 100644 --- a/libs/spandsp/spandsp/tsb85.xml +++ b/libs/spandsp/spandsp/tsb85.xml @@ -13,7 +13,7 @@ - @@ -1253,7 +1253,7 @@ - + @@ -1265,7 +1265,7 @@ - + @@ -1287,7 +1287,7 @@ - + @@ -1335,7 +1335,7 @@ - + @@ -1347,7 +1347,7 @@ - + @@ -1359,7 +1359,7 @@ - + @@ -1371,7 +1371,7 @@ - + @@ -1384,7 +1384,7 @@ - + @@ -1396,7 +1396,7 @@ - + @@ -1440,7 +1440,7 @@ - + @@ -1462,7 +1462,7 @@ - + @@ -1484,7 +1484,7 @@ - + @@ -1506,7 +1506,7 @@ - + @@ -1536,7 +1536,7 @@ - + @@ -1583,7 +1583,7 @@ - + @@ -1605,7 +1605,7 @@ - + @@ -1627,7 +1627,7 @@ - + @@ -1649,7 +1649,7 @@ - + @@ -1679,7 +1679,7 @@ - + @@ -1726,7 +1726,7 @@ - + @@ -1748,11 +1748,11 @@ - + - + @@ -1765,16 +1765,16 @@ - + - + - + @@ -1787,16 +1787,16 @@ - + - + - + @@ -1809,16 +1809,16 @@ - + - + - + @@ -1831,7 +1831,7 @@ - + @@ -1869,7 +1869,7 @@ - + @@ -1891,7 +1891,7 @@ - + @@ -1913,7 +1913,7 @@ - + @@ -1935,7 +1935,7 @@ - + @@ -1965,7 +1965,7 @@ - + @@ -2011,7 +2011,7 @@ - + @@ -2033,7 +2033,7 @@ - + @@ -2055,7 +2055,7 @@ - + @@ -2077,7 +2077,7 @@ - + @@ -2132,7 +2132,7 @@ - + @@ -2154,7 +2154,7 @@ - + @@ -2201,7 +2201,7 @@ - + @@ -2213,7 +2213,7 @@ - + @@ -4982,7 +4982,7 @@ - + @@ -4990,7 +4990,7 @@ - + @@ -4998,7 +4998,7 @@ - + @@ -5028,15 +5028,17 @@ - + + - + + - + @@ -5044,15 +5046,16 @@ - + + - + - + @@ -5060,15 +5063,16 @@ - + + - + - + @@ -5098,7 +5102,7 @@ - + @@ -5290,7 +5294,7 @@ - + @@ -5299,7 +5303,7 @@ - + @@ -5308,7 +5312,7 @@ - + @@ -5317,7 +5321,7 @@ - + @@ -5334,7 +5338,7 @@ - + @@ -5343,7 +5347,7 @@ - + @@ -5352,7 +5356,7 @@ - + @@ -5361,7 +5365,7 @@ - + @@ -5402,7 +5406,7 @@ - + @@ -5411,7 +5415,7 @@ - + @@ -5420,7 +5424,7 @@ - + @@ -5429,7 +5433,7 @@ - + @@ -5446,7 +5450,7 @@ - + @@ -5476,7 +5480,7 @@ - + diff --git a/libs/spandsp/src/v17_v32bis_tx_constellation_maps.h b/libs/spandsp/src/v17_v32bis_tx_constellation_maps.h index 4abe80d93d..8044ad1e32 100644 --- a/libs/spandsp/src/v17_v32bis_tx_constellation_maps.h +++ b/libs/spandsp/src/v17_v32bis_tx_constellation_maps.h @@ -31,134 +31,134 @@ static const complexi16_t v17_v32bis_14400_constellation[128] = static const complexf_t v17_v32bis_14400_constellation[128] = #endif { - {-8, -3}, /* 0x00 */ - { 9, 2}, /* 0x01 */ - { 2, -9}, /* 0x02 */ - {-3, 8}, /* 0x03 */ - { 8, 3}, /* 0x04 */ - {-9, -2}, /* 0x05 */ - {-2, 9}, /* 0x06 */ - { 3, -8}, /* 0x07 */ - {-8, 1}, /* 0x08 */ - { 9, -2}, /* 0x09 */ - {-2, -9}, /* 0x0A */ - { 1, 8}, /* 0x0B */ - { 8, -1}, /* 0x0C */ - {-9, 2}, /* 0x0D */ - { 2, 9}, /* 0x0E */ - {-1, -8}, /* 0x0F */ - {-4, -3}, /* 0x10 */ - { 5, 2}, /* 0x11 */ - { 2, -5}, /* 0x12 */ - {-3, 4}, /* 0x13 */ - { 4, 3}, /* 0x14 */ - {-5, -2}, /* 0x15 */ - {-2, 5}, /* 0x16 */ - { 3, -4}, /* 0x17 */ - {-4, 1}, /* 0x18 */ - { 5, -2}, /* 0x19 */ - {-2, -5}, /* 0x1A */ - { 1, 4}, /* 0x1B */ - { 4, -1}, /* 0x1C */ - {-5, 2}, /* 0x1D */ - { 2, 5}, /* 0x1E */ - {-1, -4}, /* 0x1F */ - { 4, -3}, /* 0x20 */ - {-3, 2}, /* 0x21 */ - { 2, 3}, /* 0x22 */ - {-3, -4}, /* 0x23 */ - {-4, 3}, /* 0x24 */ - { 3, -2}, /* 0x25 */ - {-2, -3}, /* 0x26 */ - { 3, 4}, /* 0x27 */ - { 4, 1}, /* 0x28 */ - {-3, -2}, /* 0x29 */ - {-2, 3}, /* 0x2A */ - { 1, -4}, /* 0x2B */ - {-4, -1}, /* 0x2C */ - { 3, 2}, /* 0x2D */ - { 2, -3}, /* 0x2E */ - {-1, 4}, /* 0x2F */ - { 0, -3}, /* 0x30 */ - { 1, 2}, /* 0x31 */ - { 2, -1}, /* 0x32 */ - {-3, 0}, /* 0x33 */ - { 0, 3}, /* 0x34 */ - {-1, -2}, /* 0x35 */ - {-2, 1}, /* 0x36 */ - { 3, 0}, /* 0x37 */ - { 0, 1}, /* 0x38 */ - { 1, -2}, /* 0x39 */ - {-2, -1}, /* 0x3A */ - { 1, 0}, /* 0x3B */ - { 0, -1}, /* 0x3C */ - {-1, 2}, /* 0x3D */ - { 2, 1}, /* 0x3E */ - {-1, 0}, /* 0x3F */ - { 8, -3}, /* 0x40 */ - {-7, 2}, /* 0x41 */ - { 2, 7}, /* 0x42 */ - {-3, -8}, /* 0x43 */ - {-8, 3}, /* 0x44 */ - { 7, -2}, /* 0x45 */ - {-2, -7}, /* 0x46 */ - { 3, 8}, /* 0x47 */ - { 8, 1}, /* 0x48 */ - {-7, -2}, /* 0x49 */ - {-2, 7}, /* 0x4A */ - { 1, -8}, /* 0x4B */ - {-8, -1}, /* 0x4C */ - { 7, 2}, /* 0x4D */ - { 2, -7}, /* 0x4E */ - {-1, 8}, /* 0x4F */ - {-4, -7}, /* 0x50 */ - { 5, 6}, /* 0x51 */ - { 6, -5}, /* 0x52 */ - {-7, 4}, /* 0x53 */ - { 4, 7}, /* 0x54 */ - {-5, -6}, /* 0x55 */ - {-6, 5}, /* 0x56 */ - { 7, -4}, /* 0x57 */ - {-4, 5}, /* 0x58 */ - { 5, -6}, /* 0x59 */ - {-6, -5}, /* 0x5A */ - { 5, 4}, /* 0x5B */ - { 4, -5}, /* 0x5C */ - {-5, 6}, /* 0x5D */ - { 6, 5}, /* 0x5E */ - {-5, -4}, /* 0x5F */ - { 4, -7}, /* 0x60 */ - {-3, 6}, /* 0x61 */ - { 6, 3}, /* 0x62 */ - {-7, -4}, /* 0x63 */ - {-4, 7}, /* 0x64 */ - { 3, -6}, /* 0x65 */ - {-6, -3}, /* 0x66 */ - { 7, 4}, /* 0x67 */ - { 4, 5}, /* 0x68 */ - {-3, -6}, /* 0x69 */ - {-6, 3}, /* 0x6A */ - { 5, -4}, /* 0x6B */ - {-4, -5}, /* 0x6C */ - { 3, 6}, /* 0x6D */ - { 6, -3}, /* 0x6E */ - {-5, 4}, /* 0x6F */ - { 0, -7}, /* 0x70 */ - { 1, 6}, /* 0x71 */ - { 6, -1}, /* 0x72 */ - {-7, 0}, /* 0x73 */ - { 0, 7}, /* 0x74 */ - {-1, -6}, /* 0x75 */ - {-6, 1}, /* 0x76 */ - { 7, 0}, /* 0x77 */ - { 0, 5}, /* 0x78 */ - { 1, -6}, /* 0x79 */ - {-6, -1}, /* 0x7A */ - { 5, 0}, /* 0x7B */ - { 0, -5}, /* 0x7C */ - {-1, 6}, /* 0x7D */ - { 6, 1}, /* 0x7E */ - {-5, 0} /* 0x7F */ + {FP_SCALE(-8.0f), FP_SCALE(-3.0f)}, /* 0x00 */ + {FP_SCALE( 9.0f), FP_SCALE( 2.0f)}, /* 0x01 */ + {FP_SCALE( 2.0f), FP_SCALE(-9.0f)}, /* 0x02 */ + {FP_SCALE(-3.0f), FP_SCALE( 8.0f)}, /* 0x03 */ + {FP_SCALE( 8.0f), FP_SCALE( 3.0f)}, /* 0x04 */ + {FP_SCALE(-9.0f), FP_SCALE(-2.0f)}, /* 0x05 */ + {FP_SCALE(-2.0f), FP_SCALE( 9.0f)}, /* 0x06 */ + {FP_SCALE( 3.0f), FP_SCALE(-8.0f)}, /* 0x07 */ + {FP_SCALE(-8.0f), FP_SCALE( 1.0f)}, /* 0x08 */ + {FP_SCALE( 9.0f), FP_SCALE(-2.0f)}, /* 0x09 */ + {FP_SCALE(-2.0f), FP_SCALE(-9.0f)}, /* 0x0A */ + {FP_SCALE( 1.0f), FP_SCALE( 8.0f)}, /* 0x0B */ + {FP_SCALE( 8.0f), FP_SCALE(-1.0f)}, /* 0x0C */ + {FP_SCALE(-9.0f), FP_SCALE( 2.0f)}, /* 0x0D */ + {FP_SCALE( 2.0f), FP_SCALE( 9.0f)}, /* 0x0E */ + {FP_SCALE(-1.0f), FP_SCALE(-8.0f)}, /* 0x0F */ + {FP_SCALE(-4.0f), FP_SCALE(-3.0f)}, /* 0x10 */ + {FP_SCALE( 5.0f), FP_SCALE( 2.0f)}, /* 0x11 */ + {FP_SCALE( 2.0f), FP_SCALE(-5.0f)}, /* 0x12 */ + {FP_SCALE(-3.0f), FP_SCALE( 4.0f)}, /* 0x13 */ + {FP_SCALE( 4.0f), FP_SCALE( 3.0f)}, /* 0x14 */ + {FP_SCALE(-5.0f), FP_SCALE(-2.0f)}, /* 0x15 */ + {FP_SCALE(-2.0f), FP_SCALE( 5.0f)}, /* 0x16 */ + {FP_SCALE( 3.0f), FP_SCALE(-4.0f)}, /* 0x17 */ + {FP_SCALE(-4.0f), FP_SCALE( 1.0f)}, /* 0x18 */ + {FP_SCALE( 5.0f), FP_SCALE(-2.0f)}, /* 0x19 */ + {FP_SCALE(-2.0f), FP_SCALE(-5.0f)}, /* 0x1A */ + {FP_SCALE( 1.0f), FP_SCALE( 4.0f)}, /* 0x1B */ + {FP_SCALE( 4.0f), FP_SCALE(-1.0f)}, /* 0x1C */ + {FP_SCALE(-5.0f), FP_SCALE( 2.0f)}, /* 0x1D */ + {FP_SCALE( 2.0f), FP_SCALE( 5.0f)}, /* 0x1E */ + {FP_SCALE(-1.0f), FP_SCALE(-4.0f)}, /* 0x1F */ + {FP_SCALE( 4.0f), FP_SCALE(-3.0f)}, /* 0x20 */ + {FP_SCALE(-3.0f), FP_SCALE( 2.0f)}, /* 0x21 */ + {FP_SCALE( 2.0f), FP_SCALE( 3.0f)}, /* 0x22 */ + {FP_SCALE(-3.0f), FP_SCALE(-4.0f)}, /* 0x23 */ + {FP_SCALE(-4.0f), FP_SCALE( 3.0f)}, /* 0x24 */ + {FP_SCALE( 3.0f), FP_SCALE(-2.0f)}, /* 0x25 */ + {FP_SCALE(-2.0f), FP_SCALE(-3.0f)}, /* 0x26 */ + {FP_SCALE( 3.0f), FP_SCALE( 4.0f)}, /* 0x27 */ + {FP_SCALE( 4.0f), FP_SCALE( 1.0f)}, /* 0x28 */ + {FP_SCALE(-3.0f), FP_SCALE(-2.0f)}, /* 0x29 */ + {FP_SCALE(-2.0f), FP_SCALE( 3.0f)}, /* 0x2A */ + {FP_SCALE( 1.0f), FP_SCALE(-4.0f)}, /* 0x2B */ + {FP_SCALE(-4.0f), FP_SCALE(-1.0f)}, /* 0x2C */ + {FP_SCALE( 3.0f), FP_SCALE( 2.0f)}, /* 0x2D */ + {FP_SCALE( 2.0f), FP_SCALE(-3.0f)}, /* 0x2E */ + {FP_SCALE(-1.0f), FP_SCALE( 4.0f)}, /* 0x2F */ + {FP_SCALE( 0.0f), FP_SCALE(-3.0f)}, /* 0x30 */ + {FP_SCALE( 1.0f), FP_SCALE( 2.0f)}, /* 0x31 */ + {FP_SCALE( 2.0f), FP_SCALE(-1.0f)}, /* 0x32 */ + {FP_SCALE(-3.0f), FP_SCALE( 0.0f)}, /* 0x33 */ + {FP_SCALE( 0.0f), FP_SCALE( 3.0f)}, /* 0x34 */ + {FP_SCALE(-1.0f), FP_SCALE(-2.0f)}, /* 0x35 */ + {FP_SCALE(-2.0f), FP_SCALE( 1.0f)}, /* 0x36 */ + {FP_SCALE( 3.0f), FP_SCALE( 0.0f)}, /* 0x37 */ + {FP_SCALE( 0.0f), FP_SCALE( 1.0f)}, /* 0x38 */ + {FP_SCALE( 1.0f), FP_SCALE(-2.0f)}, /* 0x39 */ + {FP_SCALE(-2.0f), FP_SCALE(-1.0f)}, /* 0x3A */ + {FP_SCALE( 1.0f), FP_SCALE( 0.0f)}, /* 0x3B */ + {FP_SCALE( 0.0f), FP_SCALE(-1.0f)}, /* 0x3C */ + {FP_SCALE(-1.0f), FP_SCALE( 2.0f)}, /* 0x3D */ + {FP_SCALE( 2.0f), FP_SCALE( 1.0f)}, /* 0x3E */ + {FP_SCALE(-1.0f), FP_SCALE( 0.0f)}, /* 0x3F */ + {FP_SCALE( 8.0f), FP_SCALE(-3.0f)}, /* 0x40 */ + {FP_SCALE(-7.0f), FP_SCALE( 2.0f)}, /* 0x41 */ + {FP_SCALE( 2.0f), FP_SCALE( 7.0f)}, /* 0x42 */ + {FP_SCALE(-3.0f), FP_SCALE(-8.0f)}, /* 0x43 */ + {FP_SCALE(-8.0f), FP_SCALE( 3.0f)}, /* 0x44 */ + {FP_SCALE( 7.0f), FP_SCALE(-2.0f)}, /* 0x45 */ + {FP_SCALE(-2.0f), FP_SCALE(-7.0f)}, /* 0x46 */ + {FP_SCALE( 3.0f), FP_SCALE( 8.0f)}, /* 0x47 */ + {FP_SCALE( 8.0f), FP_SCALE( 1.0f)}, /* 0x48 */ + {FP_SCALE(-7.0f), FP_SCALE(-2.0f)}, /* 0x49 */ + {FP_SCALE(-2.0f), FP_SCALE( 7.0f)}, /* 0x4A */ + {FP_SCALE( 1.0f), FP_SCALE(-8.0f)}, /* 0x4B */ + {FP_SCALE(-8.0f), FP_SCALE(-1.0f)}, /* 0x4C */ + {FP_SCALE( 7.0f), FP_SCALE( 2.0f)}, /* 0x4D */ + {FP_SCALE( 2.0f), FP_SCALE(-7.0f)}, /* 0x4E */ + {FP_SCALE(-1.0f), FP_SCALE( 8.0f)}, /* 0x4F */ + {FP_SCALE(-4.0f), FP_SCALE(-7.0f)}, /* 0x50 */ + {FP_SCALE( 5.0f), FP_SCALE( 6.0f)}, /* 0x51 */ + {FP_SCALE( 6.0f), FP_SCALE(-5.0f)}, /* 0x52 */ + {FP_SCALE(-7.0f), FP_SCALE( 4.0f)}, /* 0x53 */ + {FP_SCALE( 4.0f), FP_SCALE( 7.0f)}, /* 0x54 */ + {FP_SCALE(-5.0f), FP_SCALE(-6.0f)}, /* 0x55 */ + {FP_SCALE(-6.0f), FP_SCALE( 5.0f)}, /* 0x56 */ + {FP_SCALE( 7.0f), FP_SCALE(-4.0f)}, /* 0x57 */ + {FP_SCALE(-4.0f), FP_SCALE( 5.0f)}, /* 0x58 */ + {FP_SCALE( 5.0f), FP_SCALE(-6.0f)}, /* 0x59 */ + {FP_SCALE(-6.0f), FP_SCALE(-5.0f)}, /* 0x5A */ + {FP_SCALE( 5.0f), FP_SCALE( 4.0f)}, /* 0x5B */ + {FP_SCALE( 4.0f), FP_SCALE(-5.0f)}, /* 0x5C */ + {FP_SCALE(-5.0f), FP_SCALE( 6.0f)}, /* 0x5D */ + {FP_SCALE( 6.0f), FP_SCALE( 5.0f)}, /* 0x5E */ + {FP_SCALE(-5.0f), FP_SCALE(-4.0f)}, /* 0x5F */ + {FP_SCALE( 4.0f), FP_SCALE(-7.0f)}, /* 0x60 */ + {FP_SCALE(-3.0f), FP_SCALE( 6.0f)}, /* 0x61 */ + {FP_SCALE( 6.0f), FP_SCALE( 3.0f)}, /* 0x62 */ + {FP_SCALE(-7.0f), FP_SCALE(-4.0f)}, /* 0x63 */ + {FP_SCALE(-4.0f), FP_SCALE( 7.0f)}, /* 0x64 */ + {FP_SCALE( 3.0f), FP_SCALE(-6.0f)}, /* 0x65 */ + {FP_SCALE(-6.0f), FP_SCALE(-3.0f)}, /* 0x66 */ + {FP_SCALE( 7.0f), FP_SCALE( 4.0f)}, /* 0x67 */ + {FP_SCALE( 4.0f), FP_SCALE( 5.0f)}, /* 0x68 */ + {FP_SCALE(-3.0f), FP_SCALE(-6.0f)}, /* 0x69 */ + {FP_SCALE(-6.0f), FP_SCALE( 3.0f)}, /* 0x6A */ + {FP_SCALE( 5.0f), FP_SCALE(-4.0f)}, /* 0x6B */ + {FP_SCALE(-4.0f), FP_SCALE(-5.0f)}, /* 0x6C */ + {FP_SCALE( 3.0f), FP_SCALE( 6.0f)}, /* 0x6D */ + {FP_SCALE( 6.0f), FP_SCALE(-3.0f)}, /* 0x6E */ + {FP_SCALE(-5.0f), FP_SCALE( 4.0f)}, /* 0x6F */ + {FP_SCALE( 0.0f), FP_SCALE(-7.0f)}, /* 0x70 */ + {FP_SCALE( 1.0f), FP_SCALE( 6.0f)}, /* 0x71 */ + {FP_SCALE( 6.0f), FP_SCALE(-1.0f)}, /* 0x72 */ + {FP_SCALE(-7.0f), FP_SCALE( 0.0f)}, /* 0x73 */ + {FP_SCALE( 0.0f), FP_SCALE( 7.0f)}, /* 0x74 */ + {FP_SCALE(-1.0f), FP_SCALE(-6.0f)}, /* 0x75 */ + {FP_SCALE(-6.0f), FP_SCALE( 1.0f)}, /* 0x76 */ + {FP_SCALE( 7.0f), FP_SCALE( 0.0f)}, /* 0x77 */ + {FP_SCALE( 0.0f), FP_SCALE( 5.0f)}, /* 0x78 */ + {FP_SCALE( 1.0f), FP_SCALE(-6.0f)}, /* 0x79 */ + {FP_SCALE(-6.0f), FP_SCALE(-1.0f)}, /* 0x7A */ + {FP_SCALE( 5.0f), FP_SCALE( 0.0f)}, /* 0x7B */ + {FP_SCALE( 0.0f), FP_SCALE(-5.0f)}, /* 0x7C */ + {FP_SCALE(-1.0f), FP_SCALE( 6.0f)}, /* 0x7D */ + {FP_SCALE( 6.0f), FP_SCALE( 1.0f)}, /* 0x7E */ + {FP_SCALE(-5.0f), FP_SCALE( 0.0f)} /* 0x7F */ }; #if defined(SPANDSP_USE_FIXED_POINTx) @@ -167,70 +167,70 @@ static const complexi16_t v17_v32bis_12000_constellation[64] = static const complexf_t v17_v32bis_12000_constellation[64] = #endif { - { 7, 1}, /* 0x00 */ - {-5, -1}, /* 0x01 */ - {-1, 5}, /* 0x02 */ - { 1, -7}, /* 0x03 */ - {-7, -1}, /* 0x04 */ - { 5, 1}, /* 0x05 */ - { 1, -5}, /* 0x06 */ - {-1, 7}, /* 0x07 */ - { 3, -3}, /* 0x08 */ - {-1, 3}, /* 0x09 */ - { 3, 1}, /* 0x0A */ - {-3, -3}, /* 0x0B */ - {-3, 3}, /* 0x0C */ - { 1, -3}, /* 0x0D */ - {-3, -1}, /* 0x0E */ - { 3, 3}, /* 0x0F */ - { 7, -7}, /* 0x10 */ - {-5, 7}, /* 0x11 */ - { 7, 5}, /* 0x12 */ - {-7, -7}, /* 0x13 */ - {-7, 7}, /* 0x14 */ - { 5, -7}, /* 0x15 */ - {-7, -5}, /* 0x16 */ - { 7, 7}, /* 0x17 */ - {-1, -7}, /* 0x18 */ - { 3, 7}, /* 0x19 */ - { 7, -3}, /* 0x1A */ - {-7, 1}, /* 0x1B */ - { 1, 7}, /* 0x1C */ - {-3, -7}, /* 0x1D */ - {-7, 3}, /* 0x1E */ - { 7, -1}, /* 0x1F */ - { 3, 5}, /* 0x20 */ - {-1, -5}, /* 0x21 */ - {-5, 1}, /* 0x22 */ - { 5, -3}, /* 0x23 */ - {-3, -5}, /* 0x24 */ - { 1, 5}, /* 0x25 */ - { 5, -1}, /* 0x26 */ - {-5, 3}, /* 0x27 */ - {-1, 1}, /* 0x28 */ - { 3, -1}, /* 0x29 */ - {-1, -3}, /* 0x2A */ - { 1, 1}, /* 0x2B */ - { 1, -1}, /* 0x2C */ - {-3, 1}, /* 0x2D */ - { 1, 3}, /* 0x2E */ - {-1, -1}, /* 0x2F */ - {-5, 5}, /* 0x30 */ - { 7, -5}, /* 0x31 */ - {-5, -7}, /* 0x32 */ - { 5, 5}, /* 0x33 */ - { 5, -5}, /* 0x34 */ - {-7, 5}, /* 0x35 */ - { 5, 7}, /* 0x36 */ - {-5, -5}, /* 0x37 */ - {-5, -3}, /* 0x38 */ - { 7, 3}, /* 0x39 */ - { 3, -7}, /* 0x3A */ - {-3, 5}, /* 0x3B */ - { 5, 3}, /* 0x3C */ - {-7, -3}, /* 0x3D */ - {-3, 7}, /* 0x3E */ - { 3, -5} /* 0x3F */ + {FP_SCALE( 7.0f), FP_SCALE( 1.0f)}, /* 0x00 */ + {FP_SCALE(-5.0f), FP_SCALE(-1.0f)}, /* 0x01 */ + {FP_SCALE(-1.0f), FP_SCALE( 5.0f)}, /* 0x02 */ + {FP_SCALE( 1.0f), FP_SCALE(-7.0f)}, /* 0x03 */ + {FP_SCALE(-7.0f), FP_SCALE(-1.0f)}, /* 0x04 */ + {FP_SCALE( 5.0f), FP_SCALE( 1.0f)}, /* 0x05 */ + {FP_SCALE( 1.0f), FP_SCALE(-5.0f)}, /* 0x06 */ + {FP_SCALE(-1.0f), FP_SCALE( 7.0f)}, /* 0x07 */ + {FP_SCALE( 3.0f), FP_SCALE(-3.0f)}, /* 0x08 */ + {FP_SCALE(-1.0f), FP_SCALE( 3.0f)}, /* 0x09 */ + {FP_SCALE( 3.0f), FP_SCALE( 1.0f)}, /* 0x0A */ + {FP_SCALE(-3.0f), FP_SCALE(-3.0f)}, /* 0x0B */ + {FP_SCALE(-3.0f), FP_SCALE( 3.0f)}, /* 0x0C */ + {FP_SCALE( 1.0f), FP_SCALE(-3.0f)}, /* 0x0D */ + {FP_SCALE(-3.0f), FP_SCALE(-1.0f)}, /* 0x0E */ + {FP_SCALE( 3.0f), FP_SCALE( 3.0f)}, /* 0x0F */ + {FP_SCALE( 7.0f), FP_SCALE(-7.0f)}, /* 0x10 */ + {FP_SCALE(-5.0f), FP_SCALE( 7.0f)}, /* 0x11 */ + {FP_SCALE( 7.0f), FP_SCALE( 5.0f)}, /* 0x12 */ + {FP_SCALE(-7.0f), FP_SCALE(-7.0f)}, /* 0x13 */ + {FP_SCALE(-7.0f), FP_SCALE( 7.0f)}, /* 0x14 */ + {FP_SCALE( 5.0f), FP_SCALE(-7.0f)}, /* 0x15 */ + {FP_SCALE(-7.0f), FP_SCALE(-5.0f)}, /* 0x16 */ + {FP_SCALE( 7.0f), FP_SCALE( 7.0f)}, /* 0x17 */ + {FP_SCALE(-1.0f), FP_SCALE(-7.0f)}, /* 0x18 */ + {FP_SCALE( 3.0f), FP_SCALE( 7.0f)}, /* 0x19 */ + {FP_SCALE( 7.0f), FP_SCALE(-3.0f)}, /* 0x1A */ + {FP_SCALE(-7.0f), FP_SCALE( 1.0f)}, /* 0x1B */ + {FP_SCALE( 1.0f), FP_SCALE( 7.0f)}, /* 0x1C */ + {FP_SCALE(-3.0f), FP_SCALE(-7.0f)}, /* 0x1D */ + {FP_SCALE(-7.0f), FP_SCALE( 3.0f)}, /* 0x1E */ + {FP_SCALE( 7.0f), FP_SCALE(-1.0f)}, /* 0x1F */ + {FP_SCALE( 3.0f), FP_SCALE( 5.0f)}, /* 0x20 */ + {FP_SCALE(-1.0f), FP_SCALE(-5.0f)}, /* 0x21 */ + {FP_SCALE(-5.0f), FP_SCALE( 1.0f)}, /* 0x22 */ + {FP_SCALE( 5.0f), FP_SCALE(-3.0f)}, /* 0x23 */ + {FP_SCALE(-3.0f), FP_SCALE(-5.0f)}, /* 0x24 */ + {FP_SCALE( 1.0f), FP_SCALE( 5.0f)}, /* 0x25 */ + {FP_SCALE( 5.0f), FP_SCALE(-1.0f)}, /* 0x26 */ + {FP_SCALE(-5.0f), FP_SCALE( 3.0f)}, /* 0x27 */ + {FP_SCALE(-1.0f), FP_SCALE( 1.0f)}, /* 0x28 */ + {FP_SCALE( 3.0f), FP_SCALE(-1.0f)}, /* 0x29 */ + {FP_SCALE(-1.0f), FP_SCALE(-3.0f)}, /* 0x2A */ + {FP_SCALE( 1.0f), FP_SCALE( 1.0f)}, /* 0x2B */ + {FP_SCALE( 1.0f), FP_SCALE(-1.0f)}, /* 0x2C */ + {FP_SCALE(-3.0f), FP_SCALE( 1.0f)}, /* 0x2D */ + {FP_SCALE( 1.0f), FP_SCALE( 3.0f)}, /* 0x2E */ + {FP_SCALE(-1.0f), FP_SCALE(-1.0f)}, /* 0x2F */ + {FP_SCALE(-5.0f), FP_SCALE( 5.0f)}, /* 0x30 */ + {FP_SCALE( 7.0f), FP_SCALE(-5.0f)}, /* 0x31 */ + {FP_SCALE(-5.0f), FP_SCALE(-7.0f)}, /* 0x32 */ + {FP_SCALE( 5.0f), FP_SCALE( 5.0f)}, /* 0x33 */ + {FP_SCALE( 5.0f), FP_SCALE(-5.0f)}, /* 0x34 */ + {FP_SCALE(-7.0f), FP_SCALE( 5.0f)}, /* 0x35 */ + {FP_SCALE( 5.0f), FP_SCALE( 7.0f)}, /* 0x36 */ + {FP_SCALE(-5.0f), FP_SCALE(-5.0f)}, /* 0x37 */ + {FP_SCALE(-5.0f), FP_SCALE(-3.0f)}, /* 0x38 */ + {FP_SCALE( 7.0f), FP_SCALE( 3.0f)}, /* 0x39 */ + {FP_SCALE( 3.0f), FP_SCALE(-7.0f)}, /* 0x3A */ + {FP_SCALE(-3.0f), FP_SCALE( 5.0f)}, /* 0x3B */ + {FP_SCALE( 5.0f), FP_SCALE( 3.0f)}, /* 0x3C */ + {FP_SCALE(-7.0f), FP_SCALE(-3.0f)}, /* 0x3D */ + {FP_SCALE(-3.0f), FP_SCALE( 7.0f)}, /* 0x3E */ + {FP_SCALE( 3.0f), FP_SCALE(-5.0f)} /* 0x3F */ }; #if defined(SPANDSP_USE_FIXED_POINTx) @@ -239,38 +239,38 @@ static const complexi16_t v17_v32bis_9600_constellation[32] = static const complexf_t v17_v32bis_9600_constellation[32] = #endif { - {-8, 2}, /* 0x00 */ - {-6, -4}, /* 0x01 */ - {-4, 6}, /* 0x02 */ - { 2, 8}, /* 0x03 */ - { 8, -2}, /* 0x04 */ - { 6, 4}, /* 0x05 */ - { 4, -6}, /* 0x06 */ - {-2, -8}, /* 0x07 */ - { 0, 2}, /* 0x08 */ - {-6, 4}, /* 0x09 */ - { 4, 6}, /* 0x0A */ - { 2, 0}, /* 0x0B */ - { 0, -2}, /* 0x0C */ - { 6, -4}, /* 0x0D */ - {-4, -6}, /* 0x0E */ - {-2, 0}, /* 0x0F */ - { 0, -6}, /* 0x10 */ - { 2, -4}, /* 0x11 */ - {-4, -2}, /* 0x12 */ - {-6, 0}, /* 0x13 */ - { 0, 6}, /* 0x14 */ - {-2, 4}, /* 0x15 */ - { 4, 2}, /* 0x16 */ - { 6, 0}, /* 0x17 */ - { 8, 2}, /* 0x18 */ - { 2, 4}, /* 0x19 */ - { 4, -2}, /* 0x1A */ - { 2, -8}, /* 0x1B */ - {-8, -2}, /* 0x1C */ - {-2, -4}, /* 0x1D */ - {-4, 2}, /* 0x1E */ - {-2, 8} /* 0x1F */ + {FP_SCALE(-8.0f), FP_SCALE( 2.0f)}, /* 0x00 */ + {FP_SCALE(-6.0f), FP_SCALE(-4.0f)}, /* 0x01 */ + {FP_SCALE(-4.0f), FP_SCALE( 6.0f)}, /* 0x02 */ + {FP_SCALE( 2.0f), FP_SCALE( 8.0f)}, /* 0x03 */ + {FP_SCALE( 8.0f), FP_SCALE(-2.0f)}, /* 0x04 */ + {FP_SCALE( 6.0f), FP_SCALE( 4.0f)}, /* 0x05 */ + {FP_SCALE( 4.0f), FP_SCALE(-6.0f)}, /* 0x06 */ + {FP_SCALE(-2.0f), FP_SCALE(-8.0f)}, /* 0x07 */ + {FP_SCALE( 0.0f), FP_SCALE( 2.0f)}, /* 0x08 */ + {FP_SCALE(-6.0f), FP_SCALE( 4.0f)}, /* 0x09 */ + {FP_SCALE( 4.0f), FP_SCALE( 6.0f)}, /* 0x0A */ + {FP_SCALE( 2.0f), FP_SCALE( 0.0f)}, /* 0x0B */ + {FP_SCALE( 0.0f), FP_SCALE(-2.0f)}, /* 0x0C */ + {FP_SCALE( 6.0f), FP_SCALE(-4.0f)}, /* 0x0D */ + {FP_SCALE(-4.0f), FP_SCALE(-6.0f)}, /* 0x0E */ + {FP_SCALE(-2.0f), FP_SCALE( 0.0f)}, /* 0x0F */ + {FP_SCALE( 0.0f), FP_SCALE(-6.0f)}, /* 0x10 */ + {FP_SCALE( 2.0f), FP_SCALE(-4.0f)}, /* 0x11 */ + {FP_SCALE(-4.0f), FP_SCALE(-2.0f)}, /* 0x12 */ + {FP_SCALE(-6.0f), FP_SCALE( 0.0f)}, /* 0x13 */ + {FP_SCALE( 0.0f), FP_SCALE( 6.0f)}, /* 0x14 */ + {FP_SCALE(-2.0f), FP_SCALE( 4.0f)}, /* 0x15 */ + {FP_SCALE( 4.0f), FP_SCALE( 2.0f)}, /* 0x16 */ + {FP_SCALE( 6.0f), FP_SCALE( 0.0f)}, /* 0x17 */ + {FP_SCALE( 8.0f), FP_SCALE( 2.0f)}, /* 0x18 */ + {FP_SCALE( 2.0f), FP_SCALE( 4.0f)}, /* 0x19 */ + {FP_SCALE( 4.0f), FP_SCALE(-2.0f)}, /* 0x1A */ + {FP_SCALE( 2.0f), FP_SCALE(-8.0f)}, /* 0x1B */ + {FP_SCALE(-8.0f), FP_SCALE(-2.0f)}, /* 0x1C */ + {FP_SCALE(-2.0f), FP_SCALE(-4.0f)}, /* 0x1D */ + {FP_SCALE(-4.0f), FP_SCALE( 2.0f)}, /* 0x1E */ + {FP_SCALE(-2.0f), FP_SCALE( 8.0f)} /* 0x1F */ }; #if defined(SPANDSP_USE_FIXED_POINTx) @@ -279,22 +279,22 @@ static const complexi16_t v17_v32bis_7200_constellation[16] = static const complexf_t v17_v32bis_7200_constellation[16] = #endif { - { 6, -6}, /* 0x00 */ - {-2, 6}, /* 0x01 */ - { 6, 2}, /* 0x02 */ - {-6, -6}, /* 0x03 */ - {-6, 6}, /* 0x04 */ - { 2, -6}, /* 0x05 */ - {-6, -2}, /* 0x06 */ - { 6, 6}, /* 0x07 */ - {-2, 2}, /* 0x08 */ - { 6, -2}, /* 0x09 */ - {-2, -6}, /* 0x0A */ - { 2, 2}, /* 0x0B */ - { 2, -2}, /* 0x0C */ - {-6, 2}, /* 0x0D */ - { 2, 6}, /* 0x0E */ - {-2, -2} /* 0x0F */ + {FP_SCALE( 6.0f), FP_SCALE(-6.0f)}, /* 0x00 */ + {FP_SCALE(-2.0f), FP_SCALE( 6.0f)}, /* 0x01 */ + {FP_SCALE( 6.0f), FP_SCALE( 2.0f)}, /* 0x02 */ + {FP_SCALE(-6.0f), FP_SCALE(-6.0f)}, /* 0x03 */ + {FP_SCALE(-6.0f), FP_SCALE( 6.0f)}, /* 0x04 */ + {FP_SCALE( 2.0f), FP_SCALE(-6.0f)}, /* 0x05 */ + {FP_SCALE(-6.0f), FP_SCALE(-2.0f)}, /* 0x06 */ + {FP_SCALE( 6.0f), FP_SCALE( 6.0f)}, /* 0x07 */ + {FP_SCALE(-2.0f), FP_SCALE( 2.0f)}, /* 0x08 */ + {FP_SCALE( 6.0f), FP_SCALE(-2.0f)}, /* 0x09 */ + {FP_SCALE(-2.0f), FP_SCALE(-6.0f)}, /* 0x0A */ + {FP_SCALE( 2.0f), FP_SCALE( 2.0f)}, /* 0x0B */ + {FP_SCALE( 2.0f), FP_SCALE(-2.0f)}, /* 0x0C */ + {FP_SCALE(-6.0f), FP_SCALE( 2.0f)}, /* 0x0D */ + {FP_SCALE( 2.0f), FP_SCALE( 6.0f)}, /* 0x0E */ + {FP_SCALE(-2.0f), FP_SCALE(-2.0f)} /* 0x0F */ }; /* This one does not exist in V.17 as a data constellation. It is only @@ -305,10 +305,10 @@ static const complexi16_t v17_v32bis_4800_constellation[4] = static const complexf_t v17_v32bis_4800_constellation[4] = #endif { - {-6, -2}, /* 0x00 */ - {-2, 6}, /* 0x01 */ - { 2, -6}, /* 0x02 */ - { 6, 2} /* 0x03 */ + {FP_SCALE(-6.0f), FP_SCALE(-2.0f)}, /* 0x00 */ + {FP_SCALE(-2.0f), FP_SCALE( 6.0f)}, /* 0x01 */ + {FP_SCALE( 2.0f), FP_SCALE(-6.0f)}, /* 0x02 */ + {FP_SCALE( 6.0f), FP_SCALE( 2.0f)} /* 0x03 */ }; #if defined(SPANDSP_USE_FIXED_POINTx) @@ -317,10 +317,10 @@ static const complexi16_t v17_v32bis_abcd_constellation[4] = static const complexf_t v17_v32bis_abcd_constellation[4] = #endif { - {-6, -2}, /* A */ - { 2, -6}, /* B */ - { 6, 2}, /* C */ - {-2, 6} /* D */ + {FP_SCALE(-6.0f), FP_SCALE(-2.0f)}, /* A */ + {FP_SCALE( 2.0f), FP_SCALE(-6.0f)}, /* B */ + {FP_SCALE( 6.0f), FP_SCALE( 2.0f)}, /* C */ + {FP_SCALE(-2.0f), FP_SCALE( 6.0f)} /* D */ }; /*- End of file ------------------------------------------------------------*/ diff --git a/libs/spandsp/src/v29tx_constellation_maps.h b/libs/spandsp/src/v29tx_constellation_maps.h index 01da53e71f..f141b336bb 100644 --- a/libs/spandsp/src/v29tx_constellation_maps.h +++ b/libs/spandsp/src/v29tx_constellation_maps.h @@ -24,18 +24,26 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#if !defined(FP_SCALE) +#if defined(SPANDSP_USE_FIXED_POINT) +#define FP_SCALE(x) ((int16_t) x) +#else +#define FP_SCALE(x) (x) +#endif +#endif + #if defined(SPANDSP_USE_FIXED_POINT) static const complexi16_t v29_abab_constellation[6] = #else static const complexf_t v29_abab_constellation[6] = #endif { - { 3, -3}, /* 315deg high 9600 */ - {-3, 0}, /* 180deg low */ - { 1, -1}, /* 315deg low 7200 */ - {-3, 0}, /* 180deg low */ - { 0, -3}, /* 270deg low 4800 */ - {-3, 0} /* 180deg low */ + {FP_SCALE( 3.0f), FP_SCALE(-3.0f)}, /* 315deg high 9600 */ + {FP_SCALE(-3.0f), FP_SCALE( 0.0f)}, /* 180deg low */ + {FP_SCALE( 1.0f), FP_SCALE(-1.0f)}, /* 315deg low 7200 */ + {FP_SCALE(-3.0f), FP_SCALE( 0.0f)}, /* 180deg low */ + {FP_SCALE( 0.0f), FP_SCALE(-3.0f)}, /* 270deg low 4800 */ + {FP_SCALE(-3.0f), FP_SCALE( 0.0f)} /* 180deg low */ }; #if defined(SPANDSP_USE_FIXED_POINT) @@ -44,12 +52,12 @@ static const complexi16_t v29_cdcd_constellation[6] = static const complexf_t v29_cdcd_constellation[6] = #endif { - { 3, 0}, /* 0deg low 9600 */ - {-3, 3}, /* 135deg high */ - { 3, 0}, /* 0deg low 7200 */ - {-1, 1}, /* 135deg low */ - { 3, 0}, /* 0deg low 4800 */ - { 0, 3} /* 90deg low */ + {FP_SCALE( 3.0f), FP_SCALE( 0.0f)}, /* 0deg low 9600 */ + {FP_SCALE(-3.0f), FP_SCALE( 3.0f)}, /* 135deg high */ + {FP_SCALE( 3.0f), FP_SCALE( 0.0f)}, /* 0deg low 7200 */ + {FP_SCALE(-1.0f), FP_SCALE( 1.0f)}, /* 135deg low */ + {FP_SCALE( 3.0f), FP_SCALE( 0.0f)}, /* 0deg low 4800 */ + {FP_SCALE( 0.0f), FP_SCALE( 3.0f)} /* 90deg low */ }; #if defined(SPANDSP_USE_FIXED_POINT) @@ -58,22 +66,22 @@ static const complexi16_t v29_9600_constellation[16] = static const complexf_t v29_9600_constellation[16] = #endif { - { 3, 0}, /* 0deg low */ - { 1, 1}, /* 45deg low */ - { 0, 3}, /* 90deg low */ - {-1, 1}, /* 135deg low */ - {-3, 0}, /* 180deg low */ - {-1, -1}, /* 225deg low */ - { 0, -3}, /* 270deg low */ - { 1, -1}, /* 315deg low */ - { 5, 0}, /* 0deg high */ - { 3, 3}, /* 45deg high */ - { 0, 5}, /* 90deg high */ - {-3, 3}, /* 135deg high */ - {-5, 0}, /* 180deg high */ - {-3, -3}, /* 225deg high */ - { 0, -5}, /* 270deg high */ - { 3, -3} /* 315deg high */ + {FP_SCALE( 3.0f), FP_SCALE( 0.0f)}, /* 0deg low */ + {FP_SCALE( 1.0f), FP_SCALE( 1.0f)}, /* 45deg low */ + {FP_SCALE( 0.0f), FP_SCALE( 3.0f)}, /* 90deg low */ + {FP_SCALE(-1.0f), FP_SCALE( 1.0f)}, /* 135deg low */ + {FP_SCALE(-3.0f), FP_SCALE( 0.0f)}, /* 180deg low */ + {FP_SCALE(-1.0f), FP_SCALE(-1.0f)}, /* 225deg low */ + {FP_SCALE( 0.0f), FP_SCALE(-3.0f)}, /* 270deg low */ + {FP_SCALE( 1.0f), FP_SCALE(-1.0f)}, /* 315deg low */ + {FP_SCALE( 5.0f), FP_SCALE( 0.0f)}, /* 0deg high */ + {FP_SCALE( 3.0f), FP_SCALE( 3.0f)}, /* 45deg high */ + {FP_SCALE( 0.0f), FP_SCALE( 5.0f)}, /* 90deg high */ + {FP_SCALE(-3.0f), FP_SCALE( 3.0f)}, /* 135deg high */ + {FP_SCALE(-5.0f), FP_SCALE( 0.0f)}, /* 180deg high */ + {FP_SCALE(-3.0f), FP_SCALE(-3.0f)}, /* 225deg high */ + {FP_SCALE( 0.0f), FP_SCALE(-5.0f)}, /* 270deg high */ + {FP_SCALE( 3.0f), FP_SCALE(-3.0f)} /* 315deg high */ }; /*- End of file ------------------------------------------------------------*/