Fixed Artifacts when moving the L curve blackpoint issue2144

This commit is contained in:
jdc
2013-12-21 08:38:17 +01:00
parent a0a7efd4e7
commit f3c2ce6425
2 changed files with 9 additions and 6 deletions

View File

@@ -356,8 +356,8 @@ void CurveFactory::curveCL ( bool & clcutili,const std::vector<double>& clcurveP
LUTf dCcurve(65536,0);
float val;
for (int i=0; i<48000; i++) { //# 32768*1.414 approximation maxi for chroma
dCcurve[i] = (float)i / 47999.0;
for (int i=0; i<50000; i++) { //# 32768*1.414 approximation maxi for chroma
dCcurve[i] = (float)i / 49999.0;
}
if (outBeforeCLurveHistogram)
@@ -373,7 +373,7 @@ void CurveFactory::curveCL ( bool & clcutili,const std::vector<double>& clcurveP
if (dCurve && !dCurve->isIdentity())
{needed = true;clcutili=true;}
}
for (int i=0; i<=48000; i++) {//32768*1.414 + ...
for (int i=0; i<=50000; i++) {//32768*1.414 + ...
float val;
if (histNeededCL) {
float hval = dCcurve[i];

View File

@@ -3019,8 +3019,9 @@ void ImProcFunctions::chromiLuminanceCurve (int pW, LabImage* lold, LabImage* ln
float Chprov=CC;
float Chprov1=CC;
float memChprov=Chprov;
float Lprov2=LL;
float Lin=lold->L[i][j];
float Lprov2=Lin;
lnew->L[i][j] = curve[Lin];
float Lprov1=(lnew->L[i][j])/327.68f;
float chromaChfactor=1.0f;
@@ -3158,10 +3159,12 @@ void ImProcFunctions::chromiLuminanceCurve (int pW, LabImage* lold, LabImage* ln
btmp *= factor;
}
if (!bwToning && clut) { // begin C=f(L)
float factorskin,factorsat,factor,factorskinext,interm;
float chroma = sqrt(SQR(atmp)+SQR(btmp)+0.001f);
float chromaCfactor=(clcurve[Lprov1*327.68f])/(Lprov1*327.68f);//apply C=f(L)
// float chromaCfactor=(clcurve[Lprov1*327.68f])/(Lprov1*327.68f);//apply C=f(L)
float chromaCfactor=(clcurve[Lprov2*327.68f])/(Lprov2*327.68f);//apply C=f(L)
float curf=0.7f;//empirical coeff because curve is more progressive
float scale = 100.0f/100.1f;//reduction in normal zone for curve C
float scaleext=1.0f;//reduction in transition zone for curve C