Skip to content

Commit 0bc3e14

Browse files
committed
Align with KDFS 1.3.2 rounding update
1 parent d66e8a1 commit 0bc3e14

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

Source/astcenc_color_unquantize.cpp

+2-9
Original file line numberDiff line numberDiff line change
@@ -925,15 +925,8 @@ void unpack_color_endpoints(
925925
alpha_hdr = false;
926926
}
927927

928-
vmask4 mask(true, true, true, false);
929-
930-
vint4 output0rgb = lsl<8>(output0) | vint4(0x80);
931-
vint4 output0a = output0 * 257;
932-
output0 = select(output0a, output0rgb, mask);
933-
934-
vint4 output1rgb = lsl<8>(output1) | vint4(0x80);
935-
vint4 output1a = output1 * 257;
936-
output1 = select(output1a, output1rgb, mask);
928+
output0 = lsl<8>(output0) | vint4(0x80);
929+
output1 = lsl<8>(output1) | vint4(0x80);
937930
}
938931
// An HDR profile decode, but may be using linear LDR endpoints
939932
// Linear LDR 8-bit endpoints are expanded to 16-bit by replication

Source/astcenc_internal.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1592,7 +1592,7 @@ static inline vmask4 get_u8_component_mask(
15921592
// SRGB writing to a unorm8 RGB value
15931593
else if (decode_mode == ASTCENC_PRF_LDR_SRGB)
15941594
{
1595-
u8_mask = vmask4(true, true, true, false);
1595+
u8_mask = vmask4(true);
15961596
}
15971597

15981598
return u8_mask;

0 commit comments

Comments
 (0)