Change bad values XYZ ACES and small changes to primaries ACES

This commit is contained in:
Desmis
2018-04-12 10:24:49 +02:00
parent 92f6aa056d
commit f696be0263
2 changed files with 22 additions and 99 deletions

View File

@@ -78,95 +78,19 @@ constexpr double xyz_sRGB[3][3] = {
{0.2225045, 0.7168786, 0.0606169},
{0.0139322, 0.0971045, 0.7141733}
};
/*
//from Elle Stone
constexpr double xyz_ACESc[3][3] = {
{0.68988, 0.14977, 0.12456},
{0.28452, 0.67169, 0.04379},
{-0.00604, 0.01001, 0.82094}
{0.9525523959, 0.0, 0.0000936786},
{0.3439664498, 0.7281660966 , -0.0721325464},
{0.0, -0.0, 1.0088251844}
};
constexpr double ACESc_xyz[3][3] = {
{1.592666, -0.351803, -0.222887},
{-0.675936, 1.639273, 0.015117},
{0.0199598, -0.022576, 1.2162916}
{1.0498110175, 0.0, -0.0000974845},
{-0.4959030231, 1.3733130458 , 0.0982400361},
{0.0, 0.0, 0.9912520182}
};
//Matrix ACESc from LCMS calculation same as ACES.icm , used after with Bradford transformation D60
constexpr double xyz_ACESc[3][3] = {
{0.99089, 0.01224, -0.03893},
{0.36189, 0.72252, -0.08441},
{-0.00272, 0.00826, 0.81937}
};
*/
/*
//matrix from Alberto
//wrong result
constexpr double ACESc_xyz[3][3] = {
{0.99089050, 0.36189270, -0.00271606},
{0.01223755, 0.72251892, 0.00825500},
{-0.03892517, -0.08441162, 0.81936646}
};
constexpr double xyz_ACESc[3][3] = {
{1.015496031, -0.50764724, 0.008480669},
{-0.01723464, 1.391035243 , -0.01407161},
{0.003048736, 0.140893628, 1.219045754}
};
*/
/*
//matrix fromAlberto symetric above quasi the same as the one I take, only precision!
//wrong result
constexpr double ACESc_xyz[3][3] = {
{0.99089050, 0.01223755, -0.03892517},
{0.36189270, 0.72251892, -0.08441162},
{-0.00271606, 0.0082550, 0.81936646}
};
constexpr double xyz_ACESc[3][3] = {
{1.015496031, -0.01723464, 0.003048736},
{-0.50764724, 1.391035243 , 0.140893628},
{0.008480669, -0.01407161, 1.219045754}
};
*/
/*
constexpr double xyz_ACESc[3][3] = {
{0.9699974, 0.432792, -0.04566},
{0.237431, 0.52681, -0.05590},
{0.127169, 0.043493, 0.793903}
};
*/
/*
//with Bradford adaptation D50 D60 J.Desmis 04 2018
// ACESc_xyz = matrix ACESc * matrix d60 D50 from Matrix ACESc from LCMS calculation same as ACES.icm
constexpr double ACESc_xyz[3][3] = {
{0.956674714, 0.334059262, 0.033764461},
{-0.00914767, 0.719456271 , 0.020585086},
{-0.03959528, -0.11114562, 1.008891993}
};
constexpr double xyz_ACESc[3][3] = {
{1.039605861, -0.48655298, -0.0248649},
{0.012013027, 1.379948826 , -0.02855804},
{0.04212411, 0.132928069, 0.987064397}
};
//end modification ACES matrix
*/
constexpr double ACESc_xyz[3][3] = {
{0.9525523959, 0.3439664498, 0.0},
{0.000000, 0.7281660966 , 0.0},
{0.0000936786, -0.0721325464, 1.0088251844}
};
constexpr double xyz_ACESc[3][3] = {
{1.0498110175, -0.4959030231, 0.0},
{0.0, 1.3733130458 , 0.0},
{-0.0000974845, 0.0982400361, 0.9912520182}
};
//end modification ACES matrix
constexpr double sRGB_xyz[3][3] = {
{3.1338561, -1.6168667, -0.4906146},
{ -0.9787684, 1.9161415, 0.0334540},

View File

@@ -196,9 +196,9 @@ cmsHPROFILE createXYZProfile()
return rtengine::ICCStore::createFromMatrix(mat, false, "XYZ");
}
const double(*wprofiles[])[3] = {xyz_sRGB, xyz_adobe, xyz_prophoto, xyz_widegamut, xyz_bruce, xyz_beta, xyz_best, xyz_rec2020, xyz_ACESc};
const double(*iwprofiles[])[3] = {sRGB_xyz, adobe_xyz, prophoto_xyz, widegamut_xyz, bruce_xyz, beta_xyz, best_xyz, rec2020_xyz, ACESc_xyz};
const char* wpnames[] = {"sRGB", "Adobe RGB", "ProPhoto", "WideGamut", "BruceRGB", "Beta RGB", "BestRGB", "Rec2020", "ACESc"};
const double(*wprofiles[])[3] = {xyz_sRGB, xyz_adobe, xyz_prophoto, xyz_widegamut, xyz_bruce, xyz_beta, xyz_best, xyz_rec2020, xyz_ACESc};//
const double(*iwprofiles[])[3] = {sRGB_xyz, adobe_xyz, prophoto_xyz, widegamut_xyz, bruce_xyz, beta_xyz, best_xyz, rec2020_xyz, ACESc_xyz};//
const char* wpnames[] = {"sRGB", "Adobe RGB", "ProPhoto", "WideGamut", "BruceRGB", "Beta RGB", "BestRGB", "Rec2020", "ACESc"};//
const char* wpgamma[] = {"Free", "BT709_g2.2_s4.5", "sRGB_g2.4_s12.92", "linear_g1.0", "standard_g2.2", "standard_g1.8", "High_g1.3_s3.35", "Low_g2.6_s6.9", "Lab_g3.0s9.03296"}; //gamma free
//default = gamma inside profile
//BT709 g=2.22 s=4.5 sRGB g=2.4 s=12.92
@@ -1378,12 +1378,12 @@ cmsHPROFILE rtengine::ICCStore::createGammaProfile(const procparams::ColorManage
p[5] = 0.0460;
temp = ColorTemp::D65;
} else if (icm.wprimari == "ACESc") {
p[0] = 0.734704; // ACESc primaries
p[1] = 0.265298;
p[2] = -0.000004;
p[3] = 0.999993;
p[4] = 0.00009989;
p[5] = -0.077007;
p[0] = 0.7347; // ACESc primaries
p[1] = 0.2653;
p[2] = 0.0000;
p[3] = 1.0;
p[4] = 0.0001;
p[5] = -0.0770;
temp = ColorTemp::D60;
} else {
p[0] = 0.7347; //ProPhoto and default primaries
@@ -1671,13 +1671,12 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams:
p[5] = 0.0460;
temp = ColorTemp::D65;
} else if (icm.wprimari == "ACESc") {
p[0] = 0.734704; // ACESc primaries
p[1] = 0.265298;
p[2] = -0.000004;
p[3] = 0.999993;
p[4] = 0.00009989;
p[5] = -0.077007;
temp = ColorTemp::D60;
p[0] = 0.7347; // ACESc primaries
p[1] = 0.2653;
p[2] = 0.0000;
p[3] = 1.0;
p[4] = 0.0001;
p[5] = -0.0770;
} else {
p[0] = 0.7347; //ProPhoto and default primaries
p[1] = 0.2653;