diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index add5b525d..8e0a36df2 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -136,10 +136,10 @@ const float d65_white[3] = { 0.950456, 1, 1.088754 }; #define SQR(x) rtengine::SQR(x) #define ABS(x) (((int)(x) ^ ((int)(x) >> 31)) - ((int)(x) >> 31)) -#define MIN(a,b) rtengine::min(a,static_cast(b)) -#define MAX(a,b) rtengine::max(a,static_cast(b)) -#define LIM(x,min,max) rtengine::LIM(x,static_cast(min),static_cast(max)) -#define ULIM(x,y,z) rtengine::ULIM(x,static_cast(y),static_cast(z)) +#define MIN(a,b) rtengine::min(a,static_cast<__typeof__(a)>(b)) +#define MAX(a,b) rtengine::max(a,static_cast<__typeof__(a)>(b)) +#define LIM(x,min,max) rtengine::LIM(x,static_cast<__typeof__(x)>(min),static_cast<__typeof__(x)>(max)) +#define ULIM(x,y,z) rtengine::ULIM(x,static_cast<__typeof__(x)>(y),static_cast<__typeof__(x)>(z)) #define CLIP(x) rtengine::CLIP(x) #define SWAP(a,b) { a=a+b; b=a-b; a=a-b; } diff --git a/rtengine/dcraw.patch b/rtengine/dcraw.patch index e1603864a..db24e7fe8 100644 --- a/rtengine/dcraw.patch +++ b/rtengine/dcraw.patch @@ -1,5 +1,5 @@ ---- dcraw.c 2015-08-15 15:35:27 +0000 -+++ dcraw.cc 2015-08-16 13:46:33 +0000 +--- dcraw.c 2015-09-21 10:08:04 +0000 ++++ dcraw.cc 2015-10-14 14:29:55 +0000 @@ -1,3 +1,15 @@ +/*RT*/#include +/*RT*/#include @@ -148,10 +148,10 @@ -#define LIM(x,min,max) MAX(min,MIN(x,max)) -#define ULIM(x,y,z) ((y) < (z) ? LIM(x,y,z) : LIM(x,z,y)) -#define CLIP(x) LIM(x,0,65535) -+#define MIN(a,b) rtengine::min(a,static_cast(b)) -+#define MAX(a,b) rtengine::max(a,static_cast(b)) -+#define LIM(x,min,max) rtengine::LIM(x,static_cast(min),static_cast(max)) -+#define ULIM(x,y,z) rtengine::ULIM(x,static_cast(y),static_cast(z)) ++#define MIN(a,b) rtengine::min(a,static_cast<__typeof__(a)>(b)) ++#define MAX(a,b) rtengine::max(a,static_cast<__typeof__(a)>(b)) ++#define LIM(x,min,max) rtengine::LIM(x,static_cast<__typeof__(x)>(min),static_cast<__typeof__(x)>(max)) ++#define ULIM(x,y,z) rtengine::ULIM(x,static_cast<__typeof__(x)>(y),static_cast<__typeof__(x)>(z)) +#define CLIP(x) rtengine::CLIP(x) #define SWAP(a,b) { a=a+b; b=a-b; a=a-b; } diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index fa1fae502..933373920 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -220,13 +220,11 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } imgsrc->demosaic( rp ); + // if a demosaic happened we should also call getimage later, so we need to set the M_INIT flag + todo |= M_INIT; if (highDetailNeeded) { highDetailRawComputed = true; - - if (params.toneCurve.hrenabled && params.toneCurve.method == "Color") { - todo |= M_INIT; - } } else { highDetailRawComputed = false; } diff --git a/rtgui/adjuster.cc b/rtgui/adjuster.cc index bbd6e76cf..f0e53fbbf 100644 --- a/rtgui/adjuster.cc +++ b/rtgui/adjuster.cc @@ -17,7 +17,7 @@ * along with RawTherapee. If not, see . */ #include "adjuster.h" -#include +#include #include #include "multilangmgr.h" #include "../rtengine/rtengine.h" diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 9c0918189..141ad35d3 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include +#include #include "preferences.h" #include "multilangmgr.h" #include "splash.h" diff --git a/rtgui/thresholdadjuster.cc b/rtgui/thresholdadjuster.cc index a7e21a26d..800f6edf5 100644 --- a/rtgui/thresholdadjuster.cc +++ b/rtgui/thresholdadjuster.cc @@ -17,7 +17,7 @@ * along with RawTherapee. If not, see . */ #include "thresholdadjuster.h" -#include +#include #include #include "multilangmgr.h" #include "../rtengine/rtengine.h" diff --git a/rtgui/tonecurve.cc b/rtgui/tonecurve.cc index 770652430..799513c2a 100644 --- a/rtgui/tonecurve.cc +++ b/rtgui/tonecurve.cc @@ -18,7 +18,7 @@ */ #include "tonecurve.h" #include "adjuster.h" -#include +#include #include #include "ppversion.h" #include "edit.h"