aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-10-25 08:03:09 -0700
committerChris Robinson <[email protected]>2022-10-25 08:03:09 -0700
commit880fa66efe70892706cc2377ba730a7de68bf34a (patch)
tree887c87e02a52adf1605127b7bf324891fb2d98ba
parent98493354628e9216291d47ac3d59b7e5c7de9cf7 (diff)
Fix some value ordering
-rw-r--r--core/uhjfilter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/uhjfilter.cpp b/core/uhjfilter.cpp
index 82e23da4..3cbbc798 100644
--- a/core/uhjfilter.cpp
+++ b/core/uhjfilter.cpp
@@ -147,9 +147,9 @@ void UhjEncoder<N>::encode(float *LeftOut, float *RightOut,
{ return -0.3420201f*w + 0.5098604f*x; });
PShift.process({mD.data(), SamplesToDo}, mWX.data());
- /* D = 0.6554516*Y + j(-0.3420201*W + 0.5098604*X) */
+ /* D = j(-0.3420201*W + 0.5098604*X) + 0.6554516*Y */
for(size_t i{0};i < SamplesToDo;++i)
- mD[i] = 0.6554516f*mY[i] + mD[i];
+ mD[i] = mD[i] + 0.6554516f*mY[i];
/* Copy the future samples to the front for next time. */
std::copy(mW.cbegin()+SamplesToDo, mW.cbegin()+SamplesToDo+sFilterDelay, mW.begin());