summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-03-06 16:15:41 +0000
committerCarl Hetherington <cth@carlh.net>2015-03-06 16:15:41 +0000
commit728728adb7761bd9c6f806d00963d9579fab230e (patch)
tree2bde731581b7b71cad9abc7ca305b713098ee714 /src
parente61ffa2f37f9f674a79f80fe00bd9f8920bba4ea (diff)
parente94c6239d1a88c5a6d2b6eef7fb0f5fc28cb8777 (diff)
Merge branch '1.0' of git.carlh.net:git/libdcp into 1.0
Diffstat (limited to 'src')
-rw-r--r--src/colour_conversion.cc6
-rw-r--r--src/colour_matrix.cc8
-rw-r--r--src/colour_matrix.h3
3 files changed, 5 insertions, 12 deletions
diff --git a/src/colour_conversion.cc b/src/colour_conversion.cc
index 5a2b1fd5..39799927 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;
@@ -51,8 +51,8 @@ ColourConversion const &
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::srgb_to_xyz,
+ shared_ptr<const TransferFunction> (new ModifiedGammaTransferFunction (false, 1 / 0.45, 0.081, 0.099, 4.5)),
+ 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];
}