From 1e8add18483290fbacdf5e8aed27b861ff8549c5 Mon Sep 17 00:00:00 2001 From: Desmis Date: Mon, 8 Apr 2019 16:51:46 +0200 Subject: [PATCH] Put in options cbdlsensi default 0.4 --- rtengine/dirpyr_equalizer.cc | 4 ++-- rtengine/settings.h | 1 + rtgui/options.cc | 6 ++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/rtengine/dirpyr_equalizer.cc b/rtengine/dirpyr_equalizer.cc index 8b9b70546..9ca8f0f69 100644 --- a/rtengine/dirpyr_equalizer.cc +++ b/rtengine/dirpyr_equalizer.cc @@ -813,10 +813,10 @@ void ImProcFunctions::idirpyr_eq_channel_loc(float ** data_coarse, float ** data // if(level == 5 && mult[level] > 1.f) { // multbis[level] = 1.f + 0.45f * (mult[level] - 1.f); // } - + double sensicrash = settings->cbdlsensi; LUTf irangefn(0x20000); { - const float noisehi = 1.33f * noise * 0.1f * dirpyrThreshold / expf(level * log(3.0)), noiselo = 0.66f * noise * 0.1f * dirpyrThreshold / expf(level * log(3.0)); + const float noisehi = 1.33f * noise * sensicrash * dirpyrThreshold / expf(level * log(3.0)), noiselo = 0.66f * noise * sensicrash * dirpyrThreshold / expf(level * log(3.0)); //printf("level=%i multlev=%f noisehi=%f noiselo=%f skinprot=%f\n",level,mult[level], noisehi, noiselo, skinprot); // printf("noihi=%f noilo=%f\n", noisehi, noiselo); diff --git a/rtengine/settings.h b/rtengine/settings.h index 99c378acb..75f5efeed 100644 --- a/rtengine/settings.h +++ b/rtengine/settings.h @@ -85,6 +85,7 @@ public: double reduclow; bool detectshape; int previewselection; + double cbdlsensi; Glib::ustring lensfunDbDirectory; ///< The directory containing the lensfun database. If empty, the system defaults will be used (as described in http://lensfun.sourceforge.net/manual/dbsearch.html) diff --git a/rtgui/options.cc b/rtgui/options.cc index 1f1bcb5d0..e8620b5d6 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -593,6 +593,7 @@ void Options::setDefaults() rtSettings.reduclow = 0.85;//transition for luminance out scope rtSettings.detectshape = true;//experimental new detection shape rtSettings.previewselection = 5;//betwen 1 to 40 + rtSettings.cbdlsensi = 0.4;//betwen 0.001 to 1 // end locallab @@ -1619,6 +1620,10 @@ void Options::readFromFile(Glib::ustring fname) rtSettings.previewselection = keyFile.get_integer("Color Management", "Previewselection"); } + if (keyFile.has_key("Color Management", "Cbdlsensi")) {//sensibility to crash for cbdl + rtSettings.cbdlsensi = keyFile.get_double("Color Management", "Cbdlsensi"); + } + } if (keyFile.has_group("ICC Profile Creator")) { @@ -2202,6 +2207,7 @@ void Options::saveToFile(Glib::ustring fname) //keyFile.set_double ("Color Management", "Decaction", rtSettings.decaction); keyFile.set_string("Color Management", "ClutsDirectory", clutsDir); keyFile.set_integer("Color Management", "Previewselection", rtSettings.previewselection); + keyFile.set_double("Color Management", "Cbdlsensi", rtSettings.cbdlsensi); keyFile.set_string("ICC Profile Creator", "PimariesPreset", ICCPC_primariesPreset); keyFile.set_double("ICC Profile Creator", "RedPrimaryX", ICCPC_redPrimaryX);