Improvments to LA Sigmoid - LA Log encoding Cam16 and ICC profile creator (#6410)

* Improvment to sigmoid Cam16 and Jz
* Change default parameters contrast sigmoid
* Log encoding Q added to Sigmoid Q - Cam16
* Change DR evaluation for sigmoid
* Change default log encoding cam16 and change tool position options
* DCI-P3 added to Iccprofilecreator
This commit is contained in:
Desmis
2022-03-26 12:04:21 +01:00
committed by GitHub
parent 784625b5cc
commit c45a6105f7
13 changed files with 299 additions and 44 deletions

View File

@@ -79,6 +79,7 @@ ICCProfileCreator::ICCProfileCreator(RTWindow *rtwindow)
primaries->append(M("ICCPROFCREATOR_PRIM_BEST"));
primaries->append(M("ICCPROFCREATOR_PRIM_BETA"));
primaries->append(M("ICCPROFCREATOR_PRIM_BRUCE"));
primaries->append(M("ICCPROFCREATOR_PRIM_DCIP3"));
primaries->set_tooltip_text(M("ICCPROFCREATOR_PRIM_TOOLTIP"));
mainGrid->attach(*primaries, 1, 0, 1, 1);
@@ -176,6 +177,7 @@ ICCProfileCreator::ICCProfileCreator(RTWindow *rtwindow)
cIlluminant->append(M("ICCPROFCREATOR_ILL_50"));
cIlluminant->append(M("ICCPROFCREATOR_ILL_55"));
cIlluminant->append(M("ICCPROFCREATOR_ILL_60"));
cIlluminant->append(M("ICCPROFCREATOR_ILL_63"));
cIlluminant->append(M("ICCPROFCREATOR_ILL_65"));
cIlluminant->append(M("ICCPROFCREATOR_ILL_80"));
cIlluminant->append(M("ICCPROFCREATOR_ILL_INC"));
@@ -265,6 +267,8 @@ ICCProfileCreator::ICCProfileCreator(RTWindow *rtwindow)
primaries->set_active_text(M("ICCPROFCREATOR_PRIM_BETA"));
} else if (primariesPreset == "BruceRGB") {
primaries->set_active_text(M("ICCPROFCREATOR_PRIM_BRUCE"));
} else if (primariesPreset == "DCIP3") {
primaries->set_active_text(M("ICCPROFCREATOR_PRIM_DCIP3"));
}
trcPresets->set_active(0);
@@ -296,6 +300,8 @@ ICCProfileCreator::ICCProfileCreator(RTWindow *rtwindow)
cIlluminant->set_active_text(M("ICCPROFCREATOR_ILL_55"));
} else if (illuminant == "D60") {
cIlluminant->set_active_text(M("ICCPROFCREATOR_ILL_60"));
} else if (illuminant == "D63") {
cIlluminant->set_active_text(M("ICCPROFCREATOR_ILL_63"));
} else if (illuminant == "D65") {
cIlluminant->set_active_text(M("ICCPROFCREATOR_ILL_65"));
} else if (illuminant == "D80") {
@@ -437,6 +443,8 @@ void ICCProfileCreator::storeValues()
options.ICCPC_illuminant = illuminant = "D55";
} else if (cIlluminant->get_active_text() == M("ICCPROFCREATOR_ILL_60")) {
options.ICCPC_illuminant = illuminant = "D60";
} else if (cIlluminant->get_active_text() == M("ICCPROFCREATOR_ILL_63")) {
options.ICCPC_illuminant = illuminant = "D63";
} else if (cIlluminant->get_active_text() == M("ICCPROFCREATOR_ILL_65")) {
options.ICCPC_illuminant = illuminant = "D65";
} else if (cIlluminant->get_active_text() == M("ICCPROFCREATOR_ILL_80")) {
@@ -482,6 +490,8 @@ Glib::ustring ICCProfileCreator::getPrimariesPresetName(const Glib::ustring &pre
return Glib::ustring("BetaRGB");
} else if (primaries->get_active_text() == M("ICCPROFCREATOR_PRIM_BRUCE")) {
return Glib::ustring("BruceRGB");
} else if (primaries->get_active_text() == M("ICCPROFCREATOR_PRIM_DCIP3")) {
return Glib::ustring("DCIP3");
} else if (primaries->get_active_text() == M("ICCPROFCREATOR_CUSTOM")) {
return Glib::ustring("custom");
} else {
@@ -570,6 +580,13 @@ void ICCProfileCreator::getPrimaries(const Glib::ustring &preset, double *p, Col
p[3] = 0.8404;
p[4] = 0.0366;
p[5] = 0.0001;
} else if (preset == "DCIP3") {
p[0] = 0.68; // DCIP3 primaries
p[1] = 0.32;
p[2] = 0.265;
p[3] = 0.69;
p[4] = 0.15;
p[5] = 0.06;
} else if (preset == "custom") {
p[0] = redPrimaryX;
p[1] = redPrimaryY;
@@ -655,7 +672,7 @@ void ICCProfileCreator::savePressed()
// -------------------------------------------- Compute the default file name
// -----------------setmedia white point for monitor profile sRGB or AdobeRGB in case of profile used for monitor---------------------
//instead of calculations made by LCMS..small differences
bool isD65 = (primariesPreset == "sRGB" || primariesPreset == "Adobe" || primariesPreset == "Rec2020" || primariesPreset == "BruceRGB");
bool isD65 = (primariesPreset == "sRGB" || primariesPreset == "Adobe" || primariesPreset == "Rec2020" || primariesPreset == "BruceRGB" || primariesPreset == "DCIP3");
bool isD60 = (primariesPreset == "ACES-AP1" || primariesPreset == "ACES-AP0");
bool isD50 = (primariesPreset == "ProPhoto" || primariesPreset == "Widegamut" || primariesPreset == "BestRGB" || primariesPreset == "BetaRGB");
// v2except = (profileVersion == "v2" && (primariesPreset == "sRGB" || primariesPreset == "Adobe" || primariesPreset == "Rec2020" || primariesPreset == "BruceRGB" || primariesPreset == "ACES-AP1" || primariesPreset == "ACES-AP0") && illuminant == "DEF");
@@ -693,23 +710,23 @@ void ICCProfileCreator::savePressed()
if (options.rtSettings.widegamut.substr(0, 4) == "RTv4") {
options.rtSettings.widegamut = "RTv2_Wide";
}
sNewProfile = options.rtSettings.widegamut;
sPrimariesPreset = "Wide";
} else if (primariesPreset == "DCIP3") {//only at the request of the user
sNewProfile = options.rtSettings.DCIP3;
sPrimariesPreset = "DCIP3";
} else if (primariesPreset == "BestRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.best)) {
if (options.rtSettings.best.substr(0, 4) == "RTv4") {
options.rtSettings.best = "RTv2_Best";
}
sNewProfile = options.rtSettings.best;
sPrimariesPreset = "Best";
} else if (primariesPreset == "BetaRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.beta)) {
sNewProfile = options.rtSettings.beta;
if (options.rtSettings.beta.substr(0, 4) == "RTv4") {
options.rtSettings.widegamut = "RTv2_Beta";
}
sNewProfile = options.rtSettings.beta;
sPrimariesPreset = "Beta";
} else if (primariesPreset == "BruceRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.bruce)) {
@@ -750,6 +767,8 @@ void ICCProfileCreator::savePressed()
sPrimariesPreset = "Best";
} else if (primariesPreset == "BetaRGB") {
sPrimariesPreset = "Beta";
} else if (primariesPreset == "DCIP3") {
sPrimariesPreset = "DCIP3";
} else if (primariesPreset == "custom") {
sPrimariesPreset = "Custom";
}
@@ -1012,6 +1031,8 @@ void ICCProfileCreator::savePressed()
tempv4 = 5500.;
} else if (illuminant == "D60") {
tempv4 = 6004.;
} else if (illuminant == "D63") {
tempv4 = 6300.;
} else if (illuminant == "D65") {
tempv4 = 6504.;
} else if (illuminant == "D80") {
@@ -1030,6 +1051,10 @@ void ICCProfileCreator::savePressed()
xyD = {0.32168, 0.33767, 1.0};
}
if (illuminant == "D63") {
xyD = {0.314, 0.351, 1.0};
}
if (illuminant == "D50") {
xyD = {0.3457, 0.3585, 1.0};//white D50 near LCMS values but not perfect...it's a compromise!!
}
@@ -1077,6 +1102,9 @@ void ICCProfileCreator::savePressed()
} else if (illuminant == "D60") {
Wx = 0.952646075;
Wz = 1.008825184;
} else if (illuminant == "D63") {
Wx = 0.894587;
Wz = 0.954416;
} else if (illuminant == "D41") {
Wx = 0.991488263;
Wz = 0.631604625;