Fixed endless loop in chromiluminancecurve, Issue 2821, Fixed some ciecam02 bugs, Issue 2819
This commit is contained in:
parent
0bfc5a0e98
commit
90229e99f6
@ -13,7 +13,7 @@ MultiUser=true
|
||||
[File Browser]
|
||||
# Image filename extensions to be looked for, and their corresponding search state (0/1 -> skip/include)
|
||||
ParseExtensions=3fr;arw;cr2;crf;crw;dcr;dng;fff;iiq;jpg;jpeg;kdc;mef;mos;mrw;nef;nrw;orf;pef;png;raf;raw;rw2;rwl;rwz;sr2;srf;srw;tif;tiff;x3f;
|
||||
ParseExtensionsEnabled=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;
|
||||
ParseExtensionsEnabled=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;0;1;1;1;1;1;1;1;1;1;1;1;
|
||||
|
||||
[Output]
|
||||
PathTemplate=%p1/converted/%f
|
||||
|
@ -13,7 +13,7 @@ MultiUser=true
|
||||
[File Browser]
|
||||
# Image filename extensions to be looked for, and their corresponding search state (0/1 -> skip/include)
|
||||
ParseExtensions=3fr;arw;cr2;crf;crw;dcr;dng;fff;iiq;jpg;jpeg;kdc;mef;mos;mrw;nef;nrw;orf;pef;png;raf;raw;rw2;rwl;rwz;sr2;srf;srw;tif;tiff;x3f;
|
||||
ParseExtensionsEnabled=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;
|
||||
ParseExtensionsEnabled=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;0;1;1;1;1;1;1;1;1;1;1;1;
|
||||
|
||||
[Output]
|
||||
PathTemplate=%p1/converted/%f
|
||||
|
@ -15,7 +15,7 @@ UseSystemTheme=false
|
||||
[File Browser]
|
||||
# Image filename extensions to be looked for, and their corresponding search state (0/1 -> skip/include)
|
||||
ParseExtensions=3fr;arw;cr2;crf;crw;dcr;dng;fff;iiq;jpg;jpeg;kdc;mef;mos;mrw;nef;nrw;orf;pef;png;raf;raw;rw2;rwl;rwz;sr2;srf;srw;tif;tiff;x3f;
|
||||
ParseExtensionsEnabled=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;
|
||||
ParseExtensionsEnabled=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;0;1;1;1;1;1;1;1;1;1;1;1;
|
||||
|
||||
[Output]
|
||||
PathTemplate=%p1/converted/%f
|
||||
|
@ -930,8 +930,7 @@ void ColorTemp::curvecolorfloat(float satind, float satval, float &sres, float p
|
||||
if (sres>parsat) sres=parsat;
|
||||
if (sres<0.f) sres=0.f;
|
||||
} else {
|
||||
if (satind < -0.1f)
|
||||
sres = satval*(1.f+(satind)/100.f);
|
||||
sres = satval*(1.f+(satind)/100.f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -190,9 +190,16 @@ class ColorTemp {
|
||||
if(c-0.1 < 0.0) c1=-1; else c1=1;
|
||||
return c1*(100.0 / fl) * pow( (27.13 * fabs( c - 0.1 )) / (400.0 - fabs( c - 0.1 )), 1.0 / 0.42 );
|
||||
}
|
||||
static float inverse_nonlinear_adaptationfloat( float c, float fl ) {
|
||||
if(c-0.1f < 0.f) fl*=-1.f;
|
||||
return (100.0f / fl) * pow_F( (27.13f * fabsf( c - 0.1f )) / (400.0f - fabsf( c - 0.1f )), 2.38095238f );
|
||||
static float inverse_nonlinear_adaptationfloat( float c, float fl ) {
|
||||
c -= 0.1f;
|
||||
if(c < 0.f) {
|
||||
fl *= -1.f;
|
||||
if(c < -399.99f) // avoid nan values
|
||||
c = -399.99f;
|
||||
} else if(c > 399.99f) { // avoid nan values
|
||||
c = 399.99f;
|
||||
}
|
||||
return (100.0f / fl) * pow_F( (27.13f * fabsf( c )) / (400.0f - fabsf( c )), 2.38095238f );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1478,15 +1478,15 @@ if(settings->viewinggreySc==1) yb=18.0f;//fixed
|
||||
Qpro=Q;
|
||||
Mpro=M;
|
||||
spro=s;
|
||||
// we cannot have all algoritms with all chroma curves
|
||||
// we cannot have all algorithms with all chroma curves
|
||||
if(alg==1) {
|
||||
// Lightness saturation
|
||||
if(Jpro > 99.9f)
|
||||
Jpro = 99.9f;
|
||||
Jpro=(CAMBrightCurveJ[(float)(Jpro*327.68f)])/327.68f;//ligthness CIECAM02 + contrast
|
||||
Jpro=(CAMBrightCurveJ[(float)(Jpro*327.68f)])/327.68f;//lightness CIECAM02 + contrast
|
||||
float sres;
|
||||
float Sp=spro/100.0f;
|
||||
float parsat=1.5f; //parsat=1.5 =>saturation ; 1.8 => chroma ; 2.5 => colorfullness (personal evaluation)
|
||||
float parsat=1.5f; //parsat=1.5 =>saturation ; 1.8 => chroma ; 2.5 => colorfulness (personal evaluation)
|
||||
ColorTemp::curvecolorfloat(schr, Sp , sres, parsat);
|
||||
float dred=100.f;// in C mode
|
||||
float protect_red=80.0f; // in C mode
|
||||
@ -1519,7 +1519,7 @@ if(settings->viewinggreySc==1) yb=18.0f;//fixed
|
||||
if(alg!=2) {
|
||||
if(Jpro > 99.9f)
|
||||
Jpro = 99.9f;
|
||||
Jpro=(CAMBrightCurveJ[(float)(Jpro*327.68f)])/327.68f;//ligthness CIECAM02 + contrast
|
||||
Jpro=(CAMBrightCurveJ[(float)(Jpro*327.68f)])/327.68f;//lightness CIECAM02 + contrast
|
||||
}
|
||||
float Sp=spro/100.0f;
|
||||
ColorTemp::curvecolorfloat(schr, Sp , sres, 1.5f);
|
||||
@ -1538,10 +1538,11 @@ if(settings->viewinggreySc==1) yb=18.0f;//fixed
|
||||
// else if(Jpro < 2.f && Cpro > 15.f) Cpro=15.f;
|
||||
// else if(Jpro < 4.f && Cpro > 30.f) Cpro=30.f;
|
||||
// else if(Jpro < 7.f && Cpro > 50.f) Cpro=50.f;
|
||||
|
||||
hpro=hpro+hue;
|
||||
if( hpro < 0.0f )
|
||||
hpro += 360.0f;//hue
|
||||
if(alg==3) {
|
||||
hpro=hpro+hue;
|
||||
if( hpro < 0.0f )
|
||||
hpro += 360.0f;//hue
|
||||
}
|
||||
}
|
||||
|
||||
if (hasColCurve1) {//curve 1 with Lightness and Brightness
|
||||
@ -4646,7 +4647,7 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (EditBuffer *editBuffer,
|
||||
inRGB=false;
|
||||
}
|
||||
else if (!highlight && (R>ClipLevel || G>ClipLevel || B>ClipLevel)) {
|
||||
if (Lprov1 > 99.999f) Lprov1 = 99.98f;
|
||||
if (Lprov1 > 99.98f) Lprov1 = 99.98f;
|
||||
Chprov2 *= 0.95f;
|
||||
inRGB = false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user