diff --git a/rtengine/dcp.cc b/rtengine/dcp.cc index 89eec3773..8e695e42b 100644 --- a/rtengine/dcp.cc +++ b/rtengine/dcp.cc @@ -1551,61 +1551,61 @@ void DCPProfile::Apply(Imagefloat *pImg, int preferredIlluminant, const Glib::us } } -void DCPProfile::setStep2ApplyState(const Glib::ustring &workingSpace, bool useToneCurve, bool applyLookTable, bool applyBaselineExposure) +void DCPProfile::setStep2ApplyState(const Glib::ustring &workingSpace, bool useToneCurve, bool applyLookTable, bool applyBaselineExposure, dcpApplyState &asOut) { - applyState.useToneCurve = useToneCurve; - applyState.applyLookTable = applyLookTable; - applyState.blScale = 1.0; + asOut.useToneCurve = useToneCurve; + asOut.applyLookTable = applyLookTable; + asOut.blScale = 1.0; if (!aLookTable) { - applyState.applyLookTable = false; + asOut.applyLookTable = false; } if (!hasToneCurve) { - applyState.useToneCurve = false; + asOut.useToneCurve = false; } if (hasBaselineExposureOffset && applyBaselineExposure) { - applyState.blScale = powf(2, baselineExposureOffset); + asOut.blScale = powf(2, baselineExposureOffset); } if (workingSpace == "ProPhoto") { - applyState.alreadyProPhoto = true; + asOut.alreadyProPhoto = true; } else { - applyState.alreadyProPhoto = false; + asOut.alreadyProPhoto = false; TMatrix mWork; mWork = iccStore->workingSpaceMatrix (workingSpace); - memset(applyState.m2ProPhoto, 0, sizeof(applyState.m2ProPhoto)); + memset(asOut.m2ProPhoto, 0, sizeof(asOut.m2ProPhoto)); for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) for (int k = 0; k < 3; k++) { - applyState.m2ProPhoto[i][j] += prophoto_xyz[i][k] * mWork[k][j]; + asOut.m2ProPhoto[i][j] += prophoto_xyz[i][k] * mWork[k][j]; } mWork = iccStore->workingSpaceInverseMatrix (workingSpace); - memset(applyState.m2Work, 0, sizeof(applyState.m2Work)); + memset(asOut.m2Work, 0, sizeof(asOut.m2Work)); for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) for (int k = 0; k < 3; k++) { - applyState.m2Work[i][j] += mWork[i][k] * xyz_prophoto[k][j]; + asOut.m2Work[i][j] += mWork[i][k] * xyz_prophoto[k][j]; } } } -void DCPProfile::step2ApplyTile(float *rc, float *gc, float *bc, int width, int height, int tileWidth) const +void DCPProfile::step2ApplyTile(float *rc, float *gc, float *bc, int width, int height, int tileWidth, const dcpApplyState &asIn) const { #define FCLIP(a) ((a)>0.0?((a)<65535.5?(a):65535.5):0.0) #define CLIP01(a) ((a)>0?((a)<1?(a):1):0) float exp_scale = 1.0; - exp_scale *= applyState.blScale; + exp_scale *= asIn.blScale; - if (!applyState.useToneCurve && !applyState.applyLookTable) { + if (!asIn.useToneCurve && !asIn.applyLookTable) { if (exp_scale == 1.0) { return; } @@ -1632,14 +1632,14 @@ void DCPProfile::step2ApplyTile(float *rc, float *gc, float *bc, int width, int float newr, newg, newb; - if (applyState.alreadyProPhoto) { + if (asIn.alreadyProPhoto) { newr = r; newg = g; newb = b; } else { - newr = applyState.m2ProPhoto[0][0] * r + applyState.m2ProPhoto[0][1] * g + applyState.m2ProPhoto[0][2] * b; - newg = applyState.m2ProPhoto[1][0] * r + applyState.m2ProPhoto[1][1] * g + applyState.m2ProPhoto[1][2] * b; - newb = applyState.m2ProPhoto[2][0] * r + applyState.m2ProPhoto[2][1] * g + applyState.m2ProPhoto[2][2] * b; + newr = asIn.m2ProPhoto[0][0] * r + asIn.m2ProPhoto[0][1] * g + asIn.m2ProPhoto[0][2] * b; + newg = asIn.m2ProPhoto[1][0] * r + asIn.m2ProPhoto[1][1] * g + asIn.m2ProPhoto[1][2] * b; + newb = asIn.m2ProPhoto[2][0] * r + asIn.m2ProPhoto[2][1] * g + asIn.m2ProPhoto[2][2] * b; } // with looktable and tonecurve we need to clip @@ -1647,7 +1647,7 @@ void DCPProfile::step2ApplyTile(float *rc, float *gc, float *bc, int width, int newg = FCLIP(newg); newb = FCLIP(newb); - if (applyState.applyLookTable) { + if (asIn.applyLookTable) { float h, s, v; Color::rgb2hsv(newr, newg, newb, h, s, v); h *= 6.f; // RT calculates in [0,1] @@ -1669,18 +1669,18 @@ void DCPProfile::step2ApplyTile(float *rc, float *gc, float *bc, int width, int Color::hsv2rgb( h, s, v, newr, newg, newb); } - if (applyState.useToneCurve) { + if (asIn.useToneCurve) { toneCurve.Apply(newr, newg, newb); } - if (applyState.alreadyProPhoto) { + if (asIn.alreadyProPhoto) { rc[y * tileWidth + x] = newr; gc[y * tileWidth + x] = newg; bc[y * tileWidth + x] = newb; } else { - rc[y * tileWidth + x] = applyState.m2Work[0][0] * newr + applyState.m2Work[0][1] * newg + applyState.m2Work[0][2] * newb; - gc[y * tileWidth + x] = applyState.m2Work[1][0] * newr + applyState.m2Work[1][1] * newg + applyState.m2Work[1][2] * newb; - bc[y * tileWidth + x] = applyState.m2Work[2][0] * newr + applyState.m2Work[2][1] * newg + applyState.m2Work[2][2] * newb; + rc[y * tileWidth + x] = asIn.m2Work[0][0] * newr + asIn.m2Work[0][1] * newg + asIn.m2Work[0][2] * newb; + gc[y * tileWidth + x] = asIn.m2Work[1][0] * newr + asIn.m2Work[1][1] * newg + asIn.m2Work[1][2] * newb; + bc[y * tileWidth + x] = asIn.m2Work[2][0] * newr + asIn.m2Work[2][1] * newg + asIn.m2Work[2][2] * newb; } } } diff --git a/rtengine/dcp.h b/rtengine/dcp.h index f20f3543c..4b70445b2 100644 --- a/rtengine/dcp.h +++ b/rtengine/dcp.h @@ -59,14 +59,6 @@ class DCPProfile short iLightSource1, iLightSource2; AdobeToneCurve toneCurve; - struct { - double m2ProPhoto[3][3]; - double m2Work[3][3]; - bool alreadyProPhoto; - bool useToneCurve; - bool applyLookTable; - float blScale; - } applyState; void dngref_XYCoord2Temperature(const double whiteXY[2], double *temp, double *tint) const; void dngref_FindXYZtoCamera(const double whiteXY[2], int preferredIlluminant, double (*xyzToCamera)[3]) const; @@ -76,6 +68,15 @@ class DCPProfile void HSDApply(const HSDTableInfo &ti, const HSBModify *tableBase, float &h, float &s, float &v) const; public: + struct dcpApplyState{ + double m2ProPhoto[3][3]; + double m2Work[3][3]; + bool alreadyProPhoto; + bool useToneCurve; + bool applyLookTable; + float blScale; + }; + DCPProfile(const Glib::ustring &fname); ~DCPProfile(); @@ -103,8 +104,8 @@ public: willInterpolate_ = willInterpolate; }; void Apply(Imagefloat *pImg, int preferredIlluminant, const Glib::ustring &workingSpace, const ColorTemp &wb, double pre_mul[3], double camMatrix[3][3], bool useToneCurve = false, bool applyHueSatMap = true, bool applyLookTable = false) const; - void setStep2ApplyState(const Glib::ustring &workingSpace, bool useToneCurve, bool applyLookTable, bool applyBaselineExposure); - void step2ApplyTile(float *r, float *g, float *b, int width, int height, int tileWidth) const; + void setStep2ApplyState(const Glib::ustring &workingSpace, bool useToneCurve, bool applyLookTable, bool applyBaselineExposure, dcpApplyState &asOut); + void step2ApplyTile(float *r, float *g, float *b, int width, int height, int tileWidth, const dcpApplyState &asIn) const; }; class DCPStore diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index ca502b753..e7c26f378 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -773,11 +773,13 @@ void Crop::update (int todo) if (todo & M_RGBCURVE) { double rrm, ggm, bbm; - DCPProfile *dcpProf = parent->imgsrc->getDCP(params.icm, parent->currWB); + DCPProfile::dcpApplyState as; + DCPProfile *dcpProf = parent->imgsrc->getDCP(params.icm, parent->currWB, as); + parent->ipf.rgbProc (baseCrop, laboCrop, this, parent->hltonecurve, parent->shtonecurve, parent->tonecurve, cshmap, params.toneCurve.saturation, parent->rCurve, parent->gCurve, parent->bCurve, satLimit , satLimitOpacity, parent->ctColorCurve, parent->ctOpacityCurve, parent->opautili, parent->clToningcurve, parent->cl2Toningcurve, parent->customToneCurve1, parent->customToneCurve2, parent->beforeToneCurveBW, parent->afterToneCurveBW, rrm, ggm, bbm, - parent->bwAutoR, parent->bwAutoG, parent->bwAutoB, dcpProf); + parent->bwAutoR, parent->bwAutoG, parent->bwAutoB, dcpProf, as); } /*xref=000;yref=000; diff --git a/rtengine/imagesource.h b/rtengine/imagesource.h index 958956c60..a1dee831f 100644 --- a/rtengine/imagesource.h +++ b/rtengine/imagesource.h @@ -109,7 +109,7 @@ public: virtual ImageData* getImageData () = 0; virtual ImageMatrices* getImageMatrices () = 0; virtual bool isRAW() const = 0; - virtual DCPProfile* getDCP(const ColorManagementParams &cmp, ColorTemp &wb) + virtual DCPProfile* getDCP(const ColorManagementParams &cmp, ColorTemp &wb, DCPProfile::dcpApplyState &as) { return NULL; }; diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 268e8421a..0f23483b6 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -535,9 +535,11 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) double ggm = 33.; double bbm = 33.; - DCPProfile *dcpProf = imgsrc->getDCP(params.icm, currWB); + DCPProfile::dcpApplyState as; + DCPProfile *dcpProf = imgsrc->getDCP(params.icm, currWB, as); + ipf.rgbProc (oprevi, oprevl, NULL, hltonecurve, shtonecurve, tonecurve, shmap, params.toneCurve.saturation, - rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, beforeToneCurveBW, afterToneCurveBW, rrm, ggm, bbm, bwAutoR, bwAutoG, bwAutoB, params.toneCurve.expcomp, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh, dcpProf); + rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, beforeToneCurveBW, afterToneCurveBW, rrm, ggm, bbm, bwAutoR, bwAutoG, bwAutoB, params.toneCurve.expcomp, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh, dcpProf, as); if(params.blackwhite.enabled && params.blackwhite.autoc && abwListener) { if (settings->verbose) { diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index b578b897a..a95d7a06a 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -2947,15 +2947,15 @@ filmlike_clip(float *r, float *g, float *b) void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clToningcurve, LUTf & cl2Toningcurve, - const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf ) + const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf, const DCPProfile::dcpApplyState &asIn ) { - rgbProc (working, lab, pipetteBuffer, hltonecurve, shtonecurve, tonecurve, shmap, sat, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, params->toneCurve.expcomp, params->toneCurve.hlcompr, params->toneCurve.hlcomprthresh, dcpProf); + rgbProc (working, lab, pipetteBuffer, hltonecurve, shtonecurve, tonecurve, shmap, sat, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, params->toneCurve.expcomp, params->toneCurve.hlcompr, params->toneCurve.hlcomprthresh, dcpProf, asIn); } // Process RGB image and convert to LAB space void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clToningcurve, LUTf & cl2Toningcurve, - const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, double expcomp, int hlcompr, int hlcomprthresh, DCPProfile *dcpProf) + const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, double expcomp, int hlcompr, int hlcomprthresh, DCPProfile *dcpProf, const DCPProfile::dcpApplyState &asIn ) { Imagefloat *tmpImage = nullptr; @@ -3428,7 +3428,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } if (dcpProf) { - dcpProf->step2ApplyTile(rtemp, gtemp, btemp, tW - jstart, tH - istart, TS); + dcpProf->step2ApplyTile(rtemp, gtemp, btemp, tW - jstart, tH - istart, TS, asIn); } for (int i = istart, ti = 0; i < tH; i++, ti++) { diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 20cac3325..f1ac78d31 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -232,11 +232,11 @@ public: void updateColorProfiles (const ColorManagementParams& icm, const Glib::ustring& monitorProfile, RenderingIntent monitorIntent); void rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, - const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf); + const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf, const DCPProfile::dcpApplyState &asIn ); void rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, - double expcomp, int hlcompr, int hlcomprthresh, DCPProfile *dcpProf); + double expcomp, int hlcompr, int hlcomprthresh, DCPProfile *dcpProf, const DCPProfile::dcpApplyState &asIn ); void labtoning (float r, float g, float b, float &ro, float &go, float &bo, int algm, int metchrom, int twoc, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, LUTf & clToningcurve, LUTf & cl2Toningcurve, float iplow, float iphigh, double wp[3][3], double wip[3][3] ); void toning2col (float r, float g, float b, float &ro, float &go, float &bo, float iplow, float iphigh, float rl, float gl, float bl, float rh, float gh, float bh, float SatLow, float SatHigh, float balanS, float balanH, float reducac, int mode, int preser, float strProtect); void toningsmh (float r, float g, float b, float &ro, float &go, float &bo, float RedLow, float GreenLow, float BlueLow, float RedMed, float GreenMed, float BlueMed, float RedHigh, float GreenHigh, float BlueHigh, float reducac, int mode, int preser, float strProtect); diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 984925145..7085e315f 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -889,7 +889,7 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima } } -DCPProfile *RawImageSource::getDCP(const ColorManagementParams &cmp, ColorTemp &wb) +DCPProfile *RawImageSource::getDCP(const ColorManagementParams &cmp, ColorTemp &wb,DCPProfile::dcpApplyState &as) { DCPProfile *dcpProf = NULL; cmsHPROFILE dummy; @@ -898,8 +898,8 @@ DCPProfile *RawImageSource::getDCP(const ColorManagementParams &cmp, ColorTemp & if (dcpProf == NULL) { return NULL; } - - dcpProf->setStep2ApplyState(cmp.working, cmp.toneCurve, cmp.applyLookTable, cmp.applyBaselineExposureOffset); + + dcpProf->setStep2ApplyState(cmp.working, cmp.toneCurve, cmp.applyLookTable, cmp.applyBaselineExposureOffset, as); return dcpProf; } diff --git a/rtengine/rawimagesource.h b/rtengine/rawimagesource.h index ec14d14c1..ee62ea3ad 100644 --- a/rtengine/rawimagesource.h +++ b/rtengine/rawimagesource.h @@ -184,7 +184,7 @@ public: } void getAutoExpHistogram (LUTu & histogram, int& histcompr); void getRAWHistogram (LUTu & histRedRaw, LUTu & histGreenRaw, LUTu & histBlueRaw); - DCPProfile *getDCP(const ColorManagementParams &cmp, ColorTemp &wb); + DCPProfile *getDCP(const ColorManagementParams &cmp, ColorTemp &wb, DCPProfile::dcpApplyState &as); void convertColorSpace(Imagefloat* image, const ColorManagementParams &cmp, const ColorTemp &wb); static bool findInputProfile(Glib::ustring inProfile, cmsHPROFILE embedded, std::string camName, DCPProfile **dcpProf, cmsHPROFILE& in); diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index 7cbd558de..2539ee8be 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -1041,15 +1041,16 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei LabImage* labView = new LabImage (fw, fh); DCPProfile *dcpProf = nullptr; + DCPProfile::dcpApplyState as; if (isRaw) { cmsHPROFILE dummy; RawImageSource::findInputProfile(params.icm.input, nullptr, camName, &dcpProf, dummy); if (dcpProf) { - dcpProf->setStep2ApplyState(params.icm.working, params.icm.toneCurve, params.icm.applyLookTable, params.icm.applyBaselineExposureOffset); + dcpProf->setStep2ApplyState(params.icm.working, params.icm.toneCurve, params.icm.applyLookTable, params.icm.applyBaselineExposureOffset, as); } } - ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf); + ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as); // freeing up some memory customToneCurve1.Reset(); diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 018ef18e6..138482403 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -853,8 +853,10 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } autor = -9000.f; // This will ask to compute the "auto" values for the B&W tool (have to be inferior to -5000) - DCPProfile *dcpProf = imgsrc->getDCP(params.icm, currWB); - ipf.rgbProc (baseImg, labView, NULL, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf); + DCPProfile::dcpApplyState as; + DCPProfile *dcpProf = imgsrc->getDCP(params.icm, currWB, as); + + ipf.rgbProc (baseImg, labView, NULL, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as); if (settings->verbose) { printf("Output image / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", autor, autog, autob);