From 99871dcb8490f5b3e8c31b7820198ed3c7a4a07a Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Tue, 10 Nov 2015 15:10:52 -0800 Subject: [PATCH] Move a few member variables to stack/constants. --- firmware/baseband/channel_decimator.cpp | 10 ++++++++++ firmware/baseband/channel_decimator.hpp | 9 --------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/firmware/baseband/channel_decimator.cpp b/firmware/baseband/channel_decimator.cpp index 89d1af4a..a7e7edf7 100644 --- a/firmware/baseband/channel_decimator.cpp +++ b/firmware/baseband/channel_decimator.cpp @@ -22,6 +22,16 @@ #include "channel_decimator.hpp" buffer_c16_t ChannelDecimator::execute_decimation(buffer_c8_t buffer) { + const buffer_c16_t work_baseband_buffer { + work_baseband.data(), + work_baseband.size() + }; + + const buffer_s16_t work_audio_buffer { + (int16_t*)work_baseband.data(), + sizeof(work_baseband) / sizeof(int16_t) + }; + /* 3.072MHz complex[2048], [-128, 127] * -> Shift by -fs/4 * -> 3rd order CIC: -0.1dB @ 0.028fs, -1dB @ 0.088fs, -60dB @ 0.468fs diff --git a/firmware/baseband/channel_decimator.hpp b/firmware/baseband/channel_decimator.hpp index b4ee4784..3e20c0df 100644 --- a/firmware/baseband/channel_decimator.hpp +++ b/firmware/baseband/channel_decimator.hpp @@ -62,15 +62,6 @@ public: private: std::array work_baseband; - const buffer_c16_t work_baseband_buffer { - work_baseband.data(), - work_baseband.size() - }; - const buffer_s16_t work_audio_buffer { - (int16_t*)work_baseband.data(), - sizeof(work_baseband) / sizeof(int16_t) - }; - //const bool fs_over_4_downconvert = true; dsp::decimate::TranslateByFSOver4AndDecimateBy2CIC3 translate;