diff options
author | Chris Robinson <[email protected]> | 2022-03-02 21:19:53 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-03-02 21:19:53 -0800 |
commit | 240171a53da8ede2ec8b7e8f890a3e10c08aff4a (patch) | |
tree | ae664afb2bbb5c650b4189b7defd3bab89292e97 /utils | |
parent | 63ac9c0b5df9e864bf55f189b12e5da88d8af3c6 (diff) |
Fix the UHJ decoder parameters in uhjdecoder
Diffstat (limited to 'utils')
-rw-r--r-- | utils/uhjdecoder.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/uhjdecoder.cpp b/utils/uhjdecoder.cpp index 71003015..dc85ba56 100644 --- a/utils/uhjdecoder.cpp +++ b/utils/uhjdecoder.cpp @@ -244,19 +244,19 @@ void UhjDecoder::decode(const float *RESTRICT InSamples, const size_t InChannels mQ[sFilterDelay+i] = InSamples[i*InChannels + 3]; } - /* Precompute j(0.828347*D + 0.767835*T) and store in xoutput. */ + /* Precompute j(0.828331*D + 0.767820*T) and store in xoutput. */ auto tmpiter = std::copy(mDTHistory.cbegin(), mDTHistory.cend(), mTemp.begin()); std::transform(mD.cbegin(), mD.cbegin()+SamplesToDo+sFilterDelay, mT.cbegin(), tmpiter, - [](const float d, const float t) noexcept { return 0.828347f*d + 0.767835f*t; }); + [](const float d, const float t) noexcept { return 0.828331f*d + 0.767820f*t; }); std::copy_n(mTemp.cbegin()+SamplesToDo, mDTHistory.size(), mDTHistory.begin()); PShift.process({xoutput, SamplesToDo}, mTemp.data()); for(size_t i{0};i < SamplesToDo;++i) { - /* W = 0.981532*S + 0.197484*j(0.828347*D + 0.767835*T) */ + /* W = 0.981532*S + 0.197484*j(0.828331*D + 0.767820*T) */ woutput[i] = 0.981532f*mS[i] + 0.197484f*xoutput[i]; - /* X = 0.418504*S - j(0.828347*D + 0.767835*T) */ - xoutput[i] = 0.418504f*mS[i] - xoutput[i]; + /* X = 0.418496*S - j(0.828331*D + 0.767820*T) */ + xoutput[i] = 0.418496f*mS[i] - xoutput[i]; } /* Precompute j*S and store in youtput. */ |