diff options
author | Chris Robinson <[email protected]> | 2020-05-11 17:42:08 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-05-11 23:49:39 -0700 |
commit | 3ce8a9914cddd6c050b2be65cd7f36b31010a4cd (patch) | |
tree | 0033ed12844cbcb68ea8dd555e5b9ede7f717c8a /alc/uhjfilter.cpp | |
parent | 2574b98f8ad0efc0c96c81325e55d686c7e33e5b (diff) |
Fix applying the UHJ phase-shift filter
Diffstat (limited to 'alc/uhjfilter.cpp')
-rw-r--r-- | alc/uhjfilter.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/alc/uhjfilter.cpp b/alc/uhjfilter.cpp index c9e35914..2554aead 100644 --- a/alc/uhjfilter.cpp +++ b/alc/uhjfilter.cpp @@ -70,7 +70,7 @@ std::array<float,Uhj2Encoder::sFilterSize> GenerateFilter() } return ret; } -const auto PShiftCoeffs = GenerateFilter(); +alignas(16) const auto PShiftCoeffs = GenerateFilter(); void allpass_process(al::span<float> dst, const float *RESTRICT src) @@ -78,9 +78,8 @@ void allpass_process(al::span<float> dst, const float *RESTRICT src) for(float &output : dst) { #ifdef HAVE_SSE_INTRINSICS - constexpr size_t todo{PShiftCoeffs.size()>>2}; __m128 r4{_mm_setzero_ps()}; - for(size_t i{0};i < todo;i+=4) + for(size_t i{0};i < PShiftCoeffs.size();i+=4) { const __m128 coeffs{_mm_load_ps(&PShiftCoeffs[i])}; /* NOTE: This could alternatively be done with two unaligned loads |