diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-03-24 21:19:07 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-03-24 21:19:07 +0000 |
| commit | 7508e009c6b9232379789d8f9bf9342430801734 (patch) | |
| tree | a1b7c1363781f240cd47c0a6a4a5b6a49fe2f9d3 /src | |
| parent | 80aff70f10576946c71690f3f71bdba0beeb5b07 (diff) | |
Remove linearisation from low-valued pixels in XYZ to sRGB LUT.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xyz_srgb_lut.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/xyz_srgb_lut.cc b/src/xyz_srgb_lut.cc index 3d207195..eb443a59 100644 --- a/src/xyz_srgb_lut.cc +++ b/src/xyz_srgb_lut.cc @@ -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); } |
