From 1ff505432c4496b71bf03db35f5fde19cc1eecaa Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Thu, 29 Aug 2019 21:04:56 +0200 Subject: [PATCH 1/3] Do not treat changes of tonecurve.fromHistMatching as related to panning --- rtengine/improccoordinator.cc | 2 +- rtengine/procparams.cc | 23 +++++++++++++++++++++++ rtengine/procparams.h | 1 + 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 6f471eedf..766c7ba84 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -1514,7 +1514,7 @@ void ImProcCoordinator::process() while (changeSinceLast) { const bool panningRelatedChange = - params->toneCurve != nextParams->toneCurve + params->toneCurve.isPanningRelatedChange(nextParams->toneCurve) || params->labCurve != nextParams->labCurve || params->localContrast != nextParams->localContrast || params->rgbCurves != nextParams->rgbCurves diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 66837f89b..9fbc260ce 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -330,6 +330,29 @@ ToneCurveParams::ToneCurveParams() : { } +bool ToneCurveParams::isPanningRelatedChange(const ToneCurveParams& other) const +{ + return ! + (autoexp == other.autoexp + && clip == other.clip + && hrenabled == other.hrenabled + && method == other.method + && expcomp == other.expcomp + && curve == other.curve + && curve2 == other.curve2 + && curveMode == other.curveMode + && curveMode2 == other.curveMode2 + && brightness == other.brightness + && black == other.black + && contrast == other.contrast + && saturation == other.saturation + && shcompr == other.shcompr + && hlcompr == other.hlcompr + && hlcomprthresh == other.hlcomprthresh + && histmatching == other.histmatching + && clampOOG == other.clampOOG); +} + bool ToneCurveParams::operator ==(const ToneCurveParams& other) const { return diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 369af85fa..2d042f571 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -284,6 +284,7 @@ struct ToneCurveParams { ToneCurveParams(); + bool isPanningRelatedChange(const ToneCurveParams& other) const; bool operator ==(const ToneCurveParams& other) const; bool operator !=(const ToneCurveParams& other) const; From df8367558ba81c34a8fb67852685f2ec4e97349b Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Thu, 29 Aug 2019 22:07:15 +0200 Subject: [PATCH 2/3] Do not treat white balance changes as related to panning if before and after uses camera whitebalance --- rtengine/improccoordinator.cc | 2 +- rtengine/procparams.cc | 15 +++++++++++++++ rtengine/procparams.h | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 766c7ba84..daadcb16c 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -1520,7 +1520,7 @@ void ImProcCoordinator::process() || params->rgbCurves != nextParams->rgbCurves || params->colorToning != nextParams->colorToning || params->vibrance != nextParams->vibrance - || params->wb != nextParams->wb + || params->wb.isPanningRelatedChange(nextParams->wb) || params->colorappearance != nextParams->colorappearance || params->epd != nextParams->epd || params->fattal != nextParams->fattal diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 9fbc260ce..f14d72871 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -1233,6 +1233,21 @@ WBParams::WBParams() : { } +bool WBParams::isPanningRelatedChange(const WBParams& other) const +{ + return ! + (enabled == other.enabled + && ((method == "Camera" && other.method == "Camera") + || + (method == other.method + && temperature == other.temperature + && green == other.green + && equal == other.equal + && tempBias == other.tempBias) + ) + ); +} + bool WBParams::operator ==(const WBParams& other) const { return diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 2d042f571..6ae807d7e 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -598,6 +598,7 @@ struct WBParams { WBParams(); + bool isPanningRelatedChange(const WBParams& other) const; bool operator ==(const WBParams& other) const; bool operator !=(const WBParams& other) const; From a5cba6261a59e37e9c9e9ae6ddf15c09469ccdb1 Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Thu, 29 Aug 2019 22:50:45 +0200 Subject: [PATCH 3/3] Fix broken export when filmnegative was used on xtrans files --- rtengine/simpleprocess.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 2d594e0af..8d24514d6 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -210,7 +210,7 @@ private: imgsrc->preprocess ( params.raw, params.lensProf, params.coarse, params.dirpyrDenoise.enabled); // After preprocess, run film negative processing if enabled - if (imgsrc->getSensorType() == ST_BAYER && params.filmNegative.enabled) { + if ((imgsrc->getSensorType() == ST_BAYER || (imgsrc->getSensorType() == ST_FUJI_XTRANS)) && params.filmNegative.enabled) { imgsrc->filmNegativeProcess (params.filmNegative); }