diff --git a/rtengine/dirpyr_equalizer.cc b/rtengine/dirpyr_equalizer.cc index c0b10202d..0d13ad2e4 100644 --- a/rtengine/dirpyr_equalizer.cc +++ b/rtengine/dirpyr_equalizer.cc @@ -426,16 +426,25 @@ void ImProcFunctions::cbdl_local_temp(float ** src, float ** loctemp, int srcwid float clar = 0.01f * mergeL; - +/* if(clar == 0.f) { - clar = 0.0005f; + clar = 0.0f; } - +// printf("clar=%f \n", clar); +*/ + if(clar > 0.f) { #pragma omp parallel for for (int i = 0; i < srcheight; i++) for (int j = 0; j < srcwidth; j++) { loctemp[i][j] = CLIPLL((1.f + clar) * loct[i][j] - clar * resid5[i][j]); } + } else { + #pragma omp parallel for + for (int i = 0; i < srcheight; i++) + for (int j = 0; j < srcwidth; j++) { + loctemp[i][j] = CLIPLL(loct[i][j]); + } + } } diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 7f034cac8..e891fbd3e 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -602,6 +602,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.dehaze = local_dehaze; lp.senscb = local_sensicb; lp.clarityml = local_clarityml; + //printf("lpclari=%f \n", lp.clarityml); lp.contresid = local_contresid; lp.blurcbdl = local_blurcbdl; lp.cont = local_contrast; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 9b8bbce07..0e5bc2597 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2497,7 +2497,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : chromacbdl(0), threshold(0.2), sensicb(15), - clarityml(0), + clarityml(0.), contresid(0), blurcbdl(0.), softradiuscb(0.0), diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 604a1936e..9d95f78b0 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1098,9 +1098,9 @@ struct LocallabParams { int chromacbdl; double threshold; int sensicb; - int clarityml; + double clarityml; int contresid; - int blurcbdl; + double blurcbdl; double softradiuscb; bool enacbMask; std::vector CCmaskcbcurve; diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 557f3b92e..d6a387c19 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -168,7 +168,7 @@ Locallab::Locallab(): // Contrast by detail levels chromacbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMACBDL"), 0, 300, 1, 0))), threshold(Gtk::manage(new Adjuster(M("TP_DIRPYREQUALIZER_THRESHOLD"), 0, 1., 0.01, 0.2))), - clarityml(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARITYML"), 0, 100, 1, 0))), + clarityml(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARITYML"), 0.0, 100., 0.1, 0.0))), contresid(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CONTRESID"), -100, 100, 1, 0))), blurcbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURCBDL"), 0., 100., 0.1, 0.))), sensicb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSICB"), 0, 100, 1, 15))), @@ -1966,7 +1966,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.spots.at(pp->locallab.selspot).chromacbdl = chromacbdl->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).threshold = threshold->getValue(); pp->locallab.spots.at(pp->locallab.selspot).sensicb = sensicb->getIntValue(); - pp->locallab.spots.at(pp->locallab.selspot).clarityml = clarityml->getIntValue(); + pp->locallab.spots.at(pp->locallab.selspot).clarityml = clarityml->getValue(); pp->locallab.spots.at(pp->locallab.selspot).contresid = contresid->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).blurcbdl = blurcbdl->getValue(); pp->locallab.spots.at(pp->locallab.selspot).softradiuscb = softradiuscb->getValue(); @@ -3315,7 +3315,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe chromacbdl->setDefault((double)defSpot->chromacbdl); threshold->setDefault(defSpot->threshold); sensicb->setDefault((double)defSpot->sensicb); - clarityml->setDefault((double)defSpot->clarityml); + clarityml->setDefault(defSpot->clarityml); contresid->setDefault((double)defSpot->contresid); blurcbdl->setDefault(defSpot->blurcbdl); softradiuscb->setDefault(defSpot->softradiuscb);