Fix stbr__type_size for updated stbr_type

This commit is contained in:
Jorge Rodriguez 2014-08-12 11:55:27 -07:00
parent 45fa6ec900
commit 419a5ba10f

View File

@ -105,6 +105,13 @@ typedef enum
STBR_MAX_TYPES
} stbr_type;
static unsigned char stbr__type_size[] = {
1, // STBR_TYPE_UINT8
2, // STBR_TYPE_UINT16
4, // STBR_TYPE_UINT32
4, // STBR_TYPE_FLOAT
};
typedef unsigned char stbr_uint8;
#ifdef _MSC_VER
@ -381,14 +388,6 @@ static unsigned char stbr__linear_uchar_to_srgb_uchar[256] = {
251, 251, 252, 252, 253, 253, 254, 254, 255
};
static unsigned char stbr__type_size[] = {
0,
1, // STBR_TYPE_UINT8
2, // STBR_TYPE_UINT16
4, // STBR_TYPE_UINT32
4, // STBR_TYPE_FLOAT
};
float stbr__srgb_to_linear(float f)
{
if (f <= 0.04045f)