diff --git a/rtdata/themes/TooWaBlue-GTK3-20_.css b/rtdata/themes/TooWaBlue-GTK3-20_.css index af7fb00af..a65fb2d3e 100644 --- a/rtdata/themes/TooWaBlue-GTK3-20_.css +++ b/rtdata/themes/TooWaBlue-GTK3-20_.css @@ -2,7 +2,7 @@ This file is part of RawTherapee. Copyright (c) 2016-2017 TooWaBoo - Version 2.61 + Version 2.62 RawTherapee is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1242,7 +1242,8 @@ switch { switch slider { border: 0.08334em solid @bg-entry-border; - background-image: linear-gradient(to bottom, shade (@accent-color2,1.15), shade (@accent-color2,.85)); + background-color: shade (@bg-light-grey, .85); + background-image: linear-gradient(to bottom, rgba(125,125,125,.4), rgba(60,60,60,.4)); border: 0.08334em solid @bg-entry-border; box-shadow: inset 0 0.08334em rgba(242, 242, 242, 0.1); border-radius: 0.2em 0 0 0.2em; @@ -1252,12 +1253,13 @@ switch:checked slider{ } switch:hover slider { - background-image: linear-gradient(to bottom, shade (@accent-color2,1.20), shade (@accent-color2,.90)); + background-color: shade (@bg-light-grey, .65); + background-image: linear-gradient(to bottom, rgba(125,125,125,.4), rgba(60,60,60,.4)); } switch:checked { - background-color: rgb(140,0,20); - color: @headline-big; + background-color: @accent-color2; + color: @headline-big; } switch:disabled:not(:checked) { @@ -1265,10 +1267,8 @@ switch:disabled:not(:checked) { background-image: none; background-color: shade (@bg-light-grey, .85); } -switch:disabled slider { - background-image: linear-gradient(to bottom, rgba(125,125,125,.4), rgba(60,60,60,.4)); - background-color: shade (@bg-light-grey, .85); -} + + /** end ****************************************************************************************/ /*** Buttons ***********************************************************************************/ diff --git a/rtengine/demosaic_algos.cc b/rtengine/demosaic_algos.cc index 16c0204dd..68b2ad8bb 100644 --- a/rtengine/demosaic_algos.cc +++ b/rtengine/demosaic_algos.cc @@ -37,7 +37,6 @@ #include "sleef.c" #include "opthelper.h" #include "median.h" -//#define BENCHMARK #include "StopWatch.h" #ifdef _OPENMP #include diff --git a/rtengine/histmatching.cc b/rtengine/histmatching.cc index be618d4d7..4216c4581 100644 --- a/rtengine/histmatching.cc +++ b/rtengine/histmatching.cc @@ -26,7 +26,6 @@ #include "iccstore.h" #include "../rtgui/mydiagonalcurve.h" #include "improcfun.h" -#define BENCHMARK #include "StopWatch.h" #include #include @@ -108,7 +107,7 @@ void mappingToCurve(const std::vector &mapping, std::vector &curve) int v = mapping[i]; bool change = i > 0 && v != mapping[i-1]; int diff = i - prev; - if (change && std::abs(diff - step) <= 1) { + if ((change && std::abs(diff - step) <= 1) || diff > step * 2) { curve.push_back(coord(i)); curve.push_back(coord(v)); prev = i; @@ -117,10 +116,13 @@ void mappingToCurve(const std::vector &mapping, std::vector &curve) }; doit(0, idx, idx > step ? step : idx / 2, true); doit(idx, int(mapping.size()), step, idx - step > step / 2); - if (curve.size() <= 2 || curve.back() < 0.99 || (1 - curve[curve.size()-2] > step / 512.0 && curve.back() < coord(mapping.back()))) { - curve.emplace_back(1.0); - curve.emplace_back(1.0); + if (curve.size() > 2 && (1 - curve[curve.size()-2] <= step / (256.0 * 3))) { + curve.pop_back(); + curve.pop_back(); } + curve.push_back(1.0); + curve.push_back(1.0); + if (curve.size() < 4) { curve = { DCT_Linear }; // not enough points, fall back to linear } else { @@ -201,7 +203,7 @@ void RawImageSource::getAutoMatchedToneCurve(std::vector &outCurve) std::cout << "histogram matching: cropping target to get an aspect ratio of " << std::fixed << std::setprecision(2) << thumb_ratio << ":1, new full size is " << fw << "x" << fh << std::endl; } } - PreviewProps pp(0, 0, fw, fh, skip); + PreviewProps pp(cx, cy, fw, fh, skip); ColorTemp currWB = getWB(); std::unique_ptr image(new Imagefloat(int(fw / skip), int(fh / skip))); getImage(currWB, TR_NONE, image.get(), pp, neutral.toneCurve, neutral.raw); diff --git a/rtengine/imagefloat.cc b/rtengine/imagefloat.cc index bfeb85534..fa45c53ba 100644 --- a/rtengine/imagefloat.cc +++ b/rtengine/imagefloat.cc @@ -163,15 +163,15 @@ void Imagefloat::getScanline (int row, unsigned char* buffer, int bps) } else if (bps == 16) { unsigned short *sbuffer = (unsigned short *)buffer; for (int i = 0, ix = 0; i < width; i++) { - sbuffer[ix++] = r(row, i); - sbuffer[ix++] = g(row, i); - sbuffer[ix++] = b(row, i); + sbuffer[ix++] = CLIP(r(row, i)); + sbuffer[ix++] = CLIP(g(row, i)); + sbuffer[ix++] = CLIP(b(row, i)); } } else if (bps == 8) { for (int i = 0, ix = 0; i < width; i++) { - buffer[ix++] = rtengine::uint16ToUint8Rounded(r(row, i)); - buffer[ix++] = rtengine::uint16ToUint8Rounded(g(row, i)); - buffer[ix++] = rtengine::uint16ToUint8Rounded(b(row, i)); + buffer[ix++] = rtengine::uint16ToUint8Rounded(CLIP(r(row, i))); + buffer[ix++] = rtengine::uint16ToUint8Rounded(CLIP(g(row, i))); + buffer[ix++] = rtengine::uint16ToUint8Rounded(CLIP(b(row, i))); } } } diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 975982f43..35e3912e9 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -40,7 +40,6 @@ #include "improccoordinator.h" #include "clutstore.h" #include "ciecam02.h" -//#define BENCHMARK #include "StopWatch.h" #include "../rtgui/ppversion.h" #include "../rtgui/guiutils.h" diff --git a/rtengine/ipwavelet.cc b/rtengine/ipwavelet.cc index 814625322..cbe34d4a5 100644 --- a/rtengine/ipwavelet.cc +++ b/rtengine/ipwavelet.cc @@ -1875,11 +1875,10 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float * // I adapted the principle but have profoundly changed the algorithm // One can 1) change all parameters and found good parameters; //one can also chnage in calckoe - float edd = settings->ed_detec; - float eddlow = settings->ed_low; //5 to 40 + float edd = 3.f; + float eddlow = 15.f; float eddlipinfl = 0.005f * cp.edgsens + 0.4f; float eddlipampl = 1.f + cp.edgampl / 50.f; - // float eddlow=5.f + cp.edgampl/2.f;//settings->ed_low;//5 to 40 if (cp.detectedge) { //enabled Lipschitz control...more memory..more time... @@ -2578,11 +2577,11 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit scaleskip[sc] = scales[sc] / skip; } - float t_r = settings->top_right; - float t_l = settings->top_left; - float b_r = settings->bot_right; - float edd = settings->ed_detec; - float eddstrength = settings->ed_detecStr; + float t_r = 40.f; + float t_l = 10.f; + float b_r = 75.f; + float edd = 3.f; + float eddstrength = 1.3f; float aedstr = (eddstrength - 1.f) / 90.f; float bedstr = 1.f - 10.f * aedstr; diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 387d7892f..81c4dc3e2 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -38,7 +38,6 @@ #include #endif #include "opthelper.h" -#define BENCHMARK #include "StopWatch.h" #define clipretinex( val, minv, maxv ) (( val = (val < minv ? minv : val ) ) > maxv ? maxv : val ) #undef CLIPD diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index 1edbc6e09..b54c66505 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -150,6 +150,11 @@ Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h, ImageIO* img = imgSrc.getImageIO(); + // agriggio -- hotfix for #3794, to be revised once a proper solution is implemented + if (std::max(img->getWidth(), img->getHeight()) / std::min(img->getWidth(), img->getHeight()) >= 10) { + return nullptr; + } + Thumbnail* tpp = new Thumbnail (); unsigned char* data; diff --git a/rtengine/settings.h b/rtengine/settings.h index b35c0752f..e1f11a183 100644 --- a/rtengine/settings.h +++ b/rtengine/settings.h @@ -83,14 +83,6 @@ public: double artifact_cbdl; double level0_cbdl; double level123_cbdl; - double bot_left; - double top_left; - double top_right; - double bot_right; - double ed_detec; - double ed_detecStr; - double ed_low; - int nspot; bool locdelay; int cropsleep; diff --git a/rtengine/tmo_fattal02.cc b/rtengine/tmo_fattal02.cc index c5e7c407f..4fb11ff19 100644 --- a/rtengine/tmo_fattal02.cc +++ b/rtengine/tmo_fattal02.cc @@ -69,7 +69,6 @@ #include "improcfun.h" #include "settings.h" #include "iccstore.h" -//#define BENCHMARK #include "StopWatch.h" #include "sleef.c" #include "opthelper.h" diff --git a/rtgui/batchqueuepanel.cc b/rtgui/batchqueuepanel.cc index 054160d91..ba07f6f4d 100644 --- a/rtgui/batchqueuepanel.cc +++ b/rtgui/batchqueuepanel.cc @@ -228,7 +228,7 @@ void BatchQueuePanel::updateTab (int qsize, int forceOrientation) if (!qsize ) { grid->attach_next_to(*Gtk::manage (new RTImage ("processing.png")), Gtk::POS_RIGHT, 1, 1); grid->attach_next_to(*Gtk::manage (new Gtk::Label (M("MAIN_FRAME_BATCHQUEUE") )), Gtk::POS_RIGHT, 1, 1); - } else if (!qStartStop->get_active()) { + } else if (qStartStop->get_active()) { grid->attach_next_to(*Gtk::manage (new RTImage ("processing-play.png")), Gtk::POS_RIGHT, 1, 1); grid->attach_next_to(*Gtk::manage (new Gtk::Label (M("MAIN_FRAME_BATCHQUEUE") + " [" + Glib::ustring::format( qsize ) + "]" )), Gtk::POS_RIGHT, 1, 1); } else { diff --git a/rtgui/crophandler.cc b/rtgui/crophandler.cc index 0abff627b..6228cb1c7 100644 --- a/rtgui/crophandler.cc +++ b/rtgui/crophandler.cc @@ -411,7 +411,7 @@ void CropHandler::setDetailedCrop (IImage8* im, IImage8* imtrue, rtengine::procp return FALSE; }; - idle_register.add(func, idle_helper); + idle_register.add(func, idle_helper, G_PRIORITY_HIGH_IDLE); } cimg.unlock (); diff --git a/rtgui/options.cc b/rtgui/options.cc index 9fba5d1a9..44f496dfa 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -568,14 +568,6 @@ void Options::setDefaults () rtSettings.artifact_cbdl = 4.; rtSettings.level0_cbdl = 0; rtSettings.level123_cbdl = 30; - rtSettings.bot_left = 0; - rtSettings.top_left = 10; - rtSettings.top_right = 40; - rtSettings.bot_right = 75; - rtSettings.ed_detec = 3; //between 2 and 10 - rtSettings.ed_detecStr = 1.3; //not use - rtSettings.ed_low = 15.; //between 5 to 40 - //locallab rtSettings.nspot = 8;//between 1 and ?? rtSettings.locdelay = false;//true enabled delay 200 for selection spot @@ -733,23 +725,6 @@ void Options::readFromFile (Glib::ustring fname) if ( keyFile.has_key ("General", "Verbose")) { rtSettings.verbose = keyFile.get_boolean ( "General", "Verbose"); } - - if (keyFile.has_key ("General", "BotLeft")) { - rtSettings.bot_left = keyFile.get_double ("General", "BotLeft"); - } - - if (keyFile.has_key ("General", "TopLeft")) { - rtSettings.top_left = keyFile.get_double ("General", "TopLeft"); - } - - if (keyFile.has_key ("General", "TopRight")) { - rtSettings.top_right = keyFile.get_double ("General", "TopRight"); - } - - if (keyFile.has_key ("General", "BotRight")) { - rtSettings.bot_right = keyFile.get_double ("General", "BotRight"); - } - if (keyFile.has_key ("General", "Nspot")) { rtSettings.nspot = keyFile.get_integer ("General", "Nspot"); } @@ -771,18 +746,6 @@ void Options::readFromFile (Glib::ustring fname) rtSettings.locdelay = keyFile.get_boolean ("General", "Locdelay"); } - if (keyFile.has_key ("General", "EDdetec")) { - rtSettings.ed_detec = keyFile.get_double ("General", "EDdetec"); - } - - if (keyFile.has_key ("General", "EDdetecStr")) { - rtSettings.ed_detecStr = keyFile.get_double ("General", "EDdetecStr"); - } - - if (keyFile.has_key ("General", "EDLow")) { - rtSettings.ed_low = keyFile.get_double ("General", "EDLow"); - } - } if (keyFile.has_group ("External Editor")) { @@ -1881,20 +1844,12 @@ void Options::saveToFile (Glib::ustring fname) keyFile.set_string ("General", "DarkFramesPath", rtSettings.darkFramesPath); keyFile.set_string ("General", "FlatFieldsPath", rtSettings.flatFieldsPath); keyFile.set_boolean ("General", "Verbose", rtSettings.verbose); - keyFile.set_double ("General", "BotLeft", rtSettings.bot_left); - keyFile.set_double ("General", "TopLeft", rtSettings.top_left); - keyFile.set_double ("General", "TopRight", rtSettings.top_right); - keyFile.set_double ("General", "BotRight", rtSettings.bot_right); - keyFile.set_double ("General", "EDdetec", rtSettings.ed_detec); - keyFile.set_double ("General", "EDdetecStr", rtSettings.ed_detecStr); - keyFile.set_double ("General", "EDLow", rtSettings.ed_low); keyFile.set_integer ("General", "Nspot", rtSettings.nspot); keyFile.set_boolean ("General", "Locdelay", rtSettings.locdelay); keyFile.set_integer ("General", "Cropsleep", rtSettings.cropsleep); keyFile.set_double ("General", "Reduchigh", rtSettings.reduchigh); keyFile.set_double ("General", "Reduclow", rtSettings.reduclow); - keyFile.set_integer ("External Editor", "EditorKind", editorToSendTo); keyFile.set_string ("External Editor", "GimpDir", gimpDir); keyFile.set_string ("External Editor", "PhotoshopDir", psDir); diff --git a/rtgui/wavelet.cc b/rtgui/wavelet.cc index d3a594848..160abf07e 100644 --- a/rtgui/wavelet.cc +++ b/rtgui/wavelet.cc @@ -100,7 +100,7 @@ Wavelet::Wavelet() : bllev(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_LOWLIGHT"), 0., 100., 0., 2., 50., 25., 0, false))), pastlev(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_PASTEL"), 0., 70., 0., 2., 30., 20., 0, false))), satlev(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_SAT"), 0., 130., 30., 45., 130., 100., 0, false))), - edgcont(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_EDGCONT"), 0., 100., options.rtSettings.bot_left, options.rtSettings.top_left, options.rtSettings.bot_right, options.rtSettings.top_right, 0., false))), + edgcont(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_EDGCONT"), 0., 100., 0, 10, 75, 40, 0., false))), level0noise(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_LEVZERO"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false))), level1noise(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_LEVONE"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false))), level2noise(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_LEVTWO"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false))), diff --git a/tools/build-rawtherapee b/tools/build-rawtherapee index 5c13df061..183d0a3d2 100755 --- a/tools/build-rawtherapee +++ b/tools/build-rawtherapee @@ -137,6 +137,7 @@ cmake \ -DWITH_PROF="OFF" \ -DWITH_SAN="OFF" \ -DWITH_SYSTEM_KLT="OFF" \ + -DWITH_BENCHMARK="OFF" \ "$HOME/programs/code-${prog}" || exit 1 make --jobs="$cpuCount" install || exit 1