From 0f73d6061a59c8c0d8fe8070285971ac40932951 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Tue, 3 Nov 2015 12:09:01 -0800 Subject: [PATCH] Remove old decimating FIR code. --- firmware/baseband/dsp_decimate.cpp | 80 ------------------------------ firmware/baseband/dsp_decimate.hpp | 9 ---- 2 files changed, 89 deletions(-) diff --git a/firmware/baseband/dsp_decimate.cpp b/firmware/baseband/dsp_decimate.cpp index 863af34fe..4eeb6d2bc 100644 --- a/firmware/baseband/dsp_decimate.cpp +++ b/firmware/baseband/dsp_decimate.cpp @@ -196,87 +196,7 @@ buffer_s16_t FIR64AndDecimateBy2Real::execute( return { dst.p, src.count / 2, src.sampling_rate / 2 }; } -#if 0 -size_t fir_and_decimate_by_2_complex( - const complex16_t* const src_start, - const size_t src_count, - complex16_t* const dst_start, - complex16_t* const z, - const complex16_t* const taps, - const size_t taps_count -) { - /* int16_t input (sample count "n" must be multiple of 4) - * -> int16_t output, decimated by 2. - * taps are normalized to 1 << 16 == 1.0. - */ - auto src_p = src_start; - const auto src_end = &src_start[src_count]; - auto dst_p = dst_start; - auto z_p = &z[0]; - - while(src_p < src_end) { - /* Put two new samples into delay buffer */ - *__SIMD32(z_p)++ = *__SIMD32(src_p)++; - *__SIMD32(z_p)++ = *__SIMD32(src_p)++; - - int64_t t_real = 0; - int64_t t_imag = 0; - - auto t_p = &taps[0]; - - const auto z_end = &z[taps_count]; - while(z_p < z_end) { - const auto tap0 = *__SIMD32(t_p)++; - const auto sample0 = *__SIMD32(z_p)++; - t_real = __SMLSLD(sample0, tap0, t_real); - t_imag = __SMLALDX(sample0, tap0, t_imag); - - const auto tap1 = *__SIMD32(t_p)++; - const auto sample1 = *__SIMD32(z_p)++; - t_real = __SMLSLD(sample1, tap1, t_real); - t_imag = __SMLALDX(sample1, tap1, t_imag); - } - - z_p = &z[0]; - - const auto t_end = &taps[taps_count]; - while(t_p < t_end) { - const auto tap0 = *__SIMD32(t_p)++; - const auto sample0 = *__SIMD32(z_p)++; - t_real = __SMLSLD(sample0, tap0, t_real); - t_imag = __SMLALDX(sample0, tap0, t_imag); - - const auto tap1 = *__SIMD32(t_p)++; - const auto sample1 = *__SIMD32(z_p)++; - t_real = __SMLSLD(sample1, tap1, t_real); - t_imag = __SMLALDX(sample1, tap1, t_imag); - } - - if( z_p == z_end ) { - z_p = &z[0]; - } - - /* TODO: No rounding taking place here, so might be adding a bit of - * noise. Enough to be significant? - */ - *__SIMD32(dst_p)++ = __PKHBT( - t_real / 131072, - t_imag / 131072, - 16 - ); - /* - *__SIMD32(dst_p)++ = __PKHBT( - __SSAT((t_real / 131072), 16), - __SSAT((t_imag / 131072), 16), - 16 - ); - */ - } - - return src_count / 2; -} -#endif size_t fir_and_decimate_by_2_complex_fast( const complex16_t* const src_start, const size_t src_count, diff --git a/firmware/baseband/dsp_decimate.hpp b/firmware/baseband/dsp_decimate.hpp index 0e3a19f0e..d34034e19 100644 --- a/firmware/baseband/dsp_decimate.hpp +++ b/firmware/baseband/dsp_decimate.hpp @@ -74,15 +74,6 @@ private: const std::array& taps; }; -size_t fir_and_decimate_by_2_complex( - const complex16_t* const src_start, - const size_t src_count, - complex16_t* const dst_start, - complex16_t* const z, - const complex16_t* const taps, - const size_t taps_count -); - size_t fir_and_decimate_by_2_complex_fast( const complex16_t* const src_start, const size_t src_count,