From: Carl Hetherington Date: Fri, 6 May 2022 08:32:02 +0000 (+0200) Subject: Fix scaling ranges to be the same as they used to be. X-Git-Tag: v1.8.19~3 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=001b62c79d8f87badc5597d0335caa0f92dc42fd;p=libdcp.git Fix scaling ranges to be the same as they used to be. --- 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); } }