diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 4036bb8ea..55756bc9d 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -13949,39 +13949,31 @@ void ImProcFunctions::Lab_Local( } } - /* - //cat02 - if (params->locallab.spots.at(sp).warm != 0) { - ImProcFunctions::ciecamloc_02float(sp, bufexpfin.get()); - } - */ - /* - constexpr float ampli = 70.f; - float ch = 0.f; - float chprosl = 0.f; + if (lp.expchroma != 0.f) { + constexpr float ampli = 70.f; + float ch = 0.f; + float chprosl = 0.f; - if ((lp.expcomp != 0.f && lp.expcomp != 0.01f) || (exlocalcurve && localexutili)) { - ch = (1.f + 0.02f * lp.expchroma); - chprosl = ch <= 1.f ? 99.f * ch - 99.f : CLIPCHRO(ampli * ch - ampli); - } + if ((lp.expcomp != 0.f && lp.expcomp != 0.01f) || (exlocalcurve && localexutili)) { + ch = (1.f + 0.02f * lp.expchroma); + chprosl = ch <= 1.f ? 99.f * ch - 99.f : CLIPCHRO(ampli * ch - ampli); + } - #ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) - #endif +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) +#endif - for (int ir = 0; ir < bfh; ir++) { - for (int jr = 0; jr < bfw; jr++) { - const float epsi = bufexporig->L[ir][jr] == 0.f ? 0.001f : 0.f; - const float rapexp = bufexpfin->L[ir][jr] / (bufexporig->L[ir][jr] + epsi); + for (int ir = 0; ir < bfh; ir++) { + for (int jr = 0; jr < bfw; jr++) { + const float epsi = bufexporig->L[ir][jr] == 0.f ? 0.001f : 0.f; + const float rapexp = bufexpfin->L[ir][jr] / (bufexporig->L[ir][jr] + epsi); + bufexpfin->a[ir][jr] *= 0.01f * (100.f + 100.f * chprosl * rapexp); + bufexpfin->b[ir][jr] *= 0.01f * (100.f + 100.f * chprosl * rapexp); + } + } - if (rapexp >= 1.f) { - bufl_ab[ir][jr] = chprosl * rapexp; - } else { - bufl_ab[ir][jr] = chprosl * rapexp; - } - } - } - */ + } + if (lp.softradiusexp > 0.f && lp.expmet == 0) { softproc(bufexporig.get(), bufexpfin.get(), lp.softradiusexp, bfh, bfw, 0.0001, 0.00001, 0.1f, sk, multiThread, 1); } diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 9b92ae04c..bbe14ccb1 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2811,7 +2811,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : black(0), shadex(0), shcompr(50), - expchroma(30), + expchroma(5), sensiex(60), structexp(0), blurexpde(5), diff --git a/rtgui/locallabtools.cc b/rtgui/locallabtools.cc index 182943eed..dfcd587df 100644 --- a/rtgui/locallabtools.cc +++ b/rtgui/locallabtools.cc @@ -2194,7 +2194,7 @@ LocallabExposure::LocallabExposure(): hlcomprthresh(Gtk::manage(new Adjuster(M("TP_EXPOSURE_COMPRHIGHLIGHTSTHRESHOLD"), 0, 100, 1, 0))), shadex(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHADEX"), 0, 100, 1, 0))), shcompr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHADEXCOMP"), 0, 100, 1, 50))), - expchroma(Gtk::manage(new Adjuster(M("TP_LOCALLAB_EXPCHROMA"), -50, 100, 1, 30))), + expchroma(Gtk::manage(new Adjuster(M("TP_LOCALLAB_EXPCHROMA"), -50, 100, 1, 5))), curveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_CURVEEDITOR_TONES_LABEL"))), shapeexpos(static_cast(curveEditorG->addCurve(CT_Diagonal, ""))), expgradexp(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_EXPGRAD")))),