projects
/
libdcp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
80aff70
)
Remove linearisation from low-valued pixels in XYZ to sRGB LUT.
author
Carl Hetherington
<cth@carlh.net>
Sun, 24 Mar 2013 21:19:07 +0000
(21:19 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Sun, 24 Mar 2013 21:19:07 +0000
(21:19 +0000)
src/xyz_srgb_lut.cc
patch
|
blob
|
history
diff --git
a/src/xyz_srgb_lut.cc
b/src/xyz_srgb_lut.cc
index 3d207195d3e7cf916e02d528d3c2290b7f22f0ca..eb443a59d8489f005c35a2b378fa2ad05c6e7558 100644
(file)
--- 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);
}