diff --git a/rtengine/CMakeLists.txt b/rtengine/CMakeLists.txt index cf3d8c8b6..fc5ac236e 100644 --- a/rtengine/CMakeLists.txt +++ b/rtengine/CMakeLists.txt @@ -56,7 +56,6 @@ set(RTENGINESOURCEFILES dual_demosaic_RT.cc dynamicprofile.cc eahd_demosaic.cc - expo_before_b.cc fast_demo.cc ffmanager.cc flatcurves.cc diff --git a/rtengine/expo_before_b.cc b/rtengine/expo_before_b.cc deleted file mode 100644 index cd5e77df5..000000000 --- a/rtengine/expo_before_b.cc +++ /dev/null @@ -1,187 +0,0 @@ - -//////////////////////////////////////////////////////////////// -// -// //exposure correction before interpolation -// -// code dated: December 27, 2010 -// -// Expo_before.cc is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -// -//////////////////////////////////////////////////////////////// - - - -// Jacques Desmis -// use fast-demo(provisional) from Emil Martinec -// inspired from work Guillermo Luijk and Manuel LLorens(Perfectraw) -// Ingo Weyrich (2014-07-07) -// optimized the highlight protection case -// needs 2*width*height*sizeof(float) byte less memory than before -// needs about 60% less processing time than before -// -// This function uses parameters: -// exposure (linear): 2^(-8..0..8): currently 0.5 +3 -// preserve (log) : 0..8 : currently 0.1 1 - -#include "rtengine.h" -#include "rawimagesource.h" -#include "mytime.h" -#include "rt_math.h" - -namespace rtengine -{ - -extern const Settings* settings; - -void RawImageSource::processRawWhitepoint(float expos, float preser, array2D &rawData) -{ - MyTime t1e, t2e; - - if (settings->verbose) { - t1e.set(); - } - - int width = W, height = H; - // exposure correction inspired from G.Luijk - - for (int c = 0; c < 4; c++) { - chmax[c] *= expos; - } - - if (fabs(preser) < 0.001f) { - // No highlight protection - simple mutiplication - - if (ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS) -#ifdef _OPENMP - #pragma omp parallel for -#endif - for (int row = 0; row < height; row++) - for (int col = 0; col < width; col++) { - rawData[row][col] *= expos; - } - else -#ifdef _OPENMP - #pragma omp parallel for -#endif - for (int row = 0; row < height; row++) - for (int col = 0; col < width; col++) { - rawData[row][col * 3] *= expos; - rawData[row][col * 3 + 1] *= expos; - rawData[row][col * 3 + 2] *= expos; - } - } else { - if (ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS) { - // Demosaic to allow calculation of luminosity. - if(ri->getSensorType() == ST_BAYER) { - fast_demosaic(); - } else { - fast_xtrans_interpolate(rawData, red, green, blue); - } - } - - // Find maximum to adjust LUTs. New float engines clips only at the very end - float maxValFloat = 0.f; -#ifdef _OPENMP - #pragma omp parallel -#endif - { - float maxValFloatThr = 0.f; - - if (ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS) -#ifdef _OPENMP - #pragma omp for schedule(dynamic,16) nowait -#endif - for(int row = 0; row < height; row++) - for (int col = 0; col < width; col++) { - if (rawData[row][col] > maxValFloatThr) { - maxValFloatThr = rawData[row][col]; - } - } - else -#ifdef _OPENMP - #pragma omp for schedule(dynamic,16) nowait -#endif - for(int row = 0; row < height; row++) - for (int col = 0; col < width; col++) { - for (int c = 0; c < 3; c++) - if (rawData[row][col * 3 + c] > maxValFloatThr) { - maxValFloatThr = rawData[row][col * 3 + c]; - } - } - -#ifdef _OPENMP - #pragma omp critical -#endif - { - if(maxValFloatThr > maxValFloat) { - maxValFloat = maxValFloatThr; - } - } - } - - // Exposure correction with highlight preservation - int maxVal = maxValFloat; - LUTf lut(maxVal + 1); - float K; - - if(expos > 1) { - // Positive exposure - K = (float) maxVal / expos * exp(-preser * log(2.0)); - - for (int j = max(1, (int)K); j <= maxVal; j++) { - lut[(int)j] = (((float)maxVal - K * expos) / ((float)maxVal - K) * (j - maxVal) + (float) maxVal) / j; - } - } else { - // Negative exposure - float EV = log(expos) / log(2.0); // Convert exp. linear to EV - K = (float)maxVal * exp(-preser * log(2.0)); - - for (int j = 0; j <= maxVal; j++) { - lut[(int)j] = exp(EV * ((float)maxVal - j) / ((float)maxVal - K) * log(2.0)); - } - } - - if (ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS) -#ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) -#endif - for(int row = 0; row < height; row++) - for(int col = 0; col < width; col++) { - float lumi = 0.299f * red[row][col] + 0.587f * green[row][col] + 0.114f * blue[row][col]; - rawData[row][col] *= lumi < K ? expos : lut[lumi]; - } - else -#ifdef _OPENMP - #pragma omp parallel for -#endif - for(int row = 0; row < height; row++) - for(int col = 0; col < width; col++) { - float lumi = 0.299f * rawData[row][col * 3] + 0.587f * rawData[row][col * 3 + 1] + 0.114f * rawData[row][col * 3 + 2]; - float fac = lumi < K ? expos : lut[lumi]; - - for (int c = 0; c < 3; c++) { - rawData[row][col * 3 + c] *= fac; - } - } - - } - - if (settings->verbose) { - t2e.set(); - printf("Exposure before %d usec\n", t2e.etime(t1e)); - } - -} - -} //namespace diff --git a/rtengine/procevents.h b/rtengine/procevents.h index a35a709f9..95144aec0 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -70,10 +70,10 @@ enum ProcEventCode { EvToneCurveMode1 = 40, EvToneCurve2 = 41, EvToneCurveMode2 = 42, - EvLDNRadius = 43, // obsolete - EvLDNEdgeTolerance = 44, // obsolete - EvCDNEnabled = 45, // obsolete - EvBlendCMSMatrix = 46, // obsolete + obsolete_43 = 43, // obsolete + obsolete_44 = 44, // obsolete + obsolete_45 = 45, // obsolete + obsolete_46 = 46, // obsolete EvDCPToneCurve = 47, EvDCPIlluminant = 48, EvSHEnabled = 49, @@ -93,7 +93,7 @@ enum ProcEventCode { EvCrop = 63, EvCACorr = 64, EvHREnabled = 65, - EvHRAmount = 66, //obsolete + obsolete_66 = 66, //obsolete EvHRMethod = 67, EvWProfile = 68, EvOProfile = 69, @@ -138,7 +138,7 @@ enum ProcEventCode { EvResizeBoundingBox = 108, EvResizeAppliesTo = 109, EvLAvoidColorShift = 110, - EvLSatLimiter = 111, // obsolete + obsolete_111 = 111, // obsolete EvLRSTProtection = 112, EvDemosaicDCBIter = 113, EvDemosaicFalseColorIter = 114, @@ -151,7 +151,7 @@ enum ProcEventCode { EvPreProcessAutoDF = 121, EvPreProcessDFFile = 122, EvPreProcessExpCorrLinear = 123, - EvPreProcessExpCorrPH = 124, + obsolete_124 = 124, // obsolete EvFlatFieldFile = 125, EvFlatFieldAutoSelect = 126, EvFlatFieldBlurRadius = 127, diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index fe4512691..33ea7e5cc 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2665,7 +2665,6 @@ RAWParams::RAWParams() : cared(0.0), cablue(0.0), expos(1.0), - preser(0.0), hotPixelFilter(false), deadPixelFilter(false), hotdeadpix_thresh(100) @@ -2691,7 +2690,6 @@ bool RAWParams::operator ==(const RAWParams& other) const && cared == other.cared && cablue == other.cablue && expos == other.expos - && preser == other.preser && hotPixelFilter == other.hotPixelFilter && deadPixelFilter == other.deadPixelFilter && hotdeadpix_thresh == other.hotdeadpix_thresh; @@ -3561,7 +3559,6 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo // Raw exposition saveToKeyfile(!pedited || pedited->raw.exPos, "RAW", "PreExposure", raw.expos, keyFile); - saveToKeyfile(!pedited || pedited->raw.exPreser, "RAW", "PrePreserv", raw.preser, keyFile); // MetaData saveToKeyfile(!pedited || pedited->metadata.mode, "MetaData", "Mode", metadata.mode, keyFile); @@ -4991,7 +4988,6 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "RAW", "DeadPixelFilter", pedited, raw.deadPixelFilter, pedited->raw.deadPixelFilter); assignFromKeyfile(keyFile, "RAW", "HotDeadPixelThresh", pedited, raw.hotdeadpix_thresh, pedited->raw.hotdeadpix_thresh); assignFromKeyfile(keyFile, "RAW", "PreExposure", pedited, raw.expos, pedited->raw.exPos); - assignFromKeyfile(keyFile, "RAW", "PrePreserv", pedited, raw.preser, pedited->raw.exPreser); if (ppVersion < 320) { assignFromKeyfile(keyFile, "RAW", "Method", pedited, raw.bayersensor.method, pedited->raw.bayersensor.method); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 50e77d32e..d79fc5ae4 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1411,7 +1411,6 @@ struct RAWParams { // exposure before interpolation double expos; - double preser; bool hotPixelFilter; bool deadPixelFilter; diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 79922adbd..6dbeea643 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -428,7 +428,6 @@ RawImageSource::RawImageSource () , plistener(nullptr) , scale_mul{} , c_black{} - , c_white{} , cblacksom{} , ref_pre_mul{} , refwb_red(0.0) @@ -637,6 +636,11 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima bool isMono = (ri->getSensorType() == ST_FUJI_XTRANS && raw.xtranssensor.method == RAWParams::XTransSensor::getMethodString(RAWParams::XTransSensor::Method::MONO)) || (ri->getSensorType() == ST_BAYER && raw.bayersensor.method == RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::MONO)); + + for (int i = 0; i < 4; ++i) { + c_white[i] = (ri->get_white(i) - cblacksom[i]) / raw.expos + cblacksom[i]; + } + float gain = calculate_scale_mul(new_scale_mul, new_pre_mul, c_white, cblacksom, isMono, ri->get_colors()); rm = new_scale_mul[0] / scale_mul[0] * gain; gm = new_scale_mul[1] / scale_mul[1] * gain; @@ -1616,10 +1620,6 @@ int RawImageSource::load (const Glib::ustring &fname, bool firstFrameOnly) camProfile = ICCStore::getInstance()->createFromMatrix (imatrices.xyz_cam, false, "Camera"); inverse33 (imatrices.xyz_cam, imatrices.cam_xyz); - for (int c = 0; c < 4; c++) { - c_white[c] = ri->get_white(c); - } - // First we get the "as shot" ("Camera") white balance and store it float pre_mul[4]; // FIXME: get_colorsCoeff not so much used nowadays, when we have calculate_scale_mul() function here @@ -2041,16 +2041,6 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le } } - if ( raw.expos != 1 ) { - if(numFrames == 4) { - for(int i = 0; i < 4; ++i) { - processRawWhitepoint(raw.expos, raw.preser, *rawDataFrames[i]); - } - } else { - processRawWhitepoint(raw.expos, raw.preser, rawData); - } - } - if(prepareDenoise && dirpyrdenoiseExpComp == INFINITY) { LUTu aehist; int aehistcompr; @@ -3532,6 +3522,11 @@ void RawImageSource::scaleColors(int winx, int winy, int winw, int winh, const R cblacksom[i] = max( c_black[i] + black_lev[i], 0.0f ); // adjust black level } + c_white[0] = (ri->get_white(0) - cblacksom[0]) / raw.expos + cblacksom[0]; + c_white[1] = (ri->get_white(1) - cblacksom[1]) / raw.expos + cblacksom[1]; + c_white[2] = (ri->get_white(2) - cblacksom[2]) / raw.expos + cblacksom[2]; + c_white[3] = (ri->get_white(3) - cblacksom[3]) / raw.expos + cblacksom[3]; + initialGain = calculate_scale_mul(scale_mul, ref_pre_mul, c_white, cblacksom, isMono, ri->get_colors()); // recalculate scale colors with adjusted levels //fprintf(stderr, "recalc: %f [%f %f %f %f]\n", initialGain, scale_mul[0], scale_mul[1], scale_mul[2], scale_mul[3]); @@ -4736,13 +4731,13 @@ void RawImageSource::getRAWHistogram (LUTu & histRedRaw, LUTu & histGreenRaw, LU histGreenRaw.clear(); histBlueRaw.clear(); - const float maxWhite = rtengine::max(ri->get_white(0), ri->get_white(1), ri->get_white(2), ri->get_white(3)); + const float maxWhite = rtengine::max(c_white[0], c_white[1], c_white[2], c_white[3]); const float scale = maxWhite <= 1.f ? 65535.f : 1.f; // special case for float raw images in [0.0;1.0] range const float multScale = maxWhite <= 1.f ? 1.f / 255.f : 255.f; - const float mult[4] = { multScale / (ri->get_white(0) - cblacksom[0]), - multScale / (ri->get_white(1) - cblacksom[1]), - multScale / (ri->get_white(2) - cblacksom[2]), - multScale / (ri->get_white(3) - cblacksom[3]) + const float mult[4] = { multScale / (c_white[0] - cblacksom[0]), + multScale / (c_white[1] - cblacksom[1]), + multScale / (c_white[2] - cblacksom[2]), + multScale / (c_white[3] - cblacksom[3]) }; const bool fourColours = ri->getSensorType() == ST_BAYER && ((mult[1] != mult[3] || cblacksom[1] != cblacksom[3]) || FC(0, 0) == 3 || FC(0, 1) == 3 || FC(1, 0) == 3 || FC(1, 1) == 3); diff --git a/rtengine/rawimagesource.h b/rtengine/rawimagesource.h index 2c83b9bd3..acf2deccb 100644 --- a/rtengine/rawimagesource.h +++ b/rtengine/rawimagesource.h @@ -252,7 +252,6 @@ protected: bool freeBuffer ); void ddct8x8s(int isgn, float a[8][8]); - void processRawWhitepoint (float expos, float preser, array2D &rawData); // exposure before interpolation int interpolateBadPixelsBayer( PixelsMap &bitmapBads, array2D &rawData ); int interpolateBadPixelsNColours( PixelsMap &bitmapBads, const int colours ); diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 89ddbceb2..7a5214d75 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -151,7 +151,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = { DARKFRAME, // EvPreProcessAutoDF DARKFRAME, // EvPreProcessDFFile DARKFRAME, // EvPreProcessExpCorrLinear - DARKFRAME, // EvPreProcessExpCorrPH + 0, // --unused-- FLATFIELD, // EvFlatFieldFile, FLATFIELD, // EvFlatFieldAutoSelect, FLATFIELD, // EvFlatFieldBlurRadius, diff --git a/rtgui/addsetids.h b/rtgui/addsetids.h index 86361b720..163bc27ef 100644 --- a/rtgui/addsetids.h +++ b/rtgui/addsetids.h @@ -42,7 +42,6 @@ enum { ADDSET_PREPROCESS_LINEDENOISE, ADDSET_RAWCACORR, ADDSET_RAWEXPOS_LINEAR, - ADDSET_RAWEXPOS_PRESER, ADDSET_RAWEXPOS_BLACKS, ADDSET_SHARPENEDGE_AMOUNT, ADDSET_SHARPENMICRO_AMOUNT, diff --git a/rtgui/batchtoolpanelcoord.cc b/rtgui/batchtoolpanelcoord.cc index db06ea59e..1a0eaeb28 100644 --- a/rtgui/batchtoolpanelcoord.cc +++ b/rtgui/batchtoolpanelcoord.cc @@ -172,7 +172,7 @@ void BatchToolPanelCoordinator::initSession () bayerpreprocess->setAdjusterBehavior (false, false); rawcacorrection->setAdjusterBehavior (false); flatfield->setAdjusterBehavior(false); - rawexposure->setAdjusterBehavior (false, false); + rawexposure->setAdjusterBehavior (false); bayerrawexposure->setAdjusterBehavior (false); xtransrawexposure->setAdjusterBehavior (false); } else { @@ -220,7 +220,7 @@ void BatchToolPanelCoordinator::initSession () bayerpreprocess->setAdjusterBehavior (options.baBehav[ADDSET_PREPROCESS_LINEDENOISE], options.baBehav[ADDSET_PREPROCESS_GREENEQUIL]); rawcacorrection->setAdjusterBehavior (options.baBehav[ADDSET_RAWCACORR]); flatfield->setAdjusterBehavior(options.baBehav[ADDSET_RAWFFCLIPCONTROL]); - rawexposure->setAdjusterBehavior (options.baBehav[ADDSET_RAWEXPOS_LINEAR], options.baBehav[ADDSET_RAWEXPOS_PRESER]); + rawexposure->setAdjusterBehavior (options.baBehav[ADDSET_RAWEXPOS_LINEAR]); bayerrawexposure->setAdjusterBehavior (options.baBehav[ADDSET_RAWEXPOS_BLACKS]); xtransrawexposure->setAdjusterBehavior (options.baBehav[ADDSET_RAWEXPOS_BLACKS]); @@ -352,7 +352,6 @@ void BatchToolPanelCoordinator::initSession () if (options.baBehav[ADDSET_DIRPYRDN_GAMMA]) { pparams.dirpyrDenoise.gamma = 0; } if (options.baBehav[ADDSET_RAWCACORR]) { pparams.raw.cablue = pparams.raw.cared = 0; } if (options.baBehav[ADDSET_RAWEXPOS_LINEAR]) { pparams.raw.expos = 0; } - if (options.baBehav[ADDSET_RAWEXPOS_PRESER]) { pparams.raw.preser = 0; } if (options.baBehav[ADDSET_RAWEXPOS_BLACKS]) { pparams.raw.bayersensor.black0 = pparams.raw.bayersensor.black1 = pparams.raw.bayersensor.black2 = pparams.raw.bayersensor.black3 = pparams.raw.xtranssensor.blackred = pparams.raw.xtranssensor.blackgreen = pparams.raw.xtranssensor.blackblue = 0; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 7f44c7738..5d7396f19 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -453,7 +453,6 @@ void ParamsEdited::set(bool v) raw.ff_AutoClipControl = v; raw.ff_clipControl = v; raw.exPos = v; - raw.exPreser = v; wavelet.enabled = v; wavelet.strength = v; wavelet.balance = v; @@ -1020,7 +1019,6 @@ void ParamsEdited::initFrom(const std::vector& raw.ff_AutoClipControl = raw.ff_AutoClipControl && p.raw.ff_AutoClipControl == other.raw.ff_AutoClipControl; raw.ff_clipControl = raw.ff_clipControl && p.raw.ff_clipControl == other.raw.ff_clipControl; raw.exPos = raw.exPos && p.raw.expos == other.raw.expos; - raw.exPreser = raw.exPreser && p.raw.preser == other.raw.preser; wavelet.enabled = wavelet.enabled && p.wavelet.enabled == other.wavelet.enabled; wavelet.strength = wavelet.strength && p.wavelet.strength == other.wavelet.strength; wavelet.balance = wavelet.balance && p.wavelet.balance == other.wavelet.balance; @@ -2694,10 +2692,6 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.raw.expos = dontforceSet && options.baBehav[ADDSET_RAWEXPOS_LINEAR] ? toEdit.raw.expos + mods.raw.expos : mods.raw.expos; } - if (raw.exPreser) { - toEdit.raw.preser = dontforceSet && options.baBehav[ADDSET_RAWEXPOS_PRESER] ? toEdit.raw.preser + mods.raw.preser : mods.raw.preser; - } - if (raw.hotPixelFilter) { toEdit.raw.hotPixelFilter = mods.raw.hotPixelFilter; } @@ -3200,7 +3194,7 @@ bool RAWParamsEdited::XTransSensor::isUnchanged() const bool RAWParamsEdited::isUnchanged() const { return bayersensor.isUnchanged() && xtranssensor.isUnchanged() && ca_autocorrect && ca_avoidcolourshift && caautoiterations && cared && cablue && hotPixelFilter && deadPixelFilter && hotdeadpix_thresh && darkFrame - && df_autoselect && ff_file && ff_AutoSelect && ff_BlurRadius && ff_BlurType && exPos && exPreser && ff_AutoClipControl && ff_clipControl; + && df_autoselect && ff_file && ff_AutoSelect && ff_BlurRadius && ff_BlurType && exPos && ff_AutoClipControl && ff_clipControl; } bool LensProfParamsEdited::isUnchanged() const diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 3e77fcf56..0bad2ab3c 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -818,7 +818,6 @@ public: bool ff_AutoClipControl; bool ff_clipControl; bool exPos; - bool exPreser; bool isUnchanged() const; }; diff --git a/rtgui/partialpastedlg.cc b/rtgui/partialpastedlg.cc index e0e6a7219..1f3ef8b77 100644 --- a/rtgui/partialpastedlg.cc +++ b/rtgui/partialpastedlg.cc @@ -120,7 +120,6 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren raw_pdaf_lines_filter = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PREPROCESS_PDAFLINESFILTER"))); //--- raw_expos = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWEXPOS_LINEAR"))); - raw_preser = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWEXPOS_PRESER"))); raw_black = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWEXPOS_BLACK"))); //--- df_file = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_DARKFRAMEFILE"))); @@ -236,7 +235,6 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren vboxes[7]->pack_start (*raw_pdaf_lines_filter, Gtk::PACK_SHRINK, 2); vboxes[7]->pack_start (*Gtk::manage (new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 0); vboxes[7]->pack_start (*raw_expos, Gtk::PACK_SHRINK, 2); - vboxes[7]->pack_start (*raw_preser, Gtk::PACK_SHRINK, 2); vboxes[7]->pack_start (*raw_black, Gtk::PACK_SHRINK, 2); vboxes[7]->pack_start (*Gtk::manage (new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 0); vboxes[7]->pack_start (*df_file, Gtk::PACK_SHRINK, 2); @@ -384,7 +382,6 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren raw_pdaf_lines_filterConn = raw_pdaf_lines_filter->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); //--- raw_exposConn = raw_expos->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); - raw_preserConn = raw_preser->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); raw_blackConn = raw_black->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); //--- df_fileConn = df_file->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); @@ -459,7 +456,6 @@ void PartialPasteDlg::rawToggled () ConnectionBlocker raw_deadpix_filtBlocker(raw_deadpix_filtConn); ConnectionBlocker raw_pdaf_lines_filterBlocker(raw_pdaf_lines_filterConn); ConnectionBlocker raw_exposBlocker(raw_exposConn); - ConnectionBlocker raw_preserBlocker(raw_preserConn); ConnectionBlocker raw_blackBlocker(raw_blackConn); ConnectionBlocker df_fileBlocker(df_fileConn); ConnectionBlocker df_AutoSelectBlocker(df_AutoSelectConn); @@ -488,7 +484,6 @@ void PartialPasteDlg::rawToggled () raw_deadpix_filt->set_active (raw->get_active ()); raw_pdaf_lines_filter->set_active (raw->get_active ()); raw_expos->set_active (raw->get_active ()); - raw_preser->set_active (raw->get_active ()); raw_black->set_active (raw->get_active ()); df_file->set_active (raw->get_active ()); df_AutoSelect->set_active (raw->get_active ()); @@ -911,10 +906,6 @@ void PartialPasteDlg::applyPaste (rtengine::procparams::ProcParams* dstPP, Param filterPE.raw.exPos = falsePE.raw.exPos; } - if (!raw_preser->get_active ()) { - filterPE.raw.exPreser = falsePE.raw.exPreser; - } - if (!raw_ca_autocorrect->get_active ()) { filterPE.raw.ca_autocorrect = falsePE.raw.ca_autocorrect; filterPE.raw.caautoiterations = falsePE.raw.caautoiterations; diff --git a/rtgui/partialpastedlg.h b/rtgui/partialpastedlg.h index f551ac134..dbcb912e3 100644 --- a/rtgui/partialpastedlg.h +++ b/rtgui/partialpastedlg.h @@ -102,7 +102,6 @@ public: // options in raw: Gtk::CheckButton* raw_expos; - Gtk::CheckButton* raw_preser; Gtk::CheckButton* raw_black; Gtk::CheckButton* raw_ca_autocorrect; Gtk::CheckButton* raw_caredblue; @@ -138,7 +137,7 @@ public: sigc::connection coarserotConn, finerotConn, cropConn, resizeConn, prsharpeningConn, perspectiveConn, commonTransConn; sigc::connection metadataConn, exifchConn, iptcConn, icmConn; sigc::connection df_fileConn, df_AutoSelectConn, ff_fileConn, ff_AutoSelectConn, ff_BlurRadiusConn, ff_BlurTypeConn, ff_ClipControlConn; - sigc::connection raw_caredblueConn, raw_ca_autocorrectConn, raw_ca_avoid_colourshiftconn, raw_hotpix_filtConn, raw_deadpix_filtConn, raw_pdaf_lines_filterConn, raw_linenoiseConn, raw_greenthreshConn, raw_ccStepsConn, raw_methodConn, raw_borderConn, raw_imagenumConn, raw_dcb_iterationsConn, raw_lmmse_iterationsConn, raw_pixelshiftConn, raw_dcb_enhanceConn, raw_exposConn, raw_preserConn, raw_blackConn; + sigc::connection raw_caredblueConn, raw_ca_autocorrectConn, raw_ca_avoid_colourshiftconn, raw_hotpix_filtConn, raw_deadpix_filtConn, raw_pdaf_lines_filterConn, raw_linenoiseConn, raw_greenthreshConn, raw_ccStepsConn, raw_methodConn, raw_borderConn, raw_imagenumConn, raw_dcb_iterationsConn, raw_lmmse_iterationsConn, raw_pixelshiftConn, raw_dcb_enhanceConn, raw_exposConn, raw_blackConn; public: PartialPasteDlg (const Glib::ustring &title, Gtk::Window* parent); diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 4151eacd4..c10c37b1f 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -404,7 +404,6 @@ Gtk::Widget* Preferences::getBatchProcPanel () mi = behModel->append (); mi->set_value (behavColumns.label, M ("TP_EXPOS_WHITEPOINT_LABEL")); appendBehavList (mi, M ("TP_RAWEXPOS_LINEAR"), ADDSET_RAWEXPOS_LINEAR, false); - appendBehavList (mi, M ("TP_RAWEXPOS_PRESER"), ADDSET_RAWEXPOS_PRESER, false); mi = behModel->append (); mi->set_value (behavColumns.label, M ("TP_RAWEXPOS_BLACKS")); diff --git a/rtgui/rawexposure.cc b/rtgui/rawexposure.cc index af0766e31..0c5191476 100644 --- a/rtgui/rawexposure.cc +++ b/rtgui/rawexposure.cc @@ -33,19 +33,7 @@ RAWExposure::RAWExposure () : FoldableToolPanel(this, "rawexposure", M("TP_EXPOS } PexPos->show(); - PexPreser = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_PRESER"), 0, 2.5, 0.1, 0)); - PexPreser->setAdjusterListener (this); - - if (PexPreser->delay < options.adjusterMaxDelay) { - PexPreser->delay = options.adjusterMaxDelay; - } - - PexPreser->show(); - pack_start( *PexPos, Gtk::PACK_SHRINK, 4);//exposi - // raw highlight exposure setting is obsolete, removing from GUI - //pack_start( *PexPreser, Gtk::PACK_SHRINK, 4); - PexPos->setLogScale(100, 0); } @@ -55,11 +43,9 @@ void RAWExposure::read(const rtengine::procparams::ProcParams* pp, const ParamsE if(pedited ) { PexPos->setEditedState( pedited->raw.exPos ? Edited : UnEdited ); - PexPreser->setEditedState( pedited->raw.exPreser ? Edited : UnEdited ); } PexPos->setValue (pp->raw.expos); - PexPreser->setValue (pp->raw.preser);//exposi enableListener (); } @@ -67,11 +53,9 @@ void RAWExposure::read(const rtengine::procparams::ProcParams* pp, const ParamsE void RAWExposure::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited) { pp->raw.expos = PexPos->getValue(); - pp->raw.preser = PexPreser->getValue();//exposi if (pedited) { pedited->raw.exPos = PexPos->getEditedState (); - pedited->raw.exPreser = PexPreser->getEditedState ();//exposi } } @@ -83,8 +67,6 @@ void RAWExposure::adjusterChanged(Adjuster* a, double newval) if (a == PexPos ) { listener->panelChanged (EvPreProcessExpCorrLinear, value ); - } else if (a == PexPreser && ABS(PexPos->getValue() - 1.0) > 0.0001) { // update takes long, only do it if it would have an effect - listener->panelChanged (EvPreProcessExpCorrPH, value ); } } } @@ -97,33 +79,27 @@ void RAWExposure::setBatchMode(bool batchMode) { ToolPanel::setBatchMode (batchMode); PexPos->showEditedCB (); - PexPreser->showEditedCB ();//exposure } void RAWExposure::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited) { PexPos->setDefault( defParams->raw.expos); - PexPreser->setDefault( defParams->raw.preser); if (pedited) { PexPos->setDefaultEditedState( pedited->raw.exPos ? Edited : UnEdited); - PexPreser->setDefaultEditedState( pedited->raw.exPreser ? Edited : UnEdited); } else { PexPos->setDefaultEditedState( Irrelevant ); - PexPreser->setDefaultEditedState( Irrelevant ); } } -void RAWExposure::setAdjusterBehavior (bool pexposadd, bool pexpreseradd) +void RAWExposure::setAdjusterBehavior (bool pexposadd) { PexPos->setAddMode(pexposadd); - PexPreser->setAddMode(pexpreseradd); } void RAWExposure::trimValues (rtengine::procparams::ProcParams* pp) { PexPos->trimValue(pp->raw.expos); - PexPreser->trimValue(pp->raw.preser); } diff --git a/rtgui/rawexposure.h b/rtgui/rawexposure.h index a04d0e3db..f34776d19 100644 --- a/rtgui/rawexposure.h +++ b/rtgui/rawexposure.h @@ -29,7 +29,6 @@ class RAWExposure : public ToolParamBlock, public AdjusterListener, public Folda protected: Adjuster* PexPos; - Adjuster* PexPreser; private: // Gtk::CheckButton* PextwoGreen; @@ -43,7 +42,7 @@ public: void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override; void adjusterChanged (Adjuster* a, double newval) override; void adjusterAutoToggled (Adjuster* a, bool newval) override; - void setAdjusterBehavior (bool pexposadd, bool pexpreseradd); + void setAdjusterBehavior (bool pexposadd); void trimValues (rtengine::procparams::ProcParams* pp) override; };