Add uint8_t -> float SRGB conversion function (using LUT)

This commit is contained in:
baldurk
2014-07-13 18:55:03 +01:00
parent d83adf351b
commit 85a4a8cccd
2 changed files with 53 additions and 1 deletions
+7 -1
View File
@@ -95,5 +95,11 @@ inline Vec4f ConvertFromB4G4R4A4(uint16_t data)
(float)((data >> 12) & 0xf) / 15.0f );
}
#include "half_convert.h"
extern float SRGB8_lookuptable[256];
inline float ConvertFromSRGB8(uint8_t comp)
{
return SRGB8_lookuptable[comp];
}
#include "half_convert.h"