MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / to_6

Function to_6

external/basisu/transcoder/basisu_transcoder.cpp:14901–14901  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14899
14900 static inline uint8_t to_5(uint32_t v) { v = v * 31 + 128; return (uint8_t)((v + (v >> 8)) >> 8); }
14901 static inline uint8_t to_6(uint32_t v) { v = v * 63 + 128; return (uint8_t)((v + (v >> 8)) >> 8); }
14902
14903 // Good references: squish library, stb_dxt.
14904 void encode_bc1(void* pDst, const uint8_t* pPixels, uint32_t flags)

Callers 2

encode_bc1Function · 0.85
encode_bc1_altFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected