From: Amine Khaldi Date: Sun, 7 Sep 2014 11:52:18 +0000 (+0000) Subject: [OPENGL32/MESA] X-Git-Tag: backups/0.3.17@66124~654 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=bd15aba1f85f8f5ff6add8df939b82f7298ed639 [OPENGL32/MESA] * Zap unused nonlinear_to_linear(). CORE-7499 svn path=/trunk/; revision=64057 --- diff --git a/reactos/dll/opengl/mesa/main/format_unpack.c b/reactos/dll/opengl/mesa/main/format_unpack.c index bca514d9c10..73e40c18f13 100644 --- a/reactos/dll/opengl/mesa/main/format_unpack.c +++ b/reactos/dll/opengl/mesa/main/format_unpack.c @@ -37,35 +37,6 @@ #define EXPAND_6_8(X) ( ((X) << 2) | ((X) >> 4) ) - -/** - * Convert an 8-bit sRGB value from non-linear space to a - * linear RGB value in [0, 1]. - * Implemented with a 256-entry lookup table. - */ -static inline GLfloat -nonlinear_to_linear(GLubyte cs8) -{ - static GLfloat table[256]; - static GLboolean tableReady = GL_FALSE; - if (!tableReady) { - /* compute lookup table now */ - GLuint i; - for (i = 0; i < 256; i++) { - const GLfloat cs = UBYTE_TO_FLOAT(i); - if (cs <= 0.04045) { - table[i] = cs / 12.92f; - } - else { - table[i] = (GLfloat) pow((cs + 0.055) / 1.055, 2.4); - } - } - tableReady = GL_TRUE; - } - return table[cs8]; -} - - /**********************************************************************/ /* Unpack, returning GLfloat colors */ /**********************************************************************/