Remove linearisation from low-valued pixels in XYZ to sRGB LUT.
authorCarl Hetherington <cth@carlh.net>
Sun, 24 Mar 2013 21:19:07 +0000 (21:19 +0000)
committerCarl Hetherington <cth@carlh.net>
Sun, 24 Mar 2013 21:19:07 +0000 (21:19 +0000)
src/xyz_srgb_lut.cc

index 3d207195d3e7cf916e02d528d3c2290b7f22f0ca..eb443a59d8489f005c35a2b378fa2ad05c6e7558 100644 (file)
@@ -13,11 +13,15 @@ XYZsRGBLUT::XYZsRGBLUT(int bits, float gamma)
 
        for (int i = 0; i < bit_length; ++i) {
                float v = float(i) / (bit_length - 1);
+#if 0          
                if (v < (0.04045 / 12.92)) {
                        v *= 12.92;
                } else {
+#endif                 
                        v = (1.055 * pow (v, (1 / gamma))) - 0.055;
+#if 0                  
                }
+#endif         
 
                _lut[i] = int(v * 255);
        }