Same as iConvFloat16ToFloat32, but we have to set the blue channel to 1.0f. The destination format is RGB, and the source is R16G16 (little endian).
| 1594 | // Same as iConvFloat16ToFloat32, but we have to set the blue channel to 1.0f. |
| 1595 | // The destination format is RGB, and the source is R16G16 (little endian). |
| 1596 | ILboolean iConvG16R16ToFloat32(ILuint* dest, ILushort* src, ILuint size) |
| 1597 | { |
| 1598 | ILuint i; |
| 1599 | for (i = 0; i < size; i += 3) { |
| 1600 | //float: 1 sign bit, 8 exponent bits, 23 mantissa bits |
| 1601 | //half: 1 sign bit, 5 exponent bits, 10 mantissa bits |
| 1602 | *dest++ = halfToFloat(*src++); |
| 1603 | *dest++ = halfToFloat(*src++); |
| 1604 | *((ILfloat*)dest++) = 1.0f; |
| 1605 | } |
| 1606 | |
| 1607 | return IL_TRUE; |
| 1608 | } |
| 1609 | |
| 1610 | |
| 1611 | // Same as iConvFloat16ToFloat32, but we have to set the green and blue channels |
no test coverage detected