Filter for unnecessary slow demosaicing when switch between history states
see issue 923
This commit is contained in:
@@ -1199,9 +1199,9 @@ bool EditorPanel::idle_sentToGimp(ProgressConnector<int> *pc,rtengine::IImage16*
|
||||
void EditorPanel::historyBeforeLineChanged (const rtengine::procparams::ProcParams& params) {
|
||||
|
||||
if (beforeIpc) {
|
||||
ProcParams* pparams = beforeIpc->getParamsForUpdate (rtengine::EvProfileChanged);
|
||||
ProcParams* pparams = beforeIpc->beginUpdateParams ();
|
||||
*pparams = params;
|
||||
beforeIpc->paramsUpdateReady (); // starts the IPC processinp
|
||||
beforeIpc->endUpdateParams (rtengine::EvProfileChanged); // starts the IPC processing
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -157,26 +157,26 @@ void ParamsEdited::set (bool v) {
|
||||
raw.dcbIterations = v;
|
||||
raw.dcbEnhance = v;
|
||||
raw.allEnhance = v;
|
||||
raw.dfAuto = v;
|
||||
raw.caCorrection = v;
|
||||
raw.hotDeadPixel = v;
|
||||
raw.caBlue = v;
|
||||
raw.caRed = v;
|
||||
raw.greenEq = v;
|
||||
raw.hotDeadPixel = v;
|
||||
raw.linenoise = v;
|
||||
raw.darkFrame = v;
|
||||
raw.dfAuto = v;
|
||||
raw.ff_file = v;
|
||||
raw.ff_AutoSelect = v;
|
||||
raw.ff_BlurRadius = v;
|
||||
raw.ff_BlurType = v;
|
||||
raw.exPos = v;
|
||||
raw.exCorrection = v;
|
||||
raw.exPreser = v;
|
||||
raw.exBlackzero = v;
|
||||
raw.exBlackone = v;
|
||||
raw.exBlacktwo = v;
|
||||
raw.exBlackthree = v;
|
||||
raw.exTwoGreen=v;
|
||||
raw.greenEq = v;
|
||||
raw.linenoise = v;
|
||||
raw.ff_file = v;
|
||||
raw.ff_AutoSelect = v;
|
||||
raw.ff_BlurRadius = v;
|
||||
raw.ff_BlurType = v;
|
||||
|
||||
dirpyrequalizer.enabled = v;
|
||||
for(int i = 0; i < 5; i++) {
|
||||
dirpyrequalizer.mult[i] = v;
|
||||
@@ -328,31 +328,29 @@ void ParamsEdited::initFrom (const std::vector<rtengine::procparams::ProcParams>
|
||||
icm.gampos = icm.gampos && p.icm.gampos == other.icm.gampos;
|
||||
icm.slpos = icm.slpos && p.icm.slpos == other.icm.slpos;
|
||||
raw.ccSteps = raw.ccSteps && p.raw.ccSteps == other.raw.ccSteps;
|
||||
raw.dmethod = raw.dmethod && p.raw.dmethod == other.raw.dmethod;
|
||||
raw.dcbIterations = raw.dcbIterations && p.raw.dcb_iterations == other.raw.dcb_iterations;
|
||||
raw.dcbEnhance = raw.dcbEnhance && p.raw.dcb_enhance == other.raw.dcb_enhance;
|
||||
raw.allEnhance = raw.allEnhance && p.raw.all_enhance == other.raw.all_enhance;
|
||||
|
||||
raw.dcbIterations = raw.dcbIterations && p.raw.dcb_iterations == other.raw.dcb_iterations;
|
||||
raw.dmethod = raw.dmethod && p.raw.dmethod == other.raw.dmethod;
|
||||
raw.caCorrection = raw.caCorrection && p.raw.ca_autocorrect == other.raw.ca_autocorrect;
|
||||
raw.caRed = raw.caRed && p.raw.cared == other.raw.cared;
|
||||
raw.caBlue = raw.caBlue && p.raw.cablue == other.raw.cablue;
|
||||
raw.exPos = raw.exPos && p.raw.expos == other.raw.expos;
|
||||
raw.exPreser = raw.exPreser && p.raw.preser == other.raw.preser; //exposi
|
||||
raw.exBlackzero = raw.exBlackzero && p.raw.blackzero == other.raw.blackzero; //black
|
||||
raw.exBlackone = raw.exBlackone && p.raw.blackone == other.raw.blackone; //black
|
||||
raw.exBlacktwo = raw.exBlacktwo && p.raw.blacktwo == other.raw.blacktwo; //black
|
||||
raw.exBlackthree = raw.exBlackthree && p.raw.blackthree == other.raw.blackthree; //black
|
||||
raw.exTwoGreen = raw.exTwoGreen && p.raw.twogreen == other.raw.twogreen; //black 2 green
|
||||
|
||||
raw.greenEq = raw.greenEq && p.raw.greenthresh == other.raw.greenthresh;
|
||||
raw.hotDeadPixel = raw.hotDeadPixel && p.raw.hotdeadpix_filt == other.raw.hotdeadpix_filt;
|
||||
raw.linenoise = raw.linenoise && p.raw.linenoise == other.raw.linenoise;
|
||||
raw.darkFrame = raw.darkFrame && p.raw.dark_frame == other.raw.dark_frame;
|
||||
raw.dfAuto = raw.dfAuto && p.raw.df_autoselect == other.raw.df_autoselect;
|
||||
raw.ff_file = raw.ff_file && p.raw.ff_file == other.raw.ff_file;
|
||||
raw.ff_AutoSelect = raw.ff_AutoSelect && p.raw.ff_AutoSelect == other.raw.ff_AutoSelect;
|
||||
raw.ff_BlurRadius = raw.ff_BlurRadius && p.raw.ff_BlurRadius == other.raw.ff_BlurRadius;
|
||||
raw.ff_BlurType = raw.ff_BlurType && p.raw.ff_BlurType == other.raw.ff_BlurType;
|
||||
raw.greenEq = raw.greenEq && p.raw.greenthresh == other.raw.greenthresh;
|
||||
raw.hotDeadPixel = raw.hotDeadPixel && p.raw.hotdeadpix_filt == other.raw.hotdeadpix_filt;
|
||||
raw.linenoise = raw.linenoise && p.raw.linenoise == other.raw.linenoise;
|
||||
raw.exPos = raw.exPos && p.raw.expos == other.raw.expos;
|
||||
raw.exPreser = raw.exPreser && p.raw.preser == other.raw.preser;
|
||||
raw.exBlackzero = raw.exBlackzero && p.raw.blackzero == other.raw.blackzero;
|
||||
raw.exBlackone = raw.exBlackone && p.raw.blackone == other.raw.blackone;
|
||||
raw.exBlacktwo = p.raw.blacktwo == other.raw.blacktwo;
|
||||
raw.exBlackthree = p.raw.blackthree == other.raw.blackthree;
|
||||
raw.exTwoGreen = p.raw.twogreen == other.raw.twogreen;
|
||||
|
||||
dirpyrequalizer.enabled = dirpyrequalizer.enabled && p.dirpyrequalizer.enabled == other.dirpyrequalizer.enabled;
|
||||
for(int i = 0; i < 8; i++) {
|
||||
@@ -533,3 +531,9 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
|
||||
// if (exif) toEdit.exif==mo.exif = mods.exif==other.exif;
|
||||
// if (iptc;) toEdit.iptc==other.iptc; = mods.iptc==other.iptc;;
|
||||
}
|
||||
|
||||
bool RAWParamsEdited::isUnchanged() const {
|
||||
return ccSteps && dmethod && dcbIterations && dcbEnhance && allEnhance && caCorrection && caRed && caBlue && greenEq
|
||||
&& hotDeadPixel && linenoise && darkFrame && dfAuto && ff_file && ff_AutoSelect && ff_BlurRadius && ff_BlurType
|
||||
&& exPos && exPreser && exBlackzero && exBlackone && exBlacktwo && exBlackthree && exTwoGreen;
|
||||
}
|
@@ -305,7 +305,6 @@ class RAWParamsEdited {
|
||||
bool ff_AutoSelect;
|
||||
bool ff_BlurRadius;
|
||||
bool ff_BlurType;
|
||||
bool exCorrection;
|
||||
bool exPos;
|
||||
bool exPreser;
|
||||
bool exBlackzero;
|
||||
@@ -313,6 +312,8 @@ class RAWParamsEdited {
|
||||
bool exBlacktwo;
|
||||
bool exBlackthree;
|
||||
bool exTwoGreen;
|
||||
|
||||
bool isUnchanged() const;
|
||||
};
|
||||
|
||||
class ExifPairEdited {
|
||||
|
@@ -24,6 +24,8 @@
|
||||
#include <dfmanager.h>
|
||||
#include <ffmanager.h>
|
||||
#include <improcfun.h>
|
||||
#include <procevents.h>
|
||||
#include <refreshmap.h>
|
||||
|
||||
using namespace rtengine::procparams;
|
||||
|
||||
@@ -236,7 +238,7 @@ void ToolPanelCoordinator::panelChanged (rtengine::ProcEvent event, const Glib::
|
||||
|
||||
if (!ipc) return;
|
||||
|
||||
ProcParams* params = ipc->getParamsForUpdate (event);
|
||||
ProcParams* params = ipc->beginUpdateParams ();
|
||||
for (int i=0; i<toolPanels.size(); i++)
|
||||
toolPanels[i]->write (params);
|
||||
|
||||
@@ -260,7 +262,7 @@ void ToolPanelCoordinator::panelChanged (rtengine::ProcEvent event, const Glib::
|
||||
resize->write (params);
|
||||
}
|
||||
|
||||
ipc->paramsUpdateReady (); // starts the IPC processinp
|
||||
ipc->endUpdateParams (event); // starts the IPC processing
|
||||
|
||||
hasChanged = true;
|
||||
|
||||
@@ -273,7 +275,20 @@ void ToolPanelCoordinator::profileChange (const ProcParams *nparams, rtengine::
|
||||
int fw, fh, tr;
|
||||
|
||||
if (!ipc) return;
|
||||
ProcParams *params = ipc->getParamsForUpdate (event);
|
||||
ProcParams *params = ipc->beginUpdateParams ();
|
||||
|
||||
// Derive the effective changes, if it's a profile change, to prevent slow RAW rerendering if not necessary
|
||||
bool filterRawRefresh=false;
|
||||
if (event!=rtengine::EvPhotoLoaded) {
|
||||
ParamsEdited pe;
|
||||
std::vector<rtengine::procparams::ProcParams> lParams(2);
|
||||
lParams[0]=*params; lParams[1]=*nparams;
|
||||
pe.set(true);
|
||||
pe.initFrom (lParams);
|
||||
|
||||
filterRawRefresh=pe.raw.isUnchanged();
|
||||
}
|
||||
|
||||
*params = *nparams;
|
||||
|
||||
tr = TR_NONE;
|
||||
@@ -290,7 +305,11 @@ void ToolPanelCoordinator::profileChange (const ProcParams *nparams, rtengine::
|
||||
for (unsigned int i=0; i<toolPanels.size(); i++)
|
||||
toolPanels[i]->read (params);
|
||||
|
||||
ipc->paramsUpdateReady (); // starts the IPC processinp
|
||||
// start the IPC processing
|
||||
if (filterRawRefresh) {
|
||||
ipc->endUpdateParams ( refreshmap[(int)event] & ALLNORAW );
|
||||
} else
|
||||
ipc->endUpdateParams (event);
|
||||
|
||||
hasChanged = event != rtengine::EvProfileChangeNotification;
|
||||
|
||||
|
Reference in New Issue
Block a user