From 28e5b7e4afc41d52fda16e03cb1a16627a42ff86 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Fri, 29 Jan 2016 17:06:22 -0800 Subject: [PATCH] Remove some filter constructors, reset Z on configure(). --- firmware/baseband/dsp_decimate.cpp | 20 ++++---------------- firmware/baseband/dsp_decimate.hpp | 8 -------- 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/firmware/baseband/dsp_decimate.cpp b/firmware/baseband/dsp_decimate.cpp index 5c5ba40e..af5f12e3 100644 --- a/firmware/baseband/dsp_decimate.cpp +++ b/firmware/baseband/dsp_decimate.cpp @@ -179,10 +179,6 @@ static inline uint32_t scale_round_and_pack( // FIRC8xR16x24FS4Decim4 ////////////////////////////////////////////////// -FIRC8xR16x24FS4Decim4::FIRC8xR16x24FS4Decim4() { - z_.fill({}); -} - void FIRC8xR16x24FS4Decim4::configure( const std::array& taps, const int32_t scale, @@ -196,6 +192,7 @@ void FIRC8xR16x24FS4Decim4::configure( taps_[i+3] = taps[i+3] * negate_factor; } output_scale = scale; + z_.fill({}); } buffer_c16_t FIRC8xR16x24FS4Decim4::execute( @@ -244,10 +241,6 @@ buffer_c16_t FIRC8xR16x24FS4Decim4::execute( // FIRC8xR16x24FS4Decim8 ////////////////////////////////////////////////// -FIRC8xR16x24FS4Decim8::FIRC8xR16x24FS4Decim8() { - z_.fill({}); -} - void FIRC8xR16x24FS4Decim8::configure( const std::array& taps, const int32_t scale, @@ -261,6 +254,7 @@ void FIRC8xR16x24FS4Decim8::configure( taps_[i+3] = taps[i+3] * negate_factor; } output_scale = scale; + z_.fill({}); } buffer_c16_t FIRC8xR16x24FS4Decim8::execute( @@ -309,16 +303,13 @@ buffer_c16_t FIRC8xR16x24FS4Decim8::execute( // FIRC16xR16x16Decim2 //////////////////////////////////////////////////// -FIRC16xR16x16Decim2::FIRC16xR16x16Decim2() { - z_.fill({}); -} - void FIRC16xR16x16Decim2::configure( const std::array& taps, const int32_t scale ) { std::copy(taps.cbegin(), taps.cend(), taps_.begin()); output_scale = scale; + z_.fill({}); } buffer_c16_t FIRC16xR16x16Decim2::execute( @@ -363,16 +354,13 @@ buffer_c16_t FIRC16xR16x16Decim2::execute( // FIRC16xR16x32Decim8 //////////////////////////////////////////////////// -FIRC16xR16x32Decim8::FIRC16xR16x32Decim8() { - z_.fill({}); -} - void FIRC16xR16x32Decim8::configure( const std::array& taps, const int32_t scale ) { std::copy(taps.cbegin(), taps.cend(), taps_.begin()); output_scale = scale; + z_.fill({}); } buffer_c16_t FIRC16xR16x32Decim8::execute( diff --git a/firmware/baseband/dsp_decimate.hpp b/firmware/baseband/dsp_decimate.hpp index d3f41555..0f4ca845 100644 --- a/firmware/baseband/dsp_decimate.hpp +++ b/firmware/baseband/dsp_decimate.hpp @@ -103,8 +103,6 @@ public: Up = false }; - FIRC8xR16x24FS4Decim4(); - void configure( const std::array& taps, const int32_t scale, @@ -135,8 +133,6 @@ public: Up = false }; - FIRC8xR16x24FS4Decim8(); - void configure( const std::array& taps, const int32_t scale, @@ -162,8 +158,6 @@ public: using sample_t = complex16_t; using tap_t = int16_t; - FIRC16xR16x16Decim2(); - void configure( const std::array& taps, const int32_t scale @@ -188,8 +182,6 @@ public: using sample_t = complex16_t; using tap_t = int16_t; - FIRC16xR16x32Decim8(); - void configure( const std::array& taps, const int32_t scale