diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index a4296d601..c08afc154 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -42,7 +42,7 @@ extern const Settings* settings; Crop::Crop (ImProcCoordinator* parent, EditDataProvider *editDataProvider, bool isDetailWindow) : PipetteBuffer (editDataProvider), origCrop (nullptr), laboCrop (nullptr), labnCrop (nullptr), - cropImg (nullptr), cbuf_real (nullptr), cshmap (nullptr), transCrop (nullptr), cieCrop (nullptr), cbuffer (nullptr), + cropImg (nullptr), cbuf_real (nullptr), transCrop (nullptr), cieCrop (nullptr), cbuffer (nullptr), updating (false), newUpdatePending (false), skip (10), cropx (0), cropy (0), cropw (-1), croph (-1), trafx (0), trafy (0), trafw (-1), trafh (-1), @@ -799,47 +799,13 @@ void Crop::update (int todo) } - // blurmap for shadow & highlights - // if ((todo & M_BLURMAP) && params.sh.enabled) { - // double radius = sqrt (double (skips (parent->fw, skip) * skips (parent->fw, skip) + skips (parent->fh, skip) * skips (parent->fh, skip))) / 2.0; - // double shradius = params.sh.radius; - - // if (!params.sh.hq) { - // shradius *= radius / 1800.0; - // } - - // if (!cshmap) { - // cshmap = new SHMap (cropw, croph, true); - // } - - // cshmap->update (baseCrop, shradius, parent->ipf.lumimul, params.sh.hq, skip); - - // if (parent->shmap->min_f < 65535.f) { // don't call forceStat with wrong values - // cshmap->forceStat (parent->shmap->max_f, parent->shmap->min_f, parent->shmap->avg); - // } - // } - - - // shadows & highlights & tone curve & convert to cielab - /*int xref,yref; - xref=000;yref=000; - if (colortest && cropw>115 && croph>115) - for(int j=1;j<5;j++){ - xref+=j*30;yref+=j*30; - if (settings->verbose) printf("before rgbProc RGB Xr%i Yr%i Skip=%d R=%f G=%f B=%f gamma=%f \n",xref,yref,skip, - baseCrop->r[(int)(xref/skip)][(int)(yref/skip)]/256, - baseCrop->g[(int)(xref/skip)][(int)(yref/skip)]/256, - baseCrop->b[(int)(xref/skip)][(int)(yref/skip)]/256, - parent->imgsrc->getGamma()); - }*/ - if (todo & M_RGBCURVE) { double rrm, ggm, bbm; DCPProfile::ApplyState as; DCPProfile *dcpProf = parent->imgsrc->getDCP (params.icm, as); LUTu histToneCurve; - parent->ipf.rgbProc (baseCrop, laboCrop, this, parent->hltonecurve, parent->shtonecurve, parent->tonecurve, cshmap, + parent->ipf.rgbProc (baseCrop, laboCrop, this, parent->hltonecurve, parent->shtonecurve, parent->tonecurve, params.toneCurve.saturation, parent->rCurve, parent->gCurve, parent->bCurve, parent->colourToningSatLimit, parent->colourToningSatLimitOpacity, parent->ctColorCurve, parent->ctOpacityCurve, parent->opautili, parent->clToningcurve, parent->cl2Toningcurve, parent->customToneCurve1, parent->customToneCurve2, parent->beforeToneCurveBW, parent->afterToneCurveBW, rrm, ggm, bbm, parent->bwAutoR, parent->bwAutoG, parent->bwAutoB, dcpProf, as, histToneCurve); @@ -1126,11 +1092,6 @@ void Crop::freeAll () cbuffer = nullptr; } - if (cshmap ) { - delete cshmap; - cshmap = nullptr; - } - PipetteBuffer::flush(); } @@ -1318,11 +1279,6 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte delete [] cbuf_real; } - if (cshmap ) { - delete cshmap; - cshmap = nullptr; - } - cbuffer = new float*[croph]; cbuf_real = new float[ (croph + 2)*cropw]; @@ -1330,10 +1286,6 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte cbuffer[i] = cbuf_real + cropw * i + cropw; } - // if (params.sh.enabled) { - // cshmap = new SHMap (cropw, croph, true); - // } - if (editType == ET_PIPETTE) { PipetteBuffer::resize (cropw, croph); } else if (PipetteBuffer::bufferCreated()) { diff --git a/rtengine/dcrop.h b/rtengine/dcrop.h index fcdfcf001..7ec346d3c 100644 --- a/rtengine/dcrop.h +++ b/rtengine/dcrop.h @@ -45,7 +45,6 @@ protected: LabImage* labnCrop; // "one chunk" allocation Image8* cropImg; // "one chunk" allocation ; displayed image in monitor color space, showing the output profile as well (soft-proofing enabled, which then correspond to workimg) or not float * cbuf_real; // "one chunk" allocation - SHMap* cshmap; // per line allocation // --- automatically allocated and deleted when necessary, and only renewed on size changes Imagefloat* transCrop; // "one chunk" allocation, allocated if necessary diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 2f657b884..f39fe3415 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -34,7 +34,7 @@ extern const Settings* settings; ImProcCoordinator::ImProcCoordinator () : orig_prev (nullptr), oprevi (nullptr), oprevl (nullptr), nprevl (nullptr), fattal_11_dcrop_cache(nullptr), previmg (nullptr), workimg (nullptr), - ncie (nullptr), imgsrc (nullptr), shmap (nullptr), lastAwbEqual (0.), lastAwbTempBias (0.0), ipf (¶ms, true), monitorIntent (RI_RELATIVE), + ncie (nullptr), imgsrc (nullptr), lastAwbEqual (0.), lastAwbTempBias (0.0), ipf (¶ms, true), monitorIntent (RI_RELATIVE), softProof (false), gamutCheck (false), scale (10), highDetailPreprocessComputed (false), highDetailRawComputed (false), allocated (false), bwAutoR (-9000.f), bwAutoG (-9000.f), bwAutoB (-9000.f), CAMMean (NAN), @@ -415,23 +415,6 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) readyphase++; progress ("Preparing shadow/highlight map...", 100 * readyphase / numofphases); - // if ((todo & M_BLURMAP) && params.sh.enabled) { - // double radius = sqrt (double (pW * pW + pH * pH)) / 2.0; - // double shradius = params.sh.radius; - - // if (!params.sh.hq) { - // shradius *= radius / 1800.0; - // } - - // if (!shmap) { - // shmap = new SHMap (pW, pH, true); - // } - - // shmap->update (oprevi, shradius, ipf.lumimul, params.sh.hq, scale); - // } - - - readyphase++; if (todo & M_AUTOEXP) { @@ -566,7 +549,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) DCPProfile::ApplyState as; DCPProfile *dcpProf = imgsrc->getDCP (params.icm, as); - ipf.rgbProc (oprevi, oprevl, nullptr, hltonecurve, shtonecurve, tonecurve, shmap, params.toneCurve.saturation, + ipf.rgbProc (oprevi, oprevl, nullptr, hltonecurve, shtonecurve, tonecurve, params.toneCurve.saturation, rCurve, gCurve, bCurve, colourToningSatLimit, colourToningSatLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, beforeToneCurveBW, afterToneCurveBW, rrm, ggm, bbm, bwAutoR, bwAutoG, bwAutoB, params.toneCurve.expcomp, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh, dcpProf, as, histToneCurve); if (params.blackwhite.enabled && params.blackwhite.autoc && abwListener) { @@ -910,12 +893,6 @@ void ImProcCoordinator::freeAll () delete workimg; - if (shmap) { - delete shmap; - } - - shmap = nullptr; - } allocated = false; @@ -966,10 +943,6 @@ void ImProcCoordinator::setScale (int prevscale) previmg = new Image8 (pW, pH); workimg = new Image8 (pW, pH); - // if (params.sh.enabled) { - // shmap = new SHMap (pW, pH, true); - // } - allocated = true; } diff --git a/rtengine/improccoordinator.h b/rtengine/improccoordinator.h index ab599bfb3..ada7ed754 100644 --- a/rtengine/improccoordinator.h +++ b/rtengine/improccoordinator.h @@ -64,8 +64,6 @@ protected: ImageSource* imgsrc; - SHMap* shmap; - ColorTemp currWB; ColorTemp autoWB; diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 30c1a75ca..23b724b2b 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -2007,15 +2007,15 @@ filmlike_clip (float *r, float *g, float *b) } void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, - SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clToningcurve, LUTf & cl2Toningcurve, + int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clToningcurve, LUTf & cl2Toningcurve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve ) { - rgbProc (working, lab, pipetteBuffer, hltonecurve, shtonecurve, tonecurve, shmap, sat, rCurve, gCurve, bCurve, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, params->toneCurve.expcomp, params->toneCurve.hlcompr, params->toneCurve.hlcomprthresh, dcpProf, asIn, histToneCurve); + rgbProc (working, lab, pipetteBuffer, hltonecurve, shtonecurve, tonecurve, sat, rCurve, gCurve, bCurve, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, params->toneCurve.expcomp, params->toneCurve.hlcompr, params->toneCurve.hlcomprthresh, dcpProf, asIn, histToneCurve); } // Process RGB image and convert to LAB space void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, - SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clToningcurve, LUTf & cl2Toningcurve, + int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clToningcurve, LUTf & cl2Toningcurve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, double expcomp, int hlcompr, int hlcomprthresh, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve ) { BENCHFUN @@ -2040,15 +2040,6 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } } - int h_th = 0, s_th = 0; - - if (shmap) { - h_th = shmap->max_f - params->sh.htonalwidth * (shmap->max_f - shmap->avg) / 100; - s_th = params->sh.stonalwidth * (shmap->avg - shmap->min_f) / 100; - } - - bool processSH = false; //params->sh.enabled && shmap && (params->sh.highlights > 0 || params->sh.shadows > 0); - TMatrix wprof = ICCStore::getInstance()->workingSpaceMatrix (params->icm.working); TMatrix wiprof = ICCStore::getInstance()->workingSpaceInverseMatrix (params->icm.working); @@ -2273,8 +2264,6 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float chMixBG = float (params->chmixer.blue[1]); float chMixBB = float (params->chmixer.blue[2]); - int shHighlights = params->sh.highlights; - int shShadows = params->sh.shadows; bool blackwhite = params->blackwhite.enabled; bool complem = params->blackwhite.enabledcc; float bwr = float (params->blackwhite.mixerRed); @@ -2437,31 +2426,6 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } } - // if (processSH) { - // for (int i = istart, ti = 0; i < tH; i++, ti++) { - // for (int j = jstart, tj = 0; j < tW; j++, tj++) { - - // float r = rtemp[ti * TS + tj]; - // float g = gtemp[ti * TS + tj]; - // float b = btemp[ti * TS + tj]; - - - // float mapval = 1.f + shmap->map[i][j]; - // float factor = 1.f; - - // if (mapval > h_th) { - // factor = (h_th + (100.0 - shHighlights) * (mapval - h_th) / 100.0) / mapval; - // } else if (mapval < s_th) { - // factor = (s_th - (100.0 - shShadows) * (s_th - mapval) / 100.0) / mapval; - // } - - // rtemp[ti * TS + tj] = factor * r; - // gtemp[ti * TS + tj] = factor * g; - // btemp[ti * TS + tj] = factor * b; - // } - // } - // } - highlightToneCurve(hltonecurve, rtemp, gtemp, btemp, istart, tH, jstart, tW, TS, exp_scale, comp, hlrange); shadowToneCurve(shtonecurve, rtemp, gtemp, btemp, istart, tH, jstart, tW, TS); diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index ab96a2d2d..ae6e3bcaa 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -208,10 +208,10 @@ public: void firstAnalysis (const Imagefloat* const working, const ProcParams ¶ms, LUTu & vhist16); void updateColorProfiles (const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck); void rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, - SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, + int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve ); void rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, - SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, + int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, double expcomp, int hlcompr, int hlcomprthresh, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve); void labtoning (float r, float g, float b, float &ro, float &go, float &bo, int algm, int metchrom, int twoc, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, LUTf & clToningcurve, LUTf & cl2Toningcurve, float iplow, float iphigh, double wp[3][3], double wip[3][3] ); diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index eb8f29d07..5c8940017 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -1487,11 +1487,10 @@ bool FattalToneMappingParams::operator !=(const FattalToneMappingParams& other) SHParams::SHParams() : enabled(false), - hq(false), highlights(0), - htonalwidth(80), + htonalwidth(70), shadows(0), - stonalwidth(80), + stonalwidth(30), radius(40) { } @@ -1500,7 +1499,6 @@ bool SHParams::operator ==(const SHParams& other) const { return enabled == other.enabled - && hq == other.hq && highlights == other.highlights && htonalwidth == other.htonalwidth && shadows == other.shadows @@ -3061,7 +3059,6 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo // Shadows & highlights saveToKeyfile(!pedited || pedited->sh.enabled, "Shadows & Highlights", "Enabled", sh.enabled, keyFile); - saveToKeyfile(!pedited || pedited->sh.hq, "Shadows & Highlights", "HighQuality", sh.hq, keyFile); saveToKeyfile(!pedited || pedited->sh.highlights, "Shadows & Highlights", "Highlights", sh.highlights, keyFile); saveToKeyfile(!pedited || pedited->sh.htonalwidth, "Shadows & Highlights", "HighlightTonalWidth", sh.htonalwidth, keyFile); saveToKeyfile(!pedited || pedited->sh.shadows, "Shadows & Highlights", "Shadows", sh.shadows, keyFile); @@ -3963,7 +3960,6 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) if (keyFile.has_group ("Shadows & Highlights")) { assignFromKeyfile(keyFile, "Shadows & Highlights", "Enabled", pedited, sh.enabled, pedited->sh.enabled); - assignFromKeyfile(keyFile, "Shadows & Highlights", "HighQuality", pedited, sh.hq, pedited->sh.hq); assignFromKeyfile(keyFile, "Shadows & Highlights", "Highlights", pedited, sh.highlights, pedited->sh.highlights); assignFromKeyfile(keyFile, "Shadows & Highlights", "HighlightTonalWidth", pedited, sh.htonalwidth, pedited->sh.htonalwidth); assignFromKeyfile(keyFile, "Shadows & Highlights", "Shadows", pedited, sh.shadows, pedited->sh.shadows); @@ -3971,7 +3967,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Shadows & Highlights", "Radius", pedited, sh.radius, pedited->sh.radius); if (keyFile.has_key("Shadows & Highlights", "LocalContrast") && ppVersion < 329) { int lc = keyFile.get_integer("Shadows & Highlights", "LocalContrast"); - localContrast.amount = float(lc) / (sh.hq ? 500.0 : 30.); + localContrast.amount = float(lc) / 30.; if (pedited) { pedited->localContrast.amount = true; } diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 2cfc777b8..9868d15e3 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -742,7 +742,6 @@ struct FattalToneMappingParams { */ struct SHParams { bool enabled; - bool hq; int highlights; int htonalwidth; int shadows; diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index b57f3ae50..3c2d3e6f5 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -1184,21 +1184,6 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT baseImg = trImg; } - // update blurmap - SHMap* shmap = nullptr; - - // if (params.sh.enabled) { - // shmap = new SHMap (fw, fh, false); - // double radius = sqrt (double (fw * fw + fh * fh)) / 2.0; - // double shradius = params.sh.radius; - - // if (!params.sh.hq) { - // shradius *= radius / 1800.0; - // } - - // shmap->update (baseImg, shradius, ipf.lumimul, params.sh.hq, 16); - // } - // RGB processing double expcomp = params.toneCurve.expcomp; int bright = params.toneCurve.brightness; @@ -1308,7 +1293,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT } LUTu histToneCurve; - ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as, histToneCurve); + ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as, histToneCurve); // freeing up some memory customToneCurve1.Reset(); @@ -1318,10 +1303,6 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT customToneCurvebw1.Reset(); customToneCurvebw2.Reset(); - if (shmap) { - delete shmap; - } - // luminance histogram update if (params.labCurve.contrast != 0) { hist16.clear(); diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index cec3943d4..6a59241e1 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -881,21 +881,6 @@ private: ipf.lab2rgb (labcbdl, *baseImg, params.icm.working); } - // update blurmap - SHMap* shmap = nullptr; - - // if (params.sh.enabled) { - // shmap = new SHMap (fw, fh, true); - // double radius = sqrt (double (fw * fw + fh * fh)) / 2.0; - // double shradius = params.sh.radius; - - // if (!params.sh.hq) { - // shradius *= radius / 1800.0; - // } - - // shmap->update (baseImg, shradius, ipf.lumimul, params.sh.hq, 1); - // } - // RGB processing curve1 (65536); @@ -969,7 +954,7 @@ private: LUTu histToneCurve; - ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as, histToneCurve); + ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as, histToneCurve); if (settings->verbose) { printf ("Output image / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", autor, autog, autob); @@ -994,12 +979,6 @@ private: delete baseImg; baseImg = nullptr; - if (shmap) { - delete shmap; - } - - shmap = nullptr; - if (pl) { pl->setProgress (0.55); } diff --git a/rtgui/exportpanel.cc b/rtgui/exportpanel.cc index 144a107d5..75156b56b 100644 --- a/rtgui/exportpanel.cc +++ b/rtgui/exportpanel.cc @@ -51,7 +51,6 @@ ExportPanel::ExportPanel () : listener (nullptr) //bypass_colorDenoise = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_COLORDENOISE"))); bypass_defringe = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_DEFRINGE"))); bypass_dirpyrDenoise = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_DIRPYRDENOISE"))); - bypass_sh_hq = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_SH_HQ"))); bypass_dirpyrequalizer = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_DIRPYREQUALIZER"))); bypass_wavelet = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_EQUALIZER"))); bypass_raw_ccSteps = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_RAW_CCSTEPS"))); @@ -120,7 +119,6 @@ ExportPanel::ExportPanel () : listener (nullptr) //pack_start(*bypass_colorDenoise , Gtk::PACK_SHRINK, 4); bypass_box->pack_start (*bypass_defringe, Gtk::PACK_SHRINK, 4); bypass_box->pack_start (*bypass_dirpyrDenoise, Gtk::PACK_SHRINK, 4); - bypass_box->pack_start (*bypass_sh_hq, Gtk::PACK_SHRINK, 4); bypass_box->pack_start (*bypass_dirpyrequalizer, Gtk::PACK_SHRINK, 4); bypass_box->pack_start (*bypass_wavelet, Gtk::PACK_SHRINK, 4); @@ -206,7 +204,6 @@ ExportPanel::ExportPanel () : listener (nullptr) //bypass_colorDenoiseConn = bypass_colorDenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); bypass_defringeConn = bypass_defringe->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); bypass_dirpyrDenoiseConn = bypass_dirpyrDenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_sh_hqConn = bypass_sh_hq->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); bypass_dirpyrequalizerConn = bypass_dirpyrequalizer->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); bypass_waveletConn = bypass_wavelet->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); //bypass_raw_all_enhanceConn = bypass_raw_bayer_all_enhance->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); @@ -258,7 +255,6 @@ void ExportPanel::SaveSettingsAsDefault() //options.fastexport_bypass_colorDenoise = bypass_colorDenoise->get_active (); FE_OPT_STORE_ (options.fastexport_bypass_defringe, bypass_defringe->get_active ()); FE_OPT_STORE_ (options.fastexport_bypass_dirpyrDenoise, bypass_dirpyrDenoise->get_active ()); - FE_OPT_STORE_ (options.fastexport_bypass_sh_hq, bypass_sh_hq->get_active ()); FE_OPT_STORE_ (options.fastexport_bypass_dirpyrequalizer, bypass_dirpyrequalizer->get_active ()); FE_OPT_STORE_ (options.fastexport_bypass_wavelet, bypass_wavelet->get_active ()); //options.fastexport_bypass_raw_bayer_all_enhance = bypass_raw_all_enhance->get_active (); @@ -322,7 +318,6 @@ void ExportPanel::LoadDefaultSettings() //bypass_colorDenoise->set_active (options.fastexport_bypass_colorDenoise ); bypass_defringe->set_active (options.fastexport_bypass_defringe ); bypass_dirpyrDenoise->set_active (options.fastexport_bypass_dirpyrDenoise ); - bypass_sh_hq->set_active (options.fastexport_bypass_sh_hq ); bypass_dirpyrequalizer->set_active (options.fastexport_bypass_dirpyrequalizer ); bypass_wavelet->set_active (options.fastexport_bypass_wavelet ); //bypass_raw_bayer_all_enhance->set_active (options.fastexport_bypass_raw_bayer_all_enhance ); @@ -394,7 +389,6 @@ void ExportPanel::bypassALL_Toggled() //bypass_colorDenoiseConn.block (true); bypass_defringeConn.block (true); bypass_dirpyrDenoiseConn.block (true); - bypass_sh_hqConn.block (true); bypass_dirpyrequalizerConn.block (true); bypass_waveletConn.block (true); //bypass_raw_bayer_all_enhanceConn.block (true); @@ -417,7 +411,6 @@ void ExportPanel::bypassALL_Toggled() //bypass_colorDenoise->set_active(bypass_ALL->get_active()); bypass_defringe->set_active (bypass_ALL->get_active()); bypass_dirpyrDenoise->set_active (bypass_ALL->get_active()); - bypass_sh_hq->set_active (bypass_ALL->get_active()); bypass_dirpyrequalizer->set_active (bypass_ALL->get_active()); bypass_wavelet->set_active (bypass_ALL->get_active()); //bypass_raw_bayer_all_enhance->set_active(bypass_ALL->get_active()); @@ -438,7 +431,6 @@ void ExportPanel::bypassALL_Toggled() //bypass_colorDenoiseConn.block (false); bypass_defringeConn.block (false); bypass_dirpyrDenoiseConn.block (false); - bypass_sh_hqConn.block (false); bypass_dirpyrequalizerConn.block (false); bypass_waveletConn.block (false); //bypass_raw_bayer_all_enhanceConn.block (false); @@ -466,7 +458,6 @@ fastexport_bypass_lumaDenoise fastexport_bypass_colorDenoise fastexport_bypass_defringe fastexport_bypass_dirpyrDenoise -fastexport_bypass_sh_hq fastexport_bypass_dirpyrequalizer fastexport_raw_bayer_method fastexport_bypass_raw_bayer_all_enhance diff --git a/rtgui/exportpanel.h b/rtgui/exportpanel.h index be6c9b4e3..0bea30d22 100644 --- a/rtgui/exportpanel.h +++ b/rtgui/exportpanel.h @@ -48,7 +48,6 @@ protected: //Gtk::CheckButton* bypass_colorDenoise; Gtk::CheckButton* bypass_defringe; Gtk::CheckButton* bypass_dirpyrDenoise; - Gtk::CheckButton* bypass_sh_hq; /* icm_input = "(camera)"; icm_working = "sRGB"; @@ -88,7 +87,6 @@ protected: //sigc::connection bypass_colorDenoiseConn ; sigc::connection bypass_defringeConn ; sigc::connection bypass_dirpyrDenoiseConn ; - sigc::connection bypass_sh_hqConn ; sigc::connection bypass_dirpyrequalizerConn ; sigc::connection bypass_waveletConn ; //sigc::connection bypass_raw_bayer_all_enhanceConn ; diff --git a/rtgui/filecatalog.cc b/rtgui/filecatalog.cc index e23266e58..86c530661 100644 --- a/rtgui/filecatalog.cc +++ b/rtgui/filecatalog.cc @@ -1129,10 +1129,6 @@ void FileCatalog::developRequested (std::vector tbe, bool fas params.dirpyrDenoise.enabled = false; } - if (options.fastexport_bypass_sh_hq) { - params.sh.hq = false; - } - if (options.fastexport_bypass_dirpyrequalizer) { params.dirpyrequalizer.enabled = false; } diff --git a/rtgui/options.cc b/rtgui/options.cc index 46ea16549..1dbaa574e 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -447,7 +447,6 @@ void Options::setDefaults () //fastexport_bypass_colorDenoise = true; fastexport_bypass_defringe = true; fastexport_bypass_dirpyrDenoise = true; - fastexport_bypass_sh_hq = true; fastexport_bypass_dirpyrequalizer = true; fastexport_bypass_wavelet = true; fastexport_raw_bayer_method = "fast"; @@ -1538,10 +1537,6 @@ void Options::readFromFile (Glib::ustring fname) fastexport_bypass_dirpyrDenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_dirpyrDenoise" ); } - if (keyFile.has_key ("Fast Export", "fastexport_bypass_sh_hq" )) { - fastexport_bypass_sh_hq = keyFile.get_boolean ("Fast Export", "fastexport_bypass_sh_hq" ); - } - if (keyFile.has_key ("Fast Export", "fastexport_bypass_dirpyrequalizer" )) { fastexport_bypass_dirpyrequalizer = keyFile.get_boolean ("Fast Export", "fastexport_bypass_dirpyrequalizer" ); } @@ -2017,7 +2012,6 @@ void Options::saveToFile (Glib::ustring fname) //keyFile.set_boolean ("Fast Export", "fastexport_bypass_colorDenoise" , fastexport_bypass_colorDenoise); keyFile.set_boolean ("Fast Export", "fastexport_bypass_defringe", fastexport_bypass_defringe); keyFile.set_boolean ("Fast Export", "fastexport_bypass_dirpyrDenoise", fastexport_bypass_dirpyrDenoise); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_sh_hq", fastexport_bypass_sh_hq); keyFile.set_boolean ("Fast Export", "fastexport_bypass_dirpyrequalizer", fastexport_bypass_dirpyrequalizer); keyFile.set_boolean ("Fast Export", "fastexport_bypass_wavelet", fastexport_bypass_wavelet); keyFile.set_string ("Fast Export", "fastexport_raw_bayer_method", fastexport_raw_bayer_method); diff --git a/rtgui/options.h b/rtgui/options.h index 920968956..25fa31b6d 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -295,7 +295,6 @@ public: //bool fastexport_bypass_colorDenoise; bool fastexport_bypass_defringe; bool fastexport_bypass_dirpyrDenoise; - bool fastexport_bypass_sh_hq; bool fastexport_bypass_dirpyrequalizer; bool fastexport_bypass_wavelet; Glib::ustring fastexport_raw_bayer_method; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index cf61c8aad..a6fa62357 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -283,7 +283,6 @@ void ParamsEdited::set (bool v) fattal.amount = v; fattal.anchor = v; sh.enabled = v; - sh.hq = v; sh.highlights = v; sh.htonalwidth = v; sh.shadows = v; @@ -849,7 +848,6 @@ void ParamsEdited::initFrom (const std::vector fattal.anchor = fattal.anchor && p.fattal.anchor == other.fattal.anchor; sh.enabled = sh.enabled && p.sh.enabled == other.sh.enabled; - sh.hq = sh.hq && p.sh.hq == other.sh.hq; sh.highlights = sh.highlights && p.sh.highlights == other.sh.highlights; sh.htonalwidth = sh.htonalwidth && p.sh.htonalwidth == other.sh.htonalwidth; sh.shadows = sh.shadows && p.sh.shadows == other.sh.shadows; @@ -2088,10 +2086,6 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.sh.enabled = mods.sh.enabled; } - if (sh.hq) { - toEdit.sh.hq = mods.sh.hq; - } - if (sh.highlights) { toEdit.sh.highlights = dontforceSet && options.baBehav[ADDSET_SH_HIGHLIGHTS] ? toEdit.sh.highlights + mods.sh.highlights : mods.sh.highlights; } diff --git a/rtgui/shadowshighlights.cc b/rtgui/shadowshighlights.cc index 8c701dae6..f450205bb 100644 --- a/rtgui/shadowshighlights.cc +++ b/rtgui/shadowshighlights.cc @@ -23,22 +23,15 @@ using namespace rtengine::procparams; ShadowsHighlights::ShadowsHighlights () : FoldableToolPanel(this, "shadowshighlights", M("TP_SHADOWSHLIGHTS_LABEL"), false, true) { - - hq = Gtk::manage (new Gtk::CheckButton (M("TP_SHADOWSHLIGHTS_SHARPMASK"))); - hq->set_active (false); - pack_start (*hq); - hqConn = hq->signal_toggled().connect( sigc::mem_fun(*this, &ShadowsHighlights::hqChanged) ); - - pack_start (*Gtk::manage (new Gtk::HSeparator())); highlights = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_HIGHLIGHTS"), 0, 100, 1, 0)); - h_tonalwidth = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_HLTONALW"), 10, 100, 1, 80)); + h_tonalwidth = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_HLTONALW"), 10, 100, 1, 70)); pack_start (*highlights); pack_start (*h_tonalwidth); pack_start (*Gtk::manage (new Gtk::HSeparator())); shadows = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_SHADOWS"), 0, 100, 1, 0)); - s_tonalwidth = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_SHTONALW"), 10, 100, 1, 80)); + s_tonalwidth = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_SHTONALW"), 10, 100, 1, 30)); pack_start (*shadows); pack_start (*s_tonalwidth); @@ -68,17 +61,10 @@ void ShadowsHighlights::read (const ProcParams* pp, const ParamsEdited* pedited) shadows->setEditedState (pedited->sh.shadows ? Edited : UnEdited); s_tonalwidth->setEditedState (pedited->sh.stonalwidth ? Edited : UnEdited); set_inconsistent (multiImage && !pedited->sh.enabled); - hq->set_inconsistent (!pedited->sh.hq); } setEnabled (pp->sh.enabled); - hqConn.block (true); - hq->set_active (pp->sh.hq); - hqConn.block (false); - - lastHQ = pp->sh.hq; - radius->setValue (pp->sh.radius); highlights->setValue (pp->sh.highlights); h_tonalwidth->setValue (pp->sh.htonalwidth); @@ -97,7 +83,6 @@ void ShadowsHighlights::write (ProcParams* pp, ParamsEdited* pedited) pp->sh.shadows = (int)shadows->getValue (); pp->sh.stonalwidth = (int)s_tonalwidth->getValue (); pp->sh.enabled = getEnabled(); - pp->sh.hq = hq->get_active(); if (pedited) { pedited->sh.radius = radius->getEditedState (); @@ -106,7 +91,6 @@ void ShadowsHighlights::write (ProcParams* pp, ParamsEdited* pedited) pedited->sh.shadows = shadows->getEditedState (); pedited->sh.stonalwidth = s_tonalwidth->getEditedState (); pedited->sh.enabled = !get_inconsistent(); - pedited->sh.hq = !hq->get_inconsistent(); } } @@ -169,31 +153,6 @@ void ShadowsHighlights::enabledChanged () } } -void ShadowsHighlights::hqChanged () -{ - - if (batchMode) { - if (hq->get_inconsistent()) { - hq->set_inconsistent (false); - hqConn.block (true); - hq->set_active (false); - hqConn.block (false); - } else if (lastHQ) { - hq->set_inconsistent (true); - } - - lastHQ = hq->get_active (); - } - - if (listener) { - if (hq->get_active()) { - listener->panelChanged (EvSHHighQuality, M("GENERAL_ENABLED")); - } else { - listener->panelChanged (EvSHHighQuality, M("GENERAL_DISABLED")); - } - } -} - void ShadowsHighlights::setBatchMode (bool batchMode) { diff --git a/rtgui/shadowshighlights.h b/rtgui/shadowshighlights.h index de3f893d5..96642bfc0 100644 --- a/rtgui/shadowshighlights.h +++ b/rtgui/shadowshighlights.h @@ -32,9 +32,6 @@ protected: Adjuster* shadows; Adjuster* s_tonalwidth; Adjuster* radius; - Gtk::CheckButton* hq; - bool lastHQ; - sigc::connection hqConn; public: @@ -47,7 +44,6 @@ public: void adjusterChanged (Adjuster* a, double newval); void enabledChanged (); - void hqChanged (); void setAdjusterBehavior (bool hadd, bool sadd); void trimValues (rtengine::procparams::ProcParams* pp);