From d0f97d0a5c130c230291b353f0e54a096ec4bd60 Mon Sep 17 00:00:00 2001 From: f4exb Date: Tue, 21 Apr 2020 01:25:42 +0200 Subject: [PATCH] DATV demod: apply commit90c280f03339fe173baf2f908c37135b9b4c05bd Add complex ops. --- plugins/channelrx/demoddatv/leansdr/math.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/channelrx/demoddatv/leansdr/math.h b/plugins/channelrx/demoddatv/leansdr/math.h index 3a6d84a7c..bb1c98397 100644 --- a/plugins/channelrx/demoddatv/leansdr/math.h +++ b/plugins/channelrx/demoddatv/leansdr/math.h @@ -45,6 +45,11 @@ struct complex im = re * c.im + im * c.re; re = tre; } + inline void operator-=(const complex &x) + { + re-=x.re; + im-=x.im; + } inline void operator*=(const T &k) { re *= k; @@ -58,6 +63,11 @@ complex operator+(const complex &a, const complex &b) return complex(a.re + b.re, a.im + b.im); } +template +complex operator -(const complex &a, const complex &b) { + return complex(a.re - b.re, a.im - b.im); +} + template complex operator*(const complex &a, const complex &b) {