diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-11-23 23:11:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-23 23:11:54 +0100 |
commit | 73dc0fd73e67a0a937267e0a9e4871bf90fb5228 (patch) | |
tree | 1e8533a1035cf78ce3cb992a9ca70e769f4df5bb /thirdparty/cvtt/ConvectionKernels_BC67.cpp | |
parent | ea2a8bfe41d00a83650ca8048ccea616bfa5518e (diff) | |
parent | f30219627d44bf963120247c059c4ccef8e9fc56 (diff) |
Merge pull request #69061 from DeeJayLSP/update_cvtt
Update cvtt to GIT 2022
Diffstat (limited to 'thirdparty/cvtt/ConvectionKernels_BC67.cpp')
-rw-r--r-- | thirdparty/cvtt/ConvectionKernels_BC67.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/thirdparty/cvtt/ConvectionKernels_BC67.cpp b/thirdparty/cvtt/ConvectionKernels_BC67.cpp index 791859b232..021d658c08 100644 --- a/thirdparty/cvtt/ConvectionKernels_BC67.cpp +++ b/thirdparty/cvtt/ConvectionKernels_BC67.cpp @@ -726,10 +726,10 @@ namespace cvtt if (carry) { uint32_t bitMask = (1 << carry) - 1; - for (int i = 0; i < 4; i++) + for (int i = 0; i < entriesRemaining; i++) { m_vector[i] >>= carry; - if (i != 3) + if (i != entriesRemaining - 1) m_vector[i] |= (m_vector[i + 1] & bitMask) << (32 - carry); } } @@ -3058,14 +3058,11 @@ void cvtt::Internal::BC6HComputer::SignExtendSingle(int &v, int bits) void cvtt::Internal::BC6HComputer::UnpackOne(PixelBlockF16 &output, const uint8_t *pBC, bool isSigned) { - UnpackingVector pv; - pv.Init(pBC); - int numModeBits = 2; - int modeBits = pv.Unpack(2); + int modeBits = pBC[0] & 0x3; if (modeBits != 0 && modeBits != 1) { - modeBits |= pv.Unpack(3) << 2; + modeBits = pBC[0] & 0x1f; numModeBits += 3; } @@ -3102,6 +3099,9 @@ void cvtt::Internal::BC6HComputer::UnpackOne(PixelBlockF16 &output, const uint8_ for (int ch = 0; ch < 3; ch++) eps[subset][epi][ch] = 0; + UnpackingVector pv; + pv.Init(pBC); + { uint32_t header[3]; uint16_t codedEPs[2][2][3]; |