aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/BlockPartitioner.cpp139
-rw-r--r--src/BlockPartitioner.h58
-rw-r--r--src/Buffer.cpp108
-rw-r--r--src/Buffer.h56
-rw-r--r--src/CicEqualizer.cpp96
-rw-r--r--src/CicEqualizer.h61
-rw-r--r--src/ConvEncoder.cpp150
-rw-r--r--src/ConvEncoder.h50
-rw-r--r--src/DabMod.cpp456
-rw-r--r--src/DabModulator.cpp328
-rw-r--r--src/DabModulator.h72
-rw-r--r--src/DifferentialModulator.cpp100
-rw-r--r--src/DifferentialModulator.h52
-rw-r--r--src/Eti.cpp70
-rw-r--r--src/Eti.h96
-rw-r--r--src/EtiReader.cpp270
-rw-r--r--src/EtiReader.h72
-rw-r--r--src/FicSource.cpp115
-rw-r--r--src/FicSource.h61
-rw-r--r--src/Flowgraph.cpp226
-rw-r--r--src/Flowgraph.h95
-rw-r--r--src/FrameMultiplexer.cpp90
-rw-r--r--src/FrameMultiplexer.h55
-rw-r--r--src/FrequencyInterleaver.cpp131
-rw-r--r--src/FrequencyInterleaver.h53
-rw-r--r--src/GainControl.cpp369
-rw-r--r--src/GainControl.h74
-rw-r--r--src/GuardIntervalInserter.cpp107
-rw-r--r--src/GuardIntervalInserter.h57
-rw-r--r--src/InputMemory.cpp61
-rw-r--r--src/InputMemory.h48
-rw-r--r--src/Makefile.am83
-rw-r--r--src/Makefile.in1241
-rw-r--r--src/ModCodec.cpp87
-rw-r--r--src/ModCodec.h54
-rw-r--r--src/ModFormat.cpp68
-rw-r--r--src/ModFormat.h50
-rw-r--r--src/ModInput.cpp72
-rw-r--r--src/ModInput.h53
-rw-r--r--src/ModMux.cpp68
-rw-r--r--src/ModMux.h54
-rw-r--r--src/ModOutput.cpp72
-rw-r--r--src/ModOutput.h53
-rw-r--r--src/ModPlugin.cpp45
-rw-r--r--src/ModPlugin.h61
-rw-r--r--src/NullSymbol.cpp59
-rw-r--r--src/NullSymbol.h50
-rw-r--r--src/OfdmGenerator.cpp195
-rw-r--r--src/OfdmGenerator.h67
-rw-r--r--src/OutputFile.cpp66
-rw-r--r--src/OutputFile.h51
-rw-r--r--src/OutputMemory.cpp60
-rw-r--r--src/OutputMemory.h48
-rw-r--r--src/PcDebug.h77
-rw-r--r--src/PhaseReference.cpp168
-rw-r--r--src/PhaseReference.h58
-rw-r--r--src/PrbsGenerator.cpp174
-rw-r--r--src/PrbsGenerator.h71
-rw-r--r--src/PuncturingEncoder.cpp194
-rw-r--r--src/PuncturingEncoder.h63
-rw-r--r--src/PuncturingRule.cpp60
-rw-r--r--src/PuncturingRule.h56
-rw-r--r--src/QpskSymbolMapper.cpp168
-rw-r--r--src/QpskSymbolMapper.h51
-rw-r--r--src/Resampler.cpp318
-rw-r--r--src/Resampler.h72
-rw-r--r--src/SignalMultiplexer.cpp69
-rw-r--r--src/SignalMultiplexer.h53
-rw-r--r--src/SubchannelSource.cpp1086
-rw-r--r--src/SubchannelSource.h68
-rw-r--r--src/TimeInterleaver.cpp92
-rw-r--r--src/TimeInterleaver.h55
-rwxr-xr-xsrc/crc-dwap.py547
-rw-r--r--src/kiss_fftsimd.c44
-rw-r--r--src/kiss_fftsimd.h68
-rw-r--r--src/porting.c39
-rw-r--r--src/porting.h52
77 files changed, 10136 insertions, 0 deletions
diff --git a/src/BlockPartitioner.cpp b/src/BlockPartitioner.cpp
new file mode 100644
index 0000000..bb16ae2
--- /dev/null
+++ b/src/BlockPartitioner.cpp
@@ -0,0 +1,139 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "BlockPartitioner.h"
+#include "PcDebug.h"
+
+#include <stdio.h>
+#include <stdexcept>
+#include <string.h>
+#include <stdint.h>
+#include <assert.h>
+
+
+BlockPartitioner::BlockPartitioner(unsigned mode, unsigned fct) :
+ ModMux(ModFormat(0), ModFormat(0)),
+ d_mode(mode)
+{
+ PDEBUG("BlockPartitioner::BlockPartitioner(%i)\n", mode);
+
+ switch (mode) {
+ case 1:
+ d_ficSize = 2304 / 8;
+ d_cifCount = 4;
+ d_outputFramesize = 3072 / 8;
+ d_outputFramecount = 72;
+ break;
+ case 2:
+ d_ficSize = 2304 / 8;
+ d_cifCount = 1;
+ d_outputFramesize = 768 / 8;
+ d_outputFramecount = 72;
+ break;
+ case 3:
+ d_ficSize = 3072 / 8;
+ d_cifCount = 1;
+ d_outputFramesize = 384 / 8;
+ d_outputFramecount = 144;
+ break;
+ case 4:
+ d_ficSize = 2304 / 8;
+ d_cifCount = 2;
+ d_outputFramesize = 1536 / 8;
+ d_outputFramecount = 72;
+ break;
+ default:
+ throw std::runtime_error(
+ "BlockPartitioner::BlockPartitioner invalid mode");
+ break;
+ }
+ d_cifNb = 0;
+ // For Synchronisation purpose, count nb of CIF to drop
+ d_cifInit = fct % d_cifCount;
+ d_cifSize = 864 * 8;
+
+ myInputFormat.size(d_cifSize);
+ myOutputFormat.size(d_cifSize * d_cifCount);
+}
+
+
+BlockPartitioner::~BlockPartitioner()
+{
+ PDEBUG("BlockPartitioner::~BlockPartitioner()\n");
+
+}
+
+
+// dataIn[0] -> FIC
+// dataIn[1] -> CIF
+int BlockPartitioner::process(std::vector<Buffer*> dataIn, Buffer* dataOut)
+{
+ assert(dataIn.size() == 2);
+ dataOut->setLength(d_cifCount * (d_ficSize + d_cifSize));
+
+#ifdef DEBUG
+ fprintf(stderr, "BlockPartitioner::process(dataIn:");
+ for (unsigned i = 0; i < dataIn.size(); ++i) {
+ fprintf(stderr, " %p", dataIn[i]);
+ }
+ fprintf(stderr, ", sizeIn:");
+ for (unsigned i = 0; i < dataIn.size(); ++i) {
+ fprintf(stderr, " %zu", dataIn[i]->getLength());
+ }
+ fprintf(stderr, ", dataOut: %p, sizeOut: %zu)\n", dataOut, dataOut->getLength());
+#endif
+
+ if (dataIn[0]->getLength() != d_ficSize) {
+ throw std::runtime_error(
+ "BlockPartitioner::process input size not valid!");
+ }
+ if (dataIn[1]->getLength() != d_cifSize) {
+ throw std::runtime_error(
+ "BlockPartitioner::process input size not valid!");
+ }
+
+ // Synchronize first CIF
+ if (d_cifInit != 0) {
+ if (++d_cifInit == d_cifCount) {
+ d_cifInit = 0;
+ }
+ // Drop CIF
+ return 0;
+ }
+
+ uint8_t* fic = reinterpret_cast<uint8_t*>(dataIn[0]->getData());
+ uint8_t* cif = reinterpret_cast<uint8_t*>(dataIn[1]->getData());
+ uint8_t* out = reinterpret_cast<uint8_t*>(dataOut->getData());
+
+ // Copy FIC data
+ PDEBUG("Writting FIC %zu bytes to %zu\n", d_ficSize, d_cifNb * d_ficSize);
+ memcpy(out + (d_cifNb * d_ficSize), fic, d_ficSize);
+ // Copy CIF data
+ PDEBUG("Writting CIF %u bytes to %zu\n", 864 * 8,
+ (d_cifCount * d_ficSize) + (d_cifNb * 864 * 8));
+ memcpy(out + (d_cifCount * d_ficSize) + (d_cifNb * 864 * 8), cif, 864 * 8);
+
+ if (++d_cifNb == d_cifCount) {
+ d_cifNb = 0;
+ }
+
+ return d_cifNb == 0;
+}
diff --git a/src/BlockPartitioner.h b/src/BlockPartitioner.h
new file mode 100644
index 0000000..ec788bf
--- /dev/null
+++ b/src/BlockPartitioner.h
@@ -0,0 +1,58 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef BLOCK_PARTITIONER_H
+#define BLOCK_PARTITIONER_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "ModMux.h"
+
+#include <sys/types.h>
+
+
+class BlockPartitioner : public ModMux
+{
+public:
+ BlockPartitioner(unsigned mode, unsigned fct);
+ virtual ~BlockPartitioner();
+ BlockPartitioner(const BlockPartitioner&);
+ BlockPartitioner& operator=(const BlockPartitioner&);
+
+ int process(std::vector<Buffer*> dataIn, Buffer* dataOut);
+ const char* name() { return "BlockPartitioner"; }
+
+protected:
+ int d_mode;
+ size_t d_ficSize;
+ size_t d_cifCount;
+ size_t d_cifNb;
+ size_t d_cifInit;
+ size_t d_cifSize;
+ size_t d_outputFramesize;
+ size_t d_outputFramecount;
+};
+
+
+#endif // BLOCK_PARTITIONER_H
diff --git a/src/Buffer.cpp b/src/Buffer.cpp
new file mode 100644
index 0000000..cef4ad5
--- /dev/null
+++ b/src/Buffer.cpp
@@ -0,0 +1,108 @@
+/*
+ Copyright (C) 2011
+ Her Majesty the Queen in Right of Canada (Communications Research
+ Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "Buffer.h"
+#include "PcDebug.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <malloc.h>
+#ifdef HAVE_DECL__MM_MALLOC
+# include <mm_malloc.h>
+#else
+# define memalign(a, b) malloc(b)
+#endif
+
+
+
+Buffer::Buffer(size_t len, const void *data)
+{
+ PDEBUG("Buffer::Buffer(%zu, %p)\n", len, data);
+
+ this->len = 0;
+ this->size = 0;
+ this->data = NULL;
+ setData(data, len);
+}
+
+
+Buffer::~Buffer()
+{
+ free(data);
+}
+
+
+Buffer &Buffer::operator=(const Buffer &copy)
+{
+ setData(copy.data, copy.len);
+ return *this;
+}
+
+
+Buffer &Buffer::operator+=(const Buffer &copy)
+{
+ appendData(copy.data, copy.len);
+ return *this;
+}
+
+
+void Buffer::setLength(size_t len)
+{
+ if (len > size) {
+ void *tmp = data;
+ //data = _mm_malloc(len, 16);
+ data = memalign(16, len);
+ memcpy(data, tmp, this->len);
+ free(tmp);
+ size = len;
+ }
+ this->len = len;
+}
+
+
+void Buffer::setData(const void *data, size_t len)
+{
+ setLength(0);
+ appendData(data, len);
+}
+
+
+void Buffer::appendData(const void *data, size_t len)
+{
+ size_t offset = this->len;
+ setLength(this->len + len);
+ if (data != NULL) {
+ memcpy((char*)this->data + offset, data, len);
+ }
+}
+
+
+size_t Buffer::getLength()
+{
+ return len;
+}
+
+
+void *Buffer::getData()
+{
+ return data;
+}
diff --git a/src/Buffer.h b/src/Buffer.h
new file mode 100644
index 0000000..e0ab72b
--- /dev/null
+++ b/src/Buffer.h
@@ -0,0 +1,56 @@
+/*
+ Copyright (C) 2011
+ Her Majesty the Queen in Right of Canada (Communications Research
+ Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef BUFFER_H
+#define BUFFER_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <unistd.h>
+
+
+class Buffer {
+protected:
+ size_t len;
+ size_t size;
+ void *data;
+
+public:
+ Buffer(const Buffer& copy);
+ Buffer(size_t len = 0, const void *data = NULL);
+ ~Buffer();
+
+ Buffer &operator=(const Buffer &copy);
+ Buffer &operator+=(const Buffer &copy);
+
+ void setLength(size_t len);
+ void setData(const void *data, size_t len);
+ void appendData(const void *data, size_t len);
+
+ size_t getLength();
+ void *getData();
+};
+
+
+#endif // BUFFER_H
diff --git a/src/CicEqualizer.cpp b/src/CicEqualizer.cpp
new file mode 100644
index 0000000..06f4550
--- /dev/null
+++ b/src/CicEqualizer.cpp
@@ -0,0 +1,96 @@
+/*
+ Copyright (C) 2007, 2008, 2009, 2010, 2011 Her Majesty the Queen in
+ Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "CicEqualizer.h"
+#include "PcDebug.h"
+
+#include <stdio.h>
+#include <stdexcept>
+
+
+CicEqualizer::CicEqualizer(size_t nbCarriers, size_t spacing, int R) :
+ ModCodec(ModFormat(nbCarriers * sizeof(complexf)),
+ ModFormat(nbCarriers * sizeof(complexf))),
+ myNbCarriers(nbCarriers),
+ mySpacing(spacing)
+{
+ PDEBUG("CicEqualizer::CicEqualizer(%zu, %zu, %i) @ %p\n",
+ nbCarriers, spacing, R, this);
+
+ myFilter = new float[nbCarriers];
+ int M = 1;
+ int N = 4;
+ float pi = 4.0f * atanf(1.0f);
+ for (size_t i = 0; i < nbCarriers; ++i) {
+ int k = i < (nbCarriers + 1) / 2
+ ? i + ((nbCarriers & 1) ^ 1)
+ : i - (int)nbCarriers;
+ float angle = pi * k / spacing;
+ if (k == 0) {
+ myFilter[i] = R;
+ } else {
+ myFilter[i] = sinf(angle / R) / sinf(angle * M);
+ }
+ myFilter[i] = fabsf(myFilter[i]) * R;
+ myFilter[i] = powf(myFilter[i], N);
+ myFilter[i] *= 0.5f;
+ PDEBUG("HCic[%zu -> %i] = %f (%f dB) -> angle: %f\n",
+ i, k,myFilter[i], 20.0 * log10(myFilter[i]), angle);
+ }
+}
+
+
+CicEqualizer::~CicEqualizer()
+{
+ PDEBUG("CicEqualizer::~CicEqualizer() @ %p\n", this);
+
+ if (myFilter != NULL) {
+ delete[] myFilter;
+ }
+}
+
+
+int CicEqualizer::process(Buffer* const dataIn, Buffer* dataOut)
+{
+ PDEBUG("CicEqualizer::process(dataIn: %p, dataOut: %p)\n",
+ dataIn, dataOut);
+
+ dataOut->setLength(dataIn->getLength());
+
+ const complexf* in = reinterpret_cast<const complexf*>(dataIn->getData());
+ complexf* out = reinterpret_cast<complexf*>(dataOut->getData());
+ size_t sizeIn = dataIn->getLength() / sizeof(complexf);
+ size_t sizeOut = dataOut->getLength() / sizeof(complexf);
+
+ if ((sizeIn % myNbCarriers) != 0) {
+ PDEBUG("%zu != %zu\n", sizeIn, myNbCarriers);
+ throw std::runtime_error(
+ "CicEqualizer::process input size not valid!");
+ }
+
+ for (size_t i = 0; i < sizeOut; ) {
+ for (size_t j = 0; j < myNbCarriers; ++j, ++i) {
+ out[i] = in[i] * myFilter[j];
+ }
+ }
+
+ return sizeOut;
+}
diff --git a/src/CicEqualizer.h b/src/CicEqualizer.h
new file mode 100644
index 0000000..55e5923
--- /dev/null
+++ b/src/CicEqualizer.h
@@ -0,0 +1,61 @@
+/*
+ Copyright (C) 2007, 2008, 2009, 2010, 2011 Her Majesty the Queen in
+ Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef CIC_EQUALIZER_H
+#define CIC_EQUALIZER_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "ModCodec.h"
+
+
+#include <sys/types.h>
+#include <complex>
+#ifdef __SSE__
+# include <xmmintrin.h>
+#endif
+
+
+typedef std::complex<float> complexf;
+
+class CicEqualizer : public ModCodec
+{
+public:
+ CicEqualizer(size_t nbCarriers, size_t spacing, int R);
+ virtual ~CicEqualizer();
+ CicEqualizer(const CicEqualizer&);
+ CicEqualizer& operator=(const CicEqualizer&);
+
+
+ int process(Buffer* const dataIn, Buffer* dataOut);
+ const char* name() { return "CicEqualizer"; }
+
+protected:
+ size_t myNbCarriers;
+ size_t mySpacing;
+ float* myFilter;
+};
+
+
+#endif //CIC_EQUALIZER_H
diff --git a/src/ConvEncoder.cpp b/src/ConvEncoder.cpp
new file mode 100644
index 0000000..109b51a
--- /dev/null
+++ b/src/ConvEncoder.cpp
@@ -0,0 +1,150 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ConvEncoder.h"
+#include "PcDebug.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdexcept>
+
+
+const static unsigned char PARITY[] = {
+ 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0,
+ 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1,
+ 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1,
+ 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0,
+ 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1,
+ 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0,
+ 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0,
+ 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1,
+ 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1,
+ 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0,
+ 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0,
+ 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1,
+ 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0,
+ 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1,
+ 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1,
+ 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0
+};
+
+
+ConvEncoder::ConvEncoder(size_t framesize) :
+ ModCodec(ModFormat(framesize), ModFormat((framesize * 4) + 3)),
+ d_framesize(framesize)
+{
+ PDEBUG("ConvEncoder::ConvEncoder(%zu)\n", framesize);
+
+}
+
+
+ConvEncoder::~ConvEncoder()
+{
+ PDEBUG("ConvEncoder::~ConvEncoder()\n");
+
+}
+
+
+int ConvEncoder::process(Buffer* const dataIn, Buffer* dataOut)
+{
+ PDEBUG("ConvEncoder::process"
+ "(dataIn: %p, dataOut: %p)\n",
+ dataIn, dataOut);
+
+ size_t in_block_size = d_framesize;
+ size_t out_block_size = (d_framesize * 4) + 3;
+ size_t in_offset = 0;
+ size_t out_offset = 0;
+ unsigned short memory = 0;
+ unsigned char data;
+
+ if (dataIn->getLength() != in_block_size) {
+ PDEBUG("%zu != %zu != 0\n", dataIn->getLength(), in_block_size);
+ throw std::runtime_error(
+ "ConvEncoder::process input size not valid!\n");
+ }
+ dataOut->setLength(out_block_size);
+ const unsigned char* in = reinterpret_cast<const unsigned char*>(dataIn->getData());
+ unsigned char* out = reinterpret_cast<unsigned char*>(dataOut->getData());
+
+ // While there is enought input and ouput items
+ while (dataIn->getLength() - in_offset >= in_block_size &&
+ dataOut->getLength() - out_offset >= out_block_size) {
+ for (size_t in_count = 0; in_count < in_block_size; ++in_count) {
+ data = in[in_offset];
+ //PDEBUG("Input: 0x%x\n", data);
+ // For next 4 output bytes
+ for (unsigned out_count = 0; out_count < 4; ++out_count) {
+ out[out_offset] = 0;
+ // For each 4-bit output word
+ for (unsigned j = 0; j < 2; ++j) {
+ memory >>= 1;
+ memory |= (data >> 7) << 6;
+ data <<= 1;
+ //PDEBUG("Memory: 0x%x\n", memory);
+ unsigned char poly[4] = {
+ memory & 0x5b,
+ memory & 0x79,
+ memory & 0x65,
+ memory & 0x5b
+ };
+ //PDEBUG("Polys: 0x%x, 0x%x, 0x%x, 0x%x\n", poly[0], poly[1], poly[2], poly[3]);
+ // For each poly
+ for (unsigned k = 0; k < 4; ++k) {
+ out[out_offset] <<= 1;
+ out[out_offset] |= PARITY[poly[k]];
+ //PDEBUG("Out bit: %i\n", out[no] >> 7);
+ }
+ }
+ //PDEBUG("Out: 0x%x\n", out[no]);
+ ++out_offset;
+ }
+ ++in_offset;
+ }
+ for (unsigned pad_count = 0; pad_count < 3; ++pad_count) {
+ out[out_offset] = 0;
+ // For each 4-bit output word
+ for (unsigned j = 0; j < 2; ++j) {
+ memory >>= 1;
+ //PDEBUG("Memory: 0x%x\n", memory);
+ unsigned char poly[4] = {
+ memory & 0x5b,
+ memory & 0x79,
+ memory & 0x65,
+ memory & 0x5b
+ };
+ //PDEBUG("Polys: 0x%x, 0x%x, 0x%x, 0x%x\n", poly[0], poly[1], poly[2], poly[3]);
+ // For each poly
+ for (unsigned k = 0; k < 4; ++k) {
+ out[out_offset] <<= 1;
+ out[out_offset] |= PARITY[poly[k]];
+ //PDEBUG("Out bit: %i\n", out[no] >> 7);
+ }
+ }
+ //PDEBUG("Out: 0x%x\n", out[no]);
+ ++out_offset;
+ }
+ }
+
+ PDEBUG(" Consume: %zu\n", in_offset);
+ PDEBUG(" Return: %zu\n", out_offset);
+ return out_offset;
+}
diff --git a/src/ConvEncoder.h b/src/ConvEncoder.h
new file mode 100644
index 0000000..7f79e98
--- /dev/null
+++ b/src/ConvEncoder.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef CONV_ENCODER_H
+#define CONV_ENCODER_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "ModCodec.h"
+
+#include <sys/types.h>
+
+
+class ConvEncoder : public ModCodec
+{
+private:
+ size_t d_framesize;
+
+protected:
+
+public:
+ ConvEncoder(size_t framesize);
+ virtual ~ConvEncoder();
+ int process(Buffer* const dataIn, Buffer* dataOut);
+ const char* name() { return "ConvEncoder"; }
+};
+
+
+#endif // CONV_ENCODER_H
diff --git a/src/DabMod.cpp b/src/DabMod.cpp
new file mode 100644
index 0000000..db0c712
--- /dev/null
+++ b/src/DabMod.cpp
@@ -0,0 +1,456 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+ Her Majesty the Queen in Right of Canada (Communications Research
+ Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "porting.h"
+
+#include "DabModulator.h"
+#include "InputMemory.h"
+#include "OutputFile.h"
+#include "PcDebug.h"
+
+#include <complex>
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdexcept>
+#include <signal.h>
+#include <string.h>
+
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
+
+#ifdef HAVE_DECL__MM_MALLOC
+# include <mm_malloc.h>
+#else
+# define memalign(a, b) malloc(b)
+#endif
+
+
+typedef std::complex<float> complexf;
+
+
+bool running = true;
+
+void signalHandler(int signalNb)
+{
+ PDEBUG("signalHandler(%i)\n", signalNb);
+
+ running = false;
+}
+
+
+void printUsage(char* progName, FILE* out = stderr)
+{
+ fprintf(out, "Usage:\n");
+ fprintf(out, "\t%s"
+ " [input [output]]"
+ " [-a amplitude]"
+ " [-c clockrate]"
+ " [-f]"
+ " [-g gainMode]"
+ " [-h]"
+ " [-l]"
+ " [-m dabMode]"
+ " [-r samplingRate]"
+ "\n", progName);
+ fprintf(out, "Where:\n");
+ fprintf(out, "input: ETI input filename (default: stdin).\n");
+ fprintf(out, "output: COFDM output filename (default: stdout).\n");
+ fprintf(out, "-a: Apply amplitude gain.\n");
+ fprintf(out, "-c: Set the DAC clock rate.\n");
+ fprintf(out, "-f: (deprecated) Set fifo input.\n");
+ fprintf(out, "-g: Set computation gain mode: "
+ "%u FIX, %u MAX, %u VAR\n", GAIN_FIX, GAIN_MAX, GAIN_VAR);
+ fprintf(out, "-h: Print this help.\n");
+ fprintf(out, "-l: Loop file when reach end of file.\n");
+ fprintf(out, "-m: Set DAB mode: (0: auto, 1-4: force).\n");
+ fprintf(out, "-r: Set output sampling rate (default: 2048000).\n");
+}
+
+
+void printVersion(FILE *out = stderr)
+{
+ fprintf(out, "Welcome to %s %s, compiled at %s, %s\n\n",
+ PACKAGE, VERSION, __DATE__, __TIME__);
+ fprintf(out, "CRC-DABMOD is copyright (C) Her Majesty the Queen in Right of Canada,\n"
+ " 2009, 2010, 2011, 2012 Communications Research Centre (CRC).\n"
+ "\n"
+ " This program is available free of charge and is licensed to you on a\n"
+ " non-exclusive basis; you may not redistribute it.\n"
+ "\n"
+ " This program is provided \"AS IS\" in the hope that it will be useful, but\n"
+ " WITHOUT ANY WARRANTY with respect to its accurancy or usefulness; witout\n"
+ " even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n"
+ " PURPOSE and NONINFRINGEMENT.\n"
+ "\n"
+ " In no event shall CRC be LIABLE for any LOSS, DAMAGE or COST that may be\n"
+ " incurred in connection with the use of this software.\n"
+ "\n"
+ "CRC-DABMOD makes use of the following open source packages:\n"
+ " Kiss FFT v1.2.9 (Revised BSD) - http://kissfft.sourceforge.net/\n"
+ );
+
+}
+
+
+int main(int argc, char* argv[])
+{
+ int ret = 0;
+ bool loop = false;
+ char* inputName;
+ char* outputName;
+ FILE* inputFile = NULL;
+ uint32_t sync = 0;
+ uint32_t nbFrames = 0;
+ uint32_t frame = 0;
+ uint16_t frameSize = 0;
+ size_t outputRate = 2048000;
+ size_t clockRate = 0;
+ unsigned dabMode = 0;
+ float amplitude = 1.0f;
+ GainMode gainMode = GAIN_VAR;
+ Buffer data;
+
+ Flowgraph* flowgraph = NULL;
+ DabModulator* modulator = NULL;
+ InputMemory* input = NULL;
+ OutputFile* output = NULL;
+
+ signal(SIGINT, signalHandler);
+
+ while (true) {
+ int c = getopt(argc, argv, "a:c:fg:hlm:r:V");
+ if (c == -1) {
+ break;
+ }
+ switch (c) {
+ case 'a':
+ amplitude = strtof(optarg, NULL);
+ break;
+ case 'c':
+ clockRate = strtol(optarg, NULL, 0);
+ break;
+ case 'f':
+ fprintf(stderr, "Option -f deprecated!\n");
+ break;
+ case 'g':
+ gainMode = (GainMode)strtol(optarg, NULL, 0);
+ break;
+ case 'l':
+ loop = true;
+ break;
+ case 'm':
+ dabMode = strtol(optarg, NULL, 0);
+ break;
+ case 'r':
+ outputRate = strtol(optarg, NULL, 0);
+ break;
+ case 'V':
+ printVersion();
+ goto END_MAIN;
+ break;
+ case '?':
+ case 'h':
+ printUsage(argv[0]);
+ goto END_MAIN;
+ break;
+ default:
+ fprintf(stderr, "Option '%c' not coded yet!\n", c);
+ ret = -1;
+ goto END_MAIN;
+ }
+ }
+ // Setting ETI input filename
+ if (optind < argc) {
+ inputName = argv[optind++];
+ } else {
+ inputName = (char*)"/dev/stdin";
+ }
+ // Setting COFDM output filename
+ if (optind < argc) {
+ outputName = argv[optind++];
+ } else {
+ outputName = (char*)"/dev/stdout";
+ }
+ // Checking unused arguments
+ if (optind != argc) {
+ fprintf(stderr, "Invalid arguments:");
+ while (optind != argc) {
+ fprintf(stderr, " %s", argv[optind++]);
+ }
+ fprintf(stderr, "\n");
+ printUsage(argv[0]);
+ ret = -1;
+ goto END_MAIN;
+ }
+
+ // Print settings
+ fprintf(stderr, "Input\n");
+ fprintf(stderr, " Name: %s\n", inputName);
+ fprintf(stderr, "Output\n");
+ fprintf(stderr, " Name: %s\n", outputName);
+ fprintf(stderr, " Sampling rate: ");
+ if (outputRate > 1000) {
+ if (outputRate > 1000000) {
+ fprintf(stderr, "%.3g mHz\n", outputRate / 1000000.0f);
+ } else {
+ fprintf(stderr, "%.3g kHz\n", outputRate / 1000.0f);
+ }
+ } else {
+ fprintf(stderr, "%zu Hz\n", outputRate);
+ }
+
+ // Opening ETI input file
+ inputFile = fopen(inputName, "r");
+ if (inputFile == NULL) {
+ fprintf(stderr, "Unable to open input file!\n");
+ perror(inputName);
+ ret = -1;
+ goto END_MAIN;
+ }
+ // Opening COFDM output file
+ if (outputName != NULL) {
+ output = new OutputFile(outputName);
+ }
+
+ flowgraph = new Flowgraph();
+ data.setLength(6144);
+ input = new InputMemory(&data);
+ modulator = new DabModulator(outputRate, clockRate, dabMode, gainMode, amplitude);
+ flowgraph->connect(input, modulator);
+ flowgraph->connect(modulator, output);
+
+ try {
+ while (running) {
+ enum EtiStreamType {
+ ETI_STREAM_TYPE_NONE = 0,
+ ETI_STREAM_TYPE_RAW,
+ ETI_STREAM_TYPE_STREAMED,
+ ETI_STREAM_TYPE_FRAMED,
+ };
+ EtiStreamType streamType = ETI_STREAM_TYPE_NONE;
+
+ struct stat inputFileStat;
+ fstat(fileno(inputFile), &inputFileStat);
+ size_t inputFileLength = inputFileStat.st_size;
+
+ if (fread(&sync, sizeof(sync), 1, inputFile) != 1) {
+ fprintf(stderr, "Unable to read sync in input file!\n");
+ perror(inputName);
+ ret = -1;
+ goto END_MAIN;
+ }
+ if ((sync == 0x49c5f8ff) || (sync == 0xb63a07ff)) {
+ streamType = ETI_STREAM_TYPE_RAW;
+ if (inputFileLength > 0) {
+ nbFrames = inputFileLength / 6144;
+ } else {
+ nbFrames = (uint32_t)-1;
+ }
+ if (fseek(inputFile, -sizeof(sync), SEEK_CUR) != 0) {
+ if (fread(data.getData(), 6144 - sizeof(sync), 1, inputFile)
+ != 1) {
+ fprintf(stderr, "Unable to seek in input file!\n");
+ ret = -1;
+ goto END_MAIN;
+ }
+ }
+ goto START;
+ }
+
+ nbFrames = sync;
+ if (fread(&frameSize, sizeof(frameSize), 1, inputFile) != 1) {
+ fprintf(stderr, "Unable to read frame size in input file!\n");
+ perror(inputName);
+ ret = -1;
+ goto END_MAIN;
+ }
+ sync >>= 16;
+ sync &= 0xffff;
+ sync |= ((uint32_t)frameSize) << 16;
+
+ if ((sync == 0x49c5f8ff) || (sync == 0xb63a07ff)) {
+ streamType = ETI_STREAM_TYPE_STREAMED;
+ frameSize = nbFrames & 0xffff;
+ if (inputFileLength > 0) {
+ nbFrames = inputFileLength / (frameSize + 2);
+ } else {
+ nbFrames = (uint32_t)-1;
+ }
+ if (fseek(inputFile, -6, SEEK_CUR) != 0) {
+ if (fread(data.getData(), frameSize - 4, 1, inputFile)
+ != 1) {
+ fprintf(stderr, "Unable to seek in input file!\n");
+ ret = -1;
+ goto END_MAIN;
+ }
+ }
+ goto START;
+ }
+
+ if (fread(&sync, sizeof(sync), 1, inputFile) != 1) {
+ fprintf(stderr, "Unable to read nb frame in input file!\n");
+ perror(inputName);
+ ret = -1;
+ goto END_MAIN;
+ }
+ if ((sync == 0x49c5f8ff) || (sync == 0xb63a07ff)) {
+ streamType = ETI_STREAM_TYPE_FRAMED;
+ if (fseek(inputFile, -6, SEEK_CUR) != 0) {
+ if (fread(data.getData(), frameSize - 4, 1, inputFile)
+ != 1) {
+ fprintf(stderr, "Unable to seek in input file!\n");
+ ret = -1;
+ goto END_MAIN;
+ }
+ }
+ goto START;
+ }
+
+ for (size_t i = 10; i < 6144 + 10; ++i) {
+ sync >>= 8;
+ sync &= 0xffffff;
+ if (fread((uint8_t*)&sync + 3, 1, 1, inputFile) != 1) {
+ fprintf(stderr, "Unable to read in input file!\n");
+ ret = 1;
+ goto END_MAIN;
+ }
+ if ((sync == 0x49c5f8ff) || (sync == 0xb63a07ff)) {
+ streamType = ETI_STREAM_TYPE_RAW;
+ if (inputFileLength > 0) {
+ nbFrames = (inputFileLength - i) / 6144;
+ } else {
+ nbFrames = (uint32_t)-1;
+ }
+ if (fseek(inputFile, -sizeof(sync), SEEK_CUR) != 0) {
+ if (fread(data.getData(), 6144 - sizeof(sync), 1, inputFile)
+ != 1) {
+ fprintf(stderr, "Unable to seek in input file!\n");
+ ret = -1;
+ goto END_MAIN;
+ }
+ }
+ goto START;
+ }
+ }
+
+ fprintf(stderr, "Bad input file format!\n");
+ ret = -1;
+ goto END_MAIN;
+
+START:
+ fprintf(stderr, "Input file format: ");
+ switch (streamType) {
+ case ETI_STREAM_TYPE_RAW:
+ fprintf(stderr, "raw");
+ break;
+ case ETI_STREAM_TYPE_STREAMED:
+ fprintf(stderr, "streamed");
+ break;
+ case ETI_STREAM_TYPE_FRAMED:
+ fprintf(stderr, "framed");
+ break;
+ default:
+ fprintf(stderr, "unknown\n");
+ ret = -1;
+ goto END_MAIN;
+ }
+ fprintf(stderr, "\n");
+ fprintf(stderr, "Input file length: %zu\n", inputFileLength);
+ fprintf(stderr, "Input file nb frames: %u\n", nbFrames);
+
+ for (frame = 0; frame < nbFrames; ++frame) {
+ if (!running) {
+ break;
+ }
+
+ PDEBUG("*****************************************\n");
+ PDEBUG("* Reading frame %u\n", frame);
+ PDEBUG("*****************************************\n");
+ if (streamType == ETI_STREAM_TYPE_RAW) {
+ frameSize = 6144;
+ } else {
+ if (fread(&frameSize, sizeof(frameSize), 1, inputFile)
+ != 1) {
+ PDEBUG("End of file!\n");
+ goto END_MAIN;
+ }
+ }
+ PDEBUG("Frame size: %i\n", frameSize);
+
+ if (fread(data.getData(), frameSize, 1, inputFile) != 1) {
+ fprintf(stderr,
+ "Unable to read %i data bytes in input file!\n",
+ frameSize);
+ perror(inputName);
+ ret = -1;
+ goto END_MAIN;
+ }
+ memset(&((uint8_t*)data.getData())[frameSize], 0x55, 6144 - frameSize);
+
+ ////////////////////////////////////////////////////////////////
+ // Proccessing data
+ ////////////////////////////////////////////////////////////////
+ flowgraph->run();
+ }
+ fprintf(stderr, "End of file reached.\n");
+ if (!loop) {
+ running = false;
+ } else {
+ fprintf(stderr, "Rewinding file.\n");
+ rewind(inputFile);
+ }
+ }
+ } catch (std::exception& e) {
+ fprintf(stderr, "EXCEPTION: %s\n", e.what());
+ ret = -1;
+ goto END_MAIN;
+ }
+
+END_MAIN:
+ ////////////////////////////////////////////////////////////////////////
+ // Cleaning things
+ ////////////////////////////////////////////////////////////////////////
+ fprintf(stderr, "\n\n");
+ fprintf(stderr, "%u DAB frames encoded\n", frame);
+ fprintf(stderr, "%f seconds encoded\n", (float)frame * 0.024f);
+
+ fprintf(stderr, "\nCleaning flowgraph...\n");
+ delete flowgraph;
+
+ // Cif
+ fprintf(stderr, "\nCleaning buffers...\n");
+
+ fprintf(stderr, "\nClosing input file...\n");
+ if (inputFile != NULL) {
+ fclose(inputFile);
+ }
+
+ return ret;
+}
diff --git a/src/DabModulator.cpp b/src/DabModulator.cpp
new file mode 100644
index 0000000..6396a4d
--- /dev/null
+++ b/src/DabModulator.cpp
@@ -0,0 +1,328 @@
+/*
+ Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
+ Her Majesty the Queen in Right of Canada (Communications Research
+ Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "DabModulator.h"
+#include "PcDebug.h"
+
+#include "FrameMultiplexer.h"
+#include "PrbsGenerator.h"
+#include "BlockPartitioner.h"
+#include "QpskSymbolMapper.h"
+#include "FrequencyInterleaver.h"
+#include "PhaseReference.h"
+#include "DifferentialModulator.h"
+#include "NullSymbol.h"
+#include "SignalMultiplexer.h"
+#include "CicEqualizer.h"
+#include "OfdmGenerator.h"
+#include "GainControl.h"
+#include "GuardIntervalInserter.h"
+#include "Resampler.h"
+#include "ConvEncoder.h"
+#include "PuncturingEncoder.h"
+#include "TimeInterleaver.h"
+
+
+DabModulator::DabModulator(unsigned outputRate, unsigned clockRate,
+ unsigned dabMode, GainMode gainMode, float factor) :
+ ModCodec(ModFormat(1), ModFormat(0)),
+ myOutputRate(outputRate),
+ myClockRate(clockRate),
+ myDabMode(dabMode),
+ myGainMode(gainMode),
+ myFactor(factor),
+ myFlowgraph(NULL)
+{
+ PDEBUG("DabModulator::DabModulator(%u, %u, %u, %u) @ %p\n",
+ outputRate, clockRate, dabMode, gainMode, this);
+
+ if (myDabMode == 0) {
+ setMode(2);
+ } else {
+ setMode(myDabMode);
+ }
+}
+
+
+DabModulator::~DabModulator()
+{
+ PDEBUG("DabModulator::~DabModulator() @ %p\n", this);
+
+ delete myFlowgraph;
+}
+
+
+void DabModulator::setMode(unsigned mode)
+{
+ switch (mode) {
+ case 1:
+ myNbSymbols = 76;
+ myNbCarriers = 1536;
+ mySpacing = 2048;
+ myNullSize = 2656;
+ mySymSize = 2552;
+ myFicSizeOut = 288;
+ break;
+ case 2:
+ myNbSymbols = 76;
+ myNbCarriers = 384;
+ mySpacing = 512;
+ myNullSize = 664;
+ mySymSize = 638;
+ myFicSizeOut = 288;
+ break;
+ case 3:
+ myNbSymbols = 153;
+ myNbCarriers = 192;
+ mySpacing = 256;
+ myNullSize = 345;
+ mySymSize = 319;
+ myFicSizeOut = 384;
+ break;
+ case 4:
+ myNbSymbols = 76;
+ myNbCarriers = 768;
+ mySpacing = 1024;
+ myNullSize = 1328;
+ mySymSize = 1276;
+ myFicSizeOut = 288;
+ break;
+ default:
+ throw std::runtime_error("DabModulator::setMode invalid mode size");
+ }
+
+ myOutputFormat.size((size_t)((myNullSize + (myNbSymbols * mySymSize))
+ * sizeof(complexf) / 2048000.0 * myOutputRate));
+}
+
+
+int DabModulator::process(Buffer* const dataIn, Buffer* dataOut)
+{
+ PDEBUG("DabModulator::process(dataIn: %p, dataOut: %p)\n",
+ dataIn, dataOut);
+
+ myEtiReader.process(dataIn);
+ if (myFlowgraph == NULL) {
+ unsigned mode = myEtiReader.getMode();
+ if (myDabMode != 0) {
+ mode = myDabMode;
+ } else if (mode == 0) {
+ mode = 4;
+ }
+ setMode(mode);
+
+ myFlowgraph = new Flowgraph();
+ ////////////////////////////////////////////////////////////////
+ // CIF data initialisation
+ ////////////////////////////////////////////////////////////////
+ FrameMultiplexer* cifMux = NULL;
+ PrbsGenerator* cifPrbs = NULL;
+ BlockPartitioner* cifPart = NULL;
+ QpskSymbolMapper* cifMap = NULL;
+ FrequencyInterleaver* cifFreq = NULL;
+ PhaseReference* cifRef = NULL;
+ DifferentialModulator* cifDiff = NULL;
+ NullSymbol* cifNull = NULL;
+ SignalMultiplexer* cifSig = NULL;
+ CicEqualizer* cifCicEq = NULL;
+ OfdmGenerator* cifOfdm = NULL;
+ GainControl* cifGain = NULL;
+ GuardIntervalInserter* cifGuard = NULL;
+ Resampler* cifRes = NULL;
+
+ cifPrbs = new PrbsGenerator(864 * 8, 0x110);
+ cifMux = new FrameMultiplexer(myFicSizeOut + 864 * 8,
+ &myEtiReader.getSubchannels());
+ cifPart = new BlockPartitioner(mode, myEtiReader.getFct());
+ cifMap = new QpskSymbolMapper(myNbCarriers);
+ cifRef = new PhaseReference(mode);
+ cifFreq = new FrequencyInterleaver(mode);
+ cifDiff = new DifferentialModulator(myNbCarriers);
+ cifNull = new NullSymbol(myNbCarriers);
+ cifSig = new SignalMultiplexer(
+ (1 + myNbSymbols) * myNbCarriers * sizeof(complexf));
+
+ if (myClockRate) {
+ cifCicEq = new CicEqualizer(myNbCarriers,
+ (float)mySpacing * (float)myOutputRate / 2048000.0f,
+ myClockRate / myOutputRate);
+ }
+
+ cifOfdm = new OfdmGenerator((1 + myNbSymbols), myNbCarriers, mySpacing);
+ cifGain = new GainControl(mySpacing, myGainMode, myFactor);
+ cifGuard = new GuardIntervalInserter(myNbSymbols, mySpacing,
+ myNullSize, mySymSize);
+ myOutput = new OutputMemory();
+
+ if (myOutputRate != 2048000) {
+ cifRes = new Resampler(2048000, myOutputRate, mySpacing);
+ } else {
+ fprintf(stderr, "No resampler\n");
+ }
+
+ myFlowgraph->connect(cifPrbs, cifMux);
+
+ ////////////////////////////////////////////////////////////////
+ // Processing FIC
+ ////////////////////////////////////////////////////////////////
+ FicSource* fic = myEtiReader.getFic();
+ PrbsGenerator* ficPrbs = NULL;
+ ConvEncoder* ficConv = NULL;
+ PuncturingEncoder* ficPunc = NULL;
+ ////////////////////////////////////////////////////////////////
+ // Data initialisation
+ ////////////////////////////////////////////////////////////////
+ myFicSizeIn = fic->getFramesize();
+
+ ////////////////////////////////////////////////////////////////
+ // Modules configuration
+ ////////////////////////////////////////////////////////////////
+
+ // Configuring FIC channel
+
+ PDEBUG("FIC:\n");
+ PDEBUG(" Framesize: %zu\n", fic->getFramesize());
+
+ // Configuring prbs generator
+ ficPrbs = new PrbsGenerator(myFicSizeIn, 0x110);
+
+ // Configuring convolutionnal encoder
+ ficConv = new ConvEncoder(myFicSizeIn);
+
+ // Configuring puncturing encoder
+ ficPunc = new PuncturingEncoder();
+ std::vector<PuncturingRule*> rules = fic->get_rules();
+ std::vector<PuncturingRule*>::const_iterator rule;
+ for (rule = rules.begin(); rule != rules.end(); ++rule) {
+ PDEBUG(" Adding rule:\n");
+ PDEBUG(" Length: %zu\n", (*rule)->length());
+ PDEBUG(" Pattern: 0x%x\n", (*rule)->pattern());
+ ficPunc->append_rule(*(*rule));
+ }
+ PDEBUG(" Adding tail\n");
+ ficPunc->append_tail_rule(PuncturingRule(3, 0xcccccc));
+
+ myFlowgraph->connect(fic, ficPrbs);
+ myFlowgraph->connect(ficPrbs, ficConv);
+ myFlowgraph->connect(ficConv, ficPunc);
+ myFlowgraph->connect(ficPunc, cifPart);
+
+ ////////////////////////////////////////////////////////////////
+ // Configuring subchannels
+ ////////////////////////////////////////////////////////////////
+ std::vector<SubchannelSource*> subchannels =
+ myEtiReader.getSubchannels();
+ std::vector<SubchannelSource*>::const_iterator subchannel;
+ for (subchannel = subchannels.begin();
+ subchannel != subchannels.end();
+ ++subchannel) {
+ PrbsGenerator* subchPrbs = NULL;
+ ConvEncoder* subchConv = NULL;
+ PuncturingEncoder* subchPunc = NULL;
+ TimeInterleaver* subchInterleaver = NULL;
+
+ ////////////////////////////////////////////////////////////
+ // Data initialisation
+ ////////////////////////////////////////////////////////////
+ size_t subchSizeIn = (*subchannel)->framesize();
+ size_t subchSizeOut = (*subchannel)->framesizeCu() * 8;
+
+ ////////////////////////////////////////////////////////////
+ // Modules configuration
+ ////////////////////////////////////////////////////////////
+
+ // Configuring subchannel
+ PDEBUG("Subchannel:\n");
+ PDEBUG(" Start address: %zu\n",
+ (*subchannel)->startAddress());
+ PDEBUG(" Framesize: %zu\n",
+ (*subchannel)->framesize());
+ PDEBUG(" Bitrate: %zu\n", (*subchannel)->bitrate());
+ PDEBUG(" Framesize CU: %zu\n",
+ (*subchannel)->framesizeCu());
+ PDEBUG(" Protection: %zu\n",
+ (*subchannel)->protection());
+ PDEBUG(" Form: %zu\n",
+ (*subchannel)->protectionForm());
+ PDEBUG(" Level: %zu\n",
+ (*subchannel)->protectionLevel());
+ PDEBUG(" Option: %zu\n",
+ (*subchannel)->protectionOption());
+
+ // Configuring prbs genrerator
+ subchPrbs = new PrbsGenerator(subchSizeIn, 0x110);
+
+ // Configuring convolutionnal encoder
+ subchConv = new ConvEncoder(subchSizeIn);
+
+ // Configuring puncturing encoder
+ subchPunc = new PuncturingEncoder();
+ std::vector<PuncturingRule*> rules = (*subchannel)->get_rules();
+ std::vector<PuncturingRule*>::const_iterator rule;
+ for (rule = rules.begin(); rule != rules.end(); ++rule) {
+ PDEBUG(" Adding rule:\n");
+ PDEBUG(" Length: %zu\n", (*rule)->length());
+ PDEBUG(" Pattern: 0x%x\n", (*rule)->pattern());
+ subchPunc->append_rule(*(*rule));
+ }
+ PDEBUG(" Adding tail\n");
+ subchPunc->append_tail_rule(PuncturingRule(3, 0xcccccc));
+
+ // Configuring time interleaver
+ subchInterleaver = new TimeInterleaver(subchSizeOut);
+
+ myFlowgraph->connect(*subchannel, subchPrbs);
+ myFlowgraph->connect(subchPrbs, subchConv);
+ myFlowgraph->connect(subchConv, subchPunc);
+ myFlowgraph->connect(subchPunc, subchInterleaver);
+ myFlowgraph->connect(subchInterleaver, cifMux);
+ }
+
+ myFlowgraph->connect(cifMux, cifPart);
+ myFlowgraph->connect(cifPart, cifMap);
+ myFlowgraph->connect(cifMap, cifFreq);
+ myFlowgraph->connect(cifRef, cifDiff);
+ myFlowgraph->connect(cifFreq, cifDiff);
+ myFlowgraph->connect(cifNull, cifSig);
+ myFlowgraph->connect(cifDiff, cifSig);
+ if (myClockRate) {
+ myFlowgraph->connect(cifSig, cifCicEq);
+ myFlowgraph->connect(cifCicEq, cifOfdm);
+ } else {
+ myFlowgraph->connect(cifSig, cifOfdm);
+ }
+ myFlowgraph->connect(cifOfdm, cifGain);
+ myFlowgraph->connect(cifGain, cifGuard);
+ if (cifRes != NULL) {
+ myFlowgraph->connect(cifGuard, cifRes);
+ myFlowgraph->connect(cifRes, myOutput);
+ } else {
+ myFlowgraph->connect(cifGuard, myOutput);
+ }
+ }
+
+ ////////////////////////////////////////////////////////////////////
+ // Proccessing data
+ ////////////////////////////////////////////////////////////////////
+ myOutput->setOutput(dataOut);
+ return myFlowgraph->run();
+}
diff --git a/src/DabModulator.h b/src/DabModulator.h
new file mode 100644
index 0000000..9112960
--- /dev/null
+++ b/src/DabModulator.h
@@ -0,0 +1,72 @@
+/*
+ Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
+ Her Majesty the Queen in Right of Canada (Communications Research
+ Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef DAB_MODULATOR_H
+#define DAB_MODULATOR_H
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <sys/types.h>
+
+#include "ModCodec.h"
+#include "EtiReader.h"
+#include "Flowgraph.h"
+#include "GainControl.h"
+#include "OutputMemory.h"
+
+
+class DabModulator : public ModCodec
+{
+public:
+ DabModulator(unsigned outputRate = 2048000, unsigned clockRate = 0,
+ unsigned dabMode = 0, GainMode gainMode = GAIN_VAR, float factor = 1.0);
+ DabModulator(const DabModulator& copy);
+ virtual ~DabModulator();
+
+ int process(Buffer* const dataIn, Buffer* dataOut);
+ const char* name() { return "DabModulator"; }
+
+protected:
+ void setMode(unsigned mode);
+
+ unsigned myOutputRate;
+ unsigned myClockRate;
+ unsigned myDabMode;
+ GainMode myGainMode;
+ float myFactor;
+ EtiReader myEtiReader;
+ Flowgraph* myFlowgraph;
+ OutputMemory* myOutput;
+
+ size_t myNbSymbols;
+ size_t myNbCarriers;
+ size_t mySpacing;
+ size_t myNullSize;
+ size_t mySymSize;
+ size_t myFicSizeOut;
+ size_t myFicSizeIn;
+};
+
+
+#endif // DAB_MODULATOR_H
diff --git a/src/DifferentialModulator.cpp b/src/DifferentialModulator.cpp
new file mode 100644
index 0000000..51c8bca
--- /dev/null
+++ b/src/DifferentialModulator.cpp
@@ -0,0 +1,100 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "DifferentialModulator.h"
+#include "PcDebug.h"
+
+#include <stdio.h>
+#include <stdexcept>
+#include <complex>
+#include <string.h>
+
+typedef std::complex<float> complexf;
+
+
+DifferentialModulator::DifferentialModulator(size_t carriers) :
+ ModMux(ModFormat(carriers * sizeof(complexf)), ModFormat(carriers * sizeof(complexf))),
+ d_carriers(carriers)
+{
+ PDEBUG("DifferentialModulator::DifferentialModulator(%zu)\n", carriers);
+
+}
+
+
+DifferentialModulator::~DifferentialModulator()
+{
+ PDEBUG("DifferentialModulator::~DifferentialModulator()\n");
+
+}
+
+
+// dataIn[0] -> phase reference
+// dataIn[1] -> data symbols
+int DifferentialModulator::process(std::vector<Buffer*> dataIn, Buffer* dataOut)
+{
+#ifdef DEBUG
+ fprintf(stderr, "DifferentialModulator::process (dataIn:");
+ for (unsigned i = 0; i < dataIn.size(); ++i) {
+ fprintf(stderr, " %p", dataIn[i]);
+ }
+ fprintf(stderr, ", sizeIn: ");
+ for (unsigned i = 0; i < dataIn.size(); ++i) {
+ fprintf(stderr, " %zu", dataIn[i]->getLength());
+ }
+ fprintf(stderr, ", dataOut: %p, sizeOut: %zu)\n", dataOut, dataOut->getLength());
+#endif
+
+ if (dataIn.size() != 2) {
+ throw std::runtime_error(
+ "DifferentialModulator::process nb of input streams not 2!");
+ }
+
+ size_t phaseSize = dataIn[0]->getLength() / sizeof(complexf);
+ size_t dataSize = dataIn[1]->getLength() / sizeof(complexf);
+ dataOut->setLength((phaseSize + dataSize) * sizeof(complexf));
+
+ const complexf* phase = reinterpret_cast<const complexf*>(dataIn[0]->getData());
+ const complexf* in = reinterpret_cast<const complexf*>(dataIn[1]->getData());
+ complexf* out = reinterpret_cast<complexf*>(dataOut->getData());
+
+ if (phaseSize != d_carriers) {
+ throw std::runtime_error(
+ "DifferentialModulator::process input phase size not valid!");
+ }
+ if (dataSize % d_carriers != 0) {
+ throw std::runtime_error(
+ "DifferentialModulator::process input data size not valid!");
+ }
+
+ memcpy(dataOut->getData(), phase, phaseSize * sizeof(complexf));
+ for (size_t i = 0; i < dataSize; i += d_carriers) {
+ for (size_t j = 0; j < d_carriers; j += 4) {
+ out[d_carriers + j] = out[j] * in[j];
+ out[d_carriers + j + 1] = out[j + 1] * in[j + 1];
+ out[d_carriers + j + 2] = out[j + 2] * in[j + 2];
+ out[d_carriers + j + 3] = out[j + 3] * in[j + 3];
+ }
+ in += d_carriers;
+ out += d_carriers;
+ }
+
+ return dataOut->getLength();
+}
diff --git a/src/DifferentialModulator.h b/src/DifferentialModulator.h
new file mode 100644
index 0000000..f2a31c4
--- /dev/null
+++ b/src/DifferentialModulator.h
@@ -0,0 +1,52 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _DIFFERENTIAL_MODULATOR_H
+#define _DIFFERENTIAL_MODULATOR_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "ModMux.h"
+
+#include <sys/types.h>
+
+
+class DifferentialModulator : public ModMux
+{
+public:
+ DifferentialModulator(size_t carriers);
+ virtual ~DifferentialModulator();
+ DifferentialModulator(const DifferentialModulator&);
+ DifferentialModulator& operator=(const DifferentialModulator&);
+
+
+ int process(std::vector<Buffer*> dataIn, Buffer* dataOut);
+ const char* name() { return "DifferentialModulator"; }
+
+protected:
+ size_t d_carriers;
+};
+
+
+#endif //_DIFFERENTIAL_MODULATOR_H
diff --git a/src/Eti.cpp b/src/Eti.cpp
new file mode 100644
index 0000000..26215fc
--- /dev/null
+++ b/src/Eti.cpp
@@ -0,0 +1,70 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Her Majesty the
+ Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifdef _WIN32
+# pragma warning ( disable : 4103 )
+# include "Eti.h"
+# pragma warning ( default : 4103 )
+#else
+# include "Eti.h"
+#endif
+
+
+//definitions des structures des champs du ETI(NI, G703)
+
+
+unsigned short eti_FC::getFrameLength()
+{
+ return (unsigned short)((FL_high << 8) | FL_low);
+}
+
+
+void eti_FC::setFrameLength(uint16_t length)
+{
+ FL_high = (length >> 8) & 0x07;
+ FL_low = length & 0xff;
+}
+
+
+void eti_STC::setSTL(uint16_t length)
+{
+ STL_high = length >> 8;
+ STL_low = length & 0xff;
+}
+
+
+uint16_t eti_STC::getSTL()
+{
+ return (uint16_t)((STL_high << 8) + STL_low);
+}
+
+
+void eti_STC::setStartAddress(uint16_t address)
+{
+ startAddress_high = address >> 8;
+ startAddress_low = address & 0xff;
+}
+
+
+uint16_t eti_STC::getStartAddress()
+{
+ return (uint16_t)((startAddress_high << 8) + startAddress_low);
+}
diff --git a/src/Eti.h b/src/Eti.h
new file mode 100644
index 0000000..fd5fc88
--- /dev/null
+++ b/src/Eti.h
@@ -0,0 +1,96 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Her Majesty the
+ Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef ETI_H
+#define ETI_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef _WIN32
+# include <winsock2.h> // For types...
+typedef WORD uint16_t;
+typedef DWORD32 uint32_t;
+
+# define PACKED
+# pragma pack(push, 1)
+#else
+# include <stdint.h>
+
+# define PACKED __attribute__ ((packed))
+#endif
+
+
+//definitions des structures des champs du ETI(NI, G703)
+
+
+struct eti_SYNC {
+ uint32_t ERR:8;
+ uint32_t FSYNC:24;
+} PACKED;
+
+
+struct eti_FC {
+ uint32_t FCT:8;
+ uint32_t NST:7;
+ uint32_t FICF:1;
+ uint32_t FL_high:3;
+ uint32_t MID:2;
+ uint32_t FP:3;
+ uint32_t FL_low:8;
+ uint16_t getFrameLength();
+ void setFrameLength(uint16_t length);
+} PACKED;
+
+
+struct eti_STC {
+ uint32_t startAddress_high:2;
+ uint32_t SCID:6;
+ uint32_t startAddress_low:8;
+ uint32_t STL_high:2;
+ uint32_t TPL:6;
+ uint32_t STL_low:8;
+ void setSTL(uint16_t length);
+ uint16_t getSTL();
+ void setStartAddress(uint16_t address);
+ uint16_t getStartAddress();
+} PACKED;
+
+
+struct eti_EOH {
+ uint16_t MNSC;
+ uint16_t CRC;
+} PACKED;
+
+
+struct eti_EOF {
+ uint16_t CRC;
+ uint16_t RFU;
+} PACKED;
+
+
+struct eti_TIST {
+ uint32_t TIST;
+} PACKED;
+
+
+#endif // ETI_H
diff --git a/src/EtiReader.cpp b/src/EtiReader.cpp
new file mode 100644
index 0000000..d65dbe0
--- /dev/null
+++ b/src/EtiReader.cpp
@@ -0,0 +1,270 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "EtiReader.h"
+#include "PcDebug.h"
+
+#include <stdexcept>
+#include <sys/types.h>
+#include <string.h>
+
+
+enum ETI_READER_STATE {
+ EtiReaderStateNbFrame,
+ EtiReaderStateFrameSize,
+ EtiReaderStateSync,
+ EtiReaderStateFc,
+ EtiReaderStateNst,
+ EtiReaderStateEoh,
+ EtiReaderStateFic,
+ EtiReaderStateSubch,
+ EtiReaderStateEof,
+ EtiReaderStateTist,
+ EtiReaderStatePad
+};
+
+
+EtiReader::EtiReader() : state(EtiReaderStateSync),
+ myFicSource(NULL)
+{
+ PDEBUG("EtiReader::EtiReader()\n");
+
+ myCurrentFrame = 0;
+}
+
+
+EtiReader::~EtiReader()
+{
+ PDEBUG("EtiReader::~EtiReader()\n");
+
+// if (myFicSource != NULL) {
+// delete myFicSource;
+// }
+// for (unsigned i = 0; i < mySources.size(); ++i) {
+// delete mySources[i];
+// }
+}
+
+
+FicSource* EtiReader::getFic()
+{
+ return myFicSource;
+}
+
+
+unsigned EtiReader::getMode()
+{
+ return eti_fc.MID;
+}
+
+
+unsigned EtiReader::getFct()
+{
+ return eti_fc.FCT;
+}
+
+
+const std::vector<SubchannelSource*>& EtiReader::getSubchannels()
+{
+ return mySources;
+}
+
+
+int EtiReader::process(Buffer* dataIn)
+{
+ PDEBUG("EtiReader::process(dataIn: %p)\n", dataIn);
+ PDEBUG(" state: %u\n", state);
+ const unsigned char* in = reinterpret_cast<const unsigned char*>(dataIn->getData());
+ size_t input_size = dataIn->getLength();
+
+ while (input_size > 0) {
+ switch (state) {
+ case EtiReaderStateNbFrame:
+ if (input_size < 4) {
+ return dataIn->getLength() - input_size;
+ }
+ nb_frames = *(uint32_t*)in;
+ input_size -= 4;
+ in += 4;
+ state = EtiReaderStateFrameSize;
+ PDEBUG("Nb frames: %i\n", nb_frames);
+ break;
+ case EtiReaderStateFrameSize:
+ if (input_size < 2) {
+ return dataIn->getLength() - input_size;
+ }
+ framesize = *(uint16_t*)in;
+ input_size -= 2;
+ in += 2;
+ state = EtiReaderStateSync;
+ PDEBUG("Framesize: %i\n", framesize);
+ break;
+ case EtiReaderStateSync:
+ if (input_size < 4) {
+ return dataIn->getLength() - input_size;
+ }
+ framesize = 6144;
+ memcpy(&eti_sync, in, 4);
+ input_size -= 4;
+ framesize -= 4;
+ in += 4;
+ state = EtiReaderStateFc;
+ PDEBUG("Sync.err: 0x%.2x\n", eti_sync.ERR);
+ PDEBUG("Sync.fsync: 0x%.6x\n", eti_sync.FSYNC);
+ break;
+ case EtiReaderStateFc:
+ if (input_size < 4) {
+ return dataIn->getLength() - input_size;
+ }
+ memcpy(&eti_fc, in, 4);
+ input_size -= 4;
+ framesize -= 4;
+ in += 4;
+ state = EtiReaderStateNst;
+ PDEBUG("Fc.fct: 0x%.2x\n", eti_fc.FCT);
+ PDEBUG("Fc.ficf: %u\n", eti_fc.FICF);
+ PDEBUG("Fc.nst: %u\n", eti_fc.NST);
+ PDEBUG("Fc.fp: 0x%x\n", eti_fc.FP);
+ PDEBUG("Fc.mid: %u\n", eti_fc.MID);
+ PDEBUG("Fc.fl: %u\n", eti_fc.getFrameLength());
+ if (!eti_fc.FICF) {
+ throw std::runtime_error("FIC must be present to modulate!");
+ }
+ if (myFicSource == NULL) {
+ myFicSource = new FicSource(eti_fc);
+ }
+ break;
+ case EtiReaderStateNst:
+ if (input_size < 4 * (size_t)eti_fc.NST) {
+ return dataIn->getLength() - input_size;
+ }
+ if ((eti_stc.size() != eti_fc.NST) ||
+ (memcmp(&eti_stc[0], in, 4 * eti_fc.NST))) {
+ PDEBUG("New stc!\n");
+ eti_stc.resize(eti_fc.NST);
+ for (unsigned i = 0; i < mySources.size(); ++i) {
+ delete mySources[i];
+ }
+ mySources.resize(eti_fc.NST);
+ memcpy(&eti_stc[0], in, 4 * eti_fc.NST);
+ for (unsigned i = 0; i < eti_fc.NST; ++i) {
+ mySources[i] = new SubchannelSource(eti_stc[i]);
+ PDEBUG("Sstc %u:\n", i);
+ PDEBUG(" Stc%i.scid: %i\n", i, eti_stc[i].SCID);
+ PDEBUG(" Stc%i.sad: %u\n", i, eti_stc[i].getStartAddress());
+ PDEBUG(" Stc%i.tpl: 0x%.2x\n", i, eti_stc[i].TPL);
+ PDEBUG(" Stc%i.stl: %u\n", i, eti_stc[i].getSTL());
+ }
+ }
+ input_size -= 4 * eti_fc.NST;
+ framesize -= 4 * eti_fc.NST;
+ in += 4 * eti_fc.NST;
+ state = EtiReaderStateEoh;
+ break;
+ case EtiReaderStateEoh:
+ if (input_size < 4) {
+ return dataIn->getLength() - input_size;
+ }
+ memcpy(&eti_eoh, in, 4);
+ input_size -= 4;
+ framesize -= 4;
+ in += 4;
+ state = EtiReaderStateFic;
+ PDEBUG("Eoh.mnsc: 0x%.4x\n", eti_eoh.MNSC);
+ PDEBUG("Eoh.crc: 0x%.4x\n", eti_eoh.CRC);
+ break;
+ case EtiReaderStateFic:
+ if (eti_fc.MID == 3) {
+ if (input_size < 128) {
+ return dataIn->getLength() - input_size;
+ }
+ PDEBUG("Writting 128 bytes of FIC channel data\n");
+ Buffer fic = Buffer(128, in);
+ myFicSource->process(&fic, NULL);
+ input_size -= 128;
+ framesize -= 128;
+ in += 128;
+ } else {
+ if (input_size < 96) {
+ return dataIn->getLength() - input_size;
+ }
+ PDEBUG("Writting 96 bytes of FIC channel data\n");
+ Buffer fic = Buffer(96, in);
+ myFicSource->process(&fic, NULL);
+ input_size -= 96;
+ framesize -= 96;
+ in += 96;
+ }
+ state = EtiReaderStateSubch;
+ break;
+ case EtiReaderStateSubch:
+ for (size_t i = 0; i < eti_stc.size(); ++i) {
+ unsigned size = mySources[i]->framesize();
+ PDEBUG("Writting %i bytes of subchannel data\n", size);
+ Buffer subch = Buffer(size, in);
+ mySources[i]->process(&subch, NULL);
+ input_size -= size;
+ framesize -= size;
+ in += size;
+ }
+ state = EtiReaderStateEof;
+ break;
+ case EtiReaderStateEof:
+ if (input_size < 4) {
+ return dataIn->getLength() - input_size;
+ }
+ memcpy(&eti_eof, in, 4);
+ input_size -= 4;
+ framesize -= 4;
+ in += 4;
+ state = EtiReaderStateTist;
+ PDEBUG("Eof.crc: %#.4x\n", eti_eof.CRC);
+ PDEBUG("Eof.rfu: %#.4x\n", eti_eof.RFU);
+ break;
+ case EtiReaderStateTist:
+ if (input_size < 4) {
+ return dataIn->getLength() - input_size;
+ }
+ memcpy(&eti_tist, in, 4);
+ input_size -= 4;
+ framesize -= 4;
+ in += 4;
+ state = EtiReaderStatePad;
+ PDEBUG("Tist: 0x%.6x\n", eti_tist.TIST);
+ break;
+ case EtiReaderStatePad:
+ if (framesize > 0) {
+ --input_size;
+ --framesize;
+ ++in;
+ } else {
+ state = EtiReaderStateSync;
+ }
+ break;
+ default:
+ // throw std::runtime_error("Invalid state!");
+ PDEBUG("Invalid state (%i)!", state);
+ input_size = 0;
+ }
+ }
+
+ return dataIn->getLength() - input_size;
+}
diff --git a/src/EtiReader.h b/src/EtiReader.h
new file mode 100644
index 0000000..7e172db
--- /dev/null
+++ b/src/EtiReader.h
@@ -0,0 +1,72 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef ETI_READER_H
+#define ETI_READER_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "Eti.h"
+#include "FicSource.h"
+#include "SubchannelSource.h"
+
+#include <vector>
+#include <stdint.h>
+#include <sys/types.h>
+
+
+class EtiReader
+{
+protected:
+ void sync();
+ int state;
+ uint32_t nb_frames;
+ uint16_t framesize;
+ eti_SYNC eti_sync;
+ eti_FC eti_fc;
+ std::vector<eti_STC> eti_stc;
+ eti_EOH eti_eoh;
+ eti_EOF eti_eof;
+ eti_TIST eti_tist;
+ FicSource* myFicSource;
+ std::vector<SubchannelSource*> mySources;
+
+public:
+ EtiReader();
+ virtual ~EtiReader();
+ EtiReader(const EtiReader&);
+ EtiReader& operator=(const EtiReader&);
+
+ FicSource* getFic();
+ unsigned getMode();
+ unsigned getFct();
+ const std::vector<SubchannelSource*>& getSubchannels();
+ int process(Buffer* dataIn);
+
+private:
+ size_t myCurrentFrame;
+};
+
+
+#endif // ETI_READER_H
diff --git a/src/FicSource.cpp b/src/FicSource.cpp
new file mode 100644
index 0000000..d996796
--- /dev/null
+++ b/src/FicSource.cpp
@@ -0,0 +1,115 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "FicSource.h"
+#include "PcDebug.h"
+
+#include <stdexcept>
+#include <sys/types.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+const std::vector<PuncturingRule*>& FicSource::get_rules()
+{
+ return d_puncturing_rules;
+}
+
+
+FicSource::FicSource(eti_FC &fc) :
+ ModInput(ModFormat(0), ModFormat(0))
+{
+// PDEBUG("FicSource::FicSource(...)\n");
+// PDEBUG(" Start address: %i\n", d_start_address);
+// PDEBUG(" Framesize: %i\n", d_framesize);
+// PDEBUG(" Protection: %i\n", d_protection);
+
+ if (fc.FICF == 0) {
+ d_framesize = 0;
+ d_buffer.setLength(0);
+ return;
+ }
+
+ if (fc.MID == 3) {
+ d_framesize = 32 * 4;
+ d_puncturing_rules.push_back(new PuncturingRule(29 * 16, 0xeeeeeeee));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, 0xeeeeeeec));
+ } else {
+ d_framesize = 24 * 4;
+ d_puncturing_rules.push_back(new PuncturingRule(21 * 16, 0xeeeeeeee));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, 0xeeeeeeec));
+ }
+ d_buffer.setLength(d_framesize);
+
+ myOutputFormat.size(d_framesize);
+}
+
+
+FicSource::~FicSource()
+{
+ PDEBUG("FicSource::~FicSource()\n");
+ for (unsigned i = 0; i < d_puncturing_rules.size(); ++i) {
+// PDEBUG(" Deleting rules @ %p\n", d_puncturing_rules[i]);
+ delete d_puncturing_rules[i];
+ }
+}
+
+
+size_t FicSource::getFramesize()
+{
+ return d_framesize;
+}
+
+
+int FicSource::process(Buffer* inputData, Buffer* outputData)
+{
+ PDEBUG("FicSource::process"
+ "(inputData: %p, outputData: %p)\n",
+ inputData, outputData);
+
+ if ((inputData != NULL) && inputData->getLength()) {
+ PDEBUG(" Input, storing data\n");
+ if (inputData->getLength() != d_framesize) {
+ PDEBUG("ERROR: FicSource::process.inputSize != d_framesize\n");
+ exit(-1);
+ }
+ d_buffer = *inputData;
+ return inputData->getLength();
+ }
+ PDEBUG(" Output, retriving data\n");
+
+ return read(outputData);
+}
+
+
+int FicSource::read(Buffer* outputData)
+{
+ PDEBUG("FicSource::read(outputData: %p, outputSize: %zu)\n",
+ outputData, outputData->getLength());
+
+ if (d_buffer.getLength() != d_framesize) {
+ PDEBUG("ERROR: FicSource::read.outputSize != d_framesize\n");
+ exit(-1);
+ }
+ *outputData = d_buffer;
+
+ return outputData->getLength();
+}
diff --git a/src/FicSource.h b/src/FicSource.h
new file mode 100644
index 0000000..4528d49
--- /dev/null
+++ b/src/FicSource.h
@@ -0,0 +1,61 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef FIC_SOURCE_H
+#define FIC_SOURCE_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "PuncturingRule.h"
+#include "Eti.h"
+#include "ModInput.h"
+
+#include <vector>
+#include <sys/types.h>
+
+
+class FicSource : public ModInput
+{
+protected:
+ size_t d_framesize;
+ Buffer d_buffer;
+ std::vector<PuncturingRule*> d_puncturing_rules;
+
+public:
+ FicSource(eti_FC &fc);
+ FicSource(const FicSource&);
+ FicSource& operator=(const FicSource&);
+ virtual ~FicSource();
+
+ size_t getFramesize();
+ const std::vector<PuncturingRule*>& get_rules();
+
+ int process(Buffer* inputData, Buffer* outputData);
+ const char* name() { return "FicSource"; }
+
+ int read(Buffer* outputData);
+};
+
+
+#endif // FIC_SOURCE_H
diff --git a/src/Flowgraph.cpp b/src/Flowgraph.cpp
new file mode 100644
index 0000000..2212485
--- /dev/null
+++ b/src/Flowgraph.cpp
@@ -0,0 +1,226 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "Flowgraph.h"
+#include "PcDebug.h"
+
+
+#ifdef __ppc__
+# define memalign(a, b) malloc(b)
+#else // !__ppc__
+# include <mm_malloc.h>
+#endif
+#include <sys/types.h>
+#include <stdexcept>
+#include <assert.h>
+#if defined(_WIN32) and !defined(__MINGW32__)
+//#include <sys/timeb.h>
+//#include <sys/types.h>
+#else
+#include <sys/time.h>
+#endif
+
+
+typedef std::vector<Node*>::iterator NodeIterator;
+typedef std::vector<Edge*>::iterator EdgeIterator;
+
+
+Node::Node(ModPlugin* plugin) :
+ myPlugin(plugin),
+ myProcessTime(0)
+{
+ PDEBUG("Node::Node(plugin(%s): %p) @ %p\n", plugin->name(), plugin, this);
+
+}
+
+
+Node::~Node()
+{
+ PDEBUG("Node::~Node() @ %p\n", this);
+
+ if (myPlugin != NULL) {
+ delete myPlugin;
+ }
+ assert(myInputBuffers.size() == 0);
+ assert(myOutputBuffers.size() == 0);
+}
+
+
+Edge::Edge(Node* srcNode, Node* dstNode) :
+ mySrcNode(srcNode),
+ myDstNode(dstNode)
+{
+ PDEBUG("Edge::Edge(srcNode(%s): %p, dstNode(%s): %p) @ %p\n",
+ srcNode->plugin()->name(), srcNode,
+ dstNode->plugin()->name(), dstNode,
+ this);
+
+ myBuffer = new Buffer();
+ srcNode->myOutputBuffers.push_back(myBuffer);
+ dstNode->myInputBuffers.push_back(myBuffer);
+}
+
+
+Edge::~Edge()
+{
+ PDEBUG("Edge::~Edge() @ %p\n", this);
+
+ std::vector<Buffer*>::iterator buffer;
+ if (myBuffer != NULL) {
+ for (buffer = mySrcNode->myOutputBuffers.begin();
+ buffer != mySrcNode->myOutputBuffers.end();
+ ++buffer) {
+ if (*buffer == myBuffer) {
+ mySrcNode->myOutputBuffers.erase(buffer);
+ break;
+ }
+ }
+
+ for (buffer = myDstNode->myInputBuffers.begin();
+ buffer != myDstNode->myInputBuffers.end();
+ ++buffer) {
+ if (*buffer == myBuffer) {
+ myDstNode->myInputBuffers.erase(buffer);
+ break;
+ }
+ }
+ delete myBuffer;
+ }
+}
+
+
+int Node::process()
+{
+ PDEBUG("Edge::process()\n");
+ PDEBUG(" Plugin name: %s (%p)\n", myPlugin->name(), myPlugin);
+
+ return myPlugin->process(myInputBuffers, myOutputBuffers);
+}
+
+
+Flowgraph::Flowgraph() :
+ myProcessTime(0)
+{
+ PDEBUG("Flowgraph::Flowgraph() @ %p\n", this);
+
+}
+
+
+Flowgraph::~Flowgraph()
+{
+ PDEBUG("Flowgraph::~Flowgraph() @ %p\n", this);
+
+ std::vector<Edge*>::const_iterator edge;
+ for (edge = edges.begin(); edge != edges.end(); ++edge) {
+ delete *edge;
+ }
+
+ if (myProcessTime) {
+ fprintf(stderr, "Process time:\n");
+ }
+ std::vector<Node*>::const_iterator node;
+ for (node = nodes.begin(); node != nodes.end(); ++node) {
+ if (myProcessTime) {
+ fprintf(stderr, " %30s: %10u us (%2.2f %%)\n",
+ (*node)->plugin()->name(),
+ (unsigned)(*node)->processTime(),
+ (*node)->processTime() * 100.0 / myProcessTime);
+ }
+ delete *node;
+ }
+ if (myProcessTime) {
+ fprintf(stderr, " %30s: %10u us (100.00 %%)\n", "total",
+ (unsigned)myProcessTime);
+ }
+}
+
+
+void Flowgraph::connect(ModPlugin* input, ModPlugin* output)
+{
+ PDEBUG("Flowgraph::connect(input(%s): %p, output(%s): %p)\n",
+ input->name(), input, output->name(), output);
+
+ NodeIterator inputNode;
+ NodeIterator outputNode;
+
+ for (inputNode = nodes.begin(); inputNode != nodes.end(); ++inputNode) {
+ if ((*inputNode)->plugin() == input) {
+ break;
+ }
+ }
+ if (inputNode == nodes.end()) {
+ inputNode = nodes.insert(nodes.end(), new Node(input));
+ }
+
+ for (outputNode = nodes.begin(); outputNode != nodes.end(); ++outputNode) {
+ if ((*outputNode)->plugin() == output) {
+ break;
+ }
+ }
+ if (outputNode == nodes.end()) {
+ outputNode = nodes.insert(nodes.end(), new Node(output));
+ for (inputNode = nodes.begin(); inputNode != nodes.end(); ++inputNode) {
+ if ((*inputNode)->plugin() == input) {
+ break;
+ }
+ }
+ } else if (inputNode > outputNode) {
+ Node* node = *outputNode;
+ nodes.erase(outputNode);
+ outputNode = nodes.insert(nodes.end(), node);
+ for (inputNode = nodes.begin(); inputNode != nodes.end(); ++inputNode) {
+ if ((*inputNode)->plugin() == input) {
+ break;
+ }
+ }
+ }
+
+ assert((*inputNode)->plugin() == input);
+ assert((*outputNode)->plugin() == output);
+
+ edges.push_back(new Edge(*inputNode, *outputNode));
+}
+
+
+bool Flowgraph::run()
+{
+ PDEBUG("Flowgraph::run()\n");
+
+ std::vector<Node*>::const_iterator node;
+ timeval start, stop;
+ time_t diff;
+
+ gettimeofday(&start, NULL);
+ for (node = nodes.begin(); node != nodes.end(); ++node) {
+ int ret = (*node)->process();
+ PDEBUG(" ret: %i\n", ret);
+ gettimeofday(&stop, NULL);
+ diff = (stop.tv_sec - start.tv_sec) * 1000000 +
+ stop.tv_usec - start.tv_usec;
+ myProcessTime += diff;
+ (*node)->addProcessTime(diff);
+ start = stop;
+ if (!ret) {
+ return false;
+ }
+ }
+ return true;
+}
diff --git a/src/Flowgraph.h b/src/Flowgraph.h
new file mode 100644
index 0000000..0a36f4e
--- /dev/null
+++ b/src/Flowgraph.h
@@ -0,0 +1,95 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef FLOWGRAPH_H
+#define FLOWGRAPH_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "porting.h"
+#include "ModPlugin.h"
+
+
+#include <sys/types.h>
+#include <vector>
+
+
+class Node
+{
+public:
+ Node(ModPlugin* plugin);
+ ~Node();
+ Node(const Node&);
+ Node& operator=(const Node&);
+
+ ModPlugin* plugin() { return myPlugin; }
+
+ std::vector<Buffer*> myInputBuffers;
+ std::vector<Buffer*> myOutputBuffers;
+
+ int process();
+ time_t processTime() { return myProcessTime; }
+ void addProcessTime(time_t processTime) {
+ myProcessTime += processTime;
+ }
+
+protected:
+ ModPlugin* myPlugin;
+ time_t myProcessTime;
+};
+
+
+class Edge
+{
+public:
+ Edge(Node* src, Node* dst);
+ ~Edge();
+ Edge(const Edge&);
+ Edge& operator=(const Edge&);
+
+protected:
+ Node* mySrcNode;
+ Node* myDstNode;
+ Buffer* myBuffer;
+};
+
+
+class Flowgraph
+{
+public:
+ Flowgraph();
+ virtual ~Flowgraph();
+ Flowgraph(const Flowgraph&);
+ Flowgraph& operator=(const Flowgraph&);
+
+ void connect(ModPlugin* input, ModPlugin* output);
+ bool run();
+
+protected:
+ std::vector<Node*> nodes;
+ std::vector<Edge*> edges;
+ time_t myProcessTime;
+};
+
+
+#endif // FLOWGRAPH_H
diff --git a/src/FrameMultiplexer.cpp b/src/FrameMultiplexer.cpp
new file mode 100644
index 0000000..4eb72b2
--- /dev/null
+++ b/src/FrameMultiplexer.cpp
@@ -0,0 +1,90 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "FrameMultiplexer.h"
+#include "PcDebug.h"
+
+#include <stdio.h>
+#include <stdexcept>
+#include <complex>
+#include <assert.h>
+#include <string.h>
+
+typedef std::complex<float> complexf;
+
+
+FrameMultiplexer::FrameMultiplexer(size_t framesize, const std::vector<SubchannelSource*>* subchannels) :
+ ModMux(ModFormat(framesize), ModFormat(framesize)),
+ d_frameSize(framesize),
+ mySubchannels(subchannels)
+{
+ PDEBUG("FrameMultiplexer::FrameMultiplexer(%zu) @ %p\n", framesize, this);
+
+}
+
+
+FrameMultiplexer::~FrameMultiplexer()
+{
+ PDEBUG("FrameMultiplexer::~FrameMultiplexer() @ %p\n", this);
+
+}
+
+
+// dataIn[0] -> PRBS
+// dataIn[1+] -> subchannels
+int FrameMultiplexer::process(std::vector<Buffer*> dataIn, Buffer* dataOut)
+{
+ assert(dataIn.size() >= 1);
+ assert(dataIn[0]->getLength() == 864 * 8);
+ dataOut->setLength(dataIn[0]->getLength());
+
+#ifdef DEBUG
+ fprintf(stderr, "FrameMultiplexer::process(dataIn:");
+ for (unsigned i = 0; i < dataIn.size(); ++i) {
+ fprintf(stderr, " %p", dataIn[i]);
+ }
+ fprintf(stderr, ", sizeIn:");
+ for (unsigned i = 0; i < dataIn.size(); ++i) {
+ fprintf(stderr, " %zu", dataIn[i]->getLength());
+ }
+ fprintf(stderr, ", dataOut: %p, sizeOut: %zu)\n", dataOut, dataOut->getLength());
+#endif
+
+ unsigned char* out = reinterpret_cast<unsigned char*>(dataOut->getData());
+ std::vector<Buffer*>::const_iterator in = dataIn.begin();
+
+ // Write PRBS
+ memcpy(out, (*in)->getData(), (*in)->getLength());
+ ++in;
+ // Write subchannel
+ assert(mySubchannels->size() == dataIn.size() - 1);
+ std::vector<SubchannelSource*>::const_iterator subchannel =
+ mySubchannels->begin();
+ while (in != dataIn.end()) {
+ assert((*subchannel)->framesizeCu() * 8 == (*in)->getLength());
+ size_t offset = (*subchannel)->startAddress() * 8;
+ memcpy(&out[offset], (*in)->getData(), (*in)->getLength());
+ ++in;
+ ++subchannel;
+ }
+
+ return dataOut->getLength();
+}
diff --git a/src/FrameMultiplexer.h b/src/FrameMultiplexer.h
new file mode 100644
index 0000000..911e807
--- /dev/null
+++ b/src/FrameMultiplexer.h
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef FRAME_MULTIPLEXER_H
+#define FRAME_MULTIPLEXER_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "ModMux.h"
+#include "SubchannelSource.h"
+
+
+#include <sys/types.h>
+
+
+class FrameMultiplexer : public ModMux
+{
+public:
+ FrameMultiplexer(size_t frameSize, const std::vector<SubchannelSource*>* subchannels);
+ virtual ~FrameMultiplexer();
+ FrameMultiplexer(const FrameMultiplexer&);
+ FrameMultiplexer& operator=(const FrameMultiplexer&);
+
+
+ int process(std::vector<Buffer*> dataIn, Buffer* dataOut);
+ const char* name() { return "FrameMultiplexer"; }
+
+protected:
+ size_t d_frameSize;
+ const std::vector<SubchannelSource*>* mySubchannels;
+};
+
+
+#endif // FRAME_MULTIPLEXER_H
diff --git a/src/FrequencyInterleaver.cpp b/src/FrequencyInterleaver.cpp
new file mode 100644
index 0000000..7930682
--- /dev/null
+++ b/src/FrequencyInterleaver.cpp
@@ -0,0 +1,131 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "FrequencyInterleaver.h"
+#include "PcDebug.h"
+
+#include <stdio.h>
+#include <stdexcept>
+#include <malloc.h>
+#include <complex>
+
+typedef std::complex<float> complexf;
+
+
+FrequencyInterleaver::FrequencyInterleaver(size_t mode) :
+ ModCodec(ModFormat(0), ModFormat(0))
+{
+ PDEBUG("FrequencyInterleaver::FrequencyInterleaver(%zu) @ %p\n",
+ mode, this);
+
+ size_t num;
+ size_t alpha = 13;
+ size_t beta;
+ switch (mode) {
+ case 1:
+ d_carriers = 1536;
+ num = 2048;
+ beta = 511;
+ break;
+ case 2:
+ d_carriers = 384;
+ num = 512;
+ beta = 127;
+ break;
+ case 3:
+ d_carriers = 192;
+ num = 256;
+ beta = 63;
+ break;
+ case 0:
+ case 4:
+ d_carriers = 768;
+ num = 1024;
+ beta = 255;
+ break;
+ default:
+ PDEBUG("Carriers: %zu\n", (d_carriers >> 1) << 1);
+ throw std::runtime_error("FrequencyInterleaver::FrequencyInterleaver "
+ "nb of carriers invalid!");
+ break;
+ }
+
+ d_indexes = (size_t*)memalign(16, d_carriers * sizeof(size_t));
+ size_t* index = d_indexes;
+ size_t perm = 0;
+ PDEBUG("i: %4u, R: %4u\n", 0, 0);
+ for (size_t j = 1; j < num; ++j) {
+ perm = (alpha * perm + beta) & (num - 1);
+ if (perm >= ((num - d_carriers) / 2)
+ && perm <= (num - (num - d_carriers) / 2)
+ && perm != (num / 2)) {
+ PDEBUG("i: %4zu, R: %4zu, d: %4zu, n: %4zu, k: %5zi, index: %zu\n",
+ j, perm, perm, index - d_indexes, perm - num / 2,
+ perm > num / 2
+ ? perm - (1 + (num / 2))
+ : perm + (d_carriers - (num / 2)));
+ *(index++) = perm > num / 2 ?
+ perm - (1 + (num / 2)) : perm + (d_carriers - (num / 2));
+ } else {
+ PDEBUG("i: %4zu, R: %4zu\n", j, perm);
+ }
+ }
+}
+
+
+FrequencyInterleaver::~FrequencyInterleaver()
+{
+ PDEBUG("FrequencyInterleaver::~FrequencyInterleaver() @ %p\n", this);
+
+ free(d_indexes);
+}
+
+
+int FrequencyInterleaver::process(Buffer* const dataIn, Buffer* dataOut)
+{
+ PDEBUG("FrequencyInterleaver::process"
+ "(dataIn: %p, sizeIn: %zu, dataOut: %p, sizeOut: %zu)\n",
+ dataIn, dataIn->getLength(), dataOut, dataOut->getLength());
+
+ dataOut->setLength(dataIn->getLength());
+
+ const complexf* in = reinterpret_cast<const complexf*>(dataIn->getData());
+ complexf* out = reinterpret_cast<complexf*>(dataOut->getData());
+ size_t sizeIn = dataIn->getLength() / sizeof(complexf);
+
+ if (sizeIn % d_carriers != 0) {
+ throw std::runtime_error(
+ "FrequencyInterleaver::process input size not valid!");
+ }
+
+ for (size_t i = 0; i < sizeIn;) {
+// memset(out, 0, d_carriers * sizeof(complexf));
+ for (size_t j = 0; j < d_carriers; i += 4, j += 4) {
+ out[d_indexes[j]] = in[i];
+ out[d_indexes[j + 1]] = in[i + 1];
+ out[d_indexes[j + 2]] = in[i + 2];
+ out[d_indexes[j + 3]] = in[i + 3];
+ }
+ out += d_carriers;
+ }
+
+ return 1;
+}
diff --git a/src/FrequencyInterleaver.h b/src/FrequencyInterleaver.h
new file mode 100644
index 0000000..9d4a8f8
--- /dev/null
+++ b/src/FrequencyInterleaver.h
@@ -0,0 +1,53 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef FREQUENCY_INTERLEAVER_H
+#define FREQUENCY_INTERLEAVER_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "ModCodec.h"
+
+#include <sys/types.h>
+
+
+class FrequencyInterleaver : public ModCodec
+{
+public:
+ FrequencyInterleaver(size_t mode);
+ virtual ~FrequencyInterleaver();
+ FrequencyInterleaver(const FrequencyInterleaver&);
+ FrequencyInterleaver& operator=(const FrequencyInterleaver&);
+
+
+ int process(Buffer* const dataIn, Buffer* dataOut);
+ const char* name() { return "FrequencyInterleaver"; }
+
+protected:
+ size_t d_carriers;
+ size_t d_num;
+ size_t* d_indexes;
+};
+
+#endif // FREQUENCY_INTERLEAVER_H
diff --git a/src/GainControl.cpp b/src/GainControl.cpp
new file mode 100644
index 0000000..75d811d
--- /dev/null
+++ b/src/GainControl.cpp
@@ -0,0 +1,369 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+ Her Majesty the Queen in Right of Canada (Communications Research
+ Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "GainControl.h"
+#include "PcDebug.h"
+#include "kiss_fftsimd.h"
+
+#include <stdio.h>
+#include <stdexcept>
+
+
+GainControl::GainControl(size_t framesize, GainMode mode, float factor) :
+ ModCodec(ModFormat(framesize * sizeof(complexf)), ModFormat(framesize * sizeof(complexf))),
+#ifdef __SSE__
+ d_frameSize(framesize * sizeof(complexf) / sizeof(__m128)),
+#else // !__SSE__
+ d_frameSize(framesize),
+#endif
+ d_factor(factor)
+{
+ PDEBUG("GainControl::GainControl(%zu, %u) @ %p\n", framesize, mode, this);
+
+ switch(mode) {
+ case GAIN_FIX:
+ PDEBUG("Gain mode: fix\n");
+ computeGain = computeGainFix;
+ break;
+ case GAIN_MAX:
+ PDEBUG("Gain mode: max\n");
+ computeGain = computeGainMax;
+ break;
+ case GAIN_VAR:
+ PDEBUG("Gain mode: var\n");
+ computeGain = computeGainVar;
+ break;
+ default:
+ throw std::runtime_error(
+ "GainControl::GainControl invalid computation gain mode!");
+ }
+}
+
+
+GainControl::~GainControl()
+{
+ PDEBUG("GainControl::~GainControl() @ %p\n", this);
+
+}
+
+
+int GainControl::process(Buffer* const dataIn, Buffer* dataOut)
+{
+ PDEBUG("GainControl::process"
+ "(dataIn: %p, dataOut: %p)\n",
+ dataIn, dataOut);
+
+ dataOut->setLength(dataIn->getLength());
+
+#ifdef __SSE__
+ const __m128* in = reinterpret_cast<const __m128*>(dataIn->getData());
+ __m128* out = reinterpret_cast<__m128*>(dataOut->getData());
+ size_t sizeIn = dataIn->getLength() / sizeof(__m128);
+ size_t sizeOut = dataOut->getLength() / sizeof(__m128);
+ __u128 gain128;
+
+ if ((sizeIn % d_frameSize) != 0) {
+ PDEBUG("%zu != %zu\n", sizeIn, d_frameSize);
+ throw std::runtime_error(
+ "GainControl::process input size not valid!");
+ }
+
+ for (size_t i = 0; i < sizeIn; i += d_frameSize) {
+ gain128.m = computeGain(in, d_frameSize);
+ gain128.m = _mm_mul_ps(gain128.m, _mm_set1_ps(d_factor));
+
+ PDEBUG("********** Gain: %10f **********\n", gain128.f[0]);
+
+ ////////////////////////////////////////////////////////////////////////
+ // Applying gain to output data
+ ////////////////////////////////////////////////////////////////////////
+ for (size_t sample = 0; sample < d_frameSize; ++sample) {
+ out[sample] = _mm_mul_ps(in[sample], gain128.m);
+ }
+
+ in += d_frameSize;
+ out += d_frameSize;
+ }
+#else // !__SSE__
+ const complexf* in = reinterpret_cast<const complexf*>(dataIn->getData());
+ complexf* out = reinterpret_cast<complexf*>(dataOut->getData());
+ size_t sizeIn = dataIn->getLength() / sizeof(complexf);
+ size_t sizeOut = dataOut->getLength() / sizeof(complexf);
+ float gain;
+
+ if ((sizeIn % d_frameSize) != 0) {
+ PDEBUG("%zu != %zu\n", sizeIn, d_frameSize);
+ throw std::runtime_error(
+ "GainControl::process input size not valid!");
+ }
+
+ for (size_t i = 0; i < sizeIn; i += d_frameSize) {
+ gain = myFactor * computeGain(in, d_frameSize);
+
+ PDEBUG("********** Gain: %10f **********\n", gain);
+
+ ////////////////////////////////////////////////////////////////////////
+ // Applying gain to output data
+ ////////////////////////////////////////////////////////////////////////
+ for (size_t sample = 0; sample < d_frameSize; ++sample) {
+ out[sample] = in[sample] * gain;
+ }
+
+ in += d_frameSize;
+ out += d_frameSize;
+ }
+#endif // __SSE__
+
+ return sizeOut;
+}
+
+
+#ifdef __SSE__
+__m128 GainControl::computeGainFix(const __m128* in, size_t sizeIn)
+{
+ return _mm_set1_ps(512.0f);
+}
+#else // !__SSE__
+float GainControl::computeGainFix(const complexf* in, size_t sizeIn)
+{
+ return 512.0f;
+}
+#endif // __SSE__
+
+
+#ifdef __SSE__
+__m128 GainControl::computeGainMax(const __m128* in, size_t sizeIn)
+{
+ __u128 gain128;
+ __u128 min128;
+ __u128 max128;
+ __u128 tmp128;
+ static const __m128 factor128 = _mm_set1_ps(0x7fff);
+
+ ////////////////////////////////////////////////////////////////////////
+ // Computing max, min and average
+ ////////////////////////////////////////////////////////////////////////
+ min128.m = _mm_set1_ps(__FLT_MAX__);
+ max128.m = _mm_set1_ps(__FLT_MIN__);
+
+ for (size_t sample = 0; sample < sizeIn; ++sample) {
+ min128.m = _mm_min_ps(in[sample], min128.m);
+ max128.m = _mm_max_ps(in[sample], max128.m);
+ }
+
+ // Merging min
+ tmp128.m = _mm_shuffle_ps(min128.m, min128.m, _MM_SHUFFLE(0, 1, 2, 3));
+ min128.m = _mm_min_ps(min128.m, tmp128.m);
+ tmp128.m = _mm_shuffle_ps(min128.m, min128.m, _MM_SHUFFLE(1, 0, 3, 2));
+ min128.m = _mm_min_ps(min128.m, tmp128.m);
+ PDEBUG("********** Min: %10f **********\n", min128.f[0]);
+
+ // Merging max
+ tmp128.m = _mm_shuffle_ps(max128.m, max128.m, _MM_SHUFFLE(0, 1, 2, 3));
+ max128.m = _mm_max_ps(max128.m, tmp128.m);
+ tmp128.m = _mm_shuffle_ps(max128.m, max128.m, _MM_SHUFFLE(1, 0, 3, 2));
+ max128.m = _mm_max_ps(max128.m, tmp128.m);
+ PDEBUG("********** Max: %10f **********\n", max128.f[0]);
+
+ ////////////////////////////////////////////////////////////////////////////
+ // Computing gain
+ ////////////////////////////////////////////////////////////////////////////
+ // max = max(-min, max)
+ max128.m = _mm_max_ps(_mm_mul_ps(min128.m, _mm_set1_ps(-1.0f)), max128.m);
+ // Detect NULL
+ if ((int)max128.f[0] != 0) {
+ gain128.m = _mm_div_ps(factor128, max128.m);
+ } else {
+ gain128.m = _mm_set1_ps(1.0f);
+ }
+
+ return gain128.m;
+}
+#else // !__SSE__
+float GainControl::computeGainMax(const complexf* in, size_t sizeIn)
+{
+ float gain;
+ float min;
+ float max;
+ static const float factor = 0x7fff;
+
+ ////////////////////////////////////////////////////////////////////////
+ // Computing max, min and average
+ ////////////////////////////////////////////////////////////////////////
+ min = __FLT_MAX__;
+ max = __FLT_MIN__;
+
+ for (size_t sample = 0; sample < sizeIn; ++sample) {
+ if (in[sample].real() < min) {
+ min = in[sample].real();
+ }
+ if (in[sample].real() > max) {
+ max = in[sample].real();
+ }
+ if (in[sample].imag() < min) {
+ min = in[sample].imag();
+ }
+ if (in[sample].imag() > max) {
+ max = in[sample].imag();
+ }
+ }
+
+ PDEBUG("********** Min: %10f **********\n", min);
+ PDEBUG("********** Max: %10f **********\n", max);
+
+ ////////////////////////////////////////////////////////////////////////////
+ // Computing gain
+ ////////////////////////////////////////////////////////////////////////////
+ // gain = factor128 / max(-min, max)
+ min = -min;
+ if (min > max) {
+ max = min;
+ }
+
+ // Detect NULL
+ if ((int)max != 0) {
+ gain = factor / max;
+ } else {
+ gain = 1.0f;
+ }
+
+ return gain;
+}
+#endif // __SSE__
+
+
+#ifdef __SSE__
+__m128 GainControl::computeGainVar(const __m128* in, size_t sizeIn)
+{
+ __u128 gain128;
+ __u128 mean128;
+ __u128 var128;
+ __u128 tmp128;
+ static const __m128 factor128 = _mm_set1_ps(0x7fff);
+
+ mean128.m = _mm_setzero_ps();
+// var128.m = _mm_setzero_ps();
+
+ for (size_t sample = 0; sample < sizeIn; ++sample) {
+ __m128 delta128 = _mm_sub_ps(in[sample], mean128.m);
+ __m128 i128 = _mm_set1_ps(sample + 1);
+ __m128 q128 = _mm_div_ps(delta128, i128);
+ mean128.m = _mm_add_ps(mean128.m, q128);
+// var128.m = _mm_add_ps(var128.m,
+// _mm_mul_ps(delta128, _mm_sub_ps(in[sample], mean128.m)));
+ }
+
+ // Merging average
+ tmp128.m = _mm_shuffle_ps(mean128.m, mean128.m, _MM_SHUFFLE(1, 0, 3, 2));
+ mean128.m = _mm_add_ps(mean128.m, tmp128.m);
+ mean128.m = _mm_mul_ps(mean128.m, _mm_set1_ps(0.5f));
+ PDEBUG("********** Mean: %10f, %10f, %10f, %10f **********\n",
+ mean128.f[0], mean128.f[1], mean128.f[2], mean128.f[3]);
+
+ ////////////////////////////////////////////////////////////////////////
+ // Computing standard deviation
+ ////////////////////////////////////////////////////////////////////////
+ var128.m = _mm_setzero_ps();
+ for (size_t sample = 0; sample < sizeIn; ++sample) {
+ __m128 diff128 = _mm_sub_ps(in[sample], mean128.m);
+ __m128 delta128 = _mm_sub_ps(_mm_mul_ps(diff128, diff128), var128.m);
+ __m128 i128 = _mm_set1_ps(sample + 1);
+ __m128 q128 = _mm_div_ps(delta128, i128);
+ var128.m = _mm_add_ps(var128.m, q128);
+ }
+ // Merging average
+ tmp128.m = _mm_shuffle_ps(var128.m, var128.m, _MM_SHUFFLE(1, 0, 3, 2));
+ var128.m = _mm_add_ps(var128.m, tmp128.m);
+ var128.m = _mm_mul_ps(var128.m, _mm_set1_ps(0.5f));
+ var128.m = _mm_sqrt_ps(var128.m);
+ PDEBUG("********** Var: %10f, %10f, %10f, %10f **********\n",
+ var128.f[0], var128.f[1], var128.f[2], var128.f[3]);
+ var128.m = _mm_mul_ps(var128.m, _mm_set1_ps(4.0f));
+ PDEBUG("********** 4*Var: %10f, %10f, %10f, %10f **********\n",
+ var128.f[0], var128.f[1], var128.f[2], var128.f[3]);
+
+ ////////////////////////////////////////////////////////////////////////////
+ // Computing gain
+ ////////////////////////////////////////////////////////////////////////////
+ // gain = factor128 / max(real, imag)
+ // Detect NULL
+ if ((int)var128.f[0] != 0) {
+ gain128.m = _mm_div_ps(factor128,
+ _mm_max_ps(var128.m,
+ _mm_shuffle_ps(var128.m, var128.m, _MM_SHUFFLE(2, 3, 0, 1))));
+ } else {
+ gain128.m = _mm_set1_ps(1.0f);
+ }
+
+ return gain128.m;
+}
+#else // !__SSE__
+float GainControl::computeGainVar(const complexf* in, size_t sizeIn)
+{
+ float gain;
+ complexf mean;
+ complexf var;
+ static const float factor = 0x7fff;
+
+ mean = complexf(0.0f, 0.0f);
+
+ for (size_t sample = 0; sample < sizeIn; ++sample) {
+ complexf delta = in[sample] - mean;
+ float i = sample + 1;
+ complexf q = delta / i;
+ mean = mean + q;
+ }
+
+ PDEBUG("********** Mean: %10f, %10f **********\n", mean.real(), mean.imag());
+
+ ////////////////////////////////////////////////////////////////////////
+ // Computing standard deviation
+ ////////////////////////////////////////////////////////////////////////
+ var = complexf(0.0f, 0.0f);
+ for (size_t sample = 0; sample < sizeIn; ++sample) {
+ complexf diff = in[sample] - mean;
+ complexf delta = complexf(diff.real() * diff.real(), diff.imag() * diff.imag()) - var;
+ float i = sample + 1;
+ complexf q = delta / i;
+ var = var + q;
+ }
+ PDEBUG("********** Var: %10f, %10f **********\n", var.real(), var.imag());
+ var = var * 4.0f;
+ PDEBUG("********** 4*Var: %10f, %10f **********\n", var.real(), var.imag());
+
+ ////////////////////////////////////////////////////////////////////////////
+ // Computing gain
+ ////////////////////////////////////////////////////////////////////////////
+ // gain = factor128 / max(real, imag)
+ if (var.imag() > var.real()) {
+ var.real() = var.imag();
+ }
+ // Detect NULL
+ if ((int)var.real() == 0) {
+ gain = factor / var.real();
+ } else {
+ gain = 1.0f;
+ }
+
+ return gain;
+}
+#endif // __SSE__
diff --git a/src/GainControl.h b/src/GainControl.h
new file mode 100644
index 0000000..2f7b9d1
--- /dev/null
+++ b/src/GainControl.h
@@ -0,0 +1,74 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+ Her Majesty the Queen in Right of Canada (Communications Research
+ Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GAIN_CONTROL_H
+#define GAIN_CONTROL_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "ModCodec.h"
+
+
+#include <sys/types.h>
+#include <complex>
+#ifdef __SSE__
+# include <xmmintrin.h>
+#endif
+
+
+typedef std::complex<float> complexf;
+
+enum GainMode { GAIN_FIX, GAIN_MAX, GAIN_VAR };
+
+class GainControl : public ModCodec
+{
+public:
+ GainControl(size_t frameSize, GainMode mode = GAIN_VAR, float factor = 1.0f);
+ virtual ~GainControl();
+ GainControl(const GainControl&);
+ GainControl& operator=(const GainControl&);
+
+
+ int process(Buffer* const dataIn, Buffer* dataOut);
+ const char* name() { return "GainControl"; }
+
+protected:
+ size_t d_frameSize;
+ float d_factor;
+#ifdef __SSE__
+ __m128 (*computeGain)(const __m128* in, size_t sizeIn);
+ __m128 static computeGainFix(const __m128* in, size_t sizeIn);
+ __m128 static computeGainMax(const __m128* in, size_t sizeIn);
+ __m128 static computeGainVar(const __m128* in, size_t sizeIn);
+#else // !__SSE__
+ float (*computeGain)(const complexf* in, size_t sizeIn);
+ float static computeGainFix(const complexf* in, size_t sizeIn);
+ float static computeGainMax(const complexf* in, size_t sizeIn);
+ float static computeGainVar(const complexf* in, size_t sizeIn);
+#endif // __SSE__
+};
+
+
+#endif // GAIN_CONTROL_H
diff --git a/src/GuardIntervalInserter.cpp b/src/GuardIntervalInserter.cpp
new file mode 100644
index 0000000..2fb4668
--- /dev/null
+++ b/src/GuardIntervalInserter.cpp
@@ -0,0 +1,107 @@
+/*
+ Copyright (C) 2005, 2206, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "GuardIntervalInserter.h"
+#include "PcDebug.h"
+
+
+#include <sys/types.h>
+#include <string.h>
+#include <stdexcept>
+#include <complex>
+
+typedef std::complex<float> complexf;
+
+
+GuardIntervalInserter::GuardIntervalInserter(size_t nbSymbols,
+ size_t spacing,
+ size_t nullSize,
+ size_t symSize) :
+ ModCodec(ModFormat(d_nbSymbols * d_spacing * sizeof(complexf)),
+ ModFormat((d_nullSize + (d_nbSymbols * d_symSize))
+ * sizeof(complexf))),
+ d_nbSymbols(nbSymbols),
+ d_spacing(spacing),
+ d_nullSize(nullSize),
+ d_symSize(symSize)
+{
+ PDEBUG("GuardIntervalInserter::GuardIntervalInserter(%zu, %zu, %zu, %zu)"
+ " @ %p\n", nbSymbols, spacing, nullSize, symSize, this);
+
+ if (d_nullSize) {
+ myHasNull = true;
+ myInputFormat.size((d_nbSymbols + 1) * d_spacing * sizeof(complexf));
+ } else {
+ myHasNull = false;
+ }
+}
+
+
+GuardIntervalInserter::~GuardIntervalInserter()
+{
+ PDEBUG("GuardIntervalInserter::~GuardIntervalInserter() @ %p\n", this);
+
+}
+
+
+int GuardIntervalInserter::process(Buffer* const dataIn, Buffer* dataOut)
+{
+ PDEBUG("GuardIntervalInserter::process(dataIn: %p, dataOut: %p)\n",
+ dataIn, dataOut);
+
+ dataOut->setLength((d_nullSize + (d_nbSymbols * d_symSize))
+ * sizeof(complexf));
+
+ const complexf* in = reinterpret_cast<const complexf*>(dataIn->getData());
+ complexf* out = reinterpret_cast<complexf*>(dataOut->getData());
+ size_t sizeIn = dataIn->getLength() / sizeof(complexf);
+
+ if (sizeIn != (d_nbSymbols + (myHasNull ? 1 : 0)) * d_spacing) {
+ PDEBUG("Nb symbols: %zu\n", d_nbSymbols);
+ PDEBUG("Spacing: %zu\n", d_spacing);
+ PDEBUG("Null size: %zu\n", d_nullSize);
+ PDEBUG("Sym size: %zu\n", d_symSize);
+ PDEBUG("\n%zu != %zu\n", sizeIn, (d_nbSymbols + 1) * d_spacing);
+ throw std::runtime_error(
+ "GuardIntervalInserter::process input size not valid!");
+ }
+
+ // Null symbol
+ if (myHasNull) {
+ // end - (nullSize - spacing) = 2 * spacing - nullSize
+ memcpy(out, &in[2 * d_spacing - d_nullSize],
+ (d_nullSize - d_spacing) * sizeof(complexf));
+ memcpy(&out[d_nullSize - d_spacing], in, d_spacing * sizeof(complexf));
+ in += d_spacing;
+ out += d_nullSize;
+ }
+ // Data symbols
+ for (size_t i = 0; i < d_nbSymbols; ++i) {
+ // end - (nullSize - spacing) = 2 * spacing - nullSize
+ memcpy(out, &in[2 * d_spacing - d_symSize],
+ (d_symSize - d_spacing) * sizeof(complexf));
+ memcpy(&out[d_symSize - d_spacing], in, d_spacing * sizeof(complexf));
+ in += d_spacing;
+ out += d_symSize;
+ }
+
+ return sizeIn;
+}
diff --git a/src/GuardIntervalInserter.h b/src/GuardIntervalInserter.h
new file mode 100644
index 0000000..d2fc49c
--- /dev/null
+++ b/src/GuardIntervalInserter.h
@@ -0,0 +1,57 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GUARD_INTERVAL_INSERTER_H
+#define GUARD_INTERVAL_INSERTER_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "ModCodec.h"
+
+
+#include <sys/types.h>
+
+
+class GuardIntervalInserter : public ModCodec
+{
+public:
+ GuardIntervalInserter(size_t nbSymbols, size_t spacing, size_t nullSize, size_t symSize);
+ virtual ~GuardIntervalInserter();
+ GuardIntervalInserter(const GuardIntervalInserter&);
+ GuardIntervalInserter& operator=(const GuardIntervalInserter&);
+
+
+ int process(Buffer* const dataIn, Buffer* dataOut);
+ const char* name() { return "GuardIntervalInserter"; }
+
+protected:
+ size_t d_nbSymbols;
+ size_t d_spacing;
+ size_t d_nullSize;
+ size_t d_symSize;
+ bool myHasNull;
+};
+
+
+#endif // GUARD_INTERVAL_INSERTER_H
diff --git a/src/InputMemory.cpp b/src/InputMemory.cpp
new file mode 100644
index 0000000..2ae7277
--- /dev/null
+++ b/src/InputMemory.cpp
@@ -0,0 +1,61 @@
+/*
+ Copyright (C) 2007, 2008, 2009, 2010, 2011 Her Majesty the Queen in
+ Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "InputMemory.h"
+#include "PcDebug.h"
+
+#include <stdexcept>
+#include <string.h>
+
+
+InputMemory::InputMemory(Buffer* dataIn)
+ : ModInput(ModFormat(0), ModFormat(1))
+{
+ PDEBUG("InputMemory::InputMemory(%p) @ %p\n",
+ dataIn, this);
+
+ setInput(dataIn);
+}
+
+
+InputMemory::~InputMemory()
+{
+ PDEBUG("InputMemory::~InputMemory() @ %p\n", this);
+}
+
+
+void InputMemory::setInput(Buffer* dataIn)
+{
+ myDataIn = dataIn;
+ myOutputFormat.size(dataIn->getLength());
+}
+
+
+int InputMemory::process(Buffer* dataIn, Buffer* dataOut)
+{
+ PDEBUG("InputMemory::process"
+ "(dataIn: %p, dataOut: %p)\n",
+ dataIn, dataOut);
+
+ *dataOut = *myDataIn;
+
+ return dataOut->getLength();
+}
diff --git a/src/InputMemory.h b/src/InputMemory.h
new file mode 100644
index 0000000..6ddff52
--- /dev/null
+++ b/src/InputMemory.h
@@ -0,0 +1,48 @@
+/*
+ Copyright (C) 2007, 2008, 2009, 2010, 2011 Her Majesty the Queen in
+ Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef INPUT_MEMORY_H
+#define INPUT_MEMORY_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "ModInput.h"
+
+
+class InputMemory : public ModInput
+{
+public:
+ InputMemory(Buffer* dataIn);
+ virtual ~InputMemory();
+ virtual int process(Buffer* dataIn, Buffer* dataOut);
+ const char* name() { return "InputMemory"; }
+
+ void setInput(Buffer* dataIn);
+
+protected:
+ Buffer *myDataIn;
+};
+
+
+#endif // INPUT_MEMORY_H
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..a46bec5
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,83 @@
+# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Her Majesty the
+# Queen in Right of Canada (Communications Research Center Canada)
+
+# This file is part of CRC-DADMOD.
+#
+# CRC-DADMOD is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# CRC-DADMOD is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+
+
+FFT_DIR=$(top_builddir)/lib/kiss_fft129
+FFT_INC=-I$(FFT_DIR) -I$(FFT_DIR)/tools
+FFT_SRC=$(FFT_DIR)/kiss_fft.c $(FFT_DIR)/kiss_fft.h $(FFT_DIR)/tools/kiss_fftr.c $(FFT_DIR)/tools/kiss_fftr.h kiss_fftsimd.c kiss_fftsimd.h
+FFT_FLG=-ffast-math
+
+.PHONY: kiss_fft129 reed-solomon-4.0
+
+bin_PROGRAMS = crc-dabmod
+
+DabModulator.cpp: $(FFT_DIR)
+
+BUILT_SOURCES: $(FFT_DIR)
+
+$(FFT_DIR):
+ if [ ! -e $(FFT_DIR) ]; then \
+ tar xzf $(top_srcdir)/lib/kiss_fft129.tar.gz -C $(top_builddir)/lib; \
+ fi
+
+crc_dabmod_CPPFLAGS = $(FFT_INC) $(FFT_FLG) -msse -msse2
+crc_dabmod_SOURCES = DabMod.cpp \
+ PcDebug.h \
+ porting.c porting.h \
+ DabModulator.cpp DabModulator.h \
+ Buffer.cpp Buffer.h \
+ ModCodec.cpp ModCodec.h \
+ ModPlugin.cpp ModPlugin.h \
+ ModFormat.cpp ModFormat.h \
+ EtiReader.cpp EtiReader.h \
+ Eti.cpp Eti.h \
+ FicSource.cpp FicSource.h \
+ ModInput.cpp ModInput.h \
+ PuncturingRule.cpp PuncturingRule.h \
+ PuncturingEncoder.cpp PuncturingEncoder.h \
+ SubchannelSource.cpp SubchannelSource.h \
+ Flowgraph.cpp Flowgraph.h \
+ GainControl.cpp GainControl.h \
+ OutputMemory.cpp OutputMemory.h \
+ ModOutput.cpp ModOutput.h \
+ InputMemory.cpp InputMemory.h \
+ OutputFile.cpp OutputFile.h \
+ FrameMultiplexer.cpp FrameMultiplexer.h \
+ ModMux.cpp ModMux.h \
+ PrbsGenerator.cpp PrbsGenerator.h \
+ BlockPartitioner.cpp BlockPartitioner.h \
+ QpskSymbolMapper.cpp QpskSymbolMapper.h \
+ FrequencyInterleaver.cpp FrequencyInterleaver.h \
+ PhaseReference.cpp PhaseReference.h \
+ DifferentialModulator.cpp DifferentialModulator.h \
+ NullSymbol.cpp NullSymbol.h \
+ SignalMultiplexer.cpp SignalMultiplexer.h \
+ CicEqualizer.cpp CicEqualizer.h \
+ OfdmGenerator.cpp OfdmGenerator.h \
+ GuardIntervalInserter.cpp GuardIntervalInserter.h \
+ Resampler.cpp Resampler.h \
+ ConvEncoder.cpp ConvEncoder.h \
+ TimeInterleaver.cpp TimeInterleaver.h
+nodist_crc_dabmod_SOURCES =$(FFT_SRC)
+
+dist_bin_SCRIPTS =crc-dwap.py
+
+EXTRA_DIST =kiss_fftsimd.c kiss_fftsimd.h
+
+clean-local:
+ rm -rf $(FFT_DIR)
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 0000000..5a95e45
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,1241 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Her Majesty the
+# Queen in Right of Canada (Communications Research Center Canada)
+
+# This file is part of CRC-DADMOD.
+#
+# CRC-DADMOD is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# CRC-DADMOD is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = crc-dabmod$(EXEEXT)
+subdir = src
+DIST_COMMON = $(dist_bin_SCRIPTS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_crc_dabmod_OBJECTS = crc_dabmod-DabMod.$(OBJEXT) \
+ crc_dabmod-porting.$(OBJEXT) crc_dabmod-DabModulator.$(OBJEXT) \
+ crc_dabmod-Buffer.$(OBJEXT) crc_dabmod-ModCodec.$(OBJEXT) \
+ crc_dabmod-ModPlugin.$(OBJEXT) crc_dabmod-ModFormat.$(OBJEXT) \
+ crc_dabmod-EtiReader.$(OBJEXT) crc_dabmod-Eti.$(OBJEXT) \
+ crc_dabmod-FicSource.$(OBJEXT) crc_dabmod-ModInput.$(OBJEXT) \
+ crc_dabmod-PuncturingRule.$(OBJEXT) \
+ crc_dabmod-PuncturingEncoder.$(OBJEXT) \
+ crc_dabmod-SubchannelSource.$(OBJEXT) \
+ crc_dabmod-Flowgraph.$(OBJEXT) \
+ crc_dabmod-GainControl.$(OBJEXT) \
+ crc_dabmod-OutputMemory.$(OBJEXT) \
+ crc_dabmod-ModOutput.$(OBJEXT) \
+ crc_dabmod-InputMemory.$(OBJEXT) \
+ crc_dabmod-OutputFile.$(OBJEXT) \
+ crc_dabmod-FrameMultiplexer.$(OBJEXT) \
+ crc_dabmod-ModMux.$(OBJEXT) crc_dabmod-PrbsGenerator.$(OBJEXT) \
+ crc_dabmod-BlockPartitioner.$(OBJEXT) \
+ crc_dabmod-QpskSymbolMapper.$(OBJEXT) \
+ crc_dabmod-FrequencyInterleaver.$(OBJEXT) \
+ crc_dabmod-PhaseReference.$(OBJEXT) \
+ crc_dabmod-DifferentialModulator.$(OBJEXT) \
+ crc_dabmod-NullSymbol.$(OBJEXT) \
+ crc_dabmod-SignalMultiplexer.$(OBJEXT) \
+ crc_dabmod-CicEqualizer.$(OBJEXT) \
+ crc_dabmod-OfdmGenerator.$(OBJEXT) \
+ crc_dabmod-GuardIntervalInserter.$(OBJEXT) \
+ crc_dabmod-Resampler.$(OBJEXT) \
+ crc_dabmod-ConvEncoder.$(OBJEXT) \
+ crc_dabmod-TimeInterleaver.$(OBJEXT)
+am__objects_1 = crc_dabmod-kiss_fft.$(OBJEXT) \
+ crc_dabmod-kiss_fftr.$(OBJEXT) \
+ crc_dabmod-kiss_fftsimd.$(OBJEXT)
+nodist_crc_dabmod_OBJECTS = $(am__objects_1)
+crc_dabmod_OBJECTS = $(am_crc_dabmod_OBJECTS) \
+ $(nodist_crc_dabmod_OBJECTS)
+crc_dabmod_LDADD = $(LDADD)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+SCRIPTS = $(dist_bin_SCRIPTS)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+SOURCES = $(crc_dabmod_SOURCES) $(nodist_crc_dabmod_SOURCES)
+DIST_SOURCES = $(crc_dabmod_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+FFT_DIR = $(top_builddir)/lib/kiss_fft129
+FFT_INC = -I$(FFT_DIR) -I$(FFT_DIR)/tools
+FFT_SRC = $(FFT_DIR)/kiss_fft.c $(FFT_DIR)/kiss_fft.h $(FFT_DIR)/tools/kiss_fftr.c $(FFT_DIR)/tools/kiss_fftr.h kiss_fftsimd.c kiss_fftsimd.h
+FFT_FLG = -ffast-math
+crc_dabmod_CPPFLAGS = $(FFT_INC) $(FFT_FLG) -msse -msse2
+crc_dabmod_SOURCES = DabMod.cpp \
+ PcDebug.h \
+ porting.c porting.h \
+ DabModulator.cpp DabModulator.h \
+ Buffer.cpp Buffer.h \
+ ModCodec.cpp ModCodec.h \
+ ModPlugin.cpp ModPlugin.h \
+ ModFormat.cpp ModFormat.h \
+ EtiReader.cpp EtiReader.h \
+ Eti.cpp Eti.h \
+ FicSource.cpp FicSource.h \
+ ModInput.cpp ModInput.h \
+ PuncturingRule.cpp PuncturingRule.h \
+ PuncturingEncoder.cpp PuncturingEncoder.h \
+ SubchannelSource.cpp SubchannelSource.h \
+ Flowgraph.cpp Flowgraph.h \
+ GainControl.cpp GainControl.h \
+ OutputMemory.cpp OutputMemory.h \
+ ModOutput.cpp ModOutput.h \
+ InputMemory.cpp InputMemory.h \
+ OutputFile.cpp OutputFile.h \
+ FrameMultiplexer.cpp FrameMultiplexer.h \
+ ModMux.cpp ModMux.h \
+ PrbsGenerator.cpp PrbsGenerator.h \
+ BlockPartitioner.cpp BlockPartitioner.h \
+ QpskSymbolMapper.cpp QpskSymbolMapper.h \
+ FrequencyInterleaver.cpp FrequencyInterleaver.h \
+ PhaseReference.cpp PhaseReference.h \
+ DifferentialModulator.cpp DifferentialModulator.h \
+ NullSymbol.cpp NullSymbol.h \
+ SignalMultiplexer.cpp SignalMultiplexer.h \
+ CicEqualizer.cpp CicEqualizer.h \
+ OfdmGenerator.cpp OfdmGenerator.h \
+ GuardIntervalInserter.cpp GuardIntervalInserter.h \
+ Resampler.cpp Resampler.h \
+ ConvEncoder.cpp ConvEncoder.h \
+ TimeInterleaver.cpp TimeInterleaver.h
+
+nodist_crc_dabmod_SOURCES = $(FFT_SRC)
+dist_bin_SCRIPTS = crc-dwap.py
+EXTRA_DIST = kiss_fftsimd.c kiss_fftsimd.h
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cpp .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+crc-dabmod$(EXEEXT): $(crc_dabmod_OBJECTS) $(crc_dabmod_DEPENDENCIES)
+ @rm -f crc-dabmod$(EXEEXT)
+ $(CXXLINK) $(crc_dabmod_OBJECTS) $(crc_dabmod_LDADD) $(LIBS)
+install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-dist_binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-BlockPartitioner.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-Buffer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-CicEqualizer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-ConvEncoder.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-DabMod.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-DabModulator.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-DifferentialModulator.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-Eti.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-EtiReader.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-FicSource.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-Flowgraph.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-FrameMultiplexer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-FrequencyInterleaver.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-GainControl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-GuardIntervalInserter.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-InputMemory.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-ModCodec.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-ModFormat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-ModInput.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-ModMux.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-ModOutput.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-ModPlugin.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-NullSymbol.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-OfdmGenerator.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-OutputFile.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-OutputMemory.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-PhaseReference.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-PrbsGenerator.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-PuncturingEncoder.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-PuncturingRule.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-QpskSymbolMapper.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-Resampler.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-SignalMultiplexer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-SubchannelSource.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-TimeInterleaver.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-kiss_fft.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-kiss_fftr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-kiss_fftsimd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc_dabmod-porting.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+crc_dabmod-porting.o: porting.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crc_dabmod-porting.o -MD -MP -MF $(DEPDIR)/crc_dabmod-porting.Tpo -c -o crc_dabmod-porting.o `test -f 'porting.c' || echo '$(srcdir)/'`porting.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-porting.Tpo $(DEPDIR)/crc_dabmod-porting.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='porting.c' object='crc_dabmod-porting.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crc_dabmod-porting.o `test -f 'porting.c' || echo '$(srcdir)/'`porting.c
+
+crc_dabmod-porting.obj: porting.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crc_dabmod-porting.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-porting.Tpo -c -o crc_dabmod-porting.obj `if test -f 'porting.c'; then $(CYGPATH_W) 'porting.c'; else $(CYGPATH_W) '$(srcdir)/porting.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-porting.Tpo $(DEPDIR)/crc_dabmod-porting.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='porting.c' object='crc_dabmod-porting.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crc_dabmod-porting.obj `if test -f 'porting.c'; then $(CYGPATH_W) 'porting.c'; else $(CYGPATH_W) '$(srcdir)/porting.c'; fi`
+
+crc_dabmod-kiss_fft.o: $(FFT_DIR)/kiss_fft.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crc_dabmod-kiss_fft.o -MD -MP -MF $(DEPDIR)/crc_dabmod-kiss_fft.Tpo -c -o crc_dabmod-kiss_fft.o `test -f '$(FFT_DIR)/kiss_fft.c' || echo '$(srcdir)/'`$(FFT_DIR)/kiss_fft.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-kiss_fft.Tpo $(DEPDIR)/crc_dabmod-kiss_fft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(FFT_DIR)/kiss_fft.c' object='crc_dabmod-kiss_fft.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crc_dabmod-kiss_fft.o `test -f '$(FFT_DIR)/kiss_fft.c' || echo '$(srcdir)/'`$(FFT_DIR)/kiss_fft.c
+
+crc_dabmod-kiss_fft.obj: $(FFT_DIR)/kiss_fft.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crc_dabmod-kiss_fft.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-kiss_fft.Tpo -c -o crc_dabmod-kiss_fft.obj `if test -f '$(FFT_DIR)/kiss_fft.c'; then $(CYGPATH_W) '$(FFT_DIR)/kiss_fft.c'; else $(CYGPATH_W) '$(srcdir)/$(FFT_DIR)/kiss_fft.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-kiss_fft.Tpo $(DEPDIR)/crc_dabmod-kiss_fft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(FFT_DIR)/kiss_fft.c' object='crc_dabmod-kiss_fft.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crc_dabmod-kiss_fft.obj `if test -f '$(FFT_DIR)/kiss_fft.c'; then $(CYGPATH_W) '$(FFT_DIR)/kiss_fft.c'; else $(CYGPATH_W) '$(srcdir)/$(FFT_DIR)/kiss_fft.c'; fi`
+
+crc_dabmod-kiss_fftr.o: $(FFT_DIR)/tools/kiss_fftr.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crc_dabmod-kiss_fftr.o -MD -MP -MF $(DEPDIR)/crc_dabmod-kiss_fftr.Tpo -c -o crc_dabmod-kiss_fftr.o `test -f '$(FFT_DIR)/tools/kiss_fftr.c' || echo '$(srcdir)/'`$(FFT_DIR)/tools/kiss_fftr.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-kiss_fftr.Tpo $(DEPDIR)/crc_dabmod-kiss_fftr.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(FFT_DIR)/tools/kiss_fftr.c' object='crc_dabmod-kiss_fftr.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crc_dabmod-kiss_fftr.o `test -f '$(FFT_DIR)/tools/kiss_fftr.c' || echo '$(srcdir)/'`$(FFT_DIR)/tools/kiss_fftr.c
+
+crc_dabmod-kiss_fftr.obj: $(FFT_DIR)/tools/kiss_fftr.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crc_dabmod-kiss_fftr.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-kiss_fftr.Tpo -c -o crc_dabmod-kiss_fftr.obj `if test -f '$(FFT_DIR)/tools/kiss_fftr.c'; then $(CYGPATH_W) '$(FFT_DIR)/tools/kiss_fftr.c'; else $(CYGPATH_W) '$(srcdir)/$(FFT_DIR)/tools/kiss_fftr.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-kiss_fftr.Tpo $(DEPDIR)/crc_dabmod-kiss_fftr.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(FFT_DIR)/tools/kiss_fftr.c' object='crc_dabmod-kiss_fftr.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crc_dabmod-kiss_fftr.obj `if test -f '$(FFT_DIR)/tools/kiss_fftr.c'; then $(CYGPATH_W) '$(FFT_DIR)/tools/kiss_fftr.c'; else $(CYGPATH_W) '$(srcdir)/$(FFT_DIR)/tools/kiss_fftr.c'; fi`
+
+crc_dabmod-kiss_fftsimd.o: kiss_fftsimd.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crc_dabmod-kiss_fftsimd.o -MD -MP -MF $(DEPDIR)/crc_dabmod-kiss_fftsimd.Tpo -c -o crc_dabmod-kiss_fftsimd.o `test -f 'kiss_fftsimd.c' || echo '$(srcdir)/'`kiss_fftsimd.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-kiss_fftsimd.Tpo $(DEPDIR)/crc_dabmod-kiss_fftsimd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kiss_fftsimd.c' object='crc_dabmod-kiss_fftsimd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crc_dabmod-kiss_fftsimd.o `test -f 'kiss_fftsimd.c' || echo '$(srcdir)/'`kiss_fftsimd.c
+
+crc_dabmod-kiss_fftsimd.obj: kiss_fftsimd.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crc_dabmod-kiss_fftsimd.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-kiss_fftsimd.Tpo -c -o crc_dabmod-kiss_fftsimd.obj `if test -f 'kiss_fftsimd.c'; then $(CYGPATH_W) 'kiss_fftsimd.c'; else $(CYGPATH_W) '$(srcdir)/kiss_fftsimd.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-kiss_fftsimd.Tpo $(DEPDIR)/crc_dabmod-kiss_fftsimd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kiss_fftsimd.c' object='crc_dabmod-kiss_fftsimd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crc_dabmod-kiss_fftsimd.obj `if test -f 'kiss_fftsimd.c'; then $(CYGPATH_W) 'kiss_fftsimd.c'; else $(CYGPATH_W) '$(srcdir)/kiss_fftsimd.c'; fi`
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+crc_dabmod-DabMod.o: DabMod.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-DabMod.o -MD -MP -MF $(DEPDIR)/crc_dabmod-DabMod.Tpo -c -o crc_dabmod-DabMod.o `test -f 'DabMod.cpp' || echo '$(srcdir)/'`DabMod.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-DabMod.Tpo $(DEPDIR)/crc_dabmod-DabMod.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='DabMod.cpp' object='crc_dabmod-DabMod.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-DabMod.o `test -f 'DabMod.cpp' || echo '$(srcdir)/'`DabMod.cpp
+
+crc_dabmod-DabMod.obj: DabMod.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-DabMod.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-DabMod.Tpo -c -o crc_dabmod-DabMod.obj `if test -f 'DabMod.cpp'; then $(CYGPATH_W) 'DabMod.cpp'; else $(CYGPATH_W) '$(srcdir)/DabMod.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-DabMod.Tpo $(DEPDIR)/crc_dabmod-DabMod.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='DabMod.cpp' object='crc_dabmod-DabMod.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-DabMod.obj `if test -f 'DabMod.cpp'; then $(CYGPATH_W) 'DabMod.cpp'; else $(CYGPATH_W) '$(srcdir)/DabMod.cpp'; fi`
+
+crc_dabmod-DabModulator.o: DabModulator.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-DabModulator.o -MD -MP -MF $(DEPDIR)/crc_dabmod-DabModulator.Tpo -c -o crc_dabmod-DabModulator.o `test -f 'DabModulator.cpp' || echo '$(srcdir)/'`DabModulator.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-DabModulator.Tpo $(DEPDIR)/crc_dabmod-DabModulator.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='DabModulator.cpp' object='crc_dabmod-DabModulator.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-DabModulator.o `test -f 'DabModulator.cpp' || echo '$(srcdir)/'`DabModulator.cpp
+
+crc_dabmod-DabModulator.obj: DabModulator.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-DabModulator.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-DabModulator.Tpo -c -o crc_dabmod-DabModulator.obj `if test -f 'DabModulator.cpp'; then $(CYGPATH_W) 'DabModulator.cpp'; else $(CYGPATH_W) '$(srcdir)/DabModulator.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-DabModulator.Tpo $(DEPDIR)/crc_dabmod-DabModulator.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='DabModulator.cpp' object='crc_dabmod-DabModulator.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-DabModulator.obj `if test -f 'DabModulator.cpp'; then $(CYGPATH_W) 'DabModulator.cpp'; else $(CYGPATH_W) '$(srcdir)/DabModulator.cpp'; fi`
+
+crc_dabmod-Buffer.o: Buffer.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-Buffer.o -MD -MP -MF $(DEPDIR)/crc_dabmod-Buffer.Tpo -c -o crc_dabmod-Buffer.o `test -f 'Buffer.cpp' || echo '$(srcdir)/'`Buffer.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-Buffer.Tpo $(DEPDIR)/crc_dabmod-Buffer.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Buffer.cpp' object='crc_dabmod-Buffer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-Buffer.o `test -f 'Buffer.cpp' || echo '$(srcdir)/'`Buffer.cpp
+
+crc_dabmod-Buffer.obj: Buffer.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-Buffer.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-Buffer.Tpo -c -o crc_dabmod-Buffer.obj `if test -f 'Buffer.cpp'; then $(CYGPATH_W) 'Buffer.cpp'; else $(CYGPATH_W) '$(srcdir)/Buffer.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-Buffer.Tpo $(DEPDIR)/crc_dabmod-Buffer.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Buffer.cpp' object='crc_dabmod-Buffer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-Buffer.obj `if test -f 'Buffer.cpp'; then $(CYGPATH_W) 'Buffer.cpp'; else $(CYGPATH_W) '$(srcdir)/Buffer.cpp'; fi`
+
+crc_dabmod-ModCodec.o: ModCodec.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-ModCodec.o -MD -MP -MF $(DEPDIR)/crc_dabmod-ModCodec.Tpo -c -o crc_dabmod-ModCodec.o `test -f 'ModCodec.cpp' || echo '$(srcdir)/'`ModCodec.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-ModCodec.Tpo $(DEPDIR)/crc_dabmod-ModCodec.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ModCodec.cpp' object='crc_dabmod-ModCodec.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-ModCodec.o `test -f 'ModCodec.cpp' || echo '$(srcdir)/'`ModCodec.cpp
+
+crc_dabmod-ModCodec.obj: ModCodec.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-ModCodec.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-ModCodec.Tpo -c -o crc_dabmod-ModCodec.obj `if test -f 'ModCodec.cpp'; then $(CYGPATH_W) 'ModCodec.cpp'; else $(CYGPATH_W) '$(srcdir)/ModCodec.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-ModCodec.Tpo $(DEPDIR)/crc_dabmod-ModCodec.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ModCodec.cpp' object='crc_dabmod-ModCodec.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-ModCodec.obj `if test -f 'ModCodec.cpp'; then $(CYGPATH_W) 'ModCodec.cpp'; else $(CYGPATH_W) '$(srcdir)/ModCodec.cpp'; fi`
+
+crc_dabmod-ModPlugin.o: ModPlugin.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-ModPlugin.o -MD -MP -MF $(DEPDIR)/crc_dabmod-ModPlugin.Tpo -c -o crc_dabmod-ModPlugin.o `test -f 'ModPlugin.cpp' || echo '$(srcdir)/'`ModPlugin.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-ModPlugin.Tpo $(DEPDIR)/crc_dabmod-ModPlugin.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ModPlugin.cpp' object='crc_dabmod-ModPlugin.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-ModPlugin.o `test -f 'ModPlugin.cpp' || echo '$(srcdir)/'`ModPlugin.cpp
+
+crc_dabmod-ModPlugin.obj: ModPlugin.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-ModPlugin.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-ModPlugin.Tpo -c -o crc_dabmod-ModPlugin.obj `if test -f 'ModPlugin.cpp'; then $(CYGPATH_W) 'ModPlugin.cpp'; else $(CYGPATH_W) '$(srcdir)/ModPlugin.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-ModPlugin.Tpo $(DEPDIR)/crc_dabmod-ModPlugin.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ModPlugin.cpp' object='crc_dabmod-ModPlugin.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-ModPlugin.obj `if test -f 'ModPlugin.cpp'; then $(CYGPATH_W) 'ModPlugin.cpp'; else $(CYGPATH_W) '$(srcdir)/ModPlugin.cpp'; fi`
+
+crc_dabmod-ModFormat.o: ModFormat.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-ModFormat.o -MD -MP -MF $(DEPDIR)/crc_dabmod-ModFormat.Tpo -c -o crc_dabmod-ModFormat.o `test -f 'ModFormat.cpp' || echo '$(srcdir)/'`ModFormat.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-ModFormat.Tpo $(DEPDIR)/crc_dabmod-ModFormat.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ModFormat.cpp' object='crc_dabmod-ModFormat.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-ModFormat.o `test -f 'ModFormat.cpp' || echo '$(srcdir)/'`ModFormat.cpp
+
+crc_dabmod-ModFormat.obj: ModFormat.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-ModFormat.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-ModFormat.Tpo -c -o crc_dabmod-ModFormat.obj `if test -f 'ModFormat.cpp'; then $(CYGPATH_W) 'ModFormat.cpp'; else $(CYGPATH_W) '$(srcdir)/ModFormat.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-ModFormat.Tpo $(DEPDIR)/crc_dabmod-ModFormat.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ModFormat.cpp' object='crc_dabmod-ModFormat.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-ModFormat.obj `if test -f 'ModFormat.cpp'; then $(CYGPATH_W) 'ModFormat.cpp'; else $(CYGPATH_W) '$(srcdir)/ModFormat.cpp'; fi`
+
+crc_dabmod-EtiReader.o: EtiReader.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-EtiReader.o -MD -MP -MF $(DEPDIR)/crc_dabmod-EtiReader.Tpo -c -o crc_dabmod-EtiReader.o `test -f 'EtiReader.cpp' || echo '$(srcdir)/'`EtiReader.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-EtiReader.Tpo $(DEPDIR)/crc_dabmod-EtiReader.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='EtiReader.cpp' object='crc_dabmod-EtiReader.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-EtiReader.o `test -f 'EtiReader.cpp' || echo '$(srcdir)/'`EtiReader.cpp
+
+crc_dabmod-EtiReader.obj: EtiReader.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-EtiReader.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-EtiReader.Tpo -c -o crc_dabmod-EtiReader.obj `if test -f 'EtiReader.cpp'; then $(CYGPATH_W) 'EtiReader.cpp'; else $(CYGPATH_W) '$(srcdir)/EtiReader.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-EtiReader.Tpo $(DEPDIR)/crc_dabmod-EtiReader.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='EtiReader.cpp' object='crc_dabmod-EtiReader.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-EtiReader.obj `if test -f 'EtiReader.cpp'; then $(CYGPATH_W) 'EtiReader.cpp'; else $(CYGPATH_W) '$(srcdir)/EtiReader.cpp'; fi`
+
+crc_dabmod-Eti.o: Eti.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-Eti.o -MD -MP -MF $(DEPDIR)/crc_dabmod-Eti.Tpo -c -o crc_dabmod-Eti.o `test -f 'Eti.cpp' || echo '$(srcdir)/'`Eti.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-Eti.Tpo $(DEPDIR)/crc_dabmod-Eti.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Eti.cpp' object='crc_dabmod-Eti.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-Eti.o `test -f 'Eti.cpp' || echo '$(srcdir)/'`Eti.cpp
+
+crc_dabmod-Eti.obj: Eti.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-Eti.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-Eti.Tpo -c -o crc_dabmod-Eti.obj `if test -f 'Eti.cpp'; then $(CYGPATH_W) 'Eti.cpp'; else $(CYGPATH_W) '$(srcdir)/Eti.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-Eti.Tpo $(DEPDIR)/crc_dabmod-Eti.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Eti.cpp' object='crc_dabmod-Eti.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-Eti.obj `if test -f 'Eti.cpp'; then $(CYGPATH_W) 'Eti.cpp'; else $(CYGPATH_W) '$(srcdir)/Eti.cpp'; fi`
+
+crc_dabmod-FicSource.o: FicSource.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-FicSource.o -MD -MP -MF $(DEPDIR)/crc_dabmod-FicSource.Tpo -c -o crc_dabmod-FicSource.o `test -f 'FicSource.cpp' || echo '$(srcdir)/'`FicSource.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-FicSource.Tpo $(DEPDIR)/crc_dabmod-FicSource.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='FicSource.cpp' object='crc_dabmod-FicSource.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-FicSource.o `test -f 'FicSource.cpp' || echo '$(srcdir)/'`FicSource.cpp
+
+crc_dabmod-FicSource.obj: FicSource.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-FicSource.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-FicSource.Tpo -c -o crc_dabmod-FicSource.obj `if test -f 'FicSource.cpp'; then $(CYGPATH_W) 'FicSource.cpp'; else $(CYGPATH_W) '$(srcdir)/FicSource.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-FicSource.Tpo $(DEPDIR)/crc_dabmod-FicSource.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='FicSource.cpp' object='crc_dabmod-FicSource.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-FicSource.obj `if test -f 'FicSource.cpp'; then $(CYGPATH_W) 'FicSource.cpp'; else $(CYGPATH_W) '$(srcdir)/FicSource.cpp'; fi`
+
+crc_dabmod-ModInput.o: ModInput.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-ModInput.o -MD -MP -MF $(DEPDIR)/crc_dabmod-ModInput.Tpo -c -o crc_dabmod-ModInput.o `test -f 'ModInput.cpp' || echo '$(srcdir)/'`ModInput.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-ModInput.Tpo $(DEPDIR)/crc_dabmod-ModInput.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ModInput.cpp' object='crc_dabmod-ModInput.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-ModInput.o `test -f 'ModInput.cpp' || echo '$(srcdir)/'`ModInput.cpp
+
+crc_dabmod-ModInput.obj: ModInput.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-ModInput.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-ModInput.Tpo -c -o crc_dabmod-ModInput.obj `if test -f 'ModInput.cpp'; then $(CYGPATH_W) 'ModInput.cpp'; else $(CYGPATH_W) '$(srcdir)/ModInput.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-ModInput.Tpo $(DEPDIR)/crc_dabmod-ModInput.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ModInput.cpp' object='crc_dabmod-ModInput.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-ModInput.obj `if test -f 'ModInput.cpp'; then $(CYGPATH_W) 'ModInput.cpp'; else $(CYGPATH_W) '$(srcdir)/ModInput.cpp'; fi`
+
+crc_dabmod-PuncturingRule.o: PuncturingRule.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-PuncturingRule.o -MD -MP -MF $(DEPDIR)/crc_dabmod-PuncturingRule.Tpo -c -o crc_dabmod-PuncturingRule.o `test -f 'PuncturingRule.cpp' || echo '$(srcdir)/'`PuncturingRule.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-PuncturingRule.Tpo $(DEPDIR)/crc_dabmod-PuncturingRule.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='PuncturingRule.cpp' object='crc_dabmod-PuncturingRule.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-PuncturingRule.o `test -f 'PuncturingRule.cpp' || echo '$(srcdir)/'`PuncturingRule.cpp
+
+crc_dabmod-PuncturingRule.obj: PuncturingRule.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-PuncturingRule.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-PuncturingRule.Tpo -c -o crc_dabmod-PuncturingRule.obj `if test -f 'PuncturingRule.cpp'; then $(CYGPATH_W) 'PuncturingRule.cpp'; else $(CYGPATH_W) '$(srcdir)/PuncturingRule.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-PuncturingRule.Tpo $(DEPDIR)/crc_dabmod-PuncturingRule.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='PuncturingRule.cpp' object='crc_dabmod-PuncturingRule.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-PuncturingRule.obj `if test -f 'PuncturingRule.cpp'; then $(CYGPATH_W) 'PuncturingRule.cpp'; else $(CYGPATH_W) '$(srcdir)/PuncturingRule.cpp'; fi`
+
+crc_dabmod-PuncturingEncoder.o: PuncturingEncoder.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-PuncturingEncoder.o -MD -MP -MF $(DEPDIR)/crc_dabmod-PuncturingEncoder.Tpo -c -o crc_dabmod-PuncturingEncoder.o `test -f 'PuncturingEncoder.cpp' || echo '$(srcdir)/'`PuncturingEncoder.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-PuncturingEncoder.Tpo $(DEPDIR)/crc_dabmod-PuncturingEncoder.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='PuncturingEncoder.cpp' object='crc_dabmod-PuncturingEncoder.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-PuncturingEncoder.o `test -f 'PuncturingEncoder.cpp' || echo '$(srcdir)/'`PuncturingEncoder.cpp
+
+crc_dabmod-PuncturingEncoder.obj: PuncturingEncoder.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-PuncturingEncoder.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-PuncturingEncoder.Tpo -c -o crc_dabmod-PuncturingEncoder.obj `if test -f 'PuncturingEncoder.cpp'; then $(CYGPATH_W) 'PuncturingEncoder.cpp'; else $(CYGPATH_W) '$(srcdir)/PuncturingEncoder.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-PuncturingEncoder.Tpo $(DEPDIR)/crc_dabmod-PuncturingEncoder.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='PuncturingEncoder.cpp' object='crc_dabmod-PuncturingEncoder.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-PuncturingEncoder.obj `if test -f 'PuncturingEncoder.cpp'; then $(CYGPATH_W) 'PuncturingEncoder.cpp'; else $(CYGPATH_W) '$(srcdir)/PuncturingEncoder.cpp'; fi`
+
+crc_dabmod-SubchannelSource.o: SubchannelSource.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-SubchannelSource.o -MD -MP -MF $(DEPDIR)/crc_dabmod-SubchannelSource.Tpo -c -o crc_dabmod-SubchannelSource.o `test -f 'SubchannelSource.cpp' || echo '$(srcdir)/'`SubchannelSource.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-SubchannelSource.Tpo $(DEPDIR)/crc_dabmod-SubchannelSource.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SubchannelSource.cpp' object='crc_dabmod-SubchannelSource.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-SubchannelSource.o `test -f 'SubchannelSource.cpp' || echo '$(srcdir)/'`SubchannelSource.cpp
+
+crc_dabmod-SubchannelSource.obj: SubchannelSource.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-SubchannelSource.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-SubchannelSource.Tpo -c -o crc_dabmod-SubchannelSource.obj `if test -f 'SubchannelSource.cpp'; then $(CYGPATH_W) 'SubchannelSource.cpp'; else $(CYGPATH_W) '$(srcdir)/SubchannelSource.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-SubchannelSource.Tpo $(DEPDIR)/crc_dabmod-SubchannelSource.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SubchannelSource.cpp' object='crc_dabmod-SubchannelSource.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-SubchannelSource.obj `if test -f 'SubchannelSource.cpp'; then $(CYGPATH_W) 'SubchannelSource.cpp'; else $(CYGPATH_W) '$(srcdir)/SubchannelSource.cpp'; fi`
+
+crc_dabmod-Flowgraph.o: Flowgraph.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-Flowgraph.o -MD -MP -MF $(DEPDIR)/crc_dabmod-Flowgraph.Tpo -c -o crc_dabmod-Flowgraph.o `test -f 'Flowgraph.cpp' || echo '$(srcdir)/'`Flowgraph.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-Flowgraph.Tpo $(DEPDIR)/crc_dabmod-Flowgraph.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Flowgraph.cpp' object='crc_dabmod-Flowgraph.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-Flowgraph.o `test -f 'Flowgraph.cpp' || echo '$(srcdir)/'`Flowgraph.cpp
+
+crc_dabmod-Flowgraph.obj: Flowgraph.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-Flowgraph.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-Flowgraph.Tpo -c -o crc_dabmod-Flowgraph.obj `if test -f 'Flowgraph.cpp'; then $(CYGPATH_W) 'Flowgraph.cpp'; else $(CYGPATH_W) '$(srcdir)/Flowgraph.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-Flowgraph.Tpo $(DEPDIR)/crc_dabmod-Flowgraph.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Flowgraph.cpp' object='crc_dabmod-Flowgraph.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-Flowgraph.obj `if test -f 'Flowgraph.cpp'; then $(CYGPATH_W) 'Flowgraph.cpp'; else $(CYGPATH_W) '$(srcdir)/Flowgraph.cpp'; fi`
+
+crc_dabmod-GainControl.o: GainControl.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-GainControl.o -MD -MP -MF $(DEPDIR)/crc_dabmod-GainControl.Tpo -c -o crc_dabmod-GainControl.o `test -f 'GainControl.cpp' || echo '$(srcdir)/'`GainControl.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-GainControl.Tpo $(DEPDIR)/crc_dabmod-GainControl.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='GainControl.cpp' object='crc_dabmod-GainControl.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-GainControl.o `test -f 'GainControl.cpp' || echo '$(srcdir)/'`GainControl.cpp
+
+crc_dabmod-GainControl.obj: GainControl.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-GainControl.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-GainControl.Tpo -c -o crc_dabmod-GainControl.obj `if test -f 'GainControl.cpp'; then $(CYGPATH_W) 'GainControl.cpp'; else $(CYGPATH_W) '$(srcdir)/GainControl.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-GainControl.Tpo $(DEPDIR)/crc_dabmod-GainControl.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='GainControl.cpp' object='crc_dabmod-GainControl.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-GainControl.obj `if test -f 'GainControl.cpp'; then $(CYGPATH_W) 'GainControl.cpp'; else $(CYGPATH_W) '$(srcdir)/GainControl.cpp'; fi`
+
+crc_dabmod-OutputMemory.o: OutputMemory.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-OutputMemory.o -MD -MP -MF $(DEPDIR)/crc_dabmod-OutputMemory.Tpo -c -o crc_dabmod-OutputMemory.o `test -f 'OutputMemory.cpp' || echo '$(srcdir)/'`OutputMemory.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-OutputMemory.Tpo $(DEPDIR)/crc_dabmod-OutputMemory.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='OutputMemory.cpp' object='crc_dabmod-OutputMemory.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-OutputMemory.o `test -f 'OutputMemory.cpp' || echo '$(srcdir)/'`OutputMemory.cpp
+
+crc_dabmod-OutputMemory.obj: OutputMemory.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-OutputMemory.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-OutputMemory.Tpo -c -o crc_dabmod-OutputMemory.obj `if test -f 'OutputMemory.cpp'; then $(CYGPATH_W) 'OutputMemory.cpp'; else $(CYGPATH_W) '$(srcdir)/OutputMemory.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-OutputMemory.Tpo $(DEPDIR)/crc_dabmod-OutputMemory.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='OutputMemory.cpp' object='crc_dabmod-OutputMemory.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-OutputMemory.obj `if test -f 'OutputMemory.cpp'; then $(CYGPATH_W) 'OutputMemory.cpp'; else $(CYGPATH_W) '$(srcdir)/OutputMemory.cpp'; fi`
+
+crc_dabmod-ModOutput.o: ModOutput.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-ModOutput.o -MD -MP -MF $(DEPDIR)/crc_dabmod-ModOutput.Tpo -c -o crc_dabmod-ModOutput.o `test -f 'ModOutput.cpp' || echo '$(srcdir)/'`ModOutput.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-ModOutput.Tpo $(DEPDIR)/crc_dabmod-ModOutput.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ModOutput.cpp' object='crc_dabmod-ModOutput.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-ModOutput.o `test -f 'ModOutput.cpp' || echo '$(srcdir)/'`ModOutput.cpp
+
+crc_dabmod-ModOutput.obj: ModOutput.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-ModOutput.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-ModOutput.Tpo -c -o crc_dabmod-ModOutput.obj `if test -f 'ModOutput.cpp'; then $(CYGPATH_W) 'ModOutput.cpp'; else $(CYGPATH_W) '$(srcdir)/ModOutput.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-ModOutput.Tpo $(DEPDIR)/crc_dabmod-ModOutput.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ModOutput.cpp' object='crc_dabmod-ModOutput.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-ModOutput.obj `if test -f 'ModOutput.cpp'; then $(CYGPATH_W) 'ModOutput.cpp'; else $(CYGPATH_W) '$(srcdir)/ModOutput.cpp'; fi`
+
+crc_dabmod-InputMemory.o: InputMemory.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-InputMemory.o -MD -MP -MF $(DEPDIR)/crc_dabmod-InputMemory.Tpo -c -o crc_dabmod-InputMemory.o `test -f 'InputMemory.cpp' || echo '$(srcdir)/'`InputMemory.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-InputMemory.Tpo $(DEPDIR)/crc_dabmod-InputMemory.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='InputMemory.cpp' object='crc_dabmod-InputMemory.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-InputMemory.o `test -f 'InputMemory.cpp' || echo '$(srcdir)/'`InputMemory.cpp
+
+crc_dabmod-InputMemory.obj: InputMemory.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-InputMemory.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-InputMemory.Tpo -c -o crc_dabmod-InputMemory.obj `if test -f 'InputMemory.cpp'; then $(CYGPATH_W) 'InputMemory.cpp'; else $(CYGPATH_W) '$(srcdir)/InputMemory.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-InputMemory.Tpo $(DEPDIR)/crc_dabmod-InputMemory.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='InputMemory.cpp' object='crc_dabmod-InputMemory.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-InputMemory.obj `if test -f 'InputMemory.cpp'; then $(CYGPATH_W) 'InputMemory.cpp'; else $(CYGPATH_W) '$(srcdir)/InputMemory.cpp'; fi`
+
+crc_dabmod-OutputFile.o: OutputFile.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-OutputFile.o -MD -MP -MF $(DEPDIR)/crc_dabmod-OutputFile.Tpo -c -o crc_dabmod-OutputFile.o `test -f 'OutputFile.cpp' || echo '$(srcdir)/'`OutputFile.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-OutputFile.Tpo $(DEPDIR)/crc_dabmod-OutputFile.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='OutputFile.cpp' object='crc_dabmod-OutputFile.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-OutputFile.o `test -f 'OutputFile.cpp' || echo '$(srcdir)/'`OutputFile.cpp
+
+crc_dabmod-OutputFile.obj: OutputFile.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-OutputFile.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-OutputFile.Tpo -c -o crc_dabmod-OutputFile.obj `if test -f 'OutputFile.cpp'; then $(CYGPATH_W) 'OutputFile.cpp'; else $(CYGPATH_W) '$(srcdir)/OutputFile.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-OutputFile.Tpo $(DEPDIR)/crc_dabmod-OutputFile.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='OutputFile.cpp' object='crc_dabmod-OutputFile.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-OutputFile.obj `if test -f 'OutputFile.cpp'; then $(CYGPATH_W) 'OutputFile.cpp'; else $(CYGPATH_W) '$(srcdir)/OutputFile.cpp'; fi`
+
+crc_dabmod-FrameMultiplexer.o: FrameMultiplexer.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-FrameMultiplexer.o -MD -MP -MF $(DEPDIR)/crc_dabmod-FrameMultiplexer.Tpo -c -o crc_dabmod-FrameMultiplexer.o `test -f 'FrameMultiplexer.cpp' || echo '$(srcdir)/'`FrameMultiplexer.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-FrameMultiplexer.Tpo $(DEPDIR)/crc_dabmod-FrameMultiplexer.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='FrameMultiplexer.cpp' object='crc_dabmod-FrameMultiplexer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-FrameMultiplexer.o `test -f 'FrameMultiplexer.cpp' || echo '$(srcdir)/'`FrameMultiplexer.cpp
+
+crc_dabmod-FrameMultiplexer.obj: FrameMultiplexer.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-FrameMultiplexer.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-FrameMultiplexer.Tpo -c -o crc_dabmod-FrameMultiplexer.obj `if test -f 'FrameMultiplexer.cpp'; then $(CYGPATH_W) 'FrameMultiplexer.cpp'; else $(CYGPATH_W) '$(srcdir)/FrameMultiplexer.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-FrameMultiplexer.Tpo $(DEPDIR)/crc_dabmod-FrameMultiplexer.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='FrameMultiplexer.cpp' object='crc_dabmod-FrameMultiplexer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-FrameMultiplexer.obj `if test -f 'FrameMultiplexer.cpp'; then $(CYGPATH_W) 'FrameMultiplexer.cpp'; else $(CYGPATH_W) '$(srcdir)/FrameMultiplexer.cpp'; fi`
+
+crc_dabmod-ModMux.o: ModMux.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-ModMux.o -MD -MP -MF $(DEPDIR)/crc_dabmod-ModMux.Tpo -c -o crc_dabmod-ModMux.o `test -f 'ModMux.cpp' || echo '$(srcdir)/'`ModMux.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-ModMux.Tpo $(DEPDIR)/crc_dabmod-ModMux.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ModMux.cpp' object='crc_dabmod-ModMux.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-ModMux.o `test -f 'ModMux.cpp' || echo '$(srcdir)/'`ModMux.cpp
+
+crc_dabmod-ModMux.obj: ModMux.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-ModMux.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-ModMux.Tpo -c -o crc_dabmod-ModMux.obj `if test -f 'ModMux.cpp'; then $(CYGPATH_W) 'ModMux.cpp'; else $(CYGPATH_W) '$(srcdir)/ModMux.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-ModMux.Tpo $(DEPDIR)/crc_dabmod-ModMux.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ModMux.cpp' object='crc_dabmod-ModMux.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-ModMux.obj `if test -f 'ModMux.cpp'; then $(CYGPATH_W) 'ModMux.cpp'; else $(CYGPATH_W) '$(srcdir)/ModMux.cpp'; fi`
+
+crc_dabmod-PrbsGenerator.o: PrbsGenerator.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-PrbsGenerator.o -MD -MP -MF $(DEPDIR)/crc_dabmod-PrbsGenerator.Tpo -c -o crc_dabmod-PrbsGenerator.o `test -f 'PrbsGenerator.cpp' || echo '$(srcdir)/'`PrbsGenerator.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-PrbsGenerator.Tpo $(DEPDIR)/crc_dabmod-PrbsGenerator.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='PrbsGenerator.cpp' object='crc_dabmod-PrbsGenerator.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-PrbsGenerator.o `test -f 'PrbsGenerator.cpp' || echo '$(srcdir)/'`PrbsGenerator.cpp
+
+crc_dabmod-PrbsGenerator.obj: PrbsGenerator.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-PrbsGenerator.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-PrbsGenerator.Tpo -c -o crc_dabmod-PrbsGenerator.obj `if test -f 'PrbsGenerator.cpp'; then $(CYGPATH_W) 'PrbsGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/PrbsGenerator.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-PrbsGenerator.Tpo $(DEPDIR)/crc_dabmod-PrbsGenerator.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='PrbsGenerator.cpp' object='crc_dabmod-PrbsGenerator.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-PrbsGenerator.obj `if test -f 'PrbsGenerator.cpp'; then $(CYGPATH_W) 'PrbsGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/PrbsGenerator.cpp'; fi`
+
+crc_dabmod-BlockPartitioner.o: BlockPartitioner.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-BlockPartitioner.o -MD -MP -MF $(DEPDIR)/crc_dabmod-BlockPartitioner.Tpo -c -o crc_dabmod-BlockPartitioner.o `test -f 'BlockPartitioner.cpp' || echo '$(srcdir)/'`BlockPartitioner.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-BlockPartitioner.Tpo $(DEPDIR)/crc_dabmod-BlockPartitioner.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BlockPartitioner.cpp' object='crc_dabmod-BlockPartitioner.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-BlockPartitioner.o `test -f 'BlockPartitioner.cpp' || echo '$(srcdir)/'`BlockPartitioner.cpp
+
+crc_dabmod-BlockPartitioner.obj: BlockPartitioner.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-BlockPartitioner.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-BlockPartitioner.Tpo -c -o crc_dabmod-BlockPartitioner.obj `if test -f 'BlockPartitioner.cpp'; then $(CYGPATH_W) 'BlockPartitioner.cpp'; else $(CYGPATH_W) '$(srcdir)/BlockPartitioner.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-BlockPartitioner.Tpo $(DEPDIR)/crc_dabmod-BlockPartitioner.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BlockPartitioner.cpp' object='crc_dabmod-BlockPartitioner.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-BlockPartitioner.obj `if test -f 'BlockPartitioner.cpp'; then $(CYGPATH_W) 'BlockPartitioner.cpp'; else $(CYGPATH_W) '$(srcdir)/BlockPartitioner.cpp'; fi`
+
+crc_dabmod-QpskSymbolMapper.o: QpskSymbolMapper.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-QpskSymbolMapper.o -MD -MP -MF $(DEPDIR)/crc_dabmod-QpskSymbolMapper.Tpo -c -o crc_dabmod-QpskSymbolMapper.o `test -f 'QpskSymbolMapper.cpp' || echo '$(srcdir)/'`QpskSymbolMapper.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-QpskSymbolMapper.Tpo $(DEPDIR)/crc_dabmod-QpskSymbolMapper.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='QpskSymbolMapper.cpp' object='crc_dabmod-QpskSymbolMapper.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-QpskSymbolMapper.o `test -f 'QpskSymbolMapper.cpp' || echo '$(srcdir)/'`QpskSymbolMapper.cpp
+
+crc_dabmod-QpskSymbolMapper.obj: QpskSymbolMapper.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-QpskSymbolMapper.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-QpskSymbolMapper.Tpo -c -o crc_dabmod-QpskSymbolMapper.obj `if test -f 'QpskSymbolMapper.cpp'; then $(CYGPATH_W) 'QpskSymbolMapper.cpp'; else $(CYGPATH_W) '$(srcdir)/QpskSymbolMapper.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-QpskSymbolMapper.Tpo $(DEPDIR)/crc_dabmod-QpskSymbolMapper.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='QpskSymbolMapper.cpp' object='crc_dabmod-QpskSymbolMapper.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-QpskSymbolMapper.obj `if test -f 'QpskSymbolMapper.cpp'; then $(CYGPATH_W) 'QpskSymbolMapper.cpp'; else $(CYGPATH_W) '$(srcdir)/QpskSymbolMapper.cpp'; fi`
+
+crc_dabmod-FrequencyInterleaver.o: FrequencyInterleaver.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-FrequencyInterleaver.o -MD -MP -MF $(DEPDIR)/crc_dabmod-FrequencyInterleaver.Tpo -c -o crc_dabmod-FrequencyInterleaver.o `test -f 'FrequencyInterleaver.cpp' || echo '$(srcdir)/'`FrequencyInterleaver.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-FrequencyInterleaver.Tpo $(DEPDIR)/crc_dabmod-FrequencyInterleaver.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='FrequencyInterleaver.cpp' object='crc_dabmod-FrequencyInterleaver.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-FrequencyInterleaver.o `test -f 'FrequencyInterleaver.cpp' || echo '$(srcdir)/'`FrequencyInterleaver.cpp
+
+crc_dabmod-FrequencyInterleaver.obj: FrequencyInterleaver.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-FrequencyInterleaver.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-FrequencyInterleaver.Tpo -c -o crc_dabmod-FrequencyInterleaver.obj `if test -f 'FrequencyInterleaver.cpp'; then $(CYGPATH_W) 'FrequencyInterleaver.cpp'; else $(CYGPATH_W) '$(srcdir)/FrequencyInterleaver.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-FrequencyInterleaver.Tpo $(DEPDIR)/crc_dabmod-FrequencyInterleaver.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='FrequencyInterleaver.cpp' object='crc_dabmod-FrequencyInterleaver.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-FrequencyInterleaver.obj `if test -f 'FrequencyInterleaver.cpp'; then $(CYGPATH_W) 'FrequencyInterleaver.cpp'; else $(CYGPATH_W) '$(srcdir)/FrequencyInterleaver.cpp'; fi`
+
+crc_dabmod-PhaseReference.o: PhaseReference.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-PhaseReference.o -MD -MP -MF $(DEPDIR)/crc_dabmod-PhaseReference.Tpo -c -o crc_dabmod-PhaseReference.o `test -f 'PhaseReference.cpp' || echo '$(srcdir)/'`PhaseReference.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-PhaseReference.Tpo $(DEPDIR)/crc_dabmod-PhaseReference.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='PhaseReference.cpp' object='crc_dabmod-PhaseReference.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-PhaseReference.o `test -f 'PhaseReference.cpp' || echo '$(srcdir)/'`PhaseReference.cpp
+
+crc_dabmod-PhaseReference.obj: PhaseReference.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-PhaseReference.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-PhaseReference.Tpo -c -o crc_dabmod-PhaseReference.obj `if test -f 'PhaseReference.cpp'; then $(CYGPATH_W) 'PhaseReference.cpp'; else $(CYGPATH_W) '$(srcdir)/PhaseReference.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-PhaseReference.Tpo $(DEPDIR)/crc_dabmod-PhaseReference.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='PhaseReference.cpp' object='crc_dabmod-PhaseReference.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-PhaseReference.obj `if test -f 'PhaseReference.cpp'; then $(CYGPATH_W) 'PhaseReference.cpp'; else $(CYGPATH_W) '$(srcdir)/PhaseReference.cpp'; fi`
+
+crc_dabmod-DifferentialModulator.o: DifferentialModulator.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-DifferentialModulator.o -MD -MP -MF $(DEPDIR)/crc_dabmod-DifferentialModulator.Tpo -c -o crc_dabmod-DifferentialModulator.o `test -f 'DifferentialModulator.cpp' || echo '$(srcdir)/'`DifferentialModulator.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-DifferentialModulator.Tpo $(DEPDIR)/crc_dabmod-DifferentialModulator.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='DifferentialModulator.cpp' object='crc_dabmod-DifferentialModulator.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-DifferentialModulator.o `test -f 'DifferentialModulator.cpp' || echo '$(srcdir)/'`DifferentialModulator.cpp
+
+crc_dabmod-DifferentialModulator.obj: DifferentialModulator.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-DifferentialModulator.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-DifferentialModulator.Tpo -c -o crc_dabmod-DifferentialModulator.obj `if test -f 'DifferentialModulator.cpp'; then $(CYGPATH_W) 'DifferentialModulator.cpp'; else $(CYGPATH_W) '$(srcdir)/DifferentialModulator.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-DifferentialModulator.Tpo $(DEPDIR)/crc_dabmod-DifferentialModulator.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='DifferentialModulator.cpp' object='crc_dabmod-DifferentialModulator.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-DifferentialModulator.obj `if test -f 'DifferentialModulator.cpp'; then $(CYGPATH_W) 'DifferentialModulator.cpp'; else $(CYGPATH_W) '$(srcdir)/DifferentialModulator.cpp'; fi`
+
+crc_dabmod-NullSymbol.o: NullSymbol.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-NullSymbol.o -MD -MP -MF $(DEPDIR)/crc_dabmod-NullSymbol.Tpo -c -o crc_dabmod-NullSymbol.o `test -f 'NullSymbol.cpp' || echo '$(srcdir)/'`NullSymbol.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-NullSymbol.Tpo $(DEPDIR)/crc_dabmod-NullSymbol.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='NullSymbol.cpp' object='crc_dabmod-NullSymbol.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-NullSymbol.o `test -f 'NullSymbol.cpp' || echo '$(srcdir)/'`NullSymbol.cpp
+
+crc_dabmod-NullSymbol.obj: NullSymbol.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-NullSymbol.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-NullSymbol.Tpo -c -o crc_dabmod-NullSymbol.obj `if test -f 'NullSymbol.cpp'; then $(CYGPATH_W) 'NullSymbol.cpp'; else $(CYGPATH_W) '$(srcdir)/NullSymbol.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-NullSymbol.Tpo $(DEPDIR)/crc_dabmod-NullSymbol.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='NullSymbol.cpp' object='crc_dabmod-NullSymbol.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-NullSymbol.obj `if test -f 'NullSymbol.cpp'; then $(CYGPATH_W) 'NullSymbol.cpp'; else $(CYGPATH_W) '$(srcdir)/NullSymbol.cpp'; fi`
+
+crc_dabmod-SignalMultiplexer.o: SignalMultiplexer.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-SignalMultiplexer.o -MD -MP -MF $(DEPDIR)/crc_dabmod-SignalMultiplexer.Tpo -c -o crc_dabmod-SignalMultiplexer.o `test -f 'SignalMultiplexer.cpp' || echo '$(srcdir)/'`SignalMultiplexer.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-SignalMultiplexer.Tpo $(DEPDIR)/crc_dabmod-SignalMultiplexer.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SignalMultiplexer.cpp' object='crc_dabmod-SignalMultiplexer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-SignalMultiplexer.o `test -f 'SignalMultiplexer.cpp' || echo '$(srcdir)/'`SignalMultiplexer.cpp
+
+crc_dabmod-SignalMultiplexer.obj: SignalMultiplexer.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-SignalMultiplexer.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-SignalMultiplexer.Tpo -c -o crc_dabmod-SignalMultiplexer.obj `if test -f 'SignalMultiplexer.cpp'; then $(CYGPATH_W) 'SignalMultiplexer.cpp'; else $(CYGPATH_W) '$(srcdir)/SignalMultiplexer.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-SignalMultiplexer.Tpo $(DEPDIR)/crc_dabmod-SignalMultiplexer.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SignalMultiplexer.cpp' object='crc_dabmod-SignalMultiplexer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-SignalMultiplexer.obj `if test -f 'SignalMultiplexer.cpp'; then $(CYGPATH_W) 'SignalMultiplexer.cpp'; else $(CYGPATH_W) '$(srcdir)/SignalMultiplexer.cpp'; fi`
+
+crc_dabmod-CicEqualizer.o: CicEqualizer.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-CicEqualizer.o -MD -MP -MF $(DEPDIR)/crc_dabmod-CicEqualizer.Tpo -c -o crc_dabmod-CicEqualizer.o `test -f 'CicEqualizer.cpp' || echo '$(srcdir)/'`CicEqualizer.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-CicEqualizer.Tpo $(DEPDIR)/crc_dabmod-CicEqualizer.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='CicEqualizer.cpp' object='crc_dabmod-CicEqualizer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-CicEqualizer.o `test -f 'CicEqualizer.cpp' || echo '$(srcdir)/'`CicEqualizer.cpp
+
+crc_dabmod-CicEqualizer.obj: CicEqualizer.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-CicEqualizer.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-CicEqualizer.Tpo -c -o crc_dabmod-CicEqualizer.obj `if test -f 'CicEqualizer.cpp'; then $(CYGPATH_W) 'CicEqualizer.cpp'; else $(CYGPATH_W) '$(srcdir)/CicEqualizer.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-CicEqualizer.Tpo $(DEPDIR)/crc_dabmod-CicEqualizer.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='CicEqualizer.cpp' object='crc_dabmod-CicEqualizer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-CicEqualizer.obj `if test -f 'CicEqualizer.cpp'; then $(CYGPATH_W) 'CicEqualizer.cpp'; else $(CYGPATH_W) '$(srcdir)/CicEqualizer.cpp'; fi`
+
+crc_dabmod-OfdmGenerator.o: OfdmGenerator.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-OfdmGenerator.o -MD -MP -MF $(DEPDIR)/crc_dabmod-OfdmGenerator.Tpo -c -o crc_dabmod-OfdmGenerator.o `test -f 'OfdmGenerator.cpp' || echo '$(srcdir)/'`OfdmGenerator.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-OfdmGenerator.Tpo $(DEPDIR)/crc_dabmod-OfdmGenerator.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='OfdmGenerator.cpp' object='crc_dabmod-OfdmGenerator.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-OfdmGenerator.o `test -f 'OfdmGenerator.cpp' || echo '$(srcdir)/'`OfdmGenerator.cpp
+
+crc_dabmod-OfdmGenerator.obj: OfdmGenerator.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-OfdmGenerator.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-OfdmGenerator.Tpo -c -o crc_dabmod-OfdmGenerator.obj `if test -f 'OfdmGenerator.cpp'; then $(CYGPATH_W) 'OfdmGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/OfdmGenerator.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-OfdmGenerator.Tpo $(DEPDIR)/crc_dabmod-OfdmGenerator.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='OfdmGenerator.cpp' object='crc_dabmod-OfdmGenerator.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-OfdmGenerator.obj `if test -f 'OfdmGenerator.cpp'; then $(CYGPATH_W) 'OfdmGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/OfdmGenerator.cpp'; fi`
+
+crc_dabmod-GuardIntervalInserter.o: GuardIntervalInserter.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-GuardIntervalInserter.o -MD -MP -MF $(DEPDIR)/crc_dabmod-GuardIntervalInserter.Tpo -c -o crc_dabmod-GuardIntervalInserter.o `test -f 'GuardIntervalInserter.cpp' || echo '$(srcdir)/'`GuardIntervalInserter.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-GuardIntervalInserter.Tpo $(DEPDIR)/crc_dabmod-GuardIntervalInserter.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='GuardIntervalInserter.cpp' object='crc_dabmod-GuardIntervalInserter.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-GuardIntervalInserter.o `test -f 'GuardIntervalInserter.cpp' || echo '$(srcdir)/'`GuardIntervalInserter.cpp
+
+crc_dabmod-GuardIntervalInserter.obj: GuardIntervalInserter.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-GuardIntervalInserter.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-GuardIntervalInserter.Tpo -c -o crc_dabmod-GuardIntervalInserter.obj `if test -f 'GuardIntervalInserter.cpp'; then $(CYGPATH_W) 'GuardIntervalInserter.cpp'; else $(CYGPATH_W) '$(srcdir)/GuardIntervalInserter.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-GuardIntervalInserter.Tpo $(DEPDIR)/crc_dabmod-GuardIntervalInserter.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='GuardIntervalInserter.cpp' object='crc_dabmod-GuardIntervalInserter.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-GuardIntervalInserter.obj `if test -f 'GuardIntervalInserter.cpp'; then $(CYGPATH_W) 'GuardIntervalInserter.cpp'; else $(CYGPATH_W) '$(srcdir)/GuardIntervalInserter.cpp'; fi`
+
+crc_dabmod-Resampler.o: Resampler.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-Resampler.o -MD -MP -MF $(DEPDIR)/crc_dabmod-Resampler.Tpo -c -o crc_dabmod-Resampler.o `test -f 'Resampler.cpp' || echo '$(srcdir)/'`Resampler.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-Resampler.Tpo $(DEPDIR)/crc_dabmod-Resampler.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Resampler.cpp' object='crc_dabmod-Resampler.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-Resampler.o `test -f 'Resampler.cpp' || echo '$(srcdir)/'`Resampler.cpp
+
+crc_dabmod-Resampler.obj: Resampler.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-Resampler.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-Resampler.Tpo -c -o crc_dabmod-Resampler.obj `if test -f 'Resampler.cpp'; then $(CYGPATH_W) 'Resampler.cpp'; else $(CYGPATH_W) '$(srcdir)/Resampler.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-Resampler.Tpo $(DEPDIR)/crc_dabmod-Resampler.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Resampler.cpp' object='crc_dabmod-Resampler.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-Resampler.obj `if test -f 'Resampler.cpp'; then $(CYGPATH_W) 'Resampler.cpp'; else $(CYGPATH_W) '$(srcdir)/Resampler.cpp'; fi`
+
+crc_dabmod-ConvEncoder.o: ConvEncoder.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-ConvEncoder.o -MD -MP -MF $(DEPDIR)/crc_dabmod-ConvEncoder.Tpo -c -o crc_dabmod-ConvEncoder.o `test -f 'ConvEncoder.cpp' || echo '$(srcdir)/'`ConvEncoder.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-ConvEncoder.Tpo $(DEPDIR)/crc_dabmod-ConvEncoder.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvEncoder.cpp' object='crc_dabmod-ConvEncoder.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-ConvEncoder.o `test -f 'ConvEncoder.cpp' || echo '$(srcdir)/'`ConvEncoder.cpp
+
+crc_dabmod-ConvEncoder.obj: ConvEncoder.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-ConvEncoder.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-ConvEncoder.Tpo -c -o crc_dabmod-ConvEncoder.obj `if test -f 'ConvEncoder.cpp'; then $(CYGPATH_W) 'ConvEncoder.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvEncoder.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-ConvEncoder.Tpo $(DEPDIR)/crc_dabmod-ConvEncoder.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvEncoder.cpp' object='crc_dabmod-ConvEncoder.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-ConvEncoder.obj `if test -f 'ConvEncoder.cpp'; then $(CYGPATH_W) 'ConvEncoder.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvEncoder.cpp'; fi`
+
+crc_dabmod-TimeInterleaver.o: TimeInterleaver.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-TimeInterleaver.o -MD -MP -MF $(DEPDIR)/crc_dabmod-TimeInterleaver.Tpo -c -o crc_dabmod-TimeInterleaver.o `test -f 'TimeInterleaver.cpp' || echo '$(srcdir)/'`TimeInterleaver.cpp
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-TimeInterleaver.Tpo $(DEPDIR)/crc_dabmod-TimeInterleaver.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='TimeInterleaver.cpp' object='crc_dabmod-TimeInterleaver.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-TimeInterleaver.o `test -f 'TimeInterleaver.cpp' || echo '$(srcdir)/'`TimeInterleaver.cpp
+
+crc_dabmod-TimeInterleaver.obj: TimeInterleaver.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT crc_dabmod-TimeInterleaver.obj -MD -MP -MF $(DEPDIR)/crc_dabmod-TimeInterleaver.Tpo -c -o crc_dabmod-TimeInterleaver.obj `if test -f 'TimeInterleaver.cpp'; then $(CYGPATH_W) 'TimeInterleaver.cpp'; else $(CYGPATH_W) '$(srcdir)/TimeInterleaver.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/crc_dabmod-TimeInterleaver.Tpo $(DEPDIR)/crc_dabmod-TimeInterleaver.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='TimeInterleaver.cpp' object='crc_dabmod-TimeInterleaver.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crc_dabmod_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crc_dabmod-TimeInterleaver.obj `if test -f 'TimeInterleaver.cpp'; then $(CYGPATH_W) 'TimeInterleaver.cpp'; else $(CYGPATH_W) '$(srcdir)/TimeInterleaver.cpp'; fi`
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(SCRIPTS)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-local mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS install-dist_binSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-dist_binSCRIPTS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic clean-local ctags distclean distclean-compile \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-binPROGRAMS \
+ install-data install-data-am install-dist_binSCRIPTS \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
+ ps ps-am tags uninstall uninstall-am uninstall-binPROGRAMS \
+ uninstall-dist_binSCRIPTS
+
+
+.PHONY: kiss_fft129 reed-solomon-4.0
+
+DabModulator.cpp: $(FFT_DIR)
+
+BUILT_SOURCES: $(FFT_DIR)
+
+$(FFT_DIR):
+ if [ ! -e $(FFT_DIR) ]; then \
+ tar xzf $(top_srcdir)/lib/kiss_fft129.tar.gz -C $(top_builddir)/lib; \
+ fi
+
+clean-local:
+ rm -rf $(FFT_DIR)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/ModCodec.cpp b/src/ModCodec.cpp
new file mode 100644
index 0000000..3ec8474
--- /dev/null
+++ b/src/ModCodec.cpp
@@ -0,0 +1,87 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ModCodec.h"
+
+#include <assert.h>
+
+
+#ifdef DEBUG
+size_t ModCodec::myCount = 0;
+#endif
+
+
+ModCodec::ModCodec(ModFormat inputFormat, ModFormat outputFormat) :
+ ModPlugin((inputFormat), (outputFormat))
+{
+#ifdef DEBUG
+ myOutputFile = NULL;
+#endif
+}
+
+
+ModCodec::~ModCodec()
+{
+#ifdef DEBUG
+ if (myOutputFile != NULL) {
+ fclose(myOutputFile);
+ }
+#endif
+}
+
+
+int ModCodec::process(std::vector<Buffer*> dataIn,
+ std::vector<Buffer*> dataOut)
+{
+ assert(dataIn.size() <= 1);
+ assert(dataOut.size() <= 1);
+
+ if (dataIn.size() == 0) {
+#ifdef DEBUG
+ int ret = process(NULL, dataOut[0]);
+ if (myOutputFile == NULL) {
+ char filename[128];
+ sprintf(filename, "output.cod.%.2zu.%s", myCount, name());
+ myOutputFile = fopen(filename, "w");
+ ++myCount;
+ }
+ fwrite(dataOut[0]->getData(), dataOut[0]->getLength(), 1, myOutputFile);
+ return ret;
+#else
+ return process(NULL, dataOut[0]);
+#endif
+ }
+#ifdef DEBUG
+ int ret = process(dataIn[0], dataOut[0]);
+ if (ret) {
+ if (myOutputFile == NULL) {
+ char filename[128];
+ sprintf(filename, "output.cod.%.2zu.%s", myCount, name());
+ myOutputFile = fopen(filename, "w");
+ ++myCount;
+ }
+ fwrite(dataOut[0]->getData(), dataOut[0]->getLength(), 1, myOutputFile);
+ }
+ return ret;
+#else
+ return process(dataIn[0], dataOut[0]);
+#endif
+}
diff --git a/src/ModCodec.h b/src/ModCodec.h
new file mode 100644
index 0000000..a1fc7ae
--- /dev/null
+++ b/src/ModCodec.h
@@ -0,0 +1,54 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MOD_CODEC_H
+#define MOD_CODEC_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "ModPlugin.h"
+
+#include <sys/types.h>
+#include <vector>
+
+
+class ModCodec : public ModPlugin
+{
+public:
+ ModCodec(ModFormat inputFormat, ModFormat outputFormat);
+ virtual ~ModCodec();
+
+ virtual int process(std::vector<Buffer*> dataIn,
+ std::vector<Buffer*> dataOut);
+ virtual int process(Buffer* const dataIn, Buffer* dataOut) = 0;
+
+protected:
+#ifdef DEBUG
+ FILE* myOutputFile;
+ static size_t myCount;
+#endif
+};
+
+
+#endif // MOD_CODEC_H
diff --git a/src/ModFormat.cpp b/src/ModFormat.cpp
new file mode 100644
index 0000000..ad05d4b
--- /dev/null
+++ b/src/ModFormat.cpp
@@ -0,0 +1,68 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Her Majesty the
+ Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ModFormat.h"
+#include "PcDebug.h"
+
+
+ModFormat::ModFormat() : mySize(0)
+{
+ PDEBUG("ModFormat::ModFormat() @ %p\n", this);
+
+}
+
+
+ModFormat::ModFormat(size_t size) : mySize(size)
+{
+ PDEBUG("ModFormat::ModFormat(%zu) @ %p\n", size, this);
+
+}
+
+
+ModFormat::~ModFormat()
+{
+// PDEBUG("ModFormat::~ModFormat()\n");
+// PDEBUG(" size: %zu\n", mySize);
+
+}
+
+
+ModFormat::ModFormat(const ModFormat& copy)
+{
+// PDEBUG("ModFormat::ModFormat(copy)\n");
+// PDEBUG(" size: %zu\n", copy.mySize);
+
+ mySize = copy.mySize;
+}
+
+
+size_t ModFormat::size()
+{
+ return mySize;
+}
+
+
+void ModFormat::size(size_t size)
+{
+ PDEBUG("ModFormat::size(%zu)\n", size);
+ mySize = size;
+}
+
diff --git a/src/ModFormat.h b/src/ModFormat.h
new file mode 100644
index 0000000..f6dce37
--- /dev/null
+++ b/src/ModFormat.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Her Majesty the
+ Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MOD_FORMAT_H
+#define MOD_FORMAT_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include <sys/types.h>
+
+
+class ModFormat
+{
+public:
+ ModFormat();
+ ModFormat(size_t size);
+ virtual ~ModFormat();
+ ModFormat(const ModFormat&);
+ ModFormat& operator=(const ModFormat&);
+
+ size_t size();
+ void size(size_t size);
+
+protected:
+ size_t mySize;
+};
+
+
+#endif // MOD_FORMAT_H
diff --git a/src/ModInput.cpp b/src/ModInput.cpp
new file mode 100644
index 0000000..cf70b33
--- /dev/null
+++ b/src/ModInput.cpp
@@ -0,0 +1,72 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ModInput.h"
+
+#include <assert.h>
+
+
+#ifdef DEBUG
+size_t ModInput::myCount = 0;
+#endif
+
+
+ModInput::ModInput(ModFormat inputFormat, ModFormat outputFormat) :
+ ModPlugin((inputFormat), (outputFormat))
+{
+#ifdef DEBUG
+ myOutputFile = NULL;
+#endif
+}
+
+
+ModInput::~ModInput()
+{
+#ifdef DEBUG
+ if (myOutputFile != NULL) {
+ fclose(myOutputFile);
+ }
+#endif
+}
+
+
+int ModInput::process(std::vector<Buffer*> dataIn,
+ std::vector<Buffer*> dataOut)
+{
+ assert(dataIn.size() == 0);
+ assert(dataOut.size() == 1);
+
+#ifdef DEBUG
+ int ret = process(NULL, dataOut[0]);
+ if (myOutputFile == NULL) {
+ char filename[256];
+ sprintf(filename, "output.in.%.2zu.%s", myCount, name());
+ myOutputFile = fopen(filename, "w");
+ ++myCount;
+ assert(myOutputFile != NULL);
+ }
+ fprintf(stderr, "Writting %zu bytes @ %p from %s\n", dataOut[0]->getLength(), dataOut[0], name());
+ fwrite(dataOut[0]->getData(), dataOut[0]->getLength(), 1, myOutputFile);
+ return ret;
+#else
+ return process(NULL, dataOut[0]);
+#endif
+}
diff --git a/src/ModInput.h b/src/ModInput.h
new file mode 100644
index 0000000..7743e25
--- /dev/null
+++ b/src/ModInput.h
@@ -0,0 +1,53 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MOD_INPUT_H
+#define MOD_INPUT_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "ModPlugin.h"
+
+#include <sys/types.h>
+
+
+class ModInput : public ModPlugin
+{
+public:
+ ModInput(ModFormat inputFormat, ModFormat outputFormat);
+ virtual ~ModInput();
+
+ virtual int process(std::vector<Buffer*> dataIn,
+ std::vector<Buffer*> dataOut);
+ virtual int process(Buffer* dataIn, Buffer* dataOut) = 0;
+
+protected:
+#ifdef DEBUG
+ FILE* myOutputFile;
+ static size_t myCount;
+#endif
+};
+
+
+#endif // MOD_INPUT_H
diff --git a/src/ModMux.cpp b/src/ModMux.cpp
new file mode 100644
index 0000000..cd188cb
--- /dev/null
+++ b/src/ModMux.cpp
@@ -0,0 +1,68 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ModMux.h"
+
+#include <assert.h>
+
+
+#ifdef DEBUG
+size_t ModMux::myCount = 0;
+#endif
+
+
+ModMux::ModMux(ModFormat inputFormat, ModFormat outputFormat) :
+ ModPlugin((inputFormat), (outputFormat))
+{
+#ifdef DEBUG
+ myOutputFile = NULL;
+#endif
+}
+
+
+ModMux::~ModMux()
+{
+#ifdef DEBUG
+ if (myOutputFile != NULL) {
+ fclose(myOutputFile);
+ }
+#endif
+}
+
+
+int ModMux::process(std::vector<Buffer*> dataIn, std::vector<Buffer*> dataOut)
+{
+ assert(dataOut.size() == 1);
+
+#ifdef DEBUG
+ int ret = process(dataIn, dataOut[0]);
+ if (myOutputFile == NULL) {
+ char filename[128];
+ sprintf(filename, "output.mux.%.2zu.%s", myCount, name());
+ myOutputFile = fopen(filename, "w");
+ ++myCount;
+ }
+ fwrite(dataOut[0]->getData(), dataOut[0]->getLength(), 1, myOutputFile);
+ return ret;
+#else
+ return process(dataIn, dataOut[0]);
+#endif
+}
diff --git a/src/ModMux.h b/src/ModMux.h
new file mode 100644
index 0000000..e23797a
--- /dev/null
+++ b/src/ModMux.h
@@ -0,0 +1,54 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MOD_MUX_H
+#define MOD_MUX_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "ModPlugin.h"
+
+#include <sys/types.h>
+#include <vector>
+
+
+class ModMux : public ModPlugin
+{
+public:
+ ModMux(ModFormat inputFormat, ModFormat outputFormat);
+ virtual ~ModMux();
+
+ virtual int process(std::vector<Buffer*> dataIn,
+ std::vector<Buffer*> dataOut);
+ virtual int process(std::vector<Buffer*> dataIn, Buffer* dataOut) = 0;
+
+protected:
+#ifdef DEBUG
+ FILE* myOutputFile;
+ static size_t myCount;
+#endif
+};
+
+
+#endif // MOD_MUX_H
diff --git a/src/ModOutput.cpp b/src/ModOutput.cpp
new file mode 100644
index 0000000..3ea99fa
--- /dev/null
+++ b/src/ModOutput.cpp
@@ -0,0 +1,72 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ModOutput.h"
+
+#include <assert.h>
+
+
+#ifdef DEBUG
+size_t ModOutput::myCount = 0;
+#endif
+
+
+ModOutput::ModOutput(ModFormat inputFormat, ModFormat outputFormat) :
+ ModPlugin((inputFormat), (outputFormat))
+{
+#ifdef DEBUG
+ myOutputFile = NULL;
+#endif
+}
+
+
+ModOutput::~ModOutput()
+{
+#ifdef DEBUG
+ if (myOutputFile != NULL) {
+ fclose(myOutputFile);
+ }
+#endif
+}
+
+
+int ModOutput::process(std::vector<Buffer*> dataIn,
+ std::vector<Buffer*> dataOut)
+{
+ assert(dataIn.size() == 1);
+ assert(dataOut.size() == 0);
+
+#ifdef DEBUG
+ int ret = process(dataIn[0], NULL);
+ if (myOutputFile == NULL) {
+ char filename[256];
+ sprintf(filename, "output.out.%.2zu.%s", myCount, name());
+ myOutputFile = fopen(filename, "w");
+ ++myCount;
+ assert(myOutputFile != NULL);
+ }
+ fprintf(stderr, "Writting %zu bytes @ %p from %s\n", dataIn[0]->getLength(), dataIn[0], name());
+ fwrite(dataIn[0]->getData(), dataIn[0]->getLength(), 1, myOutputFile);
+ return ret;
+#else
+ return process(dataIn[0], NULL);
+#endif
+}
diff --git a/src/ModOutput.h b/src/ModOutput.h
new file mode 100644
index 0000000..e703f9c
--- /dev/null
+++ b/src/ModOutput.h
@@ -0,0 +1,53 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MOD_OUTPUT_H
+#define MOD_OUTPUT_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "ModPlugin.h"
+
+#include <sys/types.h>
+
+
+class ModOutput : public ModPlugin
+{
+public:
+ ModOutput(ModFormat inputFormat, ModFormat outputFormat);
+ virtual ~ModOutput();
+
+ virtual int process(std::vector<Buffer*> dataIn,
+ std::vector<Buffer*> dataOut);
+ virtual int process(Buffer* dataIn, Buffer* dataOut) = 0;
+
+protected:
+#ifdef DEBUG
+ FILE* myOutputFile;
+ static size_t myCount;
+#endif
+};
+
+
+#endif // MOD_OUTPUT_H
diff --git a/src/ModPlugin.cpp b/src/ModPlugin.cpp
new file mode 100644
index 0000000..1215ae3
--- /dev/null
+++ b/src/ModPlugin.cpp
@@ -0,0 +1,45 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Her Majesty the
+ Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ModPlugin.h"
+
+ModPlugin::ModPlugin(ModFormat inputFormat, ModFormat outputFormat) :
+ myInputFormat(inputFormat),
+ myOutputFormat(outputFormat)
+{
+}
+
+
+ModPlugin::~ModPlugin()
+{
+}
+
+
+ModFormat ModPlugin::inputFormat()
+{
+ return myInputFormat;
+}
+
+
+ModFormat ModPlugin::outputFormat()
+{
+ return myOutputFormat;
+}
diff --git a/src/ModPlugin.h b/src/ModPlugin.h
new file mode 100644
index 0000000..af163c5
--- /dev/null
+++ b/src/ModPlugin.h
@@ -0,0 +1,61 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MOD_PLUGIN_H
+#define MOD_PLUGIN_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "ModFormat.h"
+#include "Buffer.h"
+
+#include <sys/types.h>
+#include <vector>
+#ifdef DEBUG
+# include <stdio.h>
+#endif
+
+
+class ModPlugin
+{
+public:
+ ModPlugin(ModFormat inputFormat, ModFormat outputFormat);
+ virtual ~ModPlugin();
+
+ ModFormat inputFormat();
+ ModFormat outputFormat();
+ virtual int process(std::vector<Buffer*> dataIn,
+ std::vector<Buffer*> dataOut) = 0;
+ virtual const char* name() = 0;
+
+protected:
+ ModFormat myInputFormat;
+ ModFormat myOutputFormat;
+
+ void inputFormat(ModFormat format);
+ void outputFormat(ModFormat format);
+};
+
+
+#endif // MOD_PLUGIN_H
diff --git a/src/NullSymbol.cpp b/src/NullSymbol.cpp
new file mode 100644
index 0000000..6d408a4
--- /dev/null
+++ b/src/NullSymbol.cpp
@@ -0,0 +1,59 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "NullSymbol.h"
+#include "PcDebug.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <complex>
+#include <string.h>
+
+typedef std::complex<float> complexf;
+
+
+NullSymbol::NullSymbol(size_t nbCarriers) :
+ ModCodec(ModFormat(0), ModFormat(nbCarriers * sizeof(complexf))),
+ myNbCarriers(nbCarriers)
+{
+ PDEBUG("NullSymbol::NullSymbol(%zu) @ %p\n", nbCarriers, this);
+
+}
+
+
+NullSymbol::~NullSymbol()
+{
+ PDEBUG("NullSymbol::~NullSymbol() @ %p\n", this);
+
+}
+
+
+int NullSymbol::process(Buffer* const dataIn, Buffer* dataOut)
+{
+ PDEBUG("NullSymbol::process"
+ "(dataIn: %p, dataOut: %p)\n",
+ dataIn, dataOut);
+
+ dataOut->setLength(myNbCarriers * 2 * sizeof(float));
+ bzero(dataOut->getData(), dataOut->getLength());
+
+ return dataOut->getLength();
+}
diff --git a/src/NullSymbol.h b/src/NullSymbol.h
new file mode 100644
index 0000000..1da7220
--- /dev/null
+++ b/src/NullSymbol.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NULL_SYMBOL_H
+#define NULL_SYMBOL_H
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "porting.h"
+#include "ModCodec.h"
+
+#include <sys/types.h>
+#include <stdint.h>
+
+
+class NullSymbol : public ModCodec
+{
+protected:
+ size_t myNbCarriers;
+
+public:
+ NullSymbol(size_t nbCarriers);
+ virtual ~NullSymbol();
+
+ int process(Buffer* const dataIn, Buffer* dataOut);
+ const char* name() { return "NullSymbol"; }
+};
+
+
+#endif // NULL_SYMBOL_H
diff --git a/src/OfdmGenerator.cpp b/src/OfdmGenerator.cpp
new file mode 100644
index 0000000..d87d68a
--- /dev/null
+++ b/src/OfdmGenerator.cpp
@@ -0,0 +1,195 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "OfdmGenerator.h"
+#include "PcDebug.h"
+#include "kiss_fftsimd.h"
+
+#include <stdio.h>
+#include <stdexcept>
+#include <assert.h>
+#include <complex>
+typedef std::complex<float> complexf;
+
+
+OfdmGenerator::OfdmGenerator(size_t nbSymbols,
+ size_t nbCarriers,
+ size_t spacing,
+ bool inverse) :
+ ModCodec(ModFormat(myNbSymbols * myNbCarriers * sizeof(FFT_TYPE)),
+ ModFormat(myNbSymbols * mySpacing * sizeof(FFT_TYPE))),
+ myFftPlan(NULL),
+ myFftBuffer(NULL),
+ myNbSymbols(nbSymbols),
+ myNbCarriers(nbCarriers),
+ mySpacing(spacing)
+{
+ PDEBUG("OfdmGenerator::OfdmGenerator(%zu, %zu, %zu, %s) @ %p\n",
+ nbSymbols, nbCarriers, spacing, inverse ? "true" : "false", this);
+
+ if (nbCarriers > spacing) {
+ throw std::runtime_error(
+ "OfdmGenerator::OfdmGenerator nbCarriers > spacing!");
+ }
+
+ if (inverse) {
+ myPosDst = (nbCarriers & 1 ? 0 : 1);
+ myPosSrc = 0;
+ myPosSize = (nbCarriers + 1) / 2;
+ myNegDst = spacing - (nbCarriers / 2);
+ myNegSrc = (nbCarriers + 1) / 2;
+ myNegSize = nbCarriers / 2;
+ } else {
+ myPosDst = (nbCarriers & 1 ? 0 : 1);
+ myPosSrc = nbCarriers / 2;
+ myPosSize = (nbCarriers + 1) / 2;
+ myNegDst = spacing - (nbCarriers / 2);
+ myNegSrc = 0;
+ myNegSize = nbCarriers / 2;
+ }
+ myZeroDst = myPosDst + myPosSize;
+ myZeroSize = myNegDst - myZeroDst;
+
+ PDEBUG(" myPosDst: %u\n", myPosDst);
+ PDEBUG(" myPosSrc: %u\n", myPosSrc);
+ PDEBUG(" myPosSize: %u\n", myPosSize);
+ PDEBUG(" myNegDst: %u\n", myNegDst);
+ PDEBUG(" myNegSrc: %u\n", myNegSrc);
+ PDEBUG(" myNegSize: %u\n", myNegSize);
+ PDEBUG(" myZeroDst: %u\n", myZeroDst);
+ PDEBUG(" myZeroSize: %u\n", myZeroSize);
+
+ myFftPlan = kiss_fft_alloc(mySpacing, 1, NULL, NULL);
+ myFftBuffer = (FFT_TYPE*)memalign(16, mySpacing * sizeof(FFT_TYPE));
+}
+
+
+OfdmGenerator::~OfdmGenerator()
+{
+ PDEBUG("OfdmGenerator::~OfdmGenerator() @ %p\n", this);
+
+ if (myFftPlan != NULL) {
+ kiss_fft_free(myFftPlan);
+ }
+ if (myFftBuffer != NULL) {
+ free(myFftBuffer);
+ }
+ kiss_fft_cleanup();
+}
+
+
+int OfdmGenerator::process(Buffer* const dataIn, Buffer* dataOut)
+{
+ PDEBUG("OfdmGenerator::process(dataIn: %p, dataOut: %p)\n",
+ dataIn, dataOut);
+
+ dataOut->setLength(myNbSymbols * mySpacing * sizeof(complexf));
+
+ FFT_TYPE* in = reinterpret_cast<FFT_TYPE*>(dataIn->getData());
+ FFT_TYPE* out = reinterpret_cast<FFT_TYPE*>(dataOut->getData());
+ size_t sizeIn = dataIn->getLength() / sizeof(complexf);
+ size_t sizeOut = dataOut->getLength() / sizeof(complexf);
+
+ if (sizeIn != myNbSymbols * myNbCarriers) {
+ PDEBUG("Nb symbols: %zu\n", myNbSymbols);
+ PDEBUG("Nb carriers: %zu\n", myNbCarriers);
+ PDEBUG("Spacing: %zu\n", mySpacing);
+ PDEBUG("\n%zu != %zu\n", sizeIn, myNbSymbols * myNbCarriers);
+ throw std::runtime_error(
+ "OfdmGenerator::process input size not valid!");
+ }
+ if (sizeOut != myNbSymbols * mySpacing) {
+ PDEBUG("Nb symbols: %zu\n", myNbSymbols);
+ PDEBUG("Nb carriers: %zu\n", myNbCarriers);
+ PDEBUG("Spacing: %zu\n", mySpacing);
+ PDEBUG("\n%zu != %zu\n", sizeIn, myNbSymbols * mySpacing);
+ throw std::runtime_error(
+ "OfdmGenerator::process output size not valid!");
+ }
+
+#ifdef USE_SIMD
+ for (size_t i = 0, j = 0; i < sizeIn; ) {
+ // Pack 4 fft operations
+ typedef struct {
+ float r[4];
+ float i[4];
+ } fft_data;
+ assert(sizeof(FFT_TYPE) == sizeof(fft_data));
+ complexf *cplxIn = (complexf*)in;
+ complexf *cplxOut = (complexf*)out;
+ fft_data *dataBuffer = (fft_data*)myFftBuffer;
+
+ FFT_REAL(myFftBuffer[0]) = _mm_setzero_ps();
+ FFT_IMAG(myFftBuffer[0]) = _mm_setzero_ps();
+ for (size_t k = 0; k < myZeroSize; ++k) {
+ FFT_REAL(myFftBuffer[myZeroDst + k]) = _mm_setzero_ps();
+ FFT_IMAG(myFftBuffer[myZeroDst + k]) = _mm_setzero_ps();
+ }
+ for (int k = 0; k < 4; ++k) {
+ if (i < sizeIn) {
+ for (size_t l = 0; l < myPosSize; ++l) {
+ dataBuffer[myPosDst + l].r[k] = cplxIn[i + myPosSrc + l].real();
+ dataBuffer[myPosDst + l].i[k] = cplxIn[i + myPosSrc + l].imag();
+ }
+ for (size_t l = 0; l < myNegSize; ++l) {
+ dataBuffer[myNegDst + l].r[k] = cplxIn[i + myNegSrc + l].real();
+ dataBuffer[myNegDst + l].i[k] = cplxIn[i + myNegSrc + l].imag();
+ }
+ i += myNbCarriers;
+ } else {
+ for (size_t l = 0; l < myNbCarriers; ++l) {
+ dataBuffer[l].r[k] = 0.0f;
+ dataBuffer[l].i[k] = 0.0f;
+ }
+ }
+ }
+
+ kiss_fft(myFftPlan, myFftBuffer, myFftBuffer);
+
+ for (int k = 0; k < 4; ++k) {
+ if (j < sizeOut) {
+ for (size_t l = 0; l < mySpacing; ++l) {
+ cplxOut[j + l].real() = dataBuffer[l].r[k];
+ cplxOut[j + l].imag() = dataBuffer[l].i[k];
+ }
+ j += mySpacing;
+ }
+ }
+ }
+#else
+ for (size_t i = 0; i < myNbSymbols; ++i) {
+ FFT_REAL(myFftBuffer[0]) = 0;
+ FFT_IMAG(myFftBuffer[0]) = 0;
+ bzero(&myFftBuffer[myZeroDst], myZeroSize * sizeof(FFT_TYPE));
+ memcpy(&myFftBuffer[myPosDst], &in[myPosSrc],
+ myPosSize * sizeof(FFT_TYPE));
+ memcpy(&myFftBuffer[myNegDst], &in[myNegSrc],
+ myNegSize * sizeof(FFT_TYPE));
+
+ kiss_fft(myFftPlan, myFftBuffer, out);
+
+ in += myNbCarriers;
+ out += mySpacing;
+ }
+#endif
+
+ return sizeOut;
+}
diff --git a/src/OfdmGenerator.h b/src/OfdmGenerator.h
new file mode 100644
index 0000000..653b91d
--- /dev/null
+++ b/src/OfdmGenerator.h
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef OFDM_GENERATOR_H
+#define OFDM_GENERATOR_H
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "porting.h"
+#include "ModCodec.h"
+#include "kiss_fftsimd.h"
+
+
+#include <kiss_fft.h>
+#include <sys/types.h>
+
+
+class OfdmGenerator : public ModCodec
+{
+public:
+ OfdmGenerator(size_t nbSymbols, size_t nbCarriers, size_t spacing, bool inverse = true);
+ virtual ~OfdmGenerator();
+ OfdmGenerator(const OfdmGenerator&);
+ OfdmGenerator& operator=(const OfdmGenerator&);
+
+
+ int process(Buffer* const dataIn, Buffer* dataOut);
+ const char* name() { return "OfdmGenerator"; }
+
+protected:
+ FFT_PLAN myFftPlan;
+ FFT_TYPE *myFftBuffer;
+ size_t myNbSymbols;
+ size_t myNbCarriers;
+ size_t mySpacing;
+ unsigned myPosSrc;
+ unsigned myPosDst;
+ unsigned myPosSize;
+ unsigned myNegSrc;
+ unsigned myNegDst;
+ unsigned myNegSize;
+ unsigned myZeroDst;
+ unsigned myZeroSize;
+};
+
+
+#endif // OFDM_GENERATOR_H
diff --git a/src/OutputFile.cpp b/src/OutputFile.cpp
new file mode 100644
index 0000000..fc90879
--- /dev/null
+++ b/src/OutputFile.cpp
@@ -0,0 +1,66 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "OutputFile.h"
+#include "PcDebug.h"
+
+#include <assert.h>
+#include <stdexcept>
+
+
+OutputFile::OutputFile(char* filename) :
+ ModOutput(ModFormat(1), ModFormat(0)),
+ myFilename(filename)
+{
+ PDEBUG("OutputFile::OutputFile(filename: %s) @ %p\n",
+ filename, this);
+
+ myFile = fopen(filename, "w");
+ if (myFile == NULL) {
+ perror(filename);
+ throw std::runtime_error(
+ "OutputFile::OutputFile() unable to open file!");
+ }
+}
+
+
+OutputFile::~OutputFile()
+{
+ PDEBUG("OutputFile::~OutputFile() @ %p\n", this);
+
+ if (myFile != NULL) {
+ fclose(myFile);
+ }
+}
+
+
+int OutputFile::process(Buffer* dataIn, Buffer* dataOut)
+{
+ PDEBUG("OutputFile::process(%p, %p)\n", dataIn, dataOut);
+ assert(dataIn != NULL);
+
+ if (fwrite(dataIn->getData(), dataIn->getLength(), 1, myFile) == 0) {
+ throw std::runtime_error(
+ "OutputFile::process() unable to write to file!");
+ }
+
+ return dataIn->getLength();
+}
diff --git a/src/OutputFile.h b/src/OutputFile.h
new file mode 100644
index 0000000..e9cd43b
--- /dev/null
+++ b/src/OutputFile.h
@@ -0,0 +1,51 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef OUTPUT_FILE_H
+#define OUTPUT_FILE_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "ModOutput.h"
+
+#include <stdio.h>
+#include <sys/types.h>
+
+
+class OutputFile : public ModOutput
+{
+public:
+ OutputFile(char* filename);
+ virtual ~OutputFile();
+
+ virtual int process(Buffer* dataIn, Buffer* dataOut);
+ const char* name() { return "OutputFile"; }
+
+protected:
+ char* myFilename;
+ FILE* myFile;
+};
+
+
+#endif // OUTPUT_FILE_H
diff --git a/src/OutputMemory.cpp b/src/OutputMemory.cpp
new file mode 100644
index 0000000..2a48862
--- /dev/null
+++ b/src/OutputMemory.cpp
@@ -0,0 +1,60 @@
+/*
+ Copyright (C) 2007, 2008, 2009, 2010, 2011 Her Majesty the Queen in
+ Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "OutputMemory.h"
+#include "PcDebug.h"
+
+#include <stdexcept>
+#include <string.h>
+
+
+OutputMemory::OutputMemory(Buffer* dataOut)
+ : ModOutput(ModFormat(1), ModFormat(0))
+{
+ PDEBUG("OutputMemory::OutputMemory(%p) @ %p\n", dataOut, this);
+
+ setOutput(dataOut);
+}
+
+
+OutputMemory::~OutputMemory()
+{
+ PDEBUG("OutputMemory::~OutputMemory() @ %p\n", this);
+}
+
+
+void OutputMemory::setOutput(Buffer* dataOut)
+{
+ myDataOut = dataOut;
+ myInputFormat.size(dataOut == NULL ? 0 : dataOut->getLength());
+}
+
+
+int OutputMemory::process(Buffer* dataIn, Buffer* dataOut)
+{
+ PDEBUG("OutputMemory::process"
+ "(dataIn: %p, dataOut: %p)\n",
+ dataIn, dataOut);
+
+ *myDataOut = *dataIn;
+
+ return myDataOut->getLength();
+}
diff --git a/src/OutputMemory.h b/src/OutputMemory.h
new file mode 100644
index 0000000..8ac2343
--- /dev/null
+++ b/src/OutputMemory.h
@@ -0,0 +1,48 @@
+/*
+ Copyright (C) 2007, 2008, 2009, 2010, 2011 Her Majesty the Queen in
+ Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef OUTPUT_MEMORY_H
+#define OUTPUT_MEMORY_H
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+
+#include "ModOutput.h"
+
+
+class OutputMemory : public ModOutput
+{
+public:
+ OutputMemory(Buffer* dataOut = NULL);
+ virtual ~OutputMemory();
+ virtual int process(Buffer* dataIn, Buffer* dataOut);
+ const char* name() { return "OutputMemory"; }
+
+ void setOutput(Buffer* dataOut);
+
+protected:
+ Buffer* myDataOut;
+};
+
+
+#endif // OUTPUT_MEMORY_H
diff --git a/src/PcDebug.h b/src/PcDebug.h
new file mode 100644
index 0000000..6c6d30c
--- /dev/null
+++ b/src/PcDebug.h
@@ -0,0 +1,77 @@
+/*
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Her
+ Majesty the Queen in Right of Canada (Communications Research Center
+ Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef PC_DEBUG_H
+#define PC_DEBUG_H
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <stdio.h>
+
+#define LOG stderr
+
+#if !defined(_WIN32) || defined(__MINGW32__)
+# ifndef PDEBUG
+# ifdef DEBUG
+# define PDEBUG(fmt, args...) fprintf (LOG, fmt , ## args)
+# else
+# define PDEBUG(fmt, args...)
+# endif
+# endif
+# ifdef DEBUG
+# define PDEBUG_VERBOSE(level, verbosity, fmt, args...) if (level <= verbosity) { fprintf(LOG, fmt, ## args); fflush(LOG); }
+# define PDEBUG0_VERBOSE(level, verbosity, txt) if (level <= verbosity) { fprintf(LOG, txt); fflush(LOG); }
+# define PDEBUG1_VERBOSE(level, verbosity, txt, arg0) if (level <= verbosity) { fprintf(LOG, txt, arg0); fflush(LOG); }
+# define PDEBUG2_VERBOSE(level, verbosity, txt, arg0, arg1) if (level <= verbosity) { fprintf(LOG, txt, arg0, arg1); fflush(LOG); }
+# define PDEBUG3_VERBOSE(level, verbosity, txt, arg0, arg1, arg2) if (level <= verbosity) { fprintf(LOG, txt, arg0, arg1, arg2); fflush(LOG); }
+# define PDEBUG4_VERBOSE(level, verbosity, txt, arg0, arg1, arg2, arg3) if (level <= verbosity) { fprintf(LOG, txt, arg0, arg1, arg2, arg3); fflush(LOG); }
+# else
+# define PDEBUG_VERBOSE(level, verbosity, fmt, args...)
+# define PDEBUG0_VERBOSE(level, verbosity, txt)
+# define PDEBUG1_VERBOSE(level, verbosity, txt, arg0)
+# define PDEBUG2_VERBOSE(level, verbosity, txt, arg0, arg1)
+# define PDEBUG3_VERBOSE(level, verbosity, txt, arg0, arg1, arg2)
+# define PDEBUG4_VERBOSE(level, verbosity, txt, arg0, arg1, arg2, arg3)
+# endif // DEBUG
+#else // _WIN32
+# ifdef _DEBUG
+# define PDEBUG
+# define PDEBUG_VERBOSE
+# define PDEBUG0_VERBOSE(level, verbosity, txt) if (level <= verbosity) { fprintf(LOG, txt); fflush(LOG); }
+# define PDEBUG1_VERBOSE(level, verbosity, txt, arg0) if (level <= verbosity) { fprintf(LOG, txt, arg0); fflush(LOG); }
+# define PDEBUG2_VERBOSE(level, verbosity, txt, arg0, arg1) if (level <= verbosity) { fprintf(LOG, txt, arg0, arg1); fflush(LOG); }
+# define PDEBUG3_VERBOSE(level, verbosity, txt, arg0, arg1, arg2) if (level <= verbosity) { fprintf(LOG, txt, arg0, arg1, arg2); fflush(LOG); }
+# define PDEBUG4_VERBOSE(level, verbosity, txt, arg0, arg1, arg2, arg3) if (level <= verbosity) { fprintf(LOG, txt, arg0, arg1, arg2, arg3); fflush(LOG); }
+# else
+# define PDEBUG
+# define PDEBUG_VERBOSE
+# define PDEBUG0_VERBOSE(level, verbosity, txt)
+# define PDEBUG1_VERBOSE(level, verbosity, txt, arg0)
+# define PDEBUG2_VERBOSE(level, verbosity, txt, arg0, arg1)
+# define PDEBUG3_VERBOSE(level, verbosity, txt, arg0, arg1, arg2)
+# define PDEBUG4_VERBOSE(level, verbosity, txt, arg0, arg1, arg2, arg3)
+# endif
+#endif
+
+#endif // PC_DEBUG_H
diff --git a/src/PhaseReference.cpp b/src/PhaseReference.cpp
new file mode 100644
index 0000000..bebbec6
--- /dev/null
+++ b/src/PhaseReference.cpp
@@ -0,0 +1,168 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "PhaseReference.h"
+#include "PcDebug.h"
+
+#include <stdio.h>
+#include <stdexcept>
+#include <complex>
+#include <string.h>
+
+typedef std::complex<float> complexf;
+
+
+const unsigned char PhaseReference::d_h[4][32] = {
+ { 0, 2, 0, 0, 0, 0, 1, 1, 2, 0, 0, 0, 2, 2, 1, 1,
+ 0, 2, 0, 0, 0, 0, 1, 1, 2, 0, 0, 0, 2, 2, 1, 1 },
+ { 0, 3, 2, 3, 0, 1, 3, 0, 2, 1, 2, 3, 2, 3, 3, 0,
+ 0, 3, 2, 3, 0, 1, 3, 0, 2, 1, 2, 3, 2, 3, 3, 0 },
+ { 0, 0, 0, 2, 0, 2, 1, 3, 2, 2, 0, 2, 2, 0, 1, 3,
+ 0, 0, 0, 2, 0, 2, 1, 3, 2, 2, 0, 2, 2, 0, 1, 3 },
+ { 0, 1, 2, 1, 0, 3, 3, 2, 2, 3, 2, 1, 2, 1, 3, 2,
+ 0, 1, 2, 1, 0, 3, 3, 2, 2, 3, 2, 1, 2, 1, 3, 2 }
+};
+
+
+PhaseReference::PhaseReference(size_t dabmode) :
+ ModCodec(ModFormat(0), ModFormat(0)),
+ d_dabmode(dabmode)
+{
+ PDEBUG("PhaseReference::PhaseReference(%zu) @ %p\n", dabmode, this);
+
+ switch (d_dabmode) {
+ case 1:
+ d_carriers = 1536;
+ d_num = 2048;
+ break;
+ case 2:
+ d_carriers = 384;
+ d_num = 512;
+ break;
+ case 3:
+ d_carriers = 192;
+ d_num = 256;
+ break;
+ case 4:
+ d_dabmode = 0;
+ case 0:
+ d_carriers = 768;
+ d_num = 1024;
+ break;
+ default:
+ throw std::runtime_error(
+ "PhaseReference::PhaseReference DAB mode not valid!");
+ }
+ d_dataIn = new complexf[d_num];
+ fillData();
+
+ myOutputFormat.size(d_carriers * sizeof(complexf));
+}
+
+
+PhaseReference::~PhaseReference()
+{
+ PDEBUG("PhaseReference::~PhaseReference() @ %p\n", this);
+
+ delete[] d_dataIn;
+}
+
+
+complexf convert(unsigned char data) {
+ const complexf value[] = {
+ complexf(1, 0),
+ complexf(0, 1),
+ complexf(-1, 0),
+ complexf(0, -1),
+ };
+ return value[data % 4];
+}
+
+
+void PhaseReference::fillData()
+{
+ size_t index;
+ size_t offset;
+ size_t k;
+
+ const int table[][48][2] = {
+ { // Mode 0/4
+ // Positive part
+ { 0, 0 }, { 3, 1 }, { 2, 0 }, { 1, 2 }, { 0, 0 }, { 3, 1 },
+ { 2, 2 }, { 1, 2 }, { 0, 2 }, { 3, 1 }, { 2, 3 }, { 1, 0 },
+ // Negative part
+ { 0, 0 }, { 1, 1 }, { 2, 1 }, { 3, 2 }, { 0, 2 }, { 1, 2 },
+ { 2, 0 }, { 3, 3 }, { 0, 3 }, { 1, 1 }, { 2, 3 }, { 3, 2 },
+ },
+ { // Mode 1
+ // Positive part
+ { 0, 3 }, { 3, 1 }, { 2, 1 }, { 1, 1 }, { 0, 2 }, { 3, 2 },
+ { 2, 1 }, { 1, 0 }, { 0, 2 }, { 3, 2 }, { 2, 3 }, { 1, 3 },
+ { 0, 0 }, { 3, 2 }, { 2, 1 }, { 1, 3 }, { 0, 3 }, { 3, 3 },
+ { 2, 3 }, { 1, 0 }, { 0, 3 }, { 3, 0 }, { 2, 1 }, { 1, 1 },
+ // Negative part
+ { 0, 1 }, { 1, 2 }, { 2, 0 }, { 3, 1 }, { 0, 3 }, { 1, 2 },
+ { 2, 2 }, { 3, 3 }, { 0, 2 }, { 1, 1 }, { 2, 2 }, { 3, 3 },
+ { 0, 1 }, { 1, 2 }, { 2, 3 }, { 3, 3 }, { 0, 2 }, { 1, 2 },
+ { 2, 2 }, { 3, 1 }, { 0, 1 }, { 1, 3 }, { 2, 1 }, { 3, 2 },
+ },
+ { // Mode 2
+ // Positive part
+ { 2, 0 }, { 1, 2 }, { 0, 2 }, { 3, 1 }, { 2, 0 }, { 1, 3 },
+ // Negative part
+ { 0, 2 }, { 1, 3 }, { 2, 2 }, { 3, 2 }, { 0, 1 }, { 1, 2 },
+ },
+ { // Mode 3
+ // Positive part
+ { 3, 2 }, { 2, 2 }, { 1, 2 },
+ // Negative part
+ { 0, 2 }, { 1, 3 }, { 2, 0 },
+ },
+ };
+
+ if ((d_dabmode < 0) || (d_dabmode > 3)) {
+ throw std::runtime_error(
+ "PhaseReference::fillData invalid DAB mode!");
+ }
+
+ for (index = 0, offset = 0; index < d_carriers; ++offset) {
+ for (k = 0; k < 32; ++k) {
+ d_dataIn[index++] = convert(d_h[table[d_dabmode][offset][0]][k]
+ + table[d_dabmode][offset][1]);
+ }
+ }
+}
+
+
+int PhaseReference::process(Buffer* const dataIn, Buffer* dataOut)
+{
+ PDEBUG("PhaseReference::process(dataIn: %p, dataOut: %p)\n",
+ dataIn, dataOut);
+
+ if ((dataIn != NULL) && (dataIn->getLength() != 0)) {
+ throw std::runtime_error(
+ "PhaseReference::process input size not valid!");
+ }
+
+ dataOut->setData(d_dataIn, d_carriers * sizeof(complexf));
+
+ return 1;
+}
diff --git a/src/PhaseReference.h b/src/PhaseReference.h
new file mode 100644
index 0000000..5122f02
--- /dev/null
+++ b/src/PhaseReference.h
@@ -0,0 +1,58 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef PHASE_REFERENCE_H
+#define PHASE_REFERENCE_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "ModCodec.h"
+
+#include <sys/types.h>
+#include <complex>
+
+
+class PhaseReference : public ModCodec
+{
+public:
+ PhaseReference(size_t dabmode);
+ virtual ~PhaseReference();
+ PhaseReference(const PhaseReference&);
+ PhaseReference& operator=(const PhaseReference&);
+
+
+ int process(Buffer* const dataIn, Buffer* dataOut);
+ const char* name() { return "PhaseReference"; }
+
+protected:
+ size_t d_dabmode;
+ size_t d_carriers;
+ size_t d_num;
+ const static unsigned char d_h[4][32];
+ std::complex<float>* d_dataIn;
+
+ void fillData();
+};
+
+#endif // PHASE_REFERENCE_H
diff --git a/src/PrbsGenerator.cpp b/src/PrbsGenerator.cpp
new file mode 100644
index 0000000..8835dde
--- /dev/null
+++ b/src/PrbsGenerator.cpp
@@ -0,0 +1,174 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "PrbsGenerator.h"
+#include "PcDebug.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdexcept>
+
+
+PrbsGenerator::PrbsGenerator(size_t framesize, uint32_t polynomial,
+ uint32_t accum, size_t init) :
+ ModCodec(ModFormat(0), ModFormat(framesize)),
+ d_framesize(framesize),
+ d_polynomial(polynomial),
+ d_accum(accum),
+ d_accum_init(accum),
+ d_init(init)
+{
+ PDEBUG("PrbsGenerator::PrbsGenerator(%zu, %u, %u, %zu) @ %p\n",
+ framesize, polynomial, accum, init, this);
+
+ gen_prbs_table();
+ gen_weight_table();
+}
+
+
+PrbsGenerator::~PrbsGenerator()
+{
+ PDEBUG("PrbsGenerator::~PrbsGenerator() @ %p\n", this);
+
+}
+
+
+/*
+ * Generate a table of matrix products to update a 32-bit PRBS generator.
+ */
+void PrbsGenerator::gen_prbs_table()
+{
+ int i;
+ for (i = 0; i < 4; ++i) {
+ int j;
+ for (j = 0; j < 256; ++j) {
+ uint32_t prbs_accum = ((uint32_t)j << (i * 8));
+ int k;
+ for (k = 0; k < 8; ++k) {
+ prbs_accum = (prbs_accum << 1)
+ ^ parity_check(prbs_accum & d_polynomial);
+ }
+ d_prbs_table[i][j] = (prbs_accum & 0xff);
+ }
+ }
+}
+
+
+/*
+ * Generate the weight table.
+ */
+void PrbsGenerator::gen_weight_table()
+{
+ int i;
+ for (i = 0; i < 256; ++i) {
+ unsigned char mask=1U, ones_count = 0U;
+ int j;
+ for (j = 0; j < 8; ++j) {
+ ones_count += ((i & mask) != 0U);
+ mask = mask << 1;
+ }
+ d_weight[i] = ones_count;
+ }
+}
+
+
+/*
+ * Generate a parity check for a 32-bit word.
+ */
+uint32_t PrbsGenerator::parity_check(uint32_t prbs_accum)
+{
+ uint32_t mask=1UL, parity=0UL;
+ int i;
+ for (i = 0; i < 32; ++i) {
+ parity ^= ((prbs_accum & mask) != 0UL);
+ mask <<= 1;
+ }
+ return parity;
+}
+
+
+/*
+ * Update a 32-bit PRBS generator eight bits at a time.
+ */
+uint32_t PrbsGenerator::update_prbs()
+{
+ unsigned char acc_lsb = 0;
+ int i;
+ for (i = 0; i < 4; ++i) {
+// PDEBUG("0x%x = 0x%x ^ 0x%x\n",
+// acc_lsb ^ d_prbs_table [i][(d_accum >> (i * 8)) & 0xff],
+// acc_lsb, d_prbs_table [i][(d_accum >> (i * 8)) & 0xff]);
+ acc_lsb ^= d_prbs_table[i][(d_accum >> (i * 8)) & 0xff];
+ }
+ return (d_accum << 8) ^ ((uint32_t)acc_lsb);
+}
+
+
+int PrbsGenerator::process(Buffer* const dataIn, Buffer* dataOut)
+{
+ PDEBUG("PrbsGenerator::process(dataIn: %p, dataOut: %p)\n",
+ dataIn, dataOut);
+ dataOut->setLength(d_framesize);
+ unsigned char* out = reinterpret_cast<unsigned char*>(dataOut->getData());
+
+ // Initialization
+ if (d_accum_init) {
+ d_accum = d_accum_init;
+ } else {
+ d_accum = 0;
+ while (d_accum < d_polynomial) {
+ d_accum <<= 1;
+ d_accum |= 1;
+ }
+ }
+ //PDEBUG("Polynomial: 0x%x\n", d_polynomial);
+ //PDEBUG("Init accum: 0x%x\n", d_accum);
+ size_t i = 0;
+ while (i < d_init) {
+ out[i++] = 0xff;
+ }
+
+ for (; i < d_framesize; ++i) {
+ // Writting data
+ d_accum = update_prbs();
+ if ((d_accum_init == 0xa9) && (i % 188 == 0)) { // DVB energy dispersal
+ out[i] = 0;
+ } else {
+ out[i] = (unsigned char)(d_accum & 0xff);
+ }
+ //PDEBUG("accum: 0x%x\n", d_accum);
+ }
+
+ if ((dataIn != NULL) && dataIn->getLength()) {
+ PDEBUG(" mixing input\n");
+ const unsigned char* in = reinterpret_cast<const unsigned char*>(dataIn->getData());
+ if (dataIn->getLength() != dataOut->getLength()) {
+ PDEBUG("%zu != %zu\n", dataIn->getLength(), dataOut->getLength());
+ throw std::runtime_error("PrbsGenerator::process "
+ "input size is not equal to output size!\n");
+ }
+ for (size_t i = 0; i < dataOut->getLength(); ++i) {
+ out[i] ^= in[i];
+ }
+ }
+
+ return dataOut->getLength();
+}
diff --git a/src/PrbsGenerator.h b/src/PrbsGenerator.h
new file mode 100644
index 0000000..e97f973
--- /dev/null
+++ b/src/PrbsGenerator.h
@@ -0,0 +1,71 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef PRBS_GENERATOR_H
+#define PRBS_GENERATOR_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "ModCodec.h"
+
+#include <sys/types.h>
+#include <stdint.h>
+
+
+class PrbsGenerator : public ModCodec
+{
+private:
+
+protected:
+ uint32_t parity_check(uint32_t prbs_accum);
+ void gen_prbs_table();
+ uint32_t update_prbs();
+ void gen_weight_table();
+
+ size_t d_framesize;
+ // table of matrix products used to update a 32-bit PRBS generator
+ uint32_t d_prbs_table [4][256];
+ // table of weights for 8-bit bytes
+ unsigned char d_weight[256];
+ // PRBS polynomial generator
+ uint32_t d_polynomial;
+ // PRBS generator polarity mask
+ unsigned char d_polarity_mask;
+ // PRBS accumulator
+ uint32_t d_accum;
+ uint32_t d_accum_init;
+ // Initialization size
+ size_t d_init;
+
+public:
+ PrbsGenerator(size_t framesize, uint32_t polynomial, uint32_t accum = 0,
+ size_t init = 0);
+ virtual ~PrbsGenerator();
+
+ int process(Buffer* const dataIn, Buffer* dataOut);
+ const char* name() { return "PrbsGenerator"; }
+};
+
+
+#endif // PRBS_GENERATOR_H
diff --git a/src/PuncturingEncoder.cpp b/src/PuncturingEncoder.cpp
new file mode 100644
index 0000000..e459ccd
--- /dev/null
+++ b/src/PuncturingEncoder.cpp
@@ -0,0 +1,194 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "PuncturingEncoder.h"
+#include "PcDebug.h"
+
+#include <stdio.h>
+#include <stdexcept>
+#include <stdint.h>
+#include <assert.h>
+
+
+PuncturingEncoder::PuncturingEncoder() :
+ ModCodec(ModFormat(0), ModFormat(0)),
+ d_in_block_size(0),
+ d_out_block_size(0),
+ d_tail_rule(NULL)
+{
+ PDEBUG("PuncturingEncoder() @ %p\n", this);
+
+}
+
+
+PuncturingEncoder::~PuncturingEncoder()
+{
+ PDEBUG("PuncturingEncoder::~PuncturingEncoder() @ %p\n", this);
+ for (unsigned i = 0; i < d_rules.size(); ++i) {
+ PDEBUG(" Deleting rules @ %p\n", d_rules[i]);
+ delete d_rules[i];
+ }
+ if (d_tail_rule != NULL) {
+ PDEBUG(" Deleting rules @ %p\n", d_tail_rule);
+ delete d_tail_rule;
+ }
+}
+
+void PuncturingEncoder::adjust_item_size()
+{
+ PDEBUG("PuncturingEncoder::adjust_item_size()\n");
+ int in_size = 0;
+ int out_size = 0;
+ int length = 0;
+ std::vector<PuncturingRule*>::iterator ptr;
+
+ for (ptr = d_rules.begin(); ptr != d_rules.end(); ++ptr) {
+ for (length = (*ptr)->length(); length > 0; length -= 4) {
+ out_size += (*ptr)->bit_size();
+ in_size += 4;
+// PDEBUG("- in: %i, out: %i\n", in_size, out_size);
+ }
+// PDEBUG("- in: %i, out: %i\n", in_size, (out_size + 7) / 8);
+ }
+ if (d_tail_rule != NULL) {
+// PDEBUG("- computing tail rule\n");
+ in_size += d_tail_rule->length();
+ out_size += d_tail_rule->bit_size();
+// PDEBUG("- in: %i, out: %i\n", in_size, out_size);
+ }
+
+ d_in_block_size = in_size;
+ d_out_block_size = (out_size + 7) / 8;
+ myOutputFormat.size(d_out_block_size);
+
+ PDEBUG(" Puncturing encoder ratio (out/in): %zu / %zu\n",
+ d_out_block_size, d_in_block_size);
+}
+
+
+void PuncturingEncoder::append_rule(const PuncturingRule& rule)
+{
+ PDEBUG("append_rule(rule(%zu, 0x%x))\n", rule.length(), rule.pattern());
+ d_rules.push_back(new PuncturingRule(rule));
+
+ adjust_item_size();
+}
+
+
+void PuncturingEncoder::append_tail_rule(const PuncturingRule& rule)
+{
+ PDEBUG("append_tail_rule(rule(%zu, 0x%x))\n", rule.length(), rule.pattern());
+ d_tail_rule = new PuncturingRule(rule);
+
+ adjust_item_size();
+}
+
+
+int PuncturingEncoder::process(Buffer* const dataIn, Buffer* dataOut)
+{
+ PDEBUG("PuncturingEncoder::process"
+ "(dataIn: %p, dataOut: %p)\n",
+ dataIn, dataOut);
+ size_t in_count = 0;
+ size_t out_count = 0;
+ size_t bit_count = 0;
+ size_t length;
+ unsigned char data;
+ uint32_t mask;
+ uint32_t pattern;
+ std::vector<PuncturingRule*>::iterator ptr = d_rules.begin();
+ PDEBUG(" in block size: %zu\n", d_in_block_size);
+ PDEBUG(" out block size: %zu\n", d_out_block_size);
+
+ dataOut->setLength(d_out_block_size);
+ const unsigned char* in = reinterpret_cast<const unsigned char*>(dataIn->getData());
+ unsigned char* out = reinterpret_cast<unsigned char*>(dataOut->getData());
+
+ if (dataIn->getLength() != d_in_block_size) {
+ throw std::runtime_error("PuncturingEncoder::process wrong input size");
+ }
+
+ if (d_tail_rule) {
+ d_in_block_size -= d_tail_rule->length();
+ }
+ while (in_count < d_in_block_size) {
+ for (length = (*ptr)->length(); length > 0; length -= 4) {
+ mask = 0x80000000;
+ pattern = (*ptr)->pattern();
+ for (int i = 0; i < 4; ++i) {
+ data = in[in_count++];
+ for (int j = 0; j < 8; ++j) {
+ if (pattern & mask) {
+ out[out_count] <<= 1;
+ out[out_count] |= data >> 7;
+ if (++bit_count == 8) {
+ bit_count = 0;
+ ++out_count;
+ }
+ }
+ data <<= 1;
+ mask >>= 1;
+ }
+ }
+ }
+ if (++ptr == d_rules.end()) {
+ ptr = d_rules.begin();
+ }
+ }
+ if (d_tail_rule) {
+ d_in_block_size += d_tail_rule->length();
+ mask = 0x800000;
+ pattern = d_tail_rule->pattern();
+ length = d_tail_rule->length();
+ for (size_t i = 0; i < length; ++i) {
+ data = in[in_count++];
+ for (int j = 0; j < 8; ++j) {
+ if (pattern & mask) {
+ out[out_count] <<= 1;
+ out[out_count] |= data >> 7;
+ if (++bit_count == 8) {
+ bit_count = 0;
+ ++out_count;
+ }
+ }
+ data <<= 1;
+ mask >>= 1;
+ }
+ }
+ }
+ while (bit_count) {
+ out[out_count] <<= 1;
+ if (++bit_count == 8) {
+ bit_count = 0;
+ ++out_count;
+ }
+ }
+ for (size_t i = d_out_block_size; i < dataOut->getLength(); ++i) {
+ out[out_count++] = 0;
+ }
+ assert(out_count == dataOut->getLength());
+ if (out_count != dataOut->getLength()) {
+ throw std::runtime_error("PuncturingEncoder::process output size "
+ "does not correspond!");
+ }
+
+ return d_out_block_size;
+}
diff --git a/src/PuncturingEncoder.h b/src/PuncturingEncoder.h
new file mode 100644
index 0000000..c43c8ce
--- /dev/null
+++ b/src/PuncturingEncoder.h
@@ -0,0 +1,63 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef PUNCTURING_ENCODER_H
+#define PUNCTURING_ENCODER_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "PuncturingRule.h"
+#include "ModCodec.h"
+
+#include <vector>
+#include <sys/types.h>
+
+
+class PuncturingEncoder : public ModCodec
+{
+private:
+ size_t d_in_block_size;
+ size_t d_out_block_size;
+ std::vector<PuncturingRule*> d_rules;
+ PuncturingRule* d_tail_rule;
+
+protected:
+ void adjust_item_size();
+
+public:
+ PuncturingEncoder();
+ virtual ~PuncturingEncoder();
+ PuncturingEncoder(const PuncturingEncoder&);
+ PuncturingEncoder& operator=(const PuncturingEncoder&);
+
+ void append_rule(const PuncturingRule& rule);
+ void append_tail_rule(const PuncturingRule& rule);
+ int process(Buffer* const dataIn, Buffer* dataOut);
+ const char* name() { return "PuncturingEncoder"; }
+ size_t getInputSize() { return d_in_block_size; }
+ size_t getOutputSize() { return d_out_block_size; }
+};
+
+
+#endif // PUNCTURING_ENCODER_H
diff --git a/src/PuncturingRule.cpp b/src/PuncturingRule.cpp
new file mode 100644
index 0000000..c959c0f
--- /dev/null
+++ b/src/PuncturingRule.cpp
@@ -0,0 +1,60 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Her Majesty the
+ Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifdef HAVE_CONFIG_H
+//#include "config.h"
+#endif
+
+#include "PcDebug.h"
+#include "PuncturingRule.h"
+#include <stdio.h>
+#include <stdexcept>
+
+
+PuncturingRule::PuncturingRule(
+ const size_t length,
+ const uint32_t pattern) :
+ d_length(length),
+ d_pattern(pattern)
+{
+ PDEBUG("PuncturingRule::PuncturingRule(%zu, 0x%x) @ %p\n",
+ length, pattern, this);
+}
+
+
+PuncturingRule::~PuncturingRule()
+{
+ PDEBUG("PuncturingRule::~PuncturingRule() @ %p\n", this);
+}
+
+
+size_t PuncturingRule::bit_size() const
+{
+// fprintf(stderr, "Calling bit_size()");
+ size_t bits = 0;
+ for (uint32_t mask = 0x80000000; mask != 0; mask >>= 1) {
+ if (d_pattern & mask) {
+ ++bits;
+ }
+ }
+// fprintf(stderr, " -> return %i\n", bits);
+ return bits;
+}
diff --git a/src/PuncturingRule.h b/src/PuncturingRule.h
new file mode 100644
index 0000000..7c19b0a
--- /dev/null
+++ b/src/PuncturingRule.h
@@ -0,0 +1,56 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Her Majesty the
+ Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef PUNCTURING_RULE_H
+#define PUNCTURING_RULE_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include <sys/types.h>
+#include <stdint.h>
+
+
+class PuncturingRule
+{
+private:
+ size_t d_length;
+ uint32_t d_pattern;
+
+protected:
+
+public:
+ PuncturingRule(
+ const size_t length,
+ const uint32_t pattern);
+ virtual ~PuncturingRule();
+// PuncturingRule(const PuncturingRule& rule);
+ PuncturingRule& operator=(const PuncturingRule&);
+
+ size_t length() const { return d_length; }
+ size_t bit_size() const;
+ const uint32_t pattern() const { return d_pattern; }
+};
+
+
+#endif // PUNCTURING_RULE_H
diff --git a/src/QpskSymbolMapper.cpp b/src/QpskSymbolMapper.cpp
new file mode 100644
index 0000000..ec7b9e4
--- /dev/null
+++ b/src/QpskSymbolMapper.cpp
@@ -0,0 +1,168 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "QpskSymbolMapper.h"
+#include "PcDebug.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdexcept>
+#include <complex>
+#include <math.h>
+#ifdef __SSE__
+# include <xmmintrin.h>
+#endif // __SSE__
+
+typedef std::complex<float> complexf;
+
+
+QpskSymbolMapper::QpskSymbolMapper(size_t carriers) :
+ ModCodec(ModFormat(carriers / 4), ModFormat(carriers * 8)),
+ d_carriers(carriers)
+{
+ PDEBUG("QpskSymbolMapper::QpskSymbolMapper(%zu) @ %p\n", carriers, this);
+
+}
+
+
+QpskSymbolMapper::~QpskSymbolMapper()
+{
+ PDEBUG("QpskSymbolMapper::~QpskSymbolMapper() @ %p\n", this);
+
+}
+
+
+int QpskSymbolMapper::process(Buffer* const dataIn, Buffer* dataOut)
+{
+ PDEBUG("QpskSymbolMapper::process"
+ "(dataIn: %p, dataOut: %p)\n",
+ dataIn, dataOut);
+
+ dataOut->setLength(dataIn->getLength() * 4 * 2 * sizeof(float)); // 4 output complex symbols per input byte
+#ifdef __SSE__
+ const unsigned char* in = reinterpret_cast<const unsigned char*>(dataIn->getData());
+ __m128* out = reinterpret_cast<__m128*>(dataOut->getData());
+
+ if (dataIn->getLength() % (d_carriers / 4) != 0) {
+ fprintf(stderr, "%zu (input size) %% (%zu (carriers) / 4) != 0\n",
+ dataIn->getLength(), d_carriers);
+ throw std::runtime_error(
+ "QpskSymbolMapper::process input size not valid!");
+ }
+
+ const static __m128 symbols[16] = {
+ _mm_setr_ps( M_SQRT1_2, M_SQRT1_2, M_SQRT1_2, M_SQRT1_2),
+ _mm_setr_ps( M_SQRT1_2, M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2),
+ _mm_setr_ps( M_SQRT1_2, -M_SQRT1_2, M_SQRT1_2, M_SQRT1_2),
+ _mm_setr_ps( M_SQRT1_2, -M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2),
+ _mm_setr_ps( M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2, M_SQRT1_2),
+ _mm_setr_ps( M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2, -M_SQRT1_2),
+ _mm_setr_ps( M_SQRT1_2, -M_SQRT1_2, -M_SQRT1_2, M_SQRT1_2),
+ _mm_setr_ps( M_SQRT1_2, -M_SQRT1_2, -M_SQRT1_2, -M_SQRT1_2),
+ _mm_setr_ps(-M_SQRT1_2, M_SQRT1_2, M_SQRT1_2, M_SQRT1_2),
+ _mm_setr_ps(-M_SQRT1_2, M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2),
+ _mm_setr_ps(-M_SQRT1_2,- M_SQRT1_2, M_SQRT1_2, M_SQRT1_2),
+ _mm_setr_ps(-M_SQRT1_2,- M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2),
+ _mm_setr_ps(-M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2, M_SQRT1_2),
+ _mm_setr_ps(-M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2, -M_SQRT1_2),
+ _mm_setr_ps(-M_SQRT1_2,- M_SQRT1_2, -M_SQRT1_2, M_SQRT1_2),
+ _mm_setr_ps(-M_SQRT1_2,- M_SQRT1_2, -M_SQRT1_2, -M_SQRT1_2)
+ };
+ size_t inOffset = 0;
+ size_t outOffset = 0;
+ unsigned char tmp = 0;
+ for (size_t i = 0; i < dataIn->getLength(); i += d_carriers / 4) {
+ for (size_t j = 0; j < d_carriers / 8; ++j) {
+ tmp = (in[inOffset] & 0xc0) >> 4;
+ tmp |= (in[inOffset + (d_carriers / 8)] & 0xc0) >> 6;
+ out[outOffset] = symbols[tmp];
+ tmp = (in[inOffset] & 0x30) >> 2;
+ tmp |= (in[inOffset + (d_carriers / 8)] & 0x30) >> 4;
+ out[outOffset + 1] = symbols[tmp];
+ tmp = (in[inOffset] & 0x0c);
+ tmp |= (in[inOffset + (d_carriers / 8)] & 0x0c) >> 2;
+ out[outOffset + 2] = symbols[tmp];
+ tmp = (in[inOffset] & 0x03) << 2;
+ tmp |= (in[inOffset + (d_carriers / 8)] & 0x03);
+ out[outOffset + 3] = symbols[tmp];
+ ++inOffset;
+ outOffset += 4;
+ }
+ inOffset += d_carriers / 8;
+ }
+#else // !__SSE__
+#error "Code section not verified"
+ const unsigned char* in = reinterpret_cast<const unsigned char*>(dataIn->getData());
+ float* out = reinterpret_cast<float*>(dataOut->getData());
+ if (dataIn->getLength() % (d_carriers / 4) != 0) {
+ throw std::runtime_error(
+ "QpskSymbolMapper::process input size not valid!");
+ }
+ if (dataOut->getLength() / sizeof(float) != dataIn->getLength() * 4 * 2) { // 4 output complex symbols per input byte
+ throw std::runtime_error(
+ "QpskSymbolMapper::process output size not valid!");
+ }
+
+ const static float symbols[16][4] = {
+ { M_SQRT1_2, M_SQRT1_2, M_SQRT1_2, M_SQRT1_2},
+ { M_SQRT1_2, M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2},
+ { M_SQRT1_2, -M_SQRT1_2, M_SQRT1_2, M_SQRT1_2},
+ { M_SQRT1_2, -M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2},
+ { M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2, M_SQRT1_2},
+ { M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2, -M_SQRT1_2},
+ { M_SQRT1_2, -M_SQRT1_2, -M_SQRT1_2, M_SQRT1_2},
+ { M_SQRT1_2, -M_SQRT1_2, -M_SQRT1_2, -M_SQRT1_2},
+ {-M_SQRT1_2, M_SQRT1_2, M_SQRT1_2, M_SQRT1_2},
+ {-M_SQRT1_2, M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2},
+ {-M_SQRT1_2,- M_SQRT1_2, M_SQRT1_2, M_SQRT1_2},
+ {-M_SQRT1_2,- M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2},
+ {-M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2, M_SQRT1_2},
+ {-M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2, -M_SQRT1_2},
+ {-M_SQRT1_2,- M_SQRT1_2, -M_SQRT1_2, M_SQRT1_2},
+ {-M_SQRT1_2,- M_SQRT1_2, -M_SQRT1_2, -M_SQRT1_2}
+ };
+ size_t inOffset = 0;
+ size_t outOffset = 0;
+ unsigned char tmp;
+ fprintf(stderr, "TODO: Validate QpskSymbolMapper::process without SSE\n");
+ for (size_t i = 0; i < dataIn->getLength(); i += d_carriers / 4) {
+ for (size_t j = 0; j < d_carriers / 8; ++j) {
+ tmp = (in[inOffset] & 0xc0) >> 4;
+ tmp |= (in[inOffset + (d_carriers / 8)] & 0xc0) >> 6;
+ memcpy(&out[outOffset], symbols[tmp], sizeof(float) * 4);
+ tmp = (in[inOffset] & 0x30) >> 2;
+ tmp |= (in[inOffset + (d_carriers / 8)] & 0x30) >> 4;
+ memcpy(&out[outOffset + 1], symbols[tmp], sizeof(float) * 4);
+ tmp = (in[inOffset] & 0x0c);
+ tmp |= (in[inOffset + (d_carriers / 8)] & 0x0c) >> 2;
+ memcpy(&out[outOffset + 2], symbols[tmp], sizeof(float) * 4);
+ tmp = (in[inOffset] & 0x03) << 2;
+ tmp |= (in[inOffset + (d_carriers / 8)] & 0x03);
+ memcpy(&out[outOffset + 3], symbols[tmp], sizeof(float) * 4);
+ ++inOffset;
+ outOffset += 4;
+ }
+ inOffset += d_carriers / 8;
+ }
+#endif // __SSE__
+
+ return 1;
+}
diff --git a/src/QpskSymbolMapper.h b/src/QpskSymbolMapper.h
new file mode 100644
index 0000000..4c59151
--- /dev/null
+++ b/src/QpskSymbolMapper.h
@@ -0,0 +1,51 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef QPSK_SYMBOL_MAPPER_H
+#define QPSK_SYMBOL_MAPPER_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "ModCodec.h"
+
+#include <sys/types.h>
+
+
+class QpskSymbolMapper : public ModCodec
+{
+public:
+ QpskSymbolMapper(size_t carriers);
+ virtual ~QpskSymbolMapper();
+ QpskSymbolMapper(QpskSymbolMapper&);
+ QpskSymbolMapper& operator=(QpskSymbolMapper&);
+
+
+ int process(Buffer* const dataIn, Buffer* dataOut);
+ const char* name() { return "QpskSymbolMapper"; }
+
+protected:
+ size_t d_carriers;
+};
+
+#endif // QPSK_SYMBOL_MAPPER_H
diff --git a/src/Resampler.cpp b/src/Resampler.cpp
new file mode 100644
index 0000000..67bdf4f
--- /dev/null
+++ b/src/Resampler.cpp
@@ -0,0 +1,318 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "Resampler.h"
+#include "PcDebug.h"
+
+
+#ifdef __ppc__
+# define memalign(a, b) malloc(b)
+#else // !__ppc__
+# include <mm_malloc.h>
+#endif
+#include <sys/types.h>
+#include <string.h>
+#include <stdexcept>
+#include <assert.h>
+
+
+unsigned gcd(unsigned a, unsigned b)
+{
+ if (b == 0) {
+ return a;
+ }
+
+ return gcd(b, a % b);
+}
+
+
+Resampler::Resampler(size_t inputRate, size_t outputRate, size_t resolution) :
+ ModCodec(ModFormat(inputRate * sizeof(complexf)),
+ ModFormat(outputRate * sizeof(complexf))),
+ myFftPlan1(NULL),
+ myFftPlan2(NULL),
+ myFftIn(NULL),
+ myFftOut(NULL),
+ myBufferIn(NULL),
+ myBufferOut(NULL),
+ myFront(NULL),
+ myBack(NULL),
+ myWindow(NULL)
+{
+ PDEBUG("Resampler::Resampler(%zu, %zu) @ %p\n", inputRate, outputRate, this);
+
+ fprintf(stderr, "This software uses KISS FFT.\n\n");
+ fprintf(stderr, "Copyright (c) 2003-2004 Mark Borgerding\n"
+ "\n"
+ "All rights reserved.\n"
+ "\n"
+ "Redistribution and use in source and binary forms, with or "
+ "without modification, are permitted provided that the following "
+ "conditions are met:\n"
+ "\n"
+ " * Redistributions of source code must retain the above "
+ "copyright notice, this list of conditions and the following "
+ "disclaimer.\n"
+ " * Redistributions in binary form must reproduce the above "
+ "copyright notice, this list of conditions and the following "
+ "disclaimer in the documentation and/or other materials provided "
+ "with the distribution.\n"
+ " * Neither the author nor the names of any contributors may be "
+ "used to endorse or promote products derived from this software "
+ "without specific prior written permission.\n"
+ "\n"
+ "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND "
+ "CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, "
+ "INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF "
+ "MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE "
+ "DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS "
+ "BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, "
+ "EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED "
+ "TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, "
+ "DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON "
+ "ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, "
+ "OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY "
+ "OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE "
+ "POSSIBILITY OF SUCH DAMAGE.\n");
+
+ size_t divisor = gcd(inputRate, outputRate);
+ L = outputRate / divisor;
+ M = inputRate / divisor;
+ PDEBUG(" gcd: %zu, L: %zu, M: %zu\n", divisor, L, M);
+ {
+ unsigned factor = resolution * 2 / M;
+ if (factor & 1) {
+ ++factor;
+ }
+ myFftSizeIn = factor * M;
+ myFftSizeOut = factor * L;
+ }
+ PDEBUG(" FFT size in: %zu, FFT size out: %zu\n", myFftSizeIn, myFftSizeOut);
+
+ if (myFftSizeIn > myFftSizeOut) {
+ myFactor = 1.0f / myFftSizeIn;
+ } else {
+ myFactor = 1.0f / myFftSizeOut;
+ }
+
+ myWindow = (float*)memalign(16, myFftSizeIn * sizeof(float));
+ for (size_t i = 0; i < myFftSizeIn; ++i) {
+ myWindow[i] = 0.5f * (1.0f - cosf(2.0f * M_PI * i / (myFftSizeIn - 1)));
+ PDEBUG("Window[%zu] = %f\n", i, myWindow[i]);
+ }
+
+ myFftIn = (FFT_TYPE*)memalign(16, myFftSizeIn * sizeof(FFT_TYPE));
+ myFftOut = (FFT_TYPE*)memalign(16, myFftSizeOut * sizeof(FFT_TYPE));
+ myBufferIn = (complexf*)memalign(16, myFftSizeIn / 2 * sizeof(FFT_TYPE));
+ myBufferOut = (complexf*)memalign(16, myFftSizeOut / 2 * sizeof(FFT_TYPE));
+ myFront = (FFT_TYPE*)memalign(16, myFftSizeIn * sizeof(FFT_TYPE));
+ myBack = (FFT_TYPE*)memalign(16, myFftSizeOut * sizeof(FFT_TYPE));
+ myFftPlan1 = kiss_fft_alloc(myFftSizeIn, 0, NULL, NULL);
+ myFftPlan2 = kiss_fft_alloc(myFftSizeOut, 1, NULL, NULL);
+
+ memset(myBufferIn, 0, myFftSizeIn / 2 * sizeof(FFT_TYPE));
+ memset(myBufferOut, 0, myFftSizeOut / 2 * sizeof(FFT_TYPE));
+}
+
+
+Resampler::~Resampler()
+{
+ PDEBUG("Resampler::~Resampler() @ %p\n", this);
+
+ if (myFftPlan1 != NULL) {
+ free(myFftPlan1);
+ }
+ if (myFftPlan2 != NULL) {
+ free(myFftPlan2);
+ }
+ if (myFftIn != NULL) {
+ free(myFftIn);
+ }
+ if (myFftOut != NULL) {
+ free(myFftOut);
+ }
+ if (myBufferIn != NULL) {
+ free(myBufferIn);
+ }
+ if (myBufferOut != NULL) {
+ free(myBufferOut);
+ }
+ if (myFront != NULL) {
+ free(myFront);
+ }
+ if (myBack != NULL) {
+ free(myBack);
+ }
+ if (myWindow != NULL) {
+ free(myWindow);
+ }
+ kiss_fft_cleanup();
+}
+
+
+int Resampler::process(Buffer* const dataIn, Buffer* dataOut)
+{
+ PDEBUG("Resampler::process(dataIn: %p, dataOut: %p)\n",
+ dataIn, dataOut);
+
+ dataOut->setLength(dataIn->getLength() * L / M);
+
+ FFT_TYPE* in = reinterpret_cast<FFT_TYPE*>(dataIn->getData());
+ FFT_TYPE* out = reinterpret_cast<FFT_TYPE*>(dataOut->getData());
+ size_t sizeIn = dataIn->getLength() / sizeof(complexf);
+
+#ifdef USE_SIMD
+ size_t sizeOut = dataOut->getLength() / sizeof(complexf);
+
+ typedef struct {
+ float r[4];
+ float i[4];
+ } fft_data;
+ assert(sizeof(FFT_TYPE) == sizeof(fft_data));
+ fft_data *fftDataIn = (fft_data*)myFftIn;
+ fft_data *fftDataOut = (fft_data*)myFftOut;
+ complexf *cplxIn = (complexf*)in;
+ complexf *cplxOut = (complexf*)out;
+ for (size_t i = 0, j = 0; i < sizeIn; ) {
+ for (int k = 0; k < 4; ++k) {
+ if (i < sizeIn) {
+ for (size_t l = 0; l < myFftSizeIn / 2; ++l) {
+ fftDataIn[l].r[k] = myBufferIn[l].real();
+ fftDataIn[l].i[k] = myBufferIn[l].imag();
+ fftDataIn[myFftSizeIn / 2 + l].r[k] = cplxIn[i + l].real();
+ fftDataIn[myFftSizeIn / 2 + l].i[k] = cplxIn[i + l].imag();
+ }
+ memcpy(myBufferIn, cplxIn + i, myFftSizeIn / 2 * sizeof(complexf));
+ i += myFftSizeIn / 2;
+ } else {
+ for (size_t l = 0; l < myFftSizeIn; ++l) {
+ fftDataIn[l].r[k] = 0.0f;
+ fftDataIn[l].i[k] = 0.0f;
+ }
+ }
+ }
+ for (size_t k = 0; k < myFftSizeIn; ++ k) {
+ FFT_REAL(myFftIn[k]) = _mm_mul_ps(FFT_REAL(myFftIn[k]), _mm_set_ps1(myWindow[k]));
+ FFT_IMAG(myFftIn[k]) = _mm_mul_ps(FFT_IMAG(myFftIn[k]), _mm_set_ps1(myWindow[k]));
+ }
+
+ kiss_fft(myFftPlan1, myFftIn, myFront);
+
+ if (myFftSizeOut > myFftSizeIn) {
+ memset(myBack, 0, myFftSizeOut * sizeof(FFT_TYPE));
+ memcpy(myBack, myFront, myFftSizeIn / 2 * sizeof(FFT_TYPE));
+ memcpy(&myBack[myFftSizeOut - (myFftSizeIn / 2)],
+ &myFront[myFftSizeIn / 2],
+ myFftSizeIn / 2 * sizeof(FFT_TYPE));
+ // Copy input Fs
+ FFT_REAL(myBack[myFftSizeIn / 2]) =
+ FFT_REAL(myFront[myFftSizeIn / 2]);
+ FFT_IMAG(myBack[myFftSizeIn / 2]) =
+ FFT_IMAG(myFront[myFftSizeIn / 2]);
+ } else {
+ memcpy(myBack, myFront, myFftSizeOut / 2 * sizeof(FFT_TYPE));
+ memcpy(&myBack[myFftSizeOut / 2],
+ &myFront[myFftSizeIn - (myFftSizeOut / 2)],
+ myFftSizeOut / 2 * sizeof(FFT_TYPE));
+ // Average output Fs from input
+ FFT_REAL(myBack[myFftSizeOut / 2]) =
+ _mm_add_ps(FFT_REAL(myBack[myFftSizeOut / 2]),
+ FFT_REAL(myFront[myFftSizeOut / 2]));
+ FFT_IMAG(myBack[myFftSizeOut / 2]) =
+ _mm_add_ps(FFT_IMAG(myBack[myFftSizeOut / 2]),
+ FFT_IMAG(myFront[myFftSizeOut / 2]));
+ FFT_REAL(myBack[myFftSizeOut / 2]) =
+ _mm_mul_ps(FFT_REAL(myBack[myFftSizeOut / 2]), _mm_set_ps1(0.5f));
+ FFT_IMAG(myBack[myFftSizeOut / 2]) =
+ _mm_mul_ps(FFT_IMAG(myBack[myFftSizeOut / 2]), _mm_set_ps1(0.5f));
+ }
+ for (size_t k = 0; k < myFftSizeOut; ++k) {
+ FFT_REAL(myBack[k]) = _mm_mul_ps(FFT_REAL(myBack[k]), _mm_set_ps1(myFactor));
+ FFT_IMAG(myBack[k]) = _mm_mul_ps(FFT_IMAG(myBack[k]), _mm_set_ps1(myFactor));
+ }
+
+ kiss_fft(myFftPlan2, myBack, myFftOut);
+
+ for (size_t k = 0; k < 4; ++k) {
+ if (j < sizeOut) {
+ for (size_t l = 0; l < myFftSizeOut / 2; ++l) {
+ cplxOut[j + l].real() = myBufferOut[l].real() + fftDataOut[l].r[k];
+ cplxOut[j + l].imag() = myBufferOut[l].imag() + fftDataOut[l].i[k];
+ myBufferOut[l].real() = fftDataOut[myFftSizeOut / 2 + l].r[k];
+ myBufferOut[l].imag() = fftDataOut[myFftSizeOut / 2 + l].i[k];
+ }
+ }
+ j += myFftSizeOut / 2;
+ }
+ }
+#else
+ for (size_t i = 0, j = 0; i < sizeIn; i += myFftSizeIn / 2, j += myFftSizeOut / 2) {
+ memcpy(myFftIn, myBufferIn, myFftSizeIn / 2 * sizeof(FFT_TYPE));
+ memcpy(myFftIn + (myFftSizeIn / 2), in + i, myFftSizeIn / 2 * sizeof(FFT_TYPE));
+ memcpy(myBufferIn, in + i, myFftSizeIn / 2 * sizeof(FFT_TYPE));
+ for (size_t k = 0; k < myFftSizeIn; ++k) {
+ FFT_REAL(myFftIn[k]) *= myWindow[k];
+ FFT_IMAG(myFftIn[k]) *= myWindow[k];
+ }
+
+ kiss_fft(myFftPlan1, myFftIn, myFront);
+
+ if (myFftSizeOut > myFftSizeIn) {
+ memset(myBack, 0, myFftSizeOut * sizeof(FFT_TYPE));
+ memcpy(myBack, myFront, myFftSizeIn / 2 * sizeof(FFT_TYPE));
+ memcpy(&myBack[myFftSizeOut - (myFftSizeIn / 2)],
+ &myFront[myFftSizeIn / 2],
+ myFftSizeIn / 2 * sizeof(FFT_TYPE));
+ // Copy input Fs
+ FFT_REAL(myBack[myFftSizeIn / 2]) =
+ FFT_REAL(myFront[myFftSizeIn / 2]);
+ FFT_IMAG(myBack[myFftSizeIn / 2]) =
+ FFT_IMAG(myFront[myFftSizeIn / 2]);
+ } else {
+ memcpy(myBack, myFront, myFftSizeOut / 2 * sizeof(FFT_TYPE));
+ memcpy(&myBack[myFftSizeOut / 2],
+ &myFront[myFftSizeIn - (myFftSizeOut / 2)],
+ myFftSizeOut / 2 * sizeof(FFT_TYPE));
+ // Average output Fs from input
+ FFT_REAL(myBack[myFftSizeOut / 2]) +=
+ FFT_REAL(myFront[myFftSizeOut / 2]);
+ FFT_IMAG(myBack[myFftSizeOut / 2]) +=
+ FFT_IMAG(myFront[myFftSizeOut / 2]);
+ FFT_REAL(myBack[myFftSizeOut / 2]) *= 0.5f;
+ FFT_IMAG(myBack[myFftSizeOut / 2]) *= 0.5f;
+ }
+ for (size_t k = 0; k < myFftSizeOut; ++k) {
+ FFT_REAL(myBack[k]) *= myFactor;
+ FFT_IMAG(myBack[k]) *= myFactor;
+ }
+
+ kiss_fft(myFftPlan2, myBack, myFftOut);
+
+ for (size_t k = 0; k < myFftSizeOut / 2; ++k) {
+ FFT_REAL(out[j + k]) = myBufferOut[k].real() + FFT_REAL(myFftOut[k]);
+ FFT_IMAG(out[j + k]) = myBufferOut[k].imag() + FFT_IMAG(myFftOut[k]);
+ }
+ memcpy(myBufferOut, myFftOut + (myFftSizeOut / 2), (myFftSizeOut / 2) * sizeof(FFT_TYPE));
+ }
+#endif
+
+ return 1;
+}
diff --git a/src/Resampler.h b/src/Resampler.h
new file mode 100644
index 0000000..b4795ca
--- /dev/null
+++ b/src/Resampler.h
@@ -0,0 +1,72 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef RESAMPLER_H
+#define RESAMPLER_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "porting.h"
+#include "ModCodec.h"
+#include "kiss_fftsimd.h"
+
+
+#include <sys/types.h>
+#include <kiss_fft.h>
+#include <tools/kiss_fftr.h>
+#include <complex>
+typedef std::complex<float> complexf;
+
+
+class Resampler : public ModCodec
+{
+public:
+ Resampler(size_t inputRate, size_t outputRate, size_t resolution = 512);
+ virtual ~Resampler();
+ Resampler(const Resampler&);
+ Resampler& operator=(const Resampler&);
+
+
+ int process(Buffer* const dataIn, Buffer* dataOut);
+ const char* name() { return "Resampler"; }
+
+protected:
+ FFT_PLAN myFftPlan1;
+ FFT_PLAN myFftPlan2;
+ size_t L;
+ size_t M;
+ size_t K;
+ size_t myFftSizeIn;
+ size_t myFftSizeOut;
+ FFT_TYPE* myFftIn;
+ FFT_TYPE* myFftOut;
+ complexf* myBufferIn;
+ complexf* myBufferOut;
+ FFT_TYPE* myFront;
+ FFT_TYPE* myBack;
+ float *myWindow;
+ float myFactor;
+};
+
+
+#endif // RESAMPLER_H
diff --git a/src/SignalMultiplexer.cpp b/src/SignalMultiplexer.cpp
new file mode 100644
index 0000000..40be71e
--- /dev/null
+++ b/src/SignalMultiplexer.cpp
@@ -0,0 +1,69 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "SignalMultiplexer.h"
+#include "PcDebug.h"
+
+#include <stdio.h>
+#include <stdexcept>
+#include <assert.h>
+#include <string.h>
+
+
+SignalMultiplexer::SignalMultiplexer(size_t framesize) :
+ ModMux(ModFormat(framesize), ModFormat(framesize)),
+ d_frameSize(framesize)
+{
+ PDEBUG("SignalMultiplexer::SignalMultiplexer(%zu) @ %p\n", framesize, this);
+
+}
+
+
+SignalMultiplexer::~SignalMultiplexer()
+{
+ PDEBUG("SignalMultiplexer::~SignalMultiplexer() @ %p\n", this);
+
+}
+
+
+// dataIn[0] -> null symbol
+// dataIn[1] -> MSC symbols
+int SignalMultiplexer::process(std::vector<Buffer*> dataIn, Buffer* dataOut)
+{
+#ifdef DEBUG
+ fprintf(stderr, "SignalMultiplexer::process (dataIn:");
+ for (unsigned i = 0; i < dataIn.size(); ++i) {
+ fprintf(stderr, " %p", dataIn[i]);
+ }
+ fprintf(stderr, ", sizeIn: ");
+ for (unsigned i = 0; i < dataIn.size(); ++i) {
+ fprintf(stderr, " %zu", dataIn[i]->getLength());
+ }
+ fprintf(stderr, ", dataOut: %p, sizeOut: %zu)\n", dataOut, dataOut->getLength());
+#endif
+
+ assert(dataIn.size() == 2);
+
+ *dataOut = *dataIn[0];
+ *dataOut += *dataIn[1];
+
+ return dataOut->getLength();
+}
diff --git a/src/SignalMultiplexer.h b/src/SignalMultiplexer.h
new file mode 100644
index 0000000..e5c2d77
--- /dev/null
+++ b/src/SignalMultiplexer.h
@@ -0,0 +1,53 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef SIGNAL_MULTIPLEXER_H
+#define SIGNAL_MULTIPLEXER_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "ModMux.h"
+
+
+#include <sys/types.h>
+
+
+class SignalMultiplexer : public ModMux
+{
+public:
+ SignalMultiplexer(size_t frameSize);
+ virtual ~SignalMultiplexer();
+ SignalMultiplexer(const SignalMultiplexer&);
+ SignalMultiplexer& operator=(const SignalMultiplexer&);
+
+
+ int process(std::vector<Buffer*> dataIn, Buffer* dataOut);
+ const char* name() { return "SignalMultiplexer"; }
+
+protected:
+ size_t d_frameSize;
+};
+
+
+#endif // SIGNAL_MULTIPLEXER_H
diff --git a/src/SubchannelSource.cpp b/src/SubchannelSource.cpp
new file mode 100644
index 0000000..d65ee0c
--- /dev/null
+++ b/src/SubchannelSource.cpp
@@ -0,0 +1,1086 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "SubchannelSource.h"
+#include "PcDebug.h"
+
+#include <stdexcept>
+#include <sys/types.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+#define P1 0xc8888888
+#define P2 0xc888c888
+#define P3 0xc8c8c888
+#define P4 0xc8c8c8c8
+#define P5 0xccc8c8c8
+#define P6 0xccc8ccc8
+#define P7 0xccccccc8
+#define P8 0xcccccccc
+#define P9 0xeccccccc
+#define P10 0xeccceccc
+#define P11 0xecececcc
+#define P12 0xecececec
+#define P13 0xeeececec
+#define P14 0xeeeceeec
+#define P15 0xeeeeeeec
+#define P16 0xeeeeeeee
+#define P17 0xfeeeeeee
+#define P18 0xfeeefeee
+#define P19 0xfefefeee
+#define P20 0xfefefefe
+#define P21 0xfffefefe
+#define P22 0xfffefffe
+#define P23 0xfffffffe
+#define P24 0xffffffff
+
+
+const std::vector<PuncturingRule*>& SubchannelSource::get_rules()
+{
+ return d_puncturing_rules;
+}
+
+
+SubchannelSource::SubchannelSource(eti_STC &stc) :
+ ModInput(ModFormat(0), ModFormat(stc.getSTL() * 8)),
+ d_start_address(stc.getStartAddress()),
+ d_framesize(stc.getSTL() * 8),
+ d_protection(stc.TPL)
+{
+ PDEBUG("SubchannelSource::SubchannelSource(...) @ %p\n", this);
+// PDEBUG(" Start address: %i\n", d_start_address);
+// PDEBUG(" Framesize: %i\n", d_framesize);
+// PDEBUG(" Protection: %i\n", d_protection);
+ if (protectionForm()) {
+ if (protectionOption() == 0) {
+ switch (protectionLevel()) {
+ case 1:
+ d_puncturing_rules.push_back(new PuncturingRule(
+ ((6 * bitrate() / 8) - 3) * 16, P24));
+ d_puncturing_rules.push_back(new PuncturingRule(
+ 3 * 16, P23));
+ break;
+ case 2:
+ if (bitrate() == 8) {
+ d_puncturing_rules.push_back(new PuncturingRule(
+ 5 * 16, P13));
+ d_puncturing_rules.push_back(new PuncturingRule(
+ 1 * 16, P12));
+ } else {
+ d_puncturing_rules.push_back(new PuncturingRule(
+ ((2 * bitrate() / 8) - 3) * 16, P14));
+ d_puncturing_rules.push_back(new PuncturingRule(
+ ((4 * bitrate() / 8) + 3) * 16, P13));
+ }
+ break;
+ case 3:
+ d_puncturing_rules.push_back(new PuncturingRule(
+ ((6 * bitrate() / 8) - 3) * 16, P8));
+ d_puncturing_rules.push_back(new PuncturingRule(
+ 3 * 16, P7));
+ break;
+ case 4:
+ d_puncturing_rules.push_back(new PuncturingRule(
+ ((4 * bitrate() / 8) - 3) * 16, P3));
+ d_puncturing_rules.push_back(new PuncturingRule(
+ ((2 * bitrate() / 8) + 3) * 16, P2));
+ break;
+ default:
+ fprintf(stderr,
+ "Protection form(%zu), option(%zu) and level(%zu)\n",
+ protectionForm(), protectionOption(), protectionLevel());
+ fprintf(stderr, "Subchannel TPL: 0x%x (%u)\n", stc.TPL, stc.TPL);
+ throw std::runtime_error("SubchannelSource::SubchannelSource "
+ "unknown protection level!");
+ }
+ } else if (protectionOption() == 1) {
+ switch (protectionLevel()) {
+ case 1:
+ d_puncturing_rules.push_back(new PuncturingRule(
+ ((24 * bitrate() / 32) - 3) * 16, P10));
+ d_puncturing_rules.push_back(new PuncturingRule(
+ 3 * 16, P9));
+ break;
+ case 2:
+ d_puncturing_rules.push_back(new PuncturingRule(
+ ((24 * bitrate() / 32) - 3) * 16, P6));
+ d_puncturing_rules.push_back(new PuncturingRule(
+ 3 * 16, P5));
+ break;
+ case 3:
+ d_puncturing_rules.push_back(new PuncturingRule(
+ ((24 * bitrate() / 32) - 3) * 16, P4));
+ d_puncturing_rules.push_back(new PuncturingRule(
+ 3 * 16, P3));
+ break;
+ case 4:
+ d_puncturing_rules.push_back(new PuncturingRule(
+ ((24 * bitrate() / 32) - 3) * 16, P2));
+ d_puncturing_rules.push_back(new PuncturingRule(
+ 3 * 16, P1));
+ break;
+ default:
+ fprintf(stderr,
+ "Protection form(%zu), option(%zu) and level(%zu)\n",
+ protectionForm(), protectionOption(), protectionLevel());
+ fprintf(stderr, "Subchannel TPL: 0x%x (%u)\n", stc.TPL, stc.TPL);
+ throw std::runtime_error("SubchannelSource::SubchannelSource "
+ "unknown protection level!");
+ }
+ } else {
+ fprintf(stderr,
+ "Protection form(%zu), option(%zu) and level(%zu)\n",
+ protectionForm(), protectionOption(), protectionLevel());
+ fprintf(stderr, "Subchannel TPL: 0x%x (%u)\n", stc.TPL, stc.TPL);
+ throw std::runtime_error("SubchannelSource::SubchannelSource "
+ "unknown protection option!");
+ }
+ } else {
+ bool error = false;
+ switch (bitrate()) {
+ case 32:
+ switch (protectionLevel()) {
+ case 1:
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P24));
+ d_puncturing_rules.push_back(new PuncturingRule(5 * 16, P17));
+ d_puncturing_rules.push_back(new PuncturingRule(13 * 16, P12));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P17));
+ break;
+ case 2:
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P22));
+ d_puncturing_rules.push_back(new PuncturingRule(4 * 16, P13));
+ d_puncturing_rules.push_back(new PuncturingRule(14 * 16, P8 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P13));
+ break;
+ case 3:
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P15));
+ d_puncturing_rules.push_back(new PuncturingRule(4 * 16, P9 ));
+ d_puncturing_rules.push_back(new PuncturingRule(14 * 16, P6 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P8 ));
+ break;
+ case 4:
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P11));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P6 ));
+ d_puncturing_rules.push_back(new PuncturingRule(18 * 16, P5 ));
+ break;
+ case 5:
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P5 ));
+ d_puncturing_rules.push_back(new PuncturingRule(4 * 16, P3 ));
+ d_puncturing_rules.push_back(new PuncturingRule(17 * 16, P2 ));
+ break;
+ default:
+ error = true;
+ }
+ break;
+ case 48:
+ switch (protectionLevel()) {
+ case 1:
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P24));
+ d_puncturing_rules.push_back(new PuncturingRule(5 * 16, P18));
+ d_puncturing_rules.push_back(new PuncturingRule(25 * 16, P13));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P18));
+ break;
+ case 2:
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P24));
+ d_puncturing_rules.push_back(new PuncturingRule(4 * 16, P14));
+ d_puncturing_rules.push_back(new PuncturingRule(26 * 16, P8 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P15));
+ break;
+ case 3:
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P15));
+ d_puncturing_rules.push_back(new PuncturingRule(4 * 16, P10));
+ d_puncturing_rules.push_back(new PuncturingRule(26 * 16, P6 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P9 ));
+ break;
+ case 4:
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P9 ));
+ d_puncturing_rules.push_back(new PuncturingRule(4 * 16, P6 ));
+ d_puncturing_rules.push_back(new PuncturingRule(26 * 16, P4 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P6 ));
+ break;
+ case 5:
+ d_puncturing_rules.push_back(new PuncturingRule(4 * 16, P5 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P4 ));
+ d_puncturing_rules.push_back(new PuncturingRule(26 * 16, P2 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P3 ));
+ break;
+ default:
+ error = true;
+ }
+ break;
+ case 56:
+ switch (protectionLevel()) {
+ case 2:
+ d_puncturing_rules.push_back(new PuncturingRule(6 * 16, P23));
+ d_puncturing_rules.push_back(new PuncturingRule(10 * 16, P13));
+ d_puncturing_rules.push_back(new PuncturingRule(23 * 16, P8 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P13));
+ break;
+ case 3:
+ d_puncturing_rules.push_back(new PuncturingRule(6 * 16, P16));
+ d_puncturing_rules.push_back(new PuncturingRule(12 * 16, P7 ));
+ d_puncturing_rules.push_back(new PuncturingRule(21 * 16, P6 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P9 ));
+ break;
+ case 4:
+ d_puncturing_rules.push_back(new PuncturingRule(6 * 16, P9 ));
+ d_puncturing_rules.push_back(new PuncturingRule(10 * 16, P6 ));
+ d_puncturing_rules.push_back(new PuncturingRule(23 * 16, P4 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P5 ));
+ break;
+ case 5:
+ d_puncturing_rules.push_back(new PuncturingRule(6 * 16, P5 ));
+ d_puncturing_rules.push_back(new PuncturingRule(10 * 16, P4 ));
+ d_puncturing_rules.push_back(new PuncturingRule(23 * 16, P2 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P3 ));
+ break;
+ default:
+ error = true;
+ }
+ break;
+ case 64:
+ switch (protectionLevel()) {
+ case 1:
+ d_puncturing_rules.push_back(new PuncturingRule(6 * 16, P24));
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P18));
+ d_puncturing_rules.push_back(new PuncturingRule(28 * 16, P12));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P18));
+ break;
+ case 2:
+ d_puncturing_rules.push_back(new PuncturingRule(6 * 16, P23));
+ d_puncturing_rules.push_back(new PuncturingRule(10 * 16, P13));
+ d_puncturing_rules.push_back(new PuncturingRule(29 * 16, P8 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P13));
+ break;
+ case 3:
+ d_puncturing_rules.push_back(new PuncturingRule(6 * 16, P16));
+ d_puncturing_rules.push_back(new PuncturingRule(12 * 16, P8 ));
+ d_puncturing_rules.push_back(new PuncturingRule(27 * 16, P6 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P9 ));
+ break;
+ case 4:
+ d_puncturing_rules.push_back(new PuncturingRule(6 * 16, P11));
+ d_puncturing_rules.push_back(new PuncturingRule(9 * 16, P6 ));
+ d_puncturing_rules.push_back(new PuncturingRule(33 * 16, P5 ));
+ break;
+ case 5:
+ d_puncturing_rules.push_back(new PuncturingRule(6 * 16, P5 ));
+ d_puncturing_rules.push_back(new PuncturingRule(9 * 16, P3 ));
+ d_puncturing_rules.push_back(new PuncturingRule(31 * 16, P2 ));
+ d_puncturing_rules.push_back(new PuncturingRule(2 * 16, P3 ));
+ break;
+ default:
+ error = true;
+ }
+ break;
+ case 80:
+ switch (protectionLevel()) {
+ case 1:
+ d_puncturing_rules.push_back(new PuncturingRule(6 * 16, P24));
+ d_puncturing_rules.push_back(new PuncturingRule(10 * 16, P17));
+ d_puncturing_rules.push_back(new PuncturingRule(41 * 16, P12));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P18));
+ break;
+ case 2:
+ d_puncturing_rules.push_back(new PuncturingRule(6 * 16, P23));
+ d_puncturing_rules.push_back(new PuncturingRule(10 * 16, P13));
+ d_puncturing_rules.push_back(new PuncturingRule(41 * 16, P8 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P13));
+ break;
+ case 3:
+ d_puncturing_rules.push_back(new PuncturingRule(6 * 16, P16));
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P8 ));
+ d_puncturing_rules.push_back(new PuncturingRule(40 * 16, P6 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P7 ));
+ break;
+ case 4:
+ d_puncturing_rules.push_back(new PuncturingRule(6 * 16, P11));
+ d_puncturing_rules.push_back(new PuncturingRule(10 * 16, P6 ));
+ d_puncturing_rules.push_back(new PuncturingRule(41 * 16, P5 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P6 ));
+ break;
+ case 5:
+ d_puncturing_rules.push_back(new PuncturingRule(6 * 16, P6 ));
+ d_puncturing_rules.push_back(new PuncturingRule(10 * 16, P3 ));
+ d_puncturing_rules.push_back(new PuncturingRule(41 * 16, P2 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P3 ));
+ break;
+ default:
+ error = true;
+ }
+ break;
+ case 96:
+ switch (protectionLevel()) {
+ case 1:
+ d_puncturing_rules.push_back(new PuncturingRule(6 * 16, P24));
+ d_puncturing_rules.push_back(new PuncturingRule(13 * 16, P18));
+ d_puncturing_rules.push_back(new PuncturingRule(50 * 16, P13));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P19));
+ break;
+ case 2:
+ d_puncturing_rules.push_back(new PuncturingRule(6 * 16, P22));
+ d_puncturing_rules.push_back(new PuncturingRule(10 * 16, P12));
+ d_puncturing_rules.push_back(new PuncturingRule(53 * 16, P9 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P12));
+ break;
+ case 3:
+ d_puncturing_rules.push_back(new PuncturingRule(6 * 16, P16));
+ d_puncturing_rules.push_back(new PuncturingRule(12 * 16, P9 ));
+ d_puncturing_rules.push_back(new PuncturingRule(51 * 16, P6 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P10));
+ break;
+ case 4:
+ d_puncturing_rules.push_back(new PuncturingRule(7 * 16, P9 ));
+ d_puncturing_rules.push_back(new PuncturingRule(10 * 16, P6 ));
+ d_puncturing_rules.push_back(new PuncturingRule(52 * 16, P4 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P6 ));
+ break;
+ case 5:
+ d_puncturing_rules.push_back(new PuncturingRule(7 * 16, P5 ));
+ d_puncturing_rules.push_back(new PuncturingRule(9 * 16, P4 ));
+ d_puncturing_rules.push_back(new PuncturingRule(53 * 16, P2 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P4 ));
+ break;
+ default:
+ error = true;
+ }
+ break;
+ case 112:
+ switch (protectionLevel()) {
+ case 2:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P23));
+ d_puncturing_rules.push_back(new PuncturingRule(21 * 16, P12));
+ d_puncturing_rules.push_back(new PuncturingRule(49 * 16, P9 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P14));
+ break;
+ case 3:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P16));
+ d_puncturing_rules.push_back(new PuncturingRule(23 * 16, P8 ));
+ d_puncturing_rules.push_back(new PuncturingRule(47 * 16, P6 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P9 ));
+ break;
+ case 4:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P9 ));
+ d_puncturing_rules.push_back(new PuncturingRule(21 * 16, P6 ));
+ d_puncturing_rules.push_back(new PuncturingRule(49 * 16, P4 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P8 ));
+ break;
+ case 5:
+ d_puncturing_rules.push_back(new PuncturingRule(14 * 16, P5 ));
+ d_puncturing_rules.push_back(new PuncturingRule(17 * 16, P4 ));
+ d_puncturing_rules.push_back(new PuncturingRule(50 * 16, P2 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P5 ));
+ break;
+ default:
+ error = true;
+ }
+ break;
+ case 128:
+ switch (protectionLevel()) {
+ case 1:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P24));
+ d_puncturing_rules.push_back(new PuncturingRule(20 * 16, P17));
+ d_puncturing_rules.push_back(new PuncturingRule(62 * 16, P13));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P19));
+ break;
+ case 2:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P22));
+ d_puncturing_rules.push_back(new PuncturingRule(21 * 16, P12));
+ d_puncturing_rules.push_back(new PuncturingRule(61 * 16, P9 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P14));
+ break;
+ case 3:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P16));
+ d_puncturing_rules.push_back(new PuncturingRule(22 * 16, P9 ));
+ d_puncturing_rules.push_back(new PuncturingRule(60 * 16, P6 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P10));
+ break;
+ case 4:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P11));
+ d_puncturing_rules.push_back(new PuncturingRule(21 * 16, P6 ));
+ d_puncturing_rules.push_back(new PuncturingRule(61 * 16, P5 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P7 ));
+ break;
+ case 5:
+ d_puncturing_rules.push_back(new PuncturingRule(12 * 16, P5 ));
+ d_puncturing_rules.push_back(new PuncturingRule(19 * 16, P3 ));
+ d_puncturing_rules.push_back(new PuncturingRule(62 * 16, P2 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P4 ));
+ break;
+ default:
+ error = true;
+ }
+ break;
+ case 160:
+ switch (protectionLevel()) {
+ case 1:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P24));
+ d_puncturing_rules.push_back(new PuncturingRule(22 * 16, P18));
+ d_puncturing_rules.push_back(new PuncturingRule(84 * 16, P12));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P19));
+ break;
+ case 2:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P22));
+ d_puncturing_rules.push_back(new PuncturingRule(21 * 16, P11));
+ d_puncturing_rules.push_back(new PuncturingRule(85 * 16, P9 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P13));
+ break;
+ case 3:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P16));
+ d_puncturing_rules.push_back(new PuncturingRule(24 * 16, P8 ));
+ d_puncturing_rules.push_back(new PuncturingRule(82 * 16, P6 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P11));
+ break;
+ case 4:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P11));
+ d_puncturing_rules.push_back(new PuncturingRule(23 * 16, P6 ));
+ d_puncturing_rules.push_back(new PuncturingRule(83 * 16, P5 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P9 ));
+ break;
+ case 5:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P5 ));
+ d_puncturing_rules.push_back(new PuncturingRule(19 * 16, P4 ));
+ d_puncturing_rules.push_back(new PuncturingRule(87 * 16, P2 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P4 ));
+ break;
+ default:
+ error = true;
+ }
+ break;
+ case 192:
+ switch (protectionLevel()) {
+ case 1:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P24));
+ d_puncturing_rules.push_back(new PuncturingRule(21 * 16, P20));
+ d_puncturing_rules.push_back(new PuncturingRule(109 * 16, P13));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P24));
+ break;
+ case 2:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P22));
+ d_puncturing_rules.push_back(new PuncturingRule(20 * 16, P13));
+ d_puncturing_rules.push_back(new PuncturingRule(110 * 16, P9));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P13));
+ break;
+ case 3:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P16));
+ d_puncturing_rules.push_back(new PuncturingRule(24 * 16, P10));
+ d_puncturing_rules.push_back(new PuncturingRule(106 * 16, P6));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P11));
+ break;
+ case 4:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P10));
+ d_puncturing_rules.push_back(new PuncturingRule(22 * 16, P6));
+ d_puncturing_rules.push_back(new PuncturingRule(108 * 16, P4));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P9));
+ break;
+ case 5:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P6));
+ d_puncturing_rules.push_back(new PuncturingRule(20 * 16, P4));
+ d_puncturing_rules.push_back(new PuncturingRule(110 * 16, P2));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P5));
+ break;
+ default:
+ error = true;
+ }
+ break;
+ case 224:
+ switch (protectionLevel()) {
+ case 1:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P24));
+ d_puncturing_rules.push_back(new PuncturingRule(24 * 16, P20));
+ d_puncturing_rules.push_back(new PuncturingRule(130 * 16, P12));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P20));
+ break;
+ case 2:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P24));
+ d_puncturing_rules.push_back(new PuncturingRule(22 * 16, P16));
+ d_puncturing_rules.push_back(new PuncturingRule(132 * 16, P10));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P15));
+ break;
+ case 3:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P16));
+ d_puncturing_rules.push_back(new PuncturingRule(20 * 16, P10));
+ d_puncturing_rules.push_back(new PuncturingRule(134 * 16, P7));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P9));
+ break;
+ case 4:
+ d_puncturing_rules.push_back(new PuncturingRule(12 * 16, P12));
+ d_puncturing_rules.push_back(new PuncturingRule(26 * 16, P8));
+ d_puncturing_rules.push_back(new PuncturingRule(127 * 16, P4));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P11));
+ break;
+ case 5:
+ d_puncturing_rules.push_back(new PuncturingRule(12 * 16, P8));
+ d_puncturing_rules.push_back(new PuncturingRule(22 * 16, P6));
+ d_puncturing_rules.push_back(new PuncturingRule(131 * 16, P2));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P6));
+ break;
+ default:
+ error = true;
+ }
+ break;
+ case 256:
+ switch (protectionLevel()) {
+ case 1:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P24));
+ d_puncturing_rules.push_back(new PuncturingRule(26 * 16, P19));
+ d_puncturing_rules.push_back(new PuncturingRule(152 * 16, P14));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P18));
+ break;
+ case 2:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P24));
+ d_puncturing_rules.push_back(new PuncturingRule(22 * 16, P14));
+ d_puncturing_rules.push_back(new PuncturingRule(156 * 16, P10));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P13));
+ break;
+ case 3:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P16));
+ d_puncturing_rules.push_back(new PuncturingRule(27 * 16, P10));
+ d_puncturing_rules.push_back(new PuncturingRule(151 * 16, P7));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P10));
+ break;
+ case 4:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P12));
+ d_puncturing_rules.push_back(new PuncturingRule(24 * 16, P9));
+ d_puncturing_rules.push_back(new PuncturingRule(154 * 16, P5));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P10));
+ break;
+ case 5:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P6));
+ d_puncturing_rules.push_back(new PuncturingRule(24 * 16, P5));
+ d_puncturing_rules.push_back(new PuncturingRule(154 * 16, P2));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P5));
+ break;
+ default:
+ error = true;
+ }
+ break;
+ case 320:
+ switch (protectionLevel()) {
+ case 2:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P24));
+ d_puncturing_rules.push_back(new PuncturingRule(26 * 16, P17));
+ d_puncturing_rules.push_back(new PuncturingRule(200 * 16, P9 ));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P17));
+ break;
+ case 4:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P13));
+ d_puncturing_rules.push_back(new PuncturingRule(25 * 16, P9));
+ d_puncturing_rules.push_back(new PuncturingRule(201 * 16, P5));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P10));
+ break;
+ case 5:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P8));
+ d_puncturing_rules.push_back(new PuncturingRule(26 * 16, P5));
+ d_puncturing_rules.push_back(new PuncturingRule(200 * 16, P2));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P6));
+ break;
+ default:
+ error = true;
+ }
+ break;
+ case 384:
+ switch (protectionLevel()) {
+ case 1:
+ d_puncturing_rules.push_back(new PuncturingRule(12 * 16, P24));
+ d_puncturing_rules.push_back(new PuncturingRule(28 * 16, P20));
+ d_puncturing_rules.push_back(new PuncturingRule(245 * 16, P14));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P23));
+ break;
+ case 3:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P16));
+ d_puncturing_rules.push_back(new PuncturingRule(24 * 16, P9));
+ d_puncturing_rules.push_back(new PuncturingRule(250 * 16, P7));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P10));
+ break;
+ case 5:
+ d_puncturing_rules.push_back(new PuncturingRule(11 * 16, P8));
+ d_puncturing_rules.push_back(new PuncturingRule(27 * 16, P6));
+ d_puncturing_rules.push_back(new PuncturingRule(247 * 16, P2));
+ d_puncturing_rules.push_back(new PuncturingRule(3 * 16, P7));
+ break;
+ default:
+ error = true;
+ }
+ break;
+ default:
+ error = true;
+ }
+ if (error) {
+ fprintf(stderr, " Protection: UEP-%zu @ %zukb/s\n",
+ protectionLevel(), bitrate());
+ throw std::runtime_error("SubchannelSource::SubchannelSource "
+ "UEP puncturing rules does not exist!");
+ }
+ }
+}
+
+
+SubchannelSource::~SubchannelSource()
+{
+ PDEBUG("SubchannelSource::~SubchannelSource() @ %p\n", this);
+ for (unsigned i = 0; i < d_puncturing_rules.size(); ++i) {
+// PDEBUG(" Deleting rules @ %p\n", d_puncturing_rules[i]);
+ delete d_puncturing_rules[i];
+ }
+}
+
+
+size_t SubchannelSource::startAddress()
+{
+ return d_start_address;
+}
+
+
+size_t SubchannelSource::framesize()
+{
+ return d_framesize;
+}
+
+
+size_t SubchannelSource::framesizeCu()
+{
+ size_t framesizeCu = 0;
+
+ if (protectionForm()) { // Long form
+ if ((d_protection >> 2) & 0x07) { // Option
+ switch (d_protection & 0x03) {
+ case 0:
+ framesizeCu = (bitrate() / 32) * 27;
+ break;
+ case 1:
+ framesizeCu = (bitrate() / 32) * 21;
+ break;
+ case 2:
+ framesizeCu = (bitrate() / 32) * 18;
+ break;
+ case 3:
+ framesizeCu = (bitrate() / 32) * 15;
+ break;
+ default:
+ framesizeCu = 0xffff;
+ break;
+ }
+ } else {
+ switch (d_protection & 0x03) {
+ case 0:
+ framesizeCu = (bitrate() / 8) * 12;
+ break;
+ case 1:
+ framesizeCu = (bitrate() / 8) * 8;
+ break;
+ case 2:
+ framesizeCu = (bitrate() / 8) * 6;
+ break;
+ case 3:
+ framesizeCu = (bitrate() / 8) * 4;
+ break;
+ default:
+ framesizeCu = 0xffff;
+ break;
+ }
+ }
+ } else { // Short form
+ switch (bitrate()) {
+ case 32:
+ switch (protectionLevel()) {
+ case 1:
+ framesizeCu = 35;
+ break;
+ case 2:
+ framesizeCu = 29;
+ break;
+ case 3:
+ framesizeCu = 24;
+ break;
+ case 4:
+ framesizeCu = 21;
+ break;
+ case 5:
+ framesizeCu = 16;
+ break;
+ default:
+ framesizeCu = 0xffff;
+ break;
+ }
+ break;
+ case 48:
+ switch (protectionLevel()) {
+ case 1:
+ framesizeCu = 52;
+ break;
+ case 2:
+ framesizeCu = 42;
+ break;
+ case 3:
+ framesizeCu = 35;
+ break;
+ case 4:
+ framesizeCu = 29;
+ break;
+ case 5:
+ framesizeCu = 24;
+ break;
+ default:
+ framesizeCu = 0xffff;
+ break;
+ }
+ break;
+ case 56:
+ switch (protectionLevel()) {
+ case 2:
+ framesizeCu = 52;
+ break;
+ case 3:
+ framesizeCu = 42;
+ break;
+ case 4:
+ framesizeCu = 35;
+ break;
+ case 5:
+ framesizeCu = 29;
+ break;
+ default:
+ framesizeCu = 0xffff;
+ break;
+ }
+ break;
+ case 64:
+ switch (protectionLevel()) {
+ case 1:
+ framesizeCu = 70;
+ break;
+ case 2:
+ framesizeCu = 58;
+ break;
+ case 3:
+ framesizeCu = 48;
+ break;
+ case 4:
+ framesizeCu = 42;
+ break;
+ case 5:
+ framesizeCu = 32;
+ break;
+ default:
+ framesizeCu = 0xffff;
+ break;
+ }
+ break;
+ case 80:
+ switch (protectionLevel()) {
+ case 1:
+ framesizeCu = 84;
+ break;
+ case 2:
+ framesizeCu = 70;
+ break;
+ case 3:
+ framesizeCu = 58;
+ break;
+ case 4:
+ framesizeCu = 52;
+ break;
+ case 5:
+ framesizeCu = 40;
+ break;
+ default:
+ framesizeCu = 0xffff;
+ break;
+ }
+ break;
+ case 96:
+ switch (protectionLevel()) {
+ case 1:
+ framesizeCu = 104;
+ break;
+ case 2:
+ framesizeCu = 84;
+ break;
+ case 3:
+ framesizeCu = 70;
+ break;
+ case 4:
+ framesizeCu = 58;
+ break;
+ case 5:
+ framesizeCu = 48;
+ break;
+ default:
+ framesizeCu = 0xffff;
+ break;
+ }
+ break;
+ case 112:
+ switch (protectionLevel()) {
+ case 2:
+ framesizeCu = 104;
+ break;
+ case 3:
+ framesizeCu = 84;
+ break;
+ case 4:
+ framesizeCu = 70;
+ break;
+ case 5:
+ framesizeCu = 58;
+ break;
+ default:
+ framesizeCu = 0xffff;
+ break;
+ }
+ break;
+ case 128:
+ switch (protectionLevel()) {
+ case 1:
+ framesizeCu = 140;
+ break;
+ case 2:
+ framesizeCu = 116;
+ break;
+ case 3:
+ framesizeCu = 96;
+ break;
+ case 4:
+ framesizeCu = 84;
+ break;
+ case 5:
+ framesizeCu = 64;
+ break;
+ default:
+ framesizeCu = 0xffff;
+ break;
+ }
+ break;
+ case 160:
+ switch (protectionLevel()) {
+ case 1:
+ framesizeCu = 168;
+ break;
+ case 2:
+ framesizeCu = 140;
+ break;
+ case 3:
+ framesizeCu = 116;
+ break;
+ case 4:
+ framesizeCu = 104;
+ break;
+ case 5:
+ framesizeCu = 80;
+ break;
+ default:
+ framesizeCu = 0xffff;
+ break;
+ }
+ break;
+ case 192:
+ switch (protectionLevel()) {
+ case 1:
+ framesizeCu = 208;
+ break;
+ case 2:
+ framesizeCu = 168;
+ break;
+ case 3:
+ framesizeCu = 140;
+ break;
+ case 4:
+ framesizeCu = 116;
+ break;
+ case 5:
+ framesizeCu = 96;
+ break;
+ default:
+ framesizeCu = 0xffff;
+ break;
+ }
+ break;
+ case 224:
+ switch (protectionLevel()) {
+ case 1:
+ framesizeCu = 232;
+ break;
+ case 2:
+ framesizeCu = 208;
+ break;
+ case 3:
+ framesizeCu = 168;
+ break;
+ case 4:
+ framesizeCu = 140;
+ break;
+ case 5:
+ framesizeCu = 116;
+ break;
+ default:
+ framesizeCu = 0xffff;
+ break;
+ }
+ break;
+ case 256:
+ switch (protectionLevel()) {
+ case 1:
+ framesizeCu = 280;
+ break;
+ case 2:
+ framesizeCu = 232;
+ break;
+ case 3:
+ framesizeCu = 192;
+ break;
+ case 4:
+ framesizeCu = 168;
+ break;
+ case 5:
+ framesizeCu = 128;
+ break;
+ default:
+ framesizeCu = 0xffff;
+ break;
+ }
+ break;
+ case 320:
+ switch (protectionLevel()) {
+ case 2:
+ framesizeCu = 280;
+ break;
+ case 4:
+ framesizeCu = 208;
+ break;
+ case 5:
+ framesizeCu = 160;
+ break;
+ default:
+ framesizeCu = 0xffff;
+ break;
+ }
+ break;
+ case 384:
+ switch (protectionLevel()) {
+ case 1:
+ framesizeCu = 416;
+ break;
+ case 3:
+ framesizeCu = 280;
+ break;
+ case 5:
+ framesizeCu = 192;
+ break;
+ default:
+ framesizeCu = 0xffff;
+ break;
+ }
+ break;
+ default:
+ framesizeCu = 0xffff;
+ break;
+ }
+ }
+
+ if (framesizeCu == 0) {
+ fprintf(stderr, " Protection %zu @ %zu kb/s\n",
+ protectionLevel(), bitrate());
+ throw std::runtime_error("SubchannelSource::framesizeCu protection "
+ "not yet coded!");
+ }
+ if (framesizeCu == 0xffff) {
+ fprintf(stderr, " Protection %zu @ %zu kb/s\n",
+ protectionLevel(), bitrate());
+ throw std::runtime_error("SubchannelSource::framesizeCu invalid "
+ "protection!");
+ }
+
+ return framesizeCu;
+}
+
+
+size_t SubchannelSource::bitrate()
+{
+ return d_framesize / 3;
+}
+
+
+size_t SubchannelSource::protection()
+{
+ return d_protection;
+}
+
+
+size_t SubchannelSource::protectionForm()
+{
+ return (d_protection >> 5) & 1;
+}
+
+
+size_t SubchannelSource::protectionLevel()
+{
+ if (protectionForm()) { // Long form
+ return (d_protection & 0x3) + 1;
+ } // Short form
+ return (d_protection & 0x7) + 1;
+}
+
+
+size_t SubchannelSource::protectionOption()
+{
+ if (protectionForm()) { // Long form
+ return (d_protection >> 2) & 0x7;
+ } // Short form
+ return 0;
+}
+
+
+int SubchannelSource::process(Buffer* inputData, Buffer* outputData)
+{
+ PDEBUG("SubchannelSource::process"
+ "(inputData: %p, outputData: %p)\n",
+ inputData, outputData);
+
+ if (inputData != NULL && inputData->getLength()) {
+ PDEBUG(" Input, storing data\n");
+ if (inputData->getLength() != d_framesize) {
+ PDEBUG("ERROR: Subchannel::process.inputSize != d_framesize\n");
+ exit(-1);
+ }
+ d_buffer = *inputData;
+ return inputData->getLength();
+ }
+ PDEBUG(" Output, retriving data\n");
+
+ return read(outputData);
+}
+
+
+int SubchannelSource::read(Buffer* outputData)
+{
+ PDEBUG("SubchannelSource::read(outputData: %p, outputSize: %zu)\n",
+ outputData, outputData->getLength());
+
+ if (d_buffer.getLength() != d_framesize) {
+ PDEBUG("ERROR: Subchannel::read.outputSize != d_framesize\n");
+ exit(-1);
+ }
+ *outputData = d_buffer;
+
+ return outputData->getLength();
+}
diff --git a/src/SubchannelSource.h b/src/SubchannelSource.h
new file mode 100644
index 0000000..9d9f663
--- /dev/null
+++ b/src/SubchannelSource.h
@@ -0,0 +1,68 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef SUBCHANNEL_SOURCE_H
+#define SUBCHANNEL_SOURCE_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "PuncturingRule.h"
+#include "Eti.h"
+#include "ModInput.h"
+
+#include <vector>
+
+
+class SubchannelSource : public ModInput
+{
+protected:
+ size_t d_start_address;
+ size_t d_framesize;
+ size_t d_protection;
+ Buffer d_buffer;
+ std::vector<PuncturingRule*> d_puncturing_rules;
+
+public:
+ SubchannelSource(eti_STC &stc);
+ SubchannelSource(const SubchannelSource&);
+ SubchannelSource& operator=(const SubchannelSource&);
+ virtual ~SubchannelSource();
+
+ size_t startAddress();
+ size_t framesize();
+ size_t framesizeCu();
+ size_t bitrate();
+ size_t protection();
+ size_t protectionForm();
+ size_t protectionLevel();
+ size_t protectionOption();
+ const std::vector<PuncturingRule*>& get_rules();
+
+ int process(Buffer* inputData, Buffer* outputData);
+ const char* name() { return "SubchannelSource"; }
+ int read(Buffer* outputData);
+};
+
+
+#endif // SUBCHANNEL_SOURCE_H
diff --git a/src/TimeInterleaver.cpp b/src/TimeInterleaver.cpp
new file mode 100644
index 0000000..92cba79
--- /dev/null
+++ b/src/TimeInterleaver.cpp
@@ -0,0 +1,92 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "TimeInterleaver.h"
+#include "PcDebug.h"
+
+#include <vector>
+#include <stdint.h>
+
+
+TimeInterleaver::TimeInterleaver(size_t framesize)
+ throw (std::invalid_argument) :
+ ModCodec(ModFormat(framesize), ModFormat(framesize)),
+ d_framesize(framesize)
+{
+ PDEBUG("TimeInterleaver::TimeInterleaver(%zu) @ %p\n", framesize, this);
+
+ if (framesize & 1) {
+ throw std::invalid_argument("framesize must be 16 bits multiple");
+ }
+ for (int i = 0; i < 16; ++i) {
+ std::vector<unsigned char> data(framesize, 0);
+ d_history.push_back(data);
+ }
+}
+
+
+TimeInterleaver::~TimeInterleaver()
+{
+ PDEBUG("TimeInterleaver::~TimeInterleaver() @ %p\n", this);
+}
+
+
+int TimeInterleaver::process(Buffer* const dataIn, Buffer* dataOut)
+{
+ PDEBUG("TimeInterleaver::process(dataIn: %p, dataOut: %p)\n",
+ dataIn, dataOut);
+
+ dataOut->setLength(dataIn->getLength());
+ const unsigned char* in = reinterpret_cast<const unsigned char*>(dataIn->getData());
+ unsigned char* out = reinterpret_cast<unsigned char*>(dataOut->getData());
+
+
+ for (size_t i = 0; i < dataOut->getLength();) {
+ d_history.push_front(d_history.back());
+ d_history.pop_back();
+ for (uint_fast16_t j = 0; j < d_framesize;) {
+ d_history[0][j] = in[i];
+ out[i] = d_history[0] [j] & 0x80;
+ out[i] |= d_history[8] [j] & 0x40;
+ out[i] |= d_history[4] [j] & 0x20;
+ out[i] |= d_history[12][j] & 0x10;
+ out[i] |= d_history[2] [j] & 0x08;
+ out[i] |= d_history[10][j] & 0x04;
+ out[i] |= d_history[6] [j] & 0x02;
+ out[i] |= d_history[14][j] & 0x01;
+ ++i;
+ ++j;
+ d_history[0][j] = in[i];
+ out[i] = d_history[1] [j] & 0x80;
+ out[i] |= d_history[9] [j] & 0x40;
+ out[i] |= d_history[5] [j] & 0x20;
+ out[i] |= d_history[13][j] & 0x10;
+ out[i] |= d_history[3] [j] & 0x08;
+ out[i] |= d_history[11][j] & 0x04;
+ out[i] |= d_history[7] [j] & 0x02;
+ out[i] |= d_history[15][j] & 0x01;
+ ++i;
+ ++j;
+ }
+ }
+
+ return dataOut->getLength();
+}
diff --git a/src/TimeInterleaver.h b/src/TimeInterleaver.h
new file mode 100644
index 0000000..4a5a6aa
--- /dev/null
+++ b/src/TimeInterleaver.h
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
+ the Queen in Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef TIME_INTERLEAVER_H
+#define TIME_INTERLEAVER_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "ModCodec.h"
+
+#include <vector>
+#include <deque>
+#include <stdexcept>
+#include <sys/types.h>
+
+
+class TimeInterleaver : public ModCodec
+{
+private:
+
+protected:
+ size_t d_framesize;
+ std::deque<std::vector<unsigned char> > d_history;
+
+public:
+ TimeInterleaver(size_t framesize) throw (std::invalid_argument);
+ virtual ~TimeInterleaver();
+
+ int process(Buffer* const dataIn, Buffer* dataOut);
+ const char* name() { return "TimeInterleaver"; }
+};
+
+
+#endif // TIME_INTERLEAVER_H
diff --git a/src/crc-dwap.py b/src/crc-dwap.py
new file mode 100755
index 0000000..7fec510
--- /dev/null
+++ b/src/crc-dwap.py
@@ -0,0 +1,547 @@
+#!/usr/bin/env python
+
+# Copyright (C) 2006, 2007, 2008, 2009,-2010 Her Majesty the Queen in
+# Right of Canada (Communications Research Center Canada)
+
+# This file is part of CRC-DADMOD.
+#
+# CRC-DADMOD is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# CRC-DADMOD is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+
+
+from wxPython.wx import *
+from optparse import OptionParser
+from gnuradio import gr
+from gnuradio import usrp
+from gnuradio.wxgui import fftsink, scopesink
+from gnuradio.eng_notation import num_to_str
+from gnuradio.eng_option import *
+
+ID_ABOUT = wxNewId()
+ID_EXIT = wxNewId()
+ID_GAIN_SLIDER0 = wxNewId()
+ID_FREQ_SLIDER0 = wxNewId()
+ID_GAIN_SLIDER1 = wxNewId()
+ID_FREQ_SLIDER1 = wxNewId()
+ID_START = wxNewId()
+ID_STOP = wxNewId()
+
+def gcd(a, b) :
+ if b == 0 :
+ return a
+ return gcd(b, a % b)
+
+
+def appendFrequency(option, opt, value, parser):
+ if parser.values.frequency is None :
+ parser.values.frequency = [ value ]
+ else :
+ parser.values.frequency.append(value)
+
+def listUsrp(option, opt, value, parser):
+ id = 0
+ while (true) :
+ try:
+ version = usrp._look_for_usrp(id)
+ print "USRP #%i" % id
+ print " Rev: %i" % version
+ dst = usrp.sink_c(id)
+ src = usrp.source_c(id)
+ print " Tx"
+ for db in dst.db:
+ if (db[0].dbid() != -1):
+ print " %s" % db[0].side_and_name()
+ (min, max, offset) = db[0].freq_range()
+ print " Frequency"
+ print " Min: %sHz" % num_to_str(min)
+ print " Max: %sHz" % num_to_str(max)
+ print " Offset: %sHz" % num_to_str(offset)
+ (min, max, offset) = db[0].gain_range()
+ print " Gain"
+ print " Min: %sdB" % num_to_str(min)
+ print " Max: %sdB" % num_to_str(max)
+ print " Offset: %sdB" % num_to_str(offset)
+ print " Rx"
+ for db in src.db:
+ if (db[0].dbid() != -1):
+ print " %s" % db[0].side_and_name()
+ (min, max, offset) = db[0].freq_range()
+ print " Frequency"
+ print " Min: %sHz" % num_to_str(min)
+ print " Max: %sHz" % num_to_str(max)
+ print " Offset: %sHz" % num_to_str(offset)
+ (min, max, offset) = db[0].gain_range()
+ print " Gain"
+ print " Min: %sdB" % num_to_str(min)
+ print " Max: %sdB" % num_to_str(max)
+ print " Offset: %sdB" % num_to_str(offset)
+ except RuntimeError:
+ break
+ id += 1
+
+ raise SystemExit
+
+class MyFrame(wxFrame):
+ def __init__(self, parent, ID, title):
+ wxFrame.__init__(self, parent, ID, title,
+ wxDefaultPosition)
+
+ self.pga = 0
+ self.pgaMin = -20
+ self.pgaMax = 0
+ self.pgaStep = 0.25
+
+# Parsing options
+ parser = OptionParser(option_class=eng_option,
+ usage="usage: %prog [options] filename1" \
+ " [-f frequency2 filename2 [...]]")
+ parser.add_option("-a", "--agc", action="store_true",
+ help="enable agc")
+ parser.add_option("-c", "--clockrate", type="eng_float", default=128e6,
+ help="set USRP clock rate (128e6)")
+ parser.add_option("--copy", action="store_true",
+ help="enable real to imag data copy when in real mode")
+ parser.add_option("-e", "--encoding", type="choice", choices=["s", "f"],
+ default="f", help="choose data encoding: [s]igned or [f]loat.")
+ parser.add_option("-f", "--frequency", type="eng_float",
+ action="callback", callback=appendFrequency,
+ help="set output frequency (222.064e6)")
+ parser.add_option("-g", "--gain", type="float",
+ help="set output pga gain")
+ parser.add_option("-l", "--list", action="callback", callback=listUsrp,
+ help="list USRPs and daugtherboards")
+ parser.add_option("-m", "--mode", type="eng_float", default=2,
+ help="mode: 1: real, 2: complex (2)")
+ parser.add_option("-o", "--osc", action="store_true",
+ help="enable oscilloscope")
+ parser.add_option("-r", "--samplingrate", type="eng_float",
+ default=3.2e6,
+ help="set input sampling rate (3200000)")
+ parser.add_option("-s", "--spectrum", action="store_true",
+ help="enable spectrum analyzer")
+# parser.add_option("-t", "--tx", type="choice", choices=["A", "B"],
+# default="A", help="choose USRP tx A|B output (A)")
+ parser.add_option("-u", "--usrp", action="store_true",
+ help="enable USRP output")
+
+ (options, args) = parser.parse_args()
+ if len(args) == 0 :
+ options.filename = [ "/dev/stdin" ]
+ else :
+ options.filename = args
+# Setting default frequency
+ if options.frequency is None :
+ options.frequency = [ 222.064e6 ]
+ if len(options.filename) != len(options.frequency) :
+ parser.error("Nb input file != nb frequency!")
+
+# Status bar
+# self.CreateStatusBar(3, 0)
+# msg = "PGA: %.2f dB" % (self.pga * self.pgaStep)
+# self.SetStatusText(msg, 1)
+# msg = "Freq: %.3f mHz" % (options.frequency[0] / 1000000.0)
+# self.SetStatusText(msg, 2)
+
+# Menu bar
+ menu = wxMenu()
+ menu.Append(ID_ABOUT, "&About",
+ "More information about this program")
+ menu.AppendSeparator()
+ menu.Append(ID_EXIT, "E&xit", "Terminate the program")
+ menuBar = wxMenuBar()
+ menuBar.Append(menu, "&File")
+ self.SetMenuBar(menuBar)
+
+
+# Main windows
+ mainSizer = wxFlexGridSizer(0, 1)
+ sliderSizer = wxFlexGridSizer(0, 2)
+ buttonSizer = wxBoxSizer(wxHORIZONTAL)
+
+ if options.usrp :
+ # TX d'board 0
+ gainLabel = wxStaticText(self, -1, "PGA 0")
+ gainSlider = wxSlider(self, ID_GAIN_SLIDER0, self.pga,
+ self.pgaMin / self.pgaStep, self.pgaMax / self.pgaStep,
+ style = wxSL_HORIZONTAL | wxSL_AUTOTICKS)
+ gainSlider.SetSize((400, -1))
+ sliderSizer.Add(gainLabel, 0,
+ wxALIGN_CENTER_VERTICAL | wxFIXED_MINSIZE, 0)
+ sliderSizer.Add(gainSlider, 0,
+ wxALIGN_CENTER_VERTICAL | wxFIXED_MINSIZE, 0)
+
+ freqLabel = wxStaticText(self, -1, "Frequency 0")
+ freqSlider = wxSlider(self, ID_FREQ_SLIDER0,
+ options.frequency[0] / 16000, 0, 20e3,
+ style = wxSL_HORIZONTAL | wxSL_AUTOTICKS)
+ freqSlider.SetSize((400, -1))
+ sliderSizer.Add(freqLabel, 0,
+ wxALIGN_CENTER_VERTICAL | wxFIXED_MINSIZE, 0)
+ sliderSizer.Add(freqSlider, 0,
+ wxALIGN_CENTER_VERTICAL | wxFIXED_MINSIZE, 0)
+
+ if len(options.frequency) > 1 :
+ # TX d'board 1
+ gainLabel = wxStaticText(self, -1, "PGA 1")
+ gainSlider = wxSlider(self, ID_GAIN_SLIDER1, self.pga,
+ self.pgaMin / self.pgaStep, self.pgaMax / self.pgaStep,
+ style = wxSL_HORIZONTAL | wxSL_AUTOTICKS)
+ gainSlider.SetSize((400, -1))
+ sliderSizer.Add(gainLabel, 0,
+ wxALIGN_CENTER_VERTICAL | wxFIXED_MINSIZE, 0)
+ sliderSizer.Add(gainSlider, 0,
+ wxALIGN_CENTER_VERTICAL | wxFIXED_MINSIZE, 0)
+
+ freqLabel = wxStaticText(self, -1, "Frequency 1")
+ freqSlider = wxSlider(self, ID_FREQ_SLIDER1,
+ options.frequency[1] / 16000, 0, 20e3,
+ style = wxSL_HORIZONTAL | wxSL_AUTOTICKS)
+ freqSlider.SetSize((400, -1))
+ sliderSizer.Add(freqLabel, 0,
+ wxALIGN_CENTER_VERTICAL | wxFIXED_MINSIZE, 0)
+ sliderSizer.Add(freqSlider, 0,
+ wxALIGN_CENTER_VERTICAL | wxFIXED_MINSIZE, 0)
+
+ mainSizer.Add(sliderSizer, 1, wxEXPAND, 0)
+
+ start = wxButton(self, ID_START, "Start")
+ stop = wxButton(self, ID_STOP, "Stop")
+ buttonSizer.Add(start, 1, wxALIGN_CENTER, 0)
+ buttonSizer.Add(stop, 1, wxALIGN_CENTER, 0)
+ mainSizer.Add(buttonSizer, 1, wxEXPAND, 0)
+
+# GnuRadio
+ self.fg = gr.flow_graph()
+ if options.mode == 1 :
+ print "Source: real"
+ if (options.encoding == "s") :
+ print "Source encoding: short"
+ src = gr.file_source(gr.sizeof_short, options.filename[0], 1)
+ if (options.copy) :
+ print "Imag: copy"
+ imag = src
+ else :
+ print "Imag: null"
+ imag = gr.null_source(gr.sizeof_short)
+ interleaver = gr.interleave(gr.sizeof_short)
+ self.fg.connect(src, (interleaver, 0))
+ self.fg.connect(imag, (interleaver, 1))
+ tail = interleaver
+ elif (options.encoding == "f") :
+ print "Source encoding: float"
+ src = gr.file_source(gr.sizeof_gr_complex,
+ options.filename[0], 1)
+ tail = src
+ elif (options.mode == 2) :
+ print "Source: complex"
+ if len(options.frequency) == 1 :
+ if (options.encoding == "s") :
+ print "Source encoding: short"
+ src = gr.file_source(gr.sizeof_short,
+ options.filename[0], 1)
+ elif (options.encoding == "f") :
+ print "Source encoding: float"
+ src = gr.file_source(gr.sizeof_gr_complex,
+ options.filename[0], 1)
+ else :
+ parser.error("Invalid encoding type for complex data!")
+ tail = src
+
+ elif (len(options.frequency) == 2) :
+ src0 = gr.file_source(gr.sizeof_gr_complex,
+ options.filename[0], 1)
+ src1 = gr.file_source(gr.sizeof_gr_complex,
+ options.filename[1], 1)
+ interleaver = gr.interleave(gr.sizeof_gr_complex)
+ self.fg.connect(src0, (interleaver, 0))
+ self.fg.connect(src1, (interleaver, 1))
+ tail = interleaver
+ else :
+ parser.error(
+ "Invalid number of source (> 2) with complex input!")
+ else :
+ parser.error("Invalid mode!")
+
+# Interpolation
+ dac_freq = options.clockrate
+ interp = int(dac_freq / options.samplingrate)
+ if interp == 0 :
+ parser.error("Invalid sampling rate!")
+ if options.mode == 2 :
+ print "Input sampling rate: %s complex samples/s" % \
+ num_to_str(options.samplingrate)
+ else :
+ print "Input sampling rate: %s samples/s" % \
+ num_to_str(options.samplingrate)
+ print "Interpolation rate: int(%s / %s) = %sx" % \
+ (num_to_str(dac_freq), num_to_str(options.samplingrate), interp)
+ if interp > 512 :
+ factor = gcd(dac_freq / 512, options.samplingrate)
+ num = int((dac_freq / 512) / factor)
+ den = int(options.samplingrate / factor)
+ print "Resampling by %i / %i" % (num, den)
+ resampler = blks.rational_resampler_ccc(self.fg, num, den)
+ self.fg.connect(tail, resampler)
+ tail = resampler
+ interp = 512
+ options.samplingrate = dac_freq / 512
+
+# AGC
+ if options.agc :
+ agc = gr.agc_cc()
+ self.fg.connect(tail, agc)
+ tail = agc
+
+# USRP
+ if options.usrp :
+ nchan = len(options.frequency)
+ if len(options.frequency) == 1 :
+ if options.mode == 1 :
+ mux = 0x00000098
+ elif options.mode == 2 :
+ mux = 0x00000098
+ else :
+ parser.error("Unsupported mode for USRP mux!")
+ elif len(options.frequency) == 2 :
+ if options.mode == 1 :
+ mux = 0x0000ba98
+ elif options.mode == 2 :
+ mux = 0x0000ba98
+ else :
+ parser.error("Unsupported mode for USRP mux!")
+ else :
+ parser.error("Invalid number of frequency [0..2]!")
+# if options.tx == "A" :
+# mux = 0x00000098
+# else :
+# mux = 0x00009800
+ print "Nb channels: ", nchan
+ print "Mux: 0x%x" % mux
+ if options.encoding == 's' :
+ dst = usrp.sink_s(0, interp, nchan, mux)
+ elif options.encoding == 'f' :
+ dst = usrp.sink_c(0, interp, nchan, mux)
+ else :
+ parser.error("Unsupported data encoding for USRP!")
+
+ dst.set_verbose(1)
+
+ for i in range(len(options.frequency)) :
+ if options.gain is None :
+ print "Setting gain to %f" % dst.pga_max()
+ dst.set_pga(i << 1, dst.pga_max())
+ else :
+ print "Setting gain to %f" % options.gain
+ dst.set_pga(i << 1, options.gain)
+
+ tune = false
+ for dboard in dst.db:
+ if (dboard[0].dbid() != -1):
+ device = dboard[0]
+ print "Tuning TX d'board %s to %sHz" % \
+ (device.side_and_name(),
+ num_to_str(options.frequency[i]))
+ device.lo_offset = 38e6
+ (min, max, offset) = device.freq_range()
+ print " Frequency"
+ print " Min: %sHz" % num_to_str(min)
+ print " Max: %sHz" % num_to_str(max)
+ print " Offset: %sHz" % num_to_str(offset)
+#device.set_gain(device.gain_range()[1])
+ device.set_enable(True)
+ tune = \
+ dst.tune(device._which, device,
+ options.frequency[i] * 128e6 / dac_freq)
+ if tune:
+ print " Baseband frequency: %sHz" % \
+ num_to_str(tune.baseband_freq)
+ print " DXC frequency: %sHz" % \
+ num_to_str(tune.dxc_freq)
+ print " Residual Freqency: %sHz" % \
+ num_to_str(tune.residual_freq)
+ print " Inverted: ", \
+ tune.inverted
+ mux = usrp.determine_tx_mux_value(dst,
+ (device._which, 0))
+ dst.set_mux(mux)
+ break
+ else:
+ print " Failed!"
+ if not tune:
+ print " Failed!"
+ raise SystemExit
+
+# int nunderruns ()
+
+ print "USRP"
+ print " Rx halfband: ", dst.has_rx_halfband()
+ print " Tx halfband: ", dst.has_tx_halfband()
+ print " Nb DDC: ", dst.nddc()
+ print " Nb DUC: ", dst.nduc()
+#dst._write_9862(0, 14, 224)
+
+ print " DAC frequency: %s samples/s" % num_to_str(dst.dac_freq())
+ print " Fpga decimation rate: %s -> %s samples/s" % \
+ (num_to_str(dst.interp_rate()),
+ num_to_str(dac_freq / dst.interp_rate()))
+ print " Nb channels:",
+ if hasattr(dst, "nchannels()") :
+ print dst.nchannels()
+ else:
+ print "N/A"
+ print " Mux:",
+ if hasattr(dst, "mux()") :
+ print "0x%x" % dst.mux()
+ else :
+ print "N/A"
+ print " FPGA master clock frequency:",
+ if hasattr(dst, "fpga_master_clock_freq()") :
+ print "%sHz" % num_to_str(dst.fpga_master_clock_freq())
+ else :
+ print "N/A"
+ print " Converter rate:",
+ if hasattr(dst, "converter_rate()") :
+ print "%s" % num_to_str(dst.converter_rate())
+ else :
+ print "N/A"
+ print " DAC rate:",
+ if hasattr(dst, "dac_rate()") :
+ print "%s sample/s" % num_to_str(dst.dac_rate())
+ else :
+ print "N/A"
+ print " Interp rate: %sx" % num_to_str(dst.interp_rate())
+ print " DUC frequency 0: %sHz" % num_to_str(dst.tx_freq(0))
+ print " DUC frequency 1: %sHz" % num_to_str(dst.tx_freq(1))
+ print " Programmable Gain Amplifier 0: %s dB" % \
+ num_to_str(dst.pga(0))
+ print " Programmable Gain Amplifier 1: %s dB" % \
+ num_to_str(dst.pga(2))
+
+ else :
+ dst = gr.null_sink(gr.sizeof_gr_complex)
+
+# AGC
+ if options.agc :
+ agc = gr.agc_cc()
+ self.fg.connect(tail, agc)
+ tail = agc
+
+ self.fg.connect(tail, dst)
+
+# oscilloscope
+ if options.osc :
+ oscPanel = wxPanel(self, -1)
+ if (options.encoding == "s") :
+ converter = gr.interleaved_short_to_complex()
+ self.fg.connect(tail, converter)
+ signal = converter
+ elif (options.encoding == "f") :
+ signal = tail
+ else :
+ parser.error("Unsupported data encoding for oscilloscope!")
+
+#block = scope_sink_f(fg, parent, title=label, sample_rate=input_rate)
+#return (block, block.win)
+
+ oscWin = scopesink.scope_sink_c(self.fg, oscPanel, "Signal",
+ options.samplingrate)
+ self.fg.connect(signal, oscWin)
+ mainSizer.Add(oscPanel, 1, wxEXPAND)
+
+# spectrometer
+ if options.spectrum :
+ ymin = 0
+ ymax = 160
+ fftPanel = wxPanel(self, -1)
+ if (options.encoding == "s") :
+ converter = gr.interleaved_short_to_complex()
+ self.fg.connect(tail, converter)
+ signal = converter
+ elif (options.encoding == "f") :
+ signal = tail
+ else :
+ parser.error("Unsupported data encoding for oscilloscope!")
+
+ fftWin = fftsink.fft_sink_c(self.fg, fftPanel,
+ title="Spectrum",
+ fft_size=2048,
+ sample_rate=options.samplingrate,
+ y_per_div=(ymax - ymin) / 8,
+ ref_level=ymax,
+ fft_rate=50,
+ average=True
+ )
+ self.fg.connect(signal, fftWin)
+ mainSizer.Add(fftPanel, 1, wxEXPAND)
+
+# Events
+ EVT_MENU(self, ID_ABOUT, self.OnAbout)
+ EVT_MENU(self, ID_EXIT, self.TimeToQuit)
+ EVT_SLIDER(self, ID_GAIN_SLIDER0, self.slideEvent)
+ EVT_SLIDER(self, ID_FREQ_SLIDER0, self.slideEvent)
+ EVT_SLIDER(self, ID_GAIN_SLIDER1, self.slideEvent)
+ EVT_SLIDER(self, ID_FREQ_SLIDER1, self.slideEvent)
+ EVT_BUTTON(self, ID_START, self.onClick)
+ EVT_BUTTON(self, ID_STOP, self.onClick)
+
+#Layout sizers
+ self.SetSizer(mainSizer)
+ self.SetAutoLayout(1)
+ mainSizer.Fit(self)
+
+ self.fg.start()
+
+ def OnAbout(self, event):
+ dlg = wxMessageDialog(self, "This sample program shows off\n"
+ "frames, menus, statusbars, and this\n"
+ "message dialog.",
+ "About Me", wxOK | wxICON_INFORMATION)
+ dlg.ShowModal()
+ dlg.Destroy()
+
+
+ def TimeToQuit(self, event):
+ self.Close(true)
+
+ def slideEvent(self, evt):
+ value = evt.GetInt()
+ id = evt.GetId()
+ if id == ID_GAIN_SLIDER:
+ msg = "PGA: %.2f dB" % (value * self.pgaStep)
+ self.SetStatusText(msg, 1)
+ elif id == ID_FREQ_SLIDER:
+ msg = "Freq: %.3f mHz" % (value * 16.0 / 1000)
+ self.SetStatusText(msg, 2)
+ else:
+ print "Slider event not yet coded!"
+ self.Close(True)
+
+ def onClick(self, event):
+ id = event.GetId()
+ if id == ID_START:
+ self.fg.start()
+ elif id == ID_STOP:
+ self.fg.stop()
+ else:
+ print "Click event not yet coded!"
+ self.Close(True)
+
+class MyApp(wxApp):
+ def OnInit(self):
+ frame = MyFrame(NULL, -1, "Digital WAve Player")
+ frame.Show(true)
+ self.SetTopWindow(frame)
+ return true
+
+app = MyApp(0)
+app.MainLoop()
diff --git a/src/kiss_fftsimd.c b/src/kiss_fftsimd.c
new file mode 100644
index 0000000..375f552
--- /dev/null
+++ b/src/kiss_fftsimd.c
@@ -0,0 +1,44 @@
+/*
+ Copyright (C) 2011, 2012
+ Her Majesty the Queen in Right of Canada (Communications Research
+ Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "kiss_fftsimd.h"
+
+
+#ifdef USE_SIMD
+void kiss_fft_pack(kiss_fft_complex *in, size_t in_size, size_t in_offset,
+ kiss_fft_complex *out, size_t out_size, size_t out_offset,
+ size_t stride, size_t n)
+{
+ size_t i, j;
+ complex_float *in_cplx = (complex_float*)in;
+
+ for (i = 0; i < 4; ++i) {
+ if (in_offset < in_size) {
+ for (j = 0; j < n; ++j) {
+ out[out_offset + j].r[i] = in_cplx[in_offset + j].r;
+ out[out_offset + j].i[i] = in_cplx[in_offset + j].i;
+ }
+ in_offset += stride;
+ }
+ }
+}
+#endif
diff --git a/src/kiss_fftsimd.h b/src/kiss_fftsimd.h
new file mode 100644
index 0000000..a1ad1c6
--- /dev/null
+++ b/src/kiss_fftsimd.h
@@ -0,0 +1,68 @@
+/*
+ Copyright (C) 2011, 2012
+ Her Majesty the Queen in Right of Canada (Communications Research
+ Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef KISS_FFTSIMD_H
+#define KISS_FFTSIMD_H
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <kiss_fft.h>
+
+
+#define FFT_TYPE kiss_fft_cpx
+#define FFT_PLAN kiss_fft_cfg
+#define FFT_REAL(a) (a).r
+#define FFT_IMAG(a) (a).i
+
+
+#ifdef __SSE__
+#include <xmmintrin.h>
+union __u128 {
+ __m128 m;
+ float f[4];
+};
+#endif
+
+
+#ifdef USE_SIMD
+
+typedef struct {
+ float r[4];
+ float i[4];
+} kiss_fft_complex;
+
+typedef struct {
+ float r;
+ float i;
+} complex_float;
+
+void kiss_fft_pack(kiss_fft_complex *in, size_t in_size, size_t in_offset,
+ kiss_fft_complex *out, size_t out_size, size_t out_offset,
+ size_t stride, size_t n);
+void kiss_fft_unpack(kiss_fft_complex *dst, kiss_fft_complex *src, size_t n, size_t offset, size_t stride);
+
+#endif
+
+
+#endif // KISS_FFTSIMD_H
diff --git a/src/porting.c b/src/porting.c
new file mode 100644
index 0000000..7342913
--- /dev/null
+++ b/src/porting.c
@@ -0,0 +1,39 @@
+/*
+ Copyright (C) 2007, 2008, 2009, 2010 Her Majesty the Queen in
+ Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "porting.h"
+
+
+#ifndef HAVE_GETTIMEOFDAY
+#include <sys/timeb.h>
+int gettimeofday(struct timeval* t, void* timezone)
+{
+ struct timeb timebuffer;
+ ftime(&timebuffer);
+ t->tv_sec=timebuffer.time;
+ t->tv_usec=1000*timebuffer.millitm;
+ return 0;
+}
+#endif
+
+#ifdef _WIN32
+unsigned int _CRT_fmode = _O_BINARY;
+#endif
diff --git a/src/porting.h b/src/porting.h
new file mode 100644
index 0000000..79c71ef
--- /dev/null
+++ b/src/porting.h
@@ -0,0 +1,52 @@
+/*
+ Copyright (C) 2007, 2008, 2009, 2010 Her Majesty the Queen in
+ Right of Canada (Communications Research Center Canada)
+ */
+/*
+ This file is part of CRC-DADMOD.
+
+ CRC-DADMOD is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ CRC-DADMOD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with CRC-DADMOD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef PORTING_H
+#define PORTING_H
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifndef HAVE_BZERO
+# define bzero(s, n) memset(s, 0, n)
+#endif
+
+#ifndef HAVE_GETTIMEOFDAY
+#include <sys/time.h>
+#ifdef __cplusplus
+extern "C"
+#endif
+int gettimeofday(struct timeval* t, void* timezone);
+#endif
+
+#ifdef _WIN32
+#include <fcntl.h>
+// For setting default opening mode with fopen as binary, for all files
+// including stdin and stdout
+extern unsigned int _CRT_fmode;
+#endif
+
+#ifndef HAVE_KILL
+# define kill(a, b) raise(b)
+#endif
+
+#endif // PORTING_H