Skip to content

Commit 32fb1d1

Browse files
committed
Simplify remaining code
1 parent 8b8e8eb commit 32fb1d1

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

Source/astcenc_internal.h

+4-10
Original file line numberDiff line numberDiff line change
@@ -1583,19 +1583,13 @@ static inline vmask4 get_u8_component_mask(
15831583
astcenc_profile decode_mode,
15841584
const image_block& blk
15851585
) {
1586-
vmask4 u8_mask(false);
1587-
// Decode mode writing to a unorm8 output value
1588-
if (blk.decode_unorm8)
1586+
// Decode mode or sRGB forces writing to unorm8 output value
1587+
if (blk.decode_unorm8 || decode_mode == ASTCENC_PRF_LDR_SRGB)
15891588
{
1590-
u8_mask = vmask4(true);
1591-
}
1592-
// SRGB writing to a unorm8 RGB value
1593-
else if (decode_mode == ASTCENC_PRF_LDR_SRGB)
1594-
{
1595-
u8_mask = vmask4(true);
1589+
return vmask4(true);
15961590
}
15971591

1598-
return u8_mask;
1592+
return vmask4(false);
15991593
}
16001594

16011595
/**

0 commit comments

Comments
 (0)