You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.
Hi,
I've been comparing the output of astc-codec vs. another ASTC decoder from Google. I found a decoding issue with void extent blocks, where the output differs from what is expected by the ASTC spec in LDR mode when sRGB enabled. Here's the relevant code:
Hi,
I've been comparing the output of astc-codec vs. another ASTC decoder from Google. I found a decoding issue with void extent blocks, where the output differs from what is expected by the ASTC spec in LDR mode when sRGB enabled. Here's the relevant code:
static std::vector DecodeEndpoints(const VoidExtentData& block) {
EndpointPair eps;
// Original code:
//eps.first[0] = eps.second[0] = (block.r * 255) / 65535;
//eps.first[1] = eps.second[1] = (block.g * 255) / 65535;
//eps.first[2] = eps.second[2] = (block.b * 255) / 65535;
//eps.first[3] = eps.second[3] = (block.a * 255) / 65535;
// Corrected code that generates the expected result with void extent blocks:
eps.first[0] = eps.second[0] = (block.r >> 8);
eps.first[1] = eps.second[1] = (block.g >> 8);
eps.first[2] = eps.second[2] = (block.b >> 8);
eps.first[3] = eps.second[3] = (block.a >> 8);
The text was updated successfully, but these errors were encountered: