From b563b465e8b3df367da7799e789d29e0009cb96a Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sat, 5 Oct 2024 17:24:31 +0200 Subject: Move typedef of complexf to Buffer.h --- src/Buffer.h | 2 ++ src/CicEqualizer.h | 5 ----- src/DabMod.cpp | 5 ----- src/DabModulator.h | 4 ---- src/DifferentialModulator.cpp | 8 ++------ src/FIRFilter.h | 7 ------- src/FrameMultiplexer.cpp | 12 +++--------- src/FrequencyInterleaver.cpp | 7 ++----- src/GainControl.h | 4 ---- src/GuardIntervalInserter.cpp | 2 -- src/MemlessPoly.h | 5 ----- src/ModPlugin.h | 2 -- src/NullSymbol.cpp | 9 +++------ src/OfdmGenerator.h | 2 -- src/PAPRStats.cpp | 1 - src/PAPRStats.h | 5 ++--- src/QpskSymbolMapper.cpp | 4 ---- src/Resampler.h | 3 --- src/TII.cpp | 7 ++----- 19 files changed, 16 insertions(+), 78 deletions(-) diff --git a/src/Buffer.h b/src/Buffer.h index af52e93..077d654 100644 --- a/src/Buffer.h +++ b/src/Buffer.h @@ -33,6 +33,8 @@ #include #include +#include +typedef std::complex complexf; /* Buffer is a container for a byte array, which is memory-aligned * to 32 bytes for SSE performance. diff --git a/src/CicEqualizer.h b/src/CicEqualizer.h index 792da02..70c3ae9 100644 --- a/src/CicEqualizer.h +++ b/src/CicEqualizer.h @@ -25,19 +25,14 @@ # include #endif - #include "ModPlugin.h" #include #include -#include #ifdef __SSE__ # include #endif - -typedef std::complex complexf; - class CicEqualizer : public ModCodec { public: diff --git a/src/DabMod.cpp b/src/DabMod.cpp index 6b02d75..4e338f9 100644 --- a/src/DabMod.cpp +++ b/src/DabMod.cpp @@ -31,10 +31,8 @@ #endif #include -#include #include #include -#include #include #include #include @@ -51,7 +49,6 @@ #include "Utils.h" #include "Log.h" #include "DabModulator.h" -#include "InputMemory.h" #include "OutputFile.h" #include "FormatConverter.h" #include "FrameMultiplexer.h" @@ -83,8 +80,6 @@ static const float normalise_factor_file_fix = 81000.0f; static const float normalise_factor_file_var = 46000.0f; static const float normalise_factor_file_max = 46000.0f; -typedef std::complex complexf; - using namespace std; volatile sig_atomic_t running = 1; diff --git a/src/DabModulator.h b/src/DabModulator.h index 093a782..82782cd 100644 --- a/src/DabModulator.h +++ b/src/DabModulator.h @@ -40,12 +40,8 @@ #include "EtiReader.h" #include "Flowgraph.h" #include "FormatConverter.h" -#include "GainControl.h" #include "OutputMemory.h" #include "RemoteControl.h" -#include "Log.h" -#include "TII.h" - class DabModulator : public ModInput, public ModMetadata, public RemoteControllable { diff --git a/src/DifferentialModulator.cpp b/src/DifferentialModulator.cpp index 97a7998..54e97e2 100644 --- a/src/DifferentialModulator.cpp +++ b/src/DifferentialModulator.cpp @@ -22,13 +22,9 @@ #include "DifferentialModulator.h" #include "PcDebug.h" -#include +#include #include -#include -#include - -typedef std::complex complexf; - +#include DifferentialModulator::DifferentialModulator(size_t carriers) : ModMux(), diff --git a/src/FIRFilter.h b/src/FIRFilter.h index a4effa1..2d8fba9 100644 --- a/src/FIRFilter.h +++ b/src/FIRFilter.h @@ -33,21 +33,14 @@ #include "RemoteControl.h" #include "ModPlugin.h" -#include "PcDebug.h" #include -#include -#include #include -#include #include #include -#include #define FIRFILTER_PIPELINE_DELAY 1 -typedef std::complex complexf; - class FIRFilter : public PipelinedModCodec, public RemoteControllable { public: diff --git a/src/FrameMultiplexer.cpp b/src/FrameMultiplexer.cpp index e893120..ebd8b76 100644 --- a/src/FrameMultiplexer.cpp +++ b/src/FrameMultiplexer.cpp @@ -25,17 +25,11 @@ */ #include "FrameMultiplexer.h" -#include "PcDebug.h" -#include #include -#include -#include -#include -#include -#include - -typedef std::complex complexf; +#include +#include +#include FrameMultiplexer::FrameMultiplexer( const EtiSource& etiSource) : diff --git a/src/FrequencyInterleaver.cpp b/src/FrequencyInterleaver.cpp index e76d525..a62e9f4 100644 --- a/src/FrequencyInterleaver.cpp +++ b/src/FrequencyInterleaver.cpp @@ -22,13 +22,10 @@ #include "FrequencyInterleaver.h" #include "PcDebug.h" -#include #include #include -#include -#include - -typedef std::complex complexf; +#include +#include FrequencyInterleaver::FrequencyInterleaver(size_t mode) : diff --git a/src/GainControl.h b/src/GainControl.h index 04f6b58..d40a7d7 100644 --- a/src/GainControl.h +++ b/src/GainControl.h @@ -35,7 +35,6 @@ #include "RemoteControl.h" #include -#include #include #include @@ -43,9 +42,6 @@ # include #endif - -typedef std::complex complexf; - enum class GainMode { GAIN_FIX = 0, GAIN_MAX = 1, GAIN_VAR = 2 }; class GainControl : public PipelinedModCodec, public RemoteControllable diff --git a/src/GuardIntervalInserter.cpp b/src/GuardIntervalInserter.cpp index 3c2db14..e200b84 100644 --- a/src/GuardIntervalInserter.cpp +++ b/src/GuardIntervalInserter.cpp @@ -29,10 +29,8 @@ #include #include #include -#include #include -typedef std::complex complexf; GuardIntervalInserter::GuardIntervalInserter( size_t nbSymbols, diff --git a/src/MemlessPoly.h b/src/MemlessPoly.h index 91e6860..72de62c 100644 --- a/src/MemlessPoly.h +++ b/src/MemlessPoly.h @@ -32,13 +32,10 @@ #include "RemoteControl.h" #include "ModPlugin.h" -#include "PcDebug.h" #include "ThreadsafeQueue.h" #include #include -#include -#include #include #include #include @@ -47,8 +44,6 @@ #define MEMLESSPOLY_PIPELINE_DELAY 1 -typedef std::complex complexf; - enum class dpd_type_t { odd_only_poly, lookup_table diff --git a/src/ModPlugin.h b/src/ModPlugin.h index 470508f..bb3ee2c 100644 --- a/src/ModPlugin.h +++ b/src/ModPlugin.h @@ -33,9 +33,7 @@ #include "Buffer.h" #include "ThreadsafeQueue.h" #include "TimestampDecoder.h" -#include #include -#include #include #include diff --git a/src/NullSymbol.cpp b/src/NullSymbol.cpp index 4684dfe..023ae42 100644 --- a/src/NullSymbol.cpp +++ b/src/NullSymbol.cpp @@ -27,12 +27,9 @@ #include "NullSymbol.h" #include "PcDebug.h" -#include -#include -#include -#include - -typedef std::complex complexf; +#include +#include +#include NullSymbol::NullSymbol(size_t nbCarriers) : ModInput(), diff --git a/src/OfdmGenerator.h b/src/OfdmGenerator.h index dc1ad46..cab936e 100644 --- a/src/OfdmGenerator.h +++ b/src/OfdmGenerator.h @@ -39,8 +39,6 @@ #include #include -typedef std::complex complexf; - class OfdmGenerator : public ModCodec, public RemoteControllable { public: diff --git a/src/PAPRStats.cpp b/src/PAPRStats.cpp index 0c9764a..103f02f 100644 --- a/src/PAPRStats.cpp +++ b/src/PAPRStats.cpp @@ -33,7 +33,6 @@ # include #endif - PAPRStats::PAPRStats(size_t num_blocks_to_accumulate) : m_num_blocks_to_accumulate(num_blocks_to_accumulate) { diff --git a/src/PAPRStats.h b/src/PAPRStats.h index 86ad8b0..a4ded86 100644 --- a/src/PAPRStats.h +++ b/src/PAPRStats.h @@ -31,12 +31,9 @@ #endif #include -#include #include #include -typedef std::complex complexf; - /* Helper class to calculate Peak-to-average-power ratio. * Definition of PAPR: * @@ -53,6 +50,8 @@ typedef std::complex complexf; */ class PAPRStats { + typedef std::complex complexf; + public: PAPRStats(size_t num_blocks_to_accumulate); diff --git a/src/QpskSymbolMapper.cpp b/src/QpskSymbolMapper.cpp index e26853a..c9b01fb 100644 --- a/src/QpskSymbolMapper.cpp +++ b/src/QpskSymbolMapper.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #ifdef __SSE__ # include @@ -32,9 +31,6 @@ #include "QpskSymbolMapper.h" #include "PcDebug.h" - -typedef std::complex complexf; - QpskSymbolMapper::QpskSymbolMapper(size_t carriers) : ModCodec(), d_carriers(carriers) { } diff --git a/src/Resampler.h b/src/Resampler.h index d1a9f7a..2c810f6 100644 --- a/src/Resampler.h +++ b/src/Resampler.h @@ -37,9 +37,6 @@ #define FFT_TYPE fftwf_complex #define FFT_PLAN fftwf_plan -#include -typedef std::complex complexf; - class Resampler : public ModCodec { diff --git a/src/TII.cpp b/src/TII.cpp index 2656cbf..155d1c9 100644 --- a/src/TII.cpp +++ b/src/TII.cpp @@ -27,11 +27,8 @@ #include "TII.h" #include "PcDebug.h" -#include -#include -#include - -typedef std::complex complexf; +#include +#include /* TII pattern for TM I, II, IV */ const int pattern_tm1_2_4[][8] = { // {{{ -- cgit v1.2.3