diff --git a/rtengine/curves.cc b/rtengine/curves.cc index a4f85a878..4d00d361a 100644 --- a/rtengine/curves.cc +++ b/rtengine/curves.cc @@ -291,7 +291,7 @@ void CurveFactory::curveLightBrightColor ( void CurveFactory::curveBW ( procparams::ChannelMixerbwParams::eTCModeId curveModeb, const std::vector& curvePointsbw, procparams::ChannelMixerbwParams::eTCModeId curveModeb2, const std::vector& curvePointsbw2, - LUTu & histogram, LUTu & histogramCropped, LUTu & outBeforeCCurveHistogram,//for Luminance + LUTu & histogrambw, LUTu & histogramCropped, LUTu & outBeforeCCurveHistogrambw,//for Luminance ChMixerbw & customToneCurvebw1, ChMixerbw & customToneCurvebw2, int skip) @@ -304,7 +304,7 @@ void CurveFactory::curveBW ( dcurve[i] = CLIPD(val); } - outBeforeCCurveHistogram.clear(); + outBeforeCCurveHistogrambw.clear(); bool histNeeded = false; DiagonalCurve* tcurve = NULL; @@ -312,7 +312,7 @@ void CurveFactory::curveBW ( if (!curvePointsbw2.empty() && curvePointsbw2[0]>DCT_Linear && curvePointsbw2[0]DCT_Linear && curvePointsbw[0]& curvePointsbw, procparams::ChannelMixerbwParams::eTCModeId curveModeb2, const std::vector& curvePointsbw2, - LUTu & histogram, LUTu & histogramCropped, LUTu & outBeforeCCurveHistogram, + LUTu & histogrambw, LUTu & histogramCropped, LUTu & outBeforeCCurveHistogrambw, ChMixerbw & customToneCurvebw1, ChMixerbw & customToneCurvebw2, int skip); diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 0590432e3..19d5cd7f2 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -44,7 +44,7 @@ ImProcCoordinator::ImProcCoordinator () lhskcurve(65536,0), clcurve(65536,0), - vhist16(65536), + vhist16(65536),vhist16bw(65536), lhist16(65536), lhist16Cropped(65536), lhist16CAM(65536), lhist16CroppedCAM(65536), lhist16CCAM(65536), lhist16CroppedCCAM(65536), @@ -57,6 +57,7 @@ ImProcCoordinator::ImProcCoordinator () histBlue(256), histBlueRaw(256), histLuma(256), histChroma(256), histToneCurve(256), + histToneCurveBW(256), histLCurve(256), histCCurve(256), histCLurve(256), @@ -298,7 +299,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) { CurveFactory::RGBCurve (params.rgbCurves.bcurve, bCurve, scale==1 ? 1 : 1); CurveFactory::curveBW (params.chmixerbw.curveMode, params.chmixerbw.curve, params.chmixerbw.curveMode2, params.chmixerbw.curve2, - vhist16, histCropped, histToneCurve, customToneCurvebw1, customToneCurvebw2,scale==1 ? 1 : 1); + vhist16bw, histCropped, histToneCurveBW, customToneCurvebw1, customToneCurvebw2,scale==1 ? 1 : 1); //initialize rrm bbm ggm different from zero to avoid black screen in somme cases double rrm=33.; diff --git a/rtengine/improccoordinator.h b/rtengine/improccoordinator.h index 04e89d92b..c8a290639 100644 --- a/rtengine/improccoordinator.h +++ b/rtengine/improccoordinator.h @@ -88,7 +88,7 @@ class ImProcCoordinator : public StagedImageProcessor { LUTf lhskcurve; LUTf clcurve; - LUTu vhist16; + LUTu vhist16,vhist16bw; LUTu lhist16,lhist16Cropped; LUTu lhist16CAM,lhist16CroppedCAM; LUTu lhist16CCAM,lhist16CroppedCCAM; @@ -99,7 +99,7 @@ class ImProcCoordinator : public StagedImageProcessor { LUTu histRed, histRedRaw; LUTu histGreen, histGreenRaw; LUTu histBlue, histBlueRaw; - LUTu histLuma, histToneCurve, histLCurve, histCCurve, histCLurve, histLLCurve, histLCAM, histCCAM, histClad, bcabhist, histChroma; + LUTu histLuma, histToneCurve, histToneCurveBW, histLCurve, histCCurve, histCLurve, histLLCurve, histLCAM, histCCAM, histClad, bcabhist, histChroma; LUTf rCurve; LUTf gCurve; diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 057567965..48d329747 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -2847,9 +2847,10 @@ void ImProcFunctions::chromiLuminanceCurve (int pW, LabImage* lold, LabImage* ln val = (double)i / 47999.0; dCcurve[i] = CLIPD(val); } - for (int i=0; i<65535; i++) { //# 32768*1.414 approximation maxi for chroma + for (int i=0; i<65535; i++) { // a val = (double)i / 65534.0; dLcurve[i] = CLIPD(val); + } hist16Clad.clear();