Use 2.222222 for the power in the modified Rec. 709 input gamma
authorCarl Hetherington <cth@carlh.net>
Tue, 17 Feb 2015 20:03:30 +0000 (20:03 +0000)
committerCarl Hetherington <cth@carlh.net>
Tue, 17 Feb 2015 20:03:30 +0000 (20:03 +0000)
correction, as per fnordware DCIconverter.

src/colour_conversion.cc
test/colour_conversion_test.cc

index 1795591514887ae659444e8bc74cf49764c5fb16..397999272b66baf107fc5cff6a0b9f322b916ab4 100644 (file)
@@ -51,7 +51,7 @@ 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)),
+               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))
                );
index 7193a5efb46db5e4b13a66260d15a90d56f4f0a2..9111b91845aa7baceaafe2c6b12db6f5e276d574 100644 (file)
@@ -71,9 +71,9 @@ BOOST_AUTO_TEST_CASE (colour_conversion_test2)
 {
        ColourConversion cc = ColourConversion::rec709_to_xyz ();
 
-       check_modified_gamma (cc.in(), 8, 2.4, 0.081, 0.099, 4.5);
-       check_modified_gamma (cc.in(), 12, 2.4, 0.081, 0.099, 4.5);
-       check_modified_gamma (cc.in(), 16, 2.4, 0.081, 0.099, 4.5);
+       check_modified_gamma (cc.in(), 8, 1 / 0.45, 0.081, 0.099, 4.5);
+       check_modified_gamma (cc.in(), 12, 1 / 0.45, 0.081, 0.099, 4.5);
+       check_modified_gamma (cc.in(), 16, 1 / 0.45, 0.081, 0.099, 4.5);
 
        check_gamma (cc.out(), 8, 1 / 2.6);
        check_gamma (cc.out(), 12, 1 / 2.6);