capture sharpening: early exit if Autocontrast is changed from true to false, #5412

This commit is contained in:
Ingo Weyrich
2019-08-29 13:02:54 +02:00
parent cca484f6c9
commit b72d4e27eb
2 changed files with 7 additions and 1 deletions

View File

@@ -461,6 +461,7 @@ RawImageSource::RawImageSource ()
, greenCache(nullptr)
, redCache(nullptr)
, blueCache(nullptr)
, captureSharpeningAutoContrast(false)
, rawDirty(true)
, histMatchingParams(new procparams::ColorManagementParams)
{
@@ -5003,7 +5004,11 @@ void RawImageSource::getRawValues(int x, int y, int rotate, int &R, int &G, int
void RawImageSource::captureSharpening(const procparams::SharpeningParams &sharpeningParams, bool showMask, double &conrastThreshold) {
BENCHFUN
if (!sharpeningParams.autoContrast && captureSharpeningAutoContrast) {
captureSharpeningAutoContrast = false;
return;
}
captureSharpeningAutoContrast = sharpeningParams.autoContrast;
if (plistener) {
plistener->setProgressStr(M("TP_PDSHARPENING_LABEL"));
plistener->setProgress(0.0);

View File

@@ -94,6 +94,7 @@ protected:
array2D<float>* redCache;
// the interpolated blue plane:
array2D<float>* blueCache;
bool captureSharpeningAutoContrast;
bool rawDirty;
float psRedBrightness[4];
float psGreenBrightness[4];