summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-05-06 10:32:02 +0200
committerCarl Hetherington <cth@carlh.net>2022-05-06 23:47:55 +0200
commit001b62c79d8f87badc5597d0335caa0f92dc42fd (patch)
treea23def445fc6fbfe71b3784f48c91fcdf5c4c3e2 /src
parent1914e94c67a1412b494d02fd5573fa0fdc34cedf (diff)
Fix scaling ranges to be the same as they used to be.
Diffstat (limited to 'src')
-rw-r--r--src/rgb_xyz.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rgb_xyz.cc b/src/rgb_xyz.cc
index bbd06a97..5c01f1c5 100644
--- a/src/rgb_xyz.cc
+++ b/src/rgb_xyz.cc
@@ -321,9 +321,9 @@ dcp::rgb_to_xyz (
d.z = min (1.0, d.z);
/* Out gamma LUT */
- *xyz_x++ = lrint((d.x < piece ? lut_out_low[lrint((d.x / piece) * 65536)] : lut_out_high[lrint(((d.x - piece) / (1 - piece)) * 4096)]) * 4095);
- *xyz_y++ = lrint((d.y < piece ? lut_out_low[lrint((d.y / piece) * 65536)] : lut_out_high[lrint(((d.y - piece) / (1 - piece)) * 4096)]) * 4095);
- *xyz_z++ = lrint((d.z < piece ? lut_out_low[lrint((d.z / piece) * 65536)] : lut_out_high[lrint(((d.z - piece) / (1 - piece)) * 4096)]) * 4095);
+ *xyz_x++ = lrint((d.x < piece ? lut_out_low[lrint((d.x / piece) * 65535)] : lut_out_high[lrint(((d.x - piece) / (1 - piece)) * 4095)]) * 4095);
+ *xyz_y++ = lrint((d.y < piece ? lut_out_low[lrint((d.y / piece) * 65535)] : lut_out_high[lrint(((d.y - piece) / (1 - piece)) * 4095)]) * 4095);
+ *xyz_z++ = lrint((d.z < piece ? lut_out_low[lrint((d.z / piece) * 65535)] : lut_out_high[lrint(((d.z - piece) / (1 - piece)) * 4095)]) * 4095);
}
}