MCPcopy Create free account
hub / github.com/DentonW/DevIL / iConvFloat16ToFloat32

Function iConvFloat16ToFloat32

DevIL/src-IL/src/il_dds.cpp:1581–1591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1579
1580
1581ILboolean iConvFloat16ToFloat32(ILuint* dest, ILushort* src, ILuint size)
1582{
1583 ILuint i;
1584 for (i = 0; i < size; ++i, ++dest, ++src) {
1585 //float: 1 sign bit, 8 exponent bits, 23 mantissa bits
1586 //half: 1 sign bit, 5 exponent bits, 10 mantissa bits
1587 *dest = halfToFloat(*src);
1588 }
1589
1590 return IL_TRUE;
1591}
1592
1593
1594// Same as iConvFloat16ToFloat32, but we have to set the blue channel to 1.0f.

Callers 2

iLoadVtfInternalFunction · 0.85
DecompressFloatFunction · 0.85

Calls 1

halfToFloatFunction · 0.85

Tested by

no test coverage detected