From c7c4ac06076cca82b0c0cc0eabb8f58f6c5c99fb Mon Sep 17 00:00:00 2001 From: Fadijerji Date: Fri, 14 Jul 2023 12:14:30 -0300 Subject: [PATCH] Fixed FIR_filter.apply() indexing bug. --- source/fir_filter.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/fir_filter.cc b/source/fir_filter.cc index 2636427..a157060 100644 --- a/source/fir_filter.cc +++ b/source/fir_filter.cc @@ -98,10 +98,10 @@ void cl_FIR::apply(std::complex * in, std::complex * out, int nI } } - if(i>(int)(filter_nTaps-1)/2 && i=((int)(filter_nTaps-1)/2) && i<(nItems+(int)(filter_nTaps-1)/2)) { - out[i].real(acc_r); - out[i].imag(acc_im); + out[i-(int)(filter_nTaps-1)/2].real(acc_r); + out[i-(int)(filter_nTaps-1)/2].imag(acc_im); } } }