summaryrefslogtreecommitdiffstats
path: root/src/OfdmGenerator.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-10-24 16:20:20 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-10-24 16:30:05 +0200
commitfc199a7284c5f3a5a84631583ea704748d50b28e (patch)
treeeeb0566fc8498846caf5f0a7c495b40c8f303305 /src/OfdmGenerator.h
parentde6eb96c71873fb23f0847424dca724b933ee399 (diff)
downloaddabmod-fc199a7284c5f3a5a84631583ea704748d50b28e.tar.gz
dabmod-fc199a7284c5f3a5a84631583ea704748d50b28e.tar.bz2
dabmod-fc199a7284c5f3a5a84631583ea704748d50b28e.zip
Add possibility to use FFTW for OfdmGenerator
Diffstat (limited to 'src/OfdmGenerator.h')
-rw-r--r--src/OfdmGenerator.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/OfdmGenerator.h b/src/OfdmGenerator.h
index 5be2d03..ec9f14a 100644
--- a/src/OfdmGenerator.h
+++ b/src/OfdmGenerator.h
@@ -1,6 +1,11 @@
/*
Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
the Queen in Right of Canada (Communications Research Center Canada)
+
+ Copyright (C) 2014
+ Matthias P. Braendli, matthias.braendli@mpb.li
+
+ http://opendigitalradio.org
*/
/*
This file is part of ODR-DabMod.
@@ -28,10 +33,14 @@
#include "porting.h"
#include "ModCodec.h"
-#include "kiss_fftsimd.h"
+#if USE_FFTW
+# include "fftw3.h"
+#else
+# include "kiss_fftsimd.h"
+# include <kiss_fft.h>
+#endif
-#include <kiss_fft.h>
#include <sys/types.h>
@@ -48,8 +57,13 @@ public:
const char* name() { return "OfdmGenerator"; }
protected:
+#if USE_FFTW
+ fftwf_plan myFftPlan;
+ fftwf_complex *myFftIn, *myFftOut;
+#else
FFT_PLAN myFftPlan;
FFT_TYPE *myFftBuffer;
+#endif
size_t myNbSymbols;
size_t myNbCarriers;
size_t mySpacing;
@@ -63,5 +77,5 @@ protected:
unsigned myZeroSize;
};
-
#endif // OFDM_GENERATOR_H
+