From e38f88b9cca34c86f02b4460ae2690b69db974c0 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Sun, 21 Dec 2014 11:49:37 +0000 Subject: [PATCH] - cleaned up git-svn-id: http://moon:8086/svn/software/trunk/libsrc/cpp@100 b431acfa-c32f-4a4a-93f1-934dc6c82436 --- radio/Interpolation.hpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/radio/Interpolation.hpp b/radio/Interpolation.hpp index a234d87..172a970 100644 --- a/radio/Interpolation.hpp +++ b/radio/Interpolation.hpp @@ -316,19 +316,23 @@ public: { uint32_t i; uint32_t j; - ComplexScalar res(0,0); j = 0; for (i=0; i < len; i++) { m_pFir[m_currStage].feed(src(i)); - res += m_pFir[m_currStage].processReal(m_pCoeff[m_currStage]); - m_currStage--; - if (m_currStage >= m_M) + if (m_currStage == (m_M-1)) + { + dst(j) = m_pFir[m_currStage].processReal(m_pCoeff[m_currStage]); + } + else + { + dst(j) += m_pFir[m_currStage].processReal(m_pCoeff[m_currStage]); + } + if (--m_currStage >= m_M) { - dst(j++) = res; - res = ComplexScalar(0,0); m_currStage = m_M-1; + j++; } }