add ACEScg as working profile and sole some bugs in selection primaries
This commit is contained in:
parent
ae11501fc1
commit
e6377d9c89
@ -66,6 +66,18 @@ constexpr double xyz_sRGB[3][3] = {
|
|||||||
{0.0139322, 0.0971045, 0.7141733}
|
{0.0139322, 0.0971045, 0.7141733}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
constexpr double xyz_ACEScg[3][3] = {
|
||||||
|
{0.68988, 0.14977, 0.12456},
|
||||||
|
{0.28452, 0.67169, 0.04379},
|
||||||
|
{-0.00604, 0.01001, 0.82094}
|
||||||
|
};
|
||||||
|
|
||||||
|
constexpr double ACEScg_xyz[3][3] = {
|
||||||
|
{1.59266, -0.351803, -0.22288},
|
||||||
|
{-0.67593, 1.639273, 0.015117},
|
||||||
|
{0.019959, -0.022576, 1.21629}
|
||||||
|
};
|
||||||
|
|
||||||
constexpr double sRGB_xyz[3][3] = {
|
constexpr double sRGB_xyz[3][3] = {
|
||||||
{3.1338561, -1.6168667, -0.4906146},
|
{3.1338561, -1.6168667, -0.4906146},
|
||||||
{ -0.9787684, 1.9161415, 0.0334540},
|
{ -0.9787684, 1.9161415, 0.0334540},
|
||||||
|
@ -195,9 +195,9 @@ cmsHPROFILE createXYZProfile()
|
|||||||
return rtengine::ICCStore::createFromMatrix(mat, false, "XYZ");
|
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};
|
const double(*wprofiles[])[3] = {xyz_sRGB, xyz_adobe, xyz_prophoto, xyz_widegamut, xyz_bruce, xyz_beta, xyz_best, xyz_rec2020, xyz_ACEScg};
|
||||||
const double(*iwprofiles[])[3] = {sRGB_xyz, adobe_xyz, prophoto_xyz, widegamut_xyz, bruce_xyz, beta_xyz, best_xyz, rec2020_xyz};
|
const double(*iwprofiles[])[3] = {sRGB_xyz, adobe_xyz, prophoto_xyz, widegamut_xyz, bruce_xyz, beta_xyz, best_xyz, rec2020_xyz, ACEScg_xyz};
|
||||||
const char* wpnames[] = {"sRGB", "Adobe RGB", "ProPhoto", "WideGamut", "BruceRGB", "Beta RGB", "BestRGB", "Rec2020"};
|
const char* wpnames[] = {"sRGB", "Adobe RGB", "ProPhoto", "WideGamut", "BruceRGB", "Beta RGB", "BestRGB", "Rec2020", "ACEScg"};
|
||||||
const char* wpgamma[] = {"default", "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"}; //gamma free
|
const char* wpgamma[] = {"default", "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"}; //gamma free
|
||||||
//default = gamma inside profile
|
//default = gamma inside profile
|
||||||
//BT709 g=2.22 s=4.5 sRGB g=2.4 s=12.92
|
//BT709 g=2.22 s=4.5 sRGB g=2.4 s=12.92
|
||||||
@ -1284,7 +1284,9 @@ cmsHPROFILE rtengine::ICCStore::createGammaProfile(const procparams::ColorManage
|
|||||||
|
|
||||||
enum class ColorTemp {
|
enum class ColorTemp {
|
||||||
D50 = 5003, // for Widegamut, Prophoto Best, Beta -> D50
|
D50 = 5003, // for Widegamut, Prophoto Best, Beta -> D50
|
||||||
D65 = 6504 // for sRGB, AdobeRGB, Bruce Rec2020 -> D65
|
D65 = 6504, // for sRGB, AdobeRGB, Bruce Rec2020 -> D65
|
||||||
|
D60 = 6005 //for ACEScg
|
||||||
|
|
||||||
};
|
};
|
||||||
ColorTemp temp = ColorTemp::D50;
|
ColorTemp temp = ColorTemp::D50;
|
||||||
|
|
||||||
@ -1343,6 +1345,14 @@ cmsHPROFILE rtengine::ICCStore::createGammaProfile(const procparams::ColorManage
|
|||||||
p[4] = 0.1310;
|
p[4] = 0.1310;
|
||||||
p[5] = 0.0460;
|
p[5] = 0.0460;
|
||||||
temp = ColorTemp::D65;
|
temp = ColorTemp::D65;
|
||||||
|
} else if (icm.wprimari == "ACEScg") {
|
||||||
|
p[0] = 0.734704; // ACEScg primaries
|
||||||
|
p[1] = 0.265298;
|
||||||
|
p[2] = -0.000004;
|
||||||
|
p[3] = 0.999993;
|
||||||
|
p[4] = 0.00009989;
|
||||||
|
p[5] = -0.077007;
|
||||||
|
temp = ColorTemp::D60;
|
||||||
} else {
|
} else {
|
||||||
p[0] = 0.7347; //ProPhoto and default primaries
|
p[0] = 0.7347; //ProPhoto and default primaries
|
||||||
p[1] = 0.2653;
|
p[1] = 0.2653;
|
||||||
@ -1390,6 +1400,7 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams:
|
|||||||
bool pro = false;
|
bool pro = false;
|
||||||
Glib::ustring outProfile;
|
Glib::ustring outProfile;
|
||||||
cmsHPROFILE outputProfile = nullptr;
|
cmsHPROFILE outputProfile = nullptr;
|
||||||
|
Glib::ustring outPr;
|
||||||
|
|
||||||
|
|
||||||
if (icm.freegamma && icm.gampos < 1.35) {
|
if (icm.freegamma && icm.gampos < 1.35) {
|
||||||
@ -1434,24 +1445,42 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams:
|
|||||||
|
|
||||||
if (icm.wprimari == "ProPhoto" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.prophoto) && !pro) {
|
if (icm.wprimari == "ProPhoto" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.prophoto) && !pro) {
|
||||||
outProfile = options.rtSettings.prophoto;
|
outProfile = options.rtSettings.prophoto;
|
||||||
|
outPr = "RT_large";
|
||||||
|
|
||||||
} else if (icm.wprimari == "Adobe RGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.adobe) ) {
|
} else if (icm.wprimari == "Adobe RGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.adobe) ) {
|
||||||
outProfile = options.rtSettings.adobe;
|
outProfile = options.rtSettings.adobe;
|
||||||
|
outPr = "RT_adob";
|
||||||
} else if (icm.wprimari == "WideGamut" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.widegamut) ) {
|
} else if (icm.wprimari == "WideGamut" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.widegamut) ) {
|
||||||
outProfile = options.rtSettings.widegamut;
|
outProfile = options.rtSettings.widegamut;
|
||||||
|
outPr = "RT_wide";
|
||||||
} else if (icm.wprimari == "Beta RGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.beta) ) {
|
} else if (icm.wprimari == "Beta RGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.beta) ) {
|
||||||
outProfile = options.rtSettings.beta;
|
outProfile = options.rtSettings.beta;
|
||||||
|
outPr = "RT_beta";
|
||||||
} else if (icm.wprimari == "BestRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.best) ) {
|
} else if (icm.wprimari == "BestRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.best) ) {
|
||||||
outProfile = options.rtSettings.best;
|
outProfile = options.rtSettings.best;
|
||||||
|
outPr = "RT_best";
|
||||||
} else if (icm.wprimari == "BruceRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.bruce) ) {
|
} else if (icm.wprimari == "BruceRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.bruce) ) {
|
||||||
outProfile = options.rtSettings.bruce;
|
outProfile = options.rtSettings.bruce;
|
||||||
|
outPr = "RT_bruce";
|
||||||
} else if (icm.wprimari == "sRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.srgb) && !pro) {
|
} else if (icm.wprimari == "sRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.srgb) && !pro) {
|
||||||
outProfile = options.rtSettings.srgb;
|
outProfile = options.rtSettings.srgb;
|
||||||
|
outPr = "RT_srgb";
|
||||||
} else if (icm.wprimari == "sRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.srgb10) && pro) {
|
} else if (icm.wprimari == "sRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.srgb10) && pro) {
|
||||||
outProfile = options.rtSettings.srgb10;
|
outProfile = options.rtSettings.srgb10;
|
||||||
|
outPr = "RT_srgb";
|
||||||
|
|
||||||
} else if (icm.wprimari == "ProPhoto" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.prophoto10) && pro) {
|
} else if (icm.wprimari == "ProPhoto" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.prophoto10) && pro) {
|
||||||
outProfile = options.rtSettings.prophoto10;
|
outProfile = options.rtSettings.prophoto10;
|
||||||
|
outPr = "RT_large";
|
||||||
|
|
||||||
} else if (icm.wprimari == "Rec2020" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.rec2020) ) {
|
} else if (icm.wprimari == "Rec2020" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.rec2020) ) {
|
||||||
outProfile = options.rtSettings.rec2020;
|
outProfile = options.rtSettings.rec2020;
|
||||||
|
outPr = "RT_rec2020";
|
||||||
|
|
||||||
|
} else if (icm.wprimari == "ACEScg" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.ACEScg) ) {
|
||||||
|
outProfile = options.rtSettings.ACEScg;
|
||||||
|
outPr = "RT_acescg";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Should not occurs
|
// Should not occurs
|
||||||
if (settings->verbose) {
|
if (settings->verbose) {
|
||||||
@ -1521,9 +1550,9 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams:
|
|||||||
|
|
||||||
gammaWs.precision(6);
|
gammaWs.precision(6);
|
||||||
if(icm.wprofile == "v4") {
|
if(icm.wprofile == "v4") {
|
||||||
outPro = outProfile + "_FOIP_V4_"+ std::to_string((float)icm.gampos)+" "+ std::to_string((float)icm.slpos) + ".icc";
|
outPro = outPr + "_FOIP_V4_"+ std::to_string((float)icm.gampos)+" "+ std::to_string((float)icm.slpos) + ".icc";
|
||||||
} else if(icm.wprofile == "v2") {
|
} else if(icm.wprofile == "v2") {
|
||||||
outPro = outProfile + "_FOIP_V2_"+ std::to_string((float)icm.gampos)+" "+ std::to_string((float)icm.slpos) + ".icc";
|
outPro = outPr + "_FOIP_V2_"+ std::to_string((float)icm.gampos)+" "+ std::to_string((float)icm.slpos) + ".icc";
|
||||||
}
|
}
|
||||||
|
|
||||||
gammaWs << outPro.c_str() <<(float)icm.gampos << " s=" <<(float)icm.slpos;
|
gammaWs << outPro.c_str() <<(float)icm.gampos << " s=" <<(float)icm.slpos;
|
||||||
@ -1551,7 +1580,8 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams:
|
|||||||
//change
|
//change
|
||||||
enum class ColorTemp {
|
enum class ColorTemp {
|
||||||
D50 = 5003, // for Widegamut, Prophoto Best, Beta -> D50
|
D50 = 5003, // for Widegamut, Prophoto Best, Beta -> D50
|
||||||
D65 = 6504 // for sRGB, AdobeRGB, Bruce Rec2020 -> D65
|
D65 = 6504, // for sRGB, AdobeRGB, Bruce Rec2020 -> D65
|
||||||
|
D60 = 6005 //for ACEScg->D60
|
||||||
};
|
};
|
||||||
ColorTemp temp = ColorTemp::D50;
|
ColorTemp temp = ColorTemp::D50;
|
||||||
float p[6]; //primaries
|
float p[6]; //primaries
|
||||||
@ -1609,6 +1639,14 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams:
|
|||||||
p[4] = 0.1310;
|
p[4] = 0.1310;
|
||||||
p[5] = 0.0460;
|
p[5] = 0.0460;
|
||||||
temp = ColorTemp::D65;
|
temp = ColorTemp::D65;
|
||||||
|
} else if (icm.wprimari == "ACEScg") {
|
||||||
|
p[0] = 0.734704; // ACEScg primaries
|
||||||
|
p[1] = 0.265298;
|
||||||
|
p[2] = -0.000004;
|
||||||
|
p[3] = 0.999993;
|
||||||
|
p[4] = 0.00009989;
|
||||||
|
p[5] = -0.077007;
|
||||||
|
temp = ColorTemp::D60;
|
||||||
} else {
|
} else {
|
||||||
p[0] = 0.7347; //ProPhoto and default primaries
|
p[0] = 0.7347; //ProPhoto and default primaries
|
||||||
p[1] = 0.2653;
|
p[1] = 0.2653;
|
||||||
|
@ -61,6 +61,7 @@ public:
|
|||||||
Glib::ustring srgb; // default name of SRGB space profile
|
Glib::ustring srgb; // default name of SRGB space profile
|
||||||
Glib::ustring srgb10; // default name of SRGB space profile
|
Glib::ustring srgb10; // default name of SRGB space profile
|
||||||
Glib::ustring rec2020; // default name of rec2020
|
Glib::ustring rec2020; // default name of rec2020
|
||||||
|
Glib::ustring ACEScg; // default name of ACEScg
|
||||||
|
|
||||||
bool gamutICC; // no longer used
|
bool gamutICC; // no longer used
|
||||||
bool gamutLch;
|
bool gamutLch;
|
||||||
|
@ -531,16 +531,17 @@ void Options::setDefaults ()
|
|||||||
rtSettings.monitorIntent = rtengine::RI_RELATIVE;
|
rtSettings.monitorIntent = rtengine::RI_RELATIVE;
|
||||||
rtSettings.monitorBPC = true;
|
rtSettings.monitorBPC = true;
|
||||||
rtSettings.autoMonitorProfile = false;
|
rtSettings.autoMonitorProfile = false;
|
||||||
rtSettings.adobe = "RT_Medium_gsRGB"; // put the name of yours profiles (here windows)
|
rtSettings.adobe = "RT_ClayRGB-V2-srgbtrc"; // put the name of yours profiles (here windows)
|
||||||
rtSettings.prophoto = "RT_Large_gBT709"; // these names appear in the menu "output profile"
|
rtSettings.prophoto = "RT_LargeRGB-V2-rgbtrc"; // these names appear in the menu "output profile"
|
||||||
rtSettings.prophoto10 = "RT_Large_g10"; // these names appear in the menu "output profile"
|
rtSettings.prophoto10 = "RT_Large_g10"; // these names appear in the menu "output profile"
|
||||||
rtSettings.srgb10 = "RT_sRGB_g10";
|
rtSettings.srgb10 = "RT_sRGB_g10";
|
||||||
rtSettings.widegamut = "WideGamutRGB";
|
rtSettings.widegamut = "WideGamutRGB";
|
||||||
rtSettings.srgb = "RT_sRGB";
|
rtSettings.srgb = "RT_sRGB-V2-srgbtrc";
|
||||||
rtSettings.bruce = "Bruce";
|
rtSettings.bruce = "Bruce";
|
||||||
rtSettings.beta = "BetaRGB";
|
rtSettings.beta = "BetaRGB";
|
||||||
rtSettings.best = "BestRGB";
|
rtSettings.best = "BestRGB";
|
||||||
rtSettings.rec2020 = "Rec2020";
|
rtSettings.rec2020 = "RT_Rec2020-V2-srgbtrc";
|
||||||
|
rtSettings.ACEScg = "RT_ACES-V2-srgbtrc";
|
||||||
rtSettings.verbose = false;
|
rtSettings.verbose = false;
|
||||||
rtSettings.gamutICC = true;
|
rtSettings.gamutICC = true;
|
||||||
rtSettings.gamutLch = true;
|
rtSettings.gamutLch = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user