@@ -534,7 +534,7 @@ void UhjDecoderIIR::decode(const std::span<std::span<float>> samples, const bool
534534 *
535535 * W = 0.6098637*S + 0.6896511*j*w*D
536536 * X = 0.8624776*S - 0.7626955*j*w*D
537- * Y = 1.6822415*w*D + 0.2156194*j*S
537+ * Y = 1.6822415*w*D - 0.2156194*j*S
538538 *
539539 * where j is a +90 degree phase shift. w is a variable control for the
540540 * resulting stereo width, with the range 0 <= w <= 0.7.
@@ -612,9 +612,9 @@ void UhjStereoDecoder<N>::decode(const std::span<std::span<float>> samples, cons
612612 mSHistory .begin ());
613613 PShifter<N>.process (youtput, mTemp );
614614
615- /* Y = 1.6822415*w*D + 0.2156194*j*S */
615+ /* Y = 1.6822415*w*D - 0.2156194*j*S */
616616 std::ranges::transform (mD , youtput, youtput.begin (), [](const float d, const float js) noexcept
617- { return 1 .6822415f *d + 0 .2156194f *js; });
617+ { return 1 .6822415f *d - 0 .2156194f *js; });
618618}
619619
620620void UhjStereoDecoderIIR::decode (const std::span<std::span<float >> samples, const bool updateState)
@@ -687,9 +687,9 @@ void UhjStereoDecoderIIR::decode(const std::span<std::span<float>> samples, cons
687687 /* Apply filter1 to D and store in mTemp. */
688688 process (mFilter1D , Filter1Coeff, std::span{mD }.first (samplesToDo), updateState, mTemp );
689689
690- /* Y = 1.6822415*w*D + 0.2156194*j*S */
690+ /* Y = 1.6822415*w*D - 0.2156194*j*S */
691691 std::ranges::transform (mTemp , youtput, youtput.begin (), [](float d, float js) noexcept
692- { return 1 .6822415f *d + 0 .2156194f *js; });
692+ { return 1 .6822415f *d - 0 .2156194f *js; });
693693
694694 mFirstRun = false ;
695695}
0 commit comments