[OPENGL32/MESA]
authorAmine Khaldi <amine.khaldi@reactos.org>
Sun, 7 Sep 2014 11:52:18 +0000 (11:52 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sun, 7 Sep 2014 11:52:18 +0000 (11:52 +0000)
* Zap unused nonlinear_to_linear().
CORE-7499

svn path=/trunk/; revision=64057

reactos/dll/opengl/mesa/main/format_unpack.c

index bca514d..73e40c1 100644 (file)
 
 #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                                  */
 /**********************************************************************/