Use hard-coded NR default settings #4327
Now the hard-coded default values of the Noise Reduction settings which were removed from Preferences are used, instead of reading them from the options file. Reverted accidentally-deleted "preview demosaicing method" setting.
This commit is contained in:
@@ -535,11 +535,6 @@ void Options::setDefaults()
|
||||
// rtSettings.viewingdevice = 0;
|
||||
// rtSettings.viewingdevicegrey = 3;
|
||||
// rtSettings.viewinggreySc = 1;
|
||||
rtSettings.leveldnv = 2;
|
||||
rtSettings.leveldnti = 0;
|
||||
rtSettings.leveldnaut = 0;
|
||||
rtSettings.leveldnliss = 0;
|
||||
rtSettings.leveldnautsimpl = 0;
|
||||
|
||||
rtSettings.printerProfile = Glib::ustring();
|
||||
rtSettings.printerIntent = rtengine::RI_RELATIVE;
|
||||
@@ -574,10 +569,16 @@ void Options::setDefaults()
|
||||
|
||||
rtSettings.daubech = false;
|
||||
|
||||
rtSettings.nrauto = 10;//between 2 and 20
|
||||
rtSettings.nrautomax = 40;//between 5 and 100
|
||||
rtSettings.nrhigh = 0.45;//between 0.1 and 0.9
|
||||
rtSettings.nrwavlevel = 1;//integer between 0 and 2
|
||||
// #4327 - Noise Reduction settings removed from Preferences
|
||||
rtSettings.nrauto = 10; // between 2 and 20
|
||||
rtSettings.nrautomax = 40; // between 5 and 100
|
||||
rtSettings.nrhigh = 0.45; // between 0.1 and 0.9
|
||||
rtSettings.nrwavlevel = 1; // integer between 0 and 2
|
||||
rtSettings.leveldnv = 2;
|
||||
rtSettings.leveldnti = 0;
|
||||
rtSettings.leveldnaut = 0;
|
||||
rtSettings.leveldnliss = 0;
|
||||
rtSettings.leveldnautsimpl = 0;
|
||||
|
||||
// rtSettings.colortoningab =0.7;
|
||||
//rtSettings.decaction =0.3;
|
||||
@@ -1026,46 +1027,6 @@ void Options::readFromFile(Glib::ustring fname)
|
||||
rgbDenoiseThreadLimit = keyFile.get_integer("Performance", "RgbDenoiseThreadLimit");
|
||||
}
|
||||
|
||||
if (keyFile.has_key("Performance", "NRauto")) {
|
||||
rtSettings.nrauto = keyFile.get_double("Performance", "NRauto");
|
||||
}
|
||||
|
||||
if (keyFile.has_key("Performance", "NRautomax")) {
|
||||
rtSettings.nrautomax = keyFile.get_double("Performance", "NRautomax");
|
||||
}
|
||||
|
||||
if (keyFile.has_key("Performance", "NRhigh")) {
|
||||
rtSettings.nrhigh = keyFile.get_double("Performance", "NRhigh");
|
||||
}
|
||||
|
||||
if (rtSettings.nrhigh == 0.0) { //avoid crash by division by zero in noise reduction
|
||||
rtSettings.nrhigh = 0.45;
|
||||
}
|
||||
|
||||
if (keyFile.has_key("Performance", "NRWavlevel")) {
|
||||
rtSettings.nrwavlevel = keyFile.get_integer("Performance", "NRWavlevel");
|
||||
}
|
||||
|
||||
if (keyFile.has_key("Performance", "LevNR")) {
|
||||
rtSettings.leveldnv = keyFile.get_integer("Performance", "LevNR");
|
||||
}
|
||||
|
||||
if (keyFile.has_key("Performance", "LevNRTI")) {
|
||||
rtSettings.leveldnti = keyFile.get_integer("Performance", "LevNRTI");
|
||||
}
|
||||
|
||||
if (keyFile.has_key("Performance", "LevNRAUT")) {
|
||||
rtSettings.leveldnaut = keyFile.get_integer("Performance", "LevNRAUT");
|
||||
}
|
||||
|
||||
if (keyFile.has_key("Performance", "LevNRLISS")) {
|
||||
rtSettings.leveldnliss = keyFile.get_integer("Performance", "LevNRLISS");
|
||||
}
|
||||
|
||||
if (keyFile.has_key("Performance", "SIMPLNRAUT")) {
|
||||
rtSettings.leveldnautsimpl = keyFile.get_integer("Performance", "SIMPLNRAUT");
|
||||
}
|
||||
|
||||
if (keyFile.has_key("Performance", "ClutCacheSize")) {
|
||||
clutCacheSize = keyFile.get_integer("Performance", "ClutCacheSize");
|
||||
}
|
||||
@@ -1082,10 +1043,6 @@ void Options::readFromFile(Glib::ustring fname)
|
||||
prevdemo = (prevdemo_t)keyFile.get_integer("Performance", "PreviewDemosaicFromSidecar");
|
||||
}
|
||||
|
||||
if (keyFile.has_key("Performance", "Daubechies")) {
|
||||
rtSettings.daubech = keyFile.get_boolean("Performance", "Daubechies");
|
||||
}
|
||||
|
||||
if (keyFile.has_key("Performance", "SerializeTiffRead")) {
|
||||
serializeTiffRead = keyFile.get_boolean("Performance", "SerializeTiffRead");
|
||||
}
|
||||
@@ -1923,20 +1880,10 @@ void Options::saveToFile(Glib::ustring fname)
|
||||
keyFile.set_boolean("Clipping Indication", "BlinkClipped", blinkClipped);
|
||||
|
||||
keyFile.set_integer("Performance", "RgbDenoiseThreadLimit", rgbDenoiseThreadLimit);
|
||||
keyFile.set_double("Performance", "NRauto", rtSettings.nrauto);
|
||||
keyFile.set_double("Performance", "NRautomax", rtSettings.nrautomax);
|
||||
keyFile.set_double("Performance", "NRhigh", rtSettings.nrhigh);
|
||||
keyFile.set_integer("Performance", "NRWavlevel", rtSettings.nrwavlevel);
|
||||
keyFile.set_integer("Performance", "LevNR", rtSettings.leveldnv);
|
||||
keyFile.set_integer("Performance", "LevNRTI", rtSettings.leveldnti);
|
||||
keyFile.set_integer("Performance", "LevNRAUT", rtSettings.leveldnaut);
|
||||
keyFile.set_integer("Performance", "LevNRLISS", rtSettings.leveldnliss);
|
||||
keyFile.set_integer("Performance", "SIMPLNRAUT", rtSettings.leveldnautsimpl);
|
||||
keyFile.set_integer("Performance", "ClutCacheSize", clutCacheSize);
|
||||
keyFile.set_integer("Performance", "MaxInspectorBuffers", maxInspectorBuffers);
|
||||
keyFile.set_integer("Performance", "InspectorDelay", inspectorDelay);
|
||||
keyFile.set_integer("Performance", "PreviewDemosaicFromSidecar", prevdemo);
|
||||
keyFile.set_boolean("Performance", "Daubechies", rtSettings.daubech);
|
||||
keyFile.set_boolean("Performance", "SerializeTiffRead", serializeTiffRead);
|
||||
keyFile.set_integer("Performance", "ThumbnailInspectorMode", int(rtSettings.thumbnail_inspector_mode));
|
||||
|
||||
|
Reference in New Issue
Block a user