From 493c16856b3c175970b81fd04d70f94417c68a43 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 2 Nov 2015 10:03:21 +0100 Subject: [PATCH] reverted last commit --- rtengine/improccoordinator.cc | 31 ++++++++++++++----------------- rtengine/simpleprocess.cc | 5 +++-- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 4f40b855a..23904ba1b 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -242,6 +242,20 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } } + if (params.retinex.enabled) { + bool dehacontlutili = false; + bool useHsl = false; + LUTf cdcurve (65536, 0); + + imgsrc->retinexPrepareCurves(params.retinex, cdcurve, dehatransmissionCurve, dehacontlutili, useHsl, lhist16RETI, histLRETI); + float minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax; + imgsrc->retinex( params.icm, params.retinex, params.toneCurve, cdcurve, dehatransmissionCurve, conversionBuffer, dehacontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, histLRETI);//enabled Retinex + + if(dehaListener) { + dehaListener->minmaxChanged(maxCD, minCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax); + } + } + // Updating toneCurve.hrenabled if necessary // It has to be done there, because the next 'if' statement will use the value computed here @@ -261,24 +275,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) MyMutex::MyLock initLock(minit); // Also used in crop window imgsrc->HLRecovery_Global( params.toneCurve); // this handles Color HLRecovery - } - if (params.retinex.enabled) { - bool dehacontlutili = false; - bool useHsl = false; - LUTf cdcurve (65536, 0); - - imgsrc->retinexPrepareCurves(params.retinex, cdcurve, dehatransmissionCurve, dehacontlutili, useHsl, lhist16RETI, histLRETI); - float minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax; - imgsrc->retinex( params.icm, params.retinex, params.toneCurve, cdcurve, dehatransmissionCurve, conversionBuffer, dehacontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, histLRETI);//enabled Retinex - - if(dehaListener) { - dehaListener->minmaxChanged(maxCD, minCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax); - } - } - - if (todo & (M_INIT | M_LINDENOISE)) { - MyMutex::MyLock initLock(minit); // Also used in crop window if (settings->verbose) { printf ("Applying white balance, color correction & sRBG conversion...\n"); diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index e0b470274..91b7df178 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -116,8 +116,6 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p pl->setProgress (0.30); } - imgsrc->HLRecovery_Global( params.toneCurve ); - if(params.retinex.enabled) { //enabled Retinex LUTf cdcurve (65536, 0); LUTu dummy; @@ -136,6 +134,9 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p pl->setProgress (0.40); } + imgsrc->HLRecovery_Global( params.toneCurve ); + + if (pl) { pl->setProgress (0.45); }