diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/util.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/util.cc b/src/util.cc index a6d65374..2fae8561 100644 --- a/src/util.cc +++ b/src/util.cc @@ -208,10 +208,11 @@ libdcp::xyz_to_rgb (opj_image_t* xyz_frame, shared_ptr<const GammaLUT> lut_in, s float const dci_coefficient = 48.0 / 52.37; /* sRGB color matrix for XYZ -> RGB */ + float const colour_matrix[3][3] = { - { 3.240454836, -1.537138850, -0.498531547}, - {-0.969266390, 1.876010929, 0.041556082}, - { 0.055643420, -0.204025854, 1.057225162} + { 3.24096989631653, -1.5373831987381, -0.498610764741898 }, + { -0.96924364566803, 1.87596750259399, 0.0415550582110882 }, + { 0.0556300804018974, -0.203976958990097, 1.05697154998779 } }; int const max_colour = pow (2, lut_out->bit_depth()) - 1; @@ -242,7 +243,7 @@ libdcp::xyz_to_rgb (opj_image_t* xyz_frame, shared_ptr<const GammaLUT> lut_in, s s.x = lut_in->lut()[*xyz_x++]; s.y = lut_in->lut()[*xyz_y++]; s.z = lut_in->lut()[*xyz_z++]; - + /* DCI companding */ s.x /= dci_coefficient; s.y /= dci_coefficient; |
