Same as iConvFloat16ToFloat32, but we have to set the green and blue channels to 1.0f. The destination format is RGB, and the source is R16.
| 1611 | // Same as iConvFloat16ToFloat32, but we have to set the green and blue channels |
| 1612 | // to 1.0f. The destination format is RGB, and the source is R16. |
| 1613 | ILboolean iConvR16ToFloat32(ILuint* dest, ILushort* src, ILuint size) |
| 1614 | { |
| 1615 | ILuint i; |
| 1616 | for (i = 0; i < size; i += 3) { |
| 1617 | //float: 1 sign bit, 8 exponent bits, 23 mantissa bits |
| 1618 | //half: 1 sign bit, 5 exponent bits, 10 mantissa bits |
| 1619 | *dest++ = halfToFloat(*src++); |
| 1620 | *((ILfloat*)dest++) = 1.0f; |
| 1621 | *((ILfloat*)dest++) = 1.0f; |
| 1622 | } |
| 1623 | |
| 1624 | return IL_TRUE; |
| 1625 | } |
| 1626 | |
| 1627 | |
| 1628 | ILboolean DecompressFloat(ILuint lCompFormat) |
no test coverage detected