diff options
author | Chris Robinson <[email protected]> | 2020-04-02 02:13:18 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-04-02 02:13:18 -0700 |
commit | ee89ca1bdd813e830164bca847d2d01ad3402174 (patch) | |
tree | 0f1c06799e72fb2850ad05e45be84e8606e34ec9 | |
parent | 57109902cd702880537eb507601c44aaf9210cfd (diff) |
Fix bsinc filter alignment and offsets
-rw-r--r-- | common/bsinc_tables.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/bsinc_tables.cpp b/common/bsinc_tables.cpp index 46919682..f697e5f0 100644 --- a/common/bsinc_tables.cpp +++ b/common/bsinc_tables.cpp @@ -316,8 +316,8 @@ constexpr auto GenerateBSincCoeffs(const BSincHeader hdr) } /* FIXME: These can't be constexpr due to reaching the step limit. */ -const auto bsinc12_table = GenerateBSincCoeffs<bsinc12_hdr.total_size>(bsinc12_hdr); -const auto bsinc24_table = GenerateBSincCoeffs<bsinc24_hdr.total_size>(bsinc24_hdr); +alignas(16) const auto bsinc12_table = GenerateBSincCoeffs<bsinc12_hdr.total_size>(bsinc12_hdr); +alignas(16) const auto bsinc24_table = GenerateBSincCoeffs<bsinc24_hdr.total_size>(bsinc24_hdr); constexpr BSincTable GenerateBSincTable(const BSincHeader hdr, const float *tab) @@ -329,7 +329,7 @@ constexpr BSincTable GenerateBSincTable(const BSincHeader hdr, const float *tab) ret.m[i] = static_cast<unsigned int>(((hdr.a[i]*2) + 3) & ~3); ret.filterOffset[0] = 0; for(int i{1};i < BSincScaleCount;++i) - ret.filterOffset[i] = ret.filterOffset[i-1] + ret.m[i-1]; + ret.filterOffset[i] = ret.filterOffset[i-1] + ret.m[i-1]*4*BSincPhaseCount; ret.Tab = tab; return ret; } |