diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-10-29 23:52:22 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-10-29 23:52:22 +0100 |
commit | f1a3db6d7dc1461bcf4a8933a77267698fdffd30 (patch) | |
tree | b20e5054899335f340e26b9220c85691eeb70087 /src/GuardIntervalInserter.cpp | |
parent | 933021ed44e6c1bd2cf1dee91fc033c145c061af (diff) | |
download | dabmod-f1a3db6d7dc1461bcf4a8933a77267698fdffd30.tar.gz dabmod-f1a3db6d7dc1461bcf4a8933a77267698fdffd30.tar.bz2 dabmod-f1a3db6d7dc1461bcf4a8933a77267698fdffd30.zip |
Rework fixed point config setting
Diffstat (limited to 'src/GuardIntervalInserter.cpp')
-rw-r--r-- | src/GuardIntervalInserter.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/GuardIntervalInserter.cpp b/src/GuardIntervalInserter.cpp index 4e22367..7061e47 100644 --- a/src/GuardIntervalInserter.cpp +++ b/src/GuardIntervalInserter.cpp @@ -49,10 +49,10 @@ GuardIntervalInserter::GuardIntervalInserter( size_t nullSize, size_t symSize, size_t& windowOverlap, - bool fixedPoint) : + FFTEngine fftEngine) : ModCodec(), RemoteControllable("guardinterval"), - m_fixedPoint(fixedPoint), + m_fftEngine(fftEngine), m_params(nbSymbols, spacing, nullSize, symSize, windowOverlap) { if (nullSize == 0) { @@ -277,15 +277,18 @@ int do_process(const GuardIntervalInserter::Params& p, Buffer* const dataIn, Buf int GuardIntervalInserter::process(Buffer* const dataIn, Buffer* dataOut) { - if (m_fixedPoint) { - if (m_params.windowOverlap) { - throw std::runtime_error("fixed point and ofdm windowing not supported"); - } - return do_process<complexfix>(m_params, dataIn, dataOut); - } - else { - return do_process<complexf>(m_params, dataIn, dataOut); + switch (m_fftEngine) { + case FFTEngine::FFTW: + return do_process<complexf>(m_params, dataIn, dataOut); + case FFTEngine::KISS: + if (m_params.windowOverlap) { + throw std::runtime_error("fixed point and ofdm windowing not supported"); + } + return do_process<complexfix>(m_params, dataIn, dataOut); + case FFTEngine::DEXTER: + return do_process<complexfix_wide>(m_params, dataIn, dataOut); } + throw std::logic_error("Unhandled fftEngine variant"); } void GuardIntervalInserter::set_parameter( |