diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-02-17 19:57:28 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-02-17 19:57:28 +0000 |
| commit | 4f68d50abb5a83628482fd166e40f3b4b281166b (patch) | |
| tree | 73d4bcd078bfa28342b9ccfb638a431257255bf6 | |
| parent | 1e7e40ffb6e3632b65adb8372dc073106e3d4023 (diff) | |
Rec 709 -> XYZ and sRGB -> XYZ matrices are, it seems, the same;
I'm getting this from fnordware DCIconverter.
https://github.com/fnordware/DCIconverter/blob/master/src/DCIconverter.cpp
| -rw-r--r-- | src/colour_conversion.cc | 4 | ||||
| -rw-r--r-- | src/colour_matrix.cc | 8 | ||||
| -rw-r--r-- | src/colour_matrix.h | 3 |
3 files changed, 4 insertions, 11 deletions
diff --git a/src/colour_conversion.cc b/src/colour_conversion.cc index 8a64c89b..17955915 100644 --- a/src/colour_conversion.cc +++ b/src/colour_conversion.cc @@ -30,7 +30,7 @@ ColourConversion::srgb_to_xyz () { static ColourConversion* c = new ColourConversion ( shared_ptr<const TransferFunction> (new ModifiedGammaTransferFunction (false, 2.4, 0.04045, 0.055, 12.92)), - dcp::colour_matrix::srgb_to_xyz, + dcp::colour_matrix::rgb_to_xyz, shared_ptr<const TransferFunction> (new GammaTransferFunction (true, 2.6)) ); return *c; @@ -52,7 +52,7 @@ ColourConversion::rec709_to_xyz () { static ColourConversion* c = new ColourConversion ( shared_ptr<const TransferFunction> (new ModifiedGammaTransferFunction (false, 2.4, 0.081, 0.099, 4.5)), - dcp::colour_matrix::rec709_to_xyz, + dcp::colour_matrix::rgb_to_xyz, shared_ptr<const TransferFunction> (new GammaTransferFunction (true, 2.6)) ); return *c; diff --git a/src/colour_matrix.cc b/src/colour_matrix.cc index 1a997326..32683e8e 100644 --- a/src/colour_matrix.cc +++ b/src/colour_matrix.cc @@ -29,14 +29,8 @@ double const dcp::colour_matrix::xyz_to_rgb[3][3] = { { 0.0556300804018974, -0.203976958990097, 1.05697154998779 } }; -double const dcp::colour_matrix::srgb_to_xyz[3][3] = { +double const dcp::colour_matrix::rgb_to_xyz[3][3] = { {0.4124564, 0.3575761, 0.1804375}, {0.2126729, 0.7151522, 0.0721750}, {0.0193339, 0.1191920, 0.9503041} }; - -double const dcp::colour_matrix::rec709_to_xyz[3][3] = { - { 0.412390799265959, 0.357584339383878, 0.180480788401834 }, - { 0.21263900587151, 0.715168678767756, 0.0721923153607337 }, - { 0.0193308187155918, 0.119194779794626, 0.950532152249661 } -}; diff --git a/src/colour_matrix.h b/src/colour_matrix.h index ce15051c..fd89ed3a 100644 --- a/src/colour_matrix.h +++ b/src/colour_matrix.h @@ -22,8 +22,7 @@ namespace dcp { namespace colour_matrix { extern double const xyz_to_rgb[3][3]; -extern double const srgb_to_xyz[3][3]; -extern double const rec709_to_xyz[3][3]; +extern double const rgb_to_xyz[3][3]; } |
