From 08b28cc12d35a3a3e5c311f006dcc97de31779fc Mon Sep 17 00:00:00 2001 From: Desmis Date: Sun, 11 Aug 2019 15:07:20 +0200 Subject: [PATCH] Add forgotten mask deltaE shadowsHighlight inverse --- rtdata/languages/default | 2 +- rtengine/iplocallab.cc | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 628a74df6..fe5f3ee05 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -2191,7 +2191,7 @@ TP_LOCALLAB_SENSIS_TOOLTIP;Adjust scope of action:\nSmall values limit action to TP_LOCALLAB_SETTINGS;Settings TP_LOCALLAB_ENABLE_MASK;Enable mask TP_LOCALLAB_SHOW;Mask and modifications -TP_LOCALLAB_SHOWMASKCOL_TOOLTIP;Display modifications.\nBeware, you can only view one modification (color and light or Exposure or Shadows-Highlight or TM or CBDL or Retinex MSR).\nYou must put 'Display modification' to 'none' or 'Usemask' to enabled the other show.\n\nUse Mask is before algorihtm shape detection +TP_LOCALLAB_SHOWMASKCOL_TOOLTIP;Display modifications.\nBeware, you can only view one modification (color and light or Exposure or Shadows-Highlight or TM or CBDL or Retinex MSR or Blur).\n\nUse Mask is before algorihtm shape detection TP_LOCALLAB_SHOWMNONE;None TP_LOCALLAB_SHOWMODIF;Show modifications whithout mask TP_LOCALLAB_SHOWMODIFMASK;Show modifications whith mask diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 526778f73..2684d126f 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -3674,7 +3674,8 @@ void ImProcFunctions::InverseColorLight_Local(int sp, int senstype, const struct std::unique_ptr origblurmask; const bool usemaskcol = (lp.enaColorMaskinv) && senstype == 0; const bool usemaskexp = (lp.enaExpMaskinv) && senstype == 1; - const bool usemaskall = (usemaskcol || usemaskexp); + const bool usemasksh = (lp.enaSHMaskinv) && senstype == 2; + const bool usemaskall = (usemaskcol || usemaskexp || usemasksh); float radius = 3.f / sk; @@ -7332,7 +7333,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o } } else if (lp.invsh && (lp.highlihs > 0.f || lp.shadowhs > 0.f) && call < 3 && lp.hsena) { std::unique_ptr bufmaskblurcol; - std::unique_ptr originalmaskcol; + std::unique_ptr originalmaskSH; std::unique_ptr bufcolorig; int GW = transformed->W; int GH = transformed->H; @@ -7340,7 +7341,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o if (lp.enaSHMaskinv || lp.showmaskSHmetinv == 1) { bufmaskblurcol.reset(new LabImage(GW, GH, true)); - originalmaskcol.reset(new LabImage(GW, GH)); + originalmaskSH.reset(new LabImage(GW, GH)); } #ifdef _OPENMP @@ -7380,7 +7381,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o float slope = lp.slomaSH; float blendm = lp.blendmaSH; - maskcalccol(GW, GH, 0, 0, sk, cx, cy, bufcolorig.get(), bufmaskblurcol.get(), originalmaskcol.get(), original, transformed, inv, lp, + maskcalccol(GW, GH, 0, 0, sk, cx, cy, bufcolorig.get(), bufmaskblurcol.get(), originalmaskSH.get(), original, transformed, inv, lp, locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, multiThread, enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, gamma, slope, blendm); @@ -7392,7 +7393,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o } float adjustr = 2.f; - InverseColorLight_Local(sp, 2, lp, nullptr, lightCurveloc, hltonecurveloc, shtonecurveloc, tonecurveloc, exlocalcurve, cclocalcurve, adjustr, localcutili, lllocalcurve, locallutili, original, transformed, cx, cy, hueref, chromaref, lumaref, sk); + InverseColorLight_Local(sp, 2, lp, originalmaskSH.get(), lightCurveloc, hltonecurveloc, shtonecurveloc, tonecurveloc, exlocalcurve, cclocalcurve, adjustr, localcutili, lllocalcurve, locallutili, original, transformed, cx, cy, hueref, chromaref, lumaref, sk); }