summaryrefslogtreecommitdiff
path: root/xicc
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-11-06 05:38:49 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-11-06 05:38:49 +0100
commit9491825ddff7a294d1f49061bae7044e426aeb2e (patch)
tree06e651099f87140ec534ae47fb8ce1ac6ec7976d /xicc
parentfa756339d4204bff7f2820067f58214d32780d17 (diff)
Imported Upstream version 1.8.3
Diffstat (limited to 'xicc')
-rwxr-xr-x[-rw-r--r--]xicc/Jamfile0
-rwxr-xr-x[-rw-r--r--]xicc/License.txt0
-rwxr-xr-x[-rw-r--r--]xicc/Readme.txt0
-rwxr-xr-x[-rw-r--r--]xicc/afiles0
-rwxr-xr-x[-rw-r--r--]xicc/bt1886.c2
-rwxr-xr-x[-rw-r--r--]xicc/bt1886.h0
-rwxr-xr-x[-rw-r--r--]xicc/cam02.c28
-rwxr-xr-x[-rw-r--r--]xicc/cam02.h0
-rwxr-xr-x[-rw-r--r--]xicc/cam02plot.c0
-rwxr-xr-x[-rw-r--r--]xicc/cam02ref.h0
-rwxr-xr-x[-rw-r--r--]xicc/cam02test.c0
-rwxr-xr-x[-rw-r--r--]xicc/cam97s3.c0
-rwxr-xr-x[-rw-r--r--]xicc/cam97s3.h0
-rwxr-xr-x[-rw-r--r--]xicc/cam97test.c0
-rwxr-xr-x[-rw-r--r--]xicc/ccmx.c0
-rwxr-xr-x[-rw-r--r--]xicc/ccmx.h0
-rwxr-xr-x[-rw-r--r--]xicc/ccss.c0
-rwxr-xr-x[-rw-r--r--]xicc/ccss.h0
-rwxr-xr-x[-rw-r--r--]xicc/ccttest.c0
-rwxr-xr-x[-rw-r--r--]xicc/cgatsplot.c0
-rwxr-xr-x[-rw-r--r--]xicc/cv.c0
-rwxr-xr-x[-rw-r--r--]xicc/cvtest.c0
-rwxr-xr-x[-rw-r--r--]xicc/example.sp0
-rwxr-xr-x[-rw-r--r--]xicc/extracticc.c0
-rwxr-xr-x[-rw-r--r--]xicc/extractttag.c0
-rwxr-xr-x[-rw-r--r--]xicc/fakeCMY.c0
-rwxr-xr-x[-rw-r--r--]xicc/fbview.c0
-rwxr-xr-x[-rw-r--r--]xicc/iccgamut.c2
-rwxr-xr-x[-rw-r--r--]xicc/iccjpeg.c0
-rwxr-xr-x[-rw-r--r--]xicc/iccjpeg.h0
-rwxr-xr-x[-rw-r--r--]xicc/icheck.c0
-rwxr-xr-x[-rw-r--r--]xicc/monctest.c0
-rwxr-xr-x[-rw-r--r--]xicc/moncurve.c0
-rwxr-xr-x[-rw-r--r--]xicc/moncurve.h0
-rwxr-xr-x[-rw-r--r--]xicc/mpp.c0
-rwxr-xr-x[-rw-r--r--]xicc/mpp.h0
-rwxr-xr-x[-rw-r--r--]xicc/mpplu.c0
-rwxr-xr-x[-rw-r--r--]xicc/revfix.c0
-rwxr-xr-x[-rw-r--r--]xicc/specplot.c0
-rwxr-xr-x[-rw-r--r--]xicc/specsubsamp.c0
-rwxr-xr-x[-rw-r--r--]xicc/spectest.c0
-rwxr-xr-x[-rw-r--r--]xicc/spectest2.c0
-rwxr-xr-x[-rw-r--r--]xicc/tiffgamut.c2
-rwxr-xr-x[-rw-r--r--]xicc/tiffgmts.c4
-rwxr-xr-x[-rw-r--r--]xicc/transplot.c0
-rwxr-xr-x[-rw-r--r--]xicc/xcal.c0
-rwxr-xr-x[-rw-r--r--]xicc/xcal.h0
-rwxr-xr-x[-rw-r--r--]xicc/xcam.c0
-rwxr-xr-x[-rw-r--r--]xicc/xcam.h0
-rwxr-xr-x[-rw-r--r--]xicc/xcolorants.c0
-rwxr-xr-x[-rw-r--r--]xicc/xcolorants.h0
-rwxr-xr-x[-rw-r--r--]xicc/xcolorantslu.c0
-rwxr-xr-x[-rw-r--r--]xicc/xdevlin.c0
-rwxr-xr-x[-rw-r--r--]xicc/xdevlin.h0
-rwxr-xr-x[-rw-r--r--]xicc/xdgb.c0
-rwxr-xr-x[-rw-r--r--]xicc/xdgb.h0
-rwxr-xr-x[-rw-r--r--]xicc/xfbview.c0
-rwxr-xr-x[-rw-r--r--]xicc/xfit.c0
-rwxr-xr-x[-rw-r--r--]xicc/xfit.h0
-rwxr-xr-x[-rw-r--r--]xicc/xicc.c90
-rwxr-xr-x[-rw-r--r--]xicc/xicc.h3
-rwxr-xr-x[-rw-r--r--]xicc/xicclu.c2
-rwxr-xr-x[-rw-r--r--]xicc/xlut.c0
-rwxr-xr-x[-rw-r--r--]xicc/xlutfix.c0
-rwxr-xr-x[-rw-r--r--]xicc/xmatrix.c0
-rwxr-xr-x[-rw-r--r--]xicc/xmono.c0
-rwxr-xr-x[-rw-r--r--]xicc/xspect.c0
-rwxr-xr-x[-rw-r--r--]xicc/xspect.h0
-rwxr-xr-x[-rw-r--r--]xicc/xutils.c0
-rwxr-xr-x[-rw-r--r--]xicc/xutils.h0
70 files changed, 93 insertions, 40 deletions
diff --git a/xicc/Jamfile b/xicc/Jamfile
index 5a03901..5a03901 100644..100755
--- a/xicc/Jamfile
+++ b/xicc/Jamfile
diff --git a/xicc/License.txt b/xicc/License.txt
index a871fcf..a871fcf 100644..100755
--- a/xicc/License.txt
+++ b/xicc/License.txt
diff --git a/xicc/Readme.txt b/xicc/Readme.txt
index f4a303a..f4a303a 100644..100755
--- a/xicc/Readme.txt
+++ b/xicc/Readme.txt
diff --git a/xicc/afiles b/xicc/afiles
index f2b84ad..f2b84ad 100644..100755
--- a/xicc/afiles
+++ b/xicc/afiles
diff --git a/xicc/bt1886.c b/xicc/bt1886.c
index 3f94dbe..ddd6066 100644..100755
--- a/xicc/bt1886.c
+++ b/xicc/bt1886.c
@@ -107,8 +107,8 @@ void bt1886_setnop(bt1886_info *p) {
p->outsc = 1.0;
p->outo = 0.0;
p->outL = 0.0;
+ p->tab[0] = 0.0;
p->tab[1] = 0.0;
- p->tab[2] = 0.0;
}
/* Setup the bt1886_info for the given target black point, proportion of */
diff --git a/xicc/bt1886.h b/xicc/bt1886.h
index f14efdc..f14efdc 100644..100755
--- a/xicc/bt1886.h
+++ b/xicc/bt1886.h
diff --git a/xicc/cam02.c b/xicc/cam02.c
index 5140f04..376d2c8 100644..100755
--- a/xicc/cam02.c
+++ b/xicc/cam02.c
@@ -9,7 +9,7 @@
* Conference, with the addition of the Viewing Flare
* model described on page 487 of "Digital Color Management",
* by Edward Giorgianni and Thomas Madden, and the
- * Helmholtz-Kohlraush effect, using the equation from
+ * Helmholtz-Kohlrausch effect, using the equation from
* the Bradford-Hunt 96C model as detailed in Mark Fairchild's
* book "Color Appearance Models".
* The Slight modification to the Hunt-Pointer-Estevez matrix
@@ -40,7 +40,9 @@
/*
TTBD: Should convert to using Timo Kunkel and Erik Reinhard's simplified
- and improved version of CIECAM02 (ie. "CIECAM02-KR").
+ and improved version of CIECAM02
+ [ "A Neurophysiology-Inspired Steady-State Color Appearance Model",
+ ie. "CIECAM02-KR" ? ]
The rgbp compression has it's problems in terms of perceptual
uniformity. A color with one component near zero might shift
@@ -105,7 +107,7 @@
XYZ space, the J value used to multiply Chroma, is limited
to be equivalent to not less than A == 0.1.
- The Helmholtz-Kohlraush effect is crafted to have resonable
+ The Helmholtz-Kohlrausch effect is crafted to have resonable
effects over the range of J from 0 to 100, and have more
moderate effects outside this range.
@@ -136,7 +138,11 @@
#undef DISABLE_HPE /* Debug - disable just Hunt-Pointer_Estevez matrix */
#undef DISABLE_NONLIN /* Debug - wire rgbp to rgba */
#undef DISABLE_TTD /* Debug - disable ttd vector 'tilt' */
-#undef DISABLE_HHKR /* Debug - disable Helmholtz-Kohlraush */
+#undef DISABLE_HHKR /* Debug - disable Helmholtz-Kohlrausch */
+
+ /* We reduce the HK effect from the Hunt equation, in the */
+ /* light of real wold experiments. */
+#define HHKR_MUL 0.25 /* [0.25] - Helmholtz-Kohlrausch strength multiplier */
#ifdef ENABLE_COMPR
# define BC_WHMINY 0.2 /* [0.2] Compression direction minimum Y value */
@@ -169,7 +175,7 @@
#define DDULIMIT 0.34 /* [0.34] ab component k3:k1 ratio limit (must be < 1.0) */
#define SSMINcJ 0.005 /* [0.005] ab scale cJ minimum value */
#define JLIMIT 0.005 /* [0.005] J encoding cutover point straight line (0 - 1.0 range) */
-#define HKLIMIT 0.7 /* [0.7] Maximum Helmholtz-Kohlraush lift */
+#define HKLIMIT 0.7 /* [0.7] Maximum Helmholtz-Kohlrausch lift out of 1.0 */
#ifdef TRACKMINMAX
double minss = 1e60;
@@ -282,7 +288,7 @@ double Yf, /* Flare as a fraction of the reference white (Y range 0.0 .. 1.0) *
double Yg, /* Flare as a fraction of the adapting/surround (Y range 0.0 .. 1.0) */
double Gxyz[3], /* The Glare white coordinates (typically the Ambient color) */
/* If <= 0 will Wxyz will be used. */
-int hk /* Flag, NZ to use Helmholtz-Kohlraush effect */
+int hk /* Flag, NZ to use Helmholtz-Kohlrausch effect */
) {
double tt, t1, t2;
double tm[3][3];
@@ -940,9 +946,10 @@ double XYZ[3]
JJ = J;
#ifndef DISABLE_HHKR
- /* Helmholtz-Kohlraush effect */
+ /* Helmholtz-Kohlrausch effect */
if (s->hk && J < 1.0) {
- double kk = C/300.0 * sin(DBL_PI * fabs(0.5 * (h - 90.0))/180.0);
+// double kk = C/300.0 * sin(DBL_PI * fabs(0.5 * (h - 90.0))/180.0);
+ double kk = HHKR_MUL * C/300.0 * sin(DBL_PI * fabs(0.5 * (h - 90.0))/180.0);
if (kk > 1e-6) /* Limit kk to a reasonable range */
kk = 1.0/(s->hklimit + 1.0/kk);
JJ = J + (1.0 - (J > 0.0 ? J : 0.0)) * kk;
@@ -1035,9 +1042,10 @@ double Jab[3]
J = JJ;
#ifndef DISABLE_HHKR
- /* Undo Helmholtz-Kohlraush effect */
+ /* Undo Helmholtz-Kohlrausch effect */
if (s->hk && J < 1.0) {
- double kk = C/300.0 * sin(DBL_PI * fabs(0.5 * (h - 90.0))/180.0);
+// double kk = C/300.0 * sin(DBL_PI * fabs(0.5 * (h - 90.0))/180.0);
+ double kk = HHKR_MUL * C/300.0 * sin(DBL_PI * fabs(0.5 * (h - 90.0))/180.0);
if (kk > 1e-6) /* Limit kk to a reasonable range */
kk = 1.0/(s->hklimit + 1.0/kk);
J = (JJ - kk)/(1.0 - kk);
diff --git a/xicc/cam02.h b/xicc/cam02.h
index 37443d3..37443d3 100644..100755
--- a/xicc/cam02.h
+++ b/xicc/cam02.h
diff --git a/xicc/cam02plot.c b/xicc/cam02plot.c
index f397e09..f397e09 100644..100755
--- a/xicc/cam02plot.c
+++ b/xicc/cam02plot.c
diff --git a/xicc/cam02ref.h b/xicc/cam02ref.h
index 29f7d2a..29f7d2a 100644..100755
--- a/xicc/cam02ref.h
+++ b/xicc/cam02ref.h
diff --git a/xicc/cam02test.c b/xicc/cam02test.c
index eba27d6..eba27d6 100644..100755
--- a/xicc/cam02test.c
+++ b/xicc/cam02test.c
diff --git a/xicc/cam97s3.c b/xicc/cam97s3.c
index d75b33e..d75b33e 100644..100755
--- a/xicc/cam97s3.c
+++ b/xicc/cam97s3.c
diff --git a/xicc/cam97s3.h b/xicc/cam97s3.h
index 9893ea4..9893ea4 100644..100755
--- a/xicc/cam97s3.h
+++ b/xicc/cam97s3.h
diff --git a/xicc/cam97test.c b/xicc/cam97test.c
index ff71bc8..ff71bc8 100644..100755
--- a/xicc/cam97test.c
+++ b/xicc/cam97test.c
diff --git a/xicc/ccmx.c b/xicc/ccmx.c
index 538f181..538f181 100644..100755
--- a/xicc/ccmx.c
+++ b/xicc/ccmx.c
diff --git a/xicc/ccmx.h b/xicc/ccmx.h
index 94263e0..94263e0 100644..100755
--- a/xicc/ccmx.h
+++ b/xicc/ccmx.h
diff --git a/xicc/ccss.c b/xicc/ccss.c
index 75075c1..75075c1 100644..100755
--- a/xicc/ccss.c
+++ b/xicc/ccss.c
diff --git a/xicc/ccss.h b/xicc/ccss.h
index 8258031..8258031 100644..100755
--- a/xicc/ccss.h
+++ b/xicc/ccss.h
diff --git a/xicc/ccttest.c b/xicc/ccttest.c
index 52bbdac..52bbdac 100644..100755
--- a/xicc/ccttest.c
+++ b/xicc/ccttest.c
diff --git a/xicc/cgatsplot.c b/xicc/cgatsplot.c
index ccaa28a..ccaa28a 100644..100755
--- a/xicc/cgatsplot.c
+++ b/xicc/cgatsplot.c
diff --git a/xicc/cv.c b/xicc/cv.c
index 7cd7927..7cd7927 100644..100755
--- a/xicc/cv.c
+++ b/xicc/cv.c
diff --git a/xicc/cvtest.c b/xicc/cvtest.c
index a9fa59f..a9fa59f 100644..100755
--- a/xicc/cvtest.c
+++ b/xicc/cvtest.c
diff --git a/xicc/example.sp b/xicc/example.sp
index 57cfcfc..57cfcfc 100644..100755
--- a/xicc/example.sp
+++ b/xicc/example.sp
diff --git a/xicc/extracticc.c b/xicc/extracticc.c
index 5fc24af..5fc24af 100644..100755
--- a/xicc/extracticc.c
+++ b/xicc/extracticc.c
diff --git a/xicc/extractttag.c b/xicc/extractttag.c
index 2c26bda..2c26bda 100644..100755
--- a/xicc/extractttag.c
+++ b/xicc/extractttag.c
diff --git a/xicc/fakeCMY.c b/xicc/fakeCMY.c
index b27f2d1..b27f2d1 100644..100755
--- a/xicc/fakeCMY.c
+++ b/xicc/fakeCMY.c
diff --git a/xicc/fbview.c b/xicc/fbview.c
index 07a9170..07a9170 100644..100755
--- a/xicc/fbview.c
+++ b/xicc/fbview.c
diff --git a/xicc/iccgamut.c b/xicc/iccgamut.c
index a77653f..77f8fdd 100644..100755
--- a/xicc/iccgamut.c
+++ b/xicc/iccgamut.c
@@ -86,7 +86,7 @@ void usage(char *diag) {
fprintf(stderr," b:background Background %% of image luminance (default 20)\n");
fprintf(stderr," l:imagewhite Image white in cd.m^2 if surround = auto (default 250)\n");
fprintf(stderr," f:flare Flare light %% of image luminance (default 0)\n");
- fprintf(stderr," g:glare Flare light %% of ambient (default 1)\n");
+ fprintf(stderr," g:glare Flare light %% of ambient (default %d)\n",XICC_DEFAULT_GLARE);
fprintf(stderr," g:X:Y:Z Flare color as XYZ (default media white, Abs: D50)\n");
fprintf(stderr," g:x:y Flare color as x, y\n");
fprintf(stderr," -s Create special cube surface topology plot\n");
diff --git a/xicc/iccjpeg.c b/xicc/iccjpeg.c
index 13d4e25..13d4e25 100644..100755
--- a/xicc/iccjpeg.c
+++ b/xicc/iccjpeg.c
diff --git a/xicc/iccjpeg.h b/xicc/iccjpeg.h
index 5e1888d..5e1888d 100644..100755
--- a/xicc/iccjpeg.h
+++ b/xicc/iccjpeg.h
diff --git a/xicc/icheck.c b/xicc/icheck.c
index 5f61d9a..5f61d9a 100644..100755
--- a/xicc/icheck.c
+++ b/xicc/icheck.c
diff --git a/xicc/monctest.c b/xicc/monctest.c
index a97b1b5..a97b1b5 100644..100755
--- a/xicc/monctest.c
+++ b/xicc/monctest.c
diff --git a/xicc/moncurve.c b/xicc/moncurve.c
index 1769ce4..1769ce4 100644..100755
--- a/xicc/moncurve.c
+++ b/xicc/moncurve.c
diff --git a/xicc/moncurve.h b/xicc/moncurve.h
index 5510c7d..5510c7d 100644..100755
--- a/xicc/moncurve.h
+++ b/xicc/moncurve.h
diff --git a/xicc/mpp.c b/xicc/mpp.c
index 86b6c30..86b6c30 100644..100755
--- a/xicc/mpp.c
+++ b/xicc/mpp.c
diff --git a/xicc/mpp.h b/xicc/mpp.h
index 26fa3a8..26fa3a8 100644..100755
--- a/xicc/mpp.h
+++ b/xicc/mpp.h
diff --git a/xicc/mpplu.c b/xicc/mpplu.c
index 11ddb76..11ddb76 100644..100755
--- a/xicc/mpplu.c
+++ b/xicc/mpplu.c
diff --git a/xicc/revfix.c b/xicc/revfix.c
index 2add264..2add264 100644..100755
--- a/xicc/revfix.c
+++ b/xicc/revfix.c
diff --git a/xicc/specplot.c b/xicc/specplot.c
index 6f38f37..6f38f37 100644..100755
--- a/xicc/specplot.c
+++ b/xicc/specplot.c
diff --git a/xicc/specsubsamp.c b/xicc/specsubsamp.c
index 4163ee2..4163ee2 100644..100755
--- a/xicc/specsubsamp.c
+++ b/xicc/specsubsamp.c
diff --git a/xicc/spectest.c b/xicc/spectest.c
index c340e98..c340e98 100644..100755
--- a/xicc/spectest.c
+++ b/xicc/spectest.c
diff --git a/xicc/spectest2.c b/xicc/spectest2.c
index 3fd574f..3fd574f 100644..100755
--- a/xicc/spectest2.c
+++ b/xicc/spectest2.c
diff --git a/xicc/tiffgamut.c b/xicc/tiffgamut.c
index 9ddb62b..e373fbd 100644..100755
--- a/xicc/tiffgamut.c
+++ b/xicc/tiffgamut.c
@@ -96,7 +96,7 @@ void usage(void) {
fprintf(stderr," b:background Background %% of image luminance (default 20)\n");
fprintf(stderr," l:imagewhite Image white in cd.m^2 if surround = auto (default 250)\n");
fprintf(stderr," f:flare Flare light %% of image luminance (default 0)\n");
- fprintf(stderr," g:glare Flare light %% of ambient (default 1)\n");
+ fprintf(stderr," g:glare Flare light %% of ambient (default %d)\n",XICC_DEFAULT_GLARE);
fprintf(stderr," g:X:Y:Z Flare color as XYZ (default media white, Abs: D50)\n");
fprintf(stderr," g:x:y Flare color as x, y\n");
fprintf(stderr," -O outputfile Override the default output filename.\n");
diff --git a/xicc/tiffgmts.c b/xicc/tiffgmts.c
index c31f852..446ea5c 100644..100755
--- a/xicc/tiffgmts.c
+++ b/xicc/tiffgmts.c
@@ -58,7 +58,7 @@ void usage(void) {
fprintf(stderr," -i intent p = perceptual, r = relative colorimetric,\n");
fprintf(stderr," s = saturation, a = absolute (default), d = profile default\n");
// fprintf(stderr," P = absolute perceptual, S = absolute saturation\n");
- fprintf(stderr," -p oride l = Lab_PCS (default), j = %s Appearance Jab\n",icxcam_description(cam_default),icxcam_description(cam_default));
+ fprintf(stderr," -p oride l = Lab_PCS (default), j = %s Appearance Jab\n",icxcam_description(cam_default));
fprintf(stderr," -o order n = normal (priority: lut > matrix > monochrome)\n");
fprintf(stderr," r = reverse (priority: monochrome > matrix > lut)\n");
fprintf(stderr," -c viewcond set appearance mode and viewing conditions for %s,\n",icxcam_description(cam_default));
@@ -77,7 +77,7 @@ void usage(void) {
fprintf(stderr," a:adaptation Adaptation luminance in cd.m^2 (default 50.0)\n");
fprintf(stderr," b:background Background %% of image luminance (default 20)\n");
fprintf(stderr," f:flare Flare light %% of image luminance (default 0)\n");
- fprintf(stderr," g:glare Flare light %% of ambient (default 1)\n");
+ fprintf(stderr," g:glare Flare light %% of ambient (default 2)\n");
fprintf(stderr," g:X:Y:Z Flare color as XYZ (default media white, Abs: D50)\n");
fprintf(stderr," g:x:y Flare color as x, y\n");
fprintf(stderr," -V L,a,b Overide normal vector direction for span\n");
diff --git a/xicc/transplot.c b/xicc/transplot.c
index 6473e2b..6473e2b 100644..100755
--- a/xicc/transplot.c
+++ b/xicc/transplot.c
diff --git a/xicc/xcal.c b/xicc/xcal.c
index 4400745..4400745 100644..100755
--- a/xicc/xcal.c
+++ b/xicc/xcal.c
diff --git a/xicc/xcal.h b/xicc/xcal.h
index f7c3fa9..f7c3fa9 100644..100755
--- a/xicc/xcal.h
+++ b/xicc/xcal.h
diff --git a/xicc/xcam.c b/xicc/xcam.c
index 6117cd1..6117cd1 100644..100755
--- a/xicc/xcam.c
+++ b/xicc/xcam.c
diff --git a/xicc/xcam.h b/xicc/xcam.h
index 021c621..021c621 100644..100755
--- a/xicc/xcam.h
+++ b/xicc/xcam.h
diff --git a/xicc/xcolorants.c b/xicc/xcolorants.c
index 84a7720..84a7720 100644..100755
--- a/xicc/xcolorants.c
+++ b/xicc/xcolorants.c
diff --git a/xicc/xcolorants.h b/xicc/xcolorants.h
index 460c4b0..460c4b0 100644..100755
--- a/xicc/xcolorants.h
+++ b/xicc/xcolorants.h
diff --git a/xicc/xcolorantslu.c b/xicc/xcolorantslu.c
index 601c4bd..601c4bd 100644..100755
--- a/xicc/xcolorantslu.c
+++ b/xicc/xcolorantslu.c
diff --git a/xicc/xdevlin.c b/xicc/xdevlin.c
index a5f7bd6..a5f7bd6 100644..100755
--- a/xicc/xdevlin.c
+++ b/xicc/xdevlin.c
diff --git a/xicc/xdevlin.h b/xicc/xdevlin.h
index 7e51e40..7e51e40 100644..100755
--- a/xicc/xdevlin.h
+++ b/xicc/xdevlin.h
diff --git a/xicc/xdgb.c b/xicc/xdgb.c
index 80914b8..80914b8 100644..100755
--- a/xicc/xdgb.c
+++ b/xicc/xdgb.c
diff --git a/xicc/xdgb.h b/xicc/xdgb.h
index bfb1752..bfb1752 100644..100755
--- a/xicc/xdgb.h
+++ b/xicc/xdgb.h
diff --git a/xicc/xfbview.c b/xicc/xfbview.c
index affdb53..affdb53 100644..100755
--- a/xicc/xfbview.c
+++ b/xicc/xfbview.c
diff --git a/xicc/xfit.c b/xicc/xfit.c
index d12919f..d12919f 100644..100755
--- a/xicc/xfit.c
+++ b/xicc/xfit.c
diff --git a/xicc/xfit.h b/xicc/xfit.h
index 14b4ecc..14b4ecc 100644..100755
--- a/xicc/xfit.h
+++ b/xicc/xfit.h
diff --git a/xicc/xicc.c b/xicc/xicc.c
index a7556d5..058f492 100644..100755
--- a/xicc/xicc.c
+++ b/xicc/xicc.c
@@ -1704,7 +1704,7 @@ double *wp /* Provide white point if xicc is NULL */
Glare is assumed to be from the ambient light reflecting from the display
and also striking the observer directly, and is (typically) defaulted
- to 1% of ambient here.
+ to 1% of ambient here. (too low ? Typical displays are 4-10%)
*/
@@ -1719,7 +1719,7 @@ double *wp /* Provide white point if xicc is NULL */
vc->Lv = 250.0; /* Average viewing conditions ratio */
vc->Yb = 0.2; /* Grey world */
vc->Yf = 0.0; /* 0% flare */
- vc->Yg = 0.01; /* 1% glare */
+ vc->Yg = 0.01 * XICC_DEFAULT_GLARE; /* 5% glare */
}
}
else if (no == 2
@@ -1733,7 +1733,7 @@ double *wp /* Provide white point if xicc is NULL */
vc->Lv = 2000.0/3.1415; /* White of the image field */
vc->Yb = 0.2; /* Grey world */
vc->Yf = 0.0; /* 0% flare */
- vc->Yg = 0.01; /* 1% glare */
+ vc->Yg = 0.01 * XICC_DEFAULT_GLARE; /* 5% glare */
}
}
else if (no == 0
@@ -1747,7 +1747,7 @@ double *wp /* Provide white point if xicc is NULL */
vc->Lv = 500.0/3.1415; /* White of the image field */
vc->Yb = 0.2; /* Grey world */
vc->Yf = 0.0; /* 0% flare */
- vc->Yg = 0.01; /* 1% glare */
+ vc->Yg = 0.01 * XICC_DEFAULT_GLARE; /* 5% glare */
}
}
else if (no == 1
@@ -1761,7 +1761,7 @@ double *wp /* Provide white point if xicc is NULL */
vc->Lv = 150.0; /* White of the image field */
vc->Yb = 0.2; /* Grey world */
vc->Yf = 0.0; /* 0% flare */
- vc->Yg = 0.01; /* 1% glare */
+ vc->Yg = 0.01 * XICC_DEFAULT_GLARE; /* 5% glare */
}
}
else if (no == 4
@@ -1775,7 +1775,7 @@ double *wp /* Provide white point if xicc is NULL */
vc->Lv = 150.0; /* White of the image field */
vc->Yb = 0.2; /* Grey world */
vc->Yf = 0.0; /* 0% flare */
- vc->Yg = 0.01; /* 1% glare */
+ vc->Yg = 0.01 * XICC_DEFAULT_GLARE; /* 5% glare */
}
}
else if (no == 3
@@ -1789,7 +1789,7 @@ double *wp /* Provide white point if xicc is NULL */
vc->Lv = 120.0; /* White of the image field */
vc->Yb = 0.2; /* Grey world */
vc->Yf = 0.0; /* 0% flare */
- vc->Yg = 0.01; /* 1% glare */
+ vc->Yg = 0.01 * XICC_DEFAULT_GLARE; /* 5% glare */
}
}
else if (no == 5
@@ -1803,7 +1803,7 @@ double *wp /* Provide white point if xicc is NULL */
vc->Lv = 100.0; /* White of the image field */
vc->Yb = 0.2; /* Grey world */
vc->Yf = 0.0; /* 0% flare */
- vc->Yg = 0.01; /* 1% glare */
+ vc->Yg = 0.01 * XICC_DEFAULT_GLARE; /* 5% glare */
}
}
else if (no == 6
@@ -1817,7 +1817,7 @@ double *wp /* Provide white point if xicc is NULL */
vc->Lv = 80.0; /* White of the image field */
vc->Yb = 0.2; /* Grey world */
vc->Yf = 0.0; /* 0% flare */
- vc->Yg = 0.01; /* 1% glare */
+ vc->Yg = 0.01 * XICC_DEFAULT_GLARE; /* 5% glare */
}
}
else if (no == 7
@@ -1831,7 +1831,7 @@ double *wp /* Provide white point if xicc is NULL */
vc->Lv = 80.0; /* White of the image field */
vc->Yb = 0.2; /* Grey world */
vc->Yf = 0.0; /* 0% flare */
- vc->Yg = 0.01; /* 1% glare */
+ vc->Yg = 0.01 * XICC_DEFAULT_GLARE; /* 5% glare */
}
}
else if (no == 8
@@ -1845,7 +1845,7 @@ double *wp /* Provide white point if xicc is NULL */
vc->Yb = 0.2; /* Grey world */
vc->Lv = 1000.0/3.1415; /* White of the image field */
vc->Yf = 0.0; /* 0% flare */
- vc->Yg = 0.01; /* 1% glare */
+ vc->Yg = 0.01 * XICC_DEFAULT_GLARE; /* 5% glare */
}
}
else if (no == 9
@@ -1884,7 +1884,7 @@ double *wp /* Provide white point if xicc is NULL */
vc->La = 53.0; /* Dim, adapted to slide ? */
vc->Yb = 0.2; /* Grey world */
vc->Yf = 0.0; /* 0% flare */
- vc->Yg = 0.01; /* 1% glare */
+ vc->Yg = 0.01 * XICC_DEFAULT_GLARE; /* 5% glare */
}
}
else {
@@ -2023,6 +2023,7 @@ char *as /* Alias string selector, NULL for none */
gmi->gamcknf = 0.0;
gmi->gamxknf = 0.0;
gmi->gampwf = 0.0;
+ gmi->gamlpwf = 0.0; /* No Linear Preserving Perceptual surface wghtg. factor */
gmi->gamswf = 0.0;
gmi->satenh = 0.0; /* No saturation enhancement */
}
@@ -2055,6 +2056,7 @@ char *as /* Alias string selector, NULL for none */
gmi->gamcknf = 0.0;
gmi->gamxknf = 0.0;
gmi->gampwf = 0.0;
+ gmi->gamlpwf = 0.0; /* No Linear Preserving Perceptual surface wghtg. factor */
gmi->gamswf = 0.0;
gmi->satenh = 0.0; /* No saturation enhancement */
}
@@ -2080,6 +2082,7 @@ char *as /* Alias string selector, NULL for none */
gmi->gamcknf = 0.0;
gmi->gamxknf = 0.0;
gmi->gampwf = 0.0;
+ gmi->gamlpwf = 0.0; /* No Linear Preserving Perceptual surface wghtg. factor */
gmi->gamswf = 0.0;
gmi->satenh = 0.0; /* No saturation enhancement */
}
@@ -2107,6 +2110,7 @@ char *as /* Alias string selector, NULL for none */
gmi->gamcknf = 0.0;
gmi->gamxknf = 0.0;
gmi->gampwf = 0.0;
+ gmi->gamlpwf = 0.0; /* No Linear Preserving Perceptual surface wghtg. factor */
gmi->gamswf = 0.0;
gmi->satenh = 0.0; /* No saturation enhancement */
}
@@ -2133,6 +2137,7 @@ char *as /* Alias string selector, NULL for none */
gmi->gamcknf = 0.0; /* No knee in gamut compress */
gmi->gamxknf = 0.0; /* No knee in gamut expand */
gmi->gampwf = 0.0; /* No Perceptual surface weighting factor */
+ gmi->gamlpwf = 0.0; /* No Linear Preserving Perceptual surface wghtg. factor */
gmi->gamswf = 0.0; /* No Saturation surface weighting factor */
gmi->satenh = 0.0; /* No saturation enhancement */
}
@@ -2158,9 +2163,10 @@ char *as /* Alias string selector, NULL for none */
gmi->bph = gmm_bendBP; /* extent and bend */
gmi->gamcpf = 1.0; /* Full gamut compression */
gmi->gamexf = 0.0; /* No gamut expansion */
- gmi->gamcknf = 0.9; /* 0.9 High Sigma knee in gamut compress */
+ gmi->gamcknf = 1.0; /* Full Sigma knee in gamut compress */
gmi->gamxknf = 0.0; /* No knee in gamut expand */
gmi->gampwf = 1.0; /* Full Perceptual surface weighting factor */
+ gmi->gamlpwf = 0.0; /* No Linear Preserving Perceptual surface wghtg. factor */
gmi->gamswf = 0.0; /* No Saturation surface weighting factor */
gmi->satenh = 0.0; /* No saturation enhancement */
}
@@ -2184,18 +2190,49 @@ char *as /* Alias string selector, NULL for none */
gmi->bph = gmm_bendBP; /* extent and bend */
gmi->gamcpf = 1.0; /* Full gamut compression */
gmi->gamexf = 0.0; /* No gamut expansion */
- gmi->gamcknf = 0.9; /* 0.9 High Sigma knee in gamut compress */
+ gmi->gamcknf = 1.0; /* Full Sigma knee in gamut compress */
gmi->gamxknf = 0.0; /* No knee in gamut expand */
gmi->gampwf = 1.0; /* Full Perceptual surface weighting factor */
+ gmi->gamlpwf = 0.0; /* No Linear Preserving Perceptual surface wghtg. factor */
gmi->gamswf = 0.0; /* No Saturation surface weighting factor */
gmi->satenh = 0.0; /* No saturation enhancement */
}
else if (no == 7
+ || (as != NULL && stricmp(as,"lp") == 0)) {
+
+ /* Align neutral axes and perceptually map white and black points, */
+ /* perceptually compress out of gamut and map appearance space Jab to Jab, */
+ /* and heavily weight preserving the luminance over saturation. */
+ /* No neutral axis sigma enhancement. */
+ no = 7;
+ gmi->as = "lp";
+ gmi->desc = "lp - Luminance Preserving Perceptual";
+ gmi->icci = icPerceptual;
+ gmi->usecas = perccas; /* Appearance space */
+// gmi->usecas = 0; /* Lab space */
+ gmi->usemap = 1; /* Use gamut mapping */
+ gmi->greymf = 1.0; /* Fully align grey axis */
+ gmi->glumwcpf = 1.0; /* Fully compress grey axis at white end */
+ gmi->glumwexf = 1.0; /* Fully expand grey axis at white end */
+ gmi->glumbcpf = 1.0; /* Fully compress grey axis at black end */
+ gmi->glumbexf = 1.0; /* Fully expand grey axis at black end */
+ gmi->glumknf = 0.3; /* Low Sigma knee in grey compress/expand */
+ gmi->bph = gmm_bendBP; /* extent and bend */
+ gmi->gamcpf = 1.0; /* Full gamut compression */
+ gmi->gamexf = 0.0; /* No gamut expansion */
+ gmi->gamcknf = 1.3; /* [1.3] High Sigma knee in gamut compress */
+ gmi->gamxknf = 0.0; /* No knee in gamut expand */
+ gmi->gampwf = 0.0; /* No Perceptual weighting factor */
+ gmi->gamlpwf = 1.0; /* Full Linear Preserving Perceptual wghtg. factor */
+ gmi->gamswf = 0.0; /* No Saturation weighting factor */
+ gmi->satenh = 0.0; /* No saturation enhancement */
+ }
+ else if (no == 8
|| (as != NULL && stricmp(as,"ms") == 0)) {
/* Align neutral axes and perceptually map white and black points, */
/* perceptually compress and expand to match gamuts and map Jab to Jab. */
- no = 7;
+ no = 8;
gmi->as = "ms";
gmi->desc = "ms - Saturation";
gmi->icci = icSaturation;
@@ -2210,18 +2247,19 @@ char *as /* Alias string selector, NULL for none */
gmi->bph = gmm_bendBP; /* extent and bend */
gmi->gamcpf = 1.0; /* Full gamut compression */
gmi->gamexf = 1.0; /* Full gamut expansion */
- gmi->gamcknf = 1.0; /* High Sigma knee in gamut compress/expand */
- gmi->gamxknf = 0.4; /* Moderate Sigma knee in gamut compress/expand */
+ gmi->gamcknf = 1.1; /* Sigma knee in gamut compress */
+ gmi->gamxknf = 0.4; /* Moderate Sigma knee in gamut expand */
gmi->gampwf = 0.2; /* Slight perceptual surface weighting factor */
+ gmi->gamlpwf = 0.0; /* No Linear Preserving Perceptual surface wghtg. factor */
gmi->gamswf = 0.8; /* Most saturation surface weighting factor */
gmi->satenh = 0.0; /* No saturation enhancement */
}
- else if (no == 8
+ else if (no == 9
|| no == icxSaturationGMIntent
|| (as != NULL && stricmp(as,"s") == 0)) {
/* Same as "ms" but enhance saturation */
- no = 8;
+ no = 9;
gmi->as = "s";
gmi->desc = " s - Enhanced Saturation [ICC Saturation]";
gmi->icci = icSaturation;
@@ -2236,17 +2274,18 @@ char *as /* Alias string selector, NULL for none */
gmi->bph = gmm_bendBP; /* extent and bend */
gmi->gamcpf = 1.0; /* Full gamut compression */
gmi->gamexf = 1.0; /* Full gamut expansion */
- gmi->gamcknf = 1.0; /* High sigma knee in gamut compress */
+ gmi->gamcknf = 1.1; /* High sigma knee in gamut compress */
gmi->gamxknf = 0.5; /* Moderate sigma knee in gamut expand */
gmi->gampwf = 0.0; /* No Perceptual surface weighting factor */
+ gmi->gamlpwf = 0.0; /* No Linear Preserving Perceptual surface wghtg. factor */
gmi->gamswf = 1.0; /* Full Saturation surface weighting factor */
gmi->satenh = 0.9; /* Medium saturation enhancement */
}
- else if (no == 9
+ else if (no == 10
|| (as != NULL && stricmp(as,"al") == 0)) {
/* Map absolute L*a*b* to L*a*b* and clip out of gamut */
- no = 9;
+ no = 10;
gmi->as = "al";
gmi->desc = "al - Absolute Colorimetric (Lab)";
gmi->icci = icAbsoluteColorimetric;
@@ -2264,15 +2303,16 @@ char *as /* Alias string selector, NULL for none */
gmi->gamcknf = 0.0;
gmi->gamxknf = 0.0;
gmi->gampwf = 0.0;
+ gmi->gamlpwf = 0.0; /* No Linear Preserving Perceptual surface wghtg. factor */
gmi->gamswf = 0.0;
gmi->satenh = 0.0; /* No saturation enhancement */
}
- else if (no == 10
+ else if (no == 11
|| (as != NULL && stricmp(as,"rl") == 0)) {
/* Align neutral axes and linearly map white point, then */
/* map L*a*b* to L*a*b* and clip out of gamut */
- no = 10;
+ no = 11;
gmi->as = "rl";
gmi->desc = "rl - White Point Matched Colorimetric (Lab)";
gmi->icci = icRelativeColorimetric;
@@ -2290,6 +2330,7 @@ char *as /* Alias string selector, NULL for none */
gmi->gamcknf = 0.0;
gmi->gamxknf = 0.0;
gmi->gampwf = 0.0;
+ gmi->gamlpwf = 0.0; /* No Linear Preserving Perceptual surface wghtg. factor */
gmi->gamswf = 0.0;
gmi->satenh = 0.0; /* No saturation enhancement */
}
@@ -2344,6 +2385,7 @@ icxGMappingIntent *gmi /* Gamut Mapping parameters to return */
printf(" Gamut compression knee factor %f\n", gmi->gamcknf);
printf(" Gamut expansion knee factor %f\n", gmi->gamxknf);
printf(" Gamut Perceptual mapping weighting factor %f\n", gmi->gampwf);
+ printf(" Gamut Lightness Preserving Perceptual mapping weighting %f\n", gmi->gamlpwf);
printf(" Gamut Saturation mapping weighting factor %f\n", gmi->gamswf);
printf(" Saturation enhancement factor %f\n", gmi->satenh);
}
diff --git a/xicc/xicc.h b/xicc/xicc.h
index f521de2..a5ecf95 100644..100755
--- a/xicc/xicc.h
+++ b/xicc/xicc.h
@@ -194,6 +194,8 @@ typedef struct {
char *desc; /* Possible description of this VC */
} icxViewCond;
+#define XICC_DEFAULT_GLARE 5 /* Default glare in % */
+
/* Method of black point adaptation */
typedef enum {
gmm_BPadpt = 0, /* Adapt source black point to destination */
@@ -222,6 +224,7 @@ typedef struct {
double gamcknf; /* Gamut compression knee factor, 0.0 - 1.0 */
double gamxknf; /* Gamut expansion knee factor, 0.0 - 1.0 */
double gampwf; /* Gamut Perceptual Map weighting factor, 0.0 - 1.0 */
+ double gamlpwf; /* Gamut Lightness preserving perceptual Map whtg. factor, 0.0 - 1.0 */
double gamswf; /* Gamut Saturation Map weighting factor, 0.0 - 1.0 */
double satenh; /* Saturation enhancement value, 0.0 - Inf */
char *as; /* Alias string (option name) */
diff --git a/xicc/xicclu.c b/xicc/xicclu.c
index 0ca00aa..f8fb9d6 100644..100755
--- a/xicc/xicclu.c
+++ b/xicc/xicclu.c
@@ -116,7 +116,7 @@ void usage(char *diag) {
fprintf(stderr," b:background Background %% of image luminance (default 20)\n");
fprintf(stderr," l:imagewhite Image white in cd.m^2 if surround = auto (default 250)\n");
fprintf(stderr," f:flare Flare light %% of image luminance (default 0)\n");
- fprintf(stderr," g:glare Flare light %% of ambient (default 1)\n");
+ fprintf(stderr," g:glare Flare light %% of ambient (default %d)\n",XICC_DEFAULT_GLARE);
fprintf(stderr," g:X:Y:Z Flare color as XYZ (default media white, Abs: D50)\n");
fprintf(stderr," g:x:y Flare color as x, y\n");
fprintf(stderr,"\n");
diff --git a/xicc/xlut.c b/xicc/xlut.c
index 827dde8..827dde8 100644..100755
--- a/xicc/xlut.c
+++ b/xicc/xlut.c
diff --git a/xicc/xlutfix.c b/xicc/xlutfix.c
index a0c0e4e..a0c0e4e 100644..100755
--- a/xicc/xlutfix.c
+++ b/xicc/xlutfix.c
diff --git a/xicc/xmatrix.c b/xicc/xmatrix.c
index 3d4fca6..3d4fca6 100644..100755
--- a/xicc/xmatrix.c
+++ b/xicc/xmatrix.c
diff --git a/xicc/xmono.c b/xicc/xmono.c
index fe9c55e..fe9c55e 100644..100755
--- a/xicc/xmono.c
+++ b/xicc/xmono.c
diff --git a/xicc/xspect.c b/xicc/xspect.c
index 6738113..6738113 100644..100755
--- a/xicc/xspect.c
+++ b/xicc/xspect.c
diff --git a/xicc/xspect.h b/xicc/xspect.h
index 3e0caeb..3e0caeb 100644..100755
--- a/xicc/xspect.h
+++ b/xicc/xspect.h
diff --git a/xicc/xutils.c b/xicc/xutils.c
index 019cee6..019cee6 100644..100755
--- a/xicc/xutils.c
+++ b/xicc/xutils.c
diff --git a/xicc/xutils.h b/xicc/xutils.h
index 27de570..27de570 100644..100755
--- a/xicc/xutils.h
+++ b/xicc/xutils.h