uint8_t* argb_line = argb;
for (int x = 0; x < xyz_frame->size().width; ++x) {
- assert (*xyz_x >= 0 && *xyz_y >= 0 && *xyz_z >= 0 && *xyz_x < 4096 && *xyz_x < 4096 && *xyz_z < 4096);
+ assert (*xyz_x >= 0 && *xyz_y >= 0 && *xyz_z >= 0 && *xyz_x < 4096 && *xyz_y < 4096 && *xyz_z < 4096);
/* In gamma LUT */
s.x = lut_in->lut()[*xyz_x++];
}
shared_ptr<libdcp::XYZFrame>
-libdcp::rgb_to_xyz (shared_ptr<const Image> rgb, shared_ptr<const LUT> lut_in, shared_ptr<const LUT> lut_out, float const colour_matrix[3][3])
+libdcp::rgb_to_xyz (shared_ptr<const Image> rgb, shared_ptr<const LUT> lut_in, shared_ptr<const LUT> lut_out, double const colour_matrix[3][3])
{
assert (lut_in->bit_depth() == 12);
assert (lut_out->bit_depth() == 16);
d.x = d.x * DCI_COEFFICIENT * 65535;
d.y = d.y * DCI_COEFFICIENT * 65535;
d.z = d.z * DCI_COEFFICIENT * 65535;
+
+ assert (d.x >= 0 && d.x < 65536);
+ assert (d.y >= 0 && d.y < 65536);
+ assert (d.z >= 0 && d.z < 65536);
/* Out gamma LUT */
xyz->data(0)[jn] = lut_out->lut()[(int) d.x] * 4096;