aboutsummaryrefslogtreecommitdiffstats
path: root/src/PhaseReference.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2024-11-25 21:02:36 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2024-11-25 21:02:36 +0100
commit2e9500d4854a3db9e0f407021934407155b82776 (patch)
tree72681993fb7ebdadb9b9bc41fe9a6a8130ab1da3 /src/PhaseReference.h
parent23b5d884dbdb4ce6a20872cce6a48ea0eed39f39 (diff)
parentd45cca6f447c9a72bc9eaeb9d861fa6fcff9e597 (diff)
downloaddabmod-2e9500d4854a3db9e0f407021934407155b82776.tar.gz
dabmod-2e9500d4854a3db9e0f407021934407155b82776.tar.bz2
dabmod-2e9500d4854a3db9e0f407021934407155b82776.zip
Merge branch 'fixedpoint' into next
Diffstat (limited to 'src/PhaseReference.h')
-rw-r--r--src/PhaseReference.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/PhaseReference.h b/src/PhaseReference.h
index 6ecdc4e..735009c 100644
--- a/src/PhaseReference.h
+++ b/src/PhaseReference.h
@@ -32,25 +32,33 @@
#include "ModPlugin.h"
-#include <cstddef>
-#include <complex>
#include <vector>
+#include <cstddef>
+
+template <typename T>
+struct PhaseRefGen {
+ std::vector<T> dataIn;
+ void fillData(unsigned int dabmode, size_t carriers);
+
+ private:
+ T convert(uint8_t data);
+};
+
class PhaseReference : public ModInput
{
public:
- PhaseReference(unsigned int dabmode);
+ PhaseReference(unsigned int dabmode, bool fixedPoint);
int process(Buffer* dataOut) override;
const char* name() override { return "PhaseReference"; }
protected:
unsigned int d_dabmode;
+ bool d_fixedPoint;
size_t d_carriers;
- size_t d_num;
- const static uint8_t d_h[4][32];
- std::vector<std::complex<float> > d_dataIn;
- void fillData();
+ PhaseRefGen<complexf> d_phaseRefCF32;
+ PhaseRefGen<complexfix> d_phaseRefFixed;
};