From dbe1fb3fa67285fd4dd7095b7444932625f24150 Mon Sep 17 00:00:00 2001 From: Desmis Date: Fri, 29 Sep 2017 08:31:06 +0200 Subject: [PATCH 1/4] Suppress compilation warning in improcfun.cc due to sumQ --- rtengine/improcfun.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 1676dc433..26655c1b1 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -1793,7 +1793,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } float sum = 0.f; - float sumQ = 0.f; +// float sumQ = 0.f; #ifdef _OPENMP const int numThreads = min (max (width * height / 65536, 1), omp_get_max_threads()); @@ -1813,8 +1813,10 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int hist16Qthr.clear(); } - #pragma omp for reduction(+:sum,sumQ) + // #pragma omp for reduction(+:sum,sumQ) + #pragma omp for reduction(+:sum) + for (int i = 0; i < height; i++) for (int j = 0; j < width; j++) { //rough correspondence between L and J float currL = lab->L[i][j] / 327.68f; @@ -1859,6 +1861,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } //estimation of wh only with La +/* float whestim = 500.f; if (la < 200.f) { @@ -1868,7 +1871,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } else { whestim = 500.f; } - +*/ if (needQ) { hist16Qthr[CLIP ((int) (32768.f * sqrt ((koef * (lab->L[i][j])) / 32768.f)))]++; //for brightness Q : approximation for Q=wh*sqrt(J/100) J not equal L //perhaps needs to introduce whestim ?? @@ -1876,7 +1879,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } sum += koef * lab->L[i][j]; //evaluate mean J to calculate Yb - sumQ += whestim * sqrt ((koef * (lab->L[i][j])) / 32768.f); + // sumQ += whestim * sqrt ((koef * (lab->L[i][j])) / 32768.f); //can be used in case of... } From 8e7fcefe7bb70dddeefb607140e78c68f2e6be51 Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Sat, 30 Sep 2017 00:04:45 +0200 Subject: [PATCH 2/4] Gtk-CRITICAL scrollbar fix Fix: https://github.com/Beep6581/RawTherapee/issues/3545#issuecomment-333233305 Gtk-CRITICAL **: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar --- rtdata/themes/RawTherapee-GTK3-20_.css | 37 ++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/rtdata/themes/RawTherapee-GTK3-20_.css b/rtdata/themes/RawTherapee-GTK3-20_.css index e0e6fe096..94886d6fb 100644 --- a/rtdata/themes/RawTherapee-GTK3-20_.css +++ b/rtdata/themes/RawTherapee-GTK3-20_.css @@ -171,6 +171,7 @@ eventbox.frame { border-color: #565656; } +/*** Scrollbar ***************************************/ scrollbar { background-color: #303030; } @@ -181,6 +182,42 @@ scrollbar slider:hover { background-color: #999999; } +scrollbar:not(.overlay-indicator).horizontal slider, +scrollbar.horizontal.hovering slider { + min-height: 6px; + min-width: 24px; +} +scrollbar:not(.overlay-indicator).horizontal.fine-tune slider, +scrollbar.horizontal.hovering.fine-tune slider { + min-height: 4px; + border-width: 4px; + margin: 0 -1px; +} +scrollbar.horizontal.overlay-indicator:not(.hovering) slider { + min-width: 24px; + min-height: 3px; + margin: 0 2px; +} + +scrollbar:not(.overlay-indicator).vertical slider, +scrollbar.vertical.hovering slider { + min-height: 24px; + min-width: 6px; +} +scrollbar:not(.overlay-indicator).vertical.fine-tune slider, +scrollbar.vertical.hovering.fine-tune slider { + min-width: 4px; + border-width: 4px; + margin: -1px 0; +} +scrollbar.vertical.overlay-indicator:not(.hovering) slider { + min-width: 3px; + min-height: 24px; + margin: 2px 0; +} + +/**************************************************/ + button { padding: 0; min-height: 5px; From 6828cf6eaf6def797bca17e4eda047123fb6236c Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sat, 30 Sep 2017 15:41:52 +0200 Subject: [PATCH 3/4] Fixes crash involving locale conversion of lensfun strings, by Floessie, fixes #4117 --- rtgui/lensprofile.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index fb4c34069..0c3b227aa 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -601,7 +601,7 @@ void LensProfilePanel::LFDbHelper::fillLensfunCameras() camnames[c.getMake()].insert(c.getModel()); if (options.rtSettings.verbose) { - std::cout << " found: " << c.getDisplayString() << std::endl; + std::cout << " found: " << c.getDisplayString().c_str() << std::endl; } } for (auto &p : camnames) { @@ -630,7 +630,7 @@ void LensProfilePanel::LFDbHelper::fillLensfunLenses() lenses[make].insert(name); if (options.rtSettings.verbose) { - std::cout << " found: " << l.getDisplayString() << std::endl; + std::cout << " found: " << l.getDisplayString().c_str() << std::endl; } } for (auto &p : lenses) { From 2f19546c72b52aae13084de0daf1182d3751539d Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sat, 30 Sep 2017 15:45:17 +0200 Subject: [PATCH 4/4] astyled rtengine/improcfun.cc --- rtengine/improcfun.cc | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 26655c1b1..a197941b7 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -1813,10 +1813,10 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int hist16Qthr.clear(); } - // #pragma omp for reduction(+:sum,sumQ) + // #pragma omp for reduction(+:sum,sumQ) #pragma omp for reduction(+:sum) - + for (int i = 0; i < height; i++) for (int j = 0; j < width; j++) { //rough correspondence between L and J float currL = lab->L[i][j] / 327.68f; @@ -1861,25 +1861,25 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } //estimation of wh only with La -/* - float whestim = 500.f; + /* + float whestim = 500.f; - if (la < 200.f) { - whestim = 200.f; - } else if (la < 2500.f) { - whestim = 350.f; - } else { - whestim = 500.f; - } -*/ + if (la < 200.f) { + whestim = 200.f; + } else if (la < 2500.f) { + whestim = 350.f; + } else { + whestim = 500.f; + } + */ if (needQ) { hist16Qthr[CLIP ((int) (32768.f * sqrt ((koef * (lab->L[i][j])) / 32768.f)))]++; //for brightness Q : approximation for Q=wh*sqrt(J/100) J not equal L //perhaps needs to introduce whestim ?? - // hist16Qthr[ (int) (sqrtf ((koef * (lab->L[i][j])) * 32768.f))]++; //for brightness Q : approximation for Q=wh*sqrt(J/100) J not equal L + //hist16Qthr[ (int) (sqrtf ((koef * (lab->L[i][j])) * 32768.f))]++; //for brightness Q : approximation for Q=wh*sqrt(J/100) J not equal L } sum += koef * lab->L[i][j]; //evaluate mean J to calculate Yb - // sumQ += whestim * sqrt ((koef * (lab->L[i][j])) / 32768.f); + //sumQ += whestim * sqrt ((koef * (lab->L[i][j])) / 32768.f); //can be used in case of... }