From e1d62e2e77186e5603b4d58d7fa6354cd493a64b Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 23 Feb 2021 21:07:34 -0800 Subject: Avoid an unnecessary loop iteration --- core/bsinc_tables.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'core/bsinc_tables.cpp') diff --git a/core/bsinc_tables.cpp b/core/bsinc_tables.cpp index 334822f5..919bc60b 100644 --- a/core/bsinc_tables.cpp +++ b/core/bsinc_tables.cpp @@ -161,9 +161,10 @@ struct BSincFilterArray { auto filter = std::make_unique(BSincScaleCount); /* Calculate the Kaiser-windowed Sinc filter coefficients for each - * scale and phase index. + * scale and phase index. The output of scale index 0 is all 0s, so + * start at 1. */ - for(uint si{0};si < BSincScaleCount;++si) + for(uint si{1};si < BSincScaleCount;++si) { const uint m{hdr.a[si] * 2}; const size_t o{(BSincPointsMax-m) / 2}; -- cgit v1.2.3