diff --git a/rtdata/languages/default b/rtdata/languages/default index e783c41b7..560d36a52 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -908,6 +908,7 @@ HISTORY_MSG_660;Local - cbdl clarity HISTORY_MSG_661;Local - cbdl contrast residual HISTORY_MSG_662;Local - deNoise lum f 0 HISTORY_MSG_663;Local - deNoise lum f 2 +HISTORY_MSG_664;Local - cbdl Blur HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction @@ -1965,6 +1966,7 @@ TP_LOCALLAB_BLUFR;Blur & Noise TP_LOCALLAB_BLURDE;Blur Shape detection TP_LOCALLAB_BLNORM;Normal TP_LOCALLAB_BLINV;Inverse +TP_LOCALLAB_BLURCBDL;Blur TP_LOCALLAB_BLSYM;Symmetric TP_LOCALLAB_CENTER_X;Center X TP_LOCALLAB_CENTER_Y;Center Y diff --git a/rtengine/dirpyr_equalizer.cc b/rtengine/dirpyr_equalizer.cc index 9ca8f0f69..b7f188889 100644 --- a/rtengine/dirpyr_equalizer.cc +++ b/rtengine/dirpyr_equalizer.cc @@ -24,6 +24,7 @@ #include "array2D.h" #include "rt_math.h" #include "opthelper.h" +#include "boxblur.h" #define RANGEFN(i) ((1000.0f / (i + 1000.0f))) #define DIRWT(i1,j1,i,j) ( domker[(i1-i)/scale+halfwin][(j1-j)/scale+halfwin] * RANGEFN(fabsf((data_fine[i1][j1]-data_fine[i][j]))) ) @@ -252,11 +253,11 @@ void ImProcFunctions :: dirpyr_equalizer(float ** src, float ** dst, int srcwidt } -void ImProcFunctions::cbdl_local_temp(float ** src, float ** loctemp, int srcwidth, int srcheight, const float * mult, float kchro, const double dirpyrThreshold, const float mergeL, const float contres, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, int scaleprev) +void ImProcFunctions::cbdl_local_temp(float ** src, float ** loctemp, int srcwidth, int srcheight, const float * mult, float kchro, const double dirpyrThreshold, const float mergeL, const float contres, const float blurcb, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, int scaleprev, bool multiThread) { int lastlevel = maxlevelloc; - if (settings->verbose) { + if (settings->verbose) { printf("Dirpyr scaleprev=%i\n", scaleprev); } @@ -407,12 +408,12 @@ void ImProcFunctions::cbdl_local_temp(float ** src, float ** loctemp, int srcwid for (int level = lastlevel - 1; level > 0; level--) { - idirpyr_eq_channel_loc(dirpyrlo[level], dirpyrlo[level - 1], residbuff, srcwidth, srcheight, level, multi, dirpyrThreshold, nullptr, nullptr, skinprot, gamutlab, b_l, t_l, t_r, b_r, choice); + idirpyr_eq_channel_loc(dirpyrlo[level], dirpyrlo[level - 1], residbuff, srcwidth, srcheight, level, multi, blurcb, dirpyrThreshold, nullptr, nullptr, skinprot, gamutlab, b_l, t_l, t_r, b_r, choice, multiThread); } scale = scalesloc[0]; - idirpyr_eq_channel_loc(dirpyrlo[0], src, residbuff, srcwidth, srcheight, 0, multi, dirpyrThreshold, nullptr, nullptr, skinprot, gamutlab, b_l, t_l, t_r, b_r, choice); + idirpyr_eq_channel_loc(dirpyrlo[0], src, residbuff, srcwidth, srcheight, 0, multi, blurcb, dirpyrThreshold, nullptr, nullptr, skinprot, gamutlab, b_l, t_l, t_r, b_r, choice, multiThread); //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% array2D loct(srcwidth, srcheight); @@ -790,7 +791,7 @@ void ImProcFunctions::dirpyr_channel(float ** data_fine, float ** data_coarse, i } //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -void ImProcFunctions::idirpyr_eq_channel_loc(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float mult[5], const double dirpyrThreshold, float ** hue, float ** chrom, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice) +void ImProcFunctions::idirpyr_eq_channel_loc(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float mult[5], const float blurcb, const double dirpyrThreshold, float ** hue, float ** chrom, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, bool multiThread) { // const float skinprotneg = -skinprot; // const float factorHard = (1.f - skinprotneg / 100.f); @@ -834,7 +835,9 @@ void ImProcFunctions::idirpyr_eq_channel_loc(float ** data_coarse, float ** data } - // if (skinprot == 0.f) + + AlignedBuffer blurbufcbdl(width * height); + float rad = 0.05f * blurcb * fabs((level + 1) * (multbis[level] - 1.f)); #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) #endif @@ -845,45 +848,14 @@ void ImProcFunctions::idirpyr_eq_channel_loc(float ** data_coarse, float ** data buffer[i][j] = CLIPLL(buffer[i][j]); } } + if(blurcb > 0.f) { +#ifdef _OPENMP + #pragma omp parallel if (multiThread) +#endif + boxblur(buffer, buffer, blurbufcbdl.data, rad, rad, width, height); + } irangefn.clear(); - /* - else if(skinprot > 0.f) - #ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) - #endif - for(int i = 0; i < height; i++) { - for(int j = 0; j < width; j++) { - float scale = 1.f; - float hipass = (data_fine[i][j] - data_coarse[i][j]); - // These values are precalculated now - float modhue = hue[i][j]; - float modchro = chrom[i][j]; - Color::SkinSatCbdl ((data_fine[i][j]) / 327.68f, modhue, modchro, skinprot, scale, true, b_l, t_l, t_r); - buffer[i][j] += (1.f + (irangefn[hipass + 0x10000]) * scale) * hipass ; - } - } - else - #ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) - #endif - for(int i = 0; i < height; i++) { - for(int j = 0; j < width; j++) { - float scale = 1.f; - float hipass = (data_fine[i][j] - data_coarse[i][j]); - // These values are precalculated now - float modhue = hue[i][j]; - float modchro = chrom[i][j]; - Color::SkinSatCbdl ((data_fine[i][j]) / 327.68f, modhue, modchro, skinprotneg, scale, false, b_l, t_l, t_r); - float correct = irangefn[hipass + 0x10000]; - - if (scale == 1.f) {//image hard - buffer[i][j] += (1.f + (correct) * (factorHard)) * hipass ; - } else { //image soft with scale < 1 ==> skin - buffer[i][j] += (1.f + (correct)) * hipass ; - } - } - } - */ + blurbufcbdl.resize(0); } void ImProcFunctions::idirpyr_eq_channel(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float mult[maxlevel], const double dirpyrThreshold, float ** hue, float ** chrom, const double skinprot, float b_l, float t_l, float t_r) diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 542bedf6b..a3f972285 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -386,8 +386,8 @@ public: float MadRgb(float * DataList, const int datalen); // pyramid wavelet - void cbdl_local_temp(float ** src, float ** loctemp, int srcwidth, int srcheight, const float * mult, float kchro, const double dirpyrThreshold, const float mergeL, const float contres, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, int scale); - void idirpyr_eq_channel_loc(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float multi[5], const double dirpyrThreshold, float ** l_a_h, float ** l_b_c, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice); + void cbdl_local_temp(float ** src, float ** loctemp, int srcwidth, int srcheight, const float * mult, float kchro, const double dirpyrThreshold, const float mergeL, const float contres, const float blurcb, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, int scale, bool multiThread); + void idirpyr_eq_channel_loc(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float multi[5], const float blucb, const double dirpyrThreshold, float ** l_a_h, float ** l_b_c, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, bool multiThread); void dirpyr_equalizer(float ** src, float ** dst, int srcwidth, int srcheight, float ** l_a, float ** l_b, const double * mult, const double dirpyrThreshold, const double skinprot, float b_l, float t_l, float t_r, int scale); //Emil's directional pyramid wavelet void dirpyr_equalizercam(CieImage* ncie, float ** src, float ** dst, int srcwidth, int srcheight, float ** h_p, float ** C_p, const double * mult, const double dirpyrThreshold, const double skinprot, bool execdir, float b_l, float t_l, float t_r, int scale); //Emil's directional pyramid wavelet void dirpyr_channel(float ** data_fine, float ** data_coarse, int width, int height, int level, int scale); diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 163bb3a03..8888ab5ab 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -165,6 +165,7 @@ struct local_params { int chro, cont, sens, sensh, senscb, sensbn, senstm, sensex, sensexclu, sensden, senslc, senssf, senshs; float clarityml; float contresid; + float blurcbdl; float struco; float strengrid; float struexc; @@ -472,6 +473,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall int local_sensicb = locallab.spots.at(sp).sensicb; float local_clarityml = (float) locallab.spots.at(sp).clarityml; float local_contresid = (float) locallab.spots.at(sp).contresid; + int local_blurcbdl = (float) locallab.spots.at(sp).blurcbdl; int local_contrast = locallab.spots.at(sp).contrast; float local_lightness = (float) locallab.spots.at(sp).lightness; float labgridALowloc = locallab.spots.at(sp).labgridALow; @@ -582,6 +584,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.senscb = local_sensicb; lp.clarityml = local_clarityml; lp.contresid = local_contresid; + lp.blurcbdl = local_blurcbdl; lp.cont = local_contrast; lp.ligh = local_lightness; lp.lowA = labgridALowloc; @@ -5209,7 +5212,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o lp.mulloc[4]= 1.001f; } - ImProcFunctions::cbdl_local_temp(bufsh, loctemp->L, bfw, bfh, lp.mulloc, 1.f, lp.threshol, lp.clarityml, lp.contresid, skinprot, false, b_l, t_l, t_r, b_r, choice, sk); + ImProcFunctions::cbdl_local_temp(bufsh, loctemp->L, bfw, bfh, lp.mulloc, 1.f, lp.threshol, lp.clarityml, lp.contresid, lp.blurcbdl, skinprot, false, b_l, t_l, t_r, b_r, choice, sk, multiThread); float minL = loctemp->L[0][0] - origcbdl->L[0][0]; float maxL = minL; @@ -5270,7 +5273,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o multc[lv] = rtengine::max((lp.chromacb * ((float) lp.mulloc[lv] - 1.f) / 100.f) + 1.f, 0.f); } - ImProcFunctions::cbdl_local_temp(bufsh, loctemp->L, bfw, bfh, multc, rtengine::max(lp.chromacb, 1.f), lp.threshol, clarich, 0.f, skinprot, false, b_l, t_l, t_r, b_r, choice, sk); + ImProcFunctions::cbdl_local_temp(bufsh, loctemp->L, bfw, bfh, multc, rtengine::max(lp.chromacb, 1.f), lp.threshol, clarich, 0.f, lp.blurcbdl, skinprot, false, b_l, t_l, t_r, b_r, choice, sk, multiThread); float minC = loctemp->L[0][0] - sqrt(SQR(loctemp->a[0][0]) + SQR(loctemp->b[0][0])); diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 93cb9b9f4..2c49578af 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -690,6 +690,7 @@ enum ProcEventCode { EvLocallabcontresid = 660, Evlocallabnoiselumf0 = 661, Evlocallabnoiselumf2 = 662, + EvLocallabblurcbdl = 663, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 405d970fe..5c682fd60 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2499,6 +2499,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : sensicb(15), clarityml(0), contresid(0), + blurcbdl(0), softradiuscb(0.0), // Denoise expdenoi(false), @@ -2693,6 +2694,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && sensicb == other.sensicb && clarityml == other.clarityml && contresid == other.contresid + && blurcbdl == other.blurcbdl && softradiuscb == other.softradiuscb // Denoise && expdenoi == other.expdenoi @@ -3829,6 +3831,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).sensicb, "Locallab", "Sensicb_" + std::to_string(i), spot.sensicb, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).clarityml, "Locallab", "Clarityml_" + std::to_string(i), spot.clarityml, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).contresid, "Locallab", "Contresid_" + std::to_string(i), spot.contresid, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).blurcbdl, "Locallab", "Blurcbdl_" + std::to_string(i), spot.blurcbdl, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).softradiuscb, "Locallab", "Softradiuscb_" + std::to_string(i), spot.softradiuscb, keyFile); // Denoise saveToKeyfile(!pedited || pedited->locallab.spots.at(i).expdenoi, "Locallab", "Expdenoi_" + std::to_string(i), spot.expdenoi, keyFile); @@ -5111,6 +5114,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Sensicb_" + std::to_string(i), pedited, spot.sensicb, spotEdited.sensicb); assignFromKeyfile(keyFile, "Locallab", "Clarityml_" + std::to_string(i), pedited, spot.clarityml, spotEdited.clarityml); assignFromKeyfile(keyFile, "Locallab", "Contresid_" + std::to_string(i), pedited, spot.contresid, spotEdited.contresid); + assignFromKeyfile(keyFile, "Locallab", "Blurcbdl_" + std::to_string(i), pedited, spot.blurcbdl, spotEdited.blurcbdl); assignFromKeyfile(keyFile, "Locallab", "Softradiuscb_" + std::to_string(i), pedited, spot.softradiuscb, spotEdited.softradiuscb); // Denoise assignFromKeyfile(keyFile, "Locallab", "Expdenoi_" + std::to_string(i), pedited, spot.expdenoi, spotEdited.expdenoi); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 7abefd222..6de7b04c9 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1100,6 +1100,7 @@ struct LocallabParams { int sensicb; int clarityml; int contresid; + int blurcbdl; double softradiuscb; // Denoise bool expdenoi; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index d0f143d49..7488ab587 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -689,7 +689,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, // EvLocallabclarityml LUMINANCECURVE, // EvLocallabcontresid LUMINANCECURVE, //Evlocallabnoiselumf0 - LUMINANCECURVE //Evlocallabnoiselumf2 + LUMINANCECURVE, //Evlocallabnoiselumf2 + LUMINANCECURVE //Evlocallabblurcbdl }; diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 2802e9e2a..b29e3b5e3 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -164,6 +164,7 @@ Locallab::Locallab(): 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))), contresid(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CONTRESID"), -100, 100, 1, 0))), + blurcbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURCBDL"), 0, 100, 1, 0))), sensicb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSICB"), 0, 100, 1, 15))), softradiuscb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.1, 0.))), // Denoise @@ -928,6 +929,7 @@ Locallab::Locallab(): softradiuscb->setAdjusterListener(this); clarityml->setAdjusterListener(this); contresid->setAdjusterListener(this); + blurcbdl->setAdjusterListener(this); ToolParamBlock* const cbdlBox = Gtk::manage(new ToolParamBlock()); Gtk::HBox* buttonBox = Gtk::manage(new Gtk::HBox(true, 10)); @@ -947,6 +949,7 @@ Locallab::Locallab(): cbdlBox->pack_start(*separator, Gtk::PACK_SHRINK, 2); cbdlBox->pack_start(*chromacbdl); cbdlBox->pack_start(*threshold); + cbdlBox->pack_start(*blurcbdl); residFrame->set_label_align(0.025, 0.5); ToolParamBlock* const residBox = Gtk::manage(new ToolParamBlock()); residBox->pack_start(*clarityml); @@ -1869,6 +1872,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) 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).contresid = contresid->getIntValue(); + pp->locallab.spots.at(pp->locallab.selspot).blurcbdl = blurcbdl->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).softradiuscb = softradiuscb->getValue(); // Denoise pp->locallab.spots.at(pp->locallab.selspot).expdenoi = expdenoi->getEnabled(); @@ -2053,6 +2057,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pe->locallab.spots.at(pp->locallab.selspot).sensicb = pe->locallab.spots.at(pp->locallab.selspot).sensicb || sensicb->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).clarityml = pe->locallab.spots.at(pp->locallab.selspot).clarityml || clarityml->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).contresid = pe->locallab.spots.at(pp->locallab.selspot).contresid || contresid->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).blurcbdl = pe->locallab.spots.at(pp->locallab.selspot).blurcbdl || blurcbdl->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).softradiuscb = pe->locallab.spots.at(pp->locallab.selspot).softradiuscb || softradiuscb->getEditedState(); // Denoise pe->locallab.spots.at(pp->locallab.selspot).expdenoi = pe->locallab.spots.at(pp->locallab.selspot).expdenoi || !expdenoi->get_inconsistent(); @@ -2239,6 +2244,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pedited->locallab.spots.at(pp->locallab.selspot).sensicb = pedited->locallab.spots.at(pp->locallab.selspot).sensicb || sensicb->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).clarityml = pedited->locallab.spots.at(pp->locallab.selspot).clarityml || clarityml->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).contresid = pedited->locallab.spots.at(pp->locallab.selspot).contresid || contresid->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).blurcbdl = pedited->locallab.spots.at(pp->locallab.selspot).blurcbdl || blurcbdl->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).softradiuscb = pedited->locallab.spots.at(pp->locallab.selspot).softradiuscb || softradiuscb->getEditedState(); // Denoise pedited->locallab.spots.at(pp->locallab.selspot).expdenoi = pedited->locallab.spots.at(pp->locallab.selspot).expdenoi || !expdenoi->get_inconsistent(); @@ -3106,6 +3112,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe sensicb->setDefault((double)defSpot->sensicb); clarityml->setDefault((double)defSpot->clarityml); contresid->setDefault((double)defSpot->contresid); + blurcbdl->setDefault((double)defSpot->blurcbdl); softradiuscb->setDefault(defSpot->softradiuscb); // Denoise noiselumf->setDefault((double)defSpot->noiselumf); @@ -3219,6 +3226,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe sensicb->setDefaultEditedState(Irrelevant); clarityml->setDefaultEditedState(Irrelevant); contresid->setDefaultEditedState(Irrelevant); + blurcbdl->setDefaultEditedState(Irrelevant); softradiuscb->setDefaultEditedState(Irrelevant); // Denoise noiselumf->setDefaultEditedState(Irrelevant); @@ -3336,6 +3344,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe sensicb->setDefaultEditedState(defSpotState->sensicb ? Edited : UnEdited); clarityml->setDefaultEditedState(defSpotState->clarityml ? Edited : UnEdited); contresid->setDefaultEditedState(defSpotState->contresid ? Edited : UnEdited); + blurcbdl->setDefaultEditedState(defSpotState->blurcbdl ? Edited : UnEdited); softradiuscb->setDefaultEditedState(defSpotState->softradiuscb ? Edited : UnEdited); // Denoise noiselumf->setDefaultEditedState(defSpotState->noiselumf ? Edited : UnEdited); @@ -3925,13 +3934,19 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) } if (a == contresid) { - //clarityml->setValue(0.); if (listener) { listener->panelChanged(EvLocallabcontresid, contresid->getTextValue()); } } + if (a == blurcbdl) { + + if (listener) { + listener->panelChanged(EvLocallabblurcbdl, blurcbdl->getTextValue()); + } + } + if (a == softradiuscb) { if (listener) { listener->panelChanged(Evlocallabsoftradiuscb, softradiuscb->getTextValue()); @@ -4138,6 +4153,7 @@ void Locallab::setBatchMode(bool batchMode) sensicb->showEditedCB(); clarityml->showEditedCB(); contresid->showEditedCB(); + blurcbdl->showEditedCB(); softradiuscb->showEditedCB(); // Denoise noiselumf->showEditedCB(); @@ -4579,6 +4595,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con sensicb->setValue(pp->locallab.spots.at(index).sensicb); clarityml->setValue(pp->locallab.spots.at(index).clarityml); contresid->setValue(pp->locallab.spots.at(index).contresid); + blurcbdl->setValue(pp->locallab.spots.at(index).blurcbdl); softradiuscb->setValue(pp->locallab.spots.at(index).softradiuscb); // Denoise @@ -4800,6 +4817,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con sensicb->setEditedState(spotState->sensicb ? Edited : UnEdited); clarityml->setEditedState(spotState->clarityml ? Edited : UnEdited); contresid->setEditedState(spotState->contresid ? Edited : UnEdited); + blurcbdl->setEditedState(spotState->blurcbdl ? Edited : UnEdited); softradiuscb->setEditedState(spotState->softradiuscb ? Edited : UnEdited); // Denoise diff --git a/rtgui/locallab.h b/rtgui/locallab.h index 273b29075..8be29fbdf 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -184,6 +184,7 @@ private: Adjuster* const threshold; Adjuster* const clarityml; Adjuster* const contresid; + Adjuster* const blurcbdl; Adjuster* const sensicb; Adjuster* const softradiuscb; // Denoise diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 9e7e7aa03..d8cc20385 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1093,6 +1093,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).sensicb = locallab.spots.at(j).sensicb && pSpot.sensicb == otherSpot.sensicb; locallab.spots.at(j).clarityml = locallab.spots.at(j).clarityml && pSpot.clarityml == otherSpot.clarityml; locallab.spots.at(j).contresid = locallab.spots.at(j).contresid && pSpot.contresid == otherSpot.contresid; + locallab.spots.at(j).blurcbdl = locallab.spots.at(j).blurcbdl && pSpot.blurcbdl == otherSpot.blurcbdl; locallab.spots.at(j).softradiuscb = locallab.spots.at(j).softradiuscb && pSpot.softradiuscb == otherSpot.softradiuscb; // Denoise locallab.spots.at(j).expdenoi = locallab.spots.at(j).expdenoi && pSpot.expdenoi == otherSpot.expdenoi; @@ -3147,6 +3148,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).contresid = mods.locallab.spots.at(i).contresid; } + if (locallab.spots.at(i).blurcbdl) { + toEdit.locallab.spots.at(i).blurcbdl = mods.locallab.spots.at(i).blurcbdl; + } + if (locallab.spots.at(i).softradiuscb) { toEdit.locallab.spots.at(i).softradiuscb = mods.locallab.spots.at(i).softradiuscb; } @@ -4307,6 +4312,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : sensicb(v), clarityml(v), contresid(v), + blurcbdl(v), softradiuscb(v), // Denoise expdenoi(v), @@ -4493,6 +4499,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) sensicb = v; clarityml = v; contresid = v; + blurcbdl = v; softradiuscb = v; // Denoise expdenoi = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 8be8f0a94..316730398 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -516,6 +516,7 @@ public: bool sensicb; bool clarityml; bool contresid; + bool blurcbdl; bool softradiuscb; // Denoise bool expdenoi;