diff options
-rw-r--r-- | .gitignore | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | Jambase | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | Jamfile | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | Jamtop | 19 | ||||
-rwxr-xr-x[-rw-r--r--] | License.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | License2.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | License3.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | Makefile | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | Readme.txt | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | adirs | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | afiles | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | binfiles | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | blddirs | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/Jamfile | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/License.txt | 0 | ||||
-rw-r--r-- | ccast/Readme.txt | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/Jamfile | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/aes.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/asn1.c | 34 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/axTLS_config.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/axTLS_version.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/bigint.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/bigint.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/bigint_impl.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/cert.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/crypto.h | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/crypto_misc.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/crypto_misc.h | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/gen_cert.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/hmac.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/loader.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/md2.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/md5.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/openssl.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/os_int.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/os_port.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/os_port.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/p12.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/private_key.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/rc4.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/rsa.c | 44 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/sha1.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/ssl.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/temp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/tls1.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/tls1.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/tls1_clnt.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/tls1_svr.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/axTLS/x509.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/cast_channel.proto | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/ccast.c | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/ccast.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/ccmdns.c | 761 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/ccmdns.h | 17 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/ccmes.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/ccmes.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/ccpacket.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/ccpacket.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/cctest.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/chan/cast_channel.pb-c.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/chan/cast_channel.pb-c.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/chan/protobuf-c.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/chan/protobuf-c.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/dpat.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ccast/filt.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | cgats/Jamfile | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | cgats/License4.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | cgats/Makefile | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | cgats/Makefile.IBMNT | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | cgats/Makefile.OSX | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | cgats/Makefile.UNIX | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | cgats/Makefile.WNT | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | cgats/Readme.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | cgats/afiles | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | cgats/cgats.c | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | cgats/cgats.h | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | cgats/cgatsstd.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | cgats/makezip.ksh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | cgats/pars.c | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | cgats/pars.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | cgats/parsstd.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | cgats/test.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/3dformat.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ArgyllCMS_arts_tag.html | 0 | ||||
-rw-r--r-- | doc/ArgyllDoc.html | 1054 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ArgyllFlow.jpg | bin | 225826 -> 225826 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/ArgyllFlowThumb.jpg | bin | 10629 -> 10629 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/CMP_DT_003.jpg | bin | 23966 -> 23966 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/CMP_Digital_Target-4.jpg | bin | 21256 -> 21256 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/CMP_Digital_Target-7.jpg | bin | 20514 -> 20514 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/CRTspectrum.jpg | bin | 32231 -> 32231 bytes | |||
-rw-r--r-- | doc/ChangesSummary.html | 93 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/Chroma4.jpg | bin | 16118 -> 16118 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/ColorHug.jpg | bin | 28768 -> 28768 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/ColorManagement.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ColorMunki.jpg | bin | 43097 -> 43097 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/ColorMunkiCreate.jpg | bin | 29653 -> 29653 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/Compiling.html | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/CrushedDisplyBlacks.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/DC.jpg | bin | 23570 -> 23570 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/DTP20.jpg | bin | 83527 -> 83527 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/DTP22.jpg | bin | 51054 -> 51054 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/DTP41.jpg | bin | 78517 -> 78517 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/DTP51.jpg | bin | 52356 -> 52356 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/DTP92.jpg | bin | 41789 -> 41789 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/DTP94.jpg | bin | 46245 -> 46245 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/DocLicense.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/EX1.jpg | bin | 24772 -> 24772 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/Environment.html | 115 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/FWA.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/FWA_measure.jpg | bin | 23717 -> 23717 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/File_Formats.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/Fluorescent.jpg | bin | 35863 -> 35863 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/HCFR.jpg | bin | 21765 -> 21765 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/HCT.jpg | bin | 9601 -> 9601 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/HiResLaser.jpg | bin | 28163 -> 28163 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/Huey.jpg | bin | 30022 -> 30022 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/Installing.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/Installing_Linux.html | 839 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/Installing_MSWindows.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/Installing_OSX.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/JETI_1211.jpg | bin | 29663 -> 29663 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/JETI_1501.jpg | bin | 25629 -> 25629 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/K10A.jpg | bin | 24339 -> 24339 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/Kgraph1.jpg | bin | 14691 -> 14691 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/Kgraph2.jpg | bin | 13544 -> 13544 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/Kgraph3.jpg | bin | 14548 -> 14548 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/Kgraph4.jpg | bin | 14056 -> 14056 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/Kgraph5.jpg | bin | 14084 -> 14084 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/Kgraph6.jpg | bin | 14830 -> 14830 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/Kgraph7.jpg | bin | 15134 -> 15134 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/Kgraph8.jpg | bin | 14218 -> 14218 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/Kparams.jpg | bin | 15850 -> 15850 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/LSDC.jpg | bin | 12237 -> 12237 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/LabSteps.jpg | bin | 13335 -> 13335 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/License.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/License2.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/License3.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/License4.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/Limitations.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/MinorTools.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/Organisation.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/Overview.html | 0 | ||||
-rwxr-xr-x | doc/Passport.jpg | bin | 0 -> 10046 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/Performance.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/Q60.jpg | bin | 14943 -> 14943 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/QPcard201.jpg | bin | 4967 -> 4967 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/QPcard202.jpg | bin | 9016 -> 9016 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/SG.jpg | bin | 11348 -> 11348 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/SG_footer.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/SG_header.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/SMCube.jpg | bin | 11799 -> 11799 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/Scenarios.html | 224 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/Smile.jpg | bin | 25761 -> 25761 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/Source.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/Spyd2.jpg | bin | 64227 -> 64227 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/Spyd3.jpg | bin | 13975 -> 13975 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/Spyd3x.jpg | bin | 13519 -> 13519 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/Spyd4.jpg | bin | 11284 -> 11284 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/Spyd5.jpg | bin | 16499 -> 16499 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/SpyderChecker.jpg | bin | 12497 -> 12497 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/SpyderChecker24.jpg | bin | 7270 -> 7270 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/VideoEOTFs.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/WideGamutColmters.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/XRGA.html | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/YellowGreen.jpg | bin | 18404 -> 18404 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/afiles | 5 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/applycal.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/average.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/cal_format.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/calvschar.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/cb2ti3.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/DTP-94_1964_10_Dell_2408W.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/DTP-94_1997_Shaw_Dell_2408W.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/DTP-94_Dell_2408W.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/DTP-94_Dell_U2410.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/EyeOne_Display_1_NEC1990SXi.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/EyeOne_Display_2_EIZO_S2233W.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/EyeOne_Display_2_NEC1990SXi.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/EyeOne_Display_LT_U2410_Standard_1931.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/EyeOne_Display_LT_U2410_Standard_1964.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/EyeOne_Display_LT_U2410_sRGB_1931.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/EyeOne_Display_LT_U2410_sRGB_1964.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/Huey_Acer_al2016w.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/Huey_Eizo_CG243.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/Huey_HP_compaq_6730s.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/Huey_HP_lp2475w.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/Huey_NEC1990SXi.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/Huey_NEC_Spectraview_241.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/NEC_EyeOne_Display_2_NEC2690WUXi2.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/Spyder2_EIZO_S2433W_standard_1931.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/Spyder2_EIZO_S2433W_standard_1964.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/Spyder3_EIZO_S2233_standard_1964.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/Spyder3_EIZO_S2243W_standard_1931.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/Spyder3_HP_LP2475w.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/Spyder3_NEC2690WUXi2.ccmx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccmxs/Spyder3_NEC_PA301W.ccmx | 0 | ||||
-rwxr-xr-x | doc/ccsss.html | 56 | ||||
-rwxr-xr-x | doc/ccsss/MacBookProRetina2016.ccss | 24 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/cctiff.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ccxxmake.html | 207 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/chartread.html | 87 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/cht_format.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/collink.html | 1067 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/colorchecker.jpg | bin | 7522 -> 7522 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/colprof.html | 1076 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/colverify.html | 57 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/cube.jpg | bin | 11036 -> 11036 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/dispcal.html | 226 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/dispprofloc.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/dispread.html | 128 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/dispwin.html | 197 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/evalInputTargets.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/extracticc.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/extractttag.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/fakeCMY.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/fakeread.html | 57 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/filmread.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/filmtarg.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/gamma.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/gamutmapping1.jpg | bin | 19794 -> 19794 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/greytiff.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/i1d.jpg | bin | 36903 -> 36903 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/i1d3_1.jpg | bin | 16744 -> 16744 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/i1d3_2.jpg | bin | 16538 -> 16538 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/i1m.jpg | bin | 29888 -> 29888 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/i1p.jpg | bin | 62804 -> 62804 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/i1pro2.jpg | bin | 73450 -> 73450 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/i1proDriver.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/i1proDriver.xls | bin | 187392 -> 187392 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/i1proHiRes.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/i1proHiRes.jpg | bin | 26870 -> 26870 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/i1proHiRes.zip | bin | 319734 -> 319734 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/i1scan14.jpg | bin | 15925 -> 15925 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/iccdump.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/iccgamut.html | 313 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/iccgamutmapping.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/icclu.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/illumread.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/illumread_1.jpg | bin | 14047 -> 14047 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/illumread_2.jpg | bin | 13451 -> 13451 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/illumread_3.jpg | bin | 17753 -> 17753 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/illumread_4.jpg | bin | 21691 -> 21691 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/illumread_5.jpg | bin | 15948 -> 15948 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/illumread_6.jpg | bin | 8066 -> 8066 bytes | |||
-rwxr-xr-x | doc/inoutreferred.html | 48 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/instruments.html | 373 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/invprofcheck.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/kodak2ti3.html | 0 | ||||
-rwxr-xr-x | doc/ls2ti3.html | 37 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/monitorcontrols.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/mox.jpg | bin | 8355 -> 8355 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/moxxr.jpg | bin | 6289 -> 6289 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/mppcheck.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/mpplu.html | 382 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/mppprof.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/oeminst.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/printcal.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/printtarg.html | 162 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/profcheck.html | 40 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/refine.html | 89 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/revfix.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/scanin.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/sl.jpg | bin | 77102 -> 77102 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/spec2cie.html | 149 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/specplot.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/splitti3.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/spotread.html | 287 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/srgbplot.gif | bin | 3468 -> 3468 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/ss.jpg | bin | 65180 -> 65180 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/surface.jpg | bin | 11222 -> 11222 bytes | |||
-rwxr-xr-x[-rw-r--r--] | doc/synthcal.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/synthread.html | 347 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/targen.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ti3_format.html | 38 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/tiffgamut.html | 281 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/timage.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/txt2ti3.html | 16 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/ucmm.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/viewgam.html | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | doc/xicclu.html | 611 | ||||
-rwxr-xr-x[-rw-r--r--] | gamut/GenRMGam.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | gamut/GenVisGam.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | gamut/Jamfile | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | gamut/License.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | gamut/Readme.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | gamut/afiles | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | gamut/fakegam.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | gamut/gammap.c | 8 | ||||
-rwxr-xr-x[-rw-r--r--] | gamut/gammap.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | gamut/gammap.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | gamut/gamut.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | gamut/gamut.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | gamut/isecvol.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | gamut/maptest.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | gamut/nearsmth.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | gamut/nearsmth.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | gamut/smthtest.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | gamut/surftest.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | gamut/viewgam.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | h/License.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | h/Readme.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | h/aconfig.h | 10 | ||||
-rwxr-xr-x[-rw-r--r--] | h/afiles | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | h/copyright.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | h/counters.h | 30 | ||||
-rwxr-xr-x[-rw-r--r--] | h/llist.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | h/sort.h | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | h/xlist.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | icc/ClayRGB1998.icm | bin | 640 -> 640 bytes | |||
-rwxr-xr-x[-rw-r--r--] | icc/EBU3213_PAL.icm | bin | 9176 -> 9176 bytes | |||
-rwxr-xr-x[-rw-r--r--] | icc/Jamfile | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | icc/License4.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | icc/Makefile | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | icc/Makefile.IBMNT | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | icc/Makefile.OSX | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | icc/Makefile.UNIX | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | icc/Makefile.WNT | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | icc/ProPhoto.icm | bin | 2948 -> 2948 bytes | |||
-rwxr-xr-x[-rw-r--r--] | icc/ProPhotoLin.icm | bin | 2956 -> 2956 bytes | |||
-rwxr-xr-x[-rw-r--r--] | icc/Readme.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | icc/Rec2020.icm | bin | 9120 -> 9120 bytes | |||
-rwxr-xr-x[-rw-r--r--] | icc/Rec709.icm | bin | 2976 -> 2976 bytes | |||
-rwxr-xr-x[-rw-r--r--] | icc/SMPTE431_P3.icm | bin | 928 -> 928 bytes | |||
-rwxr-xr-x[-rw-r--r--] | icc/SMPTE_RP145_NTSC.icm | bin | 9156 -> 9156 bytes | |||
-rwxr-xr-x[-rw-r--r--] | icc/afiles | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | icc/icc.c | 698 | ||||
-rwxr-xr-x[-rw-r--r--] | icc/icc.h | 141 | ||||
-rwxr-xr-x[-rw-r--r--] | icc/iccV42.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | icc/iccdump.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | icc/icclu.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | icc/iccrw.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | icc/iccstd.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | icc/icctest.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | icc/lab2lab.icm | bin | 556 -> 556 bytes | |||
-rwxr-xr-x[-rw-r--r--] | icc/log.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | icc/lutest.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | icc/mcheck.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | icc/mkDispProf.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | icc/sRGB.icm | bin | 3268 -> 3268 bytes | |||
-rwxr-xr-x[-rw-r--r--] | icc/testDE2K.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | icc/todo.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/Jamfile | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/License.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/Makefile | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/Makefile.OSX | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/Makefile.UNIX | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/Makefile.WNT | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/Readme.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/afiles | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/cctiff.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/cctiffo.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/cgen.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/ctest.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/greytiff.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/imdi.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/imdi.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/imdi_arch.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/imdi_gen.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/imdi_gen.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/imdi_make.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/imdi_tab.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/imdi_tab.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/imdi_utl.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/itest.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/refi.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/refi.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | imdi/ssort.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | install.bat | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | jam.patch | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | jcnf/Jamfile | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | jcnf/Readme.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | jcnf/afiles | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | jcnf/jcnf.c | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | jcnf/jcnf.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | jcnf/test.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | jcnf/test.jcnf | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | lib/Readme.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | lib/afiles | 0 | ||||
-rw-r--r-- | link/Jamfile | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | link/collink.c | 118 | ||||
-rwxr-xr-x[-rw-r--r--] | link/monoplot.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | link/pathplot.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | log.txt | 144 | ||||
-rwxr-xr-x[-rw-r--r--] | makeall.bat | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | makeall.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | makeinstall.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | makeoemdnldbin.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | makepackagebin.sh | 9 | ||||
-rwxr-xr-x[-rw-r--r--] | namedc/Jamfile | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | namedc/License.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | namedc/afiles | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | namedc/namedc.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | namedc/namedc.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | namedc/txt2iccnc.c | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | notes.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/Jamfile | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/LUtest.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/License.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/Readme.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/aatree.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/aatree.h | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/afiles | 5 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/dhsx.c | 306 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/dhsx.h | 28 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/dnsq.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/dnsq.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/dnsqtest.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/ludecomp.c | 16 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/ludecomp.h | 14 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/numlib.h | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/numsup.c | 327 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/numsup.h | 88 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/powell.c | 121 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/powell.h | 24 | ||||
-rwxr-xr-x | numlib/qptest.c | 105 | ||||
-rwxr-xr-x | numlib/quadprog.c | 845 | ||||
-rwxr-xr-x | numlib/quadprog.h | 67 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/rand.c | 128 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/rand.h | 40 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/sobol.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/sobol.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/soboltest.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/svd.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/svd.h | 35 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/svdtest.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/tdhsx.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/tpowell.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/ui.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/ui.h | 0 | ||||
-rwxr-xr-x | numlib/varmet.c | 290 | ||||
-rwxr-xr-x | numlib/varmet.h | 55 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/zbrent.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/zbrent.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | numlib/zbrenttest.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/Imakefile | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/Jamfile | 7 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/License.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/Readme.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/X3DOM_LICENSE.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/afiles | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/plot.c | 37 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/plot.h | 11 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/vrml.c | 19 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/vrml.h | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/x3dom.css | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/x3dom.css.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/x3dom.js | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/x3dom.js.h | 0 | ||||
-rw-r--r-- | profile/Jamfile | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | profile/applycal.c | 5 | ||||
-rwxr-xr-x[-rw-r--r--] | profile/cb2ti3.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | profile/colprof.c | 84 | ||||
-rwxr-xr-x[-rw-r--r--] | profile/colverify.c | 38 | ||||
-rwxr-xr-x[-rw-r--r--] | profile/invprofcheck.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | profile/kodak2ti3.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | profile/ls2ti3.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | profile/mppcheck.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | profile/mppprof.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | profile/printcal.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | profile/prof.h | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | profile/profcheck.c | 36 | ||||
-rwxr-xr-x[-rw-r--r--] | profile/profin.c | 16 | ||||
-rwxr-xr-x[-rw-r--r--] | profile/profout.c | 34 | ||||
-rwxr-xr-x[-rw-r--r--] | profile/simpprof.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | profile/splitti3.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | profile/txt2ti3.c | 157 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/3dap5k.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/CIE_C.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/CMP_DT_003.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/CMP_Digital_Target-4.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/CMP_Digital_Target-4.cie | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/CMP_Digital_Target-4.ti2 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/CMP_Digital_Target-7.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/CRT.ccss | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/ClayRGB1998.icm | bin | 640 -> 640 bytes | |||
-rwxr-xr-x[-rw-r--r--] | ref/ColorChecker.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/ColorChecker.cie | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/ColorChecker.ti2 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/ColorCheckerDC.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/ColorCheckerDC.ti2 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/ColorCheckerPassport.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/ColorCheckerPassport.cie | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/ColorCheckerSG.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/ColorCheckerSG.ti2 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/D50_0.0.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/D50_0.1.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/D50_0.3.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/D50_0.5.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/D50_0.7.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/D50_1.0.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/D50_1.2.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/D50_1.5.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/D50_1.7.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/D50_2.0.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/D50_2.5.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/D50_3.0.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/EBU3213_PAL.icm | bin | 9176 -> 9176 bytes | |||
-rwxr-xr-x[-rw-r--r--] | ref/ECI2002.ti2 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/ECI2002R.ti2 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/F1.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/F5.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/F8.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/FograStrip2.ti1 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/FograStrip2_2.ti2 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/FograStrip3.ti1 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/FograStrip3_3.ti2 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/GTIPlus.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/Hutchcolor.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/LaserSoftDCPro.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/License.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/Office.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/ProPhoto.icm | bin | 2948 -> 2948 bytes | |||
-rwxr-xr-x[-rw-r--r--] | ref/ProPhotoLin.icm | bin | 2956 -> 2956 bytes | |||
-rwxr-xr-x[-rw-r--r--] | ref/QPcard_201.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/QPcard_201.cie | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/QPcard_202.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/QPcard_202.cie | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/ReadMe.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/Rec2020.icm | bin | 9120 -> 9120 bytes | |||
-rwxr-xr-x[-rw-r--r--] | ref/Rec709.icm | bin | 2976 -> 2976 bytes | |||
-rwxr-xr-x[-rw-r--r--] | ref/SMPTE431_P3.icm | bin | 928 -> 928 bytes | |||
-rwxr-xr-x[-rw-r--r--] | ref/SMPTE_RP145_NTSC.icm | bin | 9156 -> 9156 bytes | |||
-rwxr-xr-x[-rw-r--r--] | ref/SOtele.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/SpyderChecker.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/SpyderChecker.cie | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/SpyderChecker24.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/SpyderChecker24.cie | 0 | ||||
-rw-r--r-- | ref/StandardObs2deg.cmf | 23 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/Trulux.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/TruluxPlus.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/afiles | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/ccxx.ti1 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/cmyk.icm | bin | 961644 -> 961644 bytes | |||
-rwxr-xr-x[-rw-r--r--] | ref/example.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/example121.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/i1_RGB_Scan_1.4.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/i1_RGB_Scan_1.4.ti2 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/it8.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/lab2lab.icm | bin | 556 -> 556 bytes | |||
-rwxr-xr-x[-rw-r--r--] | ref/linear.cal | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | ref/sRGB.icm | bin | 3268 -> 3268 bytes | |||
-rwxr-xr-x[-rw-r--r--] | ref/strange.cal | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | render/Jamfile | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | render/License.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | render/Readme.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | render/afiles | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | render/makecharts.ksh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | render/render.c | 13 | ||||
-rwxr-xr-x[-rw-r--r--] | render/render.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | render/screens.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | render/thscreen.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | render/thscreen.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | render/timage.c | 2 | ||||
-rw-r--r-- | rspl/Jamfile | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/c1.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/c1df.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/cw1.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/cw3.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/gam.c | 13 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/gam.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/mlbs.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/mlbs.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/opt.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/rev.c | 963 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/rev.h | 17 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/revbench.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/rspl.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/rspl.h | 35 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/rspl1.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/rspl1.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/rspl_imp.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/scat.c | 127 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/scat2.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/sm1.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/sm2.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/sm3.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/smtmpp.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/smtnd.c | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/spline.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/stest.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/t2d.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/t2ddf.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/t3d.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/t3ddf.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/tnd.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | rspl/trnd.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/CMP_DT_003.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/CMP_Digital_Target-4.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/CMP_Digital_Target-4.cie | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/CMP_Digital_Target-4.ti2 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/CMP_Digital_Target-7.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/ColorChecker.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/ColorChecker.cie | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/ColorCheckerDC.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/ColorCheckerDC.ti2 | 0 | ||||
-rwxr-xr-x | scanin/ColorCheckerHalfPassport.cht | 58 | ||||
-rwxr-xr-x | scanin/ColorCheckerHalfPassport.cie | 38 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/ColorCheckerPassport.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/ColorCheckerPassport.cie | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/ColorCheckerSG.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/ColorCheckerSG.ti2 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/Hutchcolor.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/Jamfile | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/LaserSoftDCPro.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/License.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/QPcard_201.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/QPcard_201.cie | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/QPcard_202.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/QPcard_202.cie | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/Readme.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/SpyderChecker.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/SpyderChecker.cie | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/SpyderChecker24.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/SpyderChecker24.cie | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/afiles | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/i1_RGB_Scan_1.4.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/it8.cht | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/scanin.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/scanrd.c | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/scanrd.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | scanin/scanrd_.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/IntsLib_Readme.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/Jamfile | 34 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/License.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/License2.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/License3.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/LzmaDec.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/LzmaDec.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/LzmaTypes.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/Makefile.OSX | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/Makefile.SA | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/Makefile.UNIX | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/Makefile.WNT | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/Readme.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/SOtele.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/afiles | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/aglob.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/aglob.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/average.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/base64.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/base64.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/ccwin.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/ccwin.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/ccxx.ti1 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/ccxxmake.c | 48 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/chartread.c | 34 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/colorhug.c | 7 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/colorhug.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/conv.c | 41 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/conv.h | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/cubecal.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/dev.h | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/dispcal.c | 217 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/dispread.c | 39 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/dispsup.c | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/dispsup.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/disptechs.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/disptechs.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/dispwin.c | 580 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/dispwin.h | 14 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/dtp20.c | 5 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/dtp20.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/dtp22.c | 15 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/dtp22.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/dtp41.c | 5 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/dtp41.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/dtp51.c | 5 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/dtp51.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/dtp92.c | 37 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/dtp92.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/ex1.c | 7 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/ex1.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/fakeread.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/hcfr.c | 7 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/hcfr.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/hidio.c | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/hidio.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/huey.c | 28 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/huey.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/i1d3.c | 81 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/i1d3.h | 5 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/i1disp.c | 81 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/i1disp.h | 7 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/i1pro.c | 11 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/i1pro.h | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/i1pro_imp.c | 117 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/i1pro_imp.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/icoms.c | 179 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/icoms.h | 32 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/icoms_nt.c | 26 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/icoms_ux.c | 62 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/ifiles | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/illumread.c | 8 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/inflate.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/inst.c | 365 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/inst.h | 37 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/instappsup.c | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/instappsup.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/instlib.ksh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/instlib.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/insttypeinst.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/insttypes.c | 90 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/insttypes.h | 30 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/iusb.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/kleink10.c | 11 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/kleink10.h | 0 | ||||
-rwxr-xr-x | spectro/linear.cal | 272 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/linear.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/madvrwin.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/madvrwin.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/mongoose.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/mongoose.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/munki.c | 5 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/munki.h | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/munki_imp.c | 12 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/munki_imp.h | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/oemarch.c | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/oemarch.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/oeminst.c | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/pollem.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/pollem.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/rspec.c | 7 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/rspec.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/sa_conv.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/sa_conv.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/smcube.c | 7 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/smcube.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/spec2cie.c | 159 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/specbos.c | 260 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/specbos.h | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/spotread.c | 153 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/spyd2.c | 72 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/spyd2.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/ss.c | 71 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/ss.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/ss_imp.c | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/ss_imp.h | 0 | ||||
-rwxr-xr-x | spectro/strange.cal | 272 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/synthcal.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/synthread.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/usbio.c | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/usbio.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/usbio_bsd.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/usbio_lx.c | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/usbio_nt.c | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/usbio_ox.c | 13 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/vinflate.c | 0 | ||||
-rwxr-xr-x | spectro/vtpglut.c | 570 | ||||
-rwxr-xr-x | spectro/vtpglut.h | 243 | ||||
-rwxr-xr-x | spectro/vtpgluttypes.h | 44 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/webwin.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/webwin.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/xdg_bds.c | 52 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/xdg_bds.h | 7 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/xrga.c | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | spectro/xrga.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/ColorChecker.ti2 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/ECI2002.ti2 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/ECI2002R.ti2 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/FograStrip2.ti1 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/FograStrip2_2.ti2 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/FograStrip3.ti1 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/FograStrip3_3.ti2 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/Jamfile | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | target/License.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/Readme.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/afiles | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/alphix.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/alphix.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/filmtarg.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/i1_RGB_Scan_1.4.ti2 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/ifarp.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/ifarp.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/ofps.c | 8 | ||||
-rwxr-xr-x[-rw-r--r--] | target/ofps.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/ppoint.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/ppoint.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/prand.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/prand.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/printtarg.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/randix.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/randix.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/simdlat.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/simdlat.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/simplat.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/simplat.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/targen.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | target/targen.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ttbd.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | tweak/Jamfile | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | tweak/License.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | tweak/Readme.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | tweak/afiles | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | tweak/refine.c | 32 | ||||
-rwxr-xr-x[-rw-r--r--] | ucmm/Jamfile | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ucmm/afiles | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ucmm/ucmm.c | 615 | ||||
-rwxr-xr-x[-rw-r--r--] | ucmm/ucmm.h | 11 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/45-Argyll.rules | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/55-Argyll.rules | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/Argyll | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/Argyll.kext/Info.plist | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/Argyll.usermap | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/ArgyllCMS.cat | bin | 3551 -> 3635 bytes | |||
-rwxr-xr-x[-rw-r--r--] | usb/ArgyllCMS.inf | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/ArgyllCMS.inf.d | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/ArgyllCMS.inf.t | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/ArgyllCMS_x64.cat | bin | 3535 -> 3619 bytes | |||
-rwxr-xr-x[-rw-r--r--] | usb/Jamfile | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/afiles | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/binfiles.lx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/binfiles.msw | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/binfiles.osx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/AUTHORS.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/COPYING_GPL.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/LICENSE.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/Makefile | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/README.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/abort_endpoint.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/claim_interface.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/clear_feature.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/dispatch.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/driver_api.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/driver_debug.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/driver_debug.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/driver_registry.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/get_configuration.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/get_descriptor.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/get_interface.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/get_status.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/ioctl.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/libusb-win32-README-1.2.6.0.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/libusb_driver.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/libusb_driver.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/libusb_driver_rc.rc | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/lusb_defdi_guids.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/pnp.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/power.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/release_interface.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/reset_device.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/reset_endpoint.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/set_configuration.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/set_descriptor.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/set_feature.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/set_interface.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/transfer.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/usbd.def | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/usbdlib_gcc.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/driver/vendor_request.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | usb/install_kext.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/Jamfile | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/License.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/Readme.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/afiles | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/bt1886.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/bt1886.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/cam02.c | 127 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/cam02.h | 19 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/cam02plot.c | 8 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/cam02ref.h | 11 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/cam02test.c | 38 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/cam97s3.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/cam97s3.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/cam97test.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/ccmx.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/ccmx.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/ccss.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/ccss.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/ccttest.c | 5 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/cgatsplot.c | 53 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/cv.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/cvtest.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/example.sp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/extracticc.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/extractttag.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/fakeCMY.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/fbview.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/iccgamut.c | 38 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/iccjpeg.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/iccjpeg.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/icheck.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/monctest.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/moncurve.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/moncurve.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/mpp.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/mpp.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/mpplu.c | 30 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/revfix.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/specplot.c | 12 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/specsubsamp.c | 40 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/spectest.c | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/spectest2.c | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/tiffgamut.c | 57 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/tiffgmts.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/transplot.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xcal.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xcal.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xcam.c | 8 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xcam.h | 5 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xcolorants.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xcolorants.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xcolorantslu.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xdevlin.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xdevlin.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xdgb.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xdgb.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xfbview.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xfit.c | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xfit.h | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xicc.c | 72 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xicc.h | 23 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xicclu.c | 59 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xlut.c | 41 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xlutfix.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xmatrix.c | 16 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xmono.c | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xspect.c | 4584 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xspect.h | 78 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xutils.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xicc/xutils.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/ANNOUNCEMENT | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/CHANGES | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/COPYING | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/Makefile.in | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/README | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/afiles | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/config.h.in | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/configure | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/configure.in | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/doc/Mini-XML.pdf | bin | 599349 -> 599349 bytes | |||
-rwxr-xr-x[-rw-r--r--] | xml/install-sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/mxml-attr.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/mxml-config.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/mxml-entity.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/mxml-file.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/mxml-get.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/mxml-index.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/mxml-node.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/mxml-private.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/mxml-private.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/mxml-search.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/mxml-set.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/mxml-string.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/mxml.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/mxml.list.in | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/mxml.pc.in | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/mxml.spec | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/mxml.xml | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/mxmldoc.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/test.xml | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | xml/testmxml.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/COPYING | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/ChangeLog | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/Jamfile | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/README | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/TODO | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/afiles | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/json_verify.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/yajl.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/yajl.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/yajl_alloc.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/yajl_alloc.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/yajl_buf.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/yajl_buf.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/yajl_bytestack.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/yajl_common.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/yajl_encode.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/yajl_encode.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/yajl_gen.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/yajl_gen.h | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/yajl_lex.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/yajl_lex.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/yajl_parse.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/yajl_parser.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/yajl_parser.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/yajl_test.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/yajl_tree.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/yajl_tree.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/yajl_version.c | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | yajl/yajl_version.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | ziparch.sh | 0 |
983 files changed, 18000 insertions, 7587 deletions
diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 6c270cd..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.bzr -.bzrignore -.pc
\ No newline at end of file @@ -39,6 +39,16 @@ USE_USB = true ; # enable dummy Demo Instrument (only if code is available) USE_DEMOINST = true ; +# enable Video Test Patch Generator and 3DLUT device support +# (V2.0.0 and above) +USE_VTPGLUT = false ; + +# enable Printer device support +USE_PRINTER = false ; + +# enable CMF Measurement device support +USE_CMFM = false ; + # Use ArgyllCMS version of libusb (deprecated - don't use) USE_LIBUSB = false ; @@ -110,11 +120,14 @@ if $(UNIX) { } } if $(OS) = FREEBSD { - LINKFLAGS += -L$(LibWinD) -g -lrt -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss -lusb ; + LINKFLAGS += -g -lrt -lusb ; + GUILINKFLAGS += -L$(LibWinD) -g -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss ; } else if $(OS) = OPENBSD { - LINKFLAGS += -L$(LibWinD) -g -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss -L/usr/local/lib ; + LINKFLAGS += ; + GUILINKFLAGS += -L$(LibWinD) -g -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss -L/usr/local/lib ; } else { - LINKFLAGS += -L$(LibWinD) -ldl -lrt -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss ; + LINKFLAGS += -ldl -lrt ; + GUILINKFLAGS += -L$(LibWinD) -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss ; } # HDRS += $(LibWinH) ; } diff --git a/License.txt b/License.txt index a871fcf..a871fcf 100644..100755 --- a/License.txt +++ b/License.txt diff --git a/License2.txt b/License2.txt index 05ca889..05ca889 100644..100755 --- a/License2.txt +++ b/License2.txt diff --git a/License3.txt b/License3.txt index 94a9ed0..94a9ed0 100644..100755 --- a/License3.txt +++ b/License3.txt diff --git a/Readme.txt b/Readme.txt index f406d68..38c9ce1 100644..100755 --- a/Readme.txt +++ b/Readme.txt @@ -1,8 +1,8 @@ -Argyll CMS README file - Version 1.9.2 +Argyll CMS README file - Version 2.0.0 -------------------------------------- -Date: 17th October 2016 +Date: 17th November 2017 Author: Graeme Gill Introduction @@ -26,7 +26,7 @@ provided for each major tool, and a general guide to using the tools for typical color management tasks is also available. A mailing list provides support for more advanced usage. -This is Version 1.9.2, a bug fix update to the last release V1.9.1. +This is Version 2.0.0, a feature and bug fix update to the last major release V1.9.2. The first public release of icclib was in November 1998, and of Argyll was in October 2000. Code development commenced in 1995. See Changes Summary for an overview of changes since the last release. Changes diff --git a/ccast/Jamfile b/ccast/Jamfile index 3d03a2f..3d03a2f 100644..100755 --- a/ccast/Jamfile +++ b/ccast/Jamfile diff --git a/ccast/License.txt b/ccast/License.txt index a871fcf..a871fcf 100644..100755 --- a/ccast/License.txt +++ b/ccast/License.txt diff --git a/ccast/Readme.txt b/ccast/Readme.txt index 6823ba9..fc99019 100644 --- a/ccast/Readme.txt +++ b/ccast/Readme.txt @@ -3,10 +3,10 @@ rasters to the Google ChromeCast. Hierarchy: - cccast.c Top level actions & receive thread - ccmes.c Message handling, uses probuf + ccast.c Top level actions & receive thread + ccmes.c Message handling, uses protobuf chan/ protobuf encoding ccpacket.c socket write/read ccmdns.c MDNS sign on - axTLS SSL/TLS library + axTLS Standalone SSL/TLS library diff --git a/ccast/axTLS/Jamfile b/ccast/axTLS/Jamfile index 9a8aff4..5466680 100644..100755 --- a/ccast/axTLS/Jamfile +++ b/ccast/axTLS/Jamfile @@ -13,7 +13,7 @@ if $(NT) { } } -# tiff library +# axTLS library LIBSRCS = aes.c asn1.c diff --git a/ccast/axTLS/aes.c b/ccast/axTLS/aes.c index 9b07e27..9b07e27 100644..100755 --- a/ccast/axTLS/aes.c +++ b/ccast/axTLS/aes.c diff --git a/ccast/axTLS/asn1.c b/ccast/axTLS/asn1.c index b082275..b5e678e 100644..100755 --- a/ccast/axTLS/asn1.c +++ b/ccast/axTLS/asn1.c @@ -201,6 +201,40 @@ int asn1_get_private_key(const uint8_t *buf, int len, RSA_CTX **rsa_ctx) } /** + * Read the modulus and public exponent of an RSA certificate. + */ +int asn1_get_public_key(const uint8_t *cert, int *offset, RSA_CTX **rsa_ctx) +{ + int ret = X509_NOT_OK, mod_len, pub_len; + uint8_t *modulus = NULL, *pub_exp = NULL; + int len; + + /* Hmm. Not checking that the two ints are within the squence ... */ + if ((len = asn1_next_obj(cert, offset, ASN1_SEQUENCE)) < 0) + goto end_pub_key; + + if ((mod_len = asn1_get_int(cert, offset, &modulus)) <= 0) { + ret = X509_INVALID_PUB_KEY; + goto end_pub_key; + } + if ((pub_len = asn1_get_int(cert, offset, &pub_exp)) <= 0) { + free(modulus); + ret = X509_INVALID_PUB_KEY; + goto end_pub_key; + } + + RSA_pub_key_new(rsa_ctx, modulus, mod_len, pub_exp, pub_len); + + free(modulus); + free(pub_exp); + + ret = X509_OK; + +end_pub_key: + return ret; +} + +/** * Get the time of a certificate. Ignore hours/minutes/seconds. */ static int asn1_get_utc_time(const uint8_t *buf, int *offset, time_t *t) diff --git a/ccast/axTLS/axTLS_config.h b/ccast/axTLS/axTLS_config.h index ffda4e3..ffda4e3 100644..100755 --- a/ccast/axTLS/axTLS_config.h +++ b/ccast/axTLS/axTLS_config.h diff --git a/ccast/axTLS/axTLS_version.h b/ccast/axTLS/axTLS_version.h index e8158cc..e8158cc 100644..100755 --- a/ccast/axTLS/axTLS_version.h +++ b/ccast/axTLS/axTLS_version.h diff --git a/ccast/axTLS/bigint.c b/ccast/axTLS/bigint.c index e9ca04c..e9ca04c 100644..100755 --- a/ccast/axTLS/bigint.c +++ b/ccast/axTLS/bigint.c diff --git a/ccast/axTLS/bigint.h b/ccast/axTLS/bigint.h index 2966a3e..2966a3e 100644..100755 --- a/ccast/axTLS/bigint.h +++ b/ccast/axTLS/bigint.h diff --git a/ccast/axTLS/bigint_impl.h b/ccast/axTLS/bigint_impl.h index 820620d..820620d 100644..100755 --- a/ccast/axTLS/bigint_impl.h +++ b/ccast/axTLS/bigint_impl.h diff --git a/ccast/axTLS/cert.h b/ccast/axTLS/cert.h index 30c7b65..30c7b65 100644..100755 --- a/ccast/axTLS/cert.h +++ b/ccast/axTLS/cert.h diff --git a/ccast/axTLS/crypto.h b/ccast/axTLS/crypto.h index bf2c187..904000d 100644..100755 --- a/ccast/axTLS/crypto.h +++ b/ccast/axTLS/crypto.h @@ -204,6 +204,7 @@ void RSA_pub_key_new(RSA_CTX **rsa_ctx, void RSA_free(RSA_CTX *ctx); int RSA_decrypt(const RSA_CTX *ctx, const uint8_t *in_data, uint8_t *out_data, int is_decryption); +int RSA_decrypt2(const RSA_CTX *ctx, const uint8_t *in_data, uint8_t *out_data); bigint *RSA_private(const RSA_CTX *c, bigint *bi_msg); #if defined(CONFIG_SSL_CERT_VERIFICATION) || defined(CONFIG_SSL_GENERATE_X509_CERT) bigint *RSA_sign_verify(BI_CTX *ctx, const uint8_t *sig, int sig_len, diff --git a/ccast/axTLS/crypto_misc.c b/ccast/axTLS/crypto_misc.c index f43fd04..f43fd04 100644..100755 --- a/ccast/axTLS/crypto_misc.c +++ b/ccast/axTLS/crypto_misc.c diff --git a/ccast/axTLS/crypto_misc.h b/ccast/axTLS/crypto_misc.h index acb5c73..d1c843c 100644..100755 --- a/ccast/axTLS/crypto_misc.h +++ b/ccast/axTLS/crypto_misc.h @@ -55,6 +55,7 @@ extern "C" { #define X509_VFY_ERROR_INVALID_CHAIN -7 #define X509_VFY_ERROR_UNSUPPORTED_DIGEST -8 #define X509_INVALID_PRIV_KEY -9 +#define X509_INVALID_PUB_KEY -10 /* * The Distinguished Name @@ -128,6 +129,7 @@ const char * x509_display_error(int error); int get_asn1_length(const uint8_t *buf, int *offset); int asn1_get_private_key(const uint8_t *buf, int len, RSA_CTX **rsa_ctx); +int asn1_get_public_key(const uint8_t *cert, int *offset, RSA_CTX **rsa_ctx); int asn1_next_obj(const uint8_t *buf, int *offset, int obj_type); int asn1_skip_obj(const uint8_t *buf, int *offset, int obj_type); int asn1_get_int(const uint8_t *buf, int *offset, uint8_t **object); diff --git a/ccast/axTLS/gen_cert.c b/ccast/axTLS/gen_cert.c index fa22c4e..fa22c4e 100644..100755 --- a/ccast/axTLS/gen_cert.c +++ b/ccast/axTLS/gen_cert.c diff --git a/ccast/axTLS/hmac.c b/ccast/axTLS/hmac.c index 24a04d7..24a04d7 100644..100755 --- a/ccast/axTLS/hmac.c +++ b/ccast/axTLS/hmac.c diff --git a/ccast/axTLS/loader.c b/ccast/axTLS/loader.c index 92167be..92167be 100644..100755 --- a/ccast/axTLS/loader.c +++ b/ccast/axTLS/loader.c diff --git a/ccast/axTLS/md2.c b/ccast/axTLS/md2.c index dee909a..dee909a 100644..100755 --- a/ccast/axTLS/md2.c +++ b/ccast/axTLS/md2.c diff --git a/ccast/axTLS/md5.c b/ccast/axTLS/md5.c index 7f50713..7f50713 100644..100755 --- a/ccast/axTLS/md5.c +++ b/ccast/axTLS/md5.c diff --git a/ccast/axTLS/openssl.c b/ccast/axTLS/openssl.c index e3f8972..e3f8972 100644..100755 --- a/ccast/axTLS/openssl.c +++ b/ccast/axTLS/openssl.c diff --git a/ccast/axTLS/os_int.h b/ccast/axTLS/os_int.h index 8ae5878..8ae5878 100644..100755 --- a/ccast/axTLS/os_int.h +++ b/ccast/axTLS/os_int.h diff --git a/ccast/axTLS/os_port.c b/ccast/axTLS/os_port.c index 0bb74f8..0bb74f8 100644..100755 --- a/ccast/axTLS/os_port.c +++ b/ccast/axTLS/os_port.c diff --git a/ccast/axTLS/os_port.h b/ccast/axTLS/os_port.h index 8ede75a..8ede75a 100644..100755 --- a/ccast/axTLS/os_port.h +++ b/ccast/axTLS/os_port.h diff --git a/ccast/axTLS/p12.c b/ccast/axTLS/p12.c index 2bafaf7..2bafaf7 100644..100755 --- a/ccast/axTLS/p12.c +++ b/ccast/axTLS/p12.c diff --git a/ccast/axTLS/private_key.h b/ccast/axTLS/private_key.h index ce7985c..ce7985c 100644..100755 --- a/ccast/axTLS/private_key.h +++ b/ccast/axTLS/private_key.h diff --git a/ccast/axTLS/rc4.c b/ccast/axTLS/rc4.c index 12a1211..12a1211 100644..100755 --- a/ccast/axTLS/rc4.c +++ b/ccast/axTLS/rc4.c diff --git a/ccast/axTLS/rsa.c b/ccast/axTLS/rsa.c index e707f2b..14948eb 100644..100755 --- a/ccast/axTLS/rsa.c +++ b/ccast/axTLS/rsa.c @@ -188,6 +188,50 @@ int RSA_decrypt(const RSA_CTX *ctx, const uint8_t *in_data, } /** + * @brief Use PKCS1.5 for decryption. + * @param ctx [in] The context + * @param in_data [in] The data to encrypt + * @param out_data [out] The decrypted data. + * @return The number of bytes that were originally encrypted. -1 on error. + */ +int RSA_decrypt2(const RSA_CTX *ctx, const uint8_t *in_data, uint8_t *out_data) +{ + const int byte_size = ctx->num_octets; + int i, size; + bigint *decrypted_bi, *dat_bi; + uint8_t *block = (uint8_t *)malloc(byte_size); + + /* decrypt */ + dat_bi = bi_import(ctx->bi_ctx, in_data, byte_size); + + decrypted_bi = RSA_public(ctx, dat_bi); /* Frees dat_bi and exponent ? */ + + /* convert to a normal block (frees decrypted_bi) */ + bi_export(ctx->bi_ctx, decrypted_bi, block, byte_size); + + + /* We assume this is padded with "0001ff....ff00" */ + i = 2; + while (block[i++] == 0xff && i < byte_size) + ; + + /* Skip last 0x00 */ + if (i < byte_size && block[i] == 0x00) + i++; + + size = byte_size - i; + + /* get only the bit we want */ + if (size > 0) { + memcpy(out_data, &block[i], size); + } + + free(block); + + return size ? size : -1; +} + +/** * Performs m = c^d mod n */ bigint *RSA_private(const RSA_CTX *c, bigint *bi_msg) diff --git a/ccast/axTLS/sha1.c b/ccast/axTLS/sha1.c index 1082733..1082733 100644..100755 --- a/ccast/axTLS/sha1.c +++ b/ccast/axTLS/sha1.c diff --git a/ccast/axTLS/ssl.h b/ccast/axTLS/ssl.h index 3f001da..3f001da 100644..100755 --- a/ccast/axTLS/ssl.h +++ b/ccast/axTLS/ssl.h diff --git a/ccast/axTLS/temp b/ccast/axTLS/temp index 859e8be..859e8be 100644..100755 --- a/ccast/axTLS/temp +++ b/ccast/axTLS/temp diff --git a/ccast/axTLS/tls1.c b/ccast/axTLS/tls1.c index d8ce892..d8ce892 100644..100755 --- a/ccast/axTLS/tls1.c +++ b/ccast/axTLS/tls1.c diff --git a/ccast/axTLS/tls1.h b/ccast/axTLS/tls1.h index 14c6382..14c6382 100644..100755 --- a/ccast/axTLS/tls1.h +++ b/ccast/axTLS/tls1.h diff --git a/ccast/axTLS/tls1_clnt.c b/ccast/axTLS/tls1_clnt.c index cb8b990..cb8b990 100644..100755 --- a/ccast/axTLS/tls1_clnt.c +++ b/ccast/axTLS/tls1_clnt.c diff --git a/ccast/axTLS/tls1_svr.c b/ccast/axTLS/tls1_svr.c index 51c9d76..51c9d76 100644..100755 --- a/ccast/axTLS/tls1_svr.c +++ b/ccast/axTLS/tls1_svr.c diff --git a/ccast/axTLS/x509.c b/ccast/axTLS/x509.c index c2ca49f..c2ca49f 100644..100755 --- a/ccast/axTLS/x509.c +++ b/ccast/axTLS/x509.c diff --git a/ccast/cast_channel.proto b/ccast/cast_channel.proto index d321eaf..d321eaf 100644..100755 --- a/ccast/cast_channel.proto +++ b/ccast/cast_channel.proto diff --git a/ccast/ccast.c b/ccast/ccast.c index 2a2c1a8..26a4dee 100644..100755 --- a/ccast/ccast.c +++ b/ccast/ccast.c @@ -71,8 +71,8 @@ static void check_json(char *mesbuf) { /* Read messages. If they are ones we deal with, send a reply */ /* If they are anonomous (sessionId == 0), then ignore them */ -/* (Could save last known anonomous message if they prove useful) */ /* and if they are numbered, keep then in a sorted list. */ +/* (Could save last known anonomous message if they prove useful) */ static int cc_rec_thread(void *context) { ccast *p = (ccast *)context; diff --git a/ccast/ccast.h b/ccast/ccast.h index 7014679..7014679 100644..100755 --- a/ccast/ccast.h +++ b/ccast/ccast.h diff --git a/ccast/ccmdns.c b/ccast/ccmdns.c index 1000db3..8fd7046 100644..100755 --- a/ccast/ccmdns.c +++ b/ccast/ccmdns.c @@ -130,10 +130,12 @@ typedef int SOCKET; # define DBG(xxx) a1logd xxx ; # define DBG2(xxx) a1logd xxx ; # define DLEV 0 +# define DLEVP1 0 #else # define DBG(xxx) ; # define DBG2(xxx) a1logd xxx ; # define DLEV 2 +# define DLEVP1 3 #endif /* DEBUG */ /* ================================================================ */ @@ -144,7 +146,7 @@ typedef int SOCKET; #define SOURCE_PORT 5353 #define DESTINATION_PORT 5353 -#define BUFSIZE 1024 +#define BUFSIZE 2048 /* Various DNS defines */ #define DNS_CLASS_IN 0x0001 @@ -158,6 +160,25 @@ typedef int SOCKET; #define DNS_TYPE_NSEC 47 /* DNS Next Secure Name */ +char *cctype2str(cctype typ) { + switch (typ) { + case cctyp_unkn: + return "Unknown"; + case cctyp_1: + return "One"; + case cctyp_2: + return "Two"; + case cctyp_Audio: + return "Audio"; + case cctyp_Ultra: + return "Ultra"; + case cctyp_Other: + return "Other"; + default: + return "Unexpected"; + } +} + #ifdef NEVER /* Print out a V6 address in zero compresed form */ /* (It would be nice to add zero compression) */ @@ -201,20 +222,21 @@ static int init_mDNS() { return 0; } -/* Setup the send socket */ +/* Setup the send and recieve socket */ /* Return nz on error */ -static int init_send_mDNS(SOCKET *psock) { +static int init_socket_mDNS(SOCKET *psock) { int nRet, nOptVal; int off; SOCKET sock; struct sockaddr_in stSourceAddr; + struct ip_mreq stIpMreq; - DBG((g_log,0,"init_send_mDNS() called\n")) + DBG((g_log,0,"init_socket_mDNS() called\n")) /* get a datagram (UDP) socket */ sock = socket(PF_INET, SOCK_DGRAM, 0); if (sock == INVALID_SOCKET) { - DBG((g_log,0,"opening send UDP socked failed with %d\n",ERRNO)) + DBG((g_log,0,"opening UDP socked failed with %d\n",ERRNO)) return 1; } @@ -234,7 +256,7 @@ static int init_send_mDNS(SOCKET *psock) { { int on = 1; if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (const char *)&on, sizeof(on))) { - DBG((g_log,0,"setsockopt(SO_REUSEADDR) failed with %d\n",ERRNO)) + DBG((g_log,0,"setsockopt(SO_REUSEADDR) failed with %d\n",ERRNO)) closesocket(sock); return 1; } @@ -272,6 +294,9 @@ static int init_send_mDNS(SOCKET *psock) { return 1; } + /* - - - - - - - */ + /* Send setup */ + /* disable loopback of multicast datagrams we send, since the * default--according to Steve Deering--is to loopback all * datagrams sent on any interface which is a member of the @@ -306,13 +331,55 @@ static int init_send_mDNS(SOCKET *psock) { if (psock != NULL) *psock = sock; - DBG((g_log,0,"init sending mDNS succeed\n",ERRNO)) + /* - - - - - - - */ + /* Recieve setup */ + + /* join the multicast group we want to receive datagrams from */ + stIpMreq.imr_multiaddr.s_addr = inet_addr(DESTINATION_MCAST); /* group addr */ + stIpMreq.imr_interface.s_addr = INADDR_ANY; /* use default */ + nRet = setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, + (char *)&stIpMreq, sizeof (struct ip_mreq)); + + if (nRet == SOCKET_ERROR) { + DBG((g_log,0,"registering for read events failed with %d\n",ERRNO)) + closesocket(sock); + return 1; + } + + /* Make this timeout after 100 msec second */ +#ifdef NT + { + DWORD tv; + tv = 100; + if (setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, (const char*)&tv, sizeof(tv)) < 0) { + DBG((g_log,0,"setsockopt timout failed with %d\n",ERRNO)) + closesocket(sock); + return 1; + } + } +#else + { + struct timeval tv; + tv.tv_sec = 0; + tv.tv_usec = 100 * 1000; + if (setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, (const char*)&tv, sizeof(tv)) < 0) { + DBG((g_log,0,"setsockopt timout failed with %d\n",ERRNO)) + closesocket(sock); + return 1; + } + } +#endif + + if (psock != NULL) + *psock = sock; + + DBG((g_log,0,"init mDNS socket succeed\n",ERRNO)) return 0; } -/* Send an mDNS quesry */ -/* on some platforms if we try to transmit & recieve at the same time */ +/* Send an mDNS query */ +/* On some platforms if we try to transmit & recieve at the same time (what ?) */ /* Return nz on error */ static int send_mDNS(SOCKET sock) { int nRet; @@ -360,7 +427,7 @@ static int send_mDNS(SOCKET sock) { return 0; } -static int parse_dns(char **name, char **ip, ORD8 *buf, int size); +static int parse_dns(char **name, char **ip, cctype *ptyp, int *pcaflags, ORD8 *buf, int size); /* Free up what get_ccids returned */ void free_ccids(ccast_id **ids) { @@ -379,132 +446,22 @@ void free_ccids(ccast_id **ids) { /* Spend the given time waiting for replies. */ /* (Note than on MSWin this will be a minimum of 500msec) */ /* Add any ChromeCast replies to the list. */ -/* return nz on error */ -static int init_receive_mDNS(SOCKET *psock) { - int nRet; - int off, size; - struct sockaddr_in stSourceAddr; - struct ip_mreq stIpMreq; - SOCKET sock; - - DBG((g_log,0,"init_receive_mDNS() called\n")) - - /* get a datagram (UDP) socket */ - sock = socket(PF_INET, SOCK_DGRAM, 0); - if (sock == INVALID_SOCKET) { - DBG((g_log,0,"opening receive UDP socked failed with %d\n",ERRNO)) - return 1; - } - - /* We can't receive from port 5353 if someone else is using it, */ - /* so set the SO_REUSEADDR option (which is enough for MSWin), */ - /* and SO_REUSEPORT for OS X and Linux */ - { - int on = 1, off = 0; - if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (const char *) &on, sizeof(on))) { - DBG((g_log,0,"setsockopt(SO_REUSEADDR) failed with %d\n",ERRNO)) - closesocket(sock); - return 1; - } - - /* Need this to be able to open port on Unix like systems */ -#ifndef NT -# ifndef SO_REUSEPORT -# ifdef __APPLE__ -# define SO_REUSEPORT 0x0200 -# else /* Linux */ -# define SO_REUSEPORT 15 -# endif -# endif - if (setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, (const char *)&on, sizeof(on))) { - DBG((g_log,0,"setsockopt(SO_REUSEPORT) failed with %d\n",ERRNO)) - } -#endif - } - - /* init source address structure */ - stSourceAddr.sin_family = PF_INET; - stSourceAddr.sin_port = htons(SOURCE_PORT); - stSourceAddr.sin_addr.s_addr = INADDR_ANY; - - /* - * Calling bind() is not required, but some implementations need it - * before you can reference any multicast socket options - * and in this case we must be on port 5353. - */ - nRet = bind(sock, (struct sockaddr *)&stSourceAddr, - sizeof(struct sockaddr)); - if (nRet == SOCKET_ERROR) { - DBG((g_log,0,"bind failed with %d\n",ERRNO)) - closesocket(sock); - return 1; - } - - /* join the multicast group we want to receive datagrams from */ - stIpMreq.imr_multiaddr.s_addr = inet_addr(DESTINATION_MCAST); /* group addr */ - stIpMreq.imr_interface.s_addr = INADDR_ANY; /* use default */ - nRet = setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, - (char *)&stIpMreq, sizeof (struct ip_mreq)); - - if (nRet == SOCKET_ERROR) { - DBG((g_log,0,"registering for read events failed with %d\n",ERRNO)) - closesocket(sock); - return 1; - } - - /* Make this timeout after 100 msec second */ -#ifdef NT - { - DWORD tv; - tv = 100; - if (setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, (const char*)&tv, sizeof(tv)) < 0) { - DBG((g_log,0,"setsockopt timout failed with %d\n",ERRNO)) - closesocket(sock); - return 1; - } - } -#else - { - struct timeval tv; - tv.tv_sec = 0; - tv.tv_usec = 100 * 1000; - if (setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, (const char*)&tv, sizeof(tv)) < 0) { - DBG((g_log,0,"setsockopt timout failed with %d\n",ERRNO)) - closesocket(sock); - return 1; - } - } -#endif - - if (psock != NULL) - *psock = sock; - - return 0; -} - -/* Spend the given time waiting for replies. */ -/* (Note than on MSWin this will be a minimum of 500msec) */ -/* Add any ChromeCast replies to the list. */ /* return nz on error & free *ids */ -static int receive_mDNS(SOCKET sock, ccast_id ***ids, int emsec) { - int nids = 0; +static int receive_mDNS(SOCKET sock, ccast_id ***ids, int *nids, int emsec) { unsigned int smsec; unsigned int nSize; int off, size; ORD8 achInBuf[BUFSIZE]; struct sockaddr_in stSourceAddr; - /* Count the number of current id's */ - if (*ids != NULL) { - for (nids = 0; (*ids)[nids] != NULL; nids++) - ; - } - - DBG((g_log,0,"receive_mDNS() called with %d ids\n",nids)) + DBG((g_log,0,"receive_mDNS() called with %d ids\n",*nids)) + /* While there is still wait time */ for (smsec = msec_time(), emsec += smsec;msec_time() <= emsec;) { int i; char *name, *ip; + cctype typ; + int caflags; /* (We're not currently saving this) */ struct sockaddr stSockAddr; /* Recv the available data */ @@ -514,75 +471,86 @@ static int receive_mDNS(SOCKET sock, ccast_id ***ids, int emsec) { if (size == SOCKET_ERROR) { if (ERRNO == UDP_SOCKET_TIMEOUT) continue; /* Timeout */ - DBG((g_log,0,"recvfrom failed with %d\n",ERRNO)) + DBG2((g_log,DLEV,"recvfrom failed with %d\n",ERRNO)) free_ccids(*ids); *ids = NULL; return 1; } - DBG((g_log,0,"Got mDNS message length %d bytes\n",size)) + + DBG2((g_log,DLEVP1,"Got mDNS message length %d bytes\n",size)) #ifdef DEBUG adump_bytes(g_log, " ", achInBuf, 0, size); #endif - if (parse_dns(&name, &ip, achInBuf, size) != 0) { + if (parse_dns(&name, &ip, &typ, &caflags, achInBuf, size) != 0) { DBG((g_log,0,"Failed to parse the reply\n")) } else { DBG((g_log,0,"Parsed reply OK\n")) -//if (*pnids > 0) { -// name = strdup("Argyll1234"); -// ip = strdup("10.0.0.129"); -//} /* If we found an entry */ if (name != NULL && ip != NULL) { - DBG((g_log,0,"Got a name '%s' & IP '%s'\n",name,ip)) - /* Check if it is a duplcate */ - for (i = 0; i < nids; i++) { - if (strcmp((*ids)[i]->name, name) == 0 - && strcmp((*ids)[i]->ip, ip) == 0) - break; /* yes */ - } - if (i < nids) { - DBG((g_log,0,"Duplicate\n")) + DBG((g_log,0,"Got a name '%s', IP '%s', type %s\n",name,ip, cctype2str(typ))) + + /* Check if it is a Chromecast-Audio or Other */ + if (typ == cctyp_Audio + || typ == cctyp_Other) { + DBG((g_log,0,"Ignoring Chromecast-Audio/Other\n")) free(name); free(ip); + } else { - ccast_id **tids; - if ((tids = realloc(*ids, (nids + 2) * sizeof(ccast_id *))) == NULL - || (*ids = tids, (*ids)[nids] = malloc(sizeof(ccast_id)), (*ids)[nids]) == NULL) { - DBG((g_log,0,"realloc/malloc fail\n")) + + /* Check if it is a duplcate */ + for (i = 0; i < *nids; i++) { + if (strcmp((*ids)[i]->name, name) == 0 + && strcmp((*ids)[i]->ip, ip) == 0) + break; /* yes */ + } + if (i < *nids) { + DBG((g_log,0,"Duplicate\n")) free(name); free(ip); - free_ccids(*ids); - *ids = NULL; - return 1; } else { - DBG((g_log,0,"Adding entry\n")) - (*ids)[nids]->name = name; - (*ids)[nids]->ip = ip; - (*ids)[++nids] = NULL; /* End marker */ + ccast_id **tids; + if ((tids = realloc(*ids, (*nids + 2) * sizeof(ccast_id *))) == NULL + || (*ids = tids, (*ids)[*nids] = malloc(sizeof(ccast_id)), (*ids)[*nids]) == NULL) { + DBG((g_log,0,"realloc/malloc fail\n")) + free(name); + free(ip); + free_ccids(*ids); + *ids = NULL; + return 1; + } else { + DBG((g_log,0,"Adding entry\n")) + (*ids)[*nids]->name = name; + (*ids)[*nids]->ip = ip; + (*ids)[*nids]->typ = typ; + (*nids)++; + (*ids)[*nids] = NULL; /* End marker */ + } } } } } } - DBG((g_log,0,"receive_mDNS() returning %d in list\n",nids)) + DBG2((g_log,DLEVP1,"receive_mDNS() returning %d in list\n",*nids)) return 0; } /* ==================================================================== */ -/* Get a list of Chromecasts. Return NULL on error */ +/* Get a list of Video output capable Chromecasts. Return NULL on error */ /* Last pointer in array is NULL */ -/* Takes 1.0 second to return */ +/* Takes 1.5 second to return */ ccast_id **get_ccids() { ccast_id **ids = NULL; + int nids = 0; int i, j, k; unsigned int smsec; - int waittime = 100; - SOCKET ssock, rsock; + int waittime = 200; + SOCKET sock; DBG2((g_log,DLEV,"get_ccids: called\n")) @@ -591,45 +559,38 @@ ccast_id **get_ccids() { return NULL; } - if (init_send_mDNS(&ssock)) { - DBG2((g_log,0,"get_ccids: init_send_mDNS() failed\n")) - return NULL; - } - - if (init_receive_mDNS(&rsock)) { - DBG2((g_log,0,"get_ccids: init_receive_mDNS() failed\n")) - closesocket(ssock); + if (init_socket_mDNS(&sock)) { + DBG2((g_log,0,"get_ccids: init_socket_mDNS() failed\n")) return NULL; } smsec = msec_time(); /* Try a few times, with increasing response wait time */ - for (k = 1; ids == NULL && (msec_time() - smsec) < 1000; k++) { + for (k = 1; + ((msec_time() - smsec) < 700) + || (nids == 0 && (msec_time() - smsec) < 1600); + k++) { DBG2((g_log,DLEV,"get_ccids: Sending mDNS query #%d:\n",k)) - if (send_mDNS(ssock)) { + if (send_mDNS(sock)) { DBG2((g_log,0,"get_ccids: send_mDNS() #1 failed\n")) - closesocket(ssock); - closesocket(rsock); + closesocket(sock); return NULL; } DBG2((g_log,DLEV,"get_ccids: Waiting for mDNS reply #%d:\n",k)) - if (receive_mDNS(rsock, &ids, waittime)) { + if (receive_mDNS(sock, &ids, &nids, waittime)) { DBG2((g_log,0,"get_ccids: receive_mDNS() #%d failed\n",k)) - closesocket(ssock); - closesocket(rsock); + closesocket(sock); return NULL; } - if (ids != NULL) - DBG2((g_log,DLEV,"get_ccids: Got reply\n")) + DBG2((g_log,DLEV,"get_ccids: have %d %s\n",nids, nids == 1 ? "reply" : "replies")) - waittime *= 2; + if (waittime < 500) + waittime = 500; } - - closesocket(ssock); - closesocket(rsock); + closesocket(sock); /* If no ChromCasts found, return an empty list */ if (ids == NULL) { @@ -655,6 +616,7 @@ ccast_id **get_ccids() { DBG2((g_log,DLEV," Entry %d:\n",i)) DBG2((g_log,DLEV," Name: %s\n",ids[i]->name)) DBG2((g_log,DLEV," IP: %s\n",ids[i]->ip)) + DBG2((g_log,DLEV," Type: %s\n",cctype2str(ids[i]->typ))) } DBG2((g_log,DLEV,"get_ccids: Returning %d devices\n",i)) @@ -698,46 +660,66 @@ static int read_string_imp(char **rv, int *slen, ORD8 *buf, int off, int size, i int len; int d1 = 0; -//printf("~1 read_string_imp called for off 0x%x rec %d\n",off,rec); + DBG((g_log,8,"read_string_imp called for off %d (0x%x) rec %d\n",off,off,rec)); - if (rec > 10) /* Too many recursions */ + if (rec > 10) { /* Too many recursions */ + DBG((g_log,8,"read_string_imp too many recursions\n")); return -1; /* Error */ + } - if (off >= size) + if (off >= size) { + DBG((g_log,8,"read_string_imp off %d >= size %d\n",off,size)); return -1; /* Error */ + } for (;;) { -//printf("~1 top of loop at off 0x%x\n",off); + DBG((g_log,8,"top of loop at off %d\n",off)); len = buf[off]; - if (len == 0xc0) { /* Is it an offset marker */ + if ((len & 0xc0) == 0xc0) { /* Is it an offset marker */ int poff; -//printf("~1 got pointer\n"); - if ((size - off) < 2) + + DBG((g_log,8,"got pointer\n")); + if ((size - off) < 2) { + DBG((g_log,8,"read_string_imp size %d - off %d < 2\n",size,off)); return -1; + } poff = read_ORD16_be(buf + off); off += 2; poff -= 0xc000; - if (poff < 0 || poff >= size) + if (poff < 0 || poff >= size) { return -1; + } + DBG((g_log,8,"read_string_imp recursing\n")); read_string_imp(rv, slen, buf, poff, size, rec+1); -//if (slen != NULL) printf("~1 after recurse, slen = %d, off = 0x%x\n",*slen,off); + if (slen != NULL) { + DBG((g_log,8,"after recurse, slen = %d, off = %d (0x%x)\n",*slen,off,off)); + } break; /* we're done */ } else { -//printf("~1 got string length %d\n",len); + DBG((g_log,8,"got string length %d\n",len)); + off++; - if ((off + len) >= size) + if ((off + len) >= size) { + DBG((g_log,8,"read_string_imp size off %d + len %d >= size %d\n",off,len,size)); return -1; + } - if (len == 0) + if (len == 0) { + DBG((g_log,8,"read_string_imp len == 0 - done\n")); break; /* we're done */ + } if (rv != NULL) { memcpy(*rv, buf + off, len); -//(*rv)[len] = '\000'; printf("Copied string %p = '%s'\n",*rv,*rv); + +#ifdef DEBUG + (*rv)[len] = '\000'; + DBG((g_log,8,"Copied string %p = '%s'\n",*rv,*rv)); +#endif *rv += len; } @@ -745,21 +727,25 @@ static int read_string_imp(char **rv, int *slen, ORD8 *buf, int off, int size, i if (slen != NULL) { (*slen) += len; -//printf("~1 slen now = %d\n",*slen); + DBG((g_log,8,"slen now = %d\n",*slen)); } } d1 = 1; - if (slen != NULL) + if (slen != NULL) { (*slen)++; + } if (rv != NULL) { (*rv)[0] = '.'; (*rv)++; } } -//if (slen != NULL) printf("~1 returning slen = %d\n",*slen); + if (slen != NULL) { + DBG((g_log,8,"returning slen = %d\n",*slen)); + } + return off; } @@ -769,29 +755,31 @@ static int read_string(char **rv, ORD8 *buf, int off, int size) { int len = 0, toff = off; char *trv; -//printf("~1 read_string called for off 0x%x\n",off); + DBG((g_log,7,"read_string called for off 0x%x\n",off)); /* See how long it will be */ if ((toff = read_string_imp(NULL, &len, buf, off, size, 0)) < 0) { -//printf("~1 read_string_imp length returned error\n"); + DBG((g_log,7,"read_string_imp length returned error\n")); return toff; } -//printf("~1 read_string_imp got length %d\n",len); + DBG((g_log,7,"read_string_imp got length %d\n",len)); if (len == 0) { -//printf("~1 Got zero length string\n"); + DBG((g_log,7,"Got zero length string\n")); len++; /* Room for null string */ } if ((*rv = trv = malloc(len)) == NULL) { + DBG((g_log,7,"malloc for string failed\n")); return -1; } -//printf("Malloced %p\n",*rv); + DBG((g_log,7,"loced %p\n",*rv)); off = read_string_imp(&trv, NULL, buf, off, size, 0); if (off >= 0) { (*rv)[len-1] = '\000'; -//printf("~1 read string ok: %p = '%s'\n",*rv, *rv); + DBG((g_log,7,"read string ok: %p = '%s'\n",*rv, *rv)); + } else { + DBG((g_log,7,"reading string failed\n")); } -//else printf("~1 reading string failed\n"); return off; } @@ -820,9 +808,9 @@ int parse_query(ORD8 *buf, int off, int size) { return off; } -/* Parse an mDNS reply */ +/* Parse an mDNS reply, and set Friendly name (if known) + formal name + IP */ /* Return updated off value or -1 on error */ -int parse_reply(char **pname, char **pip, ORD8 *buf, int off, int size) { +int parse_reply(char **pname, char **pip, cctype *ptyp, int *pcaflags, ORD8 *buf, int off, int size) { char *sv; int rtype, rclass, rdlength; unsigned int ttl; @@ -831,21 +819,21 @@ int parse_reply(char **pname, char **pip, ORD8 *buf, int off, int size) { if ((off = read_string(&sv, buf, off, size)) < 0) return -1; - DBG((g_log,0," Got string '%s'\n",sv)) + DBG((g_log,0," Got string '%s', now off = 0x%x\n",sv,off)) if ((size - off) < 2) { free(sv); return -1; } rtype = read_ORD16_be(buf + off); off += 2; - DBG((g_log,0," RTYPE = %d\n",rtype)) + DBG((g_log,0," RTYPE = %d, now off = 0x%x\n",rtype,off)) if ((size - off) < 2) { free(sv); return -1; } rclass = read_ORD16_be(buf + off); off += 2; - DBG((g_log,0," RCLASS = 0x%04x\n",rclass)) + DBG((g_log,0," RCLASS = 0x%04x, now off = 0x%x\n",rclass,off)) /* rclass top bit is cache flush bit */ if ((rclass & 0x7fff) != DNS_CLASS_IN) { @@ -857,12 +845,12 @@ int parse_reply(char **pname, char **pip, ORD8 *buf, int off, int size) { if ((size - off) < 4) return -1; ttl = read_ORD32_be(buf + off); off += 4; - DBG((g_log,0," TTL = %u\n",ttl)) + DBG((g_log,0," TTL = %u, now off = 0x%x\n",ttl,off)) if ((size - off) < 2) return -1; rdlength = read_ORD16_be(buf + off); off += 2; - DBG((g_log,0," RDLENGTH = %d\n",rdlength)) + DBG((g_log,0," RDLENGTH = %d, now off = 0x%x\n",rdlength,off)) if ((off + rdlength) > size) { DBG((g_log,0," response RDLENGTH is longer than remaining buffer (%d)\n",size - off)) @@ -872,7 +860,10 @@ int parse_reply(char **pname, char **pip, ORD8 *buf, int off, int size) { /* Just decode the replies we need */ if (rtype == DNS_TYPE_TXT) { /* Check it's a ChromeCast & get its name */ - char *cp; + char *cp, *fn = NULL; + int rdsize = off + rdlength; + int caflags = 0; + if ((cp = strchr(sv, '.')) == NULL) { free(sv); return -1; @@ -884,12 +875,112 @@ int parse_reply(char **pname, char **pip, ORD8 *buf, int off, int size) { return -1; } - DBG((g_log,0," Chromacast '%s'\n", sv)) - if ((*pname = strdup(sv)) == NULL) { - DBG((g_log,0,"strdup failed\n")) - free(sv); - return -1; +#ifdef NEVER + DBG((g_log,0," TXT data:\n")) + adump_bytes(g_log, " ", buf + off, 0, rdlength); +#endif + + /* Chromecast TXT DATA format: + + Buffer is series of strings, each beginning with a byte length. + Each string is id=value, with the following known values: + + id=c17a8e82ee7187d5013e2d12c61bbd40 uuidNoHyphens + rm=669B9448366A01CB + ve=05 SW version ???? + md=Chromecast Model ? + i.e. Chromecast-Audio + i.e. Chromecast-Ultra + i.e. Group + ic=/setup/icon.png Icon file ?? + fn=Chromecast6892 Friendly name + ca=4101 Capabilities bits ??? + st=1 Application running ?? + bs=FA8FCA566645 Application ID ?? + rs=Pattern generator ready Application state ?? + + */ + + /* Parse the Chromacast TX Data */ + for (; off < rdsize; ) { + int slen; + char *ss; + + /* Read the string length */ + if ((rdsize - off) < 1) + goto done_tx; + + slen = read_ORD8(buf + off); off += 1; + + if ((rdsize - off) < slen) + goto done_tx; + + if ((ss = malloc(slen + 1)) == NULL) { + DBG((g_log,0,"malloc for sub-string failed\n")); + return -1; + } + + memcpy(ss, buf + off, slen); + ss[slen] = '\000'; + off += slen; + + DBG((g_log,0," TX Sub-string '%s'\n", ss)) + + /* Record info we want: */ + if (strncmp(ss, "fn=", 3) == 0) { /* Friendly name */ + if ((fn = malloc(slen -3 +1)) == NULL) { + DBG((g_log,0,"malloc for fn-string failed\n")); + return -1; + } + strcpy(fn, ss + 3); + } + + if (strncmp(ss, "ca=", 3) == 0) { /* Capability bits ? */ + caflags = atoi(ss + 3); + } + free(ss); } + + done_tx: + + if (fn != NULL) { + DBG((g_log,0," Chromacast '%s', fn '%s'\n", sv, fn)) + } else { + DBG((g_log,0," Chromacast '%s'\n", sv)) + } + + DBG2((g_log,DLEV,"ca bits 0x%x\n", caflags)) + + if (strncmp(sv, "Chromecast-Ultra", 16) == 0) { + *ptyp = cctyp_Ultra; + } else if (strncmp(sv, "Chromecast-Audio", 16) == 0) { + *ptyp = cctyp_Audio; + } else { + // Hmm. A CC1 or non-Google device. + + /* We're guessing that bit 0 of the ca bits == Video capable */ + /* and bit 1 of the ca bits == Audio capable */ + if (caflags & 1) + *ptyp = cctyp_1; + else if (caflags & 4) + *ptyp = cctyp_Audio; + else + *ptyp = cctyp_Other; + } + + if (fn != NULL) { + *pname = fn; + } else { + free(fn); + if ((*pname = strdup(sv)) == NULL) { + DBG((g_log,0,"strdup failed\n")) + free(sv); + return -1; + } + } + + off = rdsize; + } else if (rtype == DNS_TYPE_A) { /* Should we check name matches ? */ if ((*pip = malloc(3 * 4 + 3 + 1)) == NULL) { @@ -900,6 +991,7 @@ int parse_reply(char **pname, char **pip, ORD8 *buf, int off, int size) { sprintf(*pip, "%d.%d.%d.%d", buf[off], buf[off+1], buf[off+2], buf[off+3]); DBG((g_log,0," V4 address = %s\n",*pip)) + off += rdlength; } else if (rtype == DNS_TYPE_AAAA) { /* The IPV6 address */ /* Should we check name matches ? */ if ((*pip = malloc(8 * 4 + 7 + 1)) == NULL) { @@ -918,10 +1010,11 @@ int parse_reply(char **pname, char **pip, ORD8 *buf, int off, int size) { buf[off+14] * 245 + buf[off+15]); DBG((g_log,0," V6 address = %s\n",*pip)) + off += rdlength; } else { DBG((g_log,0," Skipping reply at 0x%x\n",off)) + off += rdlength; } - off += rdlength; free(sv); return off; @@ -930,7 +1023,7 @@ int parse_reply(char **pname, char **pip, ORD8 *buf, int off, int size) { /* Parse an mDNS reply into a ChromCast name & IP address */ /* Allocate and return name and IP on finding ChromeCast reply, NULL otherwise */ /* Return nz on failure */ -static int parse_dns(char **pname, char **pip, ORD8 *buf, int size) { +static int parse_dns(char **pname, char **pip, cctype *ptyp, int *pcaflags, ORD8 *buf, int size) { int i, off = 0; int id, flags, qdcount, ancount, nscount, arcount; @@ -976,7 +1069,7 @@ static int parse_dns(char **pname, char **pip, ORD8 *buf, int size) { // Parse all the answers (ANCOUNT) for (i = 0; i < ancount; i++) { - if ((off = parse_reply(pname, pip, buf, off, size)) < 0) { + if ((off = parse_reply(pname, pip, ptyp, pcaflags, buf, off, size)) < 0) { DBG((g_log,0," ### Parsing answer failed ###\n")) return 1; } @@ -984,7 +1077,7 @@ static int parse_dns(char **pname, char **pip, ORD8 *buf, int size) { // Parse all the NS records (NSCOUNT) for (i = 0; i < nscount; i++) { - if ((off = parse_reply(pname, pip, buf, off, size)) < 0) { + if ((off = parse_reply(pname, pip, ptyp, pcaflags, buf, off, size)) < 0) { DBG((g_log,0," ### Parsing NS record failed ###\n")) return 1; } @@ -992,7 +1085,7 @@ static int parse_dns(char **pname, char **pip, ORD8 *buf, int size) { // Parse all the addition RR answers (ARCOUNT) for (i = 0; i < arcount; i++) { - if ((off = parse_reply(pname, pip, buf, off, size)) < 0) { + if ((off = parse_reply(pname, pip, ptyp, pcaflags, buf, off, size)) < 0) { DBG((g_log,0," ### Parsing additional records failed ###\n")) return 1; } @@ -1032,6 +1125,35 @@ static int parse_dns(char **pname, char **pip, ORD8 *buf, int size) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +/* + .ca values: + + Original CC 5 = 0x0005 + Latest CC1 4101 = 0x1005 + Latest CC2 4101 = 0x1005 + Latest CC3 4101 = 0x1005 + Vizio TV 2053 = 0x0805 + Toshiba TV 4101 = 0x1005 + Audio CC 4100 = 0x1004 + Sound bar 2052 = 0x0804 + + Google documents the following Capability strings: + + VIDEO_OUT The receiver supports video output. + VIDEO_IN The receiver supports video input (camera). + AUDIO_OUT The receiver supports audio output. + AUDIO_IN The receiver supports audio input (microphone). + MULTIZONE_GROUP The receiver represents a multi-zone group. + + Which may correspond to ca bits 0, 1, 2, 3 respectively ? + +*/ + +/* + Original CC 1 dump ? + 0000: 00 00 84 00 00 00 00 01 00 00 00 05 0b 5f 67 6f ............._go 0010: 6f 67 6c 65 63 61 73 74 04 5f 74 63 70 05 6c 6f oglecast._tcp.lo 0020: 63 61 6c 00 00 0c 00 01 00 00 11 94 00 11 0e 43 cal............C @@ -1050,6 +1172,207 @@ static int parse_dns(char **pname, char **pip, ORD8 *buf, int size) { 00f0: 09 c0 2e 00 05 00 00 80 00 40 c0 c4 00 2f 80 01 .........@.../.. 0100: 00 00 00 78 00 05 c0 c4 00 01 40 ...x......@ +*/ + +/* + + ChromeCast 1 dump + +0000: 00 00 84 00 00 00 00 01 00 00 00 03 0b 5f 67 6f ............._go +0010: 6f 67 6c 65 63 61 73 74 04 5f 74 63 70 05 6c 6f oglecast._tcp.lo +0020: 63 61 6c 00 00 0c 00 01 00 00 00 78 00 44 2b 43 cal........x.D+C +0030: 68 72 6f 6d 65 63 61 73 74 2d 63 31 37 61 65 38 hromecast-c17ae8 +0040: 38 32 65 37 65 31 38 37 35 64 30 31 33 65 64 32 82e7e1875d013ed2 +0050: 31 32 63 31 36 62 62 64 34 30 0b 5f 67 6f 6f 67 12c16bbd40._goog +0060: 6c 65 63 61 73 74 04 5f 74 63 70 05 6c 6f 63 61 lecast._tcp.loca +0070: 6c 00 2b 43 68 72 6f 6d 65 63 61 73 74 2d 63 31 l.+Chromecast-c1 +0080: 37 61 65 38 38 32 65 37 65 31 38 37 35 64 30 31 7ae882e7e1875d01 +0090: 33 65 64 32 31 32 63 31 36 62 62 64 34 30 0b 5f 3ed212c16bbd40._ +00a0: 67 6f 6f 67 6c 65 63 61 73 74 04 5f 74 63 70 05 googlecast._tcp. +00b0: 6c 6f 63 61 6c 00 00 10 80 01 00 00 11 94 00 82 local........... +00c0: 23 69 64 3d 63 31 37 61 65 38 38 32 65 37 65 31 #id=c17ae882e7e1 +00d0: 38 37 35 64 30 31 33 65 64 32 31 32 63 31 36 62 875d013ed212c16b +00e0: 62 64 34 30 03 72 6d 3d 05 76 65 3d 30 35 0d 6d bd40.rm=.ve=05.m +00f0: 64 3d 43 68 72 6f 6d 65 63 61 73 74 12 69 63 3d d=Chromecast.ic= +0100: 2f 73 65 74 75 70 2f 69 63 6f 6e 2e 70 6e 67 11 /setup/icon.png. +0110: 66 6e 3d 43 68 72 6f 6d 65 63 61 73 74 36 38 39 fn=Chromecast689 +0120: 32 07 63 61 3d 34 31 30 31 04 73 74 3d 30 0f 62 2.ca=4101.st=0.b +0130: 73 3d 46 41 38 46 43 41 35 36 36 36 34 35 03 72 s=FA8FCA566645.r +0140: 73 3d 2b 43 68 72 6f 6d 65 63 61 73 74 2d 63 31 s=+Chromecast-c1 +0150: 37 61 65 38 38 32 65 37 65 31 38 37 35 64 30 31 7ae882e7e1875d01 +0160: 33 65 64 32 31 32 63 31 36 62 62 64 34 30 0b 5f 3ed212c16bbd40._ +0170: 67 6f 6f 67 6c 65 63 61 73 74 04 5f 74 63 70 05 googlecast._tcp. +0180: 6c 6f 63 61 6c 00 00 21 80 01 00 00 00 78 00 32 local..!.....x.2 +0190: 00 00 00 00 1f 49 24 63 31 37 61 65 38 38 32 2d .....I$c17ae882- +01a0: 65 37 65 31 2d 38 37 35 64 2d 30 31 33 65 2d 64 e7e1-875d-013e-d +01b0: 32 31 32 63 31 36 62 62 64 34 30 05 6c 6f 63 61 212c16bbd40.loca +01c0: 6c 00 24 63 31 37 61 65 38 38 32 2d 65 37 65 31 l.$c17ae882-e7e1 +01d0: 2d 38 37 35 64 2d 30 31 33 65 2d 64 32 31 32 63 -875d-013e-d212c +01e0: 31 36 62 62 64 34 30 05 6c 6f 63 61 6c 00 00 01 16bbd40.local... +01f0: 80 01 00 00 00 78 00 04 c0 a8 01 68 .....x.....h + + +ChromeCast 2 dump: + +0000: 00 00 84 00 00 00 00 01 00 00 00 03 0b 5f 67 6f ............._go +0010: 6f 67 6c 65 63 61 73 74 04 5f 74 63 70 05 6c 6f oglecast._tcp.lo +0020: 63 61 6c 00 00 0c 00 01 00 00 00 78 00 44 2b 43 cal........x.D+C +0030: 68 72 6f 6d 65 63 61 73 74 2d 38 32 38 30 30 66 hromecast-82800f +0040: 65 63 33 37 37 36 35 39 38 66 35 38 64 34 61 61 ec3776598f58d4aa +0050: 63 39 65 36 35 64 30 30 30 61 0b 5f 67 6f 6f 67 c9e65d000a._goog +0060: 6c 65 63 61 73 74 04 5f 74 63 70 05 6c 6f 63 61 lecast._tcp.loca +0070: 6c 00 2b 43 68 72 6f 6d 65 63 61 73 74 2d 38 32 l.+Chromecast-82 +0080: 38 30 30 66 65 63 33 37 37 36 35 39 38 66 35 38 800fec3776598f58 +0090: 64 34 61 61 63 39 65 36 35 64 30 30 30 61 0b 5f d4aac9e65d000a._ +00a0: 67 6f 6f 67 6c 65 63 61 73 74 04 5f 74 63 70 05 googlecast._tcp. +00b0: 6c 6f 63 61 6c 00 00 10 80 01 00 00 11 94 00 a9 local........... +00c0: 23 69 64 3d 38 32 38 30 30 66 65 63 33 37 37 36 #id=82800fec3776 +00d0: 35 39 38 66 35 38 64 34 61 61 63 39 65 36 35 64 598f58d4aac9e65d +00e0: 30 30 30 61 13 72 6d 3d 36 36 39 42 39 34 34 38 000a.rm=669B9448 +00f0: 36 33 36 30 41 31 43 42 05 76 65 3d 30 35 0d 6d 6360A1CB.ve=05.m +0100: 64 3d 43 68 72 6f 6d 65 63 61 73 74 12 69 63 3d d=Chromecast.ic= +0110: 2f 73 65 74 75 70 2f 69 63 6f 6e 2e 70 6e 67 11 /setup/icon.png. +0120: 66 6e 3d 43 68 72 6f 6d 65 63 61 73 74 36 35 30 fn=Chromecast650 +0130: 32 07 63 61 3d 34 31 30 31 04 73 74 3d 31 0f 62 2.ca=4101.st=1.b +0140: 73 3d 46 41 38 46 43 41 39 45 33 45 30 31 1a 72 s=FA8FCA9E3E01.r +0150: 73 3d 50 61 74 74 65 72 6e 20 67 65 6e 65 72 61 s=Pattern genera +0160: 74 6f 72 20 72 65 61 64 79 2b 43 68 72 6f 6d 65 tor ready+Chrome +0170: 63 61 73 74 2d 38 32 38 30 30 66 65 63 33 37 37 cast-82800fec377 +0180: 36 35 39 38 66 35 38 64 34 61 61 63 39 65 36 35 6598f58d4aac9e65 +0190: 64 30 30 30 61 0b 5f 67 6f 6f 67 6c 65 63 61 73 d000a._googlecas +01a0: 74 04 5f 74 63 70 05 6c 6f 63 61 6c 00 00 21 80 t._tcp.local..!. +01b0: 01 00 00 00 78 00 32 00 00 00 00 1f 49 24 38 32 ....x.2.....I$82 +01c0: 38 30 30 66 65 63 2d 33 37 37 36 2d 35 39 38 66 800fec-3776-598f +01d0: 2d 35 38 64 34 2d 61 61 63 39 65 36 35 64 30 30 -58d4-aac9e65d00 +01e0: 30 61 05 6c 6f 63 61 6c 00 24 38 32 38 30 30 66 0a.local.$82800f +01f0: 65 63 2d 33 37 37 36 2d 35 39 38 66 2d 35 38 64 ec-3776-598f-58d +0200: 34 2d 61 61 63 39 65 36 35 64 30 30 30 61 05 6c 4-aac9e65d000a.l +0210: 6f 63 61 6c 00 00 01 80 01 00 00 00 78 00 04 0a ocal........x... +0220: 00 00 80 ... + +ChromeCast 3 (Ultra) + +0000: 00 00 84 00 00 00 00 01 00 00 00 03 0b 5f 67 6f ............._go +0010: 6f 67 6c 65 63 61 73 74 04 5f 74 63 70 05 6c 6f oglecast._tcp.lo +0020: 63 61 6c 00 00 0c 00 01 00 00 00 78 00 34 31 43 cal........x.41C +0030: 68 72 6f 6d 65 63 61 73 74 2d 55 6c 74 72 61 2d hromecast-Ultra- +0040: 32 38 36 65 36 63 63 65 38 34 65 32 38 65 61 33 286e6cce84e28ea3 +0050: 36 63 37 63 33 31 39 32 66 33 35 62 65 30 33 65 6c7c3192f35be03e +0060: c0 0c c0 2e 00 10 80 01 00 00 11 94 00 8d 23 69 ..............#i +0070: 64 3d 32 38 36 65 36 63 63 65 38 34 65 32 38 65 d=286e6cce84e28e +0080: 61 33 36 63 37 63 33 31 39 32 66 33 35 62 65 30 a36c7c3192f35be0 +0090: 33 65 03 72 6d 3d 05 76 65 3d 30 35 13 6d 64 3d 3e.rm=.ve=05.md= +00a0: 43 68 72 6f 6d 65 63 61 73 74 20 55 6c 74 72 61 Chromecast Ultra +00b0: 12 69 63 3d 2f 73 65 74 75 70 2f 69 63 6f 6e 2e .ic=/setup/icon. +00c0: 70 6e 67 16 66 6e 3d 43 68 72 6f 6d 65 63 61 73 png.fn=Chromecas +00d0: 74 55 6c 74 72 61 36 32 35 30 07 63 61 3d 34 31 tUltra6250.ca=41 +00e0: 30 31 04 73 74 3d 30 0f 62 73 3d 46 41 38 46 43 01.st=0.bs=FA8FC +00f0: 41 37 30 38 35 42 35 03 72 73 3d c0 2e 00 21 80 A7085B5.rs=...!. +0100: 01 00 00 00 78 00 2d 00 00 00 00 1f 49 24 32 38 ....x.-.....I$28 +0110: 36 65 36 63 63 65 2d 38 34 65 32 2d 38 65 61 33 6e6cce-84e2-8ea3 +0120: 2d 36 63 37 63 2d 33 31 39 32 66 33 35 62 65 30 -6c7c-3192f35be0 +0130: 33 65 c0 1d c1 0d 00 01 80 01 00 00 00 78 00 04 3e...........x.. +0140: 0a 00 01 1d .... + +*/ + + +/* Other non-Google devices: + +Vizio M60-D1 :- Smart TV + +00000000 00 00 84 00 00 00 00 01 00 00 00 03 0b 5f 67 6f |............._go| +00000010 6f 67 6c 65 63 61 73 74 04 5f 74 63 70 05 6c 6f |oglecast._tcp.lo| +00000020 63 61 6c 00 00 0c 00 01 00 00 00 78 00 40 27 4d |cal........x.@'M| +00000030 36 30 2d 44 31 2d 37 63 35 35 36 37 39 31 35 38 |60-D1-7c55679158| +00000040 38 64 63 64 33 37 63 37 37 32 33 31 61 30 64 64 |8dcd37c77231a0dd| +00000050 31 35 61 35 30 36 0b 5f 67 6f 6f 67 6c 65 63 61 |15a506._googleca| +00000060 73 74 04 5f 74 63 70 05 6c 6f 63 61 6c 00 27 4d |st._tcp.local.'M| +00000070 36 30 2d 44 31 2d 37 63 35 35 36 37 39 31 35 38 |60-D1-7c55679158| +00000080 38 64 63 64 33 37 63 37 37 32 33 31 61 30 64 64 |8dcd37c77231a0dd| +00000090 31 35 61 35 30 36 0b 5f 67 6f 6f 67 6c 65 63 61 |15a506._googleca| +000000a0 73 74 04 5f 74 63 70 05 6c 6f 63 61 6c 00 00 10 |st._tcp.local...| +000000b0 80 01 00 00 11 94 00 80 23 69 64 3d 37 63 35 35 |........#id=7c55| +000000c0 36 37 39 31 35 38 38 64 63 64 33 37 63 37 37 32 |6791588dcd37c772| +000000d0 33 31 61 30 64 64 31 35 61 35 30 36 13 72 6d 3d |31a0dd15a506.rm=| +000000e0 31 33 39 46 33 32 34 34 38 34 44 46 41 39 32 34 |139F324484DFA924| +000000f0 05 76 65 3d 30 35 09 6d 64 3d 4d 36 30 2d 44 31 |.ve=05.md=M60-D1| +00000100 12 69 63 3d 2f 73 65 74 75 70 2f 69 63 6f 6e 2e |.ic=/setup/icon.| +00000110 70 6e 67 0f 66 6e 3d 56 69 7a 69 6f 20 4d 36 30 |png.fn=Vizio M60| +00000120 2d 44 31 07 63 61 3d 32 30 35 33 04 73 74 3d 30 |-D1.ca=2053.st=0| +00000130 03 62 73 3d 03 72 73 3d 27 4d 36 30 2d 44 31 2d |.bs=.rs='M60-D1-| +00000140 37 63 35 35 36 37 39 31 35 38 38 64 63 64 33 37 |7c556791588dcd37| +00000150 63 37 37 32 33 31 61 30 64 64 31 35 61 35 30 36 |c77231a0dd15a506| +00000160 0b 5f 67 6f 6f 67 6c 65 63 61 73 74 04 5f 74 63 |._googlecast._tc| +00000170 70 05 6c 6f 63 61 6c 00 00 21 80 01 00 00 00 78 |p.local..!.....x| +00000180 00 32 00 00 00 00 1f 49 24 37 63 35 35 36 37 39 |.2.....I$7c55679| +00000190 31 2d 35 38 38 64 2d 63 64 33 37 2d 63 37 37 32 |1-588d-cd37-c772| +000001a0 2d 33 31 61 30 64 64 31 35 61 35 30 36 05 6c 6f |-31a0dd15a506.lo| +000001b0 63 61 6c 00 24 37 63 35 35 36 37 39 31 2d 35 38 |cal.$7c556791-58| +000001c0 38 64 2d 63 64 33 37 2d 63 37 37 32 2d 33 31 61 |8d-cd37-c772-31a| +000001d0 30 64 64 31 35 61 35 30 36 05 6c 6f 63 61 6c 00 |0dd15a506.local.| +000001e0 00 01 80 01 00 00 00 78 00 04 c0 a8 00 3e |.......x.....>| +000001ee + +SmartCast Sound Bar 3851-D0 :- Sound bar + +00000000 00 00 84 00 00 00 00 01 00 00 00 03 0b 5f 67 6f |............._go| +00000010 6f 67 6c 65 63 61 73 74 04 5f 74 63 70 05 6c 6f |oglecast._tcp.lo| +00000020 63 61 6c 00 00 0c 00 01 00 00 00 78 00 22 09 53 |cal........x.".S| +00000030 42 33 38 35 31 2d 44 30 0b 5f 67 6f 6f 67 6c 65 |B3851-D0._google| +00000040 63 61 73 74 04 5f 74 63 70 05 6c 6f 63 61 6c 00 |cast._tcp.local.| +00000050 09 53 42 33 38 35 31 2d 44 30 0b 5f 67 6f 6f 67 |.SB3851-D0._goog| +00000060 6c 65 63 61 73 74 04 5f 74 63 70 05 6c 6f 63 61 |lecast._tcp.loca| +00000070 6c 00 00 10 80 01 00 00 11 94 00 8a 23 69 64 3d |l...........#id=| +00000080 64 35 36 63 33 66 30 39 36 66 30 31 30 31 36 66 |d56c3f096f01016f| +00000090 33 64 37 30 65 62 62 63 36 32 36 34 65 66 33 31 |3d70ebbc6264ef31| +000000a0 05 76 65 3d 30 34 1e 6d 64 3d 53 6d 61 72 74 43 |.ve=04.md=SmartC| +000000b0 61 73 74 20 53 6f 75 6e 64 20 42 61 72 20 33 38 |ast Sound Bar 38| +000000c0 35 31 2d 44 30 12 69 63 3d 2f 73 65 74 75 70 2f |51-D0.ic=/setup/| +000000d0 69 63 6f 6e 2e 70 6e 67 0c 66 6e 3d 53 42 33 38 |icon.png.fn=SB38| +000000e0 35 31 2d 44 30 07 63 61 3d 32 30 35 32 04 73 74 |51-D0.ca=2052.st| +000000f0 3d 30 0f 62 73 3d 46 46 46 46 46 46 46 46 46 46 |=0.bs=FFFFFFFFFF| +00000100 46 46 03 72 73 3d 09 53 42 33 38 35 31 2d 44 30 |FF.rs=.SB3851-D0| +00000110 0b 5f 67 6f 6f 67 6c 65 63 61 73 74 04 5f 74 63 |._googlecast._tc| +00000120 70 05 6c 6f 63 61 6c 00 00 21 80 01 00 00 00 78 |p.local..!.....x| +00000130 00 17 00 00 00 00 1f 49 09 53 42 33 38 35 31 2d |.......I.SB3851-| +00000140 44 30 05 6c 6f 63 61 6c 00 09 53 42 33 38 35 31 |D0.local..SB3851| +00000150 2d 44 30 05 6c 6f 63 61 6c 00 00 01 80 01 00 00 |-D0.local.......| +00000160 00 78 00 04 c0 a8 00 26 |.x.....&| +00000168 + +ZChromecast Toshiba :- TV ? + +00000000 00 00 84 00 00 00 00 01 00 00 00 03 0b 5f 67 6f |............._go| +00000010 6f 67 6c 65 63 61 73 74 04 5f 74 63 70 05 6c 6f |oglecast._tcp.lo| +00000020 63 61 6c 00 00 0c 00 01 00 00 00 78 00 2e 2b 43 |cal........x..+C| +00000030 68 72 6f 6d 65 63 61 73 74 2d 64 61 30 33 34 62 |hromecast-da034b| +00000040 31 39 30 30 34 34 62 63 38 65 35 33 30 31 34 37 |190044bc8e530147| +00000050 63 37 61 65 33 32 63 35 61 33 c0 0c c0 2e 00 10 |c7ae32c5a3......| +00000060 80 01 00 00 11 94 00 87 23 69 64 3d 64 61 30 33 |........#id=da03| +00000070 34 62 31 39 30 30 34 34 62 63 38 65 35 33 30 31 |4b190044bc8e5301| +00000080 34 37 63 37 61 65 33 32 63 35 61 33 03 72 6d 3d |47c7ae32c5a3.rm=| +00000090 05 76 65 3d 30 35 0d 6d 64 3d 43 68 72 6f 6d 65 |.ve=05.md=Chrome| +000000a0 63 61 73 74 12 69 63 3d 2f 73 65 74 75 70 2f 69 |cast.ic=/setup/i| +000000b0 63 6f 6e 2e 70 6e 67 16 66 6e 3d 5a 43 68 72 6f |con.png.fn=ZChro| +000000c0 6d 65 63 61 73 74 20 54 6f 73 68 69 62 61 07 63 |mecast Toshiba.c| +000000d0 61 3d 34 31 30 31 04 73 74 3d 30 0f 62 73 3d 46 |a=4101.st=0.bs=F| +000000e0 41 38 46 43 41 37 30 32 30 36 32 03 72 73 3d c0 |A8FCA702062.rs=.| +000000f0 2e 00 21 80 01 00 00 00 78 00 2d 00 00 00 00 1f |..!.....x.-.....| +00000100 49 24 64 61 30 33 34 62 31 39 2d 30 30 34 34 2d |I$da034b19-0044-| +00000110 62 63 38 65 2d 35 33 30 31 2d 34 37 63 37 61 65 |bc8e-5301-47c7ae| +00000120 33 32 63 35 61 33 c0 1d c1 01 00 01 80 01 00 00 |32c5a3..........| +00000130 00 78 00 04 c0 a8 00 1b |.x......| +00000138 */ +/* + + Can get info from Chromecast http server at http://XX.XX.XX.XX:8008/ssdp/device-desc.xml + + Get info about the app running: http://XX.XX.XX.XX:8008/apps/ChromeCast + +*/ + + diff --git a/ccast/ccmdns.h b/ccast/ccmdns.h index 5144448..7a57808 100644..100755 --- a/ccast/ccmdns.h +++ b/ccast/ccmdns.h @@ -20,13 +20,26 @@ * for the purposes of generating Video Test patches. */ +/* Chrome cast type */ +typedef enum { + cctyp_unkn = 0, /* Unknown */ + cctyp_1, /* Chromecast 1 or General Video */ + cctyp_2, /* Chromecast 2 */ + cctyp_Audio, /* Chromecast Audio or General Audio */ + cctyp_Ultra, /* Chromecast Ultra */ + cctyp_Other /* Non Video/Audio output device */ +} cctype; + +/* Use cctype2str() to dump type */ + /* A record of a Chromecast that may be accessed */ struct _ccast_id { - char *name; /* Chromecast name */ + char *name; /* Chromecast friendly name */ char *ip; /* IP address as string (ie. "10.0.0.128") */ + cctype typ; /* Chromecast type (If known) */ }; typedef struct _ccast_id ccast_id; -/* Get a list of Chromecasts. Return NULL on error */ +/* Get a list of Video out capable Chromecasts. Return NULL on error */ /* Last pointer in array is NULL */ /* Takes 0.5 second to return */ ccast_id **get_ccids(void); diff --git a/ccast/ccmes.c b/ccast/ccmes.c index b8f9de0..b8f9de0 100644..100755 --- a/ccast/ccmes.c +++ b/ccast/ccmes.c diff --git a/ccast/ccmes.h b/ccast/ccmes.h index 5eae02a..5eae02a 100644..100755 --- a/ccast/ccmes.h +++ b/ccast/ccmes.h diff --git a/ccast/ccpacket.c b/ccast/ccpacket.c index df2a0af..df2a0af 100644..100755 --- a/ccast/ccpacket.c +++ b/ccast/ccpacket.c diff --git a/ccast/ccpacket.h b/ccast/ccpacket.h index e4f6f76..e4f6f76 100644..100755 --- a/ccast/ccpacket.h +++ b/ccast/ccpacket.h diff --git a/ccast/cctest.c b/ccast/cctest.c index 2000cc5..2000cc5 100644..100755 --- a/ccast/cctest.c +++ b/ccast/cctest.c diff --git a/ccast/chan/cast_channel.pb-c.c b/ccast/chan/cast_channel.pb-c.c index ec79608..ec79608 100644..100755 --- a/ccast/chan/cast_channel.pb-c.c +++ b/ccast/chan/cast_channel.pb-c.c diff --git a/ccast/chan/cast_channel.pb-c.h b/ccast/chan/cast_channel.pb-c.h index 982e420..982e420 100644..100755 --- a/ccast/chan/cast_channel.pb-c.h +++ b/ccast/chan/cast_channel.pb-c.h diff --git a/ccast/chan/protobuf-c.c b/ccast/chan/protobuf-c.c index 1157d8b..1157d8b 100644..100755 --- a/ccast/chan/protobuf-c.c +++ b/ccast/chan/protobuf-c.c diff --git a/ccast/chan/protobuf-c.h b/ccast/chan/protobuf-c.h index 8c4ba1d..8c4ba1d 100644..100755 --- a/ccast/chan/protobuf-c.h +++ b/ccast/chan/protobuf-c.h diff --git a/ccast/dpat.c b/ccast/dpat.c index a8792fe..a8792fe 100644..100755 --- a/ccast/dpat.c +++ b/ccast/dpat.c diff --git a/ccast/filt.c b/ccast/filt.c index 65cf7bd..65cf7bd 100644..100755 --- a/ccast/filt.c +++ b/ccast/filt.c diff --git a/cgats/Jamfile b/cgats/Jamfile index 813269a..813269a 100644..100755 --- a/cgats/Jamfile +++ b/cgats/Jamfile diff --git a/cgats/License4.txt b/cgats/License4.txt index 6db70c8..6db70c8 100644..100755 --- a/cgats/License4.txt +++ b/cgats/License4.txt diff --git a/cgats/Makefile b/cgats/Makefile index 5312104..5312104 100644..100755 --- a/cgats/Makefile +++ b/cgats/Makefile diff --git a/cgats/Makefile.IBMNT b/cgats/Makefile.IBMNT index 26a2bd2..26a2bd2 100644..100755 --- a/cgats/Makefile.IBMNT +++ b/cgats/Makefile.IBMNT diff --git a/cgats/Makefile.OSX b/cgats/Makefile.OSX index fb1c88f..fb1c88f 100644..100755 --- a/cgats/Makefile.OSX +++ b/cgats/Makefile.OSX diff --git a/cgats/Makefile.UNIX b/cgats/Makefile.UNIX index 91d6005..91d6005 100644..100755 --- a/cgats/Makefile.UNIX +++ b/cgats/Makefile.UNIX diff --git a/cgats/Makefile.WNT b/cgats/Makefile.WNT index 4ca291d..4ca291d 100644..100755 --- a/cgats/Makefile.WNT +++ b/cgats/Makefile.WNT diff --git a/cgats/Readme.txt b/cgats/Readme.txt index 89c554e..89c554e 100644..100755 --- a/cgats/Readme.txt +++ b/cgats/Readme.txt diff --git a/cgats/afiles b/cgats/afiles index 5532110..5532110 100644..100755 --- a/cgats/afiles +++ b/cgats/afiles diff --git a/cgats/cgats.c b/cgats/cgats.c index 3741a5d..578da10 100644..100755 --- a/cgats/cgats.c +++ b/cgats/cgats.c @@ -135,6 +135,7 @@ cgatsAlloc *al /* memory allocator */ p->add_other = add_other; p->get_oi = get_oi; p->add_kword = add_kword; + p->add_kword_at = add_kword_at; p->add_field = add_field; p->add_set = add_set; p->add_setarr = add_setarr; diff --git a/cgats/cgats.h b/cgats/cgats.h index bf5c94e..9ef5f7f 100644..100755 --- a/cgats/cgats.h +++ b/cgats/cgats.h @@ -132,6 +132,9 @@ struct _cgats { int (*add_kword)(struct _cgats *p, int table, const char *ksym, const char *kdata, const char *kcom); /* Add a new keyword/value pair + optional comment to the table */ /* Return index of new keyword, or -1, errc & err on error */ + int (*add_kword_at)(struct _cgats *p, int table, int pos, const char *ksym, + const char *kdata, const char *kcom); + /* Replace or append a new keyword/value pair + optional comment */ int (*add_field)(struct _cgats *p, int table, const char *fsym, data_type ftype); /* Add a new field to the table */ /* Return index of new field, or -1, -2, errc and err on error */ diff --git a/cgats/cgatsstd.c b/cgats/cgatsstd.c index 22c17ed..22c17ed 100644..100755 --- a/cgats/cgatsstd.c +++ b/cgats/cgatsstd.c diff --git a/cgats/makezip.ksh b/cgats/makezip.ksh index 8cc5f6c..8cc5f6c 100644..100755 --- a/cgats/makezip.ksh +++ b/cgats/makezip.ksh diff --git a/cgats/pars.c b/cgats/pars.c index c3038d5..d4d04bf 100644..100755 --- a/cgats/pars.c +++ b/cgats/pars.c @@ -17,6 +17,12 @@ * see the License4.txt file in this directory for licensing details. */ +/* + TTBD: + + Should skip UTF-8 BOM (0xef 0xbb 0xbf) + +*/ #define _PARS_C_ /* Turn on implimentation code */ diff --git a/cgats/pars.h b/cgats/pars.h index 083a745..083a745 100644..100755 --- a/cgats/pars.h +++ b/cgats/pars.h diff --git a/cgats/parsstd.c b/cgats/parsstd.c index 2246c97..2246c97 100644..100755 --- a/cgats/parsstd.c +++ b/cgats/parsstd.c diff --git a/cgats/test.txt b/cgats/test.txt index 5036d32..5036d32 100644..100755 --- a/cgats/test.txt +++ b/cgats/test.txt diff --git a/doc/3dformat.html b/doc/3dformat.html index da256c5..da256c5 100644..100755 --- a/doc/3dformat.html +++ b/doc/3dformat.html diff --git a/doc/ArgyllCMS_arts_tag.html b/doc/ArgyllCMS_arts_tag.html index 8b9c445..8b9c445 100644..100755 --- a/doc/ArgyllCMS_arts_tag.html +++ b/doc/ArgyllCMS_arts_tag.html diff --git a/doc/ArgyllDoc.html b/doc/ArgyllDoc.html index 8c6f353..8463fcf 100644 --- a/doc/ArgyllDoc.html +++ b/doc/ArgyllDoc.html @@ -10,9 +10,9 @@ <title>Argyll Documentation Top</title>
</head>
<body>
- <h1> ArgyllCMS documentation index (V1.9.2)<br>
+ <h1> ArgyllCMS documentation index (V2.0.0)<br>
</h1>
- Date: 17th October 2016<br>
+ Date: 17th November 2017<br>
Author: Graeme Gill
<h2><u><a name="Intro"></a>Introduction</u></h2>
ArgyllCMS is an ICC compatible color management system, available as
@@ -35,15 +35,26 @@ general guide to using the tools for typical color management tasks
is also available. A mailing list provides support for more advanced
usage.<br>
- <p>This is Version 1.9.2, a bug fix update to the last
- releaseV1.9.1. The first public release of icclib was in November
- 1998, and of ArgyllCMS was in October 2000. Code development
- commenced in 1995. See <a href="ChangesSummary.html">Changes
+ <p>This is Version 2.0.0, a feature and bug fix update to the last
+ major releaseV1.9.2. The first public release of icclib was in
+ November 1998, and of ArgyllCMS was in October 2000. Code
+ development commenced in 1995. See <a href="ChangesSummary.html">Changes + + + + + + + + + + +
Summary</a> for an overview of changes since the last release.
Changes between revisions is detailed in the <b>log.txt</b> file
that accompanies the source code. </p>
<p>The latest source code is available from <a
- href="http://www.argyllcms.com/">here</a>.<br>
+ href="http://www.argyllcms.com/#Downloads">here</a>.<br>
</p>
<p><font color="#cc0000"><span style="font-weight: bold;">Please
note that instruments are being driven by ArgyllCMS drivers,
@@ -134,6 +145,14 @@ + + + + + + + + discussion</a> of what color management is, and why we need it,
together with a brief overview of the ICC profile format.<br>
@@ -256,6 +275,14 @@ + + + + + + + + - Tele-Spectro-Radiometer<br>
<a href="instruments.html#spectraval">spectraval
@@ -271,6 +298,14 @@ + + + + + + + + - Tele-Spectro-Radiometer<br>
<br>
@@ -356,6 +391,14 @@ + + + + + + + + - Tele-Spectro-Radiometer<br>
<br>
@@ -418,6 +461,14 @@ + + + + + + + +
@@ -548,6 +599,14 @@ + + + + + + + + - "swipe" type reflective spectrometer, that can be used untethered.<br>
<a href="instruments.html#DTP22">DTP22 Digital
@@ -672,6 +731,14 @@ + + + + + + + + - spot type reflective spectrometer.<br>
<a href="instruments.html#DTP41">DTP41</a> @@ -795,6 +862,14 @@ + + + + + + + + - spot and strip reading reflective spectrometer.<br>
<a href="instruments.html#DTP41">DTP41T</a>
@@ -920,6 +995,14 @@ + + + + + + + + - spot and strip reading reflective/transmissive spectrometer.<br>
<a href="instruments.html#dtp51">DTP51</a> @@ -1043,6 +1126,14 @@ + + + + + + + + - strip reading reflective colorimeter.<br>
<a href="instruments.html#DTP92">DTP92</a> @@ -1166,6 +1257,14 @@ + + + + + + + + - CRT display colorimeter.<br>
<a href="instruments.html#DTP94">DTP94</a> <font
@@ -1175,6 +1274,18 @@ style="text-decoration: underline;">ColorMunki</span></a> Design
or Photo -
spot and "swipe" reflective/emissive spectrometer (UV cut only).<br>
+ + + +
+ The <b>i1Studio</b> version of this instrument is also reported to
+ work.<br>
+
+
+
+
+ [ The
+ OEM XEROX PhaserMeter is also reported to work. ] <br>
<a href="instruments.html#i1d"><span
style="text-decoration: underline;">ColorMunki</span></a> Create
or Smile
@@ -1350,6 +1461,14 @@ + + + + + + + + - display colorimeter. (Treated as a Eye-One Display 2)<br>
<a href="instruments.html#i1d">CalMAN X2</a>
@@ -1474,6 +1593,14 @@ + + + + + + + + - display colorimeter. (Treated as a Eye-One Display 2)<br>
<a href="instruments.html#Huey">Huey</a>
@@ -1607,6 +1734,14 @@ + + + + + + + + [The Sequel Chroma 4 & 5, and Sencore ColorPro V, IV & III
also work.]<br>
@@ -1733,6 +1868,14 @@ + + + + + + + + - see <a href="instruments.html#i1d">Eye-One Display</a><br>
<br>
@@ -1863,6 +2006,14 @@ + + + + + + + + [The Spyder 1 has also been reported as working, but this has not
been confirmed.]<br>
@@ -2006,6 +2157,14 @@ + + + + + + + + - display colorimeter</span><br>
<a href="instruments.html#ColorHug">ColorHug</a>
@@ -2021,6 +2180,14 @@ + + + + + + + + - display colorimeter<br>
<a href="instruments.html#SMCube">Palette/SwatchMate @@ -2053,6 +2220,14 @@ + + + + + + + + Cube</a> @@ -2065,6 +2240,14 @@ + + + + + + + + - reflective colorimeter<br>
<span style="font-weight: bold;"></span><span class="titre"><br>
@@ -2090,9 +2273,13 @@ directed to the Argyll's author(s) or the Argyll mailing list,
and not to any</span> <span style="font-weight: bold;">other
party.</span> </p>
- <p>There is a <a href="ccmxs.html">list of contributed</a> <span
+ <p>There is a <a href="ccsss.html">list of contributed</a> <span
+ style="font-weight: bold;">ccss</span> (Colorimeter Correction
+ Spectral Sample) files for some displays.<br>
+ There is a <a href="ccmxs.html">list of contributed</a> <span
style="font-weight: bold;">ccmx</span> (Colorimeter Correction
- Matrix) files for some display/colorimeter combinations.</p>
+ Matrix) files for some display/colorimeter combinations.<br>
+ </p>
<h2><span style="text-decoration: underline; color: rgb(51, 0, 51);"><a
name="Copyright"></a>Copyright, Licensing & Trade Mark:</span><br>
</h2>
@@ -2154,6 +2341,14 @@ + + + + + + + + GNU</span> license <span style="font-weight: bold;">prohibits</span>
extending these tools<span style="font-weight: bold;"></span>
@@ -2331,6 +2526,14 @@ + + + + + + + + the jcnf library in <span style="font-weight: bold;">jcnf</span>/, @@ -2452,6 +2655,14 @@ + + + + + + + + the files <span style="font-weight: bold;">spectro/xdg_bds.*</span>,
<span style="font-weight: bold;">spectro/aglob.*</span> and the
@@ -2491,8 +2702,9 @@ <p>The axTLS library is Copyright (c) 2008, Cameron Rich, and the
license is detailed in ccast/axTLS/LICENSE file (an "MIT"/"BSD"
like permissive free software license).<br>
- It is not used for any security sensitive purpose, but is used
- purely to communicate with the ChromeCast.<br>
+ It has been modified to permit multiple threads to use it, but is
+ not used for any security sensitive purpose, but is used purely to
+ enable communication with the ChromeCast in a portable fashion.<br>
</p>
<p>The <a href="http://www.x3dom.org/">X3DOM</a> x3dom.css and
x3dom.js files are Copyright (C) 2009 X3DOM and licensed dual
@@ -2501,8 +2713,8 @@ </p>
<p>"<b>ArgyllCMS</b>" is a trade mark. It is permissible to refer to
copies or derivatives of this software as being the same as
- ArgyllCMS if they are materially unchanged, and retain all
- the functionality provided by the software made available at
+ ArgyllCMS if they are materially unchanged, and retain all the
+ functionality provided by the software made available at
www.argyllcms.com. Modified versions of this software that are
materially changed or have missing functionality must be clearly
marked as such, so as not to to be confused with ArgyllCMS.<br>
@@ -2667,6 +2879,14 @@ calibration + + + + + + + + and profiling is <a href="http://displaycal.net/">DisplayCAL</a> by
Florian Höch. For print profiling, you might like to take a look at
@@ -2691,10 +2911,18 @@ calibration + + + + + + + + Little Argyll GUI</a> by Russell Cottrell, and for cameras or
- scanners, <a href="http://www.muscallidus.com/coca/">CoCa</a> by
- Andrew Stawowczyk Long.<br>
+ scanners, <a href="http://www.dohm.com.au/coca/">CoCa</a> by Andrew
+ Stawowczyk Long.<br>
<br>
Others can be found with a suitable <a
href="http://www.google.com/search?hl=en&source=hp&q=argyllcms+GUI&aq=f&aqi=g1&aql=&oq=">search</a>.<br>
@@ -2825,6 +3053,14 @@ href="http://www.google.com/search?hl=en&source=hp&q=argyllcms+GUI&a + + + + + + + + -? </b>(or some other unrecognized flag, if the "?" character is
treated specially in your shell, i.e. try "--" on OS X zsh).<br>
@@ -2963,6 +3199,14 @@ href="http://www.google.com/search?hl=en&source=hp&q=argyllcms+GUI&a + + + + + + + + Verbose mode<br>
-d
@@ -3087,6 +3331,14 @@ href="http://www.google.com/search?hl=en&source=hp&q=argyllcms+GUI&a + + + + + + + + Choose a depth 0-4<br>
-r
@@ -3211,6 +3463,14 @@ href="http://www.google.com/search?hl=en&source=hp&q=argyllcms+GUI&a + + + + + + + + Use a random depth<br>
-f
@@ -3338,6 +3598,14 @@ href="http://www.google.com/search?hl=en&source=hp&q=argyllcms+GUI&a + + + + + + + + Manual<br>
infile
@@ -3462,6 +3730,14 @@ href="http://www.google.com/search?hl=en&source=hp&q=argyllcms+GUI&a + + + + + + + + Input file<br>
outfile
@@ -3737,6 +4013,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span><big>Generate a profiling test target values .ti1 file. </big><br
style="font-family: monospace;">
@@ -3862,6 +4146,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + film recorder TIFF files from Argyll .ti1 file. </big><br
style="font-family: monospace;">
@@ -3987,6 +4279,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + a PS, EPS or TIFF file containing test patch values, ready for
printing.</big></small>
@@ -4114,6 +4414,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + a test chart using an instrument to create a .ti3 data file.</big><span
style="font-family: monospace;"> </span><br style="font-family:
@@ -4240,6 +4548,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + and read colorimetric values from a display </big><br
style="font-family: monospace;">
@@ -4365,6 +4681,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + film colorimetric values using a SpectroScanT (Deprecated ?)</big><br
style="font-family: monospace;">
@@ -4490,6 +4814,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span><big>Convert a TIFF image of a test chart into .ti3
device values. <br>
@@ -4620,6 +4952,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + the reading of a device using an ICC or MPP profile. <br>
</big></small><small><a style="font-family: monospace;"
@@ -4749,6 +5089,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span><big>Convert Colorblind format CMY/RGB test chart into
Argyll .ti3 CGATS format. </big><br style="font-family:
@@ -4875,6 +5223,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + Kodak Colorflow format CMYK test chart into Argyll .ti3 CGATS
format. </big><br style="font-family: monospace;">
@@ -5000,6 +5356,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span><big>Convert Gretag/Logo/X-Rite/Barbieri or other format
RGB or CMYK test chart results into Argyll .ti3 CGATS format. </big></small><br
@@ -5064,6 +5428,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + LightSpace format RGB .bcs test chart results into Argyll
.ti3 CGATS format.</big></small></big><br>
@@ -5189,6 +5561,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span><big>Create a fake Argyll .ti3 CMY data file from a CMYK
profile, as a basis of creating a CMY to CMYK separation<br>
@@ -5244,6 +5624,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + or Merge two or more measurement data files, or average patches
within a single file.</big></small><br>
@@ -5370,6 +5758,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small>Create an ICC profile from the .ti3 test data. <br>
<small><a style="font-family: monospace;" href="mppprof.html">mppprof</a><span
@@ -5494,6 +5890,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small>Create a Model Printer Profile (MPP) from the .ti3
test data. <br>
@@ -5619,6 +6023,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small>Regenerate a device profiles B2A table data by
inverting the A2B table.
@@ -5745,6 +6157,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small>Link two device ICC profiles to create a device
link profile.
@@ -5872,6 +6292,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small>Color convert a TIFF or JPEG file using a sequence
of ICC device, device link, abstract profiles and calibration files.
@@ -5997,6 +6425,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + calibration curves to an ICC profile.<br>
<small><a style="font-family: monospace;" href="icclu.html">icclu </a><span
@@ -6121,6 +6557,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small>Lookup individual color values through any ICC
profile table. <br>
@@ -6246,6 +6690,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small>Lookup individual color values forward or inverted
though an ICC profile or CAL table. <br>
@@ -6371,6 +6823,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small>Lookup individual color values though an MPP
profile. Also create MPP gamut files/views.<br>
@@ -6496,6 +6956,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + a TIFF file to monochrome using an ICC device profile <br>
<h3>Color Tweaking tools<br>
@@ -6629,6 +7097,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + a gamut file or VRML file of the color gamut of an ICC profile. <br>
<small><a style="font-family: monospace;" href="tiffgamut.html">tiffgamut</a><span
@@ -6753,6 +7229,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + a gamut file or VRML file of the color gamut of a TIFF or JPEG
image. <br>
@@ -6878,6 +7362,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small>Convert one or more gamuts into a VRML 3D
visualization file. Compute an intersection.<br>
@@ -7005,6 +7497,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small>Dump the contents of an ICC profile as text. <br>
<small><a style="font-family: monospace;" href="profcheck.html">profcheck</a><span
@@ -7129,6 +7629,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + an ICC profile against .ti3 test chart data, create pruned .ti3
file.<br>
@@ -7253,6 +7761,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </small>Check ICC forward against inverse lookup. <br>
<small><a style="font-family: monospace;" href="splitti3.html">splitsti3</a><span
@@ -7376,6 +7892,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + a CGATS file (ie. a .ti3) into two parts randomly to verify
profiling. <br>
@@ -7504,6 +8028,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + an MPP profile against .ti3 test chart data. <br>
<small><a style="font-family: monospace;" href="spotread.html">spotread</a><span
@@ -7627,6 +8159,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + an instrument to read a single spot color value. <br>
<small><a style="font-family: monospace;" href="colverify.html">colverify</a><span
@@ -7694,6 +8234,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + matching of CIE in two CGATS/.ti3 files (also view differences as
VRML)<br>
@@ -7818,6 +8366,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + a synthetic input, display or output calibration (<a
href="File_Formats.html#.cal">.cal</a>)file.
@@ -7943,6 +8499,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + a Spectrometer to create a Colorimeter Correction Matrix
(CCMX) or a Colorimeter Calibration Spectral Set (CCSS)
@@ -8070,6 +8634,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + an embedded ICC profile from a TIFF or JPEG file.<br>
</small><small><a style="font-family: monospace;"
@@ -8200,6 +8772,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + or uninstall display profile, set display calibration from profile
or .cal file, test displace and dispwin access to a display.<br>
@@ -8331,6 +8911,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + Plot a spectrum (.sp, .cmf, .ccss) and calculate CCT and VCT.<br>
<small><a style="font-family: monospace;" href="spec2cie.html">spec2cie</a><span
@@ -8359,9 +8947,17 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + spectral .ti3 or .sp readings into CIE XYZ and D50 L*a*b* readings.
- Apply FWA, plot spectrums.<br>
+ Apply FWA, plot spectrums. Convert to/from XRGA standard.<br>
<h2><b><u><font size="+2"><a name="AlphList"></a>Main Tools
Alphabetic Listing:</font></u></b></h2>
@@ -8486,6 +9082,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + calibration curves to an ICC profile.<br>
<small><a style="font-family: monospace;" href="average.html">average</a><span
@@ -8610,6 +9214,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small><small><big>Average or Merge two or more
measurement data files, or average patches within a single file.</big></small><br>
@@ -8735,6 +9347,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small>Convert Colorblind format CMY/RGB test chart into
Argyll .ti3 CGATS format. <br>
@@ -8860,6 +9480,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small>Color convert a TIFF or JPEG file using a sequence
of ICC device, device link, abstract profiles and calibration files.<br>
@@ -8984,6 +9612,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + a Spectrometer to create a Colorimeter Correction Matrix
(CCMX) or a Colorimeter Calibration Spectral Set (CCSS)
@@ -9110,6 +9746,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + a test chart using an instrument to create a .ti3 data file. <br>
<small><a style="font-family: monospace;" href="collink.html">collink</a><span
@@ -9234,6 +9878,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small>Link two device ICC profiles to create a device
link profile. <br>
@@ -9359,6 +10011,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small>Create an ICC profile from the .ti3 test data.<br>
<font size="-1"><a style="font-family: monospace;"
@@ -9490,6 +10150,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + and read colorimetric values from a display <br>
<small><a style="font-family: monospace;" href="dispwin.html">dispwin</a><span
@@ -9615,6 +10283,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + or uninstall display profile, set display calibration from profile
or .cal file, test displace and dispwin access to a display.<br>
@@ -9741,6 +10417,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + an embedded ICC profile from a TIFF or JPEG file.<br>
</small><small><a style="font-family: monospace;"
@@ -9870,6 +10554,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small>Create a fake Argyll .ti3 CMY data file from a CMYK
profile, as a basis of creating a CMY to CMYK separation <br>
@@ -9995,6 +10687,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + the reading of a device using an ICC or MPP profile. <br>
<small><a style="font-family: monospace;" href="filmread.html">filmread</a><span
@@ -10119,6 +10819,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + film colorimetric values using a SpectroScanT (Deprecated ?)<br>
<small><a style="font-family: monospace;" href="filmtarg.html">filmtarg</a><span
@@ -10243,6 +10951,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + film recorder TIFF files from Argyll .ti1 file. <br>
<small><a style="font-family: monospace;" href="greytiff.html">greytiff</a><span
@@ -10367,6 +11083,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + a TIFF file to monochrome using an ICC device profile <small><a
style="font-family: monospace;" href="oeminst.html"></a></small><br>
@@ -10492,6 +11216,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small>Dump the contents of an ICC profile as text. <br>
<small><a style="font-family: monospace;" href="iccgamut.html">iccgamut</a><span
@@ -10616,6 +11348,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + a gamut file or VRML file of the color gamut of an ICC profile. <br>
<small><a style="font-family: monospace;" href="icclu.html">icclu </a><span
@@ -10740,6 +11480,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small>Lookup individual color values through any ICC
profile table. <br>
@@ -10864,6 +11612,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + an instrument to measure an illuminant spectrum, and estimate its UV
content.<br>
@@ -10992,6 +11748,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + Kodak Colorflow format CMYK test chart into Argyll .ti3 CGATS
format. <br>
@@ -11021,6 +11785,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + LightSpace format RGB .bcs test chart results into Argyll
.ti3 CGATS format.</big></small></big></small><br>
@@ -11146,6 +11918,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + an MPP profile against .ti3 test chart data. <br>
<small><a style="font-family: monospace;" href="mpplu.html">mpplu</a><span
@@ -11270,6 +12050,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small>Lookup individual color values though an MPP
profile. Also create MPP gamut files/views. <br>
@@ -11395,6 +12183,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small>Create a Model Printer Profile (MPP) from the .ti3
test data. <br>
@@ -11524,6 +12320,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + a printer calibration .cal file from a .ti3 data file<small><big>.</big></small><br>
<small><a style="font-family: monospace;" href="printtarg.html">printtarg</a><span
@@ -11648,6 +12452,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + a PS, EPS or TIFF file containing test patch values, ready for
printing.</big></small><br>
@@ -11773,6 +12585,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + an ICC profile against .ti3 test chart data, create pruned .ti3
file.<br>
@@ -11903,6 +12723,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small>Regenerate a device profiles B2A table data by
inverting the A2B table. <br>
@@ -12028,6 +12856,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small>Convert a TIFF image of a test chart into
.ti3 device values. <br>
@@ -12154,9 +12990,17 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + spectral .ti3 or .sp readings into CIE XYZ and D50 L*a*b* readings.
- Apply FWA, plot spectrums.<br>
+ Apply FWA, plot spectrums. Convert to/from XRGA standard.<br>
<small><a style="font-family: monospace;" href="specplot.html">specplot</a><span
style="font-family: monospace;"> </span><span
style="text-decoration: underline; font-family: monospace;"></span></small> @@ -12280,6 +13124,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + Plot a spectrum (.sp, .cmf, .ccss) and calculate CCT and VCT.<br>
<small><a style="font-family: monospace;" href="splitti3.html">splitsti3</a><span
@@ -12403,6 +13255,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + a CGATS file (ie. a .ti3) into two parts randomly to verify
profiling. <br>
@@ -12527,6 +13387,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + an instrument to read a single spot color value. <small><a
style="font-family: monospace;" href="oeminst.html"></a></small><br>
@@ -12651,6 +13519,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + a synthetic input, display or output calibration (<a
href="File_Formats.html#.cal">.cal</a>)file.<br>
@@ -12776,6 +13652,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + the reading of a device using a synthetic device model. </big></small><br>
<small><a style="font-family: monospace;" href="targen.html">targen</a><span
@@ -12900,6 +13784,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small>Generate a profiling test target values .ti1 file.
<br>
@@ -13025,6 +13917,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + a gamut file or VRML file of the color gamut of a TIFF or JPEG
image. <br>
@@ -13154,6 +14054,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small><small><big>Convert Gretag/Logo/X-Rite/Barbieri or
other format RGB or CMYK test chart results into Argyll .ti3
@@ -13280,6 +14188,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + one or more gamuts into a VRML 3D visualization file. Compute an
intersection.<br>
@@ -13405,6 +14321,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + </span></small>Lookup individual color values forward or inverted
though an ICC profile or CAL table. <br>
@@ -13557,6 +14481,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + Device test values <br>
<a href="File_Formats.html#.ti2">.ti2</a> @@ -13680,6 +14612,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + Device test values & chart layout <br>
<a href="File_Formats.html#.ti3">.ti3</a> @@ -13803,6 +14743,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + Device test values & CIE tristimulus/spectral results <a
href="ti3_format.html">Format details.</a><br>
@@ -13930,6 +14878,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + Test chart recognition template. <a href="cht_format.html">Format
details.</a> <br>
@@ -14054,6 +15010,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + 3D gamut surface description <br>
<a href="File_Formats.html#.sp">.sp</a> @@ -14177,6 +15141,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + Illuminant spectral description <br>
<a href="File_Formats.html#.cmf">.cmf</a>
@@ -14308,6 +15280,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + Standard text based data exchange format <br>
<a href="File_Formats.html#ICC">ICC</a> @@ -14431,6 +15411,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + International Color Consortium profile format <br>
<a href="File_Formats.html#MPP">MPP</a> @@ -14554,6 +15542,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + Model device profile format <br>
<a href="File_Formats.html#TIFF">TIFF</a> @@ -14677,6 +15673,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + Tag Image File Format raster files. <br>
<a href="File_Formats.html#JPEG">JPEG</a> @@ -14800,6 +15804,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + Joint Photographic Experts Group, JPEG File Interchange Format
raster files. <br>
@@ -14928,6 +15940,14 @@ href="http://www.google.com/search?hl=en&q=windows+command+prompt+tutorial"> + + + + + + + + Virtual Reality Modelling Language 3D file format. <br>
<a href="File_Formats.html#X3D">X3D</a>
diff --git a/doc/ArgyllFlow.jpg b/doc/ArgyllFlow.jpg Binary files differindex 962e42a..962e42a 100644..100755 --- a/doc/ArgyllFlow.jpg +++ b/doc/ArgyllFlow.jpg diff --git a/doc/ArgyllFlowThumb.jpg b/doc/ArgyllFlowThumb.jpg Binary files differindex a98b4ff..a98b4ff 100644..100755 --- a/doc/ArgyllFlowThumb.jpg +++ b/doc/ArgyllFlowThumb.jpg diff --git a/doc/CMP_DT_003.jpg b/doc/CMP_DT_003.jpg Binary files differindex 1975eeb..1975eeb 100644..100755 --- a/doc/CMP_DT_003.jpg +++ b/doc/CMP_DT_003.jpg diff --git a/doc/CMP_Digital_Target-4.jpg b/doc/CMP_Digital_Target-4.jpg Binary files differindex f8cb7a9..f8cb7a9 100644..100755 --- a/doc/CMP_Digital_Target-4.jpg +++ b/doc/CMP_Digital_Target-4.jpg diff --git a/doc/CMP_Digital_Target-7.jpg b/doc/CMP_Digital_Target-7.jpg Binary files differindex b5eaab6..b5eaab6 100644..100755 --- a/doc/CMP_Digital_Target-7.jpg +++ b/doc/CMP_Digital_Target-7.jpg diff --git a/doc/CRTspectrum.jpg b/doc/CRTspectrum.jpg Binary files differindex 82ddd17..82ddd17 100644..100755 --- a/doc/CRTspectrum.jpg +++ b/doc/CRTspectrum.jpg diff --git a/doc/ChangesSummary.html b/doc/ChangesSummary.html index 3549a79..354437d 100644 --- a/doc/ChangesSummary.html +++ b/doc/ChangesSummary.html @@ -16,6 +16,88 @@ <h1> Summary of Argyll CMS Changes since last release</h1>
<h3>For a <span style="text-decoration: underline;">complete</span>
and more detailed list of changes, please see the log.txt file.</h3>
+ <h1>[V1.9.2 -> V2.0.0] 17th November 2017</h1>
+ <ul>
+ <li>Added support for "pm" viewing condition (Print evaluation
+ with partial Mid-tone adaptation), and associated m: viewing
+ condition parameter. This is intended to address certain
+ situations involving the use of papers containing FWA/OBE
+ brighteners when viewed in an environment that has a very
+ noticeably warmer white point than the paper itself under the
+ illuminant.</li>
+ <li>Added support for the X-Rite i1Studio instrument. Note that
+ you may have to un-install and re-install the system drivers on
+ MSWindows, or update the udev 55-Argyll.rules file on Linux.<span
+ style="font-weight: bold;"></span></li>
+ <li>Slight improvement to i1d3 accuracy, by rounding the frequency
+ mode measurements up by 0.5.</li>
+ <li>Returned input profile forced Absolute Colorimetric option
+ with -ua flag, after the -u option was changed in V1.5.0.<br>
+ </li>
+ <li>Try and fix problem in triggering calibration when
+ ARGYLL_NOT_INTERACTIVE is set.</li>
+ <li>Improve compatibility of txt2ti3, and added -D option to mark
+ output as Display but not Normalized to white.</li>
+ <li>Modified collink to disable Video encoded in/out sync level
+ preservation.</li>
+ <li>Added support for custom Observer by using a .cmf file as an
+ argument to all tools taking an observer parameter.</li>
+ <li>Added support for proposed CIE 2012 2 degree & 10 degree
+ observers, based on the CIE (2006) 2-deg LMS cone fundamentals.</li>
+ <li>Fix problem with dispwin -E option not being shown in usage,
+ and only being applied when a calibration file is used.</li>
+ <li>Added spotread -u option to display XYZ amd CIE 1976 Yuv
+ values.</li>
+ <li>Added XRGA conversion support to spec2cie, as well as better
+ support in chartread and txt2ti3 for tracking XRGA standard and
+ polarization filter use.</li>
+ <li>Fix bug in spec2cie processing emissive .sp files.</li>
+ <li>Fix problem with i1d3 running direct USB (i.e. Not via HID) on
+ MSWin.</li>
+ <li>Fixed bug in render/timage -p.</li>
+ <li>Changed spotread ambient readings (CCT, CRI, TLCI) to show CCT
+ delta E in 1960 Duv units and others in Delta E 2000.</li>
+ <li>Added ARGYLL_UNTWIST_GAMUT_SURFACE environment variable, that
+ enables extra gamut clip surface processing that may improve the
+ smoothness of device links and B2A tables for poorly behaved
+ devices.</li>
+ <li>Fixed bug introduced in new colorimetric nearest clipping code
+ in rspl/rev.c in V1.9.0 that caused colprof using some ink limit
+ settings (such as -L0) to crash.</li>
+ <li>Fixed bug introduced in new colorimetric nearest clipping code
+ in rspl/rev.c in V1.9.0 that caused some (mainly XYZ clut)
+ profiles to clip badly, causing banding.</li>
+ <li>Improved dispcal -R VideoLUT depth measurement algorithm
+ robustness.</li>
+ <li>Worked around latest OS X super slow opening serial port
+ problem (1.5 seconds to open a port!)</li>
+ <li>Added ColorCheckerHalfPassport.cht file.</li>
+ <li>Fixed bug in ChromeCast mDNS parsing that caused problems with
+ some devices with long names being detected.</li>
+ <li>Now ignoring Chromecast-Audio and (.ca flags & 1) == 0
+ devices, and showing the friendly chromecast name if available.</li>
+ <li>Wait longer to find more Chromecasts, even if we've found one.</li>
+ <li>Fixed colprof bug when handling Display L*a*b* .ti3 data.</li>
+ <li>Added Wacom i1d3 support.</li>
+ <li>Changed dispwin to by default ignore Gnome colord, and use its
+ native ucmm for storage of display profiles, since colord
+ support for ArgyllCMS has proven unreliable. This can be
+ re-enabled by setting the ARGYLL_USE_COLORD environment variable
+ (i.e. to "true").</li>
+ <li>Change X11 root window _ICC_PROFILE_xxx atom setting for
+ Xrandr case to now match the Xinerama order, so that
+ ICC_PROFILE_xxx atoms match, irrespective of which extension
+ applications are using. This improves conformance to "ICC
+ Profiles in X Specification 0.2".</li>
+ <li>Improved ucmm install/load/delete to better respect
+ systemlocal/user scopes, as well as eliminating need for profile
+ name on delete when ucmm is used.</li>
+ <li>Improve fast serial port scan to better detect Lumagen
+ Radiance without upsetting it.</li>
+ <li>Added ARGYLL_EXCLUDE_SERIAL_SCAN environment variable, to
+ allow suppression of fast serial port scan of sensitive devices.<br>
+ </li>
+ </ul>
<h1>[V1.9.1 -> V1.9.2] 17th October 2016</h1>
<ul>
<li>Added CMYKOGB and CMYKRGB 7 channel ink preset, and made
@@ -23,10 +105,7 @@ targen ink selection.<br>
</li>
<li>Fix oeminst for OS X save location.</li>
- <li>Fix oeminst for OS X Spyder 4 CD calibration file
- location.Improved robustness of ChromeCast discovery, and added
- some minimal diagnostics.<br>
- </li>
+ <li>Fix oeminst for OS X Spyder 4 CD calibration file location.</li>
</ul>
<h1>[V1.8.3 -> V1.9.1] 28th September 2016</h1>
<ul>
@@ -1123,6 +1202,9 @@ + + + </span>for systems with > 3Gig Ram.</li>
<li>Add support for the Eye-One Monitor spectrometer.</li>
@@ -1177,6 +1259,9 @@ + + + and memory usage issues.</li>
<li>Fixed issues with Eye-One Pro Rev B timeouts.</li>
diff --git a/doc/Chroma4.jpg b/doc/Chroma4.jpg Binary files differindex 917a9e5..917a9e5 100644..100755 --- a/doc/Chroma4.jpg +++ b/doc/Chroma4.jpg diff --git a/doc/ColorHug.jpg b/doc/ColorHug.jpg Binary files differindex 6c5d16a..6c5d16a 100644..100755 --- a/doc/ColorHug.jpg +++ b/doc/ColorHug.jpg diff --git a/doc/ColorManagement.html b/doc/ColorManagement.html index 3adcbe8..3adcbe8 100644..100755 --- a/doc/ColorManagement.html +++ b/doc/ColorManagement.html diff --git a/doc/ColorMunki.jpg b/doc/ColorMunki.jpg Binary files differindex 513d770..513d770 100644..100755 --- a/doc/ColorMunki.jpg +++ b/doc/ColorMunki.jpg diff --git a/doc/ColorMunkiCreate.jpg b/doc/ColorMunkiCreate.jpg Binary files differindex 64b3dbd..64b3dbd 100644..100755 --- a/doc/ColorMunkiCreate.jpg +++ b/doc/ColorMunkiCreate.jpg diff --git a/doc/Compiling.html b/doc/Compiling.html index 942e15e..4e58f5d 100644..100755 --- a/doc/Compiling.html +++ b/doc/Compiling.html @@ -26,7 +26,7 @@ installed:<br> <br> jam: Program construction tool, similar to make - [If available]<br> + [If available - downloadable from the ArgyllCMS website]<br> gcc C compiler<br> Development files for libX11<br> Development files for libXdmcp<br> diff --git a/doc/CrushedDisplyBlacks.html b/doc/CrushedDisplyBlacks.html index 3038384..3038384 100644..100755 --- a/doc/CrushedDisplyBlacks.html +++ b/doc/CrushedDisplyBlacks.html diff --git a/doc/DC.jpg b/doc/DC.jpg Binary files differindex 4b3508e..4b3508e 100644..100755 --- a/doc/DC.jpg +++ b/doc/DC.jpg diff --git a/doc/DTP20.jpg b/doc/DTP20.jpg Binary files differindex f5ec164..f5ec164 100644..100755 --- a/doc/DTP20.jpg +++ b/doc/DTP20.jpg diff --git a/doc/DTP22.jpg b/doc/DTP22.jpg Binary files differindex 93d7400..93d7400 100644..100755 --- a/doc/DTP22.jpg +++ b/doc/DTP22.jpg diff --git a/doc/DTP41.jpg b/doc/DTP41.jpg Binary files differindex 1a946e9..1a946e9 100644..100755 --- a/doc/DTP41.jpg +++ b/doc/DTP41.jpg diff --git a/doc/DTP51.jpg b/doc/DTP51.jpg Binary files differindex 946810c..946810c 100644..100755 --- a/doc/DTP51.jpg +++ b/doc/DTP51.jpg diff --git a/doc/DTP92.jpg b/doc/DTP92.jpg Binary files differindex 2570daa..2570daa 100644..100755 --- a/doc/DTP92.jpg +++ b/doc/DTP92.jpg diff --git a/doc/DTP94.jpg b/doc/DTP94.jpg Binary files differindex d99feaf..d99feaf 100644..100755 --- a/doc/DTP94.jpg +++ b/doc/DTP94.jpg diff --git a/doc/DocLicense.txt b/doc/DocLicense.txt index cd2b3b1..cd2b3b1 100644..100755 --- a/doc/DocLicense.txt +++ b/doc/DocLicense.txt diff --git a/doc/EX1.jpg b/doc/EX1.jpg Binary files differindex 0192ba8..0192ba8 100644..100755 --- a/doc/EX1.jpg +++ b/doc/EX1.jpg diff --git a/doc/Environment.html b/doc/Environment.html index c4c1aed..a639270 100644..100755 --- a/doc/Environment.html +++ b/doc/Environment.html @@ -97,6 +97,12 @@ + + + + + + </span>mode manually will probably fail, because the character and return get split up.)<br> </div> @@ -118,6 +124,12 @@ + + + + + + </b>or <b>X3DOM</b>, which will result in <b>.wrl</b>, <b>.x3d</b> and <b>.x3d.html</b> files respectively. See <a href="3dformat">3d @@ -132,6 +144,12 @@ + + + + + + Viewing Format</a>.<br> </blockquote> <b><br> @@ -173,6 +191,12 @@ a + + + + + + delay of 200 msec is allowed between changing a patch color in software, and that change appearing in the displayed color itself. For some instuments (ie. i1d3, i1pro, ColorMunki, Klein K10-A) @@ -200,6 +224,12 @@ environment + + + + + + variable, ie. ARGYLL_MIN_DISPLAY_UPDATE_DELAY_MS=400 would set a 400 msec minimum delay.<br> <span style="font-weight: bold;"><br> @@ -346,6 +376,12 @@ environment style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"> </span></span></span></span></span></span></span></span></span></span></span></span>above + + + + + + for more details.)<span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: @@ -357,6 +393,12 @@ environment style="font-weight: bold;"> <br> <br> </span></span></span></span></span></span></span></span></span></span></span></span>To + + + + + + allow for strict conformance to the ICC specification when using non-standard illuminants, setting the <span style="font-weight: bold;"><span style="font-weight: bold;"><span @@ -368,12 +410,24 @@ environment style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;">ARGYLL_CREATE_OUTPUT_PROFILE_WITH_CHAD + + + + + + </span></span></span></span></span></span></span></span></span></span></span></span>environment + + + + + + variable causes a non-D50 illuminant white point change to be hidden in the ChromaticAdapation Tag, and to still allow this to be useful in a proofing situation, ArgyllCMS will incorporate the effect of the ChromaticAdapation Tag when Absolute Colorimetric - Intent is chosen. Note that other CMM's may not do. For full + Intent is chosen. Note that other CMM's may not do so. For full conformance with ICC specifications, the <span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"><span @@ -425,6 +479,29 @@ environment implementations.<br> <br> </div> + <br> + <span style="font-weight: bold;"><span style="font-weight: bold;"><span + style="font-weight: bold;"><span style="font-weight: bold;"><a + name="ARGYLL_IGNORE_XRANDR1_2"></a>ARGYLL_IGNORE_XINERAMA</span></span></span></span><br> + <span style="font-weight: bold;"><span style="font-weight: bold;"><span + style="font-weight: bold;"><span style="font-weight: bold;"><span + style="font-weight: bold;"><span style="font-weight: + bold;"><span style="font-weight: bold;"><br> + </span></span> </span> </span></span></span></span> + <div style="margin-left: 40px;">On an X11 system, if this is <span + style="font-weight: bold;"></span>set (ie. set it to "yes"), + then the presence of the XInerama extension will be ignored, and + default X11 Screen numbering will be used to access multiple + displays.</div> + <span style="font-weight: bold;"><span style="font-weight: bold;"><span + style="font-weight: bold;"><span style="font-weight: bold;"> </span></span></span><br> + <a name="ARGYLL_IGNORE_COLORD"></a>ARGYLL_USE_COLORD</span><br> + <blockquote><small><small>By default </small></small>ArgyllCMS + >= V 1.9.4 will use its native <a + href="file:///D:/src/argyll/doc/ucmm.html">ucmm</a> to store + display ICC profiles on Linux based systems, but if the <b>ARGYLL_USE_COLORD</b> + environment variable is set, it will attempt to use the Gnome <b>colord</b> + storage instead.<span style="font-weight: bold;"></span></blockquote> <span style="font-weight: bold;"><a name="ARGYLL_DISABLE_I1PRO2_DRIVER"></a>ARGYLL_DISABLE_I1PRO2_DRIVER<br> <br> @@ -433,8 +510,18 @@ environment Eye-One Pro Rev E (aka Eye-One Pro 2) instrument features, but a Rev E can be operated in legacy mode if the environment variable ARGYLL_DISABLE_I1PRO2_DRIVER is set (ie. set it to "yes").<br> + <b><br> + </b><b> </b></div> + <b> </b><b><a name="ARGYLL_EXCLUDE_SERIAL_SCAN"></a>ARGYLL_EXCLUDE_SERIAL_SCAN</b><br> + <blockquote>Normally ArgyllCMS will try and identify any device on a + fast serial port (i.e. USB or BlueTooth based port). This may + disturb devices it doesn't know about, so the + ARGYLL_EXCLUDE_SERIAL_SCAN variable can be set to a semi-colon or + comma separated list of serial ports that should not be fast + scanned. Example:<br> <br> - </div> + "COM2;/dev/tty5" etc.<br> + </blockquote> <span style="font-weight: bold;"></span><span style="font-weight: bold;"><a name="ARGYLL_XRGA"></a>ARGYLL_XRGA</span><br> <blockquote>If the <span style="font-weight: bold;">ARGYLL_XRGA </span> @@ -450,7 +537,23 @@ environment If not set (or set to some other string), then the native calibration will be used. Note that the values must be upper case.<br> </blockquote> - <span style="font-weight: bold;"><a name="XDG_CACHE_HOME"></a>XDG_CACHE_HOME<br> + <span style="font-weight: bold;"><a name="UNTWIST_GAMUT_SURFACE"></a>ARGYLL_UNTWIST_GAMUT_SURFACE<br> + </span> + <blockquote>Whenever a color device profile value is inverted (i.e. + in creating ICC B2A tables, or creating a device link using gamut + mapping mode), colors that are out of gamut after gamut mapping, + will be clipped to the gamut surface. If the device behavior is + poor (i.e. non-monotonic), the gamut surface representation used + for clipping may have "shadow" areas that result in non-smooth + jumps in clipped output. Setting the <span style="font-weight: + bold;">ARGYLL_UNTWIST_GAMUT_SURFACE</span> environment variable + to a non empty value will invoke an additional step in the gamut + surface creation routine, that attempts to minimize such shadowed + surface areas. This can improve the smoothness of clipped colors + for poorly behaved devices, but may make the output for some + devices worse. </blockquote> + <span style="font-weight: bold;"><br> + <a name="XDG_CACHE_HOME"></a>XDG_CACHE_HOME<br> <span style="font-weight: bold;"><br> </span></span> <div style="margin-left: 40px;">Argyll tries to follow the <a @@ -473,6 +576,12 @@ Base + + + + + + Directory Specification</a>, and uses the <span style="font-weight: bold;">XDG_CACHE_HOME</span> environment variable to place per instrument calibration information, and diff --git a/doc/FWA.html b/doc/FWA.html index e83a64f..e83a64f 100644..100755 --- a/doc/FWA.html +++ b/doc/FWA.html diff --git a/doc/FWA_measure.jpg b/doc/FWA_measure.jpg Binary files differindex 7d97fff..7d97fff 100644..100755 --- a/doc/FWA_measure.jpg +++ b/doc/FWA_measure.jpg diff --git a/doc/File_Formats.html b/doc/File_Formats.html index aeddc6d..aeddc6d 100644..100755 --- a/doc/File_Formats.html +++ b/doc/File_Formats.html diff --git a/doc/Fluorescent.jpg b/doc/Fluorescent.jpg Binary files differindex acabf74..acabf74 100644..100755 --- a/doc/Fluorescent.jpg +++ b/doc/Fluorescent.jpg diff --git a/doc/HCFR.jpg b/doc/HCFR.jpg Binary files differindex 9454842..9454842 100644..100755 --- a/doc/HCFR.jpg +++ b/doc/HCFR.jpg diff --git a/doc/HCT.jpg b/doc/HCT.jpg Binary files differindex a1f1f23..a1f1f23 100644..100755 --- a/doc/HCT.jpg +++ b/doc/HCT.jpg diff --git a/doc/HiResLaser.jpg b/doc/HiResLaser.jpg Binary files differindex 66da2eb..66da2eb 100644..100755 --- a/doc/HiResLaser.jpg +++ b/doc/HiResLaser.jpg diff --git a/doc/Huey.jpg b/doc/Huey.jpg Binary files differindex 5f25980..5f25980 100644..100755 --- a/doc/Huey.jpg +++ b/doc/Huey.jpg diff --git a/doc/Installing.html b/doc/Installing.html index 79d8ade..79d8ade 100644..100755 --- a/doc/Installing.html +++ b/doc/Installing.html diff --git a/doc/Installing_Linux.html b/doc/Installing_Linux.html index dc9a044..8e4795c 100644..100755 --- a/doc/Installing_Linux.html +++ b/doc/Installing_Linux.html @@ -1,49 +1,49 @@ -<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html;
- charset=windows-1252">
- <meta http-equiv="content-type" content="text/html;
- charset=windows-1252">
- <meta name="GENERATOR" content="Mozilla/4.73 [en] (WinNT; I)
- [Netscape]">
- <title>Argyll Installation on Linux</title>
- </head>
- <body>
- <h1> <u>Installing the software on Linux with X11<br>
- </u></h1>
- <br>
- You will need to unpack the downloaded file in the location you have
- chosen to hold the executable files. Typically this might be in <span
- style="font-style: italic;">/usr/local/</span>, or perhaps <span
- style="font-style: italic;">$HOME/bin/</span>. You would then
- unpack the files using <span style="font-weight: bold;">tar -zxf</span>
- <span style="font-weight: bold;">archivename.tgz</span>, which will
- create a directory <span style="font-weight: bold;">Argyll_VX.X.X</span>,
- where X.X.X is the version number, and the executables will be in <span
- style="font-weight: bold;">Argyll_VX.X.X/bin</span> You will also
- have to configure your $PATH environment variable to give access to
- the executables from your command line environment. The .tgz file
- also contains several useful reference files (such as scanner chart
- recognition templates, sample illumination spectrum etc.) in the ref
- sub-directory, as well as all the current HTML documentation in a
- doc sub-directory. You may want to copy things to more standard
- locations such as /usr/local/bin, /usr/local/argyll/bin etc.,
- depending on the conventions used on your system.<br>
- <br>
- Some systems (Fedora ?) seem to be missing normal X11 libraries like
- <b>libXss.so</b>, so you may have to install <b>libXScrnSaver</b>,
- i.e. "sudo dnf install libXScrnSaver".<br>
- <br>
- <big style="color: rgb(51, 102, 255);"><span style="font-weight:
- bold;"><a name="bell"></a>Note on the system bell:</span></big><br>
- <br>
- When reading strips using the Eye-One Pro or ColorMunki instrument,
- the system bell is used to indicate when the instrument the ready to
- be used, and to provide feedback on any problems. On some Linux
- installations the system bell may be disabled. As well as checking
- the terminal and GUI sound preferences, you may have to enable the
- used of the PC speaker driver, which can be done by adding the
+<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"> +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; + charset=windows-1252"> + <meta http-equiv="content-type" content="text/html; + charset=windows-1252"> + <meta name="GENERATOR" content="Mozilla/4.73 [en] (WinNT; I) + [Netscape]"> + <title>Argyll Installation on Linux</title> + </head> + <body> + <h1> <u>Installing the software on Linux with X11<br> + </u></h1> + <br> + You will need to unpack the downloaded file in the location you have + chosen to hold the executable files. Typically this might be in <span + style="font-style: italic;">/usr/local/</span>, or perhaps <span + style="font-style: italic;">$HOME/bin/</span>. You would then + unpack the files using <span style="font-weight: bold;">tar -zxf</span> + <span style="font-weight: bold;">archivename.tgz</span>, which will + create a directory <span style="font-weight: bold;">Argyll_VX.X.X</span>, + where X.X.X is the version number, and the executables will be in <span + style="font-weight: bold;">Argyll_VX.X.X/bin</span> You will also + have to configure your $PATH environment variable to give access to + the executables from your command line environment. The .tgz file + also contains several useful reference files (such as scanner chart + recognition templates, sample illumination spectrum etc.) in the ref + sub-directory, as well as all the current HTML documentation in a + doc sub-directory. You may want to copy things to more standard + locations such as /usr/local/bin, /usr/local/argyll/bin etc., + depending on the conventions used on your system.<br> + <br> + Some systems (Fedora ?) seem to be missing normal X11 libraries like + <b>libXss.so</b>, so you may have to install <b>libXScrnSaver</b>, + i.e. "sudo dnf install libXScrnSaver".<br> + <br> + <big style="color: rgb(51, 102, 255);"><span style="font-weight: + bold;"><a name="bell"></a>Note on the system bell:</span></big><br> + <br> + When reading strips using the Eye-One Pro or ColorMunki instrument, + the system bell is used to indicate when the instrument the ready to + be used, and to provide feedback on any problems. On some Linux + installations the system bell may be disabled. As well as checking + the terminal and GUI sound preferences, you may have to enable the + used of the PC speaker driver, which can be done by adding the command <span style="font-weight: bold;">/sbin/modprobe pcspkr </span>to @@ -57,8 +57,9 @@ -
- the <span style="font-weight: bold;">/etc/rc.local</span> startup
+ + + the <span style="font-weight: bold;">/etc/rc.local</span> startup script. You may also have to run <span style="font-weight: bold;">xset @@ -72,213 +73,215 @@ -
- b 100 1000 100</span> in your local setup, if you are running in
- an X11 environment. You can check that the system bell is operating
- by doing an "echo ^G", where ^G is ctrl-G.<br>
- <br>
- <big style="color: rgb(51, 102, 255);"><span style="font-weight:
- bold;"><a name="multimonitor"></a>Note on X11 multi-monitor
- setups:</span></big><br>
- <br>
- When working with a multi-monitor X11 configuration, note that you
- will only be able to individually calibrate monitors if the
- multi-window extension you are using (if any), supports access to
- the individual screen Video LUT tables that are used for
- calibration. The native X11 multi-screen addressing supports this,
- as does the Xinerama extension, and XRandR V1.2.<br>
- <br>
- The proprietary NVidia TwinView and ATI MergeFB extensions do not
- currently support access to the individual screen Video LUTs, so
- calibration of each screen independently is impossible if either of
- these extensions are running. You can switch to using Xinerama to
- solve this problem, or you can try doing a calibration for the
- screens that do have accessible Video LUTs with these proprietary
- extensions, or ignore calibration and rely purely on display
- profiling. Use the dispwin tool to figure out what works on your
- system. The NVidia ATI binary drivers do not seem to properly
- support XRandR V1.2 either, even though they claim to do so. You may
- have to set the <span style="font-weight: bold;"></span><span
- style="font-weight: bold;">ARGYLL_IGNORE_XRANDR1_2</span>
- environment variable if the XRandR V1.2 extension is faulty.<br>
- <br>
- If these limitations trouble you, then as a valuable customer of
- NVidia or AMD/ATI, perhaps you should contact them and urge them to
- fix the problems with Video LUT access in their proprietary
- multi-monitor extensions and XRandR implementation, bringing their
- support for multi-monitors on X11 up to the same standards as other
- operating systems. Ask them to add full and correct support for the
- XRandR V1.2 extension.<br>
- <br>
- <big style="color: rgb(51, 102, 255);"><span style="font-weight:
- bold;"><a name="VideoLUTs"></a>Fixing access to Video LUTs:</span></big><br>
- <br>
- Some users have noted that their default X11 installation doesn't
- properly enable access to the video card Video Lookup Tables
- (RAMDAC). The Video LUTs are used for display calibration purposes,
- and a warning will be issues by the <span style="font-weight:
- bold;">dispcal</span> and <span style="font-weight: bold;">dispread</span>
- tools if there is a problem with this. Without access to the
- VideoLUTs, you won't be able to use display calibration.<br>
- <br>
- The problem may be because certain X11 extensions aren't being
- loaded by default. You may want to check that you have<br>
- <br>
- <big style="color: rgb(51, 102, 255);"><span style="font-weight:
- bold;"></span></big> Load "extmod" <br>
- <br>
- in the appropriate (or any) section of
- your Xorg.conf file, to allow the XF86Video LUT
- extensions to function correctly.<br>
- <br>
- Another source of problems is if the display isn't configured with a
- suitable visual. Typically for high quality color you need to be
- using at least <span style="font-weight: bold;">24 bits</span> per
- pixel (8 Bits for each of Red, Green and Blue channels), but more
- importantly the number of entries in the the VideoLUTs needs to
- match the depth of the screen. So if the VideoLUTs have 256 entries
- per channel, then the screen must be using 8 bits per channel to
- match. Or 64 entries and 6 bits. Or 4096 entries and 12 bits, etc.
- Running "dispwin -D" may give some clues as to what the nature of
- the problem is. You might have to look into your xorg.conf or XRANDR
- setup, or on some distributions there will be some configuration
- program that will let you choose the display configuration (ie. YaST
- or SaX2 on openSUSE, etc.).<br>
- <br>
- <big style="color: rgb(51, 102, 255);"><span style="font-weight:
- bold;"><a name="InstAccess"></a>Setting up instrument access:<br>
- <br>
- </span></big>By default most Linux based systems make devices
- inaccessible to user mode programs, so it is necessary to make some
- modification to your permissions so that Argyll tools are able to
- access the Color Measurement Instruments. In order from newest to
- oldest, the following sub-systems may need to be configured to
- permit this:<br>
- <br>
- <a style="font-weight: bold;" href="#None">No device
- configuration needed when running from the console:</a><span
- style="font-weight: bold; text-decoration: underline;"><br>
- <br>
- </span> <a href="#None">Mandriva 2008.0 default
- installation</a><br>
- <br>
- <h5> <a href="Installing_Linux.html#udev1">USB instruments
- access using udev:</a></h5>
- <a href="#udev1"></a> <a
- href="Installing_Linux.html#udev1">Ubuntu 10.04</a><br>
- <a href="Installing_Linux.html#udev1">Fedora
- Core 8</a><br>
- <a href="#udev1">Mandriva 2008.1</a><br>
- <a href="#udev1">OpenSuSE 10.3</a><br>
- <a href="#udev1">Ubuntu 7.1</a><br>
- <a href="#udev1">Kubuntu 7.1</a><br>
- <a href="#udev1">Debian 4.0</a><br>
- <h5> <a href="#hotplug">USB instruments access using hotplug:</a></h5>
- <a href="#hotplug">Red Hat 4.0</a><br>
- <a href="Installing_Linux.html#hotplug">Fedora Core 4</a><br>
- <a href="Installing_Linux.html#hotplug">Fedora Core 3</a><br>
- <a href="Installing_Linux.html#hotplug">Fedora Core 2</a><br>
- <br>
- <h5> <span style="text-decoration: underline;"></span><a
- href="#serial">Serial instrument access:</a></h5>
- <a href="#serial">All</a><br>
- <br>
- <span style="font-weight: bold;">NOTE:</span> That <b>mtp-probe</b>
- / <span style="font-weight: bold;">libmtp</span> been known
- to interfere with device access, particularly the Spyder 3 and
- DTP94. Recent versions of the libmtp should ignore any instrument
- marked as COLOR_MEASUREMENT_DEVICE by the
- /etc/udev/rules.d/55-Argyll.rules file, but for older systems you
- probably need to disable libmtp (look in the udev configuration).<br>
- <br>
- The <b>JETI</b> specbos <b>1211</b><b>, </b><b>1201</b><b>,
- 1511, 1501</b> and the <b>Klien K10A</b> makes use of the <a
- href="http://www.ftdichip.com/Drivers/VCP.htm">FTDI Virtual COM
- Port Drivers</a> (VCP), that should come with any recent version
- of Linux. Older versions of Linux may not support the FTDI FT231XS
- chip that the <b>JETI</b> specbos <b>1511, 1501</b> use. You may
- have to add yourself to the<span style="font-weight: bold;">
- tty, </span><span style="font-weight: bold;">uucp</span>
- or <b>dialout</b> group to have permission to open the
- instrument.<br>
- <br>
- <span style="font-weight: bold;"></span>
- <hr style="width: 100%; height: 2px;">
- <h5><span style="color: rgb(204, 51, 204);"><a name="None"></a>No
- device configuration needed:</span></h5>
- A few systems have in place a security configuration such that
- anyone logging in at the console of a machine has access to all the
- local devices.<span style="color: rgb(204, 51, 204);"><span
- style="font-weight: bold;"><br>
- </span></span>
- <h5><span style="color: rgb(204, 51, 204);"><a name="udev1"></a>USB
- instruments access using udev with existing </span><span
- style="color: rgb(204, 51, 204);"><span style="font-weight:
- bold;"><font color="#330033">/etc/udev/rules.d</font> or</span>
- <font color="#330033"> /usr/lib/udev/rules.d/69-cd-sensors.rules</font>
- file.<br>
- </span></h5>
- <span style="color: rgb(204, 51, 204);"> </span>Recent Fedora based
- systems include Gnome Color Manager, which comes with a udev rule
- for color instruments. You can check this by looking for the <span
- style="font-weight: bold;">/etc/udev/rules.d</span> or in <b>/usr/lib/udev/rules.d/69-cd-sensors.rules</b>
- file. If this exists and is up to date enough to include the
- instrument you want to use, then all you have to do is add yourself
- to the <b>colord</b> group, ie:<br>
- <br>
- sudo usermod -a -G colord $USER<br>
- <br>
- If the <b>69-cd-sensors.rules</b> file is out of date and does not
- include the latest instruments supported by Argyll, then the
- simplest thing to do is to replace the <b>69-cd-sensors.rules</b>
- file with the <span style="font-weight: bold;">usb/</span><span
- style="font-weight: bold;">55-Argyll.rules</span>. You will need
- to do this as root, and set the owner as root, group root,
- permissions 644. You may need to re-plug in your instrument to get
- changes to the udev rules recognised.<br>
- <h5><span style="color: rgb(204, 51, 204);"><a name="udev2"></a>USB
- instruments access using udev, with no existing <font
- color="#330033">/etc/udev/rules.d</font> or <font
- color="#330033">/usr/lib/udev/rules.d/69-cd-sensors.rules</font>
- file.<br>
- </span></h5>
- Most recent systems use udev to manage device names and permissions,
- but by default color instruments may not be accessible to normal
- system users.<br>
- To solve this a udev rule file needs to be added that modifies the
- group and permission of any Color Measurement Instruments, and you
- may then need to add yourself to that group.<br>
- <br>
- First check whether other rules are in <span style="font-weight:
- bold;">/etc/udev/rules.d</span> or in <b>/usr/lib/udev/rules.d</b>,
- and use the appropriate directory.<br>
- (You may also want to check in that directory whether
- 55-Argyll.rules or some other .rules file that is setup to enable
- color instruments already exists in that directory.)<br>
- <br>
- <span style="font-weight: bold;"></span>Copy the file <span
- style="font-weight: bold;">usb/</span><span style="font-weight:
- bold;">55-Argyll.rules</span> from the binary or source
- distribution into <span style="font-weight: bold;">/etc/udev/rules.d/55-Argyll.rules</span>
+ + + b 100 1000 100</span> in your local setup, if you are running in + an X11 environment. You can check that the system bell is operating + by doing an "echo ^G", where ^G is ctrl-G.<br> + <br> + <big style="color: rgb(51, 102, 255);"><span style="font-weight: + bold;"><a name="multimonitor"></a>Note on X11 multi-monitor + setups:</span></big><br> + <br> + When working with a multi-monitor X11 configuration, note that you + will only be able to individually calibrate monitors if the + multi-window extension you are using (if any), supports access to + the individual screen Video LUT tables that are used for + calibration. The native X11 multi-screen addressing supports this, + as does the Xinerama extension, and XRandR V1.2.<br> + <br> + The proprietary NVidia TwinView and ATI MergeFB extensions do not + currently support access to the individual screen Video LUTs, so + calibration of each screen independently is impossible if either of + these extensions are running. You can switch to using Xinerama to + solve this problem, or you can try doing a calibration for the + screens that do have accessible Video LUTs with these proprietary + extensions, or ignore calibration and rely purely on display + profiling. Use the dispwin tool to figure out what works on your + system. The NVidia ATI binary drivers do not seem to properly + support XRandR V1.2 either, even though they claim to do so. You may + have to set the <span style="font-weight: bold;"></span><span + style="font-weight: bold;">ARGYLL_IGNORE_XRANDR1_2</span> + environment variable if the XRandR V1.2 extension is faulty.<br> + <br> + If these limitations trouble you, then as a valuable customer of + NVidia or AMD/ATI, perhaps you should contact them and urge them to + fix the problems with Video LUT access in their proprietary + multi-monitor extensions and XRandR implementation, bringing their + support for multi-monitors on X11 up to the same standards as other + operating systems. Ask them to add full and correct support for the + XRandR V1.2 extension.<br> + <br> + <big style="color: rgb(51, 102, 255);"><span style="font-weight: + bold;"><a name="VideoLUTs"></a>Fixing access to Video LUTs:</span></big><br> + <br> + Some users have noted that their default X11 installation doesn't + properly enable access to the video card Video Lookup Tables + (RAMDAC). The Video LUTs are used for display calibration purposes, + and a warning will be issues by the <span style="font-weight: + bold;">dispcal</span> and <span style="font-weight: bold;">dispread</span> + tools if there is a problem with this. Without access to the + VideoLUTs, you won't be able to use display calibration.<br> + <br> + The problem may be because certain X11 extensions aren't being + loaded by default. You may want to check that you have<br> + <br> + <big style="color: rgb(51, 102, 255);"><span style="font-weight: + bold;"></span></big> Load "extmod" <br> + <br> + in the appropriate (or any) section of + your Xorg.conf file, to allow the XF86Video LUT + extensions to function correctly.<br> + <br> + Another source of problems is if the display isn't configured with a + suitable visual. Typically for high quality color you need to be + using at least <span style="font-weight: bold;">24 bits</span> per + pixel (8 Bits for each of Red, Green and Blue channels), but more + importantly the number of entries in the the VideoLUTs needs to + match the depth of the screen. So if the VideoLUTs have 256 entries + per channel, then the screen must be using 8 bits per channel to + match. Or 64 entries and 6 bits. Or 4096 entries and 12 bits, etc. + Running "dispwin -D" may give some clues as to what the nature of + the problem is. You might have to look into your xorg.conf or XRANDR + setup, or on some distributions there will be some configuration + program that will let you choose the display configuration (ie. YaST + or SaX2 on openSUSE, etc.).<br> + <br> + <big style="color: rgb(51, 102, 255);"><span style="font-weight: + bold;"><a name="InstAccess"></a>Setting up instrument access:<br> + <br> + </span></big>By default most Linux based systems make devices + inaccessible to user mode programs, so it is necessary to make some + modification to your permissions so that Argyll tools are able to + access the Color Measurement Instruments. In order from newest to + oldest, the following sub-systems may need to be configured to + permit this:<br> + <br> + <a style="font-weight: bold;" href="#None">No device + configuration needed when running from the console:</a><span + style="font-weight: bold; text-decoration: underline;"><br> + <br> + </span> <a href="#None">Mandriva 2008.0 default + installation</a><br> + <br> + <h5> <a href="Installing_Linux.html#udev1">USB instruments + access using udev:</a></h5> + <a href="#udev1"></a> <a + href="Installing_Linux.html#udev1">Ubuntu 10.04</a><br> + <a href="Installing_Linux.html#udev1">Fedora + Core 8</a><br> + <a href="#udev1">Mandriva 2008.1</a><br> + <a href="#udev1">OpenSuSE 10.3</a><br> + <a href="#udev1">Ubuntu 7.1</a><br> + <a href="#udev1">Kubuntu 7.1</a><br> + <a href="#udev1">Debian 4.0</a><br> + <h5> <a href="#hotplug">USB instruments access using hotplug:</a></h5> + <a href="#hotplug">Red Hat 4.0</a><br> + <a href="Installing_Linux.html#hotplug">Fedora Core 4</a><br> + <a href="Installing_Linux.html#hotplug">Fedora Core 3</a><br> + <a href="Installing_Linux.html#hotplug">Fedora Core 2</a><br> + <br> + <h5> <span style="text-decoration: underline;"></span><a + href="#serial">Serial instrument access:</a></h5> + <a href="#serial">All</a><br> + <br> + <span style="font-weight: bold;">NOTE:</span> That <b>mtp-probe</b> + / <span style="font-weight: bold;">libmtp</span> been known + to interfere with device access, particularly the Spyder 3 and + DTP94. Recent versions of the libmtp should ignore any instrument + marked as COLOR_MEASUREMENT_DEVICE by the + /etc/udev/rules.d/55-Argyll.rules file, but for older systems you + probably need to disable libmtp (look in the udev configuration).<br> + <br> + The <b>JETI</b> specbos <b>1211</b><b>, </b><b>1201</b><b>, + 1511, 1501</b> and the <b>Klien K10A</b> makes use of the <a + href="http://www.ftdichip.com/Drivers/VCP.htm">FTDI Virtual COM + Port Drivers</a> (VCP), that should come with any recent version + of Linux. Older versions of Linux may not support the FTDI FT231XS + chip that the <b>JETI</b> specbos <b>1511, 1501</b> use. You may + have to add yourself to the<span style="font-weight: bold;"> + tty, </span><span style="font-weight: bold;">uucp</span> + or <b>dialout</b> group to have permission to open the + instrument.<br> + <br> + <span style="font-weight: bold;"></span> + <hr style="width: 100%; height: 2px;"> + <h5><span style="color: rgb(204, 51, 204);"><a name="None"></a>No + device configuration needed:</span></h5> + A few systems have in place a security configuration such that + anyone logging in at the console of a machine has access to all the + local devices.<span style="color: rgb(204, 51, 204);"><span + style="font-weight: bold;"><br> + </span></span> + <h5><span style="color: rgb(204, 51, 204);"><a name="udev1"></a>USB + instruments access using udev with existing </span><span + style="color: rgb(204, 51, 204);"><span style="font-weight: + bold;"><font color="#330033">/etc/udev/rules.d</font> or</span> + <font color="#330033"> /usr/lib/udev/rules.d/69-cd-sensors.rules</font> + file.<br> + </span></h5> + <span style="color: rgb(204, 51, 204);"> </span>Recent Fedora based + systems include Gnome Color Manager, which comes with a udev rule + for color instruments. You can check this by looking for the <span + style="font-weight: bold;">/etc/udev/rules.d</span> or in <b>/usr/lib/udev/rules.d/69-cd-sensors.rules</b> + file. If this exists and is up to date enough to include the + instrument you want to use, then all you have to do is add yourself + to the <b>colord</b> group, ie:<br> + <br> + sudo usermod -a -G colord $USER<br> + <br> + If the <b>69-cd-sensors.rules</b> file is out of date and does not + include the latest instruments supported by Argyll, then the + simplest thing to do is to replace the <b>69-cd-sensors.rules</b> + file with the <span style="font-weight: bold;">usb/</span><span + style="font-weight: bold;">55-Argyll.rules</span>. You will need + to do this as root, and set the owner as root, group root, + permissions 644. You may need to re-plug in your instrument to get + changes to the udev rules recognised.<br> + <h5><span style="color: rgb(204, 51, 204);"><a name="udev2"></a>USB + instruments access using udev, with no existing <font + color="#330033">/etc/udev/rules.d</font> or <font + color="#330033">/usr/lib/udev/rules.d/69-cd-sensors.rules</font> + file.<br> + </span></h5> + Most recent systems use udev to manage device names and permissions, + but by default color instruments may not be accessible to normal + system users.<br> + To solve this a udev rule file needs to be added that modifies the + group and permission of any Color Measurement Instruments, and you + may then need to add yourself to that group.<br> + <br> + First check whether other rules are in <span style="font-weight: + bold;">/etc/udev/rules.d</span> or in <b>/usr/lib/udev/rules.d</b>, + and use the appropriate directory.<br> + (You may also want to check in that directory whether + 55-Argyll.rules or some other .rules file that is setup to enable + color instruments already exists in that directory.)<br> + <br> + <span style="font-weight: bold;"></span>Copy the file <span + style="font-weight: bold;">usb/</span><span style="font-weight: + bold;">55-Argyll.rules</span> from the binary or source + distribution into <span style="font-weight: bold;">/etc/udev/rules.d/55-Argyll.rules</span> or <span style="font-weight: bold;">/usr/lib/udev/rules.d/55-Argyll.rules -
- </span>(as appropriate) with owner root, group root,
- permissions 644.<br>
- <br>
- If you are on an <span style="font-weight: bold;">older system</span>
- that uses a udev that doesn't recognize the syntax used in
- 55-Argyll.rules, or that doesn't have rules to create the libusb
- /dev/bus/usb/00X/00Y device entries, you should install the <span
- style="font-weight: bold;">usb/45-Argyll.rules</span> file instead
- - See below.<br>
- <br>
- On recent systems the new rules file will be notices as soon as you
- plug the instrument in again.<br>
+ + + </span>(as appropriate) with owner root, group root, + permissions 644.<br> + <br> + If you are on an <span style="font-weight: bold;">older system</span> + that uses a udev that doesn't recognize the syntax used in + 55-Argyll.rules, or that doesn't have rules to create the libusb + /dev/bus/usb/00X/00Y device entries, you should install the <span + style="font-weight: bold;">usb/45-Argyll.rules</span> file instead + - See below.<br> + <br> + On recent systems the new rules file will be notices as soon as you + plug the instrument in again.<br> On older systems you may need to run <b>/sbin/udevtrigger</b>, @@ -293,62 +296,63 @@ -
- <b>/sbin/udevcontrol reload_rules</b> or <span
- style="font-weight: bold;">/sbin/udevstart</span> or reboot to get
- the new file noticed.<br>
- <br>
- (You may want to refer to <a
- href="http://reactivated.net/writing_udev_rules.html">this
- document</a> for more guidance on modifying udev rules, as well as
- <a
-href="http://www.google.com/search?hl=en&q=man+udev&btnG=Search&meta=&aq=f&oq=">this</a>.)<br>
- <br style="font-weight: bold;">
- <span style="font-weight: bold;">YOU THEN MAY NEED TO:</span><br>
- <br>
- If your system is <span style="font-weight: bold;">not</span> using
- the ACL to manage device access for console users (the file <span
- style="font-weight: bold;">/var/run/ConsoleKit/database</span>
- doesn't exist on your system), then you will <span
- style="text-decoration: underline;">need to add</span> yourself to
- the <span style="font-weight: bold;">colord</span> group, if you
- are not already a member of it. You can do this either by using a
- "Users and Groups" system administration tool, or on the command
- line running as root:<br>
- <br>
- sudo usermod -a -G colord $USER<br>
- <br>
- or<br>
- su root<br>
- usermod -a -G colord $USER<br>
- <br>
- (If the usermod program isn't found as root, it might be in
- /usr/sbin, ie. use /usr/sbin/usermod .... etc.<br>
- If usermod doesn't recognize the -a flag try "usermod -A
- colord $USER".<br>
- If this doesn't work you will have to run "id yourusername" to
- list the current supplemental<br>
- groups, and add them plus colord using just "usermod -G
- group1,group2,... yourusername")<br>
- <br>
- You may find that the <b>colord</b><b></b> group doesn't exist on
- your system, and if so you will need to create it:<br>
- <br>
- sudo groupadd -r colord<br>
- <br>
- and then add yourself to the <b>colord</b> group.<br>
- <br>
- You may have to log out and then in again for the groups to become
- effective.<br>
- <br>
- You can check whether the instrument is being recognized and set to
- the colord group by comparing the output of <span
- style="font-weight: bold;">ls -l -R /dev/bus/usb</span> without
- and then with the instrument plugged in.<br>
- <br>
- You can test whether your instrument is accessible by plugging it in
- and then running "spotread -?" and looking for it listed after the <span
- style="font-weight: bold;">-c</span> option.<br>
+ + + <b>/sbin/udevcontrol reload_rules</b> or <span + style="font-weight: bold;">/sbin/udevstart</span> or reboot to get + the new file noticed.<br> + <br> + (You may want to refer to <a + href="http://reactivated.net/writing_udev_rules.html">this + document</a> for more guidance on modifying udev rules, as well as + <a +href="http://www.google.com/search?hl=en&q=man+udev&btnG=Search&meta=&aq=f&oq=">this</a>.)<br> + <br style="font-weight: bold;"> + <span style="font-weight: bold;">YOU THEN MAY NEED TO:</span><br> + <br> + If your system is <span style="font-weight: bold;">not</span> using + the ACL to manage device access for console users (the file <span + style="font-weight: bold;">/var/run/ConsoleKit/database</span> + doesn't exist on your system), then you will <span + style="text-decoration: underline;">need to add</span> yourself to + the <span style="font-weight: bold;">colord</span> group, if you + are not already a member of it. You can do this either by using a + "Users and Groups" system administration tool, or on the command + line running as root:<br> + <br> + sudo usermod -a -G colord $USER<br> + <br> + or<br> + su root<br> + usermod -a -G colord $USER<br> + <br> + (If the usermod program isn't found as root, it might be in + /usr/sbin, ie. use /usr/sbin/usermod .... etc.<br> + If usermod doesn't recognize the -a flag try "usermod -A + colord $USER".<br> + If this doesn't work you will have to run "id yourusername" to + list the current supplemental<br> + groups, and add them plus colord using just "usermod -G + group1,group2,... yourusername")<br> + <br> + You may find that the <b>colord</b><b></b> group doesn't exist on + your system, and if so you will need to create it:<br> + <br> + sudo groupadd -r colord<br> + <br> + and then add yourself to the <b>colord</b> group.<br> + <br> + You may have to log out and then in again for the groups to become + effective.<br> + <br> + You can check whether the instrument is being recognized and set to + the colord group by comparing the output of <span + style="font-weight: bold;">ls -l -R /dev/bus/usb</span> without + and then with the instrument plugged in.<br> + <br> + You can test whether your instrument is accessible by plugging it in + and then running "spotread -?" and looking for it listed after the <span + style="font-weight: bold;">-c</span> option.<br> <h5><span style="color: rgb(204, 51, 204);"><a name="hotplug"></a>USB instruments @@ -364,73 +368,74 @@ instruments -
- access using hotplug:<br>
- </span></h5>
- Under <span style="font-weight: bold;">much older versions of Linux</span>,
- you should look into the hotplug system configuration for USB
- devices. You know you are running this because the <span
- style="font-weight: bold;">/etc/hotplug</span> directory exists on
- your system.<br>
- <br>
- Assuming we want to configure for all Argyll supported USB
- instruments, copy the file <span style="font-weight: bold;">usb/</span><span
- style="font-weight: bold;">Argyll.usermap</span> from the binary
- or source distribution into <span style="font-weight: bold;">/etc/hotplug/usb/Argyll.usermap</span>
- with owner root, group root, permissions 644.<span
- style="font-weight: bold;"></span><br>
- <br>
- <br>
- (For even older versions, append the lines above to <span
- style="font-weight: bold;">/etc/hotplug/usb.usermap</span>, and
- you may have to run <span style="font-weight: bold;">update-usb.usermap</span>)<br>
- <br>
- Then copy the file <span style="font-weight: bold;">usb/</span><span
- style="font-weight: bold;">Argyll</span> from the binary or source
- distribution into <span style="font-weight: bold;">/etc/hotplug/usb/Argyll</span>
- with owner root, group root, permissions 744.<span
- style="font-weight: bold;"></span><br>
- <br>
- <span style="font-weight: bold;">YOU THEN NEED TO:</span><br>
- <br>
- You will then <span style="text-decoration: underline;">need to add</span>
- yourself to the <span style="font-weight: bold;">colord</span>
- group, if you are not already a member of it. You can do this either
- by using a "Users and Groups" system administration tool, or on the
- command line running as root:<br>
- <br>
- sudo usermod -a -G colord $USER<br>
- <br>
- or<br>
- su root<br>
- usermod -a -G colord $USER<br>
- <br>
- <br>
- (If the usermod program isn't found as root, it might be in
- /usr/sbin, ie. use /usr/sbin/usermod .... etc.<br>
- If usermod doesn't recognize the -a flag try "usermod -A
- colord $USER".<br>
- If this doesn't work you will have to run "id yourusername" to
- list the current suplemental<br>
- groups, and add colord using just "usermod -G
- group1,group2,... yourusername"<br>
- Another option may be to use gpasswd -a $USER colord))<br>
- <br>
- You may find that the <span style="font-weight: bold;">colord</span>
- group doesn't exist on your system, and if so you will need to
- create it:<br>
- <br>
- sudo groupadd -r colord<br>
- <br>
- and then add yourself to the colord group.<br>
- <br>
- You may have to log out and then in again for the groups to become
- effective.<br>
- <br>
- You can test whether your instrument is accessible by plugging it in
- and then running "spotread -?" and looking for it listed after the <span
- style="font-weight: bold;">-c</span> option.<br>
- <span style="font-weight: bold;"></span> <br>
+ + + access using hotplug:<br> + </span></h5> + Under <span style="font-weight: bold;">much older versions of Linux</span>, + you should look into the hotplug system configuration for USB + devices. You know you are running this because the <span + style="font-weight: bold;">/etc/hotplug</span> directory exists on + your system.<br> + <br> + Assuming we want to configure for all Argyll supported USB + instruments, copy the file <span style="font-weight: bold;">usb/</span><span + style="font-weight: bold;">Argyll.usermap</span> from the binary + or source distribution into <span style="font-weight: bold;">/etc/hotplug/usb/Argyll.usermap</span> + with owner root, group root, permissions 644.<span + style="font-weight: bold;"></span><br> + <br> + <br> + (For even older versions, append the lines above to <span + style="font-weight: bold;">/etc/hotplug/usb.usermap</span>, and + you may have to run <span style="font-weight: bold;">update-usb.usermap</span>)<br> + <br> + Then copy the file <span style="font-weight: bold;">usb/</span><span + style="font-weight: bold;">Argyll</span> from the binary or source + distribution into <span style="font-weight: bold;">/etc/hotplug/usb/Argyll</span> + with owner root, group root, permissions 744.<span + style="font-weight: bold;"></span><br> + <br> + <span style="font-weight: bold;">YOU THEN NEED TO:</span><br> + <br> + You will then <span style="text-decoration: underline;">need to add</span> + yourself to the <span style="font-weight: bold;">colord</span> + group, if you are not already a member of it. You can do this either + by using a "Users and Groups" system administration tool, or on the + command line running as root:<br> + <br> + sudo usermod -a -G colord $USER<br> + <br> + or<br> + su root<br> + usermod -a -G colord $USER<br> + <br> + <br> + (If the usermod program isn't found as root, it might be in + /usr/sbin, ie. use /usr/sbin/usermod .... etc.<br> + If usermod doesn't recognize the -a flag try "usermod -A + colord $USER".<br> + If this doesn't work you will have to run "id yourusername" to + list the current suplemental<br> + groups, and add colord using just "usermod -G + group1,group2,... yourusername"<br> + Another option may be to use gpasswd -a $USER colord))<br> + <br> + You may find that the <span style="font-weight: bold;">colord</span> + group doesn't exist on your system, and if so you will need to + create it:<br> + <br> + sudo groupadd -r colord<br> + <br> + and then add yourself to the colord group.<br> + <br> + You may have to log out and then in again for the groups to become + effective.<br> + <br> + You can test whether your instrument is accessible by plugging it in + and then running "spotread -?" and looking for it listed after the <span + style="font-weight: bold;">-c</span> option.<br> + <span style="font-weight: bold;"></span> <br> <h5><span style="color: rgb(204, 51, 204);"><a name="serial"></a>Serial instruments @@ -446,47 +451,49 @@ instruments -
- access:</span><br>
- </h5>
- If you have a serial instrument then you may find that by default
- you don't have permission to access the serial ports or a Serial to
- USB adapter. Most systems make the serial ports available to any
- user in the <span style="font-weight: bold;">tty</span>, <span
- style="font-weight: bold;">uucp </span>or <b>dialout </b>group,
- so the best way of getting access to the serial ports is to add
- yourself to the correct group. (You can identify the correct group
- by looking at the group name shown by <b>ls -l /dev/ttyS*</b> )<b><br>
- <br>
- </b> You can add yourself to a group either by using a "Users
- and Groups" system administration tool, or on the command line using
- "usermod":<br>
- <br>
- su root<br>
- usermod -a -G dialout $USER<br>
- <br>
- or<br>
- <br>
- sudo usermod -a -G dialout $USER<br>
- <br>
- (If the usermod program isn't found as root, it might be in
- /usr/sbin, ie. use /usr/sbin/usermod .... etc.<br>
- If usermod doesn't recognize the -a flag try "usermod -A
- dialout $USER".<br>
- If this doesn't work you will have to run "id yourusername" to
- list the current suplemental<br>
- groups, and add a tty, uucp or dialout group using just
- "usermod -G group1,group2,... yourusername"<br>
- Another option may be to use gpasswd -a $USER dialout)<br>
- <br>
- You may have to log out and then in again for the group to become
- effective.<span style="font-weight: bold;"><br>
- </span>
- <p> <br>
- <br>
- <br>
- <br>
- <br>
- </p>
- </body>
-</html>
+ + + access:</span><br> + </h5> + If you have a serial instrument then you may find that by default + you don't have permission to access the serial ports or a Serial to + USB adapter. Most systems make the serial ports available to any + user in the <span style="font-weight: bold;">tty</span>, <span + style="font-weight: bold;">uucp </span>or <b>dialout </b>group, + so the best way of getting access to the serial ports is to add + yourself to the correct group. (You can identify the correct group + by looking at the group name shown by <b>ls -l /dev/ttyS*</b> )<b><br> + <br> + </b> You can add yourself to a group either by using a "Users + and Groups" system administration tool, or on the command line using + "usermod":<br> + <br> + su root<br> + usermod -a -G dialout $USER<br> + <br> + or<br> + <br> + sudo usermod -a -G dialout $USER<br> + <br> + (If the usermod program isn't found as root, it might be in + /usr/sbin, ie. use /usr/sbin/usermod .... etc.<br> + If usermod doesn't recognize the -a flag try "usermod -A + dialout $USER".<br> + If this doesn't work you will have to run "id yourusername" to + list the current suplemental<br> + groups, and add a tty, uucp or dialout group using just + "usermod -G group1,group2,... yourusername"<br> + Another option may be to use gpasswd -a $USER dialout)<br> + <br> + You may have to log out and then in again, or even re-boot your + system for the group to become effective.<span style="font-weight: + bold;"><br> + </span> + <p> <br> + <br> + <br> + <br> + <br> + </p> + </body> +</html> diff --git a/doc/Installing_MSWindows.html b/doc/Installing_MSWindows.html index 21f39ca..21f39ca 100644..100755 --- a/doc/Installing_MSWindows.html +++ b/doc/Installing_MSWindows.html diff --git a/doc/Installing_OSX.html b/doc/Installing_OSX.html index 1d7bb8d..1d7bb8d 100644..100755 --- a/doc/Installing_OSX.html +++ b/doc/Installing_OSX.html diff --git a/doc/JETI_1211.jpg b/doc/JETI_1211.jpg Binary files differindex efbf291..efbf291 100644..100755 --- a/doc/JETI_1211.jpg +++ b/doc/JETI_1211.jpg diff --git a/doc/JETI_1501.jpg b/doc/JETI_1501.jpg Binary files differindex ac348d6..ac348d6 100644..100755 --- a/doc/JETI_1501.jpg +++ b/doc/JETI_1501.jpg diff --git a/doc/K10A.jpg b/doc/K10A.jpg Binary files differindex 1a93349..1a93349 100644..100755 --- a/doc/K10A.jpg +++ b/doc/K10A.jpg diff --git a/doc/Kgraph1.jpg b/doc/Kgraph1.jpg Binary files differindex 9f6edf9..9f6edf9 100644..100755 --- a/doc/Kgraph1.jpg +++ b/doc/Kgraph1.jpg diff --git a/doc/Kgraph2.jpg b/doc/Kgraph2.jpg Binary files differindex a7d532d..a7d532d 100644..100755 --- a/doc/Kgraph2.jpg +++ b/doc/Kgraph2.jpg diff --git a/doc/Kgraph3.jpg b/doc/Kgraph3.jpg Binary files differindex f916558..f916558 100644..100755 --- a/doc/Kgraph3.jpg +++ b/doc/Kgraph3.jpg diff --git a/doc/Kgraph4.jpg b/doc/Kgraph4.jpg Binary files differindex 603c9bd..603c9bd 100644..100755 --- a/doc/Kgraph4.jpg +++ b/doc/Kgraph4.jpg diff --git a/doc/Kgraph5.jpg b/doc/Kgraph5.jpg Binary files differindex 1de1b88..1de1b88 100644..100755 --- a/doc/Kgraph5.jpg +++ b/doc/Kgraph5.jpg diff --git a/doc/Kgraph6.jpg b/doc/Kgraph6.jpg Binary files differindex f3981d2..f3981d2 100644..100755 --- a/doc/Kgraph6.jpg +++ b/doc/Kgraph6.jpg diff --git a/doc/Kgraph7.jpg b/doc/Kgraph7.jpg Binary files differindex c2d0686..c2d0686 100644..100755 --- a/doc/Kgraph7.jpg +++ b/doc/Kgraph7.jpg diff --git a/doc/Kgraph8.jpg b/doc/Kgraph8.jpg Binary files differindex 1bb9569..1bb9569 100644..100755 --- a/doc/Kgraph8.jpg +++ b/doc/Kgraph8.jpg diff --git a/doc/Kparams.jpg b/doc/Kparams.jpg Binary files differindex 04e344b..04e344b 100644..100755 --- a/doc/Kparams.jpg +++ b/doc/Kparams.jpg diff --git a/doc/LSDC.jpg b/doc/LSDC.jpg Binary files differindex 2ad2a67..2ad2a67 100644..100755 --- a/doc/LSDC.jpg +++ b/doc/LSDC.jpg diff --git a/doc/LabSteps.jpg b/doc/LabSteps.jpg Binary files differindex d25590f..d25590f 100644..100755 --- a/doc/LabSteps.jpg +++ b/doc/LabSteps.jpg diff --git a/doc/License.txt b/doc/License.txt index a871fcf..a871fcf 100644..100755 --- a/doc/License.txt +++ b/doc/License.txt diff --git a/doc/License2.txt b/doc/License2.txt index 05ca889..05ca889 100644..100755 --- a/doc/License2.txt +++ b/doc/License2.txt diff --git a/doc/License3.txt b/doc/License3.txt index 94a9ed0..94a9ed0 100644..100755 --- a/doc/License3.txt +++ b/doc/License3.txt diff --git a/doc/License4.txt b/doc/License4.txt index 61be41a..61be41a 100644..100755 --- a/doc/License4.txt +++ b/doc/License4.txt diff --git a/doc/Limitations.html b/doc/Limitations.html index f3fb811..f3fb811 100644..100755 --- a/doc/Limitations.html +++ b/doc/Limitations.html diff --git a/doc/MinorTools.html b/doc/MinorTools.html index 5e9a5c4..5e9a5c4 100644..100755 --- a/doc/MinorTools.html +++ b/doc/MinorTools.html diff --git a/doc/Organisation.html b/doc/Organisation.html index 738b4ba..738b4ba 100644..100755 --- a/doc/Organisation.html +++ b/doc/Organisation.html diff --git a/doc/Overview.html b/doc/Overview.html index 373d195..373d195 100644..100755 --- a/doc/Overview.html +++ b/doc/Overview.html diff --git a/doc/Passport.jpg b/doc/Passport.jpg Binary files differnew file mode 100755 index 0000000..9bfc401 --- /dev/null +++ b/doc/Passport.jpg diff --git a/doc/Performance.html b/doc/Performance.html index c45084b..c45084b 100644..100755 --- a/doc/Performance.html +++ b/doc/Performance.html diff --git a/doc/Q60.jpg b/doc/Q60.jpg Binary files differindex 1521e04..1521e04 100644..100755 --- a/doc/Q60.jpg +++ b/doc/Q60.jpg diff --git a/doc/QPcard201.jpg b/doc/QPcard201.jpg Binary files differindex dbe1448..dbe1448 100644..100755 --- a/doc/QPcard201.jpg +++ b/doc/QPcard201.jpg diff --git a/doc/QPcard202.jpg b/doc/QPcard202.jpg Binary files differindex 3332bdd..3332bdd 100644..100755 --- a/doc/QPcard202.jpg +++ b/doc/QPcard202.jpg diff --git a/doc/SG.jpg b/doc/SG.jpg Binary files differindex 7dc20e1..7dc20e1 100644..100755 --- a/doc/SG.jpg +++ b/doc/SG.jpg diff --git a/doc/SG_footer.txt b/doc/SG_footer.txt index e82fbc2..e82fbc2 100644..100755 --- a/doc/SG_footer.txt +++ b/doc/SG_footer.txt diff --git a/doc/SG_header.txt b/doc/SG_header.txt index 83af2cd..83af2cd 100644..100755 --- a/doc/SG_header.txt +++ b/doc/SG_header.txt diff --git a/doc/SMCube.jpg b/doc/SMCube.jpg Binary files differindex e38d23a..e38d23a 100644..100755 --- a/doc/SMCube.jpg +++ b/doc/SMCube.jpg diff --git a/doc/Scenarios.html b/doc/Scenarios.html index 8aa5d64..9a55e88 100644..100755 --- a/doc/Scenarios.html +++ b/doc/Scenarios.html @@ -75,7 +75,7 @@ handled when calibration is being used<br>
</a></h4>
<h4> <a href="#LP1">Linking Profiles</a></h4>
- <p> <b><a href="#LP2">Image dependent gamut
+ <p> <b><a href="#LP3">Image dependent gamut
mapping using device links</a></b><br>
</p>
<p> <b><a href="#LP2">Soft Proofing Link</a></b><br>
@@ -186,6 +186,12 @@ + + + + + + and profiling a display that doesn't have VideoLUT access</a>.<br>
<br>
@@ -270,6 +276,12 @@ + + + + + + -r</span> for an LCD display, or <span style="text-decoration:
underline; color: rgb(204, 51, 204);">dispcal -yc -r</span> for a
@@ -667,6 +679,12 @@ + + + + + + (<span style="font-weight: bold;">-Iw</span>) changes by doing on
the fly calibrations during the measurements. Instrument black level
@@ -743,6 +761,12 @@ + + + + + + Correction Matrix</a>. These are specific to a particular
Colorimeter and Display make and model combination, although a
@@ -751,6 +775,16 @@ style="font-weight: bold;">ccmx</span> files is <a
href="ccmxs.html">here</a>.<br>
<br>
+ Another, more general approach to correcting Colorimeters is to
+ store the spectral sensitivities for each individual instrument in
+ the instrument itself, and then combine that with spectral samples
+ for a particular display type to compute a specific instrument +
+ display correction matrix on the fly (i.e. the i1d3 * Spyder 4 &
+ 5 instruments). The display spectral samples can be stored in a <a
+ href="File_Formats.html#.ccss">Colorimeter Correction Spectral
+ Sample</a> file. A list of contributed <span style="font-weight:
+ bold;">ccss</span> files is <a href="ccsss.html">here</a>.<span
+ style="font-weight: bold;"></span><br>
<h4><a name="PM7"></a>Calibrating and profiling a display that
doesn't have VideoLUT access.</h4>
<p>In some situation there is no access to a displays VideoLUT
@@ -825,7 +859,7 @@ href="cctiff.html#p1">DisplayA.icm</a> <a href="cctiff.html#p2">DisplayA.cal</a>
<a href="cctiff.html#p3">infile.jpg</a> <a href="cctiff.html#p4">outfile.jpg</a><br>
<span style="font-weight: bold;"></span><br>
- <hr size="2" width="100%">
+ <hr width="100%" size="2">
<h3><a name="PS1"></a>Profiling Scanners and other input devices
such as cameras<br>
</h3>
@@ -917,6 +951,12 @@ + + + + + + SG</a> charts:<br>
<br>
@@ -924,6 +964,12 @@ width="200" height="122"> <img alt="ColorChecker SG" src="SG.jpg"
style="width: 174px; height: 122px;"><br>
<br>
+ A chart provided for camera profiling is the X-Rite <a
+ href="http://xritephoto.com/colorchecker-passport-photo">ColorCheckerPassport</a>:<br>
+ <br>
+ <img alt="ColorChecker Passport" src="Passport.jpg" width="166"
+ height="122"><br>
+ <br>
The GretagMacbeth Eye-One Pro Scan Target 1.4 can also be used:<br>
<br>
<img alt="Eye-One Scan Target 1.4" src="i1scan14.jpg" style="border:
@@ -991,6 +1037,12 @@ + + + + + + HCT</a> :<br>
<br>
@@ -1073,6 +1125,12 @@ + + + + + + Imaging DCPro Target</a>:<br>
<br>
@@ -1149,6 +1207,12 @@ + + + + + + 201</a>: <a
href="http://www.qpcard.com/en_b2c/color-reference-cards/instant-camera-raw-profiling-with-qpcard-202.html">QPcard @@ -1207,6 +1271,12 @@ href="http://www.qpcard.com/en_b2c/color-reference-cards/instant-camera-raw-prof + + + + + + 202</a>:<br>
<br>
@@ -1349,6 +1419,12 @@ href="http://www.xrite.com/documents/apps/public/digital_colorchecker_sg_l_a_b.t + + + + + + header</a>, and appending <a href="SG_footer.txt">this footer</a>,
making sure there are no blank lines inserted in the process. Name
@@ -1370,6 +1446,13 @@ href="http://www.xrite.com/documents/apps/public/digital_colorchecker_sg_l_a_b.t <a href="spec2cie.html">spec2cie</a>
ColorCheckerSG.ti3 ColorCheckerSG.cie<br>
<br>
+ For the full ColortChecker Passport chart, the <b>ref/ColorCheckerPassport.cht</b>
+ file should be used, or if just the 24 patches corresponding to
+ the original ColorChecker are in the shot, the <b>ref/ColorCheckerHalfPassport.cht</b>
+ should be used. A user has kindly provided their measured values
+ for this chart, and they are available in <b>ref/ColorCheckerPassport.cie</b>
+ and <b>ref/ColorCheckerHalfPassport.cie</b> respectively.<br>
+ <br>
For the Eye-One Pro Scan Target 1.4 chart, the <span
style="font-weight: bold;"><span style="font-weight: bold;">ref/</span>i1_RGB_Scan_1.4.cht</span>
file should be used, and as there is no reference file
@@ -1429,6 +1512,12 @@ href="http://www.xrite.com/documents/apps/public/digital_colorchecker_sg_l_a_b.t + + + + + + </span>file made from measuring a sample chart is also available.
Alternately you could create your own reference file by
@@ -1510,6 +1599,12 @@ href="http://www.xrite.com/documents/apps/public/digital_colorchecker_sg_l_a_b.t + + + + + + documentation</a>).<br>
<br>
@@ -1553,10 +1648,11 @@ href="http://www.xrite.com/documents/apps/public/digital_colorchecker_sg_l_a_b.t linearly additive in behaviour.<br>
<br>
If the purpose of the input profile is to use it as a substitute for
- a colorimeter, then the <b>-u</b> flag should be used to avoid
- clipping values above the white point. Unless the shaper/matrix type
- profile is a very good fit, it is probably advisable to use a LUT
- type profile in this situation.<br>
+ a colorimeter, then the <b>-ua</b> flag should be used to force
+ Absolute Colorimetric intent, and avoid clipping colors above the
+ test chart white point. Unless the shaper/matrix type profile is a
+ very good fit, it is probably advisable to use a LUT type profile in
+ this situation.<br>
<br>
To create a matrix/shaper profile, the following suffices:<br>
<br>
@@ -1576,7 +1672,7 @@ href="http://www.xrite.com/documents/apps/public/digital_colorchecker_sg_l_a_b.t <br>
<a href="colprof.html">colprof</a> <a href="colprof.html#v">-v</a>
<a href="colprof.html#E">-D"Scanner A"</a> <a href="colprof.html#q">-qm</a>
- <a href="colprof.html#a">-ax</a> <a href="colprof.html#u">-u</a> <a
+ <a href="colprof.html#a">-ax</a> <a href="colprof.html#u">-ua</a> <a
href="colprof.html#p1">scanner</a><br>
<br>
Make sure you check the delta E report at the end of the profile
@@ -1602,7 +1698,7 @@ href="http://www.xrite.com/documents/apps/public/digital_colorchecker_sg_l_a_b.t href="colprof.html#p1">scanner</a><br>
<br>
<br>
- <hr size="2" width="100%">
+ <hr width="100%" size="2">
<h3><a name="PP1"></a>Profiling Printers<br>
</h3>
The overall process is to create a set of device measurement target
@@ -1902,7 +1998,7 @@ href="http://www.xrite.com/documents/apps/public/digital_colorchecker_sg_l_a_b.t component images, if the scanner or camera is capable of doing so;
not setting white or black points, using a fixed exposure etc.). It
is generally advisable to create a LUT type input profile, and use
- the <a href="http://www.argyllcms.com/doc/colprof.html#u">-u</a>
+ the <a href="http://www.argyllcms.com/doc/colprof.html#ua">-ua</a>
flag to avoid clipping scanned value whiter than the input
calibration chart.<br>
<br>
@@ -1969,6 +2065,12 @@ href="http://www.xrite.com/documents/apps/public/digital_colorchecker_sg_l_a_b.t + + + + + + scanner or camera must be configured and used exactly the same
as it was when it was profiled.</span></big><br>
@@ -2055,6 +2157,16 @@ href="http://www.xrite.com/documents/apps/public/digital_colorchecker_sg_l_a_b.t the most different gamuts, and hence need the most gamut mapping to
convert from one colorspace to the other.<br>
<br>
+ <b>Note</b> that specifying a very large gamut colorspace as the
+ source gamut (i.e. <b>ProPhoto</b> etc.) is probably <u><b>NOT</b></u>
+ what you want to do, since unless the source images have a similar
+ very large gamut to that of the colorspace, they will end up getting
+ over compressed and come out looking dull. Instead use a source
+ profile that has a gamut more representative of the images gamut, <b>or</b>
+ you should provide a gamut using the the <a href="colprof.html#g">-g +
+ parameter</a>. <br>
+ <br>
If you are creating a profile for a specific purpose, intending to
link it to a specific input profile, then you will get the best
results by specifying that source profile as the source gamut.<br>
@@ -2124,6 +2236,12 @@ then + + + + + + it can save considerable processing time and space if the -b flag is
used, and the -S flag not used.<br>
@@ -2271,6 +2389,12 @@ then + + + + + + and then used <a href="xicclu.html#g">xicclu</a> to explore the
effect of the parameters.<br>
@@ -2742,6 +2866,12 @@ chart, + + + + + + and/or to have it included in .ti3 file.<br>
<a href="cctiff.html#p2">cctiff</a> @@ -2814,6 +2944,12 @@ an + + + + + + image file.<br>
<a href="applycal.html#p1">applycal</a> @@ -2878,6 +3014,12 @@ an + + + + + + To incorporate calibration into an ICC profile.<br>
<a href="chartread.html#I">chartread</a> @@ -2950,6 +3092,12 @@ a + + + + + + profile chart.<br>
<br>
@@ -3039,7 +3187,7 @@ a represent such a physical quantity.<br>
<br>
<br>
- <hr size="2" width="100%">
+ <hr width="100%" size="2">
<h3><a name="LP1"></a>Linking Profiles</h3>
Two device profiles can be linked together to create a device link
profile, than encapsulates a particular device to device transform.
@@ -3217,7 +3365,7 @@ a href="collink.html#d">-dmt</a> options, then either leave them out
or substitute values that do match your environment.<br>
- <hr size="2" width="100%"><br>
+ <hr width="100%" size="2"><br>
<h3><a name="TR1"></a>Transforming colorspaces of raster files</h3>
Although a device profile or device link profile may be useful with
other programs and systems, Argyll provides the tool <a
@@ -3255,7 +3403,7 @@ a <a href="cctiff.html#p3">infile.jpg</a> <a href="cctiff.html#p4">outfile.jpg</a><br>
<br>
<br>
- <hr size="2" width="100%"><br>
+ <hr width="100%" size="2"><br>
<h3><a name="TV1"></a>Creating Video Calibration 3DLuts</h3>
Video calibration typically involves trying to make your actual
display device emulate an ideal video display, one which matches
@@ -3297,6 +3445,12 @@ a + + + + + + madvr</b>" in dispcal, dispread and dispwin. Leave the MadTPG
"VideoLUT" and "3dluts" buttons in their default (enabled)
@@ -3364,6 +3518,12 @@ a + + + + + + interactive adjustment mode can be used to set the white point.
Note that while adjusting the neutral axis for neutrality may
@@ -3403,6 +3563,12 @@ a + + + + + + of where to apply display per channel calibration curves.</b></li>
<li>Choose one of the Absolute Colorimetric intents in collink
@@ -3485,7 +3651,7 @@ a that the Video card has automatically or manually been configured to
scale full range RGB values to Video levels for the TV. If the
latter is not possible, then use the -E options on dispcal and
- dispread. (See <b>Signal encoding</b> bellow for more details on
+ dispread. (See <b>Signal encoding</b> below for more details on
this). It may also improve the accuracy of the display profile if
you use the <a href="dispread.html#Z">dispread -Z</a> option to
quantize the test values to the precision of the display
@@ -3900,6 +4066,12 @@ a + + + + + + TV.cal </tt>EBU3213_PAL.icm TV.icm SD_PAL.icm</tt><tt><br>
</tt><tt> </tt><tt><br>
@@ -3931,6 +4103,12 @@ a + + + + + + TV.cal </tt>SMPTE_RP145_NTSC.icm TV.icm SD_NTSC.icm</tt><br>
<br>
@@ -3969,6 +4147,12 @@ a + + + + + + TV.cal </tt>EBU3213_PAL.icm TV.icm SD_PAL.icm</tt><tt><br>
</tt><tt> </tt><tt><br>
@@ -4000,6 +4184,12 @@ a + + + + + + TV.cal </tt>SMPTE_RP145_NTSC.icm TV.icm SD_NTSC.icm</tt><br>
<br>
@@ -4018,7 +4208,7 @@ a the graphics card VideoLUTs in some other fashion.<tt><br>
<br>
</tt>
- <hr size="2" width="100%"><br>
+ <hr width="100%" size="2"><br>
<h3><a name="TV2"></a>Verifying Video Calibration</h3>
<p>Often it is desirable to verify the results of a video
calibration and profile, and the following gives an outline of how
@@ -4060,7 +4250,7 @@ a options included "-I b:0.2:2.15" then the equivalent fakeread
option "-b 0.2:2.15:TV.icm" should be used, etc.<br>
</p>
- <hr size="2" width="20%">
+ <hr width="20%" size="2">
<p>A sanity check we can make at this point is to see what the
expected result of the profiling & calibration will be, by
simulating the reproduction of this test set:<br>
@@ -4104,7 +4294,7 @@ a checkA.ti3<br>
<br>
</tt></p>
- <hr size="2" width="20%">
+ <hr width="20%" size="2">
<p>You can explicitly compare the gamuts of your video space and
your display using the gamut tools:<br>
</p>
@@ -4119,7 +4309,7 @@ a you should use iccgamut <b>-ir</b> instead of <b>-ia</b>, so as
to align the white points.<br>
</p>
- <hr size="2" width="20%">
+ <hr width="20%" size="2">
<p>The main verification check is to actually measure the display
response and compare it against the reference. Make sure the
display is setup as you would for video playback and then use
diff --git a/doc/Smile.jpg b/doc/Smile.jpg Binary files differindex 66a6b00..66a6b00 100644..100755 --- a/doc/Smile.jpg +++ b/doc/Smile.jpg diff --git a/doc/Source.html b/doc/Source.html index 5ea423e..5ea423e 100644..100755 --- a/doc/Source.html +++ b/doc/Source.html diff --git a/doc/Spyd2.jpg b/doc/Spyd2.jpg Binary files differindex 8f8eff5..8f8eff5 100644..100755 --- a/doc/Spyd2.jpg +++ b/doc/Spyd2.jpg diff --git a/doc/Spyd3.jpg b/doc/Spyd3.jpg Binary files differindex e1ab16f..e1ab16f 100644..100755 --- a/doc/Spyd3.jpg +++ b/doc/Spyd3.jpg diff --git a/doc/Spyd3x.jpg b/doc/Spyd3x.jpg Binary files differindex 8916915..8916915 100644..100755 --- a/doc/Spyd3x.jpg +++ b/doc/Spyd3x.jpg diff --git a/doc/Spyd4.jpg b/doc/Spyd4.jpg Binary files differindex 0d1b1b6..0d1b1b6 100644..100755 --- a/doc/Spyd4.jpg +++ b/doc/Spyd4.jpg diff --git a/doc/Spyd5.jpg b/doc/Spyd5.jpg Binary files differindex 86b4be2..86b4be2 100644..100755 --- a/doc/Spyd5.jpg +++ b/doc/Spyd5.jpg diff --git a/doc/SpyderChecker.jpg b/doc/SpyderChecker.jpg Binary files differindex e50a205..e50a205 100644..100755 --- a/doc/SpyderChecker.jpg +++ b/doc/SpyderChecker.jpg diff --git a/doc/SpyderChecker24.jpg b/doc/SpyderChecker24.jpg Binary files differindex 022eb11..022eb11 100644..100755 --- a/doc/SpyderChecker24.jpg +++ b/doc/SpyderChecker24.jpg diff --git a/doc/VideoEOTFs.html b/doc/VideoEOTFs.html index 526477c..526477c 100644..100755 --- a/doc/VideoEOTFs.html +++ b/doc/VideoEOTFs.html diff --git a/doc/WideGamutColmters.html b/doc/WideGamutColmters.html index 67a5817..67a5817 100644..100755 --- a/doc/WideGamutColmters.html +++ b/doc/WideGamutColmters.html diff --git a/doc/XRGA.html b/doc/XRGA.html index 295d7b2..778b8bd 100644..100755 --- a/doc/XRGA.html +++ b/doc/XRGA.html @@ -27,6 +27,7 @@ href="https://www.xrite.com/documents/literature/en/L7-462_XRGA_WhitePaper_en.pdf">conversion + is possible</a> between these different standards. While such a conversion is not perfect, it reduces the discontinuities between old instrument families and current X-Rite instruments.<br> @@ -133,5 +134,8 @@ href="https://www.xrite.com/documents/literature/en/L7-462_XRGA_WhitePaper_en.pd (The DTP51 returns only colorimetric data, while the conversion requires spectral data.)<br> <br> + You can also convert from one standard to the other using <a + href="spec2cie.html#A">spec2cie</a>.<br> + <br> </body> </html> diff --git a/doc/YellowGreen.jpg b/doc/YellowGreen.jpg Binary files differindex 16f637f..16f637f 100644..100755 --- a/doc/YellowGreen.jpg +++ b/doc/YellowGreen.jpg diff --git a/doc/afiles b/doc/afiles index d820c7f..dd8d0d5 100644..100755 --- a/doc/afiles +++ b/doc/afiles @@ -69,6 +69,7 @@ calvschar.html WideGamutColmters.html CrushedDisplyBlacks.html ArgyllCMS_arts_tag.html +inoutreferred.html i1proDriver.html i1proDriver.xls i1proHiRes.html @@ -81,6 +82,7 @@ Source.html average.html applycal.html cb2ti3.html +ls2ti3.html cctiff.html cht_format.html dispwin.html @@ -149,6 +151,7 @@ CMP_DT_003.jpg CMP_Digital_Target-4.jpg CMP_Digital_Target-7.jpg colorchecker.jpg +Passport.jpg SpyderChecker.jpg SpyderChecker24.jpg LSDC.jpg @@ -193,4 +196,6 @@ ccmxs/Spyder3_EIZO_S2243W_standard_1931.ccmx ccmxs/Spyder3_HP_LP2475w.ccmx ccmxs/Spyder3_NEC2690WUXi2.ccmx ccmxs/Spyder3_NEC_PA301W.ccmx +ccsss.html +ccsss/MacBookProRetina2016.ccss diff --git a/doc/applycal.html b/doc/applycal.html index 5c5e661..5c5e661 100644..100755 --- a/doc/applycal.html +++ b/doc/applycal.html diff --git a/doc/average.html b/doc/average.html index e67ab2d..e67ab2d 100644..100755 --- a/doc/average.html +++ b/doc/average.html diff --git a/doc/cal_format.html b/doc/cal_format.html index 361a329..361a329 100644..100755 --- a/doc/cal_format.html +++ b/doc/cal_format.html diff --git a/doc/calvschar.html b/doc/calvschar.html index f194d79..f194d79 100644..100755 --- a/doc/calvschar.html +++ b/doc/calvschar.html diff --git a/doc/cb2ti3.html b/doc/cb2ti3.html index d999075..d999075 100644..100755 --- a/doc/cb2ti3.html +++ b/doc/cb2ti3.html diff --git a/doc/ccmxs.html b/doc/ccmxs.html index 1ceaeac..1ceaeac 100644..100755 --- a/doc/ccmxs.html +++ b/doc/ccmxs.html diff --git a/doc/ccmxs/DTP-94_1964_10_Dell_2408W.ccmx b/doc/ccmxs/DTP-94_1964_10_Dell_2408W.ccmx index c1d0e8c..c1d0e8c 100644..100755 --- a/doc/ccmxs/DTP-94_1964_10_Dell_2408W.ccmx +++ b/doc/ccmxs/DTP-94_1964_10_Dell_2408W.ccmx diff --git a/doc/ccmxs/DTP-94_1997_Shaw_Dell_2408W.ccmx b/doc/ccmxs/DTP-94_1997_Shaw_Dell_2408W.ccmx index 168fc51..168fc51 100644..100755 --- a/doc/ccmxs/DTP-94_1997_Shaw_Dell_2408W.ccmx +++ b/doc/ccmxs/DTP-94_1997_Shaw_Dell_2408W.ccmx diff --git a/doc/ccmxs/DTP-94_Dell_2408W.ccmx b/doc/ccmxs/DTP-94_Dell_2408W.ccmx index bf58d48..bf58d48 100644..100755 --- a/doc/ccmxs/DTP-94_Dell_2408W.ccmx +++ b/doc/ccmxs/DTP-94_Dell_2408W.ccmx diff --git a/doc/ccmxs/DTP-94_Dell_U2410.ccmx b/doc/ccmxs/DTP-94_Dell_U2410.ccmx index 0d7c610..0d7c610 100644..100755 --- a/doc/ccmxs/DTP-94_Dell_U2410.ccmx +++ b/doc/ccmxs/DTP-94_Dell_U2410.ccmx diff --git a/doc/ccmxs/EyeOne_Display_1_NEC1990SXi.ccmx b/doc/ccmxs/EyeOne_Display_1_NEC1990SXi.ccmx index b8d3072..b8d3072 100644..100755 --- a/doc/ccmxs/EyeOne_Display_1_NEC1990SXi.ccmx +++ b/doc/ccmxs/EyeOne_Display_1_NEC1990SXi.ccmx diff --git a/doc/ccmxs/EyeOne_Display_2_EIZO_S2233W.ccmx b/doc/ccmxs/EyeOne_Display_2_EIZO_S2233W.ccmx index c3f9d80..c3f9d80 100644..100755 --- a/doc/ccmxs/EyeOne_Display_2_EIZO_S2233W.ccmx +++ b/doc/ccmxs/EyeOne_Display_2_EIZO_S2233W.ccmx diff --git a/doc/ccmxs/EyeOne_Display_2_NEC1990SXi.ccmx b/doc/ccmxs/EyeOne_Display_2_NEC1990SXi.ccmx index c70758e..c70758e 100644..100755 --- a/doc/ccmxs/EyeOne_Display_2_NEC1990SXi.ccmx +++ b/doc/ccmxs/EyeOne_Display_2_NEC1990SXi.ccmx diff --git a/doc/ccmxs/EyeOne_Display_LT_U2410_Standard_1931.ccmx b/doc/ccmxs/EyeOne_Display_LT_U2410_Standard_1931.ccmx index 4500b0e..4500b0e 100644..100755 --- a/doc/ccmxs/EyeOne_Display_LT_U2410_Standard_1931.ccmx +++ b/doc/ccmxs/EyeOne_Display_LT_U2410_Standard_1931.ccmx diff --git a/doc/ccmxs/EyeOne_Display_LT_U2410_Standard_1964.ccmx b/doc/ccmxs/EyeOne_Display_LT_U2410_Standard_1964.ccmx index 1d8e082..1d8e082 100644..100755 --- a/doc/ccmxs/EyeOne_Display_LT_U2410_Standard_1964.ccmx +++ b/doc/ccmxs/EyeOne_Display_LT_U2410_Standard_1964.ccmx diff --git a/doc/ccmxs/EyeOne_Display_LT_U2410_sRGB_1931.ccmx b/doc/ccmxs/EyeOne_Display_LT_U2410_sRGB_1931.ccmx index e6be5d5..e6be5d5 100644..100755 --- a/doc/ccmxs/EyeOne_Display_LT_U2410_sRGB_1931.ccmx +++ b/doc/ccmxs/EyeOne_Display_LT_U2410_sRGB_1931.ccmx diff --git a/doc/ccmxs/EyeOne_Display_LT_U2410_sRGB_1964.ccmx b/doc/ccmxs/EyeOne_Display_LT_U2410_sRGB_1964.ccmx index 1de91c9..1de91c9 100644..100755 --- a/doc/ccmxs/EyeOne_Display_LT_U2410_sRGB_1964.ccmx +++ b/doc/ccmxs/EyeOne_Display_LT_U2410_sRGB_1964.ccmx diff --git a/doc/ccmxs/Huey_Acer_al2016w.ccmx b/doc/ccmxs/Huey_Acer_al2016w.ccmx index 288a230..288a230 100644..100755 --- a/doc/ccmxs/Huey_Acer_al2016w.ccmx +++ b/doc/ccmxs/Huey_Acer_al2016w.ccmx diff --git a/doc/ccmxs/Huey_Eizo_CG243.ccmx b/doc/ccmxs/Huey_Eizo_CG243.ccmx index 29e21bd..29e21bd 100644..100755 --- a/doc/ccmxs/Huey_Eizo_CG243.ccmx +++ b/doc/ccmxs/Huey_Eizo_CG243.ccmx diff --git a/doc/ccmxs/Huey_HP_compaq_6730s.ccmx b/doc/ccmxs/Huey_HP_compaq_6730s.ccmx index 26f11ae..26f11ae 100644..100755 --- a/doc/ccmxs/Huey_HP_compaq_6730s.ccmx +++ b/doc/ccmxs/Huey_HP_compaq_6730s.ccmx diff --git a/doc/ccmxs/Huey_HP_lp2475w.ccmx b/doc/ccmxs/Huey_HP_lp2475w.ccmx index c33ee75..c33ee75 100644..100755 --- a/doc/ccmxs/Huey_HP_lp2475w.ccmx +++ b/doc/ccmxs/Huey_HP_lp2475w.ccmx diff --git a/doc/ccmxs/Huey_NEC1990SXi.ccmx b/doc/ccmxs/Huey_NEC1990SXi.ccmx index 97f8d8a..97f8d8a 100644..100755 --- a/doc/ccmxs/Huey_NEC1990SXi.ccmx +++ b/doc/ccmxs/Huey_NEC1990SXi.ccmx diff --git a/doc/ccmxs/Huey_NEC_Spectraview_241.ccmx b/doc/ccmxs/Huey_NEC_Spectraview_241.ccmx index f7341da..f7341da 100644..100755 --- a/doc/ccmxs/Huey_NEC_Spectraview_241.ccmx +++ b/doc/ccmxs/Huey_NEC_Spectraview_241.ccmx diff --git a/doc/ccmxs/NEC_EyeOne_Display_2_NEC2690WUXi2.ccmx b/doc/ccmxs/NEC_EyeOne_Display_2_NEC2690WUXi2.ccmx index a6c29fc..a6c29fc 100644..100755 --- a/doc/ccmxs/NEC_EyeOne_Display_2_NEC2690WUXi2.ccmx +++ b/doc/ccmxs/NEC_EyeOne_Display_2_NEC2690WUXi2.ccmx diff --git a/doc/ccmxs/Spyder2_EIZO_S2433W_standard_1931.ccmx b/doc/ccmxs/Spyder2_EIZO_S2433W_standard_1931.ccmx index 0cbe855..0cbe855 100644..100755 --- a/doc/ccmxs/Spyder2_EIZO_S2433W_standard_1931.ccmx +++ b/doc/ccmxs/Spyder2_EIZO_S2433W_standard_1931.ccmx diff --git a/doc/ccmxs/Spyder2_EIZO_S2433W_standard_1964.ccmx b/doc/ccmxs/Spyder2_EIZO_S2433W_standard_1964.ccmx index d1960b3..d1960b3 100644..100755 --- a/doc/ccmxs/Spyder2_EIZO_S2433W_standard_1964.ccmx +++ b/doc/ccmxs/Spyder2_EIZO_S2433W_standard_1964.ccmx diff --git a/doc/ccmxs/Spyder3_EIZO_S2233_standard_1964.ccmx b/doc/ccmxs/Spyder3_EIZO_S2233_standard_1964.ccmx index 214a680..214a680 100644..100755 --- a/doc/ccmxs/Spyder3_EIZO_S2233_standard_1964.ccmx +++ b/doc/ccmxs/Spyder3_EIZO_S2233_standard_1964.ccmx diff --git a/doc/ccmxs/Spyder3_EIZO_S2243W_standard_1931.ccmx b/doc/ccmxs/Spyder3_EIZO_S2243W_standard_1931.ccmx index 7fbf60b..7fbf60b 100644..100755 --- a/doc/ccmxs/Spyder3_EIZO_S2243W_standard_1931.ccmx +++ b/doc/ccmxs/Spyder3_EIZO_S2243W_standard_1931.ccmx diff --git a/doc/ccmxs/Spyder3_HP_LP2475w.ccmx b/doc/ccmxs/Spyder3_HP_LP2475w.ccmx index 40e990c..40e990c 100644..100755 --- a/doc/ccmxs/Spyder3_HP_LP2475w.ccmx +++ b/doc/ccmxs/Spyder3_HP_LP2475w.ccmx diff --git a/doc/ccmxs/Spyder3_NEC2690WUXi2.ccmx b/doc/ccmxs/Spyder3_NEC2690WUXi2.ccmx index 2a663bc..2a663bc 100644..100755 --- a/doc/ccmxs/Spyder3_NEC2690WUXi2.ccmx +++ b/doc/ccmxs/Spyder3_NEC2690WUXi2.ccmx diff --git a/doc/ccmxs/Spyder3_NEC_PA301W.ccmx b/doc/ccmxs/Spyder3_NEC_PA301W.ccmx index b0dd777..b0dd777 100644..100755 --- a/doc/ccmxs/Spyder3_NEC_PA301W.ccmx +++ b/doc/ccmxs/Spyder3_NEC_PA301W.ccmx diff --git a/doc/ccsss.html b/doc/ccsss.html new file mode 100755 index 0000000..98d5489 --- /dev/null +++ b/doc/ccsss.html @@ -0,0 +1,56 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> + <head> + <title>Contributed CCMX files</title> + <meta http-equiv="content-type" content="text/html; + charset=windows-1252"> + <meta name="author" content="Graeme Gill"> + </head> + <body> + <h2><b>Contributed ccss files.<br> + </b></h2> + <span style="font-weight: bold;">ccss</span> files allow some + Colorimeters to be better calibrated for a particular Display make + and model combination.<br> + <span style="font-weight: bold;"></span><br> + <table style="text-align: left;" border="1" cellpadding="2" + cellspacing="2" width="100%"> + <tbody> + <tr> + <td style="text-align: center; vertical-align: top;" + width="40%">Display<br> + </td> + <td style="vertical-align: top;" width="60%">CCSS<br> + </td> + </tr> + <tr> + <td style="vertical-align: top;">Apple MacBook Pro Retina 2016</td> + <td style="vertical-align: top;"><a + href="ccsss/MacBookProRetina2016.ccss">MacBook Pro Retina + 2016</a></td> + </tr> + </tbody> + </table> + <span style="font-weight: bold;"></span><br> + <span style="font-weight: bold;"></span> If anyone wants to + contribute correction matrices that they've made for particular + display, I'm happy to put them on the website so that others can + make use of them. Any <span style="font-weight: bold;">ccss</span> + files contributed for this purpose will be assumed to have been + placed in the <span style="font-weight: bold;">public domain</span>.<br> + <br> + <script language="JavaScript"> +<!-- +// Comment +var v1 = ".com" +var v2 = "argyllcms" +var v3 = "graeme" +var v4 = "@" +var v5 = "mailto:" +var v6 = v5 + v3 + v4 + v2 + v1 +document.write("<a href=" + v6 + ">" + "Contact Me" + "</a>") +//--> +</script><br> + + </body> +</html> diff --git a/doc/ccsss/MacBookProRetina2016.ccss b/doc/ccsss/MacBookProRetina2016.ccss new file mode 100755 index 0000000..bff4bc8 --- /dev/null +++ b/doc/ccsss/MacBookProRetina2016.ccss @@ -0,0 +1,24 @@ +CCSS + +DESCRIPTOR "CCSS for MacBook Pro Retina Display 2016" +ORIGINATOR "Argyll ccxxmake" +CREATED "Wed Jan 4 12:38:51 2017" +DISPLAY "Color LCD, at 0, 0, width 1440, height 900 (Primary Display)" +TECHNOLOGY "LCD RG Phosphor IPS" +SPECTRAL_BANDS "481" +SPECTRAL_START_NM "350.000000" +SPECTRAL_END_NM "830.000000" +SPECTRAL_NORM "1.000000" + +NUMBER_OF_FIELDS 482 +BEGIN_DATA_FORMAT +SAMPLE_ID SPEC_350 SPEC_351 SPEC_352 SPEC_353 SPEC_354 SPEC_355 SPEC_356 SPEC_357 SPEC_358 SPEC_359 SPEC_360 SPEC_361 SPEC_362 SPEC_363 SPEC_364 SPEC_365 SPEC_366 SPEC_367 SPEC_368 SPEC_369 SPEC_370 SPEC_371 SPEC_372 SPEC_373 SPEC_374 SPEC_375 SPEC_376 SPEC_377 SPEC_378 SPEC_379 SPEC_380 SPEC_381 SPEC_382 SPEC_383 SPEC_384 SPEC_385 SPEC_386 SPEC_387 SPEC_388 SPEC_389 SPEC_390 SPEC_391 SPEC_392 SPEC_393 SPEC_394 SPEC_395 SPEC_396 SPEC_397 SPEC_398 SPEC_399 SPEC_400 SPEC_401 SPEC_402 SPEC_403 SPEC_404 SPEC_405 SPEC_406 SPEC_407 SPEC_408 SPEC_409 SPEC_410 SPEC_411 SPEC_412 SPEC_413 SPEC_414 SPEC_415 SPEC_416 SPEC_417 SPEC_418 SPEC_419 SPEC_420 SPEC_421 SPEC_422 SPEC_423 SPEC_424 SPEC_425 SPEC_426 SPEC_427 SPEC_428 SPEC_429 SPEC_430 SPEC_431 SPEC_432 SPEC_433 SPEC_434 SPEC_435 SPEC_436 SPEC_437 SPEC_438 SPEC_439 SPEC_440 SPEC_441 SPEC_442 SPEC_443 SPEC_444 SPEC_445 SPEC_446 SPEC_447 SPEC_448 SPEC_449 SPEC_450 SPEC_451 SPEC_452 SPEC_453 SPEC_454 SPEC_455 SPEC_456 SPEC_457 SPEC_458 SPEC_459 SPEC_460 SPEC_461 SPEC_462 SPEC_463 SPEC_464 SPEC_465 SPEC_466 SPEC_467 SPEC_468 SPEC_469 SPEC_470 SPEC_471 SPEC_472 SPEC_473 SPEC_474 SPEC_475 SPEC_476 SPEC_477 SPEC_478 SPEC_479 SPEC_480 SPEC_481 SPEC_482 SPEC_483 SPEC_484 SPEC_485 SPEC_486 SPEC_487 SPEC_488 SPEC_489 SPEC_490 SPEC_491 SPEC_492 SPEC_493 SPEC_494 SPEC_495 SPEC_496 SPEC_497 SPEC_498 SPEC_499 SPEC_500 SPEC_501 SPEC_502 SPEC_503 SPEC_504 SPEC_505 SPEC_506 SPEC_507 SPEC_508 SPEC_509 SPEC_510 SPEC_511 SPEC_512 SPEC_513 SPEC_514 SPEC_515 SPEC_516 SPEC_517 SPEC_518 SPEC_519 SPEC_520 SPEC_521 SPEC_522 SPEC_523 SPEC_524 SPEC_525 SPEC_526 SPEC_527 SPEC_528 SPEC_529 SPEC_530 SPEC_531 SPEC_532 SPEC_533 SPEC_534 SPEC_535 SPEC_536 SPEC_537 SPEC_538 SPEC_539 SPEC_540 SPEC_541 SPEC_542 SPEC_543 SPEC_544 SPEC_545 SPEC_546 SPEC_547 SPEC_548 SPEC_549 SPEC_550 SPEC_551 SPEC_552 SPEC_553 SPEC_554 SPEC_555 SPEC_556 SPEC_557 SPEC_558 SPEC_559 SPEC_560 SPEC_561 SPEC_562 SPEC_563 SPEC_564 SPEC_565 SPEC_566 SPEC_567 SPEC_568 SPEC_569 SPEC_570 SPEC_571 SPEC_572 SPEC_573 SPEC_574 SPEC_575 SPEC_576 SPEC_577 SPEC_578 SPEC_579 SPEC_580 SPEC_581 SPEC_582 SPEC_583 SPEC_584 SPEC_585 SPEC_586 SPEC_587 SPEC_588 SPEC_589 SPEC_590 SPEC_591 SPEC_592 SPEC_593 SPEC_594 SPEC_595 SPEC_596 SPEC_597 SPEC_598 SPEC_599 SPEC_600 SPEC_601 SPEC_602 SPEC_603 SPEC_604 SPEC_605 SPEC_606 SPEC_607 SPEC_608 SPEC_609 SPEC_610 SPEC_611 SPEC_612 SPEC_613 SPEC_614 SPEC_615 SPEC_616 SPEC_617 SPEC_618 SPEC_619 SPEC_620 SPEC_621 SPEC_622 SPEC_623 SPEC_624 SPEC_625 SPEC_626 SPEC_627 SPEC_628 SPEC_629 SPEC_630 SPEC_631 SPEC_632 SPEC_633 SPEC_634 SPEC_635 SPEC_636 SPEC_637 SPEC_638 SPEC_639 SPEC_640 SPEC_641 SPEC_642 SPEC_643 SPEC_644 SPEC_645 SPEC_646 SPEC_647 SPEC_648 SPEC_649 SPEC_650 SPEC_651 SPEC_652 SPEC_653 SPEC_654 SPEC_655 SPEC_656 SPEC_657 SPEC_658 SPEC_659 SPEC_660 SPEC_661 SPEC_662 SPEC_663 SPEC_664 SPEC_665 SPEC_666 SPEC_667 SPEC_668 SPEC_669 SPEC_670 SPEC_671 SPEC_672 SPEC_673 SPEC_674 SPEC_675 SPEC_676 SPEC_677 SPEC_678 SPEC_679 SPEC_680 SPEC_681 SPEC_682 SPEC_683 SPEC_684 SPEC_685 SPEC_686 SPEC_687 SPEC_688 SPEC_689 SPEC_690 SPEC_691 SPEC_692 SPEC_693 SPEC_694 SPEC_695 SPEC_696 SPEC_697 SPEC_698 SPEC_699 SPEC_700 SPEC_701 SPEC_702 SPEC_703 SPEC_704 SPEC_705 SPEC_706 SPEC_707 SPEC_708 SPEC_709 SPEC_710 SPEC_711 SPEC_712 SPEC_713 SPEC_714 SPEC_715 SPEC_716 SPEC_717 SPEC_718 SPEC_719 SPEC_720 SPEC_721 SPEC_722 SPEC_723 SPEC_724 SPEC_725 SPEC_726 SPEC_727 SPEC_728 SPEC_729 SPEC_730 SPEC_731 SPEC_732 SPEC_733 SPEC_734 SPEC_735 SPEC_736 SPEC_737 SPEC_738 SPEC_739 SPEC_740 SPEC_741 SPEC_742 SPEC_743 SPEC_744 SPEC_745 SPEC_746 SPEC_747 SPEC_748 SPEC_749 SPEC_750 SPEC_751 SPEC_752 SPEC_753 SPEC_754 SPEC_755 SPEC_756 SPEC_757 SPEC_758 SPEC_759 SPEC_760 SPEC_761 SPEC_762 SPEC_763 SPEC_764 SPEC_765 SPEC_766 SPEC_767 SPEC_768 SPEC_769 SPEC_770 SPEC_771 SPEC_772 SPEC_773 SPEC_774 SPEC_775 SPEC_776 SPEC_777 SPEC_778 SPEC_779 SPEC_780 SPEC_781 SPEC_782 SPEC_783 SPEC_784 SPEC_785 SPEC_786 SPEC_787 SPEC_788 SPEC_789 SPEC_790 SPEC_791 SPEC_792 SPEC_793 SPEC_794 SPEC_795 SPEC_796 SPEC_797 SPEC_798 SPEC_799 SPEC_800 SPEC_801 SPEC_802 SPEC_803 SPEC_804 SPEC_805 SPEC_806 SPEC_807 SPEC_808 SPEC_809 SPEC_810 SPEC_811 SPEC_812 SPEC_813 SPEC_814 SPEC_815 SPEC_816 SPEC_817 SPEC_818 SPEC_819 SPEC_820 SPEC_821 SPEC_822 SPEC_823 SPEC_824 SPEC_825 SPEC_826 SPEC_827 SPEC_828 SPEC_829 SPEC_830 +END_DATA_FORMAT + +NUMBER_OF_SETS 4 +BEGIN_DATA +1 -1.229074 1.028282 0.770825 0.543063 -0.197559 -0.152853 0.0499446 0.544099 0.189839 -0.0695990 -0.217327 0.218432 -0.0893429 0.142626 0.109164 0.172274 0.145968 0.114672 0.118308 -0.0786512 -0.0469904 0.208286 -0.122146 -0.0570022 0.137393 0.0146724 0.285069 -0.0541183 0.00337448 0.0121737 -0.0869573 0.138847 0.0631061 0.0446967 -0.0448670 -0.0992977 0.0992094 -0.132525 -0.0881117 -0.00433100 0.121623 0.0709305 0.172482 0.00470956 0.0770000 0.0633437 -0.0599632 0.00909850 0.0958201 0.0447204 0.0577566 0.00334247 0.0362516 -0.0511613 -0.0708144 -0.0117990 -0.0547063 0.142869 -0.0574402 -0.0736521 -0.0523000 -0.0226448 0.169945 -0.0807340 -0.0238772 -0.00492732 -0.00922519 0.0103264 0.0160797 0.0110569 -0.0617886 -0.121445 0.0228940 0.0195891 0.00483310 -0.0974835 -0.0565302 0.0389412 -0.0482179 0.0776888 0.00990931 0.0574053 -0.0445352 -0.0324823 0.105737 0.0759443 0.00813189 0.0757578 -0.0583909 0.0453077 0.0534197 0.214696 0.0760834 0.0416822 0.109562 0.0820944 0.139800 -0.0680833 0.155668 0.0713542 0.00346917 0.0979966 0.0265617 0.0460216 0.105533 0.0786731 0.0253641 0.136271 0.109117 0.0348591 0.0743953 0.00794790 0.0700562 0.00978926 0.0388147 0.0347358 0.0543960 0.0546260 0.115587 0.0747742 0.0342944 -0.102561 0.0935115 0.0342410 0.0186655 0.0166987 -0.00953181 -0.133102 -0.0493964 0.0282524 0.0886579 0.0261374 -0.0775343 -0.0478621 -0.00835317 0.0624340 0.0576478 -0.0208976 0.0282001 -0.0584022 -0.0391725 0.0136778 0.0153741 -0.0587399 0.0236229 0.0272606 0.0471005 0.0108597 0.0815823 0.0265309 0.0129400 0.0511739 -0.0196646 0.0168517 0.0429896 -0.0146275 0.0772866 0.0833747 -0.0296748 0.0228466 0.110755 0.0686586 0.0471500 0.0692692 0.0355990 0.0329450 0.0518768 0.0749167 0.0142600 0.00215427 0.0875422 0.115043 0.0315398 0.100544 0.133605 0.0419958 0.120457 0.0325583 -0.0148224 0.0505012 0.0867324 0.0198438 0.0386593 0.0339940 0.0100526 0.0816421 0.0411999 0.0653864 0.0479783 0.0653390 0.0148646 0.0329550 0.0619965 0.0138486 0.00696815 0.0928040 0.0428200 0.0610425 0.0511114 0.0792891 0.0322182 0.0838776 0.107338 0.0509220 -0.0409372 -0.0257744 -0.0237027 0.0452012 0.106608 0.157496 0.0577609 0.0349918 0.0168734 -0.0247675 -0.0388995 0.0781781 0.0216531 0.155534 0.0113826 0.103274 -0.00823076 0.120889 0.135217 0.102732 0.182175 0.271129 0.287134 0.438888 0.756609 0.881830 1.216372 1.647380 2.141313 2.474233 2.941798 3.421831 3.998791 4.363839 4.798997 5.109260 5.616134 5.643935 6.077715 6.288497 6.485942 6.781084 7.207885 7.639834 7.839772 7.874962 7.884899 7.989706 7.991143 7.873406 8.418205 9.695127 12.94689 17.02852 20.32062 21.38383 23.78977 30.09967 37.66430 39.81123 36.06109 29.10201 21.67810 17.17901 15.11602 14.47326 13.99081 13.62798 14.05815 14.79710 16.33024 18.55373 21.99596 31.95430 53.27721 80.78725 100.0000 97.46747 87.31952 80.97530 76.77822 68.59079 52.87788 35.33100 20.28425 11.42425 7.638963 6.323268 5.702443 5.664914 7.470315 12.13936 17.77611 20.47254 18.73917 14.05317 9.756094 7.070343 6.144192 4.892860 4.149095 3.612512 3.267638 2.886455 2.491948 2.270012 1.977040 1.815037 1.678537 1.464809 1.362137 1.279760 1.467391 1.322986 1.626307 1.820950 1.849515 1.733422 1.451177 1.189411 1.121836 0.963698 0.811524 0.795602 0.700275 0.741441 0.711367 0.730769 0.759391 0.674034 0.630072 0.515094 0.624801 0.619430 0.595153 0.604770 0.561686 0.621337 0.581283 0.555776 0.531120 0.493322 0.475352 0.489998 0.400185 0.431782 0.357676 0.373345 0.423131 0.340674 0.308411 0.361090 0.352102 0.393263 0.242701 0.269147 0.222446 0.346448 0.281205 0.388677 0.376336 0.326877 0.287953 0.292793 0.259125 0.220350 0.328088 0.288138 0.261598 0.196519 0.203897 0.251519 0.158627 0.163374 0.153745 0.200347 0.211917 0.117549 0.157297 0.0857614 0.172939 0.285866 0.106122 0.165848 0.234238 0.123573 0.142481 0.0939807 0.165584 0.179049 0.308712 0.139156 0.0371728 0.118719 0.109961 0.191534 0.223568 0.00528391 0.0241478 0.0576591 0.138814 0.229813 0.0968510 0.189545 0.177570 0.144188 0.204907 0.120354 0.101390 0.0802231 0.267769 0.311626 0.111053 0.0479564 0.136158 0.0363904 0.0662809 0.187991 0.182495 0.105865 -0.0189635 -0.0156891 0.196980 0.0599020 -0.00581312 0.103314 0.176971 -0.0304219 0.161510 0.172221 0.0969710 0.0645536 -0.0486514 -0.0515814 -0.0941731 0.0327929 0.171662 0.216267 0.0812484 0.102985 0.259040 -0.0125856 0.153270 0.125254 0.121109 0.0597115 0.107424 0.0379594 0.0389836 -0.0477219 0.157304 -0.000455669 0.0285114 0.154310 0.146356 0.239821 0.0800535 0.102750 -0.182462 0.00378071 -0.139762 0.0880396 0.0844002 0.0397942 -0.0431988 0.281857 0.145444 0.137001 0.120001 0.0391117 0.213601 0.0322087 0.0111827 0.144315 0.186386 0.324798 0.0222881 +2 -0.681341 0.224629 0.0108907 0.448846 0.220465 -0.339188 -0.149369 -0.176743 0.136170 0.0205700 0.117322 -0.0957620 0.283149 0.108968 -0.00251887 -0.0320039 -0.0525611 0.0200508 0.0801742 0.0437924 -0.0307340 0.0369494 0.0738610 0.0161450 -0.00174820 0.0832689 0.0280776 0.109536 0.0121685 0.00525243 0.00643856 0.0523043 0.0984995 0.00615737 0.0231364 0.0301465 0.0991673 0.00284105 0.0361439 0.0177092 0.0450352 0.233897 0.0474781 0.0235929 0.0317464 0.0544095 -0.00761268 0.0765607 0.0266390 -0.0440637 -0.0377256 0.00439779 -0.0348870 0.0184109 -0.0366677 -0.0400407 0.102186 -0.0180155 0.00429331 0.0424968 0.0346222 0.0494196 0.0189406 0.00623954 0.0178935 0.0199140 -0.0316318 0.0279317 -0.0182917 -0.00183687 -0.0102002 0.00312172 0.00479984 0.0155739 0.0593299 0.0113471 0.0308604 -0.00218622 -0.00102005 0.0183346 -0.00343486 0.0153781 -0.00368015 0.0722997 0.0787043 0.0233179 -0.0262993 0.0475141 0.0670581 0.0789776 0.0388247 0.0595790 0.0941747 0.148759 0.160289 0.155340 0.161809 0.256651 0.184987 0.170392 0.234022 0.236935 0.168146 0.146746 0.130571 0.128584 0.115825 0.156357 0.0937267 0.125502 0.138099 0.120237 0.143726 0.159372 0.189075 0.196147 0.147864 0.209575 0.244785 0.252957 0.309791 0.265775 0.379059 0.438606 0.475131 0.605934 0.679276 0.824868 0.918898 1.041264 1.181145 1.326086 1.460938 1.542890 1.652181 1.771378 1.749470 1.847027 1.890408 1.895732 1.921862 1.975945 2.127608 2.198850 2.307588 2.454665 2.702855 2.957885 3.290204 3.615434 3.998220 4.582009 5.229711 5.884497 6.590210 7.388928 8.252886 9.417835 10.58434 11.62222 12.91816 14.18645 15.47490 16.99124 18.19814 19.36450 20.45670 21.58248 22.87530 24.18470 25.66978 26.77796 27.98341 28.80040 29.80135 30.62489 31.64610 33.16751 34.40123 35.49808 36.47802 37.23686 37.87171 38.62024 39.47772 39.77423 39.88346 40.50524 40.29284 40.09369 39.94620 39.66352 39.47602 38.83058 38.32525 37.38533 36.20790 35.26518 34.45582 33.61303 32.68381 31.55270 30.19063 28.67903 27.19662 25.71420 24.87264 23.59857 22.44443 21.39621 20.61162 19.67642 18.75363 17.72603 16.85635 16.08044 15.07321 14.14388 13.27401 12.37297 11.72047 10.88642 10.29464 9.558503 9.007650 8.294290 7.837205 7.282896 6.946834 6.366132 5.992825 5.583579 5.183507 4.619461 4.330765 3.930660 3.694165 3.315585 3.120867 2.726083 2.454882 2.116177 1.934349 1.708181 1.575233 1.417333 1.322999 1.199221 0.973418 0.866157 0.765858 0.667664 0.549677 0.561594 0.478159 0.402369 0.369874 0.426794 0.438226 0.369603 0.365007 0.281240 0.331622 0.389252 0.298912 0.186745 0.136623 0.116604 0.0758921 0.117782 0.156616 0.0796964 0.124959 0.108123 0.0425565 0.0942738 0.0923970 0.0849929 0.0976281 0.105441 0.0591186 0.134383 0.113427 0.0947573 0.0793037 0.0767729 0.137612 0.0731932 0.0529911 0.0330115 0.0356194 0.0139859 0.0879669 0.0480973 0.0382105 0.0433214 0.0597546 0.0462188 0.0413747 0.0345610 0.0352557 0.0296437 0.00510208 -0.0111730 0.0593417 0.0102866 -0.0112577 0.000115408 -0.0344929 0.0131426 -0.00718016 0.0103273 0.0211947 0.00428334 -0.0128960 0.0273422 -0.00120351 0.00319796 0.0586451 0.0401155 0.0655941 0.0155755 0.00506276 0.0388504 0.0837667 0.0623819 -0.0269127 0.0140543 0.0730314 0.0228300 -0.00267933 0.0276535 0.0686044 0.0371276 0.0873406 -0.00324223 0.0485331 0.0240934 0.0176873 0.0342533 0.0293976 0.0126527 0.0334182 0.0495225 0.0136768 -0.00320042 0.00899626 -0.0703290 -0.0166176 0.0489032 0.0333951 0.0571858 -0.00501023 0.00439606 0.0689153 0.00393363 -0.0599174 0.0407132 0.0595929 0.106086 0.0309952 0.000988995 0.0624800 0.00665556 0.0684873 0.0436029 0.0224392 0.0398872 -0.00108095 -0.0101571 0.0215760 -0.00370246 -0.0855346 -0.0302690 -0.00178068 -0.0328490 -0.0109110 0.0232862 -0.0228716 -0.00108662 0.0954189 0.0495516 0.0710540 -0.0117678 0.0168066 0.00345244 0.0269005 0.0265877 -0.0132871 -0.0279005 -0.000831766 0.00332323 0.0322455 -0.0309309 -0.0104107 -0.0715796 0.0262563 0.0595817 -0.0311421 0.0185733 -0.0319267 -0.0253794 0.102474 0.0489917 0.0978273 0.0188420 0.130556 -0.0302547 0.00686338 0.0964913 0.184661 -0.00674266 -0.00628852 0.0119185 0.00297298 0.0458076 -0.00744862 0.0100119 0.0109323 0.0634147 0.137742 -0.00892943 0.0922367 0.123444 0.0754331 -0.0225961 -0.00258196 0.0311332 0.0227818 -0.0299732 -0.0206978 0.00978773 -0.0621992 0.0493773 0.0689280 0.0446407 -0.0149230 0.0317524 0.0952839 0.0641749 0.0449067 0.122198 0.0287715 0.000527126 -0.0135536 -0.0746910 0.0903372 0.0865920 0.0794522 0.0576097 0.0550314 0.00526858 -0.0184926 0.0917024 0.0475254 0.0564546 0.162786 0.158228 0.162686 0.0686142 0.105456 0.0820664 0.0813821 0.0597726 0.0808178 0.0757342 0.108232 0.109213 0.103468 0.0997066 0.0798817 0.0508388 0.134775 0.0984899 -0.00394619 0.0875386 0.124268 0.220103 0.0660750 0.155327 0.122859 +3 0.605440 -0.248081 -0.108365 -0.0812667 0.245061 -0.0231501 0.202870 -0.182028 0.255358 0.0267778 -0.0882754 -0.0289259 0.0989719 0.0910204 0.125218 0.136748 0.191823 0.258395 0.295684 -0.0352722 0.119668 -0.0460885 0.0927024 0.0757638 0.0484287 0.112105 0.0690559 0.0533907 0.0634765 -0.000849437 0.0102559 0.181101 0.310039 0.115178 0.178144 0.199961 0.0561609 0.143498 0.212479 0.122984 0.259287 0.319376 0.224975 0.112151 0.196072 0.180949 0.0949835 0.166070 0.183451 0.151753 0.193563 0.279231 0.228188 0.175584 0.235892 0.266917 0.315884 0.253228 0.251425 0.315274 0.276631 0.226351 0.348799 0.310402 0.382948 0.455527 0.428788 0.492653 0.561569 0.679713 0.814433 0.917635 1.175443 1.338843 1.616778 2.001516 2.341921 2.813980 3.362933 4.039188 4.796502 5.717830 6.802731 8.107656 9.580970 11.22865 13.44454 16.10228 19.34284 22.96170 26.90967 31.41083 37.11987 41.60351 46.74849 52.02323 57.33634 60.54945 62.95567 64.01985 63.51180 61.35891 58.44678 54.41191 50.24116 46.32940 42.23823 38.81778 35.97620 33.51004 31.41065 29.46763 27.61218 25.82418 23.90379 21.99081 20.16573 18.48000 16.59059 14.84334 13.60821 12.13067 10.80916 9.719923 8.891028 8.158058 7.490126 6.744443 6.338065 5.840059 5.379836 4.961801 4.671213 4.255821 3.960469 3.501906 3.232510 2.908465 2.617891 2.419616 2.206970 2.017347 2.102535 1.970668 1.883493 1.914789 1.949093 1.969419 2.049452 2.192724 2.293523 2.406538 2.549274 2.728403 2.918588 3.046748 3.150692 3.375909 3.563464 3.735439 3.965578 4.046294 4.100564 4.122626 4.161782 4.202637 4.083277 4.041697 4.135411 4.027405 3.822940 3.768800 3.716782 3.619679 3.405031 3.273081 3.117031 2.979380 2.770307 2.527265 2.325561 2.235617 2.061255 1.909248 1.709349 1.599354 1.477033 1.332447 1.183321 1.061246 0.942162 0.840989 0.767690 0.675198 0.619182 0.440326 0.377832 0.396071 0.286020 0.256575 0.336825 0.240102 0.165616 0.149659 0.0936311 0.0841221 0.0837432 0.105052 0.131715 0.0270390 0.0899259 0.0924528 0.0195313 0.0244554 0.0795556 0.0475256 0.0497621 0.0763155 0.0804940 0.0309931 -0.00414540 0.0136799 0.00357446 0.00199249 -0.0430382 0.0144840 0.0414488 0.0349215 0.0244667 0.00446919 0.0577950 0.00927942 0.0351902 -0.0000890410 0.0755101 0.0696358 0.0302342 0.00972013 -0.0426678 0.0836869 0.0205869 0.0745135 0.0500788 -0.00899777 -0.0311308 0.0308476 0.0266274 -0.00578369 -0.0190607 0.0258098 0.0270834 0.0279534 0.0401905 -0.0281210 0.0380357 0.0439006 0.0148114 0.0860736 -0.00986524 0.00696534 0.0550147 0.0321277 -0.00170773 0.0652334 0.00214952 0.0209479 0.0429783 0.0129535 -0.0648097 0.0189574 0.00936155 -0.00531208 -0.0148250 0.00673896 0.0693856 -0.0572130 0.0339122 0.0241131 0.0440967 0.0830033 0.0677121 0.0797581 0.0897889 0.0784629 0.132332 0.0871548 0.0587426 0.00775822 0.0603318 -0.0131460 0.0640756 -0.0277030 -0.0292432 0.00347343 0.0737244 -0.00913850 -0.0205686 -0.0111233 0.0674926 -0.0338532 0.00873906 0.0447927 0.0220340 -0.0747194 0.0563335 0.0214755 -0.0229396 0.00291316 -0.0424794 0.00557996 -0.0223344 -0.0370069 -0.00915344 0.0150581 0.0529108 -0.00868627 0.0353028 0.0266140 0.0347852 0.0325665 0.0145371 0.0261198 -0.00369994 -0.0230605 -0.0159590 0.0340464 -0.0304270 -0.0702857 -0.0387365 -0.00323191 0.0165832 -0.00443108 -0.000798763 0.0430412 0.0384100 0.00303719 0.000255308 0.0580186 0.00668364 -0.0254708 0.0181620 0.0307183 0.0182038 -0.0617133 0.0858128 -0.0944879 0.0258835 0.0814216 0.0319502 0.0646827 0.0168057 -0.0469404 0.0262439 -0.0777939 -0.0279119 0.0151098 0.00501222 -0.0289025 0.000480301 -0.131736 0.0297386 -0.0479392 -0.0376984 -0.0359883 0.0174931 0.0707260 -0.0798008 -0.0270310 -0.0273635 0.0289083 0.0906470 -0.0315575 -0.0348460 0.0525394 0.0865574 0.161158 -0.0162611 0.0682026 0.0600264 -0.00823299 -0.0254981 0.0388708 0.0235037 -0.0896806 0.0208950 0.0900680 0.0212962 0.0174412 -0.00734033 0.0711307 -0.0611705 -0.0798481 0.0265800 -0.0465537 0.0877898 0.0214077 0.0423860 -0.0741379 -0.0788414 0.0269989 -0.0543612 0.0615723 0.0166903 -0.0394955 -0.0229464 -0.0207412 -0.0341364 0.0313392 0.0673323 0.0786853 -0.0492880 0.0107205 0.0423312 -0.0129137 -0.0464363 0.0959452 -0.0627355 -0.0479210 0.000726023 0.0118439 0.00471910 -0.0438892 -0.0127887 0.0513683 0.0818131 0.0681787 0.167731 -0.0333133 -0.0478452 -0.0520634 -0.00366616 -0.0294156 -0.00879096 0.0136524 0.143600 0.0702123 -0.0120063 -0.00958843 0.0327755 0.0104146 0.121913 0.0340281 0.0326330 0.0440299 0.137373 0.258965 0.136004 0.00190704 -0.137202 0.0886893 0.0739976 0.0979148 0.0677261 0.0209136 0.0925282 0.157286 0.0778707 -0.0136447 0.0387868 -0.00156552 0.181098 0.140316 0.0365597 0.138972 0.0417863 0.0344944 0.102652 0.0788329 0.0318898 0.0365864 -0.0121223 0.0825118 0.154041 0.158069 0.122016 0.100888 0.0190466 0.0766090 0.0925453 0.142485 0.0707152 +4 1.595279 -0.267071 1.413421 0.832073 0.330684 -0.0290322 0.187577 0.117184 0.393705 -0.00421955 0.0781992 0.213289 -0.127661 0.443639 0.364321 0.154131 0.292099 0.209658 0.159578 0.121724 0.209504 -0.0348630 0.241598 0.0539795 0.374983 0.201308 0.320097 0.0251845 0.0808913 -0.0160640 0.157717 0.00437843 0.242663 -0.0380717 0.120700 0.156957 0.217687 0.243299 0.228515 0.107278 0.0858745 0.0664846 0.183779 0.176295 0.0975108 0.246435 0.251230 0.174439 0.220927 0.278229 0.386490 0.396048 0.330791 0.283474 0.298646 0.305066 0.252082 0.170358 0.238978 0.356126 0.326331 0.284523 0.308428 0.470387 0.452110 0.521969 0.557543 0.601409 0.559975 0.688528 0.751964 0.965921 1.194223 1.488590 1.748624 2.004605 2.474538 2.939625 3.344689 4.276773 4.795708 5.560631 6.655064 8.290498 9.717433 11.30808 13.29098 16.18261 19.32436 23.06637 26.86823 31.40205 37.13154 41.88772 47.33168 52.48280 57.73006 61.22387 63.45125 64.74852 64.02890 62.13192 59.17694 55.42482 50.78828 46.48410 42.38424 39.11901 36.11338 33.43474 31.44118 29.27671 27.49406 25.65797 23.73723 22.07577 20.40288 18.46525 16.82849 15.28232 13.79701 12.44949 11.15538 10.26310 9.426884 8.752518 8.083485 7.719931 7.157696 6.870334 6.503525 6.201553 6.116867 5.804410 5.505751 5.208474 5.116297 4.734132 4.547364 4.259882 4.111677 4.041070 3.912080 4.017874 4.130650 4.402754 4.553505 4.903321 5.415545 5.761668 6.252872 6.825158 7.706766 8.431316 9.439566 10.44072 11.30339 12.68698 13.84674 15.21660 16.63156 17.66067 19.58327 20.91130 22.27847 23.61164 24.67705 25.40217 26.55463 27.92177 29.40274 30.34885 31.52987 32.56499 33.11707 33.71354 34.43531 35.68731 36.78125 37.82579 38.77566 39.40298 40.09636 40.73695 41.19779 40.99215 41.71815 41.40529 41.58203 41.77044 41.07521 40.69829 40.59592 39.54771 38.88740 37.86746 36.76603 35.88795 34.79487 33.76213 32.74854 31.40403 29.98434 28.63649 27.43981 25.73823 24.87184 23.80234 22.39784 21.32809 20.68011 19.95831 18.73467 17.72467 16.66560 16.02326 14.97285 14.30080 13.33750 12.26686 11.81708 10.89788 10.27938 9.544734 9.208363 8.646208 8.137745 7.965984 7.401904 7.381935 7.060124 7.063072 7.011218 7.013887 7.439595 7.367568 7.485605 7.695443 7.861756 7.909449 7.898421 7.834027 7.866130 7.934604 7.933275 8.143575 8.310509 8.535821 8.561282 8.610562 8.423892 8.363094 8.333000 8.318197 8.836642 10.11123 13.07918 17.44832 20.31954 21.21006 23.73149 30.51880 37.07600 39.29722 35.71817 28.52599 21.42093 17.07092 15.30663 14.53564 14.04077 13.66697 13.76080 14.79738 16.29631 18.22325 21.94381 31.07216 52.39020 80.14292 99.26850 96.76690 86.96336 80.88165 76.34343 68.03736 51.82996 34.29944 19.78207 11.67823 7.620393 6.319976 5.682926 5.653817 7.202740 12.21208 17.67776 20.47920 18.33676 13.94515 9.706223 6.867896 5.689679 4.799857 4.127430 3.626008 3.105786 2.837879 2.527242 2.417294 2.250906 1.960406 1.684871 1.436465 1.281023 1.231534 1.309802 1.409347 1.544365 1.808096 1.742216 1.593269 1.557432 1.157897 1.093673 1.022861 0.887396 0.840646 0.740207 0.859497 0.796712 0.654523 0.727507 0.673973 0.703954 0.675309 0.672423 0.710310 0.776384 0.562205 0.580374 0.656067 0.543687 0.551711 0.509790 0.404774 0.503136 0.550323 0.508558 0.438375 0.426626 0.347692 0.405998 0.475545 0.348702 0.340989 0.250200 0.383617 0.361680 0.302507 0.237893 0.267080 0.267962 0.225608 0.311259 0.301841 0.259151 0.416021 0.185586 0.203544 0.291223 0.328912 0.0875649 0.114715 0.173519 0.0724644 0.229498 0.261873 0.196753 0.194385 0.171074 0.301622 0.298336 0.193742 0.207606 0.256481 0.215977 0.263475 0.304829 0.0737278 0.0969453 0.162223 0.142798 0.215809 0.141491 0.107142 0.145253 0.0260932 0.192600 0.202819 0.140430 0.278973 0.217008 0.188077 0.278064 0.135255 0.0768010 0.00929177 0.154380 0.287243 0.283639 0.0783458 0.186629 0.154136 0.185324 0.0741413 0.0208272 0.160973 0.142786 0.156723 0.0951803 0.240796 0.0307439 0.184309 0.186856 0.155956 0.209659 0.195804 0.0481838 0.0942833 0.0396693 0.159211 0.0599842 0.0683678 0.135868 0.0990298 0.124642 0.0167833 0.179912 0.0403701 0.125846 0.168018 -0.0958501 -0.124638 0.127461 0.0200087 0.202774 0.128908 0.178597 0.117116 0.115319 0.212039 -0.0223899 -0.0268099 0.219314 0.199692 0.133776 0.113012 -0.0517036 0.197311 0.159244 0.127269 0.112863 0.0996917 0.0989321 0.0483463 0.0295307 0.121643 0.0853537 0.0232937 0.0944850 0.0390032 0.158031 0.0574552 0.250102 0.155260 0.0335152 0.117290 0.0906806 0.314940 0.0779056 +END_DATA diff --git a/doc/cctiff.html b/doc/cctiff.html index 5a9ca82..5a9ca82 100644..100755 --- a/doc/cctiff.html +++ b/doc/cctiff.html diff --git a/doc/ccxxmake.html b/doc/ccxxmake.html index a2a9080..021dd36 100644..100755 --- a/doc/ccxxmake.html +++ b/doc/ccxxmake.html @@ -34,6 +34,9 @@ style="font-weight: bold;"><span style="font-weight: bold;"></span></span> DataColor <span style="font-weight: bold;">Spyder4 & Spyder5</span>), + + + <span style="font-weight: bold;">ccxxmake</span> allows a creation of a calibration spectral sample (<a href="File_Formats.html#.ccss">ccss</a>) for a particular <span style="font-weight: bold;">Display</span>, @@ -49,6 +52,9 @@ The instrument manufacturer may supply spectral sample files (see <a href="oeminst.html">oeminst</a>).<br> <br> + There is a <a href="ccsss.html">list of contributed</a> <span + style="font-weight: bold;">ccss</span> (Colorimeter Correction + Spectral Sample) files for some displays.<br> There is a <a href="ccmxs.html">list of contributed</a> <span style="font-weight: bold;">ccmx</span> (Colorimeter Correction Matrix) files.<br> @@ -76,6 +82,9 @@ + + + Verbose mode</small><br> <a href="#S">-S</a> Create @@ -101,6 +110,9 @@ rather + + + than CCMX<br> <a href="#f">-f ref.ti3[,targ.ti3]</a> @@ -129,6 +141,9 @@ two + + + .ti3 files rather than measure.<br style="font-family: monospace;"> <span style="font-family: monospace;"> </span><font style="font-family: monospace;" size="-1"><a href="#display">-display @@ -152,6 +167,9 @@ two + + + displayname</a> [X11 only] Choose X11 display name</font><br style="font-family: monospace;"> <font style="font-family: monospace;" size="-1"></font><font @@ -188,6 +206,9 @@ m + + + for VideoLUT access.</font><br style="font-family: monospace;"> <font style="font-family: monospace;" size="-1"> <a href="#d">-d @@ -210,6 +231,9 @@ m + + + n</a> Choose the @@ -238,6 +262,9 @@ list + + + (default 1)</font><br> <span style="font-family: monospace;"> <a href="#dweb">-dweb[:port]</a> @@ -264,6 +291,9 @@ list + + + Display via a web server at port (default 8080)</span><br> <span style="font-family: monospace;"> <a href="#dmadvr">-dmadvr</a> @@ -281,12 +311,18 @@ list + + + [MSWin] Display via MadVR Video Renderer</span><br> <tt> </tt><tt><a href="#dcc">-dcc[:n]</a> + + + </tt><tt>Display via n'th ChromeCast (default 1, ? for list)</tt><br style="font-family: monospace;"> <font style="font-family: monospace;" size="-1"> </font><font @@ -311,6 +347,9 @@ list + + + Use telephoto mode (ie. for a projector) (if available)</font><br style="font-family: monospace;"> <tt></tt><tt><font size="-1"><a href="#y">-y X</a> @@ -336,15 +375,24 @@ list + + + Display type - instrument specific list to choose from.</font></tt><tt> (CCMX)</tt><tt><br> </tt><tt> <a href="#z">-z disptype</a> + + + Different display type for spectrometer (see -y)</tt><tt><br> </tt><tt> </tt><tt> </tt><tt><a href="#P">-P ho,vo,ss[,vs]</a></tt><tt> + + + Position test window and scale it</tt><br style="font-family: monospace;"> <font style="font-family: monospace;" size="-1"> @@ -375,6 +423,9 @@ center, + + + 1.0 = right/bottom etc.</font><br style="font-family: monospace;"> <font style="font-family: monospace;" size="-1"> ss: @@ -404,6 +455,9 @@ normal, + + + 2.0 = double etc.</font><br> <font size="-1"><span style="font-family: monospace;"> @@ -420,6 +474,9 @@ normal, + + + ss,vs: = optional horizontal, vertical scale.</span></font><br style="font-family: monospace;"> <font style="font-family: monospace;" size="-1"> </font><font @@ -445,6 +502,9 @@ normal, + + + Fill whole screen with black background</font><br style="font-family: monospace;"> <small style="font-family: monospace;"> <span @@ -477,6 +537,9 @@ on + + + test window<br> </small><font style="font-family: monospace;" size="-1"> <a href="#N">-N</a> @@ -500,6 +563,9 @@ on + + + Disable initial calibration of instrument</font><small style="font-family: monospace;"> if possible<br> </small><span style="font-family: monospace;"> </span><font @@ -525,6 +591,9 @@ on + + + Use high resolution spectrum mode (if available)</font><font style="font-family: monospace;" size="-1"></font><br style="font-family: monospace;"> @@ -549,6 +618,9 @@ on + + + "command"</a> Invoke shell "command" each time a color is set<br> </font><small style="font-family: monospace;"> <a href="#o">-o @@ -558,8 +630,10 @@ on 1931_2 </small><small style="font-family: monospace;"> (def.)</small><small - style="font-family: monospace;">, 1964_10, S&B 1955_2, shaw, - J&V 1978_2<br> + style="font-family: monospace;">, 1964_10, </small><small + style="font-family: monospace;"><tt><small>2012_2, 2012_10, </small></tt>S&B + + 1955_2, shaw, J&V 1978_2 or file.cmf<br> </small><font style="font-family: monospace;" size="-1"> <a href="#s">-s steps</a> Override @@ -586,6 +660,9 @@ sequence + + + combination steps (default 3)</font><br style="font-family: monospace;"> <font style="font-family: monospace;" size="-1"> <a href="#W">-W @@ -609,6 +686,9 @@ sequence + + + n|h|x</a> Override serial @@ -637,6 +717,9 @@ n + + + none, h = HW, x = Xon/Xoff</font><br style="font-family: monospace;"> <small style="font-family: monospace;"> <a href="#D">-D [level]</a> @@ -668,6 +751,9 @@ overall + + + description</small><br> <small style="font-family: monospace;"> <a href="#I">-I "displayname"</a> </small><span @@ -679,6 +765,9 @@ overall + + + dtech</a> Set display technology type<br> @@ -688,6 +777,9 @@ overall + + + CRT<br> m @@ -695,6 +787,9 @@ overall + + + Plasma<br> l @@ -702,6 +797,9 @@ overall + + + LCD<br> 1 @@ -709,6 +807,9 @@ overall + + + LCD CCFL<br> 2 @@ -716,6 +817,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>LCD CCFL IPS<br> @@ -725,6 +829,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>LCD CCFL VPA<br> @@ -734,6 +841,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>LCD CCFL TFT<br> @@ -743,6 +853,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>LCD CCFL Wide Gamut<br> @@ -752,6 +865,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>LCD CCFL Wide Gamut IPS<br> @@ -761,6 +877,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>LCD CCFL Wide Gamut VPA<br> @@ -770,6 +889,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>LCD CCFL Wide Gamut TFT<br> @@ -779,6 +901,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>LCD White LED<br> @@ -788,6 +913,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>LCD White LED IPS<br> @@ -797,6 +925,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>LCD White LED VPA<br> @@ -806,6 +937,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>LCD White LED TFT<br> @@ -815,6 +949,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>LCD RGB LED<br> @@ -824,6 +961,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>LCD RGB LED IPS<br> @@ -833,6 +973,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>LCD RGB LED VPA<br> @@ -842,6 +985,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>LCD RGB LED TFT<br> @@ -851,6 +997,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>LCD RG Phosphor<br> @@ -860,6 +1009,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>LCD RG Phosphor IPS<br> @@ -869,6 +1021,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>LCD RG Phosphor VPA<br> @@ -878,6 +1033,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>LCD RG Phosphor TFT<br> @@ -887,6 +1045,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>LED OLED<br> @@ -896,6 +1057,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>LED AMOLED<br> @@ -905,6 +1069,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>DLP Projector<br> @@ -914,6 +1081,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>DLP Projector RGB Filter Wheel<br> @@ -923,6 +1093,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>DPL Projector RGBW Filter Wheel<br> @@ -932,6 +1105,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>DLP Projector RGBCMY Filter Wheel<br> @@ -941,6 +1117,9 @@ overall + + + </small><small style="font-family: monospace;"><small style="font-family: monospace;"> </small>Unknown<br> </small> <tt> <a href="#U">-U c</a> @@ -952,6 +1131,9 @@ overall + + + Set UI selection character(s)</tt><br> <font size="-1"><span style="font-family: monospace;"> </span><a style=" font-family: monospace;" href="#Yrn">-<font size="-1">Y</font> @@ -972,6 +1154,9 @@ overall + + + Override refresh, non-refresh display mode</span></font><br> <tt> <a href="#YR">-Y R:<i>rate</i></a> @@ -980,6 +1165,9 @@ overall + + + Override measured refresh rate with rate Hz</tt><br> <font size="-1"><span style="font-family: monospace;"> </span><a style=" font-family: monospace;" href="#YA">-<font size="-1">Y</font>A</a><span @@ -1087,6 +1275,9 @@ overall + + + 1,2</span> . Some experimentation may be needed using <a href="dispwin.html">dispwin</a> on such systems, to discover what screen has access to the VideoLUT hardware, and which screens the @@ -1232,6 +1423,9 @@ overall + + + of particular instruments</a> for more details. This may give better accuracy for display measurements.<br> <br> @@ -1257,12 +1451,18 @@ overall observer. The default.<br> <b>1964_10</b> selects the standard CIE 1964 10 degree observer.<br> + <b> 2012_2</b> selects the proposed CIE 2012 2 degree + observer.<br> + <b>2012_10</b> selects the proposed CIE 2012 10 degree + observer.<br> <b>1955_2</b> selects the Stiles and Birch 1955 2 degree observer<br> <b>1978_2 </b>selects the Judd and Voss 1978 2 degree observer<br> <b>shaw</b> selects the Shaw and Fairchild 1997 2 degree observer<br> + <i><b>file.cmf</b></i> selects an observer specified by the + given <a href="File_Formats.html#.cmf">.cmf</a> file.<br> <br> <a name="s"></a>The <b>-s steps</b><span style="font-weight: bold;"></span> parameter overrides the default number of test patch combination @@ -1341,6 +1541,9 @@ overall + + + <b>-Y n</b> options overrides the refresh display mode set by the <a href="spotread.html#y">-y display type selection</a>, with <b>-Y</b><span style="font-weight: bold;"> r</span> forcing refresh display mode, diff --git a/doc/chartread.html b/doc/chartread.html index 19f4add..e39b936 100644..100755 --- a/doc/chartread.html +++ b/doc/chartread.html @@ -30,6 +30,9 @@ Verbose + + + mode</span><br style="font-family: monospace;"> <span style="font-family: monospace;"> </span><a style="font-family: monospace;" href="#c">-c listno</a><span @@ -48,6 +51,9 @@ transmission + + + measurement mode<br> </span></small><small><span style="font-family: monospace;"> </span><a style="font-family: monospace;" href="#d">-d</a><span @@ -62,6 +68,9 @@ measurement + + + mode (white Y relative results)</span></small><small><span style="font-family: monospace;"></span></small><small><span style="font-family: monospace;"><br> @@ -74,6 +83,9 @@ measurement + + + Display type - instrument specific list to choose from.</span></font><br> <small><span style="font-family: monospace;"> </span><a style="font-family: monospace;" href="#e">-e</a><span @@ -87,6 +99,9 @@ measurement + + + mode (absolute results)<br> </span></small><small><span style="font-family: monospace;"> </span><a style="font-family: monospace;" href="#p">-p</a><span @@ -101,6 +116,9 @@ by + + + patch rather than strip</span></small><br> <small><span style="font-family: monospace;"></span> <a style="font-family: monospace;" href="#x">-x [lx]</a><span @@ -109,6 +127,9 @@ Take + + + manually entered values, either L*a*b* (-xl) or XYZ (-xx).</span><br style="font-family: monospace;"> <span style="font-family: monospace;"> </span><a @@ -123,6 +144,9 @@ Don't + + + save spectral information (default saves spectral)<br> </span></small><small><span style="font-family: monospace;"> </span><a style="font-family: monospace;" href="#l">-l</a><span @@ -144,6 +168,9 @@ partly + + + read chart<br> <a href="#I">-I</a> file.cal Override @@ -156,6 +183,9 @@ partly + + + Set filter configuration:<br> n @@ -165,6 +195,9 @@ partly + + + None<br> p @@ -174,6 +207,9 @@ partly + + + Polarising filter<br> 6 @@ -183,6 +219,9 @@ partly + + + D65<br> u @@ -192,11 +231,17 @@ partly + + + U.V. Cut</span></font><small><span style="font-family: monospace;"></span><span style="font-family: monospace;"></span></small><br> <font size="-1"><span style="font-family: monospace;"><a href="#A">-A N|A|X|G</a> + + + XRGA conversion</span></font> (default N)<br> <font size="-1"><span style="font-family: monospace;"> </span><a style="font-family: monospace;" href="#N">-N</a><span @@ -224,6 +269,9 @@ partly + + + Apply Colorimeter Correction Matrix</span></font><br> <span style="font-family: monospace;"> <a href="#X2">-X file.ccss</a> @@ -239,6 +287,9 @@ Samples + + + for calibration</span><br> <small><span style="font-family: monospace;"> </span><a style=" font-family: monospace;" href="#Q">-Q observ</a><span @@ -254,12 +305,17 @@ Samples + + + </span></small><small><span style="font-family: monospace;">1931_2 </span></small><small><span style="font-family: monospace;"> (def.)</span></small><small><span - style="font-family: monospace;">, 1964_10, S&B 1955_2, shaw, - J&V 1978_2</span></small><small><span style="font-family: - monospace;"></span></small><font size="-1"><span + style="font-family: monospace;">, 1964_10, </span></small><small><span + style="font-family: monospace;"><tt><small>2012_2, 2012_10, </small></tt>S&B + + 1955_2, shaw, J&V 1978_2 or file.cmf</span></small><small><span + style="font-family: monospace;"></span></small><font size="-1"><span style="font-family: monospace;"></span></font><br> <font size="-1"><span style="font-family: monospace;"> <a href="#T">-T ratio</a> @@ -272,6 +328,9 @@ patch + + + consistency tolerance by ratio (if available)<br> </span></font><font size="-1"><span style="font-family: monospace;"> <a href="#S">-S</a> @@ -284,6 +343,9 @@ strip + + + & unexpected value warnings</span></font><br> <font size="-1"><span style="font-family: monospace;"> <a href="#W">-W n|h|x</a> @@ -294,6 +356,9 @@ Override + + + serial port flow control: n = none, h = HW, x = Xon/Xoff</span></font><br style="font-family: monospace;"> <small><span style="font-family: monospace;"></span><small @@ -309,6 +374,9 @@ Override + + + Base name for input[</span><a style="font-family: monospace;" href="File_Formats.html#.ti2">.ti2</a><span style="font-family: monospace;">]/output[</span><a @@ -458,6 +526,9 @@ Override + + + -I</span> parameter allows overriding the .ti2 calibration curves placed in the resulting .ti3 file with the actual calibration that was used for that particular print.<br> @@ -531,7 +602,9 @@ Override information (ie. the X-Rite <span style="font-weight: bold;">i1d3</span>, or the DataColor <span style="font-weight: bold;">Spyder4 & Spyder 5</span>).This can improve a colorimeters accuracy for a - particular type of display.<br> + particular type of display. A list of contributed <span + style="font-weight: bold;">ccss</span> files is <a + href="ccsss.html">here</a>.<br> <br> <a name="T"></a> The -<span style="font-weight: bold;">T ratio</span> argument modifies the patch consistency tolerance threshold for some @@ -553,12 +626,18 @@ Override observer. The default.<br> <b>1964_10</b> selects the standard CIE 1964 10 degree observer.<br> + <b> 2012_2</b> selects the proposed CIE 2012 2 degree + observer.<br> + <b>2012_10</b> selects the proposed CIE 2012 10 degree + observer.<br> <b>1955_2</b> selects the Stiles and Birch 1955 2 degree observer<br> <b>1978_2 </b>selects the Judd and Voss 1978 2 degree observer<br> <b>shaw</b> selects the Shaw and Fairchild 1997 2 degree observer<br> + <i><b>file.cmf</b></i> selects an observer specified by the + given <a href="File_Formats.html#.cmf">.cmf</a> file.<br> <br> <a name="S"></a>The <b>-S</b> flag causes the normal "wrong strip" and "unexpected value" warnings to be suppressed. There may be a lot diff --git a/doc/cht_format.html b/doc/cht_format.html index 80a3e9e..80a3e9e 100644..100755 --- a/doc/cht_format.html +++ b/doc/cht_format.html diff --git a/doc/collink.html b/doc/collink.html index dc67463..b746c5d 100644..100755 --- a/doc/collink.html +++ b/doc/collink.html @@ -19,12 +19,12 @@ or to retain the source black characteristic from the source profile.<br> <h3>Usage Summary</h3> - <small><span style="font-family: monospace;">collink [-options] <span - style="font-style: italic;">srcprofile dstprofile - linkedprofile</span></span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#v">-v</a><span - style="font-family: monospace;"> + <span style="font-family: monospace;">collink [-options] <span + style="font-style: italic;">srcprofile dstprofile linkedprofile</span></span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#v">-v</a><span + style="font-family: monospace;"> @@ -63,32 +63,34 @@ - Verbose<br> - </span></small><small><span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#A">-A "manufacturer"</a><span - style="font-family: monospace;"> Set the manufacturer - description string</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#M">-M "model"</a><span - style="font-family: monospace;"> - Set the model - description string</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#D">-D "description"</a><span - style="font-family: monospace;"> Set the profile - Description string (Default "</span><span - style="font-style: italic; font-family: monospace;">inoutfile</span><span - style="font-family: monospace;">")</span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#C">-C "copyright"</a><span - style="font-family: monospace;"> Set the - copyright string</span></small><br style="font-family: + + + + Verbose<br> + </span><span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#A">-A "manufacturer"</a><span + style="font-family: monospace;"> Set the manufacturer + description string</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#M">-M "model"</a><span + style="font-family: monospace;"> + Set the model + description string</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#D">-D "description"</a><span + style="font-family: monospace;"> Set the profile + Description string (Default "</span><span style="font-style: + italic; font-family: monospace;">inoutfile</span><span + style="font-family: monospace;">")</span><br style="font-family: monospace;"> - <small><span style="font-family: monospace;"></span><span - style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#V">-V</a><span - style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#C">-C "copyright"</a><span + style="font-family: monospace;"> Set the + copyright string</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"></span><span + style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#V">-V</a><span + style="font-family: monospace;"> Verify existing @@ -129,16 +131,19 @@ existing - profile, rather than link (Debug option)</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#q">-q lmhu</a><span - style="font-family: monospace;"> - Quality - Low, Medium (def), - High, Ultra</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#r">-r <i>res</i></a><span - style="font-family: monospace;"> + + + + profile, rather than link (Debug option)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#q">-q lmhu</a><span + style="font-family: monospace;"> + Quality - Low, Medium (def), High, + Ultra</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#r">-r <i>res</i></a><span + style="font-family: monospace;"> Override clut @@ -179,10 +184,13 @@ clut - res. set by -q</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#n">-n</a><span - style="font-family: monospace;"> + + + + res. set by -q</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#n">-n</a><span + style="font-family: monospace;"> Don't preserve @@ -223,36 +231,38 @@ preserve - device curves in result</span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#f">-f</a><span - style="font-family: monospace;"> - - Special :- Force neutral colors - to be K only output.<br> - </span></small><small><span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#fk">-fk</a><span - style="font-family: monospace;"> - - Special :- Force K only neutral colors - to be K only output<br> - </span></small><small><span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#fcmy">-fcmy</a><span - style="font-family: monospace;"> - - Special :- Force 100% C,M or Y only to stay pure</span></small><br + + + + device curves in result</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#f">-f</a><span style="font-family: monospace;"> - <small><span style="font-family: monospace;"></span><span - style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#F">-F</a><span - style="font-family: monospace;"> - - Special :- Force all colors to be - K only output.</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#p">-p aprof.icm</a><span - style="font-family: monospace;"> + + Special :- Force neutral colors to + be K only output.<br> + </span><span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#fk">-fk</a><span + style="font-family: monospace;"> + + Special :- Force K only neutral colors to + be K only output<br> + </span><span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#fcmy">-fcmy</a><span + style="font-family: monospace;"> + + Special :- Force 100% C,M or Y only to stay pure</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"></span><span + style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#F">-F</a><span + style="font-family: monospace;"> + + Special :- Force all colors to be K + only output.</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#p">-p aprof.icm</a><span + style="font-family: monospace;"> Include @@ -292,14 +302,16 @@ Include - abstract profile in link</span></small><br> - <small><span style="font-family: monospace;"><small><span - style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#a">-a file.cal</a><span - style="font-family: monospace;"> - Apply calibration - curves</span></small> to link output and append linear<br> - <a href="H">-H file.cal</a> + + + + abstract profile in link</span><br> + <span style="font-family: monospace;"><span style="font-family: + monospace;"> </span><a style="font-family: monospace;" + href="#a">-a file.cal</a><span style="font-family: monospace;"> + Apply calibration curves</span> + to link output and append linear<br> + <a href="H">-H file.cal</a> @@ -314,11 +326,14 @@ Include - Append calibration curves to 3dlut<br style="font-family: - monospace;"> - </span> <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#s">-s</a><span - style="font-family: monospace;"> + + + + Append calibration curves to 3dlut<br style="font-family: + monospace;"> + </span> <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#s">-s</a><span + style="font-family: monospace;"> Simple Mode @@ -359,15 +374,18 @@ Mode - (default)</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#g">-g [src.gam]</a><span - style="font-family: monospace;"> - Gamut Mapping Mode [optional source image gamut]</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#G">-G [src.gam]</a><span - style="font-family: monospace;"> + + + + (default)</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#g">-g [src.gam]</a><span + style="font-family: monospace;"> + Gamut Mapping Mode [optional source image gamut]</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#G">-G [src.gam]</a><span + style="font-family: monospace;"> Gamut @@ -407,18 +425,21 @@ Gamut - Mapping Mode using inverse outprofile A2B [optional source - gamut]</span><br style="font-family: monospace;"> - <br style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><u - style="font-family: monospace;">Simple Mode Options:</u><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#si">-i <i>in_intent</i></a><span - style="font-family: monospace;"> p = - perceptual, r = relative colorimetric,</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> + + + + Mapping Mode using inverse outprofile A2B [optional source gamut]</span><br + style="font-family: monospace;"> + <br style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><u + style="font-family: monospace;">Simple Mode Options:</u><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#si">-i <i>in_intent</i></a><span + style="font-family: monospace;"> p = + perceptual, r = relative colorimetric,</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> s @@ -459,15 +480,18 @@ s - = saturation, a = absolute colorimetric</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#so">-o </a><i - style="font-family: monospace;"><a href="#so">out_intent</a> </i><span - style="font-family: monospace;"> p = - perceptual, r = relative colorimetric,</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> + + + + = saturation, a = absolute colorimetric</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#so">-o </a><i + style="font-family: monospace;"><a href="#so">out_intent</a> </i><span + style="font-family: monospace;"> p = perceptual, + r = relative colorimetric,</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> s @@ -508,18 +532,21 @@ s - = saturation, a = absolute colorimetric</span><br - style="font-family: monospace;"> - <br style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><u - style="font-family: monospace;">Mapping Mode Options:</u><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#i">-i <i>intent</i></a><span - style="font-family: monospace;"> - set linking intent from the following choice:</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> + + + + = saturation, a = absolute colorimetric</span><br + style="font-family: monospace;"> + <br style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><u + style="font-family: monospace;">Mapping Mode Options:</u><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#i">-i <i>intent</i></a><span + style="font-family: monospace;"> set + linking intent from the following choice:</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> a - @@ -560,8 +587,11 @@ a - Absolute Colorimetric (in Jab) [ICC Absolute Colorimetric]<br> - + + + + Absolute Colorimetric (in Jab) [ICC Absolute Colorimetric]<br> + aw - @@ -602,9 +632,12 @@ aw - Absolute Colorimetric (in Jab) with scaling to fit white point<br - style="font-family: monospace;"> - </span><span style="font-family: monospace;"> + + + + Absolute Colorimetric (in Jab) with scaling to fit white point<br + style="font-family: monospace;"> + </span><span style="font-family: monospace;"> aa - @@ -645,8 +678,11 @@ aa - Absolute Appearance</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> + + + + Absolute Appearance</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> r - @@ -687,9 +723,12 @@ r - White Point Matched Appearance [ICC Relative Colorimetric]</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> + + + + White Point Matched Appearance [ICC Relative Colorimetric]</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> la - @@ -730,9 +769,12 @@ la - Luminance matched Appearance</span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> + + + + Luminance matched Appearance</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> p - @@ -773,8 +815,11 @@ p - Perceptual (Preferred) [ICC Perceptual]<br> - </span></small><small><span style="font-family: monospace;"> + + + + Perceptual (Preferred) [ICC Perceptual]<br> + </span><span style="font-family: monospace;"> pa @@ -814,12 +859,18 @@ pa - - Perceptual Appearance</span></small><br> + + + + - Perceptual Appearance</span><br> <tt> + + + lp - Luminance Preserving Perceptual</tt><br style="font-family: monospace;"> - <small><span style="font-family: monospace;"></span><span - style="font-family: monospace;"> + <span style="font-family: monospace;"></span><span + style="font-family: monospace;"> ms - @@ -860,8 +911,11 @@ ms - Saturation</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> + + + + Saturation</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> s - @@ -902,9 +956,12 @@ s - Enhanced Saturation [ICC Saturation]</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> + + + + Enhanced Saturation [ICC Saturation]</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> al - @@ -945,11 +1002,11 @@ al - Absolute Colorimetric (Lab)<br> - + Absolute Colorimetric (Lab)<br> + @@ -980,14 +1037,23 @@ al - rl - White Point Matched Colorimetric (Lab)</span><span - style="font-family: monospace;"></span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#w">-w [J,a,b]</a><span - style="font-family: monospace;"> Use forced - whitepoint hack [optional color to map the white to]<br> - <a href="#b">-b</a> + + + + + + + rl - White Point Matched Colorimetric (Lab)</span><span + style="font-family: monospace;"></span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#w">-w [J,a,b]</a><span + style="font-family: monospace;"> Use forced + whitepoint hack [optional color to map the white to]<br> + <a href="#b">-b</a> + + + @@ -997,14 +1063,13 @@ al - Use RGB->RGB forced black point hack<br style="font-family: - monospace;"> - </span> <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#c">-c <i>viewcond</i></a><span - style="font-family: monospace;"> set source viewing - conditions for CIECAM02,</span><br style="font-family: + Use RGB->RGB forced black point hack<br style="font-family: monospace;"> - <span style="font-family: monospace;"> + </span> <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#c">-c <i>viewcond</i></a><span + style="font-family: monospace;"> set source viewing + conditions for CIECAM02,</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> either @@ -1045,14 +1110,17 @@ either - an enumerated choice, or a parameter</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#d">-d <i>viewcond</i></a><span - style="font-family: monospace;"> set destination - viewing conditions for CIECAM02,</span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> + + + + an enumerated choice, or a parameter</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#d">-d <i>viewcond</i></a><span + style="font-family: monospace;"> set destination + viewing conditions for CIECAM02,</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> either @@ -1093,12 +1161,27 @@ either - an enumerated choice, or a parameter:value change<br> - </span></small><small><span style="font-family: monospace;"> - pp - Practical - Reflection Print (ISO-3664 P2)</span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> + + + + an enumerated choice, or a parameter:value change<br> + </span><tt> </tt><tt><tt>pc + - Critical print evaluation environment (ISO-3664 P1)</tt><tt><br> + + + + + + </tt>pp - Practical Reflection Print (ISO-3664 P2)<br> + + pe - Print evaluation environment (CIE 116-1995)<br> + </tt><tt> + pm - Print evaluation with partial Mid-tone adapation</tt><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + mt - Monitor in + typical work environment</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> @@ -1139,13 +1222,32 @@ either - pe - Print evaluation environment (CIE 116-1995)<br> - </span></small><small><span style="font-family: monospace;"> - - + mb - Monitor in bright work environment</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + md - Monitor in darkened work + environment</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> + jm - Projector in dim environment</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + jd - Projector in dark + environment</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> + pcd - Photo CD - original scene outdoors</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + ob - Original scene - Bright + Outdoors</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> + cx - Cut Sheet Transparencies on + a viewing box</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> +s:surround +n @@ -1181,24 +1283,17 @@ either - pc - Critical print evaluation environment (ISO-3664 P1)</span></small><small><span - style="font-family: monospace;"></span><span style="font-family: - monospace;"></span><span style="font-family: monospace;"></span><span - style="font-family: monospace;"></span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> - mt - Monitor in - typical work environment</span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> - - + = auto, a = average, m = dim, d = dark,</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + + @@ -1231,29 +1326,6 @@ either - mb - Monitor in bright work environment</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - md - Monitor in darkened work - environment</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> - jm - Projector in dim - environment</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> - jd - Projector in dark - environment</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> - pcd - Photo CD - original scene - outdoors</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> - ob - Original scene - Bright - Outdoors</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> - cx - Cut Sheet Transparencies - on a viewing box</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> -s:surround -n @@ -1263,6 +1335,11 @@ n + c = transparency (default average)</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> +w:X:Y:Z +Adapted @@ -1292,11 +1369,6 @@ n - = auto, a = average, m = dim, d = dark,</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - - @@ -1309,6 +1381,11 @@ n + white point as XYZ (default media white)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> +w:x:y +Adapted @@ -1335,11 +1412,6 @@ n - c = transparency (default average)</span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> -w:X:Y:Z -Adapted @@ -1355,6 +1427,10 @@ Adapted + white point as x, y</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> +a:adaptation +Adaptatation @@ -1378,11 +1454,6 @@ Adapted - white point as XYZ (default media white)</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> -w:x:y -Adapted @@ -1401,6 +1472,12 @@ Adapted + luminance in cd.m^2 (default 50.0)</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> +b:background +Background +% @@ -1421,10 +1498,6 @@ Adapted - white point as x, y</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> -a:adaptation -Adaptatation @@ -1446,6 +1519,15 @@ Adaptatation + of image luminance (default 20)<br> + l:imagewhite + Image white in cd.m^2 if surround = auto (default 250)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"><span style="font-family: + monospace;"> +f:flare +Flare +light @@ -1463,12 +1545,6 @@ Adaptatation - luminance in cd.m^2 (default 50.0)</span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> -b:background -Background -% @@ -1493,7 +1569,12 @@ Background + % of image luminance (default 0)<br> + </span> </span><span style="font-family: monospace;"> + g:glare Glare light % of + ambient (default 5)</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> @@ -1507,15 +1588,6 @@ Background - of image luminance (default 20)<br> - l:imagewhite - Image white in cd.m^2 if surround = auto (default 250)</span></small><br - style="font-family: monospace;"> - <small><span style="font-family: monospace;"><small><span - style="font-family: monospace;"> -f:flare -Flare -light @@ -1533,6 +1605,9 @@ light + g:X:Y:Z Glare color as XYZ + (default media white)</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> @@ -1554,12 +1629,6 @@ light - % of image luminance (default 0)<br> - </span></small> </span><span style="font-family: - monospace;"> - g:glare Glare light % of - ambient (default 5)</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> @@ -1569,10 +1638,34 @@ light + g:x:y Glare color + as x, y</span><br style="font-family: monospace;"> + <tt><span style="font-family: monospace;"><tt><span + style="font-family: monospace;"><span style="font-family: + monospace;"> + h:hkscale Helmholtz-Kohlrausch + effect scale factor (default 1.0)<br> + </span> </span><span style="font-family: monospace;"> + m:mtaf Mid-tone + partial adaptation factor (default 0.0)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + m:X:Y:Z Mid-tone + Adaptation white as XYZ (default D50)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + + m:x:y + Mid-tone Adaptation white as x, y<br> + </span></tt></span></tt> <span style="font-family: + monospace;"></span><a style="font-family: monospace;" href="#t">-t + <i>tlimit</i></a><span style="font-family: monospace;"> +set +source @@ -1587,9 +1680,6 @@ light - g:X:Y:Z Glare color as XYZ - (default media white)</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> @@ -1617,11 +1707,11 @@ light - g:x:y Glare - color as x, y</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#t">-t <i>tlimit</i></a><span - style="font-family: monospace;"> + total ink limit, 0 - 400% (estimate by default)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#T">-T <i>klimit</i></a><span + style="font-family: monospace;"> set source @@ -1662,19 +1752,23 @@ source - total ink limit, 0 - 400% (estimate by default)</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#T">-T <i>klimit</i></a><span - style="font-family: monospace;"> -set -source - - - + total ink limit, 0 - 100% (estimate by default)</span><br + style="font-family: monospace;"> + <br style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><u + style="font-family: monospace;">Inverse outprofile A2B Options:</u><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#k">-k tezhxr</a><span + style="font-family: monospace;"> + CMYK Black generation</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + +t @@ -1707,20 +1801,6 @@ source - total ink limit, 0 - 100% (estimate by default)</span><br - style="font-family: monospace;"> - <br style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><u - style="font-family: monospace;">Inverse outprofile A2B Options:</u><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#k">-k tezhxr</a><span - style="font-family: monospace;"> - CMYK Black generation</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - -t @@ -1730,6 +1810,11 @@ t + = transfer K from source to destination, e = retain K of + destination B2A table</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> + +z @@ -1759,11 +1844,6 @@ t - = transfer K from source to destination, e = retain K of - destination B2A table</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> - -z @@ -1776,6 +1856,14 @@ z + = zero K, h = 0.5 K, x = maximum K, r = ramp K (default)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#kp">-k p stle stpo enpo + enle shape</a><br style="font-family: monospace;"> + <span style="font-family: monospace;"> + +p @@ -1802,14 +1890,6 @@ z - = zero K, h = 0.5 K, x = maximum K, r = ramp K (default)</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#kp">-k p stle stpo enpo - enle shape</a><br style="font-family: monospace;"> - <span style="font-family: monospace;"> - -p @@ -1825,6 +1905,15 @@ p + = black level generation curve parameters</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#kq">-k q stle0 stpo0 enpo0 + enle0 shape0 stle2 stpo2 enpo2 enle2 shape2</a><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + +q @@ -1848,15 +1937,6 @@ p - = black level generation curve parameters</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#kq">-k q stle0 stpo0 - enpo0 enle0 shape0 stle2 stpo2 enpo2 enle2 shape2</a><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - -q @@ -1875,6 +1955,18 @@ q + = transfer source K to dual curve limits</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#K">-K parameters</a><span + style="font-family: monospace;"> + Same as -k, but target is K locus rather than K value itself</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#l">-l <i>tlimit</i></a><span + style="font-family: monospace;"> +set +destination @@ -1895,18 +1987,6 @@ q - = transfer source K to dual curve limits</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#K">-K parameters</a><span - style="font-family: monospace;"> - Same as -k, but target is K locus rather than K value itself</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#l">-l <i>tlimit</i></a><span - style="font-family: monospace;"> -set -destination @@ -1928,6 +2008,13 @@ destination + total ink limit, 0 - 400% (estimate by default)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#L">-L <i>klimit</i></a><span + style="font-family: monospace;"> +set +destination @@ -1945,13 +2032,6 @@ destination - total ink limit, 0 - 400% (estimate by default)</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#L">-L <i>klimit</i></a><span - style="font-family: monospace;"> -set -destination @@ -1976,6 +2056,8 @@ destination + total ink limit, 0 - 100% (estimate by default)<br> + <a href="#3">-3 flag</a> @@ -1990,8 +2072,6 @@ destination - total ink limit, 0 - 100% (estimate by default)<br> - <a href="#3">-3 flag</a> @@ -2013,6 +2093,9 @@ destination + Create "3DLut" output file as well as devlink<br> + + e @@ -2024,9 +2107,6 @@ destination - Create "3DLut" output file as well as devlink<br> - - e @@ -2051,6 +2131,9 @@ destination + eeColor .txt file</span><br> + <tt> + m @@ -2059,9 +2142,6 @@ destination - eeColor .txt file</span></small><br> - <tt> - m @@ -2077,13 +2157,16 @@ destination + MadVR .3dlut file<br> + + c + IRIDAS .cube file<br> + </tt> <tt> <a href="#Ib">-I B</a> - MadVR .3dlut file</tt><br> - <tt> <a href="#Ib">-I B</a> @@ -2100,17 +2183,15 @@ destination BT.1886-like source EOTF with effective gamma g.g</tt><tt><br> </tt><tt><a href="#Ib">-I b:p.p:g.g</a> Use effective gamma g.g source EOTF - with p.p prop. output black point offset</tt><small><span - style="font-family: monospace;"><small><span style="font-family: - monospace;"></span></small></span></small><br> - <small><span style="font-family: monospace;"><small><span - style="font-family: monospace;"><tt> <a - href="collink.html#Ib">-I - g:g.g</a> - Use - effective gamma g.g source EOTF with all output black - point offset</tt><br> - </span></small> <a href="#e">-e flag</a> + with p.p prop. output black point offset</tt><span + style="font-family: monospace;"><span style="font-family: + monospace;"></span></span><br> + <span style="font-family: monospace;"><span style="font-family: + monospace;"><tt> <a href="collink.html#Ib">-I g:g.g</a> + Use + effective gamma g.g source EOTF with all output black point + offset</tt><br> + </span> <a href="#e">-e flag</a> @@ -2143,11 +2224,11 @@ destination - Video encode input as:<br> - <a href="#E">-E flag</a> + Video encode input as:<br> + <a href="#E">-E flag</a> @@ -2177,17 +2258,16 @@ destination - Video encode output as:</span></small><small><span - style="font-family: monospace;"><small><span style="font-family: - monospace;"><br> - - n + Video encode output as:</span><span style="font-family: + monospace;"><span style="font-family: monospace;"><br> + + n @@ -2203,9 +2283,6 @@ destination - normal RGB 0..1 levels (default)<br> - - t @@ -2215,6 +2292,9 @@ destination + normal RGB 0..1 levels (default)<br> + + t @@ -2227,16 +2307,9 @@ destination - RGB (16-235)/255 "TV" levels</span></small></span></small><br> - <small><span style="font-family: monospace;"><small><span - style="font-family: monospace;"><small><span - style="font-family: monospace;"><small><span - style="font-family: monospace;"> - T - @@ -2246,6 +2319,11 @@ destination + RGB (16-235)/255 "TV" levels</span></span><br> + <span style="font-family: monospace;"><span style="font-family: + monospace;"><span style="font-family: monospace;"><span + style="font-family: monospace;"> T + @@ -2258,9 +2336,6 @@ destination - RGB (16-235)/255 "TV" levels, clip WTW [Input Only]</span></small></span></small><br> - - 6 @@ -2273,6 +2348,9 @@ destination + RGB (16-235)/255 "TV" levels, clip WTW [Input Only]</span></span><br> + + 6 @@ -2282,9 +2360,6 @@ destination - Rec601 YCbCr SD (16-235,240)/255 "TV" levels<br> - - 7 @@ -2300,15 +2375,15 @@ destination + Rec601 YCbCr SD (16-235,240)/255 "TV" levels<br> + + 7 - Rec709 1125/60Hz YCbCr HD (16-235,240)/255 "TV" levels<br> - - 5 @@ -2327,12 +2402,12 @@ destination + Rec709 1125/60Hz YCbCr HD (16-235,240)/255 "TV" levels<br> + + 5 - Rec709 1250/50Hz YCbCr HD (16-235,240)/255 "TV" levels<br> - - 2 @@ -2354,9 +2429,9 @@ destination - Rec2020 YCbCr UHD (16-235,240)/255 "TV" levels<br> - - C + Rec709 1250/50Hz YCbCr HD (16-235,240)/255 "TV" levels<br> + + 2 @@ -2378,13 +2453,12 @@ destination - Rec2020 Constant Luminance YCbCr UHD (16-235,240)/255 "TV" - levels<br> - - x + Rec2020 YCbCr UHD (16-235,240)/255 "TV" levels<br> + + C @@ -2403,16 +2477,16 @@ destination - xvYCC Rec601 YCbCr Rec709 Prims. SD (16-235,240)/255 "TV" - levels<br> - - X + Rec2020 Constant Luminance YCbCr UHD (16-235,240)/255 "TV" + levels<br> + + x @@ -2428,13 +2502,6 @@ destination - xvYCC Rec709 YCbCr Rec709 Prims. HD (16-235,240)/255 "TV" - levels<br> - </span></small> </span></small> <small><span - style="font-family: monospace;"><a href="#P">-P</a> - -Create -gamut @@ -2444,6 +2511,9 @@ gamut + xvYCC Rec601 YCbCr Rec709 Prims. SD (16-235,240)/255 "TV" levels<br> + + X @@ -2468,20 +2538,17 @@ gamut + xvYCC Rec709 YCbCr Rec709 Prims. HD (16-235,240)/255 "TV" levels<br> + </span> </span> <span style="font-family: monospace;"><a + href="#P">-P</a> + +Create +gamut - gammap_p.x3d.html and gammap_s.x3d.html diagostics</span></small><small><br> - <span style="font-family: monospace;"></span></small><span - style="font-family: monospace;"> <span - style="text-decoration: underline;"><span style="font-style: - italic;"></span></span></span><a href="#p1"><i - style="font-family: monospace;">srcprofile</i></a><span - style="font-family: monospace;"> -source -ICC @@ -2518,9 +2585,17 @@ ICC + gammap_p.x3d.html and gammap_s.x3d.html diagostics</span><br> + <span style="font-family: monospace;"></span><span + style="font-family: monospace;"> <span + style="text-decoration: underline;"><span style="font-style: + italic;"></span></span></span><a href="#p1"><i + style="font-family: monospace;">srcprofile</i></a><span + style="font-family: monospace;"> +source +ICC - profile. A </span><small><span style="font-family: monospace;">TIFF @@ -2559,7 +2634,9 @@ ICC - or JPEG file with embedded profile may be used here.</span></small><br + + profile. A </span><span style="font-family: monospace;">TIFF or + JPEG file with embedded profile may be used here.</span><br style="font-family: monospace;"> <span style="font-family: monospace;"><span style="text-decoration: underline;"><span style="font-style: @@ -2606,9 +2683,12 @@ ICC - profile. </span><span style="font-family: monospace;">A </span><small><span - style="font-family: monospace;">TIFF or JPEG file with embedded - profile may be used here.</span></small><br style="font-family: + + + + profile. </span><span style="font-family: monospace;">A </span><span + style="font-family: monospace;">TIFF or JPEG file with embedded + profile may be used here.</span><br style="font-family: monospace;"> <span style="font-family: monospace;"> </span><a href="#p3"><i style="font-family: monospace;">linkedprofile</i></a><span @@ -2714,6 +2794,9 @@ ICC + + + Override clut res. set by <b>-q</b><br> <br> This sets the basic quality of the resulting link, by choosing the @@ -2730,7 +2813,9 @@ ICC <a name="n"></a>Normally the per channel device curves in the source and destination profiles are preserved in the resulting device link profile, but the <b>-n</b> option disables this. This can be useful - if the device linearisation curves are inappropriate in nature.<br> + if the device linearisation curves are inappropriate in nature. Note + that both input and output curves will not be preserved if a 3d LUT + output is selected.<br> <br> <a name="f"></a> The <b>-f</b> option is a special purpose flag useful only for 3 or 4 component (RGB, CMY or CMYK) source to CMYK @@ -2831,10 +2916,12 @@ ICC There is an optional argument, which is a source gamut to use instead of that of the source profile. This is to allow optimizing the gamut mapping to a source gamut of a particular image, - which can give slightly better results that gamut mapping from the - gamut of the source colorspace. Such a source image gamut can be - created using the <a href="tiffgamut.html"> tiffgamut</a> tool. - More <a href="#gg">details</a> about gamut mapping mode.<br> + which can give better results that gamut mapping from the gamut of + the source colorspace, particularly if the source colorspace (i.e. + ProPhoto etc.) has a gamut much larger than the images encoded in + that space. Such a source image gamut can be created using the <a + href="tiffgamut.html"> tiffgamut</a> tool. More <a + href="#gg">details</a> about gamut mapping mode.<br> <br> <a name="G"></a> <b>-G</b> Use the gamut mapped, inverse AtoB table linking method. This is generally the most accurate, @@ -2844,11 +2931,13 @@ ICC and <b>-l</b> are effective when this method is selected. There is an optional argument, which is a source gamut to use instead of that of the source profile. This is to allow optimizing the gamut mapping - to a source gamut of a particular image, which can give - slightly better results that gamut mapping from the gamut of the - source colorspace. Such a source image gamut can be created using - the <a href="tiffgamut.html"> tiffgamut</a> tool. More <a - href="#GG">details</a> about the gamut mapping, inverse AtoB mode.<br> + to a source gamut of a particular image, which can give better + results that gamut mapping from the gamut of the source colorspace, + particularly if the source colorspace (i.e. ProPhoto etc.) has a + gamut much larger than the images encoded in that space. Such a + source image gamut can be created using the <a + href="tiffgamut.html"> tiffgamut</a> tool. More <a href="#GG">details</a> + about the gamut mapping, inverse AtoB mode.<br> <br> <a name="Gp"></a>The gamut provided to the <span style="font-weight: bold;">-g</span> or <span style="font-weight: @@ -2904,6 +2993,9 @@ ICC + + + <b>p</b> = perceptual, <b>r</b> = relative colorimetric,<br> <b>s</b> @@ -3091,8 +3183,8 @@ ICC When the <b>-G</b> flag is used, the A2B table is inverted "on the fly", allowing various additional choices as to what device values are used to reproduce a particular color. (If the <b>-G</b> flag is - not used, then such decisions are encoded in the B2A table in the - profile, and cannot be altered during linking).<br> + not used, then such decisions are already encoded in the B2A table + in the profile, and cannot be altered during linking).<br> <br> <a name="k"></a> -<b>k</b> parameter sets the target level of black (K) when creating a B2A CMYK output tables. This is often called a @@ -3175,6 +3267,9 @@ ICC + + + _______ enle<br> | @@ -3217,6 +3312,9 @@ ICC + + + /<br> | @@ -3259,6 +3357,9 @@ ICC + + + /<br> | @@ -3301,6 +3402,9 @@ ICC + + + /<br> | @@ -3343,6 +3447,9 @@ ICC + + + /<br> stle | ------/<br> @@ -3391,6 +3498,9 @@ White &nb + + + Black<br> <br> </tt>For minimum sensitivity of printed output to the lighting @@ -3591,6 +3701,9 @@ White &nb + + + </b>Full output offset with effective gamma of 2.2<b><br> </b><b></b><b>-I B</b><b> @@ -3603,6 +3716,9 @@ White &nb + + + </b>Full input offset (BT.1886 like) with technical gamma of 2.4. This exactly implements the BT.1886 specification.<b><br> </b><b>-I G</b> @@ -3616,6 +3732,9 @@ White &nb + + + Full output offset with technical gamma of 2.2<br> <br> <b>-I b</b><b>:2.3</b><b> @@ -3629,6 +3748,9 @@ White &nb + + + </b>Full input offset (BT.1886 like) with effective gamma of 2.3<b> <br> </b><b> -I g:2.3</b><b> @@ -3642,6 +3764,9 @@ White &nb + + + </b>Full output offset with effective gamma of 2.3<b><br> </b><b> -I B:2.35</b><b> @@ -3654,6 +3779,9 @@ White &nb + + + </b>Full input offset (BT.1886 like) with technical gamma of 2.35<br> <b> -I G:2.35</b> @@ -3666,6 +3794,9 @@ White &nb + + + Full output offset with technical gamma of 2.35<br> <br> <b>-I b</b><b>:0.4:2.3</b> @@ -3681,6 +3812,9 @@ White &nb + + + Same as above.<b><br> </b><b> -I B:0.4:2.35</b> 60% input offset, 40% output offset with technical gamma of 2.35 <b><br> @@ -3701,6 +3835,9 @@ White &nb + + + T @@ -3724,6 +3861,9 @@ White &nb + + + RGB (16-235)/255 "TV" levels, clip WTW [Input Only]<br> </span></small></span></small></span></small></span></small> @@ -3731,6 +3871,9 @@ White &nb + + + x @@ -3753,6 +3896,9 @@ White &nb + + + xvYCC Rec601 YCbCr Rec709 Prims. SD (16-235,240)/255 "TV" levels<br> @@ -3778,6 +3924,9 @@ White &nb + + + xvYCC Rec709 YCbCr Rec709 Prims. HD (16-235,240)/255 "TV" levels</span></small></span></small><br> <br> @@ -3793,10 +3942,10 @@ White &nb <br> The <b>-e T</b> option uses the same encoding as <b>-e t</b>, but rather than handling WTW (Whiter Than White, or out of range values) - using extrapolation, it clips them to the valid range. This can be - useful if you are dealing with source material that has WTW values, - but your TV or Video display clips these out of range values in a - way that alters the hue.<br> + using extrapolation, it clips them to the valid range by scaling + them, to preserve hue. This can be useful if you are dealing with + source material that has WTW values, but your TV or Video display + clips these out of range values in a way that alters the hue.<br> <br> <b><a name="E"></a></b>The <b>-E</b> <i>flag</i> applies a Video encoding to the output. The possible encoding are:<br> @@ -3825,6 +3974,9 @@ White &nb + + + normal RGB 0..1 full range levels (default)<br> t @@ -3849,6 +4001,9 @@ White &nb + + + RGB (16-235)/255 "TV" levels</span></small></span></small><small><span style="font-family: monospace;"><small><span style="font-family: monospace;"></span></small></span></small><br> @@ -3859,6 +4014,9 @@ White &nb + + + 6 @@ -3881,6 +4039,9 @@ White &nb + + + Rec601 YCbCr SD (16-235,240)/255 "TV" levels<br> 7 @@ -3905,6 +4066,9 @@ White &nb + + + Rec709 1125/60Hz YCbCr HD (16-235,240)/255 "TV" levels<br> 5 @@ -3929,6 +4093,9 @@ White &nb + + + Rec709 1250/50Hz YCbCr HD (16-235,240)/255 "TV" levels<br> 2 @@ -3953,6 +4120,9 @@ White &nb + + + Rec2020 YCbCr UHD (16-235,240)/255 "TV" levels<br> C @@ -3977,11 +4147,20 @@ White &nb + + + Rec2020 Constant Luminance YCbCr UHD (16-235,240)/255 "TV" levels</span></small></span></small><br> <small><span style="font-family: monospace;"><small><span style="font-family: monospace;"></span></small></span></small><br> - The <b>T</b> <br> + The <b>-e t</b> option assumes TV encoding range 16-235, and + preserves WTW (Whiter Than White, or out of range values) using + extrapolation, as long as per channel input and output curves are + disabled (see the <a href="#n">-n</a> option), which is + automatically the case if a <a href="#3">3dlut</a> output format is + selected.<br> + <br> <b><a name="P"></a></b>The <b>-P</b> option causes a diagnostic 3D <a href="File_Formats.html#X3DOM">X3DOM</a> plots to be created that illustrate the gamut mapping generated.<br> @@ -4039,7 +4218,27 @@ White &nb + + + Usage Scenarios</a> page.<br> + <h3>Discussion</h3> + The viewing condition parameter <b>m:</b> is a hack, intended to + address certain situations involving the use of papers containing + FWA/OBE brighteners when viewed in an environment that has a very + noticeably warmer white point than the paper itself under the + illuminant. While the white point will remain that of the paper, it + allows the mid-tones to be partially adapted to a warmer white + point, possibly reducing visual discrepancy. NOTE though, that this + viewing situation doesn't often arise in real world viewing of such + media, as such documents are typically viewed in isolation or + against a background of other pieces of the same paper. Note that it + is a trap to evaluate such FWA/OBE rich paper using standard + proofing viewing conditions, since they deliberately use a + spectrally flat grey surround, unnaturally emphasizing the white + point difference between FWA/OBE rich papers and spectrally flat + neutrals, something that isn't present in real world conditions. The + <b>pm</b> preset condition has mtaf value of 0.7, and Wxyz2 of D50.<br> <br> <br> <br> diff --git a/doc/colorchecker.jpg b/doc/colorchecker.jpg Binary files differindex 464dd11..464dd11 100644..100755 --- a/doc/colorchecker.jpg +++ b/doc/colorchecker.jpg diff --git a/doc/colprof.html b/doc/colprof.html index d5df56e..ac80c3b 100644..100755 --- a/doc/colprof.html +++ b/doc/colprof.html @@ -15,8 +15,8 @@ [ Note that currently, Monochrome and N-Color profiles are not supported. ]<br> <h3>Usage Summary</h3> - <tt><small>colprof [-<i>options</i>] inoutfile<br> - <a href="#v">-v</a> + <tt>colprof [-<i>options</i>] inoutfile<br> + <a href="#v">-v</a> @@ -54,21 +54,6 @@ - Verbose mode<br> - <a href="#A">-A "manufacturer"</a> Set the - manufacturer description string<br> - <a href="#M">-M "model"</a> - Set the model - description string<br> - <a href="#D">-D "description"</a> Set the - profile Description string (Default "<span - style="font-style: italic;">inoutfile</span>")<br> - <a href="#C">-C "copyright"</a> Set the - copyright string<br> - <a href="#Za">-Z tmnb </a> - Attributes: - Transparency, Matte, Negative, BlackAndWhite<br> - </small></tt><tt><small> <a href="colprof.html#Zi">-Z prsa</a> @@ -79,6 +64,30 @@ + Verbose mode<br> + <a href="#A">-A "manufacturer"</a> Set the + manufacturer description string<br> + <a href="#M">-M "model"</a> + Set the model + description string<br> + <a href="#D">-D "description"</a> Set the + profile Description string (Default "<span + style="font-style: italic;">inoutfile</span>")<br> + <a href="#C">-C "copyright"</a> Set the + copyright string<br> + <a href="#Za">-Z tmnb </a> + Attributes: + Transparency, Matte, Negative, BlackAndWhite<br> + </tt><tt> <a href="colprof.html#Zi">-Z prsa</a> + Default intent: + Perceptual, Rel. Colorimetric, Saturation, Abs. Colorimetric</tt><tt><br> + </tt><tt> </tt><tt> <a href="#q">-q lmhu</a> + Quality - Low, Medium (def), + High, Ultra<br> + <a href="#b">-b [lmhun]</a> + Low quality B2A table - or specific B2A quality or none for + input device<br> + <a href="#ni">-ni</a> @@ -96,16 +105,6 @@ - Default - intent: Perceptual, Rel. Colorimetric, Saturation, Abs. - Colorimetric</small></tt><tt><br> - </tt><tt> </tt><tt><small> <a href="#q">-q lmhu</a> - Quality - Low, - Medium (def), High, Ultra<br> - <a href="#b">-b [lmhun]</a> - Low quality B2A table - or specific B2A quality or none - for input device<br> - <a href="#ni">-ni</a> @@ -136,6 +135,12 @@ + Don't create input (Device) shaper + curves<br> + </tt><tt> <a href="#np">-np</a> + + Don't create input (Device) grid position curves</tt><tt><br> + </tt><tt> </tt><tt> <a href="#no">-no</a> @@ -143,12 +148,6 @@ - Don't create input (Device) shaper - curves<br> - </small></tt><tt><small> <a href="#np">-np</a> - - Don't create input (Device) grid position curves</small></tt><tt><br> - </tt><tt> </tt><tt><small> <a href="#no">-no</a> @@ -186,300 +185,59 @@ - Don't create output (PCS) shaper - curves<br> - </small></tt><tt><small> <a href="#nc">-nc</a> - - Don't put the input .ti3 data in the profile</small></tt><tt><br> - </tt><tt> </tt><tt><small> <a href="#k">-k zhxr</a> - Black Ink generation: z = - zero K,<br> - - - - - -h -= -0.5 -K -(def), -x -= - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - max K, r = ramp K<br> - <a href="#kp">-k p stle stpo enpo enle shape</a><br> - - - - - -stle: -K -level -at -White -0.0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.0<br> - + Don't create output (PCS) shaper + curves<br> + </tt><tt> <a href="#nc">-nc</a> + + Don't put the input .ti3 data in the profile</tt><tt><br> + </tt><tt> </tt><tt> <a href="#k">-k zhxr</a> + Black Ink generation: z = zero K,<br> + + h = 0.5 K (def), x = max + K, r = ramp K<br> + <a href="#kp">-k p stle stpo enpo enle shape</a><br> + + stle: K level at White 0.0 + - 1.0<br> + + stpo: start point of transition + Wh 0.0 - Bk 1.0<br> + + enpo: End point of transition + Wh 0.0 - Bk 1.0<br> + + enle: K level at Black 0.0 - + 1.0<br> + + shape: 1.0 = straight, 0.0-1.0 + concave, 1.0-2.0 convex<br> + <a href="#K">-K parameters</a> + Same as -k, but target is K locus rather than K value itself<br> + <a href="#l">-l <i>tlimit</i></a> + override CMYK total ink limit, 0 - 400% (default from + .ti3)<br> + <a href="#L">-L <i>klimit</i></a> + override black ink limit, 0 - 100% (default from + .ti3)<br> + <a href="#a">-a lxXgsmGS</a> + Algorithm type override<br> + + l = Lab cLUT (def.), x = XYZ + cLUT, X = display XYZ cLUT + matrix<br> + + g = gamma+matrix, s = + shaper+matrix, m = matrix only,<br> + + G = single gamma+matrix, S = + single shaper+matrix<br> + <a href="#u">-u</a> - -stpo: -start -point -of -transition -Wh - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0.0 - Bk 1.0<br> - - - - - - -enpo: -End -point -of -transition -Wh - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0.0 - Bk 1.0<br> - - - - - - -enle: -K -level -at -Black - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0.0 - 1.0<br> - - - - - - -shape: -1.0 -= -straight, -0.0-1.0 -concave, - - - - - - - - - - - - - - - - - - - - - - - - - @@ -492,8 +250,6 @@ concave, - 1.0-2.0 convex<br> - <a href="#K">-K parameters</a> @@ -521,95 +277,24 @@ concave, - - Same as -k, but target is K locus rather than K value itself<br> - <a href="#l">-l <i>tlimit</i></a> - override CMYK total ink limit, 0 - 400% - (default from .ti3)<br> - <a href="#L">-L <i>klimit</i></a> - override black ink limit, 0 - 100% (default - from .ti3)<br> - <a href="#a">-a lxXgsmGS</a> - Algorithm type override<br> - - - - - - -l -= -Lab -cLUT -(def.), - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - x = XYZ cLUT, X = display XYZ cLUT + matrix<br> - - - - - - -g -= -gamma+matrix, -s -= - - - - - - - - - - - - - - - - - - - + If input profile, auto scale WP to allow extrapolation</tt><br> + <tt><tt> <a href="colprof.html#ua">-ua</a> + + If input profile, force Absolute Colorimetric + intent</tt><br> + </tt><tt> </tt><tt> <a href="#uc">-uc</a> + + If input profile, clip cLUT values above WP<br> + </tt><tt><a href="#U">-U <span style="font-style: italic;">scale</span></a> + If input + profile, scale media white point by scale</tt><tt><br> + </tt><tt> </tt><tt> </tt><tt><a href="#R">-R</a></tt><tt> +Restrict +white +<= +1.0, +black +and @@ -628,19 +313,6 @@ s - shaper+matrix, m = matrix only,<br> - - - - - - -G -= -single -gamma+matrix, -S -= @@ -670,6 +342,8 @@ S + primaries to be +ve</tt><tt><br> + <a href="#B">-B X,Y,Z</a> @@ -678,14 +352,6 @@ S - single shaper+matrix<br> - <a href="#u">-u</a> - - - - - - @@ -700,6 +366,8 @@ S + Display Black Point override hack<br> + <a href="#V">-V demphasis</a> @@ -713,21 +381,6 @@ S - If input profile, auto scale WP to allow extrapolation</small></tt><tt><br> - </tt><tt> </tt><tt><small><small> <a href="#uc">-uc</a> - - If input profile, clip cLUT values above WP<br> - </small> </small></tt><tt><small><a href="#U">-U <span - style="font-style: italic;">scale</span></a> - If input - profile, scale media white point by scale</small></tt><tt><br> - </tt><tt> </tt><tt> </tt><tt><a href="#R">-R</a></tt><tt> -Restrict -white -<= -1.0, -black -and @@ -743,6 +396,12 @@ and + Degree of dark region cLUT grid emphasis 1.0-3.0 (default 1.00 = + none)<br> + </tt><tt> </tt><tt><a href="#f">-f [<i>illum</i>]</a> + Use Fluorescent + Whitening Agent compensation [opt. simulated inst. illum.:<br> + @@ -765,8 +424,6 @@ and - primaries to be +ve</tt><tt><br> - <a href="#B">-B X,Y,Z</a> @@ -779,11 +436,33 @@ and - Display Black Point override hack<br> - <a href="#V">-V demphasis</a> + M0, M1, M2, </tt><tt>A, C, D50 (def.), D50M2, D65, F5, F8, F10 or + file.sp ]</tt><tt><br> + </tt><tt> <a href="#i">-i <i>illum</i></a> + Choose illuminant for computation of CIE XYZ + from spectral data & FWA:<br> + + A, C, D50 (def.), D50M2, D65, + F5, F8, F10 or file.sp<br> + <a href="#o">-o <i>observ</i></a> + Choose CIE Observer for spectral data:<br> + + 1931_2 </tt><tt>(def.)</tt><tt>, + 1964_10, 2012_2, 2012_10, S&B 1955_2, shaw, J&V 1978_2 or + file.cmf<br> + <a href="#r">-r avgdev</a> + Average deviation of device+instrument readings as a percentage + (default 0.5%)<br> + <a href="#s">-s src.icm|cperc</a> Apply gamut mapping + to output profile perceptual B2A table for given source, or + compression percentage<br> + <a href="#S">-S src.icm|experc</a> Apply gamut mapping + to output profile perceptual and saturation B2A table, or + expansion percentage<br> + <a href="#nP">-nP</a> @@ -799,12 +478,6 @@ and - Degree of dark region cLUT grid emphasis 1.0-3.0 (default 1.00 = - none)<br> - </tt><tt> </tt><tt><small><small><a href="#f">-f [<i>illum</i>]</a> - Use Fluorescent - Whitening Agent compensation [opt. simulated inst. illum.:<br> - @@ -832,14 +505,14 @@ and - M0, M1, M2, </small></small></tt><tt><small><small><small>A, - C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp ]</small></small></small></tt><tt><br> - </tt><tt><small><small><small><small> <a href="#i">-i <i>illum</i></a> + Use colormetric source gamut to make output profile perceptual + table<br> + <a href="#nS">-nS</a> @@ -862,19 +535,6 @@ and - Choose illuminant for - computation of CIE XYZ from spectral data & FWA:<br> - - - - - - -A, -C, -D50 -(def.), -D50M2, @@ -900,12 +560,19 @@ D50M2, + Use colormetric source gamut to make output profile saturation + table<br> + <a href="#g">-g src.gam</a> + Use source image gamut + as well for output profile gamut mapping<br> + <a href="#p">-p aprof.icm,...</a> Incorporate + abstract profile(s) into output tables<br> + <a href="#t">-t intent</a> + Override gamut mapping + intent for output profile perceptual table:<br> + <a href="#T">-T intent</a> - D65, F5, F8, F10 or file.sp</small></small></small><br> - <a href="#o">-o <i>observ</i></a> - Choose CIE Observer for spectral data:<br> - @@ -943,18 +610,6 @@ D50M2, - 1931_2 </small></tt><tt><small>(def.)</small></tt><tt><small>, - 1964_10, S&B 1955_2, shaw, J&V 1978_2<br> - <a href="#r">-r avgdev</a> - Average deviation of device+instrument readings as - a percentage (default 0.5%)<br> - <a href="#s">-s src.icm|cperc</a> Apply gamut - mapping to output profile perceptual B2A table for given source, - or compression percentage<br> - <a href="#S">-S src.icm|experc</a> Apply gamut - mapping to output profile perceptual and saturation B2A table, - or expansion percentage<br> - <a href="#nP">-nP</a> @@ -963,6 +618,24 @@ D50M2, + Override gamut mapping intent for output profile saturation table:<br> + </tt><tt> + + a - Absolute Colorimetric (in Jab) [ICC Absolute Colorimetric]<br> + + aw - Absolute Colorimetric + (in Jab) with scaling to fit white point<br> + + aa - Absolute Appearance<br> + + r - White Point Matched Appearance + [ICC Relative Colorimetric]<br> + + la - Luminance matched Appearance<br> + + p - Perceptual (Preferred) [ICC + Perceptual]<br> + </tt><tt> @@ -992,9 +665,6 @@ D50M2, - Use colormetric source gamut to make output profile perceptual - table<br> - <a href="#nS">-nS</a> @@ -1013,6 +683,8 @@ D50M2, + pa - Perceptual Appearance</tt><br> + <tt><tt> @@ -1028,21 +700,19 @@ D50M2, + lp - Luminance Preserving Perceptual</tt><br> + </tt><tt> </tt><tt> + ms - Saturation<br> + + s - Enhanced Saturation [ICC + Saturation]<br> + + al - Absolute Colorimetric (Lab)</tt><tt><br> + - Use colormetric source gamut to make output profile saturation - table<br> - <a href="#g">-g src.gam</a> - Use source image - gamut as well for output profile gamut mapping<br> - <a href="#p">-p aprof.icm,...</a> Incorporate - abstract profile(s) into output tables<br> - <a href="#t">-t intent</a> - Override gamut - mapping intent for output profile perceptual table:<br> - <a href="#T">-T intent</a> @@ -1074,31 +744,14 @@ D50M2, + rl - White Point Matched Colorimetric (Lab)<br> + <a href="#c">-c viewcond</a> - Override gamut mapping intent for output profile saturation - table:<br> - </small></tt><tt><small> - - a - Absolute Colorimetric (in Jab) [ICC Absolute Colorimetric]<br> - - aw - Absolute Colorimetric - (in Jab) with scaling to fit white point<br> - - aa - Absolute Appearance<br> - - r - White Point Matched - Appearance [ICC Relative Colorimetric]<br> - - la - Luminance matched Appearance<br> - - p - Perceptual (Preferred) [ICC - Perceptual]<br> - </small></tt><tt><small> @@ -1136,15 +789,14 @@ D50M2, - pa - Perceptual Appearance</small></tt><br> - <tt><tt><small> + set input viewing conditions for output profile CIECAM02 gamut + mapping,<br> + - lp - Luminance Preserving Perceptual</small></tt><br> - </tt><tt> </tt><tt><small> @@ -1182,13 +834,6 @@ D50M2, - ms - Saturation<br> - - s - Enhanced Saturation [ICC - Saturation]<br> - - al - Absolute Colorimetric (Lab)</small></tt><tt><small><br> - @@ -1198,6 +843,8 @@ D50M2, + either an enumerated choice, or a parameter<br> + <a href="#d">-d viewcond</a> @@ -1214,8 +861,6 @@ D50M2, - rl - White Point Matched Colorimetric (Lab)<br> - <a href="#c">-c viewcond</a> @@ -1247,15 +892,15 @@ D50M2, + set output viewing conditions for output profile CIECAM02, gamut + mapping<br> + - set input viewing conditions for output profile CIECAM02 gamut - mapping,<br> - @@ -1293,12 +938,12 @@ D50M2, - either an enumerated choice, or a parameter<br> - <a href="#d">-d viewcond</a> + either an enumerated choice, or a parameter:value change<br> + @@ -1332,9 +977,6 @@ D50M2, - set output viewing conditions for output profile CIECAM02, gamut - mapping<br> - @@ -1349,6 +991,8 @@ D50M2, + Also sets out of gamut clipping CAM space.<br> + @@ -1372,8 +1016,6 @@ D50M2, - either an enumerated choice, or a parameter:value change<br> - @@ -1398,12 +1040,44 @@ D50M2, + Enumerated Viewing Conditions:<br> + </tt><tt> + </tt><tt><tt>pc - Critical print evaluation environment + (ISO-3664 P1)</tt><tt><br> + + </tt>pp - Practical Reflection Print (ISO-3664 P2)<br> + + pe - Print evaluation environment (CIE + 116-1995)<br> + </tt><tt> + pm - Print evaluation with partial Mid-tone + adapation</tt><tt><br> + </tt><tt> </tt><tt> + mt - Monitor in typical work environment<br> + + mb - Monitor in bright work environment<br> + + md - Monitor in darkened work environment<br> + + jm - Projector in dim environment<br> + + jd - Projector in dark environment<br> + + pcd - Photo CD - original scene outdoors<br> + + ob - Original scene - Bright Outdoors<br> + + cx - Cut Sheet Transparencies on a viewing box</tt><tt><br> + + s:surround n = auto, a = average, m = + dim, d = dark,<br> + @@ -1411,8 +1085,6 @@ D50M2, - Also sets out of gamut clipping CAM space.<br> - @@ -1450,40 +1122,35 @@ D50M2, - Enumerated Viewing Conditions:<br> - </small></tt><tt><small> - pp - Practical Reflection Print (ISO-3664 - P2)<br> - - pe - Print evaluation environment (CIE - 116-1995)<br> - </small></tt><tt><small> - pc - Critical print evaluation - environment (ISO-3664 P1)</small></tt><tt><br> - </tt><tt> </tt><tt><small> - mt - Monitor in typical work - environment<br> - - mb - Monitor in bright work environment<br> - - md - Monitor in darkened work environment<br> - - jm - Projector in dim environment<br> - - jd - Projector in dark environment<br> - - pcd - Photo CD - original scene outdoors<br> - - ob - Original scene - Bright Outdoors<br> - - cx - Cut Sheet Transparencies on a viewing box</small></tt><tt><small><br> - - s:surround n = auto, a = average, m = - dim, d = dark,<br> - + + c = transparency (default average)<br> + + + w:X:Y:Z Adapted white point as + XYZ (default media white)<br> + + + w:x:y Adapted + white point as x, y<br> + + a:adaptation Adaptatation + luminance in cd.m^2 (default 50.0)<br> + + b:background Background % of + image luminance (default 20)<br> + + l:imageewhite Image + white in cd.m^2 if surround = auto (default 250)</tt><br> + <tt><span style="font-family: monospace;"><span style="font-family: + monospace;"> + + f:flare Flare light % of + image luminance (default 0)<br> + </span> </span><span + style="font-family: monospace;"> @@ -1518,39 +1185,49 @@ D50M2, - - c = transparency (default average)<br> - - - w:X:Y:Z Adapted white point - as XYZ (default media white)<br> - - - w:x:y Adapted - white point as x, y<br> - - a:adaptation Adaptatation - luminance in cd.m^2 (default 50.0)<br> - - b:background Background % - of image luminance (default 20)<br> - - - l:imageewhite Image white in cd.m^2 if surround = auto - (default 250)</small></tt><br> - <tt><small><small><span style="font-family: monospace;"><small><span - style="font-family: monospace;"> - - - f:flare Flare light - % of image luminance (default 0)<br> - </span></small> + g:glare Glare light % of + ambient (default 5)</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> + + + g:X:Y:Z Glare color as XYZ + (default media white)</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> + + + g:x:y Glare + color as x, y<br> + </span></tt><tt><span style="font-family: monospace;"><tt><span + style="font-family: monospace;"><span style="font-family: + monospace;"> + + + h:hkscale Helmholtz-Kohlrausch + effect scale factor (default 1.0)<br> + </span> </span><span style="font-family: monospace;"> + m:mtaf Mid-tone + partial adaptation factor (default 0.0)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + + + m:X:Y:Z Mid-tone + Adaptation white as XYZ (default D50)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + + + m:x:y + Mid-tone Adaptation white as x, y</span></tt></span> <br> + <a href="#P">-P</a> + + @@ -1570,22 +1247,6 @@ D50M2, - g:glare Glare light % of - ambient (default 5)</span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> - - - g:X:Y:Z Glare color as - XYZ (default media white)</span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> - - - g:x:y Glare - color as x, y</span></small> <br> - <a href="#P">-P</a> - @@ -1613,6 +1274,9 @@ D50M2, + Create gamut gammap_p.x3d.html and gammap_s.x3d.html diagostics<br> + </tt><tt> <a href="#O">-O outputfile</a> +Override @@ -1623,9 +1287,6 @@ D50M2, - Create gamut gammap_p.x3d.html and gammap_s.x3d.html diagostics<br> - </small></tt><tt><small> <a href="#O">-O outputfile</a> -Override @@ -1663,10 +1324,10 @@ Override - the default output filename & extension.</small></tt><tt><br> - </tt><tt> </tt><tt><small> <a href="#p1"><i>inoutfile</i></a> - Base name for - input.ti3/output.icc file</small></tt><br> + the default output filename & extension.</tt><tt><br> + </tt><tt> </tt><tt> <a href="#p1"><i>inoutfile</i></a> + Base name for + input.ti3/output.icc file</tt><br> <h3>Options<br> </h3> <b><a name="v"></a>-v</b> Turn on verbose mode. Gives progress @@ -1824,6 +1485,16 @@ the + + + + + + + + + + device and CIE/spectral sample data and calibration curves used to create a profile is stored in the <span style="font-weight: bold;">'targ'</span> text tag in the resulting ICC profile. To suppress this and make the @@ -1864,6 +1535,16 @@ the + + + + + + + + + + </span>flag. <span style="font-weight: bold;">Note</span> that this will then preclude final calibrated device value ink limits from being computed for the resulting profile in subsequent use (ie. <a @@ -1939,6 +1620,16 @@ the + + + + + + + + + + | _______ enle<br> @@ -1979,6 +1670,16 @@ the + + + + + + + + + + | /<br> @@ -2018,6 +1719,16 @@ the + + + + + + + + + + | /<br> @@ -2057,6 +1768,16 @@ the + + + + + + + + + + | /<br> @@ -2096,6 +1817,16 @@ the + + + + + + + + + + | /<br> stle | ------/<br> @@ -2143,6 +1874,16 @@ White &nb + + + + + + + + + + Black<br> </tt> <br> For minimum sensitivity of printed output to the lighting spectrum, @@ -2261,19 +2002,28 @@ White &nb lut table. Using the <b>-u</b> flag causes the media white point to be automatically scaled (using the same type of scaling as the <span style="font-weight: bold;">-U scale</span> option) to avoid - clipping values up to full device white. This flag can be useful - when an input profile is needed for using a scanner as a "poor mans" - colorimeter, or if the white point of the test chart doesn't - represent the white points of media that will be used in practice, - and that white point adjustment will be done individually in some - downstream application.<br> + clipping values up to full device white, while still correcting the + hue. This flag can be useful when the white point of the test chart + doesn't represent the white points of media that will be used in + practice, and that white point adjustment will be done individually + in some downstream application.<br> + <br> + <a name="ua"></a> <span style="font-weight: bold;">-ua:</span> For + input profiles, this flag forces the effective intent to be Absolute + Colorimetric even when used with Relative Colorimetric intent + selection in a CMM, by setting a D50 white point tag. This + also has the effect of preserving the conversion of colors whiter + than the white patch of the test chart without clipping them + (similar to the <b>-u</b> flag), but does not hue correct white. + This flag can be useful when an input profile is needed for using a + scanner as a "poor mans" colorimeter.<br> <br> <a name="uc"></a> <span style="font-weight: bold;">-uc:</span> For input profiles it is sometimes desirable that any highlights - brighter than the white point, map exactly to white, and this option - post processes the cLUT entries to ensure this is the case. Note - that due to the finite nature of the cLUT grid, this may affect the - accuracy of colors near the light surface of the device gamut.<br> + brighter than the white point, map (clip) exactly to white, and this + option post processes the cLUT entries to ensure this is the case. + Note that due to the finite nature of the cLUT grid, this may affect + the accuracy of colors near the light surface of the device gamut.<br> <br> <a name="U"></a><span style="font-weight: bold;"> -U <span style="font-style: italic;">scale</span>:</span> Input profiles @@ -2406,6 +2156,16 @@ White &nb + + + + + + + + + + Violet</span> spectral content, otherwise FWA compensation won't work properly. This means you ideally need to measure your illuminant spectrum using an instrument that can measure down to @@ -2505,13 +2265,18 @@ White &nb <b> 1931_2</b> selects the standard CIE 1931 2 degree observer. The default.<br> <b>1964_10</b> selects the standard CIE 1964 10 degree - observer.<br> + observer<br> + <b> 2012_2</b> selects the proposed CIE 2012 2 degree observer<br> + <b>2012_10</b> selects the proposed CIE 2012 10 degree + observer<br> <b>1955_2</b> selects the Stiles and Birch 1955 2 degree observer<br> <b>1978_2 </b>selects the Judd and Voss 1978 2 degree observer<br> <b>shaw</b> selects the Shaw and Fairchild 1997 2 degree observer<br> + <i><b>file.cmf</b></i> selects an observer specified by the + given <a href="File_Formats.html#.cmf">.cmf</a> file.<br> <br> Note that if an observer other than 1931 2 degree is chosen, the resulting ICC profile will not be standard, and cannot be freely @@ -2566,7 +2331,7 @@ White &nb be compressed to fit into it. The same percentage is used for expansion if a saturation table is generated, or a separate percentage can be specified by including both a <b>-s</b> and <b>-S</b> - percentage. You can optionally specify <u>both</u> and input ICC + percentage. You can optionally specify <u>both</u> an input ICC profile and a general compression percentage by using the -S option twice, in which case the input profile determines just the luminance range mapping, with the percentage determining the gamut volume @@ -2596,6 +2361,14 @@ White &nb <b>Note</b> that an input, output, display or device colororspace profile should be specified, not a non-device colorspace, device link, abstract or named color profile.<br> + <b>Note</b> that specifying a very large gamut colorspace as the + source gamut (i.e. <b>ProPhoto</b> etc.) is probably <u><b>NOT</b></u> + what you want to do, since unless the source images have a similar + very large gamut to that of the colorspace, they will end up getting + over compressed and come out looking dull. Instead use a source + profile that has a gamut more representative of the images gamut, <b>or</b> + you should provide a gamut using the the <a href="#g">-g parameter</a>. + <br> <br> <a name="nP"></a><span style="font-weight: bold;">-nP</span>: Normally when a source profile is provided to define the source @@ -2740,7 +2513,11 @@ White &nb the resulting <a href="File_Formats.html#ICC">ICC</a> output profile (.icm extension on the MSWindows platform, .icc on Apple or Unix platforms). The <span style="font-weight: bold;">-O</span> - parameter will override this default. + parameter will override this default.<br> + <br> + For information on typical usage, see the <a + href="file:///Users/graeme/src/argyll/doc/Scenarios.html">Typical + Usage Scenarios</a> page. <h3><a name="Di"></a>Discussion</h3> Note that monochrome profiling isn't currently supported. It may be supported sometime in the future.<br> @@ -2781,6 +2558,23 @@ White &nb subsequent evaluation of ink limits can compute the final calibrated device values.<br> <br> + The viewing condition parameter <b>m:</b> is a hack, intended to + address certain situations involving the use of papers containing + FWA/OBE brighteners when viewed in an environment that has a very + noticeably warmer white point than the paper itself under the + illuminant. While the white point will remain that of the paper, it + allows the mid-tones to be partially adapted to a warmer white + point, possibly reducing visual discrepancy. NOTE though, that this + viewing situation doesn't often arise in real world viewing of such + media, as such documents are typically viewed in isolation or + against a background of other pieces of the same paper. Note that it + is a trap to evaluate such FWA/OBE rich paper using standard + proofing viewing conditions, since they deliberately use a + spectrally flat grey surround, unnaturally emphasizing the white + point difference between FWA/OBE rich papers and spectrally flat + neutrals, something that isn't present in real world conditions. The + <b>pm</b> preset condition has mtaf value of 0.7, and Wxyz2 of D50.<br> + <br> <br> <br> <br> diff --git a/doc/colverify.html b/doc/colverify.html index daebbdd..da37339 100644..100755 --- a/doc/colverify.html +++ b/doc/colverify.html @@ -20,6 +20,10 @@ -v [n] Verbose mode, n >= 2 print each value<br> + -l + + + Match patches by sample location rather than id<br> -n Normalise @@ -27,6 +31,9 @@ Normalise + + + each files reading to white Y<br> -N Normalise @@ -35,10 +42,19 @@ Normalise + + + each files reading to white XYZ<br> -m + + + Normalise each files reading to its white X+Y+Z<br> -M + + + Normalise both files reading to mean white XYZ<br> -D Use @@ -47,6 +63,9 @@ Use + + + D50 100.0 as L*a*b* white reference<br> -c @@ -55,12 +74,18 @@ Use + + + Show CIE94 delta E values<br> -k Show CIEDE2000 delta E values<br> -h + + + Plot a histogram of delta E's<br> -s Sort patch value by error<br> @@ -71,6 +96,9 @@ Use + + + create X3DOM vector visualisation (measured.x3d.html)<br> </small></tt><tt><small> -W @@ -83,6 +111,9 @@ Use + + + Use X3DOM axes<br> </small></tt><tt><small><small>-f [illum] Use Fluorescent @@ -93,6 +124,9 @@ Use + + + M0, M1, M2, A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp]<br> -i illum @@ -104,6 +138,9 @@ Use + + + A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp<br> -o observ Choose CIE Observer for spectral data:<br> @@ -113,9 +150,14 @@ Use - 1931_2 </small><small>(def.)</small><small>, 1964_10, S&B - 1955_2, shaw, J&V 1978_2<br> - -L profile.icm Skip any first file out of + + + + 1931_2 </small><small>(def.)</small><small>, 1964_10, </small></small></tt><tt><small><small><tt><small>2012_2, + + 2012_10, </small></tt>S&B 1955_2, shaw, J&V + 1978_2 or file.cmf<br> + -L profile.icm Skip any first file, out of profile gamut patches<br> -X file.ccmx Apply Colorimeter Correction Matrix to second file<br> @@ -130,6 +172,9 @@ Use The <b>-v</b> flag prints out extra information during the checking, and prints each patch value, rather than just a summary.<br> <br> + The <b>-l</b> flag makes colverify look for the SAMPLE_LOC fields + to match patches by, rather than the default SAMPLE_ID field.<br> + <br> The <b>-n</b> flag causes the two sets of values to be normalized to the Y value of white for each set before comparison. White is assumed to be the patch with the largest Y value.<br> @@ -216,12 +261,18 @@ Use observer. The default.<br> <b>1964_10</b> selects the standard CIE 1964 10 degree observer.<br> + <b> 2012_2</b> selects the proposed CIE 2012 2 degree + observer.<br> + <b>2012_10</b> selects the proposed CIE 2012 10 degree + observer.<br> <b>1955_2</b> selects the Stiles and Birch 1955 2 degree observer<br> <b>1978_2 </b>selects the Judd and Voss 1978 2 degree observer<br> <b>shaw</b> selects the Shaw and Fairchild 1997 2 degree observer<br> + <i><b>file.cmf</b></i> selects an observer specified by the + given <a href="File_Formats.html#.cmf">.cmf</a> file.<br> <br> The same parameter value should be used as was used during the creation of the profile.<br> diff --git a/doc/cube.jpg b/doc/cube.jpg Binary files differindex 929273c..929273c 100644..100755 --- a/doc/cube.jpg +++ b/doc/cube.jpg diff --git a/doc/dispcal.html b/doc/dispcal.html index ff96ff2..4a8e9c3 100644..100755 --- a/doc/dispcal.html +++ b/doc/dispcal.html @@ -70,6 +70,10 @@ + + + + Verbose mode<br>
</span></font><font size="-1"><span style="font-family:
@@ -137,6 +141,10 @@ for + + + + VideoLUT access.</span></font><br>
<font size="-1"><span style="font-family: monospace;"> <a
@@ -195,6 +203,10 @@ list + + + + 1)</span></font><br>
<span style="font-family: monospace;"> <a href="#dweb">-dweb[:port]</a> @@ -243,6 +255,10 @@ list + + + + Display via a web server at port (default 8080)</span><br>
<span style="font-family: monospace;"> <a href="#dmadvr">-dmadvr</a>
@@ -276,6 +292,10 @@ list + + + + [MSWin] Display via MadVR Video Renderer</span><br>
<tt> </tt><tt><a href="#dcc">-dcc[:n]</a> @@ -288,6 +308,10 @@ list + + + + </tt><tt>Display via n'th ChromeCast (default 1, ? for list)</tt><br
style="font-family: monospace;">
@@ -342,10 +366,14 @@ list + + + + listno</a><span style="font-family: monospace;">
- Set communication port from
- the following list (default 1)<br>
+ Choose instrument from the
+ following list (default 1)<br>
</span></small><font size="-1"><span style="font-family:
monospace;"> </span><a style="font-family: monospace;"
href="#r">-r</a><span style="font-family: monospace;">
@@ -420,6 +448,10 @@ list + + + + Fast ICC Profile Description string (Default "outfile")<br>
<a href="#u">-u</a> @@ -477,6 +509,10 @@ ICC + + + + profile VideoLUTs</span><span style="font-family: monospace;"></span><span
style="font-family: monospace;"></span><br style="font-family:
@@ -530,6 +566,10 @@ ICC + + + + Quality - Low, Medium (def), High<br>
<a href="#p">-p</a> @@ -568,6 +608,10 @@ ICC + + + + Use telephoto mode (ie. for a projector) (if available)<br>
</span></font><font size="-1"><span style="font-family:
@@ -619,6 +663,10 @@ ICC + + + + Display type - instrument specific list to choose from.</span></font><font
size="-1"><span style="font-family: monospace;"><br
@@ -680,6 +728,10 @@ in + + + + deg. K (deflt.)<br>
</span></font><font size="-1"><span style="font-family:
@@ -739,6 +791,10 @@ temperaturee + + + + in deg. K</span></font><br style="font-family: monospace;">
<font size="-1"><span style="font-family: monospace;"></span><span
@@ -791,6 +847,10 @@ temperaturee + + + + Set the target white point as chromaticity coordinates</span><br
style="font-family: monospace;">
@@ -843,6 +903,10 @@ temperaturee + + + + Set the target white brightness in cd/m^2</span><br
style="font-family: monospace;">
@@ -895,6 +959,10 @@ temperaturee + + + + Set the target response curve gamma (Def. 2.4)</span><br
style="font-family: monospace;">
@@ -945,6 +1013,10 @@ temperaturee + + + + Use "-gl" for L*a*b* curve</span><br style="font-family:
monospace;">
@@ -995,6 +1067,10 @@ temperaturee + + + + Use "-gs" for sRGB curve<br>
@@ -1052,6 +1128,10 @@ use + + + + -a as well!)<br>
@@ -1101,6 +1181,10 @@ use + + + + Use "-g240" for SMPTE 240M curve </span></font><font size="-1"><span
style="font-family: monospace;">(should use -a as well!)</span></font><br>
@@ -1151,6 +1235,10 @@ use + + + + Use "-G2.4 -f0" for BT.1886</span></font> @@ -1192,6 +1280,10 @@ use + + + + <br>
<font size="-1"><span style="font-family: monospace;"> </span><a
@@ -1254,6 +1346,10 @@ output + + + + offset (default all output offset)<br>
<a href="#a">-a ambient</a> @@ -1303,6 +1399,10 @@ output + + + + Use viewing condition adjustment for ambient in Lux<br>
</span></font><font size="-1"><span style="font-family:
@@ -1322,6 +1422,10 @@ output + + + + Use forced black point hack<br>
</span></font> <font size="-1"><span style="font-family:
@@ -1373,6 +1477,10 @@ output + + + + Set the target black brightness in cd/m^2</span></font><br
style="font-family: monospace;">
@@ -1426,6 +1534,10 @@ output + + + + Run n verify passes on final curves<br>
</span></font><font size="-1"><span style="font-family:
@@ -1479,6 +1591,10 @@ output + + + + Run only verify pass on installed calibration curves</span></font><br
style="font-family: monospace;">
@@ -1541,6 +1657,10 @@ center, + + + + = right/bottom etc.</span><br style="font-family: monospace;">
<span style="font-family: monospace;"> @@ -1598,6 +1718,10 @@ normal, + + + + = double etc.<br>
</span></font><font size="-1"><span style="font-family:
@@ -1635,6 +1759,10 @@ normal, + + + + ss,vs: = optional horizontal, vertical scale.</span></font><br>
<font size="-1"><span style="font-family: monospace;"> <a
@@ -1686,6 +1814,10 @@ normal, + + + + Fill whole screen with black background</span></font><font
size="-1"><span style="font-family: monospace;"></span></font><br>
@@ -1717,6 +1849,10 @@ normal, + + + + </span></font><small><span style="font-family: monospace;">Video
encode output as (16-235)/255 "TV" levels</span></small><br
@@ -1779,6 +1915,10 @@ on + + + + test window<br>
</span></font><font size="-1"><span style="font-family:
@@ -1834,6 +1974,10 @@ on + + + + Disable initial calibration of instrument if possible</span></font><br>
<font size="-1"><span style="font-family: monospace;"> </span><a
@@ -1893,6 +2037,10 @@ on + + + + Apply Colorimeter Correction Matrix</span></font><br>
<span style="font-family: monospace;"> <a href="#X2">-X
@@ -1946,6 +2094,10 @@ Calibration + + + + Spectral Samples for calibration</span><font size="-1"><span
style="font-family: monospace;"><br>
@@ -2001,11 +2153,18 @@ Calibration + + + + 1931_2 </span></small><small><span
style="font-family: monospace;">(def.)</span></small><small><span
- style="font-family: monospace;">, 1964_10, S&B 1955_2, shaw,
- J&V 1978_2, 1964_10c<br>
+ style="font-family: monospace;">, 1964_10, </span></small><small><span
+ style="font-family: monospace;"><tt><small>2012_2, 2012_10, </small></tt>S&B + +
+ 1955_2, shaw, J&V 1978_2, 1964_10c or file.cmf<br>
<a href="#I">-I b|w</a> @@ -2053,6 +2212,10 @@ Calibration + + + + Drift compensation, Black: -Ib, White: -Iw, Both: -Ibw</span></small><br>
<small><span style="font-family: monospace;"><tt> <a href="#YR">-Y @@ -2071,6 +2234,10 @@ Calibration + + + + R:<i>rate</i></a> @@ -2088,6 +2255,10 @@ Calibration + + + + Override measured refresh rate with rate Hz<br>
</tt> </span></small><font size="-1"><span
@@ -2173,6 +2344,10 @@ none, + + + + h = HW, x = Xon/Xoff</span></font><font size="-1"><span
style="font-family: monospace;"></span></font><br>
@@ -2226,6 +2401,10 @@ none, + + + + Print debug diagnostics to stderr</span></font><br
style="font-family: monospace;">
@@ -2279,6 +2458,10 @@ none, + + + + </span><span style="font-family: monospace;">Base name for created
or updated </span></font><font size="-1"><a style="font-family:
@@ -2399,6 +2582,10 @@ none, + + + + 1,2</span> . Some experimentation may be needed using <a
href="dispwin.html">dispwin</a> on such systems, to discover what
@@ -2456,6 +2643,10 @@ none, falls back to the Default receiver (see <a href="Installing.html">installation + + + + instructions</a> for your platform).<br>
<br>
@@ -2714,6 +2905,10 @@ Set + + + + the target response curve gamma. This is normally an exponential
curve (output = input ^gamma), and defaults to 2.4 on MSWindows and
@@ -2770,6 +2965,10 @@ the + + + + L* curve, which is the response of the CIE L*a*b* perceptual
colorspace (<span style="font-weight: bold;">-gl</span>). the REC
@@ -2877,6 +3076,10 @@ As + + + + explained above, the gamma value provided to the <span
style="font-weight: bold;">-g</span> option is used to set and
@@ -3018,6 +3221,10 @@ If + + + + the black point is not being set completely to the same hue as the
white point (ie. because the <span style="font-weight: bold;">-k</span>
@@ -3178,7 +3385,9 @@ If information (ie. the X-Rite <span style="font-weight: bold;">i1d3</span>,
or the DataColor <span style="font-weight: bold;">Spyder4 &
Spyder 5</span>).This can improve a colorimeters accuracy for a
- particular type of display.<br>
+ particular type of display. A list of contributed <span
+ style="font-weight: bold;">ccss</span> files is <a
+ href="ccsss.html">here</a>.<br>
<br>
<a name="Q"></a> The <b>-Q</b> flag allows specifying a tristimulus
observer, and is used to compute PCS (Profile Connection Space)
@@ -3187,7 +3396,10 @@ If <b> 1931_2</b> selects the standard CIE 1931 2 degree
observer. The default.<br>
<b>1964_10</b> selects the standard CIE 1964 10 degree
- observer.<br>
+ observer<br>
+ <b> 2012_2</b> selects the proposed CIE 2012 2 degree observer<br>
+ <b>2012_10</b> selects the proposed CIE 2012 10 degree
+ observer<br>
<b>1955_2</b> selects the Stiles and Birch 1955 2 degree
observer<br>
<b>1978_2 </b>selects the Judd and Voss 1978 2 degree
@@ -3197,6 +3409,8 @@ If <b>1964_10c</b> selects a version of the CIE 1964 10 degree
observer that has been adjusted using a 3x3 matrix to better agree
with the 1931 2 degree observer.<br>
+ <i><b>file.cmf</b></i> selects an observer specified by the
+ given <a href="File_Formats.html#.cmf">.cmf</a> file.<br>
<br>
<span style="font-weight: bold;">NOTE</span> that if you select
anything other than the default 1931 2 degree observer, that the Y
diff --git a/doc/dispprofloc.html b/doc/dispprofloc.html index 668ed16..668ed16 100644..100755 --- a/doc/dispprofloc.html +++ b/doc/dispprofloc.html diff --git a/doc/dispread.html b/doc/dispread.html index 12077eb..eb13011 100644..100755 --- a/doc/dispread.html +++ b/doc/dispread.html @@ -54,6 +54,9 @@ + + + Verbose mode<br>
</small><font size="-1"><a style="font-family: monospace;"
@@ -106,6 +109,9 @@ m + + + for VideoLUT access.</span></font><br>
<font size="-1"><span style="font-family: monospace;"> <a
@@ -150,6 +156,9 @@ list + + + (default 1)</span></font><small style="font-family: monospace;"><br>
</small><span style="font-family: monospace;"> <a href="#dweb">-dweb[:port]</a> @@ -188,6 +197,9 @@ list + + + Display via a web server at port (default 8080)</span><br>
<span style="font-family: monospace;"> <a href="#dmadvr">-dmadvr</a>
@@ -214,6 +226,9 @@ list + + + [MSWin] Display via MadVR Video Renderer</span><br>
<tt> </tt><tt><a href="#dcc">-dcc[:n]</a> @@ -222,6 +237,9 @@ list + + + </tt><tt>Display via n'th ChromeCast (default 1, ? for list)</tt><br>
<small style="font-family: monospace;"> <span style="font-family:
@@ -264,6 +282,9 @@ list + + + Use telephoto mode (ie. for a projector) (if available)</span></font><br>
<font size="-1"><span style="font-family: monospace;"><a
@@ -304,6 +325,9 @@ Display + + + type - instrument specific list to choose from.</span></font><br>
<small style="font-family: monospace;"> <span
@@ -342,6 +366,9 @@ Display + + + Load calibration file into display while reading<br>
</small><small style="font-family: monospace;"> <span
@@ -381,6 +408,9 @@ Apply + + + calibration file to test values while reading</small><br>
<tt> <a href="#V">-V</a> @@ -398,6 +428,9 @@ Apply + + + [MSWin] Enable MadVR color management (3dLut)</tt><br>
<small style="font-family: monospace;"> <a href="#s">-s</a> @@ -434,6 +467,9 @@ Apply + + + Save spectral information (default don't
save)<br>
@@ -481,6 +517,9 @@ center, + + + 1.0 = right/bottom etc.<br>
@@ -524,6 +563,9 @@ normal, + + + 2.0 = double etc.<br>
</font><font size="-1"><span style="font-family: monospace;"> @@ -553,6 +595,9 @@ normal, + + + ss,vs: = optional horizontal, vertical scale.</span></font><br>
<font style="font-family: monospace;" size="-1"> </font><font
@@ -591,6 +636,9 @@ normal, + + + Fill whole screen with black background</span></font><br>
<font size="-1"><span style="font-family: monospace;"> </span></font><font
@@ -614,6 +662,9 @@ normal, + + + </span></font><small><span style="font-family: monospace;">Video
encode output as (16-235)/255 "TV" levels</span></small><br>
@@ -638,6 +689,9 @@ normal, + + + </span></font><small><span style="font-family: monospace;">Quantize test @@ -658,6 +712,9 @@ fit + + + in nbits</span></small><br style="font-family: monospace;">
<small style="font-family: monospace;"> <span
@@ -702,6 +759,9 @@ redirect + + + on test window<br>
</small><small style="font-family: monospace;"> <a href="#J">-J</a>
@@ -739,6 +799,9 @@ redirect + + + Run calibration first</small><br>
<font size="-1"><span style="font-family: monospace;"> <a
@@ -776,6 +839,9 @@ redirect + + + Disable initial calibration of instrument if possible<br>
</span></font><font size="-1"><span style="font-family:
@@ -828,6 +894,9 @@ Y + + + 100</span></font><small><span style="font-family: monospace;"></span></small><br>
<font size="-1"><span style="font-family: monospace;"><a
@@ -865,6 +934,9 @@ Y + + + Apply Colorimeter Correction Matrix</span></font><br>
<span style="font-family: monospace;"> <a href="#X2">-X
@@ -905,6 +977,9 @@ Calibration + + + Spectral Samples for calibration</span><font size="-1"><span
style="font-family: monospace;"><br>
@@ -947,11 +1022,16 @@ Calibration + + + 1931_2 </span></small><small><span
style="font-family: monospace;">(def.)</span></small><small><span
- style="font-family: monospace;">, 1964_10, S&B 1955_2, shaw,
- J&V 1978_2, 1964_10c</span></small><br>
+ style="font-family: monospace;">, 1964_10, </span></small><small><span
+ style="font-family: monospace;"><tt><small>2012_2, 2012_10, </small></tt>S&B +
+ 1955_2, shaw, J&V 1978_2, 1964_10c or file.cmf</span></small><br>
<small><span style="font-family: monospace;"> <a
href="dispread.html#I">-I b|w</a> Drift @@ -994,6 +1074,9 @@ Both: + + + -Ibw</span></small><br>
<small><span style="font-family: monospace;"><tt> <a href="#YR">-Y @@ -1008,6 +1091,9 @@ Both: + + + R:<i>rate</i></a> @@ -1021,6 +1107,9 @@ Both: + + + Override measured refresh rate with rate Hz<br>
</tt> </span></small><font size="-1"><span
@@ -1052,6 +1141,9 @@ Both: + + + Use non-adaptive integration time mode (if available).</span></font><br>
<font size="-1"><span style="font-family: monospace;"> </span><a
@@ -1073,9 +1165,11 @@ Both: "command" each time a color is measured</span></font><br>
<small> <a style="font-family: monospace;" href="#x">-x x</a><span
style="font-family: monospace;"> -Take
- manually entered
- XYZ values</span></small><br>
+Take + + +
+ manually entered XYZ values</span></small><br>
<font size="-1"><span style="font-family: monospace;"> <a
href="#W">-W n|h|x</a> Override @@ -1118,6 +1212,9 @@ n + + + none, h = HW, x = Xon/Xoff</span></font><br>
<small style="font-family: monospace;"> <a href="#D">-D [level]</a>
@@ -1157,6 +1254,9 @@ n + + + Base name for input[<a href="File_Formats.html#.ti1">.ti1</a>]/output[<a
href="File_Formats.html#.ti3">.ti3</a>] file.<br>
@@ -1258,6 +1358,9 @@ n + + + 1,2</span> . Some experimentation may be needed using <a
href="dispwin.html">dispwin</a> on such systems, to discover what
@@ -1301,8 +1404,7 @@ n running dispread, and that while you can adjust the "Test Pattern
Configuration" controls, you should <u>not</u> normally alter the
"Existing Calibration" controls, as dispread will set these
- appropriately. See also <tt><a
- href="dispread.html#V">-V</a> flag.</tt><br>
+ appropriately. See also <tt><a href="dispread.html#V">-V</a> flag.</tt><br>
<br>
<a name="dcc"></a><span style="font-weight: bold;">-dcc</span> or <b>-dcc:<i>no</i></b>
causes test patches to be displayed using and available <a
@@ -1317,6 +1419,9 @@ n + + + instructions</a> for your platform).<br>
<br>
@@ -1529,7 +1634,9 @@ n information (ie. the X-Rite <span style="font-weight: bold;">i1d3</span>,
or the DataColor <span style="font-weight: bold;">Spyder4 &
Spyder 5</span>).This can improve a colorimeters accuracy for a
- particular type of display.<br>
+ particular type of display. A list of contributed <span
+ style="font-weight: bold;">ccss</span> files is <a
+ href="ccsss.html">here</a>.<br>
<br>
<a name="Q"></a> The <b>-Q</b> flag allows specifying a tristimulus
observer, and is used to compute PCS (Profile Connection Space)
@@ -1539,6 +1646,9 @@ n observer. The default.<br>
<b>1964_10</b> selects the standard CIE 1964 10 degree
observer.<br>
+ <b> 2012_2</b> selects the proposed CIE 2012 2 degree observer<br>
+ <b>2012_10</b> selects the proposed CIE 2012 10 degree
+ observer<br>
<b>1955_2</b> selects the Stiles and Birch 1955 2 degree
observer<br>
<b>1978_2 </b>selects the Judd and Voss 1978 2 degree
@@ -1548,6 +1658,8 @@ n <b>1964_10c</b> selects a version of the CIE 1964 10 degree
observer that has been adjusted using a 3x3 matrix to better agree
with the 1931 2 degree observer.<br>
+ <i><b>file.cmf</b></i> selects an observer specified
+ by the given <a href="File_Formats.html#.cmf">.cmf</a> file.<br>
<br>
<span style="font-weight: bold;">NOTE</span> that if you select
anything other than the default 1931 2 degree observer, that the Y
diff --git a/doc/dispwin.html b/doc/dispwin.html index 05db989..f3ae843 100644..100755 --- a/doc/dispwin.html +++ b/doc/dispwin.html @@ -51,6 +51,11 @@ Verbose + + + + + mode<br>
</span></font><font size="-1"><span style="font-family:
@@ -81,6 +86,11 @@ optionally + + + + + choose a different display m for Video LUT access.<br>
</span></font><font size="-1"><span style="font-family:
@@ -102,6 +112,11 @@ X11] + + + + + Choose the display from the following list (default 1)<br>
</span></font><span style="font-family: monospace;"> <a
@@ -119,6 +134,11 @@ X11] + + + + + Display via a web server at port (default 8080)</span><br>
<span style="font-family: monospace;"> <a
@@ -128,6 +148,11 @@ X11] <tt> </tt><tt><a href="#dcc">-dcc[:n]</a> + + + + + </tt><tt></tt><tt>Display via n'th ChromeCast (default 1, ? for
list)</tt><br style="font-family: monospace;">
@@ -153,6 +178,11 @@ ho,vi: + + + + + = left/top, 0.5 = center, 1.0 = right/bottom etc.</span><br
style="font-family: monospace;">
@@ -174,6 +204,11 @@ ss: + + + + + = half, 1.0 = normal, 2.0 = double etc.<br>
@@ -188,6 +223,11 @@ ss: + + + + + ss,vs: = optional horizontal, vertical scale.<br>
</span></font><font size="-1"><span style="font-family:
@@ -210,6 +250,11 @@ whole + + + + + screen with black background</span></font><br>
<font size="-1"><span style="font-family: monospace;"> </span></font><font
@@ -221,6 +266,11 @@ whole + + + + + </span></font><small><span style="font-family: monospace;">Video
encode output as (16-235)/255 "TV" levels</span></small><br
@@ -258,6 +308,11 @@ just + + + + + video LUT loading & Beeps<br>
</span></font><font size="-1"><span style="font-family:
@@ -280,6 +335,11 @@ native + + + + + display values (rather than through Video LUT and C.M.)<br>
<a href="#s">-s <span style="font-style: italic;">filename.cal</span></a> @@ -300,6 +360,11 @@ the + + + + + currently loaded Video LUT to 'filename'<br>
</span></font><font size="-1"><span style="font-family:
@@ -322,6 +387,11 @@ a + + + + + linear display calibration (clear calibration)</span></font><font
size="-1"><span style="font-family: monospace;"><br>
@@ -345,6 +415,11 @@ that + + + + + calfile/profile cal. is currently loaded in LUT<br>
</span></font><font size="-1"><span style="font-family:
@@ -365,9 +440,14 @@ that + + + + + </span></font><font size="-1"><span style="font-family:
- monospace;">Install profile for display and use it's calibration<br>
+ monospace;">Install profile for display and use its calibration<br>
</span></font><font size="-1"><span style="font-family:
monospace;"> <a href="#U">-U</a>
@@ -386,6 +466,11 @@ that + + + + + </span></font><font size="-1"><span style="font-family:
monospace;">Un-install profile for display<br>
@@ -407,6 +492,11 @@ the + + + + + install/uninstall scope for OS X [nlu] or Vista [lu]<br>
@@ -427,6 +517,11 @@ is + + + + + one of: n = network, l = local system, u = user (default)<br>
</span></font><font size="-1"><span style="font-family:
@@ -448,6 +543,11 @@ is + + + + + </span></font><font size="-1"><span style="font-family:
monospace;">Load installed profiles cal. into Video LUT<br>
@@ -469,6 +569,11 @@ is + + + + + [<span style="font-weight: bold;">X11 only</span>] Run in daemon
loader mode for given X11 server <br>
@@ -492,6 +597,11 @@ debug + + + + + diagnostics to stderr</span></font><font size="-1"><span
style="font-family: monospace;"></span></font><font size="-1"><span
@@ -518,6 +628,11 @@ display + + + + + calibration (<a href="cal_format.html">.cal</a> or .icm) into
LUT, and exit.</span><span style="font-family: monospace;"></span><span
@@ -572,6 +687,22 @@ display 256 entries per color component, so the Visual generally needs to be
24 bits, 8 bits per color component.<br>
<br>
+ More modern X11 systems support the XRANDR extension, which handles
+ multiple displays much more gracefully, but note that there are
+ limitations in profiling and calibrating Mirrored or Cloned
+ Displays. Mirrored displays share the same frame buffer space
+ (Separate CRTC's with overlapping pixel locations) but can have
+ different calibration curves, while Cloned displays share both frame
+ buffer space and calibration curves (A single CRTC feeding multiple
+ Outputs). <b>dispwin</b> will show different display selections for
+ each output, but calibration or application of color management may
+ only be correct for the last set display (i.e. if frame buffer space
+ overlaps, or there is only a single CRTC to hold calibration curves,
+ and a single _ICC_PROFILE_xxx root atom holding the profile, if the
+ application is using the Xinerama convention for obtaining a
+ profile, rather than the Xrandr per Output property _ICC_PROFILE
+ convention.) <br>
+ <br>
<a name="dnm"></a><span style="font-weight: bold;">-d n[,m]</span>Because of the @@ -590,6 +721,11 @@ the + + + + + difficulty cause by TwinView and MergedFB in X11 based systems, you
can optionally specify a separate display number after the display
@@ -645,6 +781,11 @@ the but should be accurate within ± 1 bit. You may have to modify any
firewall to permit port 8081 to be accessed on your machine if it
falls back to the Default receiver (see <a href="Installing.html">installation + + + + + instructions</a> for your platform).<br>
<br>
@@ -745,22 +886,32 @@ the profile specified as the final argument will be installed as the
default operating system profile for the chosen display, and the
display calibration will be set to the calibration tag ('vcgt' tag,
- if any) in that profile.. On MSWindows and OS X this means that the
+ if any) in that profile. On MSWindows and OS X this means that the
profile will be copied to the appropriate color profile directory
- and registered with the operating system. For Linux X11 systems, the
- profile will be installed using the <a href="ucmm.html">ucmm</a>
- convention, and the X11 _ICC_PROFILE property in the root window,
- and also the the XrandR 1.2 X11 _ICC_PROFILE output property on
- systems that are running XrandR 1.2 or later. The latter is
- following this <a
+ and registered with the operating system. <br>
+ <br>
+ For Linux X11 systems, the profile will be installed using <span style="white-space: pre;"> using </span>the + + + +
+ <a href="ucmm.html">ucmm</a> convention by default, and this
+ associates the display hardware identification (EDID) of the
+ selected display, with the profile. The X11 _ICC_PROFILE property
+ will be set in the root window, and also the the XrandR 1.2 X11
+ _ICC_PROFILE output property on systems that are running XrandR 1.2
+ or later. The use of atoms is following this <a
href="http://www.burtonini.com/computing/x-icc-profiles-spec-0.2.html">convention</a>
for allowing applications to locate the display profile for a
particular X11 display, and expands it to accomodate XrandR 1.2.
Note that for X11 systems, the properties are not persistent, and
will need to be loaded each time the X11 server is started (see the
- <a href="#L">-L</a> flag). To make sure that the profile calbration
- 'vcgt' tag gets loaded into the Graphics Card at system start,
- please read the guide <a href="dispprofloc.html">here</a>.<br>
+ <a href="#L">-L</a> flag).<br>
+ <br>
+ If the <b>ARGYLL_USE_COLORD</b> environment variable is set (ie.
+ set it to "yes"), then on Gnome systems running <b>colord</b><span style="white-space: pre;">, dispwin will attempt to store and retrieve display ICC profiles using<br>colord.<br><br></span>
+ To make sure that the profile calbration 'vcgt' tag gets loaded into
+ the Graphics Card at system start, please read the guide <a href="dispprofloc.html">here</a>.<br>
<br>
<a name="U"></a><span style="font-weight: bold;">-U</span>: The ICC
profile specified as the final argument will be un-installed as the
@@ -770,15 +921,12 @@ the <a name="S"></a><span style="font-weight: bold;">-S</span> d: Some
systems have more than one profile scope that an installed profile
will apply to, and this parameter allows overriding the default user
- scope. On OS X, there is a choice of three scopes: <span
- style="font-weight: bold;">n</span>: for network scope, if people
+ scope. On OS X, there is a choice of three scopes: <span style="font-weight: bold;">n</span>: for network scope, if people
are sharing profiles over a network, <span style="font-weight:
bold;">l</span>: local system scope, which installs the profile
- for all users of a system, and the default <span
- style="font-weight: bold;">u</span>, which covers just the user
+ for all users of a system, and the default <span style="font-weight: bold;">u</span>, which covers just the user
installing the profile. On Linux or Microsoft Vista, just the local
- system <span style="font-weight: bold;">l</span> and user <span
- style="font-weight: bold;">u</span> scope are available. Note that
+ system <span style="font-weight: bold;">l</span> and user <span style="font-weight: bold;">u</span> scope are available. Note that
you may need to run dispwin with elevated privileges(sudo) to be
able to successfully use network or local system scope. This option
also applies to uninstalling a profile. Note that to install a user
@@ -799,8 +947,7 @@ the in monitors that may require loading a matching ICC profile (ie.
such as re-configuring, plugging in a different monitor etc.)
This only works if XRandR 1.2 is available on the server. By default
- dispwin runs silently, and will not terminate. If the <span
- style="font-weight: bold;">-v</span> option is given, it will emit
+ dispwin runs silently, and will not terminate. If the <span style="font-weight: bold;">-v</span> option is given, it will emit
messages to stdout to show what it is doing. When it is first
invoked, it will load the installed profiles of all the screens of
the given X11 server.<br>
@@ -811,17 +958,14 @@ the tracking down why an operation fails.<br>
<br>
<a name="p1"></a> The final optional parameter on the command line
- is the name of an ICC profile that contains a Video LUT <span
- style="font-weight: bold;">vcgt</span> tag, or an Argyll <a
- href="cal_format.html">.cal</a> format display calibration. If
+ is the name of an ICC profile that contains a Video LUT <span style="font-weight: bold;">vcgt</span> tag, or an Argyll <a href="cal_format.html">.cal</a> format display calibration. If
this parameter is provided, then the selected display will be loaded
with the given calibration. If the <span style="font-weight: bold;">-V</span>
flag was given, then it is verified that this calibration is the
currently loaded one. This may be useful in initializing a
system to the current calibration on system startup, although a
better way may be to install the profile (<span style="font-weight:
- bold;">-I</span> option), and then just use <span
- style="font-weight: bold;">-L</span>. Note that the vcgt tag
+ bold;">-I</span> option), and then just use <span style="font-weight: bold;">-L</span>. Note that the vcgt tag
interpretation within Argyll is consistent with that of the
originators of the tag. Other ICC profile vcgt implementations may
not be so consistent.<br>
@@ -842,5 +986,6 @@ the <br>
<br>
<br>
- </body>
-</html>
+
+
+</body></html>
\ No newline at end of file diff --git a/doc/evalInputTargets.html b/doc/evalInputTargets.html index 91a38f1..91a38f1 100644..100755 --- a/doc/evalInputTargets.html +++ b/doc/evalInputTargets.html diff --git a/doc/extracticc.html b/doc/extracticc.html index 73e572b..73e572b 100644..100755 --- a/doc/extracticc.html +++ b/doc/extracticc.html diff --git a/doc/extractttag.html b/doc/extractttag.html index 90174b4..90174b4 100644..100755 --- a/doc/extractttag.html +++ b/doc/extractttag.html diff --git a/doc/fakeCMY.html b/doc/fakeCMY.html index 3122073..3122073 100644..100755 --- a/doc/fakeCMY.html +++ b/doc/fakeCMY.html diff --git a/doc/fakeread.html b/doc/fakeread.html index e8c353e..0caa1c5 100644..100755 --- a/doc/fakeread.html +++ b/doc/fakeread.html @@ -37,6 +37,8 @@ + + </span><i style="font-family: monospace;">inoutfile</i></small><small><span style="font-family: monospace;"><br> -v @@ -50,42 +52,56 @@ + + normal 0..1 full range RGB levels (default)<br> t + + (16-235)/255 "TV" RGB levels<br> 6 + + Rec601 YCbCr SD (16-235,240)/255 "TV" levels<br> 7 + + Rec709 1125/60Hz YCbCr HD (16-235,240)/255 "TV" levels<br> 5 + + Rec709 1250/50Hz YCbCr HD (16-235,240)/255 "TV" levels<br> 2 + + Rec2020 YCbCr UHD (16-235,240)/255 "TV" levels<br> C + + Rec2020 Constant Luminance YCbCr UHD (16-235,240)/255 "TV" levels<br> -p <i>separation.icm</i> Use device link separation @@ -100,6 +116,8 @@ + + Apply calibration (include in .ti3 output)<br> -i <i>file.cal</i> Include calibration in .ti3 output, but don't apply it<br> @@ -131,11 +149,15 @@ + + Output Lab rather than XYZ<br> -s + + Lookup </span></small><small><span style="font-family: monospace;"><small><a style="font-family: monospace;" href="File_Formats.html#MPP">MPP</a></small> spectral values</span></small><br> @@ -148,11 +170,16 @@ + + Make random deviations have uniform distributions rather than normal<br> -S seed Set random seed<br> + -U + + Reverse convert PCS to device, output_r.ti3<br> </span><span style="font-family: monospace;"> </span><i style="font-family: monospace;">profile.</i><span style="font-family: monospace;">[icm|mpp|ti3] </span><a @@ -173,9 +200,13 @@ + + Base name for input[</span><a style="font-family: - monospace;" href="File_Formats.html#.ti1">.ti1</a><span - style="font-family: monospace;">]/output[</span><a + monospace;" href="File_Formats.html#.ti1">.ti1</a></small><small><span + style="font-family: monospace;"><small><a style="font-family: + monospace;" href="File_Formats.html#.ti3"></a><span + style="font-family: monospace;"></span></small>]/output[</span><a style="font-family: monospace;" href="File_Formats.html#.ti3">.ti3</a><span style="font-family: monospace;">] file</span></small><br> <b><br> @@ -225,6 +256,8 @@ + + <a href="#e"><b>-e</b></a> for the list of decodings. Setting a video encoding for output will also set quantization of 8 bits (see -Z flag below). If your video connection is better than 8 bits (ie. @@ -239,13 +272,12 @@ quantization to be specified. The parameter is the number of binary digits (bits) that the device values should be quantized to. An idea of the number of bits of precision that makes its way to your - display can be obtained by using <a - href="dispcal.html#R">dispcal -R</a> If - Video encoding is selected (see -E flag above), then 8 bits is - selected by default. On systems using an VGA connection or Display - Port with a graphics card with VideoLUT entries with greater than 8 - bits depth, or if using the MadVR rendered with dithering, then a - higher bit depth is typically possible.<br> + display can be obtained by using <a href="dispcal.html#R">dispcal + -R</a> If Video encoding is selected (see -E flag above), then 8 + bits is selected by default. On systems using an VGA connection or + Display Port with a graphics card with VideoLUT entries with greater + than 8 bits depth, or if using the MadVR rendered with dithering, + then a higher bit depth is typically possible.<br> <br> <a name="k"></a>The <b>-k file.cal</b> parameter specifies a calibration file created by <a href="printcal.html">printcal</a> or @@ -351,6 +383,10 @@ random offsets, so that the randomness can be made repeatable. Normally a different seed will be used for each run. <br> <br> + <a name="U"></a>The <b>-U</b> flag causes fakeread to read <i>inoutfile.ti3</i> + and use a backwards lookup (CIE to device conversion), saving the + result in <i>inoutfile</i>_r.<i>ti3</i>.<br> + <br> Fakeread is useful in creating artificial test value for testing <a href="colprof.html">colprof</a>, as well as providing one path for turning an MPP profile into an ICC profile. It can also be used to @@ -387,6 +423,9 @@ then this will be applied to the .ti1 device values, before converting the the device values into .ti3 PCS values.<br> <br> + Note that a .ti3 file can be renamed to be .ti1 and fakeread will + treat it as if it was a .ti1.<br> + <br> <br> <br> <br> diff --git a/doc/filmread.html b/doc/filmread.html index 2109b99..2109b99 100644..100755 --- a/doc/filmread.html +++ b/doc/filmread.html diff --git a/doc/filmtarg.html b/doc/filmtarg.html index ba1c060..ba1c060 100644..100755 --- a/doc/filmtarg.html +++ b/doc/filmtarg.html diff --git a/doc/gamma.html b/doc/gamma.html index 2a9cec3..2a9cec3 100644..100755 --- a/doc/gamma.html +++ b/doc/gamma.html diff --git a/doc/gamutmapping1.jpg b/doc/gamutmapping1.jpg Binary files differindex e962666..e962666 100644..100755 --- a/doc/gamutmapping1.jpg +++ b/doc/gamutmapping1.jpg diff --git a/doc/greytiff.html b/doc/greytiff.html index caccece..caccece 100644..100755 --- a/doc/greytiff.html +++ b/doc/greytiff.html diff --git a/doc/i1d.jpg b/doc/i1d.jpg Binary files differindex e7cc159..e7cc159 100644..100755 --- a/doc/i1d.jpg +++ b/doc/i1d.jpg diff --git a/doc/i1d3_1.jpg b/doc/i1d3_1.jpg Binary files differindex afb77a3..afb77a3 100644..100755 --- a/doc/i1d3_1.jpg +++ b/doc/i1d3_1.jpg diff --git a/doc/i1d3_2.jpg b/doc/i1d3_2.jpg Binary files differindex 306f830..306f830 100644..100755 --- a/doc/i1d3_2.jpg +++ b/doc/i1d3_2.jpg diff --git a/doc/i1m.jpg b/doc/i1m.jpg Binary files differindex efbf55f..efbf55f 100644..100755 --- a/doc/i1m.jpg +++ b/doc/i1m.jpg diff --git a/doc/i1p.jpg b/doc/i1p.jpg Binary files differindex 7e59c06..7e59c06 100644..100755 --- a/doc/i1p.jpg +++ b/doc/i1p.jpg diff --git a/doc/i1pro2.jpg b/doc/i1pro2.jpg Binary files differindex 8b3cbec..8b3cbec 100644..100755 --- a/doc/i1pro2.jpg +++ b/doc/i1pro2.jpg diff --git a/doc/i1proDriver.html b/doc/i1proDriver.html index e29d639..e29d639 100644..100755 --- a/doc/i1proDriver.html +++ b/doc/i1proDriver.html diff --git a/doc/i1proDriver.xls b/doc/i1proDriver.xls Binary files differindex ca1cdf5..ca1cdf5 100644..100755 --- a/doc/i1proDriver.xls +++ b/doc/i1proDriver.xls diff --git a/doc/i1proHiRes.html b/doc/i1proHiRes.html index d6eef6a..d6eef6a 100644..100755 --- a/doc/i1proHiRes.html +++ b/doc/i1proHiRes.html diff --git a/doc/i1proHiRes.jpg b/doc/i1proHiRes.jpg Binary files differindex c07b37c..c07b37c 100644..100755 --- a/doc/i1proHiRes.jpg +++ b/doc/i1proHiRes.jpg diff --git a/doc/i1proHiRes.zip b/doc/i1proHiRes.zip Binary files differindex 49721f9..49721f9 100644..100755 --- a/doc/i1proHiRes.zip +++ b/doc/i1proHiRes.zip diff --git a/doc/i1scan14.jpg b/doc/i1scan14.jpg Binary files differindex 94b68fb..94b68fb 100644..100755 --- a/doc/i1scan14.jpg +++ b/doc/i1scan14.jpg diff --git a/doc/iccdump.html b/doc/iccdump.html index 8be51f3..8be51f3 100644..100755 --- a/doc/iccdump.html +++ b/doc/iccdump.html diff --git a/doc/iccgamut.html b/doc/iccgamut.html index e6fb097..48dedd5 100644..100755 --- a/doc/iccgamut.html +++ b/doc/iccgamut.html @@ -20,27 +20,29 @@ VRML or X3D output format.<br> <h3>Usage<br> </h3> - <small><span style="font-family: monospace;">iccgamut [-options] </span><i - style="font-family: monospace;">profile</i><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> -v + <span style="font-family: monospace;">iccgamut [-options] </span><i + style="font-family: monospace;">profile</i><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> -v - Verbose</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> -d - sres Surface resolution - details 1.0 - 50.0</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> -w + + Verbose</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> -d + sres Surface resolution + details 1.0 - 50.0</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> -w emit - X3DOM .x3d.html file as well as CGATS .gam file</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> -n + + X3DOM .x3d.html file as well as CGATS .gam file</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> -n Don't @@ -48,22 +50,24 @@ Don't - add X3DOM axes or white/black point</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> -k + + add X3DOM axes or white/black point</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> -k Add - X3DOM markers for prim. & sec. "cusp" points</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> -f - function f = forward*, b = backwards</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"></span></small><small><span - style="font-family: monospace;">-i - intent p = perceptual, r = relative - colorimetric,</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> + + X3DOM markers for prim. & sec. "cusp" points</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> -f function + f = forward*, b = backwards</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"></span><span + style="font-family: monospace;">-i intent + p = perceptual, r = relative colorimetric,</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> s @@ -71,15 +75,15 @@ s - = saturation, a = absolute (default), d = profile default</span></small><small><span - style="font-family: monospace;"></span></small><br - style="font-family: monospace;"> - <small><span style="font-family: monospace;"></span><span - style="font-family: monospace;"> -o - order n = normal (priority: lut - > matrix > monochrome)</span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> + + = saturation, a = absolute (default), d = profile default</span><span + style="font-family: monospace;"></span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"></span><span + style="font-family: monospace;"> -o + order n = normal (priority: lut > + matrix > monochrome)</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> r @@ -87,23 +91,24 @@ r - = reverse (priority: monochrome > matrix > lut)<br> - </span></small><small><span style="font-family: monospace;"> </span><span - style="font-family: monospace;">-p oride</span><span - style="font-family: monospace;"> l - = Lab_PCS (default), j = CIECAM02 Appearance Jab</span></small><small><span - style="font-family: monospace;"></span><span style="font-family: - monospace;"></span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> -l - tlimit set total ink limit, 0 - 400% - (estimate by default)</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> -L - klimit set black ink limit, 0 - 100% - (estimate by default)</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> -c - viewcond set viewing conditions for CIECAM02,</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> + + = reverse (priority: monochrome > matrix > lut)<br> + </span><span style="font-family: monospace;"> </span><span + style="font-family: monospace;">-p oride</span><span + style="font-family: monospace;"> l = + Lab_PCS (default), j = CIECAM02 Appearance Jab</span><span + style="font-family: monospace;"></span><span style="font-family: + monospace;"></span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> -l + tlimit set total ink limit, 0 - 400% + (estimate by default)</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> -L + klimit set black ink limit, 0 - 100% + (estimate by default)</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> -c viewcond + set viewing conditions for CIECAM02,</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> either @@ -111,22 +116,26 @@ either - an enumerated choice, or a series of parameters:value changes</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"></span></small><small><span - style="font-family: monospace;"> - pp - Practical Reflection Print (ISO-3664 P2)</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - + an enumerated choice, or a series of parameters:value changes</span><br> + <tt> </tt><tt><tt>pc + - Critical print evaluation environment (ISO-3664 P1)</tt><tt><br> + - pe - Print evaluation environment (CIE 116-1995)<br> - </span></small><small><span style="font-family: monospace;"> + </tt>pp - Practical Reflection Print (ISO-3664 P2)<br> + pe - Print + evaluation environment (CIE 116-1995)<br> + </tt><tt> pm - Print + evaluation with partial Mid-tone adaptation</tt><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + mt - Monitor in typical work environment</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> @@ -134,145 +143,150 @@ either - pc - Critical print evaluation environment (ISO-3664 P1)</span></small><small><span - style="font-family: monospace;"></span><span style="font-family: - monospace;"></span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> - - + mb - Monitor in bright work environment</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + md - Monitor in darkened work + environment</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> + jm - Projector in dim environment</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + jd - Projector in dark environment</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + pcd - Photo CD - original scene outdoors</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + ob - Original scene - Bright Outdoors</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + cx - Cut Sheet Transparencies on a + viewing box</span><span style="font-family: monospace;"></span><span + style="font-family: monospace;"></span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> +s:surround - mt - Monitor in typical work environment</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - + n = auto, a = average, m = dim, d = dark,</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + - mb - Monitor in bright work environment</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - md - Monitor in darkened work - environment</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> - jm - Projector in dim environment</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - jd - Projector in dark environment</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - pcd - Photo CD - original scene - outdoors</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> - ob - Original scene - Bright Outdoors</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - cx - Cut Sheet Transparencies on a - viewing box</span></small><small><span style="font-family: - monospace;"></span><span style="font-family: monospace;"></span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> -s:surround + c = transparency (default average)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> +w:X:Y:Z - n = auto, a = average, m = dim, d = dark,</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - + Adapted white point as XYZ (default media white)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> +w:x:y - c = transparency (default average)</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> -w:X:Y:Z - Adapted white point as XYZ (default media white)</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> -w:x:y + Adapted white point as x, y</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> +a:adaptation - Adapted white point as x, y</span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> -a:adaptation + Adaptation luminance in cd.m^2 (default 50.0)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> +b:background +Background - Adaptation luminance in cd.m^2 (default 50.0)</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> -b:background -Background + % of image luminance (default 20)<br> + l:imagewhite Image + white in cd.m^2 if surround = auto (default 250)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"><span style="font-family: + monospace;"> + f:flare Flare light % of image + luminance (default 0)<br> + </span> </span><span style="font-family: monospace;"> + g:glare Glare light % of ambient + (default 5)</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> - % of image luminance (default 20)<br> - l:imagewhite Image - white in cd.m^2 if surround = auto (default 250)</span></small><br - style="font-family: monospace;"> - <small><span style="font-family: monospace;"><small><span - style="font-family: monospace;"> -f:flare + g:X:Y:Z Glare color as XYZ (default + media white)</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> - Flare light % of image luminance (default 0)<br> - </span></small> </span><span style="font-family: - monospace;"> - g:glare Glare light % of ambient - (default 5)</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> + g:x:y Glare color as x, + y</span><br> + <span style="font-family: monospace;"><tt><span style="font-family: + monospace;"><tt><span style="font-family: monospace;"><span + style="font-family: monospace;"> + h:hkscale Helmholtz-Kohlrausch effect + scale factor (default 1.0)<br> + </span></span><span style="font-family: monospace;"> - g:X:Y:Z Glare color as XYZ - (default media white)</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> + m:mtaf Mid-tone + partial adaptation factor (default 0.0)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + m:X:Y:Z Mid-tone Adaptation + white as XYZ (default D50)</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> - g:x:y Glare color as - x, y<br> - -x pcent - Expand/compress gamut cylindrically by percent<br> - -s + m:x:y Mid-tone + Adaptation white as x, y</span></tt></span></tt><br> + -x pcent Expand/compress + gamut cylindrically by percent<br> + -s Create @@ -280,19 +294,18 @@ Create - special cube surface topology plot<br style="font-family: - monospace;"> - </span><i style="font-family: monospace;">profile</i><span - style="font-family: monospace;"> - The name of the </span><a style="font-family: - monospace;" href="File_Formats.html#ICC">ICC</a><span - style="font-family: monospace;"> profile, as well as the - basename of the </span><a style="font-family: monospace;" - href="File_Formats.html#.gam">gamut</a><span style="font-family: - monospace;"> [.gam] and/or </span><a style="font-family: - monospace;" href="File_Formats.html#X3DOM">X3DOM</a><span - style="font-family: monospace;"> [.x3d.html] file.</span></small> - <br> + + special cube surface topology plot<br style="font-family: + monospace;"> + </span><i style="font-family: monospace;">profile</i><span + style="font-family: monospace;"> + The name of the </span><a style="font-family: monospace;" + href="File_Formats.html#ICC">ICC</a><span style="font-family: + monospace;"> profile, as well as the basename of the </span><a + style="font-family: monospace;" href="File_Formats.html#.gam">gamut</a><span + style="font-family: monospace;"> [.gam] and/or </span><a + style="font-family: monospace;" href="File_Formats.html#X3DOM">X3DOM</a><span + style="font-family: monospace;"> [.x3d.html] file.</span> <br> <h3>Comments</h3> The parameters are all those that control which table in the ICC profile to use, as well as what color space to convert it to. <br> diff --git a/doc/iccgamutmapping.html b/doc/iccgamutmapping.html index 11994c1..11994c1 100644..100755 --- a/doc/iccgamutmapping.html +++ b/doc/iccgamutmapping.html diff --git a/doc/icclu.html b/doc/icclu.html index 9a95fbf..9a95fbf 100644..100755 --- a/doc/icclu.html +++ b/doc/icclu.html diff --git a/doc/illumread.html b/doc/illumread.html index 697f772..697f772 100644..100755 --- a/doc/illumread.html +++ b/doc/illumread.html diff --git a/doc/illumread_1.jpg b/doc/illumread_1.jpg Binary files differindex 97b5382..97b5382 100644..100755 --- a/doc/illumread_1.jpg +++ b/doc/illumread_1.jpg diff --git a/doc/illumread_2.jpg b/doc/illumread_2.jpg Binary files differindex 6fef757..6fef757 100644..100755 --- a/doc/illumread_2.jpg +++ b/doc/illumread_2.jpg diff --git a/doc/illumread_3.jpg b/doc/illumread_3.jpg Binary files differindex fcab321..fcab321 100644..100755 --- a/doc/illumread_3.jpg +++ b/doc/illumread_3.jpg diff --git a/doc/illumread_4.jpg b/doc/illumread_4.jpg Binary files differindex 6c955c0..6c955c0 100644..100755 --- a/doc/illumread_4.jpg +++ b/doc/illumread_4.jpg diff --git a/doc/illumread_5.jpg b/doc/illumread_5.jpg Binary files differindex 5462e8f..5462e8f 100644..100755 --- a/doc/illumread_5.jpg +++ b/doc/illumread_5.jpg diff --git a/doc/illumread_6.jpg b/doc/illumread_6.jpg Binary files differindex a91a63e..a91a63e 100644..100755 --- a/doc/illumread_6.jpg +++ b/doc/illumread_6.jpg diff --git a/doc/inoutreferred.html b/doc/inoutreferred.html new file mode 100755 index 0000000..41a3fd5 --- /dev/null +++ b/doc/inoutreferred.html @@ -0,0 +1,48 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> + <head> + <title>Input vs. Output Referred images</title> + <meta http-equiv="content-type" content="text/html; + charset=windows-1252"> + </head> + <body> + <h2 style="text-decoration: underline; font-weight: bold;">Input vs. + Output Referred Images<br> + </h2> + A lot of Photography related sources recommend that images be + encoded in a large gamut colorspace such as ProPhoto, but don't + explain the implications of doing this in in the process of + subsequently displaying such photo's. <br> + <h3> Input referred:</h3> + Images are encoded in a way that represents their unchanged or + originally captured values, in an encoding space that is larger + enough to store their gamut without clipping. The gamut of the + encoding space tells you nothing about the gamut of the images.<br> + <br> + Typical: L*a*b*, Raw, ProPhoto, RIMM etc.<br> + <h3>Output referred:</h3> + Images are modified (i.e. rendered) to fit within the gamut of a + specific real world output device (such as display or printer). This + means that typically the encoding space is a good representation of + the gamut of the images.<br> + <br> + Typical sRGB, AdobeRGB, printer profile, display profile, etc.<br> + <br> + <br> + Before displaying images that are Input Referred, they need to be + rendered to a smaller gamut. This may be done manually by adjusting + the images carefully to fit within the smaller gamut, or in some + automatic fashion such as by hard clipping them to the smaller + gamut, or by setting up a specific gamut mapping for each image or + set of images that occupy a similar gamut.<br> + <br> + <u><b>Note</b></u> that setting up a gamut mapping from the very + large Input referred encoding gamut to the smaller output device + gamut will almost certainly result in a disappointing loss of + saturation, because the images deliberately do not occupy the large + encoding gamut, and so get unnecessarily squashed down to allow for + colors that they do not actually contain.<br> + <br> + See also Scenarios.html#LP3.<br> + </body> +</html> diff --git a/doc/instruments.html b/doc/instruments.html index d7f5d30..283755a 100644..100755 --- a/doc/instruments.html +++ b/doc/instruments.html @@ -59,12 +59,22 @@ + + + + + - Tele-Spectro-Radiometer<br>
<a href="#spectraval">spectraval 1511& 1501</a> + + + + + - Tele-Spectro-Radiometer<br>
<br>
@@ -135,6 +145,11 @@ + + + + + - Tele-Spectro-Radiometer<br>
<br>
@@ -207,6 +222,11 @@ + + + + + - "swipe" type reflective spectrometer, that can be used untethered.<br>
<a href="#DTP22">DTP22 Digital Swatchbook</a> @@ -267,6 +287,11 @@ + + + + + - spot type reflective spectrometer.<br>
<a href="#DTP41">DTP41</a> @@ -327,6 +352,11 @@ + + + + + - spot and strip reading reflective spectrometer.<br>
<a href="#DTP41">DTP41T</a>
@@ -389,6 +419,11 @@ + + + + + - spot and strip reading reflective/transmissive spectrometer.<br>
<a href="#dtp51">DTP51</a> @@ -449,6 +484,11 @@ + + + + + - strip reading reflective colorimeter.<br>
<a href="#DTP92">DTP92</a> @@ -509,6 +549,11 @@ + + + + + - CRT display colorimeter.<br>
<a href="#DTP94">DTP94</a> <font size="-1">"Optix @@ -569,6 +614,11 @@ + + + + + XR"</font> or "Optix XR2" or "Optix Pro"- display colorimeter.<br>
<a href="#ColorMunki"><span style="text-decoration: underline;"></span></a> @@ -629,11 +679,22 @@ + + + + + <a href="#ColorMunki"><span style="text-decoration: underline;">ColorMunki</span></a>
Design or Photo
- spot and "swipe"
reflective/emissive spectrometer (UV cut only).<br>
+ +
+ - The i1 Studio version of this instrument is also reported to work.<br>
+ +
+ [ The OEM XEROX PhaserMeter is also reported to work. ] <br>
<a href="#i1d"><span style="text-decoration:
underline;">ColorMunki</span></a> Create or Smile
- display
@@ -743,6 +804,11 @@ + + + + + - display colorimeter. (Treated as a Eye-One Display 2)<br>
<a href="#i1d">CalMAN X2</a>
@@ -804,6 +870,11 @@ + + + + + - display colorimeter. (Treated as a Eye-One Display 2)<br>
<a href="#Huey">Huey</a>
@@ -874,6 +945,11 @@ + + + + + [The Sequel Chroma 4 & 5, and Sencore ColorPro V, IV & III
also work.]<br>
@@ -937,6 +1013,11 @@ + + + + + - see <a href="#i1d">Eye-One Display</a><br>
<br>
@@ -1004,6 +1085,11 @@ + + + + + [The Spyder 1 also seems to work.]<br>
<a href="#spyd3">Spyder 3</a>
@@ -1083,6 +1169,11 @@ + + + + + - display colorimeter<br>
</span> <a href="#ColorHug">ColorHug</a> &
@@ -1135,6 +1226,11 @@ + + + + + - display colorimeter<span class="titre"></span><br>
<a href="#SMCube">Palette/SwatchMate Cube</a>
@@ -1151,6 +1247,9 @@ <a href="#spot">Spot reading instruments</a><br>
<span style="font-weight: bold;"></span><br>
<br>
+ There is a <a href="ccsss.html">list of contributed</a> <span
+ style="font-weight: bold;">ccss</span> (Colorimeter Correction
+ Spectral Sample) files.<br>
There is a <a href="ccmxs.html">list of contributed</a> <span
style="font-weight: bold;">ccmx</span> (Colorimeter Correction
Matrix) files.<br>
@@ -1469,6 +1568,11 @@ + + + + + type</span> selection parameter. Depending on the instrument, this
may combine two related functions: 1) Changing the measurement mode
@@ -1503,7 +1607,7 @@ href="http://en.wikipedia.org/wiki/Comparison_of_display_technology">Comparison_of_display_technology</a>
for some background on different display technologies.<br>
<br>
- <hr size="2" width="100%"><br>
+ <hr width="100%" size="2"><br>
<h3><a name="refreshmeasurement"></a>Refresh Rate Measurement</h3>
<p>Most of the colorimeters that have a refresh display type
selection, also have an ability to measure the refresh rate of a
@@ -1516,8 +1620,8 @@ this measurement. A rough guide is as follows:<br>
<br>
</p>
- <table border="1" cellpadding="2" cellspacing="2" width="372"
- height="230">
+ <table width="372" height="230" cellspacing="2" cellpadding="2"
+ border="1">
<tbody>
<tr>
<td valign="top"><b>Instrument</b></td>
@@ -1587,7 +1691,7 @@ </table>
<p><br>
</p>
- <hr size="2" width="100%">
+ <hr width="100%" size="2">
<p><span style="font-weight: bold;"><a name="specbos"></a><span
style="font-weight: bold;">specbos 1211 and 1201
Tele-Spectro-Radiometer<br>
@@ -1613,8 +1717,8 @@ href="file:///D:/src/argyll/doc/Installing.html">installation
instructions</a>. </p>
<br>
- <hr size="2" width="100%">
- <p><span style="font-weight: bold;"><a name="specbos"></a><span
+ <hr width="100%" size="2">
+ <p><span style="font-weight: bold;"><a name="spectraval"></a><span
style="font-weight: bold;">spectraval 1511 and 1501
Tele-Spectro-Radiometer<br>
</span></span></p>
@@ -1634,6 +1738,11 @@ style="font-weight: bold;"> </span>and <b>1501</b> makes use of
the newer FTDI FT231XS Virtual COM Port Drivers (VCP), that may need
installing for your operating system. See <a href="Installing.html">installation + + + + + instructions</a>.<br>
<br>
@@ -1642,7 +1751,7 @@ Bluetooth serial port, and then allowing the ArgyllCMS tools to
identify the instrument over the serial port. <br>
<br>
- <hr size="2" width="100%">
+ <hr width="100%" size="2">
<p><span style="font-weight: bold;"><br>
<a name="ex1"></a><span style="font-weight: bold;">Image
Engineering EX1<br>
@@ -1670,6 +1779,11 @@ href="http://www.image-engineering.de/iq-products/iq-tools/measurement-devices/e + + + + + Engineering EX1</a> is a currently available instruments. This is
a high resolution spectrometer intended for the measurement of light
@@ -1677,7 +1791,7 @@ href="http://www.image-engineering.de/iq-products/iq-tools/measurement-devices/e <p> </p>
<p><br>
</p>
- <hr size="2" width="100%">
+ <hr width="100%" size="2">
<p><span style="font-weight: bold;"><a name="k10a"></a><span
style="font-weight: bold;">Klein K10-A Colorimeter<br>
</span></span></p>
@@ -1709,6 +1823,11 @@ href="http://www.image-engineering.de/iq-products/iq-tools/measurement-devices/e + + + + + <a href="http://www.kleininstruments.com/">Klein Instruments</a> @@ -1734,6 +1853,11 @@ href="http://www.image-engineering.de/iq-products/iq-tools/measurement-devices/e + + + + + is a currently available instrument. It is noted for it's speed,
high precision, and ability to measure to very low light
@@ -1759,26 +1883,27 @@ href="http://www.image-engineering.de/iq-products/iq-tools/measurement-devices/e operating system. See <a href="Installing.html">installation
instructions</a>.</p>
<p> </p>
- <hr size="2" width="100%">
+ <hr width="100%" size="2">
<p><br>
</p>
<span style="font-weight: bold;"></span><br>
<span style="font-weight: bold;"><a name="ColorMunki"></a><span
- style="font-weight: bold;">ColorMunki </span>Design or Photo <span
- style="font-weight: bold;">reflective/emissive spectrometer</span><br>
- <br>
+ style="font-weight: bold;">ColorMunki </span>Design or Photo,
+ i1 Studio <span style="font-weight: bold;">reflective/emissive
+ spectrometer<br>
+ </span> <br>
<img style="width: 272px; height: 243px;" alt="" title="ColorMunki
(White)" src="ColorMunki.jpg"> <br>
<br>
</span><span style="font-weight: bold;">Availability:<br>
<br>
</span>The <span style="font-weight: bold;">ColorMunki</span> <span
- style="font-weight: bold;">Design or Photo </span>from <a
- href="http://www.xrite.com/">X-Rite</a> is currently
- available in two different packages from the manufacturer. These
- packages differ in what features the manufacturers software
- provides, as well as cosmetic differences between the instrument
- (white and black). This comparison <a
+ style="font-weight: bold;">Design or Photo </span>or <b>i1
+ Studio</b> from <a href="http://www.xrite.com/">X-Rite</a>
+ is currently available in two different packages from the
+ manufacturer. These packages differ in what features the
+ manufacturers software provides, as well as cosmetic differences
+ between the instrument (white and black). This comparison <a
href="http://www.colormunki.com/product/show?page=2">chart</a>
illustrates the differences (Note that the ColorMunki Design comes
with <b>Pantone</b> libraries). Used with Argyll, there are no
@@ -1797,6 +1922,13 @@ href="http://www.image-engineering.de/iq-products/iq-tools/measurement-devices/e Like the Eye-One Pro, this instrument does support the <a
href="spotread.html#H">high resolution</a> spectral mode.<br>
<br>
+ There are some OEM versions of this instrument around too, and
+ the <a href="http://www.office.xerox.com/latest/78XDS-03U.PDF">XEROX + +
+ PhaserMeter</a> instruments (part of the Xerox PhaserMatch 5.0
+ package) are also reported to work.<br>
+ <br>
<span style="font-weight: bold;">OS X and X-Rite drivers</span><br>
<br>
Please note the installation <a
@@ -2093,6 +2225,11 @@ href="http://www.image-engineering.de/iq-products/iq-tools/measurement-devices/e + + + + + CRT display A Cathode Ray
Tube display, that is of the Refresh type [Default, CB2].<br>
@@ -2173,6 +2310,11 @@ href="http://www.image-engineering.de/iq-products/iq-tools/measurement-devices/e + + + + + LCD display A Liquid
Crystal Display, that is of the Non-Refresh type [default, CB1].<br>
@@ -2234,6 +2376,11 @@ href="http://www.image-engineering.de/iq-products/iq-tools/measurement-devices/e + + + + + CRT display A Cathode Ray
Tube display, that is of the Refresh type [CB2].<br>
@@ -2311,6 +2458,11 @@ Gretag + + + + + MacBeth (Now X-Rite) is a discontinued instrument. It is often
available second hand. If buying it second hand, make sure it comes
@@ -2363,6 +2515,11 @@ Gretag <br>
</span> The <span style="font-weight: bold;">Eye-One Pro2 </span>(AKA + + + + + Eye-One Pro Rev E) from <a
href="http://www.kleininstruments.com/"></a> <a
@@ -2377,18 +2534,31 @@ Gretag of which package it came with. The lowest cost package is the <a
href="http://www.xrite.com/categories/calibration-profiling/i1basic-pro-2">i1 + + + + + Basic Pro 2</a>.<br>
<br>
There is support for some of the new features of the Eye-One Pro2
(also known as the Eye-One Pro Rev E), in particular the Rev E
measurement mode, spectrometer stray light reduction, wavelength
- calibration, and improved black level tracking. This new support can
- be disabled and an Eye-One Pro2 operated in legacy mode by setting
- the environment variable ARGYLL_DISABLE_I1PRO2_DRIVER. See <a
- href="instruments.html#i1p">Eye-One Pro reflective/emissive
- spectrometer</a><span style="font-weight: bold;"> </span>below
- for details on the operation of this type of instrument.<br>
+ calibration, and improved black level tracking. Note that there is
+ no support currently for using the Eye-One Pro2 Ultra Violet
+ measurement mode, since ArgyllCMS can simulate M0/M1/M2 measurement
+ modes using both older (Rev A-D) and newer instruments without this.
+ The new support can be disabled and an Eye-One Pro2 operated in
+ legacy mode by setting the environment variable
+ ARGYLL_DISABLE_I1PRO2_DRIVER. See <a href="instruments.html#i1p">Eye-One + + + +
+ Pro reflective/emissive spectrometer</a><span style="font-weight:
+ bold;"> </span>below for details on the operation of this type of
+ instrument.<br>
<br>
<b>Native Calibration Standard:</b><br>
<br>
@@ -2610,6 +2780,11 @@ href="http://www.xrite.com/categories/calibration-profiling/i1basic-pro-2">i1 + + + + + Smile</span> are:<br>
<br>
@@ -2658,6 +2833,11 @@ href="http://www.xrite.com/categories/calibration-profiling/i1basic-pro-2">i1 + + + + + LCD with LED back-light
A Liquid Crystal display that uses
@@ -2723,6 +2903,11 @@ href="http://www.xrite.com/categories/calibration-profiling/i1basic-pro-2">i1 + + + + + LCD display A Liquid
Crystal Display, that is of the Non-Refresh type. [Default, CB1]<br>
@@ -2784,6 +2969,11 @@ href="http://www.xrite.com/categories/calibration-profiling/i1basic-pro-2">i1 + + + + + CRT display A
Cathode Ray Tube display, that is of the Refresh type. [CB2]<br>
@@ -2867,6 +3057,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + DreamColor</a> instruments are also reported to work. They will
appear as a be a the same as the i1Display Pro.<br>
@@ -2948,6 +3143,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + Pro</b> are discontinued instruments. They may still be available
as old stock, or second hand. <br>
@@ -3014,6 +3214,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + LCD display A Liquid
Crystal Display, that is of the Non-Refresh type. [Default, CB1]<br>
@@ -3075,6 +3280,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + CRT display A Cathode Ray
Tube display, that is of the Refresh type. [CB2]<br>
@@ -3161,6 +3371,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + CRT display A Cathode Ray
Tube display, that is of the Refresh type.<br>
@@ -3222,6 +3437,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + LCD display A Liquid
Crystal Display or alternate Calibration, that is of the Non-Refresh
@@ -3317,6 +3537,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + LCD display A Liquid Crystal
Display, that is of the Non-Refresh type. [Default, CB1]<br>
@@ -3378,6 +3603,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + CRT display A Cathode Ray
Tube display, that is of the Refresh type. [CB2]<br>
@@ -3564,6 +3794,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + - normal gamut Liquid Crystal Display with standard Cold Cathode
Fluorescent Lamp backlight.<br>
@@ -3634,6 +3869,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + Wide Gamut LCD, RGB LED
Backlight - wide gamut Liquid Crystal Display with RGB LED
@@ -3699,6 +3939,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + - normal gamut Liquid Crystal Display with alternative Cold Cathode
Fluorescent Lamp backlight (Laptop ?)<br>
@@ -3833,6 +4078,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + - normal gamut Liquid Crystal Display with standard Cold Cathode
Fluorescent Lamp backlight.<br>
@@ -3903,6 +4153,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + Wide Gamut LCD, RGB LED
Backlight - wide gamut Liquid Crystal Display with RGB LED
@@ -3968,6 +4223,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + - normal gamut Liquid Crystal Display with alternative Cold Cathode
Fluorescent Lamp backlight (Laptop ?)<br>
@@ -4043,6 +4303,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + HCFR Probe</span> is a kit instrument from <span
style="font-weight: bold;"></span> <a
@@ -4122,6 +4387,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + LCD display A Liquid
Crystal Display [Default].<br>
@@ -4183,6 +4453,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + CRT display A Cathode Ray
Tube display.<br>
@@ -4244,6 +4519,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + LCD, CCFL Backlight [Default]<br>
<b>c</b> @@ -4275,6 +4555,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + CRT display<br>
<b>p</b> @@ -4306,6 +4591,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + Projector<br>
<b>e</b> @@ -4336,6 +4626,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + LCD, White LED Backlight<br>
<b>F</b> @@ -4367,6 +4662,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + Factory matrix (For Calibration) [CB1]<br>
<b> R</b> @@ -4398,6 +4698,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + Raw Reading (For Factory matrix Calibration) [CB2]<br>
<br>
@@ -4416,6 +4721,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + Cube<br>
<br>
@@ -4452,6 +4762,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + Matt surfaces [Default]<br>
<b>g</b> @@ -4483,6 +4798,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + Gloss surfaces<br>
<b>N</b>
@@ -4503,6 +4823,11 @@ href="http://www8.hp.com/us/en/products/oas/product-detail.html?oid=5225568">HP + + + + + Native Calibration<br>
<br>
diff --git a/doc/invprofcheck.html b/doc/invprofcheck.html index 65502ee..65502ee 100644..100755 --- a/doc/invprofcheck.html +++ b/doc/invprofcheck.html diff --git a/doc/kodak2ti3.html b/doc/kodak2ti3.html index 5485506..5485506 100644..100755 --- a/doc/kodak2ti3.html +++ b/doc/kodak2ti3.html diff --git a/doc/ls2ti3.html b/doc/ls2ti3.html new file mode 100755 index 0000000..80c5eab --- /dev/null +++ b/doc/ls2ti3.html @@ -0,0 +1,37 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> + <head> + <title>ls2ti3</title> + <meta http-equiv="content-type" content="text/html; + charset=windows-1252"> + <meta name="author" content="Graeme Gill"> + </head> + <body> + <h2><b>profile/ls2ti3</b></h2> + <h3>Summary</h3> + <small><big><small><big>Convert LightSpace format RGB .bcs test + chart results into</big></small></big></small> Argyll <a + href="File_Formats.html#.ti3">.ti3</a> + CGATS format. + <h3>Usage Summary</h3> + <p><tt>usage: ls2ti3 [-v] infile outbase</tt><tt><br> + </tt><tt> infile + Input LightSpace .bcs file</tt><span style="font-family: + monospace;"></span><br> + <small> <i style="font-family: monospace;">outbasefile</i><span + style="font-family: monospace;"> Base name for + output</span><a style="font-family: monospace;" + href="File_Formats.html#.ti3">.ti3</a><span + style="font-family: monospace;"> file</span></small> <br + style="font-family: monospace;"> + </p> + <small> </small> + <h3>Usage Details and Discussion</h3> + ls2ti3 takes a LightSpace .bcs test chart results, and + converts them into Argyll <a href="File_Formats.html#.ti3">.ti3</a> + CGATS files.<br> + <br> + <br> + <br> + </body> +</html> diff --git a/doc/monitorcontrols.html b/doc/monitorcontrols.html index 83ab695..83ab695 100644..100755 --- a/doc/monitorcontrols.html +++ b/doc/monitorcontrols.html diff --git a/doc/mox.jpg b/doc/mox.jpg Binary files differindex f3c7166..f3c7166 100644..100755 --- a/doc/mox.jpg +++ b/doc/mox.jpg diff --git a/doc/moxxr.jpg b/doc/moxxr.jpg Binary files differindex 579d7fc..579d7fc 100644..100755 --- a/doc/moxxr.jpg +++ b/doc/moxxr.jpg diff --git a/doc/mppcheck.html b/doc/mppcheck.html index cd44989..cd44989 100644..100755 --- a/doc/mppcheck.html +++ b/doc/mppcheck.html diff --git a/doc/mpplu.html b/doc/mpplu.html index 8d4e755..68f985b 100644..100755 --- a/doc/mpplu.html +++ b/doc/mpplu.html @@ -1,182 +1,206 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> -<head> - <title>mpplu</title> - <meta http-equiv="content-type" - content="text/html; charset=ISO-8859-1"> - <meta name="author" content="Graeme Gill"> -</head> -<body> -<h2><b>xicc/mpplu</b></h2> -<h3>Summary</h3> -Lookup individual color values though an <a - href="File_Formats.html#MPP">MPP</a> profile. Also -create MPP gamut files or <a href="File_Formats.html#X3DOM">X3DOM</a> -views.<br> -<h3>Usage</h3> -<small><span style="font-family: monospace;">mpplu [-v level] [-f func] -[-i intent] [-o order] profile.mpp</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">-v -Verbose</span><br style="font-family: monospace;"> -<span style="font-family: monospace;">-f </span><i - style="font-family: monospace;">function</i><span - style="font-family: monospace;"> f = forward, b = -backwards</span><br style="font-family: monospace;"> -<span style="font-family: monospace;">-p </span><i - style="font-family: monospace;">oride</i><span - style="font-family: monospace;"> x -= XYZ_PCS, l = -Lab_PCS, y = Yxy, s = spectral,</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">-l </span><i - style="font-family: monospace;">limit</i><span - style="font-family: monospace;"> override -default -ink limit, 1 - N00%</span><br style="font-family: monospace;"> -<span style="font-family: monospace;">-i </span><i - style="font-family: monospace;">illum</i><span - style="font-family: monospace;"> Choose -illuminant for -print/transparency spectral data:</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> - A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">-o </span><i - style="font-family: monospace;">observ</i><span - style="font-family: monospace;"> Choose CIE -Observer for spectral -data:</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> - </span></small><small><span - style="font-family: monospace;">1931_2 </span></small><small><span - style="font-family: monospace;"> (def.)</span></small><small><span - style="font-family: monospace;">, 1964_10, S&B -1955_2, shaw, J&V 1978_2</span></small><small><span - style="font-family: monospace;"></span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">-u - Use Fluorescent Whitening Agent compensation</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">-g - Create gamut output</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;">-w - Create gamut X3DOM as well<br> --n -Don't add X3DOM axes<br> --a n Gamut -transparency level<br style="font-family: monospace;"> -</span><span style="font-family: monospace;">-d -n Gamut -surface detail level</span><br style="font-family: monospace;"> -<span style="font-family: monospace;">-t num - Invoke debugging test code -"num" 1..n</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> - 1 - check partial derivative for device -input</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> - 2 - create overlap diagnostic X3DOM gamut -surface</span><br style="font-family: monospace;"> -<span style="font-family: monospace;">profile.mpp Profile to be -used</span><br style="font-family: monospace;"> -<br style="font-family: monospace;"> -<span style="font-family: monospace;"> The colors to -be translated should be fed into -standard input,</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> one input -color per line, white space separated.</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> A line -starting with a # will be ignored.</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> A line not -starting with a number will terminate the -program.</span></small> -<br> -<h3>Usage Details and Discussion</h3> -This is an analogous tool to <a href="icclu.html"> icclu </a>, but -applying -to <a href="File_Formats.html#MPP">MPP</a> profile, rather than <a - href="File_Formats.html#ICC">ICC</a> profiles. Because MPP profiles -can also contain a spectral description of device behavior, there are -extra options in mpplu to describe how to convert spectral values into -CIE tristimulus values.<br> -Some additional functionality is included in mpplu, analogous to <a - href="iccgamut.html"> iccgamut</a>, allowing gamut files and images to -be generated from MPP profiles.<br> -<br> -The <b>-v</b> flag causes extra information about the profile to be -printed.<br> -<br> -The <b>-f</b> flag is experimental, and should be ignored.<br> -<br> -Normally L*a*b* is displayed, but this can be changed using the the <b>-p</b> -flag and XYZ, Yxy, or spectral values to be be displayed.<br> -<br> -If an illuminant, observer or Fluorescent Whitening Agent compensation -is selected, then the CIE tristimulus values will be computed from the -spectral information in the MPP profile (if present).<br> -<br> -The <b>-l</b> flag overrides any default ink limit (Total Area -Coverage) recorded in the profile. The ink limit has an effect on the -results of a gamut -generated from the profile.<br> -<br> -The <b>-i</b> flag allows specifying a standard or custom illumination -spectrum, applied to reflective spectral profile data to compute CIE -tristimulus -values. <b>A</b>, <b>D50</b>, <b>D65</b>, <b>F5</b>, <b>F8</b>, <b>F10</b> -are a selection of standard illuminant spectrums, with <b>D50</b> -being the -default. If a filename is specified instead, it will be assumed to be -an -Argyll specific <a href="File_Formats.html#.sp">.sp</a> spectrum file.<br> -<br> -<a name="o"></a> The <b>-o</b> flag allows specifying a tristimulus -observer, and is used to compute PCS (Profile Connection Space) -tristimulus values. The following choices are available:<br> -<b> 1931_2</b> selects the standard CIE 1931 2 degree observer. -The default.<br> - <b>1964_10</b> selects the standard CIE 1964 10 degree observer.<br> - <b>1955_2</b> selects the Stiles and Birch 1955 2 degree -observer<br> - <b>1978_2 </b>selects the Judd and Voss 1978 2 degree observer<br> - <b>shaw</b> selects the Shaw and Fairchild 1997 2 degree -observer<br> -<br> -The <b>-u</b> flag enables Fluorescent Whitening Agent compensation, -which compensates for the effect a different illuminant will have, on -any Fluorescent Whitening Agent present in the reflective media.<br> -<br> -The <b>-g</b> flag causes mpplu to simply generate a gamut surface -description from the profile, creating a <a - href="File_Formats.html#.gam">.gam</a> file with the same base name as -the given profile.<br> -<br> -The <b>-w</b> flag causes the gamut surface to be generated in <a - href="File_Formats.html#X3DOM">X3DOM</a> format -as well as <a href="File_Formats.html#.gam">.gam</a> format.<br> -<br> -<small><span style="font-family: monospace;">The <span - style="font-weight: bold;">-n</span> flag suppresses the X3DOM axes.<br> -<br> -The <span style="font-weight: bold;">-a</span> <span - style="font-weight: bold;">n</span> parameter sets a transparency -level in the X3DOM surface.</span></small><br> -<br> -The <b>-d</b> parameter controls the level of detail displayed in the -gamut surface. The parameter roughly corresponds to a deltaE value, so -smaller values give greater detail. The default value is around 10, and -is a good place to start. Small values may take a lot of time to -generate, and will produce big files.<br> -<br> -The <b>-t</b> parameter invokes special MPP test and diagnostic output.<br> -<br> -<br> -<br> -<br> -</body> + <head> + <title>mpplu</title> + <meta http-equiv="content-type" content="text/html; + charset=windows-1252"> + <meta name="author" content="Graeme Gill"> + </head> + <body> + <h2><b>xicc/mpplu</b></h2> + <h3>Summary</h3> + Lookup individual color values though an <a + href="File_Formats.html#MPP">MPP</a> profile. Also create MPP + gamut files or <a href="File_Formats.html#X3DOM">X3DOM</a> + views.<br> + <h3>Usage</h3> + <small><span style="font-family: monospace;">mpplu [-v level] [-f + func] [-i intent] [-o order] profile.mpp</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;">-v + + Verbose</span><br style="font-family: monospace;"> + <span style="font-family: monospace;">-f </span><i + style="font-family: monospace;">function</i><span + style="font-family: monospace;"> f = forward, + b = backwards</span><br style="font-family: monospace;"> + <span style="font-family: monospace;">-p </span><i + style="font-family: monospace;">oride</i><span + style="font-family: monospace;"> + + x = XYZ_PCS, l = Lab_PCS, y = Yxy, s = spectral,</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;">-l </span><i + style="font-family: monospace;">limit</i><span + style="font-family: monospace;"> + override default ink limit, 1 - N00%</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;">-i </span><i + style="font-family: monospace;">illum</i><span + style="font-family: monospace;"> + Choose illuminant for print/transparency spectral data:</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + + + A, C, D50 (def.), D50M2, D65, F5, F8, F10 or + file.sp</span><br style="font-family: monospace;"> + <span style="font-family: monospace;">-o </span><i + style="font-family: monospace;">observ</i><span + style="font-family: monospace;"> Choose CIE + Observer for spectral data:</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> + + + </span></small><small><span style="font-family: + monospace;">1931_2 </span></small><small><span + style="font-family: monospace;"> (def.)</span></small><small><span + style="font-family: monospace;">, 1964_10, </span></small><small><span + style="font-family: monospace;"><tt><small>2012_2, 2012_10, </small></tt>S&B +1955_2, + + shaw, J&V 1978_2 or file.cmf</span></small><small><br + style="font-family: monospace;"> + <span style="font-family: monospace;">-u + + + Use Fluorescent Whitening Agent compensation</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;">-g + + + Create gamut output</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;">-w + + + Create gamut X3DOM as well<br> + -n +Don't + + add X3DOM axes<br> + -a n + Gamut transparency level<br style="font-family: monospace;"> + </span><span style="font-family: monospace;">-d + n Gamut + surface detail level</span><br style="font-family: monospace;"> + <span style="font-family: monospace;">-t + num Invoke debugging test + code "num" 1..n</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> + + + 1 - check partial derivative for device input</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + + + 2 - create overlap diagnostic X3DOM gamut surface</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;">profile.mpp Profile + to be used</span><br style="font-family: monospace;"> + <br style="font-family: monospace;"> + <span style="font-family: monospace;"> The + colors to be translated should be fed into standard input,</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> one input + color per line, white space separated.</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> A line + starting with a # will be ignored.</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> A line + not starting with a number will terminate the program.</span></small> + <br> + <h3>Usage Details and Discussion</h3> + This is an analogous tool to <a href="icclu.html"> icclu </a>, but + applying to <a href="File_Formats.html#MPP">MPP</a> profile, rather + than <a href="File_Formats.html#ICC">ICC</a> profiles. Because MPP + profiles can also contain a spectral description of device behavior, + there are extra options in mpplu to describe how to convert spectral + values into CIE tristimulus values.<br> + Some additional functionality is included in mpplu, analogous to <a + href="iccgamut.html"> iccgamut</a>, allowing gamut files and + images to be generated from MPP profiles.<br> + <br> + The <b>-v</b> flag causes extra information about the profile to be + printed.<br> + <br> + The <b>-f</b> flag is experimental, and should be ignored.<br> + <br> + Normally L*a*b* is displayed, but this can be changed using the the + <b>-p</b> flag and XYZ, Yxy, or spectral values to be be displayed.<br> + <br> + If an illuminant, observer or Fluorescent Whitening Agent + compensation is selected, then the CIE tristimulus values will be + computed from the spectral information in the MPP profile (if + present).<br> + <br> + The <b>-l</b> flag overrides any default ink limit (Total Area + Coverage) recorded in the profile. The ink limit has an effect on + the results of a gamut generated from the profile.<br> + <br> + The <b>-i</b> flag allows specifying a standard or custom + illumination spectrum, applied to reflective spectral profile data + to compute CIE tristimulus values. <b>A</b>, <b>D50</b>, <b>D65</b>, + <b>F5</b>, <b>F8</b>, <b>F10</b> are a selection of standard + illuminant spectrums, with <b>D50</b> being the default. If a + filename is specified instead, it will be assumed to be an Argyll + specific <a href="File_Formats.html#.sp">.sp</a> spectrum file.<br> + <br> + <a name="o"></a> The <b>-o</b> flag allows specifying a tristimulus + observer, and is used to compute PCS (Profile Connection Space) + tristimulus values. The following choices are available:<br> + <b> 1931_2</b> selects the standard CIE 1931 2 degree + observer. The default.<br> + <b>1964_10</b> selects the standard CIE 1964 10 degree + observer.<br> + <b> 2012_2</b> selects the proposed CIE 2012 2 degree observer<br> + <b>2012_10</b> selects the proposed CIE 2012 10 degree + observer<br> + <b>1955_2</b> selects the Stiles and Birch 1955 2 degree + observer<br> + <b>1978_2 </b>selects the Judd and Voss 1978 2 degree + observer<br> + <b>shaw</b> selects the Shaw and Fairchild 1997 2 degree + observer<br> + <i><b>file.cmf</b></i> selects an observer specified by the + given <a href="File_Formats.html#.cmf">.cmf</a> file.<br> + <br> + The <b>-u</b> flag enables Fluorescent Whitening Agent + compensation, which compensates for the effect a different + illuminant will have, on any Fluorescent Whitening Agent present in + the reflective media.<br> + <br> + The <b>-g</b> flag causes mpplu to simply generate a gamut surface + description from the profile, creating a <a + href="File_Formats.html#.gam">.gam</a> file with the same base + name as the given profile.<br> + <br> + The <b>-w</b> flag causes the gamut surface to be generated in <a + href="File_Formats.html#X3DOM">X3DOM</a> format as well as <a + href="File_Formats.html#.gam">.gam</a> format.<br> + <br> + <small><span style="font-family: monospace;">The <span + style="font-weight: bold;">-n</span> flag suppresses the X3DOM + axes.<br> + <br> + The <span style="font-weight: bold;">-a</span> <span + style="font-weight: bold;">n</span> parameter sets a + transparency level in the X3DOM surface.</span></small><br> + <br> + The <b>-d</b> parameter controls the level of detail displayed in + the gamut surface. The parameter roughly corresponds to a deltaE + value, so smaller values give greater detail. The default value is + around 10, and is a good place to start. Small values may take a lot + of time to generate, and will produce big files.<br> + <br> + The <b>-t</b> parameter invokes special MPP test and diagnostic + output.<br> + <br> + <br> + <br> + <br> + </body> </html> diff --git a/doc/mppprof.html b/doc/mppprof.html index 5446451..5446451 100644..100755 --- a/doc/mppprof.html +++ b/doc/mppprof.html diff --git a/doc/oeminst.html b/doc/oeminst.html index b52f1f2..b52f1f2 100644..100755 --- a/doc/oeminst.html +++ b/doc/oeminst.html diff --git a/doc/printcal.html b/doc/printcal.html index 89264c5..89264c5 100644..100755 --- a/doc/printcal.html +++ b/doc/printcal.html diff --git a/doc/printtarg.html b/doc/printtarg.html index 0d86cac..611e218 100644..100755 --- a/doc/printtarg.html +++ b/doc/printtarg.html @@ -3,7 +3,7 @@ <head> <title>printtarg</title> <meta http-equiv="content-type" content="text/html; - charset=ISO-8859-1"> + charset=windows-1252"> <meta name="author" content="Graeme Gill"> </head> <body> @@ -21,6 +21,9 @@ + + + Verbose mode</span><br style="font-family: monospace;"> <span style="font-family: monospace;"> </span><a style="font-family: monospace;" href="#i">-i 20 | 22 | 41 | 51 | @@ -36,11 +39,17 @@ DTP20, + + + DTP22, 41 = DTP41, 51 = DTP51, SS = SpectroScan,<br> + + + i1 = i1Pro, CM = ColorMunki</span><br style="font-family: monospace;"> <span style="font-family: monospace;"> </span><a @@ -54,6 +63,9 @@ size + + + by factor (e.g. 0.857 or 1.5 etc.)<br> </span></small><small><span style="font-family: monospace;"> </span><a style="font-family: monospace;" href="#A">-A scale</a><span @@ -66,6 +78,9 @@ additional + + + factor (e.g. 0.857 or 1.5 etc.)</span></small><br style="font-family: monospace;"> <small><span style="font-family: monospace;"></span><span @@ -81,6 +96,9 @@ additional + + + Don't randomize patch location</span><br style="font-family: monospace;"> <span style="font-family: monospace;"> </span><a @@ -94,6 +112,9 @@ recognition + + + (.cht) file</span><br style="font-family: monospace;"> <span style="font-family: monospace;"> </span><a style="font-family: monospace;" href="#S">-S</a><span @@ -106,6 +127,9 @@ don't + + + generate wide orientation strip.</span><br style="font-family: monospace;"> <span style="font-family: monospace;"> </span><a @@ -114,6 +138,9 @@ don't + + + Force colored spacers</span><br style="font-family: monospace;"> <span style="font-family: monospace;"> </span><a style="font-family: monospace;" href="#b">-b</a><span @@ -126,6 +153,9 @@ don't + + + Force no spacers</span><br style="font-family: monospace;"> <span style="font-family: monospace;"> </span><a style="font-family: monospace;" href="#f">-f</a><span @@ -133,6 +163,9 @@ don't + + + Create PostScript DeviceN Color fallback</span><br style="font-family: monospace;"> <span style="font-family: monospace;"> </span><a @@ -147,6 +180,9 @@ don't Separation or DeviceN<br> <a href="#o">-o k|n</a> + + + CMY colorspace encoding DefiveCMYK (def), inverted DeviceRGB or DeviceN<br style="font-family: monospace;"> </span> <span style="font-family: monospace;"> </span><a @@ -155,6 +191,9 @@ don't + + + Output EPS compatible file<br> <a href="#t">-t [res]</a> Output @@ -165,6 +204,9 @@ raster + + + file, optional res DPI (default 200)<br> <a href="#T">-T [res]</a> Output @@ -175,12 +217,18 @@ raster + + + file, optional res DPI (default 200)<br> </span></small><small><span style="font-family: monospace;"> <a href="#C">-C</a> + + + Don't use TIFF compression</span></small><br> <small><span style="font-family: monospace;"> <a href="#N">-N</a> Use @@ -191,11 +239,17 @@ channels + + + more than 4<br> <a href="#D">-D</a> + + + Dither 8 bit TIFF values down from 16 bit<br> <a href="#Q">-Q nbits</a> Quantize @@ -206,6 +260,9 @@ fit + + + in nbits<br> </span></small><small style="font-family: monospace;"> <span style="text-decoration: underline;">-</span><a href="#K">K @@ -221,6 +278,9 @@ fit + + + Use given random start number</span><br style="font-family: monospace;"> <span style="font-family: monospace;"> </span><a @@ -240,6 +300,9 @@ Set + + + a page margin in mm (default 6.0 mm)<br> </span></small><small><span style="font-family: monospace;"> </span><a style="font-family: monospace;" href="#M">-M margin</a><span @@ -247,6 +310,9 @@ Set + + + </span></small><small><span style="font-family: monospace;">Set a page margin in mm and include it in TIFF</span><span style="font-family: monospace;"></span></small><br> @@ -255,6 +321,9 @@ Set + + + Don't limit strip length</span></small><br> <small><span style="font-family: monospace;"> <a href="#L">-L</a> Suppress @@ -265,6 +334,9 @@ clip + + + border</span></small><br> <small><span style="font-family: monospace;"><small><span style="font-family: monospace;"> <a href="#U">-U</a> @@ -277,6 +349,9 @@ clip + + + Select page size from:</span><br style="font-family: monospace;"> <span style="font-family: monospace;"></span></small><small><span style="font-family: monospace;"> @@ -285,12 +360,18 @@ A4 + + + [210.0 x 297.0 mm]<br> A4R + + + [297.0 x 210.0 mm]<br> @@ -298,6 +379,9 @@ A3 + + + [297.0 x 420.0 mm] (default)<br> @@ -313,6 +397,9 @@ A3 + + + Legal [215.9 x 355.6 mm]<br> @@ -320,6 +407,9 @@ A3 + + + 4x6 [101.6 x 152.4 mm]<br> @@ -327,6 +417,9 @@ A3 + + + [279.4 x 431.8 mm]<br style="font-family: monospace;"> </span><span style="font-family: monospace;"> </span><a style="font-family: monospace;" href="#pp">-p WWWxHHH</a><span @@ -341,6 +434,9 @@ A3 + + + Base name for input(</span><a style="font-family: monospace;" href="File_Formats.html#.ti1">.ti1</a><span style="font-family: monospace;">), output(</span><a style="font-family: monospace;" @@ -371,6 +467,9 @@ A3 + + + </span>Normally, <b>printtarg</b> prints test patches that are the minimum size that can be reliably and accurately read by the instrument. For some media, it might be desirable to use test @@ -424,6 +523,9 @@ A3 + + + bi-directional</a> strip reading in instruments such as the i1pro.<br> <br> <a name="s"></a> The <b>-s</b> flag does two things. One is that it @@ -448,6 +550,9 @@ A3 generally work less reliably than colored spacers. <a name="n"></a>The + + + <b>-n</b> flag will cause spacers to be omitted, which may still work with smaller numbers of test values when the patch selection is randomized, but won't work successfully when a large number of test @@ -496,10 +601,18 @@ A3 be 100 Dots Per Inch (DPI), but this can be changed by providing an optional DPI argument after the <span style="font-weight: bold;">-t</span> or <span style="font-weight: bold;">-T</span> flag. If the <span - style="font-weight: bold;">-t</span> flag is used, than an 8 bit + style="font-weight: bold;">-t</span> flag is used, then an 8 bit per component TIFF file will be created. If the <span style="font-weight: bold;">-T</span> flag is used, then a 16 bit - per component TIFF file will be created.<br> + per component TIFF file will be created. Note that if 8 bit TIFF<span + style="font-weight: bold;"></span> output is selected (<span + style="font-weight: bold;">-t</span>) without dithering (no <span + style="font-weight: bold;">-D) </span>then the values will by + default be quantized to 8 bits, and that if 16 bit TIFF<span + style="font-weight: bold;"></span> output is selected (<span + style="font-weight: bold;">-T</span>) or 8 bit TIFF with dithering + (<span style="font-weight: bold;">-D)</span>, then the values will + by default be quantized to 16 bits (see <a href="#Q">-Q</a> flag)<br> <br> <a name="C"></a><span style="font-weight: bold;">-C:</span> Normally the TIFF files created will be compressed using LZW compression to @@ -537,11 +650,11 @@ A3 quantized to. In many systems the right value would be 8 bits. Note that if 8 bit TIFF<span style="font-weight: bold;"></span> output is selected (<span style="font-weight: bold;">-t</span>) without - dithering (no <span style="font-weight: bold;">-D) </span>that the + dithering (no <span style="font-weight: bold;">-D) </span>then the values will by default be quantized to 8 bits, and that if 16 bit TIFF<span style="font-weight: bold;"></span> output is selected (<span style="font-weight: bold;">-T</span>) or 8 bit TIFF with dithering - (<span style="font-weight: bold;">-D) </span>that the values will + (<span style="font-weight: bold;">-D)</span>, then the values will by default be quantized to 16 bits.<br> <br> <a name="K"></a> The <b>-K file.cal</b> parameter specifies a @@ -570,13 +683,13 @@ A3 label printed on the right hand side of each chart.<br> <br> <a name="x"></a> The <b>-x</b> parameter allows specifying the - labelling sequence used for strips (e.g. the X axis of the chart). - By default this will be a character sequence A, B, C .. Z. AA, AB, - AC .. ZZ, but this can be changed by specifying an alternate - labelling sequence pattern. The pattern specifies the labelling - sequence as follows: First comes the definition of the symbols for - each digit location, least significant to most significant, each - digit separated by the ',' character. Note that space is a valid + labeling sequence used for strips (e.g. the X axis of the chart). By + default this will be a character sequence A, B, C .. Z. AA, AB, AC + .. ZZ, but this can be changed by specifying an alternate labeling + sequence pattern. The pattern specifies the labeling sequence as + follows: First comes the definition of the symbols for each digit + location, least significant to most significant, each digit + separated by the ',' character. Note that space is a valid character. The number of definitions declares the maximum number of digits. For example, for a 2 digit numerical sequence: "0123456789, 123456789" would define 0..99 with the most significant digit @@ -597,11 +710,11 @@ A3 the following might be used: "A-Z, 2-9;A-X,2A-9Z".<br> <br> <a name="y"></a> The <b>-y</b> parameter allows specifying the - labelling sequence used for patches (e.g. the Y axis of the chart). + labeling sequence used for patches (e.g. the Y axis of the chart). By default this will be a number sequence 1, 2, ..10, 11, ... 999, - but this can be changed by specifying an alternate labelling - sequence pattern. See the above description for the labelling - sequence encoding.<br> + but this can be changed by specifying an alternate labeling sequence + pattern. See the above description for the labeling sequence + encoding.<br> <br> <span style="font-weight: bold;">NOTE</span> that the pattern chosen for the X and Y axes of the chart must be distinguishable, e.g. if @@ -614,10 +727,16 @@ A3 the DeviceGray representation (<span style="font-weight: bold;">-wg</span>), + + + but Device RGB can also be used, where the R, G &B values are all set to the same value (<span style="font-weight: bold;">-wr</span>), + + + a <span style="font-weight: bold;">White</span> separation color can be specified (<span style="font-weight: bold;">-ws</span>), or a DeviceN <span style="font-weight: bold;">White</span> color can be @@ -635,6 +754,9 @@ also + + + be used, where the CMY values are zero, and just the K channel is used (<span style="font-weight: bold;">-kc</span>), a <span style="font-weight: bold;">Black</span> separation color can be @@ -648,6 +770,9 @@ also style="font-weight: bold;">-ok</span>) where the K value is always zero, or inverted Device RGB (<span style="font-weight: bold;">-or</span>), + + + or as a 3 channel DeviceN colorsoace can be used (<span style="font-weight: bold;">-on</span>).<br> <br> @@ -676,7 +801,7 @@ also <a name="P"></a> The <b>-P</b> flag disables any normal limiting of strip length that would normally be imposed due to guide or instrument limitations. There is still an upper limit of around 500 - patches or 2Meters though. Note that if you generate a strip larger + patches or 2 Meters though. Note that if you generate a strip larger than the instrument can cope with, it may be unable to read the strip.<br> <br> @@ -698,6 +823,9 @@ also + + + can be specified in millimeters. Limitations of the instrument may limit the maximum number of patches in a strip. For SpectroScan, a size of A4 or Letter (or smaller) should be used. Useful diff --git a/doc/profcheck.html b/doc/profcheck.html index 079190c..0676c14 100644..100755 --- a/doc/profcheck.html +++ b/doc/profcheck.html @@ -31,6 +31,8 @@ Show + + CIE94 delta E values</span><br style="font-family: monospace;"> <span style="font-family: monospace;"> -k @@ -45,6 +47,8 @@ create + + X3DOM visualization (iccprofile.x3d.html)</span><br style="font-family: monospace;"> <span style="font-family: monospace;"> -x @@ -56,6 +60,8 @@ Use + + X3DOM axes<br> -m Make @@ -66,6 +72,8 @@ X3DOM + + lines a minimum of 0.5<br style="font-family: monospace;"> </span><span style="font-family: monospace;"> -e Color @@ -76,9 +84,13 @@ vectors + + acording to delta E<br> -s + + Sort output by delta E<br> -h @@ -86,6 +98,8 @@ vectors + + Plot a histogram of delta E's<br> -P de @@ -102,6 +116,8 @@ Specify + + a device value to sort against</span><br style="font-family: monospace;"> <span style="font-family: monospace;"> -p @@ -113,6 +129,8 @@ Sort + + device value by PCS/Lab target</span><br style="font-family: monospace;"> <span style="font-family: monospace;">-f @@ -125,6 +143,8 @@ Sort + + M0, M1, M2, A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp]<br> -i illum Choose @@ -137,6 +157,8 @@ Sort + + A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp</span><span style="font-family: monospace;"></span><br style="font-family: monospace;"> @@ -151,11 +173,15 @@ Sort + + 1931_2 </span></small><small><span style="font-family: monospace;">(def.)</span></small><small><span - style="font-family: monospace;">, 1964_10, S&B 1955_2, shaw, - J&V 1978_2</span></small><small><span style="font-family: - monospace;"><br> + style="font-family: monospace;">, 1964_10, </span></small><small><span + style="font-family: monospace;"><tt><small>2012_2, 2012_10, </small></tt>S&B + + 1955_2, shaw, J&V 1978_2</span></small><small><span + style="font-family: monospace;"> or file.cmf<br> -I intent r = relative colorimetric, a = absolute (default)<br style="font-family: monospace;"> @@ -189,6 +215,8 @@ Sort test point on a line. The line consists of:<br> <b>[</b><i>Delta_E</i><b>]</b><i> Patch_no</i><b>:</b><i> Device values </i><b>-></b><i> Profile PCS values </i><b>should + + be</b><i> .ti3 PCS values</i><br> <br> The <b>-c</b> option causes the differences between the test values @@ -286,12 +314,18 @@ Sort observer. The default.<br> <b>1964_10</b> selects the standard CIE 1964 10 degree observer.<br> + <b> 2012_2</b> selects the proposed CIE 2012 2 degree + observer.<br> + <b>2012_10</b> selects the proposed CIE 2012 10 degree + observer.<br> <b>1955_2</b> selects the Stiles and Birch 1955 2 degree observer<br> <b>1978_2 </b>selects the Judd and Voss 1978 2 degree observer<br> <b>shaw</b> selects the Shaw and Fairchild 1997 2 degree observer<br> + <i><b>file.cmf</b></i> selects an observer specified by the + given <a href="File_Formats.html#.cmf">.cmf</a> file.<br> <br> The same parameter value should be used as was used during the creation of the profile.<br> diff --git a/doc/refine.html b/doc/refine.html index 36a0ae4..d83e757 100644..100755 --- a/doc/refine.html +++ b/doc/refine.html @@ -3,7 +3,7 @@ <head> <title>refine</title> <meta http-equiv="content-type" content="text/html; - charset=ISO-8859-1"> + charset=windows-1252"> <meta name="author" content="Graeme Gill"> </head> <body> @@ -24,26 +24,35 @@ correction profile in as well, iterative improvement can be made to the proofing reproduction.<br> <br> - <a href="colverify.html">colverify</a> is a useful tool to use on the two - test charts, to check how well the refinement is proceeding. If a - white point relative match is being created (refine -R), then use - veryify -N.<br> + <a href="colverify.html">colverify</a> is a useful tool to use on + the two test charts, to check how well the refinement is proceeding. + If a white point relative match is being created (refine -R), then + use veryify -N.<br> <h3>Usage Summary</h3> <tt><small>usage: refine [-options] cietarget ciecurrent [outdevicc] [inabs] outabs<br> -v + + + Verbose<br> -c Create + + + initial abstract correction profile<br> -g Don't + + + impose output device gamut limit<br> -r res Set abstract profile clut resolution (default 33)<br> @@ -53,14 +62,20 @@ Don't Aim + + + for white point relative match rather than absolute<br> - </small></tt><tt><small><small></small><small><small>-f + </small></tt><tt><small><small><small>-f [illum] Use Fluorescent Whitening Agent compensation [opt. simulated inst. illum.:<br> + + + M0, M1, M2, A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp]<br> -i illum Choose @@ -70,6 +85,9 @@ Aim + + + A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp</small></small><br> -o observ Choose CIE Observer for spectral data:<br> @@ -77,25 +95,45 @@ Aim 1931_2, - 1964_10, S&B 1955_2, J&V 1978_2 (def.)<br> + + + + 1964_10, </small></tt><tt><small><tt><small>2012_2 (def.), + 2012_10, </small></tt>S&B 1955_2, J&V 1978_2 or + file.cmf<br> <span style="font-style: italic;">cietarget </span> + + + Target CIE or spectral values, CGATS file (e.g. .ti3)<br> <span style="font-style: italic;">ciecurrent</span> + + + Actual CIE or spectral values, CGATS file (e.g. .ti3)<br> [<span style="font-style: italic;">outdevicc</span>] + + + Output device ICC profile to set gamut limit (not used if -g)<br> [<span style="font-style: italic;">inabs</span>] Previous + + + abstract correction ICC profile (not used if -c)<br> <span style="font-style: italic;">outabs</span> Created/refined + + + abstract correction ICC profile</small></tt><br> <h3>Usage Details</h3> <b>refine</b> provides a way of improving the profile accuracy of a @@ -148,9 +186,9 @@ Created/refined illumination spectrum to be used as the similated instrument illuminant, overriding the default <b>D50</b> or CIE computation illuminant used for FWA (see <b>-i</b> below<b>). </b>See <a - href="colprof.html#f">colprof -f</a> for - a fuller explanation. The same value should be used as was used - during the creation of the profile.<br> + href="colprof.html#f">colprof -f</a> for a fuller explanation. The + same value should be used as was used during the creation of the + profile.<br> <br> The <b>-i</b> flag allows specifying a standard or custom illumination spectrum, applied to the spectral test point values to @@ -158,9 +196,8 @@ Created/refined D65</b>, <b>F5</b>, <b>F8</b>, <b>F10</b> are a selection of standard illuminant spectrums, with <b>D50</b> being the default. If a filename is specified instead, it will be assumed to be an - Argyll specific <a - href="File_Formats.html#.sp">.sp</a> - spectrum file. If FWA compensation is used during measurement, this + Argyll specific <a href="File_Formats.html#.sp">.sp</a> spectrum + file. If FWA compensation is used during measurement, this illuminant will be used by default as the simulated instrument illuminant. The same value should be used as was used during the creation of the profile.<br> @@ -172,12 +209,17 @@ Created/refined observer.<br> <b>1964_10</b> selects the standard CIE 1964 10 degree observer.<br> + <b> 2012_2</b> selects the proposed CIE 2012 2 degree observer<br> + <b>2012_10</b> selects the proposed CIE 2012 10 degree + observer<br> <b>1955_2</b> selects the Stiles and Birch 1955 2 degree observer<br> <b>1978_2 </b>selects the Judd and Voss 1978 2 degree observer<br> <b>shaw</b> selects the Shaw and Fairchild 1997 2 degree observer<br> + <i><b>file.cmf</b></i> selects an observer specified by the + given <a href="File_Formats.html#.cmf">.cmf</a> file.<br> <br> If both CIE and spectral values are present in the input files, the CIE values will be used by default. Using the <span @@ -192,6 +234,9 @@ Created/refined Is + + + the filename of the target CIE or spectral values. This is a <a href="File_Formats.html#CGATS">CGATS</a> file (e.g. a <a href="File_Formats.html#.ti3">.ti3</a> made using <a @@ -213,6 +258,9 @@ Is If + + + the <span style="font-weight: bold;">-g</span> flag is not used, then the output device ICC profile should be supplied here, to allow <span style="font-weight: bold;">refine</span> to limit its @@ -222,6 +270,9 @@ If After + + + the first correction has been created, subsequent corrections need to improve upon previous ones, so the previous correction profile should be provided here. For the first correction, the <span @@ -232,6 +283,9 @@ After The + + + name of the created or refined abstract correction ICC profile<br> <br> <h3> Discussion</h3> @@ -300,6 +354,9 @@ The style="font-weight: bold;"><span style="font-weight: bold;"></span>proofer.icm + + + </span>or <span style="font-weight: bold;">target_proofer.icm</span>, with the addition of the "-p fix1.icm" option to specify the abstract correction profile be applied.<br> @@ -321,6 +378,9 @@ The can + + + then start another round of improvement:<br> <br> We refine our previous abstract correction fix profile using @@ -356,6 +416,9 @@ can increment the names of the <span style="font-weight: bold;">fixN.icm</span>, + + + <span style="font-weight: bold;">proofer_fixN.icm</span> or <span style="font-weight: bold;">target_proofer_fixN.icm</span> and <span style="font-weight: bold;">chartN.ti3</span>files. Stop when diff --git a/doc/revfix.html b/doc/revfix.html index 4892de2..4892de2 100644..100755 --- a/doc/revfix.html +++ b/doc/revfix.html diff --git a/doc/scanin.html b/doc/scanin.html index 96d3cc2..96d3cc2 100644..100755 --- a/doc/scanin.html +++ b/doc/scanin.html diff --git a/doc/sl.jpg b/doc/sl.jpg Binary files differindex aaf330f..aaf330f 100644..100755 --- a/doc/sl.jpg +++ b/doc/sl.jpg diff --git a/doc/spec2cie.html b/doc/spec2cie.html index 2780161..d973289 100644..100755 --- a/doc/spec2cie.html +++ b/doc/spec2cie.html @@ -11,12 +11,17 @@ <h3>Summary</h3> Convert spectral <a href="File_Formats.html#.ti3">.ti3</a> or <a href="File_Formats.html#.sp">.sp</a> readings into CIE XYZ and D50 - L*a*b* readings. Apply FWA, plot spectrums.<br> + L*a*b* readings. Apply FWA, plot spectrums. Convert to/from XRGA + standard.<br> This is assumed to be for a reflective media by default - i.e. that the input .ti3 or .sp file values are spectral reflectances, unless the input is marked as <span style="font-weight: bold;">DEVICE_CLASS</span> + + + + <span style="font-weight: bold;">EMISINPUT</span> (See the <a href="ti3_format.html">description of the .ti3 format</a>. This would have to be done manually, as no ArgyllCMS tools generate such @@ -29,52 +34,71 @@ + + + + output.[ti3|sp]<br> </span></small></tt><tt><small>-v - + + + + + Verbose mode<br> + <a href="A">-A NN|AX|AG|XA|XG|GA|GX</a> XRGA + conversion (default NN)<br> + </small></tt> <tt><small><small> <a href="#I">-I <i>illum</i></a> + - Verbose mode</small></tt><br> - <tt><small><small> <a href="spec2cie.html#I">-I <i>illum</i></a> - Override actual - instrument illuminant in .ti3 or .sp file:<br> + + + + + + + Override actual instrument illuminant in .ti3 or .sp file:<br> - A, C, D50, D50M2, - D65, F5, F8, F10 or file.sp<br> - + + A, C, D50, D50M2, D65, F5, F8, F10 or file.sp<br> + + + (only used in conjunction + with <span style="font-weight: bold;">-f</span>)<br> + </small></small></tt><tt><small><small> <a href="#f">-f [<i>illum</i>]</a> + + Use Fluorescent Whitening Agent compensation [simulated inst. + illum.:<br> + - (only used in conjunction with <span style="font-weight: - bold;">-f</span>)<br> - </small></small></tt><tt><small><small> <a - href="colprof.html#f">-f [<i>illum</i>]</a> - Use Fluorescent Whitening - Agent compensation [simulated inst. illum.:<br> - + M0, M1, M2, A, C, D50 (def.), + D50M2, D65, F5, F8, F10 or file.sp]<br> + </small></small></tt><tt><small><small><small> <a href="#i">-i + <i>illum</i></a> + - M0, M1, M2, A, C, D50 (def.), D50M2, D65, F5, F8, F10 or - file.sp]<br> - </small></small></tt><tt><small><small><small> <a - href="spec2cie.html#i">-i <i>illum</i></a> - Choose illuminant for - computation of CIE XYZ from spectral data & FWA:<br> + + + Choose illuminant for computation of CIE XYZ from spectral + data & FWA:<br> - A, C, D50 - (def.), D50M2, D65, F5, F8, F10 or file.sp<br> + + A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp<br> </small></small><a href="#o">-o <i>observ</i></a> @@ -82,20 +106,28 @@ - Choose CIE Observer for - spectral data:<br> + + + + + + + + + Choose CIE Observer for spectral data:<br> - - + + 1931_2 </small></tt><tt><small> + (def.)</small></tt><tt><small>, 1964_10, </small></tt><tt><small><tt><small>2012_2, - 1931_2 </small></tt><tt><small> (def.)</small></tt><tt><small>, - 1964_10, S&B 1955_2, shaw, J&V 1978_2 or file.cmf<br> - <a href="#p">-n</a> + 2012_10, </small></tt>S&B 1955_2, shaw, J&V 1978_2 + or file.cmf<br> + <a href="#p">-n</a> Don't output @@ -104,15 +136,25 @@ output + + + + spectral values<br> </small></tt><tt><small> <a href="#p">-p</a> - + + + + + Plot each values spectrum</small></tt><tt><br> </tt><tt> </tt><tt><small> <span style="font-style: italic;">input.[ti3|sp]</span> - Measurement file<br> + + Measurement file<br> <span style="font-style: italic;">output.[ti3</span>|sp] - Converted measurement file</small></tt><br> + Converted + measurement file</small></tt><br> <h3>Comments</h3> This program takes the (usually reflective) spectral data in a .ti3 or .sp file, converts them to XYZ and D50 L*a*b* and fills the @@ -131,12 +173,36 @@ output spectra don't have an illuminant, and will simply be converted to XYZ using the given observer. <br> <br> + <a name="A"></a>The <b>-A</b> parameter allows specifying a + conversion between the <a href="XRGA.html">XRGA</a> measurement + standards:<br> + <br> + The <b>NN</b> argument + disabled any conversion.<br> + The <b>AX</b> argument + converts from XRGA to XRDI<br> + The <b>AG</b> argument + converts from XRGA to GMDI<br> + The <b>XA</b> argument + converts from XRDI to XRGA<br> + The <b>XG</b> argument + converts from XRDI to GMDI<br> + The <b>GA</b> argument + converts from GMDI to XRGA<br> + The <b>GX</b> argument + converts from GMDI to XRDI<br> + <br> + A warning will be issued if the "from" setting doesn't match that + contained in the .ti3 file.<br> + <br> + (XRGA = Modern X-Rite, XRDI = Historical X-Rite, GMD = Historical + GretagMacbeth).<br> <br> <a name="I"></a>The <b>-I</b> parameter allows specifying a an illumination spectrum for the actual instrument illuminant, overriding that computed from the type of instrument (recorded in - the .ti3 file). This is rarely used. This parameter is can only be - used in combination with the <span style="font-weight: bold;">-f</span> + the .ti3 file). This is rarely used. This parameter can only be used + in combination with the <span style="font-weight: bold;">-f</span> flag. If a filename is specified instead, it will be assumed to be an Argyll specific <a href="File_Formats.html#.sp">.sp</a> custom spectrum file. Illuminant details are:<br> @@ -169,6 +235,10 @@ output + + + + <a href="colprof.html#f">colprof -f</a> for a fuller explanation. <br> <br> <a name="i"></a>The <b>-i</b> parameter allows specifying a @@ -218,14 +288,17 @@ output (the default).<br> <b>1964_10</b> selects the standard CIE 1964 10 degree observer.<br> + <b> 2012_2</b> selects the proposed CIE 2012 2 degree observer<br> + <b>2012_10</b> selects the proposed CIE 2012 10 degree + observer<br> <b>1955_2</b> selects the Stiles and Birch 1955 2 degree observer<br> <b>1978_2 </b>selects the Judd and Voss 1978 2 degree observer<br> <b>shaw</b> selects the Shaw and Fairchild 1997 2 degree observer<br> - <br> - or a .cmf file can be provided as an argument.<br> + <i><b>file.cmf</b></i> selects an observer specified by the + given <a href="File_Formats.html#.cmf">.cmf</a> file.<br> <br> Note that if an observer other than 1931 2 degree is chosen, the resulting ICC profile will not be standard, and cannot be freely diff --git a/doc/specplot.html b/doc/specplot.html index 45c9f72..45c9f72 100644..100755 --- a/doc/specplot.html +++ b/doc/specplot.html diff --git a/doc/splitti3.html b/doc/splitti3.html index 05bad37..05bad37 100644..100755 --- a/doc/splitti3.html +++ b/doc/splitti3.html diff --git a/doc/spotread.html b/doc/spotread.html index 36ee999..143b61e 100644..100755 --- a/doc/spotread.html +++ b/doc/spotread.html @@ -56,6 +56,11 @@ + + + + + Verbose mode</span><br style="font-family: monospace;"> <span style="font-family: monospace;"></span><span @@ -98,6 +103,11 @@ + + + + + Print spectrum for each reading.</span></small><br style="font-family: monospace;"> <small><span style="font-family: monospace;"></span><span @@ -145,6 +155,11 @@ + + + + + Set COM port, 1..4 (default 1)</span><span style="font-family: monospace;"></span><span style="font-family: monospace;"><br style="font-family: monospace;"> @@ -186,6 +201,11 @@ + + + + + Use transmission measurement mode</span><br style="font-family: monospace;"> <span style="font-family: monospace;"> </span><a style=" @@ -227,6 +247,11 @@ + + + + + Use emissive measurement mode (absolute results)<br> </span></small><small><span style="font-family: monospace;"> </span><a style=" font-family: monospace;" href="#eb">-eb</a><span @@ -267,6 +292,11 @@ + + + + + Use display white brightness relative measurement mode<br> </span></small><small><span style="font-family: monospace;"> </span><a style=" font-family: monospace;" href="#ew">-ew</a><span @@ -290,6 +320,11 @@ + + + + + Use display white point relative chromatically adjusted mode<br> </span></small><small><span style="font-family: monospace;"> </span><a style=" font-family: monospace;" href="#p">-p</a><span @@ -330,6 +365,11 @@ + + + + + Use telephoto measurement mode (absolute results)<br> </span></small><small><span style="font-family: monospace;"> </span><a style=" font-family: monospace;" href="#pb">-pb</a><span @@ -370,6 +410,11 @@ + + + + + Use </span></small><small><span style="font-family: monospace;">projector</span></small><small><span style="font-family: monospace;"> white brightness relative measurement mode<br> @@ -412,6 +457,11 @@ + + + + + Use </span></small><small><span style="font-family: monospace;">projector</span></small><small><span style="font-family: monospace;"> </span></small><small><span style="font-family: monospace;">white point relative @@ -455,6 +505,11 @@ + + + + + Use ambient measurement mode (absolute results)<br> <a href="#f">-f</a> @@ -492,6 +547,11 @@ + + + + + Use ambient flash measurement mode (absolute results)<br> </span></small><font size="-1"><span style="font-family: monospace;"> <a href="#y">-y X</a> @@ -531,6 +591,11 @@ + + + + + Display type - instrument specific list to choose from.</span></font><br> <small><span style="font-family: monospace;"> </span><a style="font-family: monospace;" href="spotread.html#I">-I illum</a><span @@ -568,6 +633,11 @@ M0, + + + + + M1, M2, A, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp</span></small><br style="font-family: monospace;"> <small><span style="font-family: monospace;"></span><span @@ -622,6 +692,11 @@ D50 + + + + + D50M2, D65, F5, F8, F10 or file.sp</span><br style="font-family: monospace;"> <span style="font-family: monospace;"> </span><a style=" @@ -666,13 +741,20 @@ D50 + + + + + </span></small><small><span style="font-family: monospace;">1931_2 </span></small><small><span style="font-family: monospace;"> (def.)</span></small><small><span - style="font-family: monospace;">, 1964_10, S&B 1955_2, shaw, - J&V 1978_2</span></small><small><span style="font-family: - monospace;"></span></small><font size="-1"><span - style="font-family: monospace;"><br> + style="font-family: monospace;">, 1964_10, </span></small><small><span + style="font-family: monospace;"><tt><small>2012_2, 2012_10, </small></tt>S&B + + 1955_2, shaw, J&V 1978_2</span></small><small><span + style="font-family: monospace;"></span></small><font size="-1"><span + style="font-family: monospace;"> or file.cmf<br> <a href="#F">-F filter</a> @@ -709,6 +791,11 @@ D50 + + + + + Set filter configuration:<br> n @@ -747,6 +834,11 @@ D50 + + + + + None<br> p @@ -785,6 +877,11 @@ D50 + + + + + Polarising filter<br> 6 @@ -823,6 +920,11 @@ D50 + + + + + D65<br> u @@ -861,6 +963,11 @@ D50 + + + + + U.V. Cut<br> <a href="#E">-E extrafilterfile</a> Apply extra filter compensation file<br> @@ -872,6 +979,11 @@ D50 + + + + + XRGA conversion (default N)<br> </span></font><font size="-1"><span style="font-family: monospace;"> <a href="#x">-x</a> @@ -911,6 +1023,11 @@ D50 + + + + + Display Yxy instead of Lab<br> </span></font><font size="-1"><span style="font-family: monospace;"> <a href="#h">-h</a> @@ -950,9 +1067,59 @@ D50 + + + + + Display LCh instead of Lab</span></font><br> - <font size="-1"><span style="font-family: monospace;"> <a - href="#V">-V</a> + <font size="-1"><span style="font-family: monospace;"><font + size="-1"><span style="font-family: monospace;"> <a + href="#u">-u</a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Display Luv instead of Lab</span></font><br> + </span></font> <font size="-1"><span style="font-family: + monospace;"> <a href="#V">-V</a> @@ -989,6 +1156,11 @@ D50 + + + + + Show running average and std. devation from ref.</span></font><br> <font size="-1"><span style="font-family: monospace;"> <a href="#T">-T</a> @@ -1028,6 +1200,11 @@ D50 + + + + + Display correlated color temperatures, CRI and TLCI<br> </span></font><font size="-1"><span style="font-family: monospace;"> <a href="#N">-N</a> @@ -1066,6 +1243,11 @@ D50 + + + + + Disable initial calibration of instrument if possible</span></font><br> <font size="-1"><span style="font-family: monospace;"> <a href="spotread.html#O">-O</a> @@ -1105,6 +1287,11 @@ D50 + + + + + Do one cal. or measure and exit</span></font><br> <font size="-1"><span style="font-family: monospace;"> </span><a style="font-family: monospace;" href="#H">-H</a><span @@ -1119,6 +1306,11 @@ D50 + + + + + Preset reference to spectrum<br> </span></font><font size="-1"><span style="font-family: monospace;"><a href="#X1">-X file.ccmx</a> @@ -1157,6 +1349,11 @@ D50 + + + + + Apply Colorimeter Correction Matrix</span></font><br> <span style="font-family: monospace;"> <a href="#X2">-X file.ccss</a> @@ -1200,6 +1397,11 @@ Samples + + + + + for calibration</span><br> <font size="-1"><span style="font-family: monospace;"> </span><a style=" font-family: monospace;" href="#Yrn">-<font size="-1">Y</font> @@ -1232,6 +1434,11 @@ Samples + + + + + Override refresh, non-refresh display mode</span></font><br> <tt> <a href="#YR">-Y R:<i>rate</i></a> @@ -1254,6 +1461,11 @@ Samples + + + + + Override measured refresh rate with rate Hz</tt><br> <font size="-1"><span style="font-family: monospace;"> </span><a style=" font-family: monospace;" href="#YA">-<font size="-1">Y </font>A</a><span @@ -1268,6 +1480,11 @@ Samples + + + + + Save white tile ref. spectrum to file</tt><br> <tt> <a href="#YL">-Y L</a> Test for i1Pro Lamp @@ -1317,6 +1534,11 @@ none, + + + + + h = HW, x = Xon/Xoff</span></font><br> <small><span style="font-family: monospace;"> </span><a style=" font-family: monospace;" href="#D">-D [level]</a><span @@ -1360,6 +1582,11 @@ none, + + + + + Optional file to save reading results<br style="font-family: monospace;"> </span></font><small><span style="font-family: monospace;"></span><span @@ -1386,10 +1613,10 @@ none, The Graph plots light wavelength on the X axis, and either absolute or relative level on the Y axis. <br> <br> - <table border="1" cellpadding="0" cellspacing="0" width="200" - height="153"> + <table width="200" height="153" cellspacing="0" cellpadding="0" + border="1"> </table> - <table border="1" cellpadding="0" cellspacing="0"> + <table cellspacing="0" cellpadding="0" border="1"> <tbody> <tr> <th valign="top"> Measurement Mode <br> @@ -1427,6 +1654,11 @@ none, + + + + + <br> </td> </tr> @@ -1522,6 +1754,11 @@ none, Rendering Index (<a href="#T">see <span style="font-weight: bold;">-T</span></a>). + + + + + If the instrument does not support ambient mode, emissive mode will be used instead. An adaptive integration time will be used in devices that support it. <br> @@ -1565,6 +1802,11 @@ none, reflectance instrument illuminant when FWA compensation is used during <u>measurement</u>, overriding the default <b>D50</b> or CIE computation illuminant used for FWA (see <b>-i</b> below<b>). </b>If + + + + + intending to use standard <b>M0</b>, <b>M1</b> or <b>M2</b> conditions, then use just the <b>-I</b> option and not the <b>-i</b> option. See <a href="colprof.html#f">colprof -f</a> for a fuller @@ -1593,12 +1835,17 @@ none, observer. The default.<br> <b>1964_10</b> selects the standard CIE 1964 10 degree observer.<br> + <b> 2012_2</b> selects the proposed CIE 2012 2 degree observer<br> + <b>2012_10</b> selects the proposed CIE 2012 10 degree + observer<br> <b>1955_2</b> selects the Stiles and Birch 1955 2 degree observer<br> <b>1978_2 </b>selects the Judd and Voss 1978 2 degree observer<br> <b>shaw</b> selects the Shaw and Fairchild 1997 2 degree observer<br> + <i><b>file.cmf</b></i> selects an observer specified by the + given <a href="File_Formats.html#.cmf">.cmf</a> file.<br> <br> <a name="F"></a>The <b>-F</b> options allows configuring the instrument to have a particular filter fitted to it. Some @@ -1638,6 +1885,10 @@ none, displayed as XYZ and LCh values, rather than the default XYZ and L*a*b*<br> <br> + <a name="u"></a>The <b>-u</b> option causes the reading to be + displayed as XYZ and L*u*v* values, rather than the default XYZ and + L*a*b*<br> + <br> <a name="V"></a>The <b>-V</b> enables average and standard deviation statistics on the XYZ and L*a*b* values. This start and is reset whenever a reference is taken ('r' key). A side effect of this @@ -1657,9 +1908,12 @@ none, also shown for each. The Color Rendering Index (CRI Ra) including the R9 value, plus the TLCI (Qa) is also computed if the instrument is capable of spectral measurement. If the notation <span - style="font-weight: bold;">(Invalid)</span> is displayed after the - CRI or TLCI, then this means that the the spectrum white point is to - far from the black body and Daylight locus to be meaningful.<br> + style="font-weight: bold;">(Caution)</span> is displayed after the + CRI or TLCI, then this means that the the spectrum white point is + beyond the standard tolerance distance from the black body or + Daylight illuminant locus. This may make the CRI or TLCI measurement + less accurate, and indicates that the illuminant may be a lower + quality source of light.<br> <br> <a name="N"></a> <span style="font-weight: bold;">-N</span> Any instrument that requires regular calibration will ask for @@ -1706,7 +1960,9 @@ none, information (ie. the X-Rite <span style="font-weight: bold;">i1d3</span>, or the DataColor <span style="font-weight: bold;">Spyder4 & Spyder5</span>).This can improve a colorimeters accuracy for a - particular type of display.<br> + particular type of display. A list of contributed <span + style="font-weight: bold;">ccss</span> files is <a + href="ccsss.html">here</a>.<br> <br> <a name="Yrn"></a> The -<span style="font-weight: bold;">Y r </span>and @@ -1736,6 +1992,11 @@ none, + + + + + <b>-Y n</b> options overrides the refresh display mode set by the <a href="#y">-y display type selection</a>, with <b>-Y</b><span style="font-weight: bold;"> r</span> forcing refresh display mode, diff --git a/doc/srgbplot.gif b/doc/srgbplot.gif Binary files differindex 6226a97..6226a97 100644..100755 --- a/doc/srgbplot.gif +++ b/doc/srgbplot.gif diff --git a/doc/ss.jpg b/doc/ss.jpg Binary files differindex 93875a5..93875a5 100644..100755 --- a/doc/ss.jpg +++ b/doc/ss.jpg diff --git a/doc/surface.jpg b/doc/surface.jpg Binary files differindex cf412fb..cf412fb 100644..100755 --- a/doc/surface.jpg +++ b/doc/surface.jpg diff --git a/doc/synthcal.html b/doc/synthcal.html index 229f506..229f506 100644..100755 --- a/doc/synthcal.html +++ b/doc/synthcal.html diff --git a/doc/synthread.html b/doc/synthread.html index 116a43d..d5cc57e 100644..100755 --- a/doc/synthread.html +++ b/doc/synthread.html @@ -1,166 +1,189 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> -<head> - <title>fakeread</title> - <meta http-equiv="content-type" - content="text/html; charset=ISO-8859-1"> - <meta name="author" content="Graeme Gill"> -</head> -<body> -<h2><b>spectro/synthread</b></h2> -<h3>Summary</h3> -Simulate the measurement of a devices response using a synthetic device -model. This is intended for testing of profile creation accuracy. A -device link -separation or color space conversion can be applied before the -print/measure simulation.<br> -<h3>Usage</h3> -<small><span style="font-family: monospace;">synthread [-v] </span></small><small><span - style="font-family: monospace;">[<span style="font-style: italic;">separation.ic<span - style="font-family: monospace;">m</span></span>]</span></small><small><span - style="font-family: monospace;"></span><span - style="font-family: monospace;"> </span><i - style="font-family: monospace;">inoutfile</i><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -v - Verbose mode</span><span - style="font-family: monospace;"></span><span - style="font-family: monospace;"></span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> -p -Use separation profile</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -l -Output Lab rather than XYZ<br> -<br style="font-family: monospace;"> -</span><span style="font-family: monospace;"> -0 -pow -Apply power to input device chanel 0-9 (after sep.)<br> -<br style="font-family: monospace;"> -</span><span style="font-family: monospace;"> -r -level -Add average random deviation of <level>% to input device values -(after sep.)</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> -R -level -Add average random deviation of <level>% to output PCS values<br> -</span></small><small><span style="font-family: monospace;"> -u - - -Make random deviations have uniform distributions rather than normal</span></small><br - style="font-family: monospace;"> -<small><span style="font-family: monospace;"></span><span - style="font-family: monospace;"> -b -L,a,b -Scale black point to target Lab value</span><br - style="font-family: monospace;"> -<span style="font-family: monospace;"> [<span - style="font-style: italic;">separation.icm</span>] -Device link separation profile</span><br style="font-family: monospace;"> -<span style="font-family: monospace;"> </span><i - style="font-family: monospace;">profile.</i><span - style="font-family: monospace;">[icm|mpp|ti3] </span><a - style="font-family: monospace;" href="File_Formats.html#ICC">ICC</a><span - style="font-family: monospace;">, </span><a - style="font-family: monospace;" href="File_Formats.html#MPP">MPP</a><span - style="font-family: monospace;"> -or </span><a style="font-family: monospace;" - href="File_Formats.html#.ti3">.ti3</a><span - style="font-family: monospace;"> -profile/file to use</span><br style="font-family: monospace;"> + <head> + <title>synthread</title> + <meta http-equiv="content-type" content="text/html; + charset=windows-1252"> + <meta name="author" content="Graeme Gill"> + </head> + <body> + <h2><b>spectro/synthread</b></h2> + <h3>Summary</h3> + Simulate the measurement of a devices response using a synthetic + device + model. This is intended for testing of profile creation accuracy. A + device link + separation or color space conversion can be applied before the + print/measure simulation.<br> + <h3>Usage</h3> + <small><span style="font-family: monospace;">synthread [-v] </span></small><small><span + style="font-family: monospace;">[<span style="font-style: + italic;">separation.ic<span style="font-family: monospace;">m</span></span>]</span></small><small><span + style="font-family: monospace;"></span><span style="font-family: + monospace;"> </span><i style="font-family: monospace;">inoutfile</i><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> -v -<span style="font-family: monospace;"></span><i - style="font-family: monospace;">inoutfile</i><span - style="font-family: monospace;"> - Base name for -input[</span><a style="font-family: monospace;" - href="File_Formats.html#.ti1">.ti1</a><span - style="font-family: monospace;">]/output[</span><a - style="font-family: monospace;" href="File_Formats.html#.ti3">.ti3</a><span - style="font-family: monospace;">] file</span></small><br> -<b><br> -Examples</b><br> -<br> -synthread xxxx testvalues<br> -synthread -p xxx separation.icm testvalues<br> -<h3>Comments<br> -</h3> -The <span style="font-weight: bold;">-v</span> flag does nothing at -the moment.<br> -The <span style="font-weight: bold;">-p</span> flag enables a device -to device value conversion before -converting to expected PCS values.<br> -The <span style="font-weight: bold;">-l</span> flag causes the CIE -output values to be L*a*b* rather than the -default XYZ values.<br> -<br> -The <span style="font-weight: bold;">-0, -1, -2 .. -9</span> -parameters are a way of simulating changes in the -behaviour of the simulated printing system. The parameter supplied to -the flag will be used to modify the device values (after any separation -is applied) by raising them to the power of the parameter. This applies -a transfer curve to the simulated device response.<br> -<br> -The <span style="font-weight: bold;">-r</span> parameter is a way of -simulating instability in the behaviour of -the simulated -printing system. The parameter supplied to the flag will be used to -scale a random offset added to the device values (after any separation -is applied). The offset will be a normally distributed error with an -average deviation of level%. A typically value supplied -might be 1.0 to simulate 1% randomness.<br> -<br> -The <span style="font-weight: bold;">-R</span> parameter is a way of -simulating instability in the behaviour of -the simulated -measuring system. The parameter supplied to the flag will be used to -scale a random offset added to the PCS values. The offset will be a -normally distributed error with an average deviation of level%. A -typically value supplied -might be 1.0 to simulate 1% randomness. <br> -<br> -The <span style="font-weight: bold;">-u</span> flag changes the -distribution of the random offsets applied using the <span - style="font-weight: bold;">-r</span> or <span - style="font-weight: bold;">-R</span> flags, from the default standard -deviation, to a uniform deviation distribution. The level is still -specified as an average deviation.<br> -<br> -The <span style="font-weight: bold;">-b</span> parameter is a way of -simulating devices that have a different black point to the profile -used. This only works if an ICC profile is used, and scales the black -point to the parameter value. This will be done in XYZ space by -default, and in L*a*b* space if the <span style="font-weight: bold;">-l</span> -flag is used.<br> -<br> -synthread is useful in creating artificial test value for testing <a - href="colprof.html">colprof</a>, as well as providing one path for -turning an MPP profile into an ICC profile. If a <a - href="File_Formats.html#.ti3">.ti3</a> file is -specified instead of an <a href="File_Formats.html#ICC">ICC</a> or <a - href="File_Formats.html#MPP">MPP</a> profile, -then the closest matching measured points in the .<a - href="File_Formats.html#.ti3">.ti3</a> are substituted -for the test values in the <a href="File_Formats.html#.ti1">.ti1</a> -file on -output. If the <a href="File_Formats.html#.ti1">.ti1</a> -file is a monochrome test file with a White device value, then an RGB <a - href="File_Formats.html#ICC">ICC</a> profile, <a - href="File_Formats.html#MPP">MPP</a> or <a - href="File_Formats.html#.ti3">.ti3</a> may be used, and the White -values will be translated to equal RGB values. If the <a - href="File_Formats.html#.ti1">.ti1</a> -file is a monochrome test file with a Black device value, then a CMYK <a - href="File_Formats.html#ICC">ICC</a> profile, <a - href="File_Formats.html#MPP">MPP</a> or <a - href="File_Formats.html#.ti3">.ti3</a> may be used, and the Black -values will be translated to equal CMY = 0, K = grey values. <br> -<br> -If a separation device profile is provided (e.g. from CMY -> CMYK, -or perhaps CMYK->CMYK, to simulate a color correction step before -"printing"), then this will be applied to the .ti1 device values, -before converting the the device values into .ti3 PCS values.<br> -<br> -<br> -<br> -</body> + Verbose mode</span><span + style="font-family: monospace;"></span><span style="font-family: + monospace;"></span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> -p +Use + separation profile</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> -l +Output + Lab rather than XYZ<br> + <br style="font-family: monospace;"> + </span><span style="font-family: monospace;"> -0 + pow +Apply + power to input device chanel 0-9 (after sep.)<br> + <br style="font-family: monospace;"> + </span><span style="font-family: monospace;"> -r + level +Add + average random deviation of <level>% to input device + values + (after sep.)</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> -R + level +Add + average random deviation of <level>% to output PCS values<br> + </span></small><small><span style="font-family: monospace;"> -u + + + +Make + random deviations have uniform distributions rather than normal</span></small><br + style="font-family: monospace;"> + <small><span style="font-family: monospace;"></span><span + style="font-family: monospace;"> -b + L,a,b +Scale + black point to target Lab value</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> [<span + style="font-style: italic;">separation.icm</span>] +Device + link separation profile</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> </span><i + style="font-family: monospace;">profile.</i><span + style="font-family: monospace;">[icm|mpp|ti3] </span><a + style="font-family: monospace;" href="File_Formats.html#ICC">ICC</a><span + style="font-family: monospace;">, </span><a style="font-family: + monospace;" href="File_Formats.html#MPP">MPP</a><span + style="font-family: monospace;"> + or </span><a style="font-family: monospace;" + href="File_Formats.html#.ti3">.ti3</a><span style="font-family: + monospace;"> + profile/file to use</span><br style="font-family: monospace;"> + + <span style="font-family: monospace;"></span><i + style="font-family: monospace;">inoutfile</i><span + style="font-family: monospace;"> + + Base name for + input[</span><a style="font-family: monospace;" + href="File_Formats.html#.ti1">.ti1</a><span style="font-family: + monospace;">]/output[</span><a style="font-family: monospace;" + href="File_Formats.html#.ti3">.ti3</a><span style="font-family: + monospace;">] file</span></small><br> + <b><br> + Examples</b><br> + <br> + synthread xxxx testvalues<br> + synthread -p xxx separation.icm testvalues<br> + <h3>Comments<br> + </h3> + The <span style="font-weight: bold;">-v</span> flag does nothing at + the moment.<br> + The <span style="font-weight: bold;">-p</span> flag enables a + device + to device value conversion before + converting to expected PCS values.<br> + The <span style="font-weight: bold;">-l</span> flag causes the CIE + output values to be L*a*b* rather than the + default XYZ values.<br> + <br> + The <span style="font-weight: bold;">-0, -1, -2 .. -9</span> + parameters are a way of simulating changes in the + behaviour of the simulated printing system. The parameter supplied + to + the flag will be used to modify the device values (after any + separation + is applied) by raising them to the power of the parameter. This + applies + a transfer curve to the simulated device response.<br> + <br> + The <span style="font-weight: bold;">-r</span> parameter is a way + of + simulating instability in the behaviour of + the simulated + printing system. The parameter supplied to the flag will be used to + scale a random offset added to the device values (after any + separation + is applied). The offset will be a normally distributed error with an + average deviation of level%. A typically value supplied + might be 1.0 to simulate 1% randomness.<br> + <br> + The <span style="font-weight: bold;">-R</span> parameter is a way + of + simulating instability in the behaviour of + the simulated + measuring system. The parameter supplied to the flag will be used to + scale a random offset added to the PCS values. The offset will be a + normally distributed error with an average deviation of level%. A + typically value supplied + might be 1.0 to simulate 1% randomness. <br> + <br> + The <span style="font-weight: bold;">-u</span> flag changes the + distribution of the random offsets applied using the <span + style="font-weight: bold;">-r</span> or <span style="font-weight: + bold;">-R</span> flags, from the default standard + deviation, to a uniform deviation distribution. The level is still + specified as an average deviation.<br> + <br> + The <span style="font-weight: bold;">-b</span> parameter is a way + of + simulating devices that have a different black point to the profile + used. This only works if an ICC profile is used, and scales the + black + point to the parameter value. This will be done in XYZ space by + default, and in L*a*b* space if the <span style="font-weight: + bold;">-l</span> + flag is used.<br> + <br> + synthread is useful in creating artificial test value for testing <a + href="colprof.html">colprof</a>, as well as providing one path for + turning an MPP profile into an ICC profile. If a <a + href="File_Formats.html#.ti3">.ti3</a> file is + specified instead of an <a href="File_Formats.html#ICC">ICC</a> or + <a href="File_Formats.html#MPP">MPP</a> profile, + then the closest matching measured points in the .<a + href="File_Formats.html#.ti3">.ti3</a> are substituted + for the test values in the <a href="File_Formats.html#.ti1">.ti1</a> + file on + output. If the <a href="File_Formats.html#.ti1">.ti1</a> + file is a monochrome test file with a White device value, then an + RGB <a href="File_Formats.html#ICC">ICC</a> profile, <a + href="File_Formats.html#MPP">MPP</a> or <a + href="File_Formats.html#.ti3">.ti3</a> may be used, and the White + values will be translated to equal RGB values. If the <a + href="File_Formats.html#.ti1">.ti1</a> + file is a monochrome test file with a Black device value, then a + CMYK <a href="File_Formats.html#ICC">ICC</a> profile, <a + href="File_Formats.html#MPP">MPP</a> or <a + href="File_Formats.html#.ti3">.ti3</a> may be used, and the Black + values will be translated to equal CMY = 0, K = grey values. <br> + <br> + If a separation device profile is provided (e.g. from CMY -> + CMYK, + or perhaps CMYK->CMYK, to simulate a color correction step before + "printing"), then this will be applied to the .ti1 device values, + before converting the the device values into .ti3 PCS values.<br> + <br> + <br> + <br> + </body> </html> diff --git a/doc/targen.html b/doc/targen.html index ef84f81..ef84f81 100644..100755 --- a/doc/targen.html +++ b/doc/targen.html diff --git a/doc/ti3_format.html b/doc/ti3_format.html index ca1be87..955567f 100644..100755 --- a/doc/ti3_format.html +++ b/doc/ti3_format.html @@ -59,6 +59,8 @@ + + "<span style="font-weight: bold;">DISPLAY</span>", <span style="font-weight: bold;">"INPUT"</span> or <span style="font-weight: bold;">"EMISINPUT"</span>.<br> @@ -92,6 +94,8 @@ + + 119.657745 121.474236".<br> <br> </span>A display device may also have a <span style="font-weight: @@ -154,7 +158,15 @@ keyword that must have a value of "<span style="font-weight: bold;">NO</span>" or "<span style="font-weight: bold;">YES</span>", to indicate whether the instrument was used in a display refresh mode during - measurement. <br> + measurement.<br> + <br> + There may be a <b>DEVCALSTD</b> keyword that must have a value of <b>"XRDI"</b> + or <b>"GMDI"</b> or <b>"XRGA"</b>, to indicate which X-Rite + calibration standard the data has been measured.<br> + <br> + There may be a <b>INSTRUMENT_FILTER</b> keyword that must have a + value of <b>"POLARIZED"</b> or <b>"D65"</b> or <b>"UVCUT"</b> to + indicate whay if any filter was present during measurement.<br> <br> There may be keywords with associated values <span style="font-weight: bold;">SINGLE_DIM_STEPS</span>, <span @@ -184,6 +196,8 @@ Cyan + + @@ -191,6 +205,8 @@ Cyan + + C<br> Magenta M<br> @@ -201,6 +217,8 @@ Cyan + + Y<br> Black @@ -209,6 +227,8 @@ Cyan + + K<br> Orange @@ -217,6 +237,8 @@ Cyan + + O<br> Red @@ -225,6 +247,8 @@ Cyan + + R<br> Green @@ -233,6 +257,8 @@ Cyan + + G<br> Blue @@ -241,6 +267,8 @@ Cyan + + B<br> White @@ -252,6 +280,8 @@ Cyan + + c<br> Light Magenta @@ -260,6 +290,8 @@ Cyan + + m<br> Light Yellow @@ -268,6 +300,8 @@ Cyan + + y<br> Light Black @@ -276,6 +310,8 @@ Cyan + + k<br> Medium Cyan 2c<br> diff --git a/doc/tiffgamut.html b/doc/tiffgamut.html index fc60c31..534853c 100644..100755 --- a/doc/tiffgamut.html +++ b/doc/tiffgamut.html @@ -38,21 +38,22 @@ See <a href="3dformat.html">3D Viewing Format</a> for switching to VRML or X3D output format.<br> <h3>Usage Summary</h3> - <small><span style="font-family: monospace;">tiffgamut [-v level] - [profile.icm | embedded.tif/jpg] infile1.tif/jpg - [infile2.tif/jpg ...]</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> -v + <span style="font-family: monospace;">tiffgamut [-v level] + [profile.icm | embedded.tif/jpg] infile1.tif/jpg [infile2.tif/jpg + ...]</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> -v - Verbose</span><br style="font-family: monospace;"> - <span style="font-family: monospace;">-d - sres Surface resolution - details 1.0 - 50.0</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> -w + + Verbose</span><br style="font-family: monospace;"> + <span style="font-family: monospace;">-d + sres Surface resolution + details 1.0 - 50.0</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> -w emit @@ -60,9 +61,10 @@ emit - X3DOM .x3d.html file as well as CGATS .gam file</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> -n + + X3DOM .x3d.html file as well as CGATS .gam file</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> -n Don't @@ -70,9 +72,10 @@ Don't - add X3DOM axes or white/black point</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> -k + + add X3DOM axes or white/black point</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> -k Add @@ -80,14 +83,15 @@ Add - markers for prim. & sec. "cusp" points<br> - -f perc Filter by - popularity, perc = percent to use<br style="font-family: - monospace;"> - </span><span style="font-family: monospace;"> -i - intent p = perceptual, r = relative - colorimetric,</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> + + markers for prim. & sec. "cusp" points<br> + -f perc Filter by + popularity, perc = percent to use<br style="font-family: + monospace;"> + </span><span style="font-family: monospace;"> -i + intent p = perceptual, r = relative + colorimetric,</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> s @@ -95,15 +99,15 @@ s - = saturation, a = absolute (default), d = profile default</span></small><small><span - style="font-family: monospace;"></span></small><br - style="font-family: monospace;"> - <small><span style="font-family: monospace;"></span><span - style="font-family: monospace;"> -o - order n = normal (priority: lut - > matrix > monochrome)</span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> + + = saturation, a = absolute (default), d = profile default</span><span + style="font-family: monospace;"></span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"></span><span + style="font-family: monospace;"> -o + order n = normal (priority: lut > + matrix > monochrome)</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> r @@ -111,19 +115,20 @@ r - = reverse (priority: monochrome > matrix > lut)<br> - </span></small><small><span style="font-family: monospace;"> </span><span - style="font-family: monospace;">-p oride</span><span - style="font-family: monospace;"> l - = Lab_PCS (default), j = CIECAM02 Appearance Jab</span></small><br + + = reverse (priority: monochrome > matrix > lut)<br> + </span><span style="font-family: monospace;"> </span><span + style="font-family: monospace;">-p oride</span><span + style="font-family: monospace;"> l = + Lab_PCS (default), j = CIECAM02 Appearance Jab</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"></span><span + style="font-family: monospace;"> -c viewcond set + appearance mode and viewing conditions for CIECAM02,</span><br style="font-family: monospace;"> - <small><span style="font-family: monospace;"></span><span - style="font-family: monospace;"> -c viewcond - set appearance mode and viewing conditions for CIECAM02,</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"></span><span - style="font-family: monospace;"></span></small><small><span - style="font-family: monospace;"> + <span style="font-family: monospace;"></span><span + style="font-family: monospace;"></span><span style="font-family: + monospace;"> either @@ -131,158 +136,172 @@ either - an enumerated choice, or a parameter:value change</span><span - style="font-family: monospace;"></span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"></span></small><small><span - style="font-family: monospace;"> - pp - Practical Reflection Print (ISO-3664 P2)</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - + an enumerated choice, or a parameter:value change</span><span + style="font-family: monospace;"></span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"></span><tt> + </tt><tt><tt>pc - Critical print + evaluation environment (ISO-3664 P1)</tt><tt><br> + </tt>pp + - Practical Reflection Print (ISO-3664 P2)<br> + pe - Print evaluation + environment (CIE 116-1995)<br> + </tt><tt> pm - Print + evaluation with partial Mid-tone adaptation</tt><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + mt - Monitor in typical work environment</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + - pe - Print evaluation environment (CIE 116-1995)<br> - </span></small><small><span style="font-family: monospace;"> - + mb - Monitor in bright work environment</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + md - Monitor in darkened work + environment</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> + jm - Projector in dim environment</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + jd - Projector in dark environment</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + pcd - Photo CD - original scene outdoors</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + ob - Original scene - Bright Outdoors</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + cx - Cut Sheet Transparencies on a + viewing box</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> +s:surround - pc - Critical print evaluation environment (ISO-3664 P1)</span></small><small><span - style="font-family: monospace;"></span><span style="font-family: - monospace;"></span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> - mt - Monitor in typical work environment</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - + n = auto, a = average, m = dim, d = dark,</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + - mb - Monitor in bright work environment</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - md - Monitor in darkened work - environment</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> - jm - Projector in dim environment</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - jd - Projector in dark environment</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - pcd - Photo CD - original scene outdoors</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - ob - Original scene - Bright Outdoors</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - cx - Cut Sheet Transparencies on a - viewing box</span></small><br style="font-family: monospace;"> - <small><span style="font-family: monospace;"> -s:surround + c = transparency (default average)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> +w:X:Y:Z - n = auto, a = average, m = dim, d = dark,</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - + Adapted white point as XYZ (default media white)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> +w:x:y - c = transparency (default average)</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> -w:X:Y:Z - Adapted white point as XYZ (default media white)</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> -w:x:y + Adapted white point as x, y</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> +a:adaptation - Adapted white point as x, y</span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> -a:adaptation + Adaptation luminance in cd.m^2 (default 50.0)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> +b:background - Adaptation luminance in cd.m^2 (default 50.0)</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> -b:background + Background % of image luminance (default 20)<br> + l:imagewhite Image + white in cd.m^2 if surround = auto (default 250)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"><span style="font-family: + monospace;"> + f:flare Flare light % of image + luminance (default 1)<br> + </span> </span><span style="font-family: monospace;"> + g:glare Glare light % of ambient + (default 5)</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> + g:X:Y:Z Glare color as + XYZ (default media white)</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> - Background % of image luminance (default 20)<br> - l:imagewhite Image - white in cd.m^2 if surround = auto (default 250)</span></small><br - style="font-family: monospace;"> - <small><span style="font-family: monospace;"><small><span - style="font-family: monospace;"> -f:flare + g:x:y Glare color as x, + y</span><br> + <span style="font-family: monospace;"><tt><span style="font-family: + monospace;"><tt><span style="font-family: monospace;"><span + style="font-family: monospace;"> + h:hkscale Helmholtz-Kohlrausch effect + scale factor (default 1.0)<br> + </span></span><span style="font-family: monospace;"> - Flare light % of image luminance (default 1)<br> - </span></small> </span><span style="font-family: - monospace;"> - g:glare Glare light % of ambient - (default 5)</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> - g:X:Y:Z Glare color - as XYZ (default media white)</span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> + m:mtaf Mid-tone + partial adaptation factor (default 0.0)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + m:X:Y:Z Mid-tone Adaptation + white as XYZ (default D50)</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> - g:x:y Glare color as - x, y</span></small><br> - <small><span style="font-family: monospace;"><small><span - style="font-family: monospace;"> -x - pcent Expand/compress gamut - cylindrically by percent</span></small><br> - -O outputfile Override the default output filename & - extension.<br style="font-family: monospace;"> + m:x:y Mid-tone + Adaptation white as x, y</span></tt></span></tt><br> + </span> <span style="font-family: monospace;"><span + style="font-family: monospace;"> -x + pcent Expand/compress gamut + cylindrically by percent</span><br> + -O outputfile Override the default output filename & + extension.</span><small><span style="font-family: monospace;"><br + style="font-family: monospace;"> </span></small><br> <h3>Usage Details and Discussion<br> </h3> diff --git a/doc/timage.html b/doc/timage.html index 2daed27..2daed27 100644..100755 --- a/doc/timage.html +++ b/doc/timage.html diff --git a/doc/txt2ti3.html b/doc/txt2ti3.html index 783d3b6..a564efd 100644..100755 --- a/doc/txt2ti3.html +++ b/doc/txt2ti3.html @@ -11,8 +11,10 @@ <h3>Summary</h3> <small><big>Convert Gretag/Logo/X-Rite/Barbieri or other CGATS format RGB or CMYK test chart results into</big></small> - Argyll <a href="File_Formats.html#.ti3">.ti3</a> CGATS - format. + Argyll <a href="File_Formats.html#.ti3">.ti3</a> CGATS format.<br> + txt2ti3 will also cope with source files that don't contain device + values, and will emit a file that is not strictly a .ti3, but can be + useful as input to spec2cie or scanin.<br> <h3>Usage Summary</h3> <small><span style="font-family: monospace;">txt2ti3 [-v] [-l limit] [-d] [devfile] infile [specfile] outbase</span><br @@ -29,11 +31,17 @@ Set - type of device as Display, not Output<br> + + + type of device as Display, rather than Output<br> + -D + Set type of device as Display and not normalized<br> -i Set + + type of device as Input, not Output</span></small><br style="font-family: monospace;"> <small><span style="font-family: monospace;">-T @@ -50,6 +58,8 @@ Input CIE, + + Spectral or Device & Spectral file (typically file.txt)</span><br style="font-family: monospace;"> <i style="font-family: monospace;">[specfile]</i><span diff --git a/doc/ucmm.html b/doc/ucmm.html index 31d95cb..31d95cb 100644..100755 --- a/doc/ucmm.html +++ b/doc/ucmm.html diff --git a/doc/viewgam.html b/doc/viewgam.html index fb29e7d..fb29e7d 100644..100755 --- a/doc/viewgam.html +++ b/doc/viewgam.html diff --git a/doc/xicclu.html b/doc/xicclu.html index bd98058..3233ca3 100644..100755 --- a/doc/xicclu.html +++ b/doc/xicclu.html @@ -22,34 +22,34 @@ although device value options such as <b>-e</b> or <b>-E</b> will work. To lookup inverted CAL values, use <b>-f b</b>.<br> <h3>Usage Summary</h3> - <small><span style="font-family: monospace;">xicclu [-</span><i - style="font-family: monospace;">options</i><span - style="font-family: monospace;">] profile_or_cal</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#v">-v level</a><span - style="font-family: monospace;"> - Verbosity level 0 - 2 (default = 1)<br style="font-family: - monospace;"> - </span> <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#g">-g</a><span - style="font-family: monospace;"> - Plot slice instead of looking colors up. (Default - white to black)<br> - <a href="#Gs">-G s:L:a:b</a> - Override plot slice start with Lab or Jab co-ordinate<br> - <a href="#Ge">-G e:L:a:b</a> - Override plot slice end with Lab or Jab co-ordinate<br> - <a href="#V">-V</a> - - Use 'vcgt' calibration tag from profile<br style="font-family: - monospace;"> - </span><span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#f">-f function</a><span - style="font-family: monospace;"> f = forward, - b = backwards, g = gamut, p = preview</span><br + <span style="font-family: monospace;">xicclu [-</span><i + style="font-family: monospace;">options</i><span + style="font-family: monospace;">] profile_or_cal</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#v">-v level</a><span + style="font-family: monospace;"> + Verbosity level 0 - 2 (default = 1)<br style="font-family: + monospace;"> + </span> <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#g">-g</a><span + style="font-family: monospace;"> + Plot slice instead of looking colors up. (Default + white to black)<br> + <a href="#Gs">-G s:L:a:b</a> + Override plot slice start with Lab or Jab co-ordinate<br> + <a href="#Ge">-G e:L:a:b</a> + Override plot slice end with Lab or Jab co-ordinate<br> + <a href="#V">-V</a> + + Lookup or plot the 'vcgt' calibration tag from profile<br style="font-family: monospace;"> - <span style="font-family: monospace;"> + </span><span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#f">-f function</a><span + style="font-family: monospace;"> f = forward, b + = backwards, g = gamut, p = preview</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> if = @@ -59,39 +59,44 @@ if - inverted forward, ib = inverted backwards</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#i">-i intent</a><span - style="font-family: monospace;"> a - = absolute, r = relative colorimetric,</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> + inverted forward, ib = inverted backwards</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#i">-i intent</a><span + style="font-family: monospace;"> a = + absolute, r = relative colorimetric,</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> - </span></small><small><span style="font-family: monospace;"> p = - perceptual, </span></small><small><span style="font-family: - monospace;">s = saturation, A = disp. abs. measurements</span><span - style="font-family: monospace;"></span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#o">-o order</a><span - style="font-family: monospace;"> + </span><span style="font-family: monospace;"> p = perceptual, </span><span + style="font-family: monospace;">s = saturation, A = disp. abs. + measurements</span><span style="font-family: monospace;"></span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#o">-o order</a><span + style="font-family: monospace;"> - n = normal (priority: lut > matrix > monochrome)</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> + + + + + + + n = normal (priority: lut > matrix > monochrome)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> r = @@ -101,11 +106,13 @@ r - reverse (priority: monochrome > matrix > lut)</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#p">-p oride</a><span - style="font-family: monospace;"> + + + reverse (priority: monochrome > matrix > lut)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#p">-p oride</a><span + style="font-family: monospace;"> @@ -113,12 +120,14 @@ r - x = XYZ_PCS, X = XYZ * 100, l = Lab_PCS, L = LCh, y = Yxy,<br> - j = - CIECAM02 Appearance Jab, J = CIECAM02 Appearance JCh<br> - </span><span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#s">-s scale</a><span - style="font-family: monospace;"> + + + x = XYZ_PCS, X = XYZ * 100, l = Lab_PCS, L = LCh, y = Yxy,<br> + j = + CIECAM02 Appearance Jab, J = CIECAM02 Appearance JCh<br> + </span><span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#s">-s scale</a><span + style="font-family: monospace;"> Scale @@ -127,51 +136,55 @@ Scale - device range 0.0 - scale rather than 0.0 - 1.0<br> - </span></small><br> - <small><span style="font-family: monospace;"><small><span - style="font-family: monospace;"><a href="#e">-e flag</a> + device range 0.0 - scale rather than 0.0 - 1.0<br> + </span><br> + <span style="font-family: monospace;"><span + style="font-family: monospace;"><a href="#e">-e flag</a> - Video encode device input as:<br> - <a href="#E">-E flag</a> - Video decode device output as:<br> - - n - normal 0..1 full range RGB levels (default)<br> - - t - (16-235)/255 "TV" RGB levels<br> - - 6 - Rec601 YCbCr SD (16-235,240)/255 "TV" levels<br> - - 7 - Rec709 1125/60Hz YCbCr HD (16-235,240)/255 "TV" levels<br> - - 5 - Rec709 1250/50Hz YCbCr HD (16-235,240)/255 "TV" levels<br> - - 2 - Rec2020 YCbCr UHD (16-235,240)/255 "TV" levels<br> - - C - Rec2020 Constant Luminance YCbCr UHD (16-235,240)/255 "TV" - lev</span></small></span></small><small><span - style="font-family: monospace;"><br style="font-family: - monospace;"> - </span> <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#k">-k [zhxrlv]</a><span - style="font-family: monospace;"> Black - generation: z = zero K,</span><br style="font-family: + Video encode device input as:<br> + <a href="#E">-E flag</a> + + + + + + + Video decode device output as:<br> + + n + normal 0..1 full range RGB levels (default)<br> + + t + (16-235)/255 "TV" RGB levels<br> + + 6 + Rec601 YCbCr SD (16-235,240)/255 "TV" levels<br> + + 7 + Rec709 1125/60Hz YCbCr HD (16-235,240)/255 "TV" levels<br> + + 5 + Rec709 1250/50Hz YCbCr HD (16-235,240)/255 "TV" levels<br> + + 2 + Rec2020 YCbCr UHD (16-235,240)/255 "TV" levels<br> + + C + Rec2020 Constant Luminance YCbCr UHD (16-235,240)/255 "TV" lev</span></span><span + style="font-family: monospace;"><br style="font-family: monospace;"> - <span style="font-family: monospace;"> + </span> <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#k">-k [zhxrlv]</a><span + style="font-family: monospace;"> Black + generation: z = zero K,</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> h @@ -181,9 +194,11 @@ h - = 0.5 K, x = max K, r = ramp K (def.)</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> + + + = 0.5 K, x = max K, r = ramp K (def.)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> l @@ -193,9 +208,11 @@ l - = extra PCS input is portion of K locus</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> + + + = extra PCS input is portion of K locus</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> v @@ -205,12 +222,14 @@ v - = extra PCS input is K target value</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#kp">-k p stle stpo enpo - enle shape</a><br style="font-family: monospace;"> - <span style="font-family: monospace;"> + + + = extra PCS input is K target value</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#kp">-k p stle stpo enpo + enle shape</a><br style="font-family: monospace;"> + <span style="font-family: monospace;"> stle: @@ -220,9 +239,11 @@ stle: - K level at White 0.0 - 1.0</span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> + + + K level at White 0.0 - 1.0</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> stpo: @@ -232,9 +253,11 @@ stpo: - start point of transition Wh 0.0 - Bk 1.0</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> + + + start point of transition Wh 0.0 - Bk 1.0</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> enpo: @@ -244,9 +267,11 @@ enpo: - End point of transition Wh 0.0 - Bk 1.0</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> + + + End point of transition Wh 0.0 - Bk 1.0</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> enle: @@ -256,9 +281,11 @@ enle: - K level at Black 0.0 - 1.0</span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> + + + K level at Black 0.0 - 1.0</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> shape: @@ -268,13 +295,15 @@ shape: - 1.0 = straight, 0.0-1.0 concave, 1.0-2.0 convex</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#kq">-k q stle0 stpo0 - enpo0 enle0 shape0 stle2 stpo2 enpo2 enle2 shape2</a><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> + + + 1.0 = straight, 0.0-1.0 concave, 1.0-2.0 convex</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#kq">-k q stle0 stpo0 enpo0 + enle0 shape0 stle2 stpo2 enpo2 enle2 shape2</a><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> Transfer extra @@ -284,63 +313,45 @@ extra - PCS input to dual curve limits</span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#K">-K parameters</a><span - style="font-family: monospace;"> Same as -k, but target is - K locus rather than K value itself</span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#l">-l tlimit</a><span - style="font-family: monospace;"> - set total ink limit, 0 - 400% (estimate by default)</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#L">-L klimit</a><span - style="font-family: monospace;"> - set black ink limit, 0 - 100% (estimate by default)</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#a">-a</a><span - style="font-family: monospace;"> -show -actual - + PCS input to dual curve limits</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#K">-K parameters</a><span + style="font-family: monospace;"> Same as -k, but target is K + locus rather than K value itself</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#l">-l tlimit</a><span + style="font-family: monospace;"> set + total ink limit, 0 - 400% (estimate by default)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#L">-L klimit</a><span + style="font-family: monospace;"> set + black ink limit, 0 - 100% (estimate by default)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#a">-a</a><span + style="font-family: monospace;"> +show +actual - target values if clipped<br> - <a href="#b">-b</a> -use -CAM + target values if clipped<br> + <a href="#b">-b</a> +use +CAM - Jab for clipping<br style="font-family: monospace;"> - </span><span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#m">-m</a><span - style="font-family: monospace;"> - - merge output processing into clut</span><span - style="font-family: monospace;"></span><span style="font-weight: - bold; font-family: monospace;"></span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#c">-c viewcond</a><span - style="font-family: monospace;"> set viewing - conditions for CIECAM02,</span><br style="font-family: - monospace;"> - </small><small><span style="font-family: monospace;"> - -either @@ -348,41 +359,47 @@ either - an enumerated choice, or a parameter:value change</span><span - style="font-family: monospace;"></span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"></span></small><small><span - style="font-family: monospace;"> - pp - Practical Reflection Print (ISO-3664 P2)</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> + Jab for clipping<br style="font-family: monospace;"> + </span><span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#m">-m</a><span + style="font-family: monospace;"> + + merge output processing into clut</span><span style="font-family: + monospace;"></span><span style="font-weight: bold; font-family: + monospace;"></span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#c">-c viewcond</a><span + style="font-family: monospace;"> set viewing + conditions for CIECAM02,</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> -pe - - - - +either - - Print evaluation environment (CIE 116-1995)<br> - </span></small><small><span style="font-family: monospace;"> - -pc - - - Critical print evaluation environment (ISO-3664 P1)</span></small><small><span - style="font-family: monospace;"></span><span style="font-family: - monospace;"></span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> - mt - Monitor in typical work environment</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> + an enumerated choice, or a parameter:value change</span><span + style="font-family: monospace;"></span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"></span><tt> + </tt><tt><tt>pc - Critical print + evaluation environment (ISO-3664 P1)</tt><tt><br> + </tt>pp + - Practical Reflection Print (ISO-3664 P2)<br> + pe - Print evaluation + environment (CIE 116-1995)<br> + </tt><tt> pm - Print + evaluation with partial Mid-tone adaptation</tt><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + mt - Monitor in typical work environment</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> @@ -392,29 +409,31 @@ pc - mb - Monitor in bright work environment</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - md - Monitor in darkened work - environment</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> - jm - Projector in dim environment</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - jd - Projector in dark environment</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - pcd - Photo CD - original scene outdoors</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - ob - Original scene - Bright Outdoors</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> - cx - Cut Sheet Transparencies on a - viewing box</span></small><small><span style="font-family: - monospace;"></span><span style="font-family: monospace;"></span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> + + + mb - Monitor in bright work environment</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + md - Monitor in darkened work + environment</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> + jm - Projector in dim environment</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + jd - Projector in dark environment</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + pcd - Photo CD - original scene outdoors</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + ob - Original scene - Bright Outdoors</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + cx - Cut Sheet Transparencies on a + viewing box</span><span style="font-family: monospace;"></span><span + style="font-family: monospace;"></span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> s:surround n @@ -424,9 +443,11 @@ n - = auto, a = average, m = dim, d = dark,</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> + + + = auto, a = average, m = dim, d = dark,</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> @@ -436,9 +457,11 @@ n - c = transparency (default average)</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> + + + c = transparency (default average)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> w:X:Y:Z Adapted @@ -448,9 +471,11 @@ Adapted - white point as XYZ (default media white, Abs: D50)</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> + + + white point as XYZ (default media white, Abs: D50)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> w:x:y Adapted @@ -460,8 +485,10 @@ Adapted - white point as x, y</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> + + + white point as x, y</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> a:adaptation Adaptation @@ -471,15 +498,16 @@ Adaptation - luminance in cd.m^2 (default 50.0)</span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> - b:background Background % of - image luminance (default 20)</span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"></span></small><small><span - style="font-family: monospace;"><small><span style="font-family: - monospace;"> + + + luminance in cd.m^2 (default 50.0)</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> + b:background Background % of image + luminance (default 20)</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"></span><span + style="font-family: monospace;"><span style="font-family: + monospace;"> f:flare Flare light @@ -490,48 +518,69 @@ light - % of image luminance (default 1)<br> - </span></small> + % of image luminance (default 1)<br> + </span> + g:glare Glare light % of ambient + (default 2)</span><br style="font-family: monospace;"> + <span style="font-family: monospace;"> + g:X:Y:Z Glare color as + XYZ (default media white, Abs: D50)</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> - g:glare Glare light % of ambient - (default 2)</span><br style="font-family: monospace;"> - <span style="font-family: monospace;"> - g:X:Y:Z Glare color - as XYZ (default media white, Abs: D50)</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> + g:x:y FGare color as x, + y</span><br style="font-family: monospace;"> + <tt><span style="font-family: monospace;"><tt><span + style="font-family: monospace;"><span style="font-family: + monospace;"> + h:hkscale Helmholtz-Kohlrausch effect + scale factor (default 1.0)<br> + </span> </span><span style="font-family: monospace;"> - g:x:y FGare color as - x, y</span><br style="font-family: monospace;"> - <br style="font-family: monospace;"> - <span style="font-family: monospace;"> </span><a - style="font-family: monospace;" href="#p1"><i>inoutfile</i></a><span - style="font-family: monospace;"> The - input ICC profile or CAL file.</span><br style="font-family: - monospace;"> - <br style="font-family: monospace;"> - <span style="font-family: monospace;"> The - colors to be translated should be fed into standard in,</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> one input - color per line, white space separated.</span><br - style="font-family: monospace;"> - <span style="font-family: monospace;"> A line - starting with a # will be ignored.</span><br style="font-family: - monospace;"> - <span style="font-family: monospace;"> A line - not starting with a number will terminate the program.</span></small> - <br> + + + + + m:mtaf Mid-tone partial + adaptation factor (default 0.0)</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> + + m:X:Y:Z Mid-tone Adaptation + white as XYZ (default D50)</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> + + m:x:y Mid-tone + Adaptation white as x, y</span></tt></span></tt> <br + style="font-family: monospace;"> + <span style="font-family: monospace;"> </span><a + style="font-family: monospace;" href="#p1"><i>inoutfile</i></a><span + style="font-family: monospace;"> The + input ICC profile or CAL file.</span><br style="font-family: + monospace;"> + <br style="font-family: monospace;"> + <span style="font-family: monospace;"> The colors + to be translated should be fed into standard in,</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> one input + color per line, white space separated.</span><br + style="font-family: monospace;"> + <span style="font-family: monospace;"> A line + starting with a # will be ignored.</span><br style="font-family: + monospace;"> + <span style="font-family: monospace;"> A line not + starting with a number will terminate the program.</span> <br> <h3>Flags and Parameters</h3> <a name="v"></a> The <b>-v</b> parameter sets the level of verbosity. Default is level 1, which repeats each input value, the @@ -565,6 +614,8 @@ light + + b</b>.<br> <br> <a name="Gs"></a>The <span style="font-weight: bold;">-G </span><small><span @@ -657,6 +708,8 @@ light + + normal RGB 0..1 full range levels (default)<br> t @@ -666,6 +719,8 @@ light + + RGB (16-235)/255 "TV" levels<br> 6 @@ -675,6 +730,8 @@ light + + Rec601 YCbCr SD (16-235,240)/255 "TV" levels<br> 7 @@ -684,6 +741,8 @@ light + + Rec709 1125/60Hz YCbCr HD (16-235,240)/255 "TV" levels<br> 5 @@ -693,6 +752,8 @@ light + + Rec709 1250/50Hz YCbCr HD (16-235,240)/255 "TV" levels<br> 2 @@ -702,6 +763,8 @@ light + + Rec2020 YCbCr UHD (16-235,240)/255 "TV" levels<br> C @@ -711,6 +774,8 @@ light + + Rec2020 Constant Luminance YCbCr UHD (16-235,240)/255 "TV" levels<br> </span></small></span></small><br> @@ -726,6 +791,8 @@ light + + with the addition of two extra options.<br> <br> Possible arguments to the <b>-k</b> option are:<br> @@ -768,6 +835,8 @@ light + + _______ enle<br> | @@ -779,6 +848,8 @@ light + + /<br> | @@ -790,6 +861,8 @@ light + + /<br> | @@ -801,6 +874,8 @@ light + + /<br> | @@ -812,6 +887,8 @@ light + + /<br> stle | ------/<br> @@ -829,6 +906,8 @@ White &nb + + Black<br> </tt><br> <b><a name="kq"></a>-k q stle0 stpo0 enpo0 enle0 shape0 stle2 stpo2 diff --git a/gamut/GenRMGam.c b/gamut/GenRMGam.c index 5a62eee..5a62eee 100644..100755 --- a/gamut/GenRMGam.c +++ b/gamut/GenRMGam.c diff --git a/gamut/GenVisGam.c b/gamut/GenVisGam.c index 12d8d9d..12d8d9d 100644..100755 --- a/gamut/GenVisGam.c +++ b/gamut/GenVisGam.c diff --git a/gamut/Jamfile b/gamut/Jamfile index e97d0df..e97d0df 100644..100755 --- a/gamut/Jamfile +++ b/gamut/Jamfile diff --git a/gamut/License.txt b/gamut/License.txt index a871fcf..a871fcf 100644..100755 --- a/gamut/License.txt +++ b/gamut/License.txt diff --git a/gamut/Readme.txt b/gamut/Readme.txt index 56e7e13..56e7e13 100644..100755 --- a/gamut/Readme.txt +++ b/gamut/Readme.txt diff --git a/gamut/afiles b/gamut/afiles index 951926b..951926b 100644..100755 --- a/gamut/afiles +++ b/gamut/afiles diff --git a/gamut/fakegam.c b/gamut/fakegam.c index ec40457..ec40457 100644..100755 --- a/gamut/fakegam.c +++ b/gamut/fakegam.c diff --git a/gamut/gammap.c b/gamut/gammap.c index 03b9502..2fd00a3 100644..100755 --- a/gamut/gammap.c +++ b/gamut/gammap.c @@ -1359,10 +1359,12 @@ typedef struct { /* the source image gamut, and map to points outside the */ /* destination gamut) */ - /* See how much to bend the black - compute the color difference */ + /* See how much to bend the black - compute the color difference. */ /* We start out in the direction of dr_be_bp at white, and at */ - /* the end we bend towards the overall bp dr_cs_bp */ + /* the end we bend towards the overall bp dr_cs_bp. */ /* (brad will be 0 for non gmm_bendBP because dr_be_bp dr_cs_bp */ + /* Smaller brad = tighter, more obvious bend, but less black */ + /* hue leaking into neutrals. */ for (brad = 0.0, i = 1; i < 3; i++) { double tt = dr_be_bp[i] - dr_cs_bp[i]; brad += tt * tt; @@ -1419,7 +1421,7 @@ typedef struct { ty = t * t * (3.0 - 2.0 * t); /* spline blend value */ t = (1.0 - t) * ty + t * t; /* spline at t == 0, linear at t == 1 */ - wt *= (1.0 + t * brad); /* Increase weigting with the bend */ + wt *= (1.0 + t * brad); /* Increase weighting with the bend */ } else { t = 0.0; /* stick to straight, it will be close anyway. */ diff --git a/gamut/gammap.h b/gamut/gammap.h index 247ff65..247ff65 100644..100755 --- a/gamut/gammap.h +++ b/gamut/gammap.h diff --git a/gamut/gammap.txt b/gamut/gammap.txt index f751248..f751248 100644..100755 --- a/gamut/gammap.txt +++ b/gamut/gammap.txt diff --git a/gamut/gamut.c b/gamut/gamut.c index 14b45c7..14b45c7 100644..100755 --- a/gamut/gamut.c +++ b/gamut/gamut.c diff --git a/gamut/gamut.h b/gamut/gamut.h index e74f942..e74f942 100644..100755 --- a/gamut/gamut.h +++ b/gamut/gamut.h diff --git a/gamut/isecvol.c b/gamut/isecvol.c index 58eea9d..58eea9d 100644..100755 --- a/gamut/isecvol.c +++ b/gamut/isecvol.c diff --git a/gamut/maptest.c b/gamut/maptest.c index ae74a1c..ae74a1c 100644..100755 --- a/gamut/maptest.c +++ b/gamut/maptest.c diff --git a/gamut/nearsmth.c b/gamut/nearsmth.c index c65704e..c65704e 100644..100755 --- a/gamut/nearsmth.c +++ b/gamut/nearsmth.c diff --git a/gamut/nearsmth.h b/gamut/nearsmth.h index 82afab3..82afab3 100644..100755 --- a/gamut/nearsmth.h +++ b/gamut/nearsmth.h diff --git a/gamut/smthtest.c b/gamut/smthtest.c index 71ba1e2..71ba1e2 100644..100755 --- a/gamut/smthtest.c +++ b/gamut/smthtest.c diff --git a/gamut/surftest.c b/gamut/surftest.c index ca2a786..ca2a786 100644..100755 --- a/gamut/surftest.c +++ b/gamut/surftest.c diff --git a/gamut/viewgam.c b/gamut/viewgam.c index 9a7a2f5..9a7a2f5 100644..100755 --- a/gamut/viewgam.c +++ b/gamut/viewgam.c diff --git a/h/License.txt b/h/License.txt index a871fcf..a871fcf 100644..100755 --- a/h/License.txt +++ b/h/License.txt diff --git a/h/Readme.txt b/h/Readme.txt index fecc33a..fecc33a 100644..100755 --- a/h/Readme.txt +++ b/h/Readme.txt diff --git a/h/aconfig.h b/h/aconfig.h index c9d6fc9..dde4e69 100644..100755 --- a/h/aconfig.h +++ b/h/aconfig.h @@ -7,7 +7,7 @@ /* * Author: Graeme W. Gill * - * Copyright 2006 - 2016, Graeme W. Gill + * Copyright 2006 - 2017, Graeme W. Gill * All rights reserved. * * This material is licenced under the GNU GENERAL PUBLIC LICENSE Version 2 or later :- @@ -24,8 +24,8 @@ /* major number = 8 bits */ #ifndef USE_NG_VERSION -# define ARGYLL_VERSION 0x01092 -# define ARGYLL_VERSION_STR "1.9.2" +# define ARGYLL_VERSION 0x02000 +# define ARGYLL_VERSION_STR "2.0.0" #else # define ARGYLL_VERSION NG_VERSION # define ARGYLL_VERSION_STR "NG_VERSION_STR" @@ -40,13 +40,13 @@ #endif #if defined(UNIX) # if defined(__APPLE__) -# if defined(__P64__) +# if defined(__LP64__) || defined(__ILP64__) || defined(__LLP64__) # define ARGYLL_BUILD_STR "OS X 64 bit" # else # define ARGYLL_BUILD_STR "OS X 32 bit" # endif # else -# if defined(__P64__) +# if defined(__LP64__) || defined(__ILP64__) || defined(__LLP64__) # define ARGYLL_BUILD_STR "Linux 64 bit" # else # define ARGYLL_BUILD_STR "Linux 32 bit" diff --git a/h/copyright.h b/h/copyright.h index 3d8c5f7..3d8c5f7 100644..100755 --- a/h/copyright.h +++ b/h/copyright.h diff --git a/h/counters.h b/h/counters.h index 391dbe1..7e48e03 100644..100755 --- a/h/counters.h +++ b/h/counters.h @@ -71,6 +71,7 @@ */ /* (Do we need a version of the above that tracks the actual input coords ?) */ + /* ------------------------------------------------------- */ /* Similar to abovem but each dimension range can be clipped. */ @@ -81,12 +82,20 @@ int nn##_res[mxdi]; /* last count +1 */ \ int nn##_e /* dimension index */ +/* Set start and end+1 to uniform values */ #define FRECONF(nn, start, endp1) \ for (nn##_e = 0; nn##_e < nn##_di; nn##_e++) { \ nn##_stt[nn##_e] = (start); /* start count value */ \ nn##_res[nn##_e] = (endp1); /* last count +1 */ \ } +/* Set start and end+1 to individual values */ +#define FRECONFA(nn, start, endp1) \ + for (nn##_e = 0; nn##_e < nn##_di; nn##_e++) { \ + nn##_stt[nn##_e] = (start)[nn##_e]; /* start count value */ \ + nn##_res[nn##_e] = (endp1)[nn##_e]; /* last count +1 */ \ + } + /* Set the counter value to 0 */ #define FC_INIT(nn) \ { \ @@ -113,6 +122,7 @@ /* ------------------------------------------------------- */ /* Same as above, but allows for variable resolution on each axis. */ /* End offset is added to count[] */ +/* (Hmm. Could merge FCOUNT and ECOUNT ?) */ #define ECOUNT(nn, mxdi, di, start, endp1, end_offst) \ int nn[mxdi]; /* counter value */ \ @@ -155,20 +165,28 @@ /* e.g. if there are 8 objects, and we want all combinations */ /* of 4 out of the 8, we would use: COMBO(nn, 4, 4, 8) */ +/* Declare and initialize */ #define COMBO(nn, mxdi, comb, total) \ int nn[mxdi+2]; /* counter value */ \ int nn##_cmb = (comb); /* number of combinations */ \ int nn##_tot = (total); /* out of total possible */ \ int nn##_e /* dimension index */ -/* Set total to new setting */ -#define CB_SETT(nn, total) \ - nn##_tot = (total) /* total possible */ +/* Declare, but don't initialize */ +#define COMBO_DEC(nn, mxdi) \ + int nn[mxdi+2]; /* counter value */ \ + int nn##_cmb; /* number of combinations */ \ + int nn##_tot; /* out of total possible */ \ + int nn##_e /* dimension index */ /* Set combinations to new setting */ #define CB_SETC(nn, comb) \ nn##_cmb = (comb) /* number of combinations*/ +/* Set total to new setting */ +#define CB_SETT(nn, total) \ + nn##_tot = (total) /* total possible */ + /* Set the counter to its initial value */ #define CB_INIT(nn) \ { \ @@ -183,9 +201,9 @@ for (nn##_e = 0; nn##_e < nn##_cmb; nn##_e++) { \ nn[nn##_e]++; \ if (nn[nn##_e] < (nn##_tot-nn##_e)) { \ - int nn##_ee; /* No carry */ \ - for (nn##_ee = nn##_e-1; nn##_ee >= 0; nn##_ee--) \ - nn[nn##_ee] = nn[nn##_ee+1] + 1; \ + int _combo_ee; /* No carry */ \ + for (_combo_ee = nn##_e-1; _combo_ee >= 0; _combo_ee--) \ + nn[_combo_ee] = nn[_combo_ee+1] + 1; \ break; \ } \ } \ diff --git a/h/llist.h b/h/llist.h index 0edd06f..0edd06f 100644..100755 --- a/h/llist.h +++ b/h/llist.h @@ -28,10 +28,10 @@ int hs_l,hs_j,hs_ir,hs_i; \ TYPE hs_rra; \ \ - if (NUMBER >= 2) \ + if ((NUMBER) >= 2) \ { \ - hs_l = NUMBER >> 1; \ - hs_ir = NUMBER-1; \ + hs_l = (NUMBER) >> 1; \ + hs_ir = (NUMBER)-1; \ for (;;) \ { \ if (hs_l > 0) \ diff --git a/h/xlist.h b/h/xlist.h index a9b3c6f..a9b3c6f 100644..100755 --- a/h/xlist.h +++ b/h/xlist.h diff --git a/icc/ClayRGB1998.icm b/icc/ClayRGB1998.icm Binary files differindex 4c8ecb3..4c8ecb3 100644..100755 --- a/icc/ClayRGB1998.icm +++ b/icc/ClayRGB1998.icm diff --git a/icc/EBU3213_PAL.icm b/icc/EBU3213_PAL.icm Binary files differindex b0e67bc..b0e67bc 100644..100755 --- a/icc/EBU3213_PAL.icm +++ b/icc/EBU3213_PAL.icm diff --git a/icc/Jamfile b/icc/Jamfile index 4bedbba..4bedbba 100644..100755 --- a/icc/Jamfile +++ b/icc/Jamfile diff --git a/icc/License4.txt b/icc/License4.txt index 61be41a..61be41a 100644..100755 --- a/icc/License4.txt +++ b/icc/License4.txt diff --git a/icc/Makefile b/icc/Makefile index 85f19be..85f19be 100644..100755 --- a/icc/Makefile +++ b/icc/Makefile diff --git a/icc/Makefile.IBMNT b/icc/Makefile.IBMNT index 26a2bd2..26a2bd2 100644..100755 --- a/icc/Makefile.IBMNT +++ b/icc/Makefile.IBMNT diff --git a/icc/Makefile.OSX b/icc/Makefile.OSX index fb1c88f..fb1c88f 100644..100755 --- a/icc/Makefile.OSX +++ b/icc/Makefile.OSX diff --git a/icc/Makefile.UNIX b/icc/Makefile.UNIX index 91d6005..91d6005 100644..100755 --- a/icc/Makefile.UNIX +++ b/icc/Makefile.UNIX diff --git a/icc/Makefile.WNT b/icc/Makefile.WNT index 4ca291d..4ca291d 100644..100755 --- a/icc/Makefile.WNT +++ b/icc/Makefile.WNT diff --git a/icc/ProPhoto.icm b/icc/ProPhoto.icm Binary files differindex cb6ee56..cb6ee56 100644..100755 --- a/icc/ProPhoto.icm +++ b/icc/ProPhoto.icm diff --git a/icc/ProPhotoLin.icm b/icc/ProPhotoLin.icm Binary files differindex 28369aa..28369aa 100644..100755 --- a/icc/ProPhotoLin.icm +++ b/icc/ProPhotoLin.icm diff --git a/icc/Readme.txt b/icc/Readme.txt index 2b5fd53..2b5fd53 100644..100755 --- a/icc/Readme.txt +++ b/icc/Readme.txt diff --git a/icc/Rec2020.icm b/icc/Rec2020.icm Binary files differindex 0decaf6..0decaf6 100644..100755 --- a/icc/Rec2020.icm +++ b/icc/Rec2020.icm diff --git a/icc/Rec709.icm b/icc/Rec709.icm Binary files differindex abf0a63..abf0a63 100644..100755 --- a/icc/Rec709.icm +++ b/icc/Rec709.icm diff --git a/icc/SMPTE431_P3.icm b/icc/SMPTE431_P3.icm Binary files differindex 8055849..8055849 100644..100755 --- a/icc/SMPTE431_P3.icm +++ b/icc/SMPTE431_P3.icm diff --git a/icc/SMPTE_RP145_NTSC.icm b/icc/SMPTE_RP145_NTSC.icm Binary files differindex 7fc78fb..7fc78fb 100644..100755 --- a/icc/SMPTE_RP145_NTSC.icm +++ b/icc/SMPTE_RP145_NTSC.icm diff --git a/icc/afiles b/icc/afiles index 3ee789a..3ee789a 100644..100755 --- a/icc/afiles +++ b/icc/afiles diff --git a/icc/icc.c b/icc/icc.c index b239060..de8c539 100644..100755 --- a/icc/icc.c +++ b/icc/icc.c @@ -804,7 +804,7 @@ static void read_PCSNumber(icc *icp, icColorSpaceSignature csig, double pcs[3], pcs[1] = read_DCS16Number(p+2); pcs[2] = read_DCS16Number(p+4); } - switch (csig) { + switch ((int)csig) { case icSigXYZData: Lut_Lut2XYZ(pcs, pcs); break; @@ -840,7 +840,7 @@ static int write_PCSNumber(icc *icp, icColorSpaceSignature csig, double pcs[3], csig = icmSigLabV2Data; } - switch (csig) { + switch ((int)csig) { case icSigXYZData: Lut_XYZ2Lut(v, pcs); break; @@ -876,7 +876,7 @@ static int write_PCSNumber(icc *icp, icColorSpaceSignature csig, double pcs[3], /* Public: */ int read_Primitive(icc *icp, icmPrimType ptype, void *prim, char *p) { - switch(ptype) { + switch (ptype) { case icmUInt8Number: *((unsigned int *)prim) = read_UInt8Number(p); return 0; @@ -944,7 +944,7 @@ int read_Primitive(icc *icp, icmPrimType ptype, void *prim, char *p) { /* Public: */ int write_Primitive(icc *icp, icmPrimType ptype, char *p, void *prim) { - switch(ptype) { + switch (ptype) { case icmUInt8Number: return write_UInt8Number(*((unsigned int *)prim), p); case icmUInt16Number: @@ -1073,7 +1073,7 @@ static int check_null_string16(char *cp, int len) { /* Color Space to number of component conversion */ /* Return 0 on error */ static unsigned int number_ColorSpaceSignature(icColorSpaceSignature sig) { - switch(sig) { + switch ((int)sig) { case icSigXYZData: return 3; case icSigLabData: @@ -1134,6 +1134,9 @@ static unsigned int number_ColorSpaceSignature(icColorSpaceSignature sig) { return 1; case icmSigLData: return 1; + case icmSigLptData: + return 3; + case icmSigL8Data: return 1; case icmSigLV2Data: @@ -1171,7 +1174,7 @@ static int chnames_ColorSpaceSignature( icColorSpaceSignature sig, char *cvals[] /* Pointers to return for each channel */ ) { - switch (sig) { + switch ((int)sig) { case icSigXYZData: cvals[0] = "CIE X"; cvals[1] = "CIE Y"; @@ -1246,6 +1249,12 @@ char *cvals[] /* Pointers to return for each channel */ cvals[0] = "CIE L*"; return 2; + case icmSigLptData: + cvals[0] = "L"; + cvals[1] = "p"; + cvals[2] = "t"; + return 2; + default: break; @@ -1382,7 +1391,7 @@ static char *string_AsciiOrBinaryData(unsigned int flags) { /* public tags and sizes */ static const char *string_TagSignature(icTagSignature sig) { static char buf[80]; - switch(sig) { + switch ((int)sig) { case icSigAToB0Tag: return "AToB0 Multidimentional Transform"; case icSigAToB1Tag: @@ -1487,7 +1496,7 @@ static const char *string_TagSignature(icTagSignature sig) { /* technology signature descriptions */ static const char *string_TechnologySignature(icTechnologySignature sig) { static char buf[80]; - switch(sig) { + switch (sig) { case icSigDigitalCamera: return "Digital Camera"; case icSigFilmScanner: @@ -1541,7 +1550,7 @@ static const char *string_TechnologySignature(icTechnologySignature sig) { /* type signatures */ static const char *string_TypeSignature(icTagTypeSignature sig) { static char buf[80]; - switch(sig) { + switch (sig) { case icSigCurveType: return "Curve"; case icSigDataType: @@ -1599,7 +1608,7 @@ static const char *string_TypeSignature(icTagTypeSignature sig) { /* Color Space Signatures */ static const char *string_ColorSpaceSignature(icColorSpaceSignature sig) { static char buf[80]; - switch(sig) { + switch ((int)sig) { case icSigXYZData: return "XYZ"; case icSigLabData: @@ -1662,6 +1671,9 @@ static const char *string_ColorSpaceSignature(icColorSpaceSignature sig) { return "L"; case icmSigL8Data: return "L"; + case icmSigLptData: + return "Lpt"; + case icmSigLV2Data: return "L"; case icmSigLV4Data: @@ -1692,7 +1704,7 @@ char *ColorSpaceSignature2str(icColorSpaceSignature sig) { /* profileClass enumerations */ static const char *string_ProfileClassSignature(icProfileClassSignature sig) { static char buf[80]; - switch(sig) { + switch (sig) { case icSigInputClass: return "Input"; case icSigDisplayClass: @@ -1716,7 +1728,7 @@ static const char *string_ProfileClassSignature(icProfileClassSignature sig) { /* Platform Signatures */ static const char *string_PlatformSignature(icPlatformSignature sig) { static char buf[80]; - switch(sig) { + switch ((int)sig) { case icSigMacintosh: return "Macintosh"; case icSigMicrosoft: @@ -1738,7 +1750,7 @@ static const char *string_PlatformSignature(icPlatformSignature sig) { /* Measurement Geometry, used in the measurmentType tag */ static const char *string_MeasurementGeometry(icMeasurementGeometry sig) { static char buf[30]; - switch(sig) { + switch (sig) { case icGeometryUnknown: return "Unknown"; case icGeometry045or450: @@ -1754,7 +1766,7 @@ static const char *string_MeasurementGeometry(icMeasurementGeometry sig) { /* Rendering Intents, used in the profile header */ static const char *string_RenderingIntent(icRenderingIntent sig) { static char buf[30]; - switch(sig) { + switch((int)sig) { case icPerceptual: return "Perceptual"; case icRelativeColorimetric: @@ -5130,7 +5142,7 @@ double *in /* Input array[outputChan] */ int rv = 0; double *gp; /* Pointer to grid cube base */ double co[MAX_CHAN]; /* Coordinate offset with the grid cell */ - int si[MAX_CHAN]; /* co[] Sort index, [0] = smalest */ + int si[MAX_CHAN]; /* co[] Sort index, [0] = smallest */ /* We are using a simplex (ie. tetrahedral for 3D input) interpolation. */ /* This method is more appropriate for XYZ/RGB/CMYK input spaces, */ @@ -5388,7 +5400,7 @@ double *in /* Input array[outputChan] */ int rv = 0; double *gp; /* Pointer to grid cube base */ double co[MAX_CHAN]; /* Coordinate offset with the grid cell */ - int si[MAX_CHAN]; /* co[] Sort index, [0] = smalest */ + int si[MAX_CHAN]; /* co[] Sort index, [0] = smallest */ /* We are using a simplex (ie. tetrahedral for 3D input) interpolation. */ /* This method is more appropriate for XYZ/RGB/CMYK input spaces, */ @@ -5825,7 +5837,7 @@ int icmSetMultiLutTables( iv = _iv + maxchan; /* Allow for "index under" and smoothing radius values */ /* Setup input table value min-max */ - if (inmin == NULL || imax == NULL) { + if (inmin == NULL || inmax == NULL) { #ifdef SYMETRICAL_DEFAULT_LAB_RANGE /* Symetrical default range. */ /* We are assuming V2 Lab16 encoding, since this is a lut16type that always uses */ /* this encoding */ @@ -13548,6 +13560,13 @@ void icmClamp3(double out[3], double in[3]) { out[i] = in[i] < 0.0 ? 0.0 : in[i]; } +/* Invert a 3 vector */ +void icmInv3(double out[3], double in[3]) { + int i; + for (i = 0; i < 3; i++) + out[i] = -in[i]; +} + /* Add two 3 vectors */ void icmAdd3(double out[3], double in1[3], double in2[3]) { out[0] = in1[0] + in2[0]; @@ -13576,6 +13595,18 @@ void icmMul3(double out[3], double in1[3], double in2[3]) { out[2] = in1[2] * in2[2]; } +/* Take values to power */ +void icmPow3(double out[3], double in[3], double p) { + int i; + + for (i = 0; i < 3; i++) { + if (in[i] < 0.0) + out[i] = -pow(-in[i], p); + else + out[i] = pow(in[i], p); + } +} + /* Take absolute of a 3 vector */ void icmAbs3(double out[3], double in[3]) { out[0] = fabs(in[0]); @@ -13585,6 +13616,16 @@ void icmAbs3(double out[3], double in[3]) { /* - - - - - - - - - - - - - - - - - - - - - - - - */ +/* Set a 3x3 matrix to a value */ +void icmSetVal3x3(double mat[3][3], double val) { + int i, j; + for (j = 0; j < 3; j++) { + for (i = 0; i < 3; i++) { + mat[j][i] = val; + } + } +} + /* Set a 3x3 matrix to unity */ void icmSetUnity3x3(double mat[3][3]) { int i, j; @@ -13609,6 +13650,17 @@ void icmCpy3x3(double dst[3][3], double src[3][3]) { } } +/* Add one 3x3 to another */ +/* dst = src1 + src2 */ +void icmAdd3x3(double dst[3][3], double src1[3][3], double src2[3][3]) { + int i, j; + + for (j = 0; j < 3; j++) { + for (i = 0; i < 3; i++) + dst[j][i] = src1[j][i] + src2[j][i]; + } +} + /* Scale each element of a 3x3 transform matrix */ void icmScale3x3(double dst[3][3], double src[3][3], double scale) { int i, j; @@ -13645,17 +13697,6 @@ void icmMulBy3x3(double out[3], double mat[3][3], double in[3]) { } /* - - - - - - - - - - - - - - - - - - - - - - - - */ -/* Add one 3x3 to another */ -/* dst = src1 + src2 */ -void icmAdd3x3(double dst[3][3], double src1[3][3], double src2[3][3]) { - int i, j; - - for (j = 0; j < 3; j++) { - for (i = 0; i < 3; i++) - dst[j][i] = src1[j][i] + src2[j][i]; - } -} - /* - - - - - - - - - - - - - - - - - - - - - - - - */ /* Tensor product. Multiply two 3 vectors to form a 3x3 matrix */ /* src1[] forms the colums, and src2[] forms the rows in the result */ @@ -13885,6 +13926,13 @@ void icmScale3(double out[3], double in[3], double rat) { out[2] = in[2] * rat; } +/* Scale a 3 vector by the given ratio and add it */ +void icmScaleAdd3(double out[3], double in2[3], double in1[3], double rat) { + out[0] = in2[0] + in1[0] * rat; + out[1] = in2[1] + in1[1] * rat; + out[2] = in2[2] + in1[2] * rat; +} + /* Compute a blend between in0 and in1 */ void icmBlend3(double out[3], double in0[3], double in1[3], double bf) { out[0] = (1.0 - bf) * in0[0] + bf * in1[0]; @@ -13904,6 +13952,47 @@ void icmClip3(double out[3], double in[3]) { } } +/* Clip a vector to the range 0.0 .. 1.0 */ +/* and retun nz if clipping occured */ +int icmClip3sig(double out[3], double in[3]) { + int j; + int clip = 0; + for (j = 0; j < 3; j++) { + out[j] = in[j]; + if (out[j] < 0.0) { + out[j] = 0.0; + clip = 1; + } else if (out[j] > 1.0) { + out[j] = 1.0; + clip = 1; + } + } + return clip; +} + +/* Clip a vector to the range 0.0 .. 1.0 */ +/* and return any clipping margine */ +double icmClip3marg(double out[3], double in[3]) { + int j; + double tt, marg = 0.0; + for (j = 0; j < 3; j++) { + out[j] = in[j]; + if (out[j] < 0.0) { + tt = 0.0 - out[j]; + out[j] = 0.0; + if (tt > marg) + marg = tt; + } else if (out[j] > 1.0) { + tt = out[j] - 1.0; + out[j] = 1.0; + if (tt > marg) + marg = tt; + } + } + return marg; +} + + /* Normalise a 3 vector to the given length. Return nz if not normalisable */ int icmNormalize3(double out[3], double in[3], double len) { double tt = sqrt(in[0] * in[0] + in[1] * in[1] + in[2] * in[2]); @@ -13917,6 +14006,17 @@ int icmNormalize3(double out[3], double in[3], double len) { return 0; } +/* Compute the norm (length) of a vector define by two points */ +double icmNorm22(double in1[2], double in0[2]) { + int j; + double rv; + for (rv = 0.0, j = 0; j < 2; j++) { + double tt = in1[j] - in0[j]; + rv += tt * tt; + } + return sqrt(rv); +} + /* Compute the norm (length) squared of a vector define by two points */ double icmNorm33sq(double in1[3], double in0[3]) { int j; @@ -14063,6 +14163,199 @@ void icmRotMat(double m[3][3], double s[3], double t[3]) { } /* - - - - - - - - - - - - - - - - - - - - - - - - */ + +/* + + mat in out + +[ ] [] [] +[ ] * [] => [] +[ ] [] [] +[ ] [] [] + + */ + +/* Multiply 4 array by 4x4 transform matrix */ +void icmMulBy4x4(double out[4], double mat[4][4], double in[4]) { + double tt[4]; + + tt[0] = mat[0][0] * in[0] + mat[0][1] * in[1] + mat[0][2] * in[2] + mat[0][3] * in[3]; + tt[1] = mat[1][0] * in[0] + mat[1][1] * in[1] + mat[1][2] * in[2] + mat[1][3] * in[3]; + tt[2] = mat[2][0] * in[0] + mat[2][1] * in[1] + mat[2][2] * in[2] + mat[2][3] * in[3]; + tt[3] = mat[3][0] * in[0] + mat[3][1] * in[1] + mat[3][2] * in[2] + mat[3][3] * in[3]; + + out[0] = tt[0]; + out[1] = tt[1]; + out[2] = tt[2]; + out[3] = tt[3]; +} + +/* Transpose a 4x4 matrix */ +void icmTranspose4x4(double out[4][4], double in[4][4]) { + int i, j; + if (out != in) { + for (i = 0; i < 4; i++) + for (j = 0; j < 4; j++) + out[i][j] = in[j][i]; + } else { + double tt[4][4]; + for (i = 0; i < 4; i++) + for (j = 0; j < 4; j++) + tt[i][j] = in[j][i]; + for (i = 0; i < 4; i++) + for (j = 0; j < 4; j++) + out[i][j] = tt[i][j]; + } +} + +/* Clip a vector to the range 0.0 .. 1.0 */ +/* and return any clipping margine */ +double icmClip4marg(double out[4], double in[4]) { + int j; + double tt, marg = 0.0; + for (j = 0; j < 4; j++) { + out[j] = in[j]; + if (out[j] < 0.0) { + tt = 0.0 - out[j]; + out[j] = 0.0; + if (tt > marg) + marg = tt; + } else if (out[j] > 1.0) { + tt = out[j] - 1.0; + out[j] = 1.0; + if (tt > marg) + marg = tt; + } + } + return marg; +} + +/* - - - - - - - - - - - - - - - - - - - - - - - - */ + +/* + + mat in out + +[ ] [] [] +[ ] [] [] +[ ] * [] => [] +[ ] [] [] +[ ] [] [] + + */ + +/* Multiply 5 array by 5x5 transform matrix */ +void icmMulBy5x5(double out[5], double mat[5][5], double in[5]) { + int i, j; + double tt[5]; + + for (i = 0; i < 5; i++) { + tt[i] = 0.0; + for (j = 0; j < 5; j++) + tt[i] += mat[i][j] * in[j]; + } + + for (i = 0; i < 5; i++) + out[i] = tt[i]; +} + +/* Transpose a 5x5 matrix */ +void icmTranspose5x5(double out[5][5], double in[5][5]) { + int i, j; + if (out != in) { + for (i = 0; i < 5; i++) + for (j = 0; j < 5; j++) + out[i][j] = in[j][i]; + } else { + double tt[5][5]; + for (i = 0; i < 5; i++) + for (j = 0; j < 5; j++) + tt[i][j] = in[j][i]; + for (i = 0; i < 5; i++) + for (j = 0; j < 5; j++) + out[i][j] = tt[i][j]; + } +} + +/* Clip a vector to the range 0.0 .. 1.0 */ +/* and return any clipping margine */ +double icmClip5marg(double out[5], double in[5]) { + int j; + double tt, marg = 0.0; + for (j = 0; j < 5; j++) { + out[j] = in[j]; + if (out[j] < 0.0) { + tt = 0.0 - out[j]; + out[j] = 0.0; + if (tt > marg) + marg = tt; + } else if (out[j] > 1.0) { + tt = out[j] - 1.0; + out[j] = 1.0; + if (tt > marg) + marg = tt; + } + } + return marg; +} + + +/* Multiply 6 array by 6x6 transform matrix */ +void icmMulBy6x6(double out[6], double mat[6][6], double in[6]) { + int i, j; + double tt[6]; + + for (i = 0; i < 6; i++) { + tt[i] = 0.0; + for (j = 0; j < 6; j++) + tt[i] += mat[i][j] * in[j]; + } + + for (i = 0; i < 6; i++) + out[i] = tt[i]; +} + +/* Transpose a 6x6 matrix */ +void icmTranspose6x6(double out[6][6], double in[6][6]) { + int i, j; + if (out != in) { + for (i = 0; i < 6; i++) + for (j = 0; j < 6; j++) + out[i][j] = in[j][i]; + } else { + double tt[6][6]; + for (i = 0; i < 6; i++) + for (j = 0; j < 6; j++) + tt[i][j] = in[j][i]; + for (i = 0; i < 6; i++) + for (j = 0; j < 6; j++) + out[i][j] = tt[i][j]; + } +} + +/* Clip a vector to the range 0.0 .. 1.0 */ +/* and return any clipping margine */ +double icmClip6marg(double out[6], double in[6]) { + int j; + double tt, marg = 0.0; + for (j = 0; j < 6; j++) { + out[j] = in[j]; + if (out[j] < 0.0) { + tt = 0.0 - out[j]; + out[j] = 0.0; + if (tt > marg) + marg = tt; + } else if (out[j] > 1.0) { + tt = out[j] - 1.0; + out[j] = 1.0; + if (tt > marg) + marg = tt; + } + } + return marg; +} + +/* - - - - - - - - - - - - - - - - - - - - - - - - */ /* Multiply 2 array by 2x2 transform matrix */ void icmMulBy2x2(double out[2], double mat[2][2], double in[2]) { double tt[2]; @@ -14207,11 +14500,11 @@ double ve_0[3] /* Second point on line */ int icmLinePointClosest(double cp[3], double *pa, double la0[3], double la1[3], double pp[3]) { double va[3], vp[3]; - double val; /* Vector length */ + double val; /* Vector length squared */ double a; /* Parameter value */ icmSub3(va, la1, la0); /* Line vector */ - val = icmNorm3(va); /* Vector length */ + val = icmNorm3sq(va); /* Vector length squared */ if (val < 1e-12) return 1; @@ -14345,7 +14638,7 @@ double icmPlaneDist3(double eq[4], double p[3]) { } /* - - - - - - - - - - - - - - - - - - - - - - - - */ -/* Given 2 2D points, compute a plane equation. */ +/* Given 2 2D points, compute a plane equation (implicit line equation). */ /* The normal will be right handed given the order of the points */ /* The plane equation will be the 2 normal components and the constant. */ /* Return nz if any points are cooincident or co-linear */ @@ -14375,7 +14668,7 @@ int icmPlaneEqn2(double eq[3], double p0[2], double p1[2]) { return 0; } -/* Given a 2D point and a plane equation, return the signed */ +/* Given a 2D point and a plane equation (implicit line), return the signed */ /* distance from the plane. The distance will be +ve if the point */ /* is to the right of the plane formed by two points in order */ double icmPlaneDist2(double eq[3], double p[2]) { @@ -14388,6 +14681,70 @@ double icmPlaneDist2(double eq[3], double p[2]) { return rv; } +/* Return the closest point on an implicit line to a point. */ +/* Also return the absolute distance */ +double icmImpLinePointClosest2(double cp[2], double eq[3], double pp[2]) { + double q; /* Closest distance to line */ + + q = eq[0] * pp[0] + + eq[1] * pp[1] + + eq[2]; + + cp[0] = pp[0] - q * eq[0]; + cp[1] = pp[1] - q * eq[1]; + + return fabs(q); +} + +/* Return the point of intersection of two implicit lines . */ +/* Return nz if there is no intersection (lines are parallel) */ +int icmImpLineIntersect2(double res[2], double eq1[3], double eq2[3]) { + double num; + + num = eq1[0] * eq2[1] - eq2[0] * eq1[1]; + + if (fabs(num) < 1e-10) + return 1; + + res[0] = (eq2[2] * eq1[1] - eq1[2] * eq2[1])/num; + res[1] = (eq1[2] * eq2[0] - eq2[2] * eq1[0])/num; + + return 0; +} + +/* Compute the closest point on a line to a point. */ +/* Return closest point and parameter value if not NULL. */ +/* Return nz if the line length is zero */ +int icmLinePointClosest2(double cp[2], double *pa, + double la0[2], double la1[2], double pp[2]) { + double va[2], vp[2]; + double val; /* Vector length squared */ + double a; /* Parameter value */ + + va[0] = la1[0] - la0[0]; /* Line vector */ + va[1] = la1[1] - la0[1]; + + val = va[0] * va[0] + va[1] * va[1]; + + if (val < 1e-12) + return 1; + + vp[0] = pp[0] - la0[0]; /* Point vector to line base */ + vp[1] = pp[1] - la0[1]; + + a = (vp[0] * va[0] + vp[1] * va[1]) / val; /* Normalised dist of point projected onto line */ + + if (cp != NULL) { + cp[0] = (1.0 - a) * la0[0] + a * la1[0]; + cp[1] = (1.0 - a) * la0[1] + a * la1[1]; + } + + if (pa != NULL) + *pa = a; + + return 0; +} + /* Given two infinite 2D lines define by 4 points, compute the intersection. */ /* Return nz if there is no intersection (lines are parallel) */ int icmLineIntersect2(double res[2], double p1[2], double p2[2], double p3[2], double p4[2]) { @@ -14411,6 +14768,41 @@ int icmLineIntersect2(double res[2], double p1[2], double p2[2], double p3[2], d return 0; } +/* Given two finite 2D lines define by 4 points, compute their paramaterized intersection. */ +/* aprm may be NULL */ +/* Return 2 if there is no intersection (lines are parallel) */ +/* Return 1 lines do not cross within their length */ +int icmParmLineIntersect2(double res[2], double aprm[2], double p1[2], double p2[2], double p3[2], double p4[2]) { + double _prm[2]; + double *prm = aprm != NULL ? aprm : _prm; + double x21 = p2[0] - p1[0]; + double y21 = p2[1] - p1[1]; + double x31 = p3[0] - p1[0]; + double y31 = p3[1] - p1[1]; + double x43 = p4[0] - p3[0]; + double y43 = p4[1] - p3[1]; + double num; /* Numerator */ + + num = x43 * y21 - x21 * y43; + + if (fabs(num) < 1e-10) + return 2; + + prm[0] = (x43 * y31 - x31 * y43)/num; /* Parameter of 1->2 */ + prm[1] = (x21 * y31 - x31 * y21)/num; /* Parameter of 3->4 */ + + if (res != NULL) { + res[0] = x21 * prm[0] + p1[0]; + res[1] = y21 * prm[0] + p1[1]; + } + + if (prm[0] < -1e-10 || prm[0] > (1.0 + 1e-10) + || prm[1] < -1e-10 || prm[1] > (1.0 + 1e-10)) + return 1; + + return 0; +} + /* - - - - - - - - - - - - - - - - - - - - - - - - */ /* CIE Y (range 0 .. 1) to perceptual CIE 1976 L* (range 0 .. 100) */ @@ -14497,26 +14889,122 @@ icmLab2XYZ(icmXYZNumber *w, double *out, double *in) { out[2] = z * w->Z; } +/* + * This is a modern update to L*a*b*, based on IPT space. + * + * Differences to L*a*b* and IPT: + * Using inverse CIE 2012 2degree LMS to XYZ matrix instead of Hunt-Pointer-Estevez + * Von Kries chromatic adapation in LMS space. + * Using L* compression rather than IPT pure 0.43 power. + * Tweaked LMS' to IPT matrix to account for change in XYZ to LMS matrix. + * Output scaled to L*a*b* type ranges, to maintain 1 JND scale. + * (Watch out - L* value is not a non-linear Y value though!). + */ + +/* CIE XYZ to perceptual Lpt */ +void +icmXYZ2Lpt(icmXYZNumber *w, double *out, double *in) { + double wxyz[3]; + double wlms[3]; + double lms[3]; + double xyz2lms[3][3] = { + { 0.2052445519046028, 0.8334486497310412, -0.0386932016356441 }, + { -0.4972221301804286, 1.4034846060306130, 0.0937375241498157 }, + { 0.0000000000000000, 0.0000000000000000, 1.0000000000000000 } + }; + double lms2ipt[3][3] = { + { 0.6585034777870502, 0.1424555300344579, 0.1990409921784920 }, + { 5.6413505933276049, -6.1697985811414187, 0.5284479878138138 }, + { 1.6370552576322106, 0.0192823194340315, -1.6563375770662419 } + }; + int j; -/* LCh to Lab */ + /* White point in Cone space */ + wxyz[0] = w->X; + wxyz[1] = w->Y; + wxyz[2] = w->Z; + icmMulBy3x3(wlms, xyz2lms, wxyz); + + /* Incoming XYZ to Cone space */ + icmMulBy3x3(lms, xyz2lms, in); + + for (j = 0; j < 3; j++) { + /* Von Kries chromatic adapation */ + lms[j] /= wlms[j]; + + /* Non-linearity */ + if (lms[j] > 0.008856451586) + lms[j] = pow(lms[j],1.0/3.0); + else + lms[j] = 7.787036979 * lms[j] + 16.0/116.0; + lms[j] = 116.0 * lms[j] - 16.0; + } + /* IPT */ + icmMulBy3x3(out, lms2ipt, lms); +} + +void +icmLpt2XYZ(icmXYZNumber *w, double *out, double *in) { + double wxyz[3]; + double wlms[3]; + double lms[3]; + double xyz2lms[3][3] = { + { 0.2052445519046028, 0.8334486497310412, -0.0386932016356441 }, + { -0.4972221301804286, 1.4034846060306130, 0.0937375241498157 }, + { 0.0000000000000000, 0.0000000000000000, 1.0000000000000000 } + }; + double ipt2lms[3][3] = { + { 1.0000000000000000, 0.0234881527511557, 0.1276631419615779 }, + { 1.0000000000000000, -0.1387534648407132, 0.0759005921388901 }, + { 1.0000000000000000, 0.0215994105411036, -0.4766811148374502 } + }; + double lms2xyz[3][3] = { + { 1.9979376130193824, -1.1864600428553205, 0.1885224298359384 }, + { 0.7078230795296872, 0.2921769204703129, -0.0000000000000000 }, + { 0.0000000000000000, 0.0000000000000000, 1.0000000000000000 } + }; + int j; + + wxyz[0] = w->X; + wxyz[1] = w->Y; + wxyz[2] = w->Z; + icmMulBy3x3(wlms, xyz2lms, wxyz); + + icmMulBy3x3(lms, ipt2lms, in); + + for (j = 0; j < 3; j++) { + lms[j] = (lms[j] + 16.0)/116.0; + + if (lms[j] > 24.0/116.0) + lms[j] = pow(lms[j], 3.0); + else + lms[j] = (lms[j] - 16.0/116.0)/7.787036979; + + lms[j] *= wlms[j]; + } + + icmMulBy3x3(out, lms2xyz, lms); +} + +/* LCh to Lab (general to polar, works with Lpt, Luv too) */ void icmLCh2Lab(double *out, double *in) { double C, h; C = in[1]; - h = 3.14159265359/180.0 * in[2]; + h = M_PI/180.0 * in[2]; out[0] = in[0]; out[1] = C * cos(h); out[2] = C * sin(h); } -/* Lab to LCh (general to polar, works with Luv too) */ +/* Lab to LCh (general to polar, works with Lpt, Luv too) */ void icmLab2LCh(double *out, double *in) { double C, h; C = sqrt(in[1] * in[1] + in[2] * in[2]); - h = (180.0/3.14159265359) * atan2(in[2], in[1]); + h = (180.0/M_PI) * atan2(in[2], in[1]); h = (h < 0.0) ? h + 360.0 : h; out[0] = in[0]; @@ -14531,8 +15019,8 @@ extern ICCLIB_API void icmXYZ2Yxy(double *out, double *in) { if (sum < 1e-9) { Y = 0.0; - y = 0.333333333; - x = 0.333333333; + y = 1.0/3.0; + x = 1.0/3.0; } else { Y = in[1]; x = in[0]/sum; @@ -14543,6 +15031,22 @@ extern ICCLIB_API void icmXYZ2Yxy(double *out, double *in) { out[2] = y; } +/* XYZ to xy */ +extern ICCLIB_API void icmXYZ2xy(double *out, double *in) { + double sum = in[0] + in[1] + in[2]; + double x, y; + + if (sum < 1e-9) { + y = 1.0/3.0; + x = 1.0/3.0; + } else { + x = in[0]/sum; + y = in[1]/sum; + } + out[0] = x; + out[1] = y; +} + /* Yxy to XYZ */ extern ICCLIB_API void icmYxy2XYZ(double *out, double *in) { double Y = in[0]; @@ -14560,6 +15064,21 @@ extern ICCLIB_API void icmYxy2XYZ(double *out, double *in) { } } +/* Y & xy to XYZ */ +extern ICCLIB_API void icmY_xy2XYZ(double *out, double *xy, double Y) { + double x = xy[0]; + double y = xy[1]; + double z = 1.0 - x - y; + double sum; + if (y < 1e-9) { + out[0] = out[1] = out[2] = 0.0; + } else { + sum = Y/y; + out[0] = x * sum; + out[1] = Y; + out[2] = z * sum; + } +} /* CIE XYZ to perceptual CIE 1976 L*u*v* */ extern ICCLIB_API void icmXYZ2Luv(icmXYZNumber *w, double *out, double *in) { @@ -14616,7 +15135,7 @@ extern ICCLIB_API void icmLuv2XYZ(icmXYZNumber *w, double *out, double *in) { } /* CIE XYZ to perceptual CIE 1976 UCS diagram Yu'v'*/ -/* (Yu'v' is a better chromaticity space than Yxy) */ +/* (Yu'v' is a better linear chromaticity space than Yxy) */ extern ICCLIB_API void icmXYZ21976UCS(double *out, double *in) { double X = in[0], Y = in[1], Z = in[2]; double den, u, v; @@ -14657,6 +15176,27 @@ extern ICCLIB_API void icm1976UCS2XYZ(double *out, double *in) { out[2] = Z; } +/* CIE XYZ to perceptual CIE 1976 UCS diagram u'v'*/ +/* (u'v' is a better linear chromaticity space than xy) */ +extern ICCLIB_API void icmXYZ21976UCSuv(double *out, double *in) { + double X = in[0], Y = in[1], Z = in[2]; + double den, u, v; + + den = (X + 15.0 * Y + 3.0 * Z); + + if (den < 1e-9) { + u = 4.0/19.0; + v = 9.0/19.0; + } else { + u = (4.0 * X) / den; + v = (9.0 * Y) / den; + } + + out[0] = u; + out[1] = v; +} + + /* CIE XYZ to perceptual CIE 1960 UCS */ /* (This was obsoleted by the 1976UCS, but is still used */ /* in computing color temperatures.) */ @@ -14862,6 +15402,16 @@ double icmLabDEsq(double *Lab0, double *Lab1) { return rv; } +/* Return the normal Delta E squared given two XYZ values */ +extern ICCLIB_API double icmXYZLabDEsq(icmXYZNumber *w, double *in0, double *in1) { + double lab0[3], lab1[3], rv; + + icmXYZ2Lab(w, lab0, in0); + icmXYZ2Lab(w, lab1, in1); + rv = icmLabDEsq(lab0, lab1); + return rv; +} + /* Return the normal Delta E given two XYZ values */ extern ICCLIB_API double icmXYZLabDE(icmXYZNumber *w, double *in0, double *in1) { double lab0[3], lab1[3], rv; @@ -14872,6 +15422,26 @@ extern ICCLIB_API double icmXYZLabDE(icmXYZNumber *w, double *in0, double *in1) return rv; } +/* Return the normal Delta E squared given two XYZ values */ +extern ICCLIB_API double icmXYZLptDEsq(icmXYZNumber *w, double *in0, double *in1) { + double lab0[3], lab1[3], rv; + + icmXYZ2Lpt(w, lab0, in0); + icmXYZ2Lpt(w, lab1, in1); + rv = icmLabDEsq(lab0, lab1); + return rv; +} + +/* Return the normal Delta E given two XYZ values */ +extern ICCLIB_API double icmXYZLptDE(icmXYZNumber *w, double *in0, double *in1) { + double lab0[3], lab1[3], rv; + + icmXYZ2Lpt(w, lab0, in0); + icmXYZ2Lpt(w, lab1, in1); + rv = icmLabDE(lab0, lab1); + return rv; +} + /* (Note that CIE94 can give odd results for very large delta E's, */ /* when one of the two points is near the neutral axis: */ /* ie DE(A,B + del) != DE(A,B) + DE(del) */ @@ -14962,8 +15532,8 @@ double icmCIE2Ksq(double *Lab0, double *Lab1) { /* test cases pass, as one of them lies on the edge of */ /* a mathematical discontinuity. The precision is still */ /* enough for any practical use. */ -#define RAD2DEG(xx) (180.0/3.14159265358979 * (xx)) -#define DEG2RAD(xx) (3.14159265358979/180.0 * (xx)) +#define RAD2DEG(xx) (180.0/M_PI * (xx)) +#define DEG2RAD(xx) (M_PI/180.0 * (xx)) /* Compute Cromanance and Hue angles */ { @@ -18487,7 +19057,7 @@ static icmLuBase* icc_get_luobj ( if (intent == icmDefaultIntent) intent = icPerceptual; /* Make this the default */ - switch (intent) { + switch ((int)intent) { case icAbsoluteColorimetric: ttag = icSigAToB1Tag; fbtag = icSigAToB0Tag; @@ -18588,7 +19158,7 @@ static icmLuBase* icc_get_luobj ( if (intent == icmDefaultIntent) intent = icPerceptual; /* Make this the default */ - switch (intent) { + switch ((int)intent) { case icAbsoluteColorimetric: ttag = icSigBToA1Tag; fbtag = icSigBToA0Tag; @@ -18708,7 +19278,7 @@ static icmLuBase* icc_get_luobj ( if (intent == icmDefaultIntent) intent = icPerceptual; /* Make this the default */ - switch (intent) { + switch ((int)intent) { case icRelativeColorimetric: case icAbsoluteColorimetric: ttag = icSigAToB1Tag; @@ -18778,7 +19348,7 @@ static icmLuBase* icc_get_luobj ( if (intent == icmDefaultIntent) intent = icPerceptual; /* Make this the default */ - switch (intent) { + switch ((int)intent) { case icRelativeColorimetric: case icAbsoluteColorimetric: ttag = icSigBToA1Tag; @@ -18852,7 +19422,7 @@ static icmLuBase* icc_get_luobj ( return NULL; } #else /* Be more forgiving */ - switch (intent) { + switch ((int)intent) { case icAbsoluteColorimetric: case icmAbsolutePerceptual: /* Special icclib intent */ case icmAbsoluteSaturation: /* Special icclib intent */ @@ -18879,7 +19449,7 @@ static icmLuBase* icc_get_luobj ( case icmPreview: /* PCS to PCS */ - switch (intent) { + switch ((int)intent) { case icRelativeColorimetric: ttag = icSigPreview1Tag; break; @@ -19269,6 +19839,40 @@ icmAlloc *al /* Memory allocator */ /* ---------------------------------------------------------- */ + +/* Convert an angle in radians into chromatic RGB values */ +/* in a simple geometric fashion, with 0 = Red. */ +void icmRad2RGB(double rgb[3], double ang) { + double th1 = 1.0/3.0 * 2.0 * M_PI; + double th2 = 2.0/3.0 * 2.0 * M_PI; + double bl; + + while (ang < 0.0) + ang += 2.0 * M_PI; + while (ang >= (2.0 * M_PI)) + ang -= 2.0 * M_PI; + + if (ang < th1) { + bl = ang/th1; + rgb[0] = (1.0 - bl); + rgb[1] = bl; + rgb[2] = 0.0; + + } else if (ang < th2) { + bl = (ang - th1)/th1; + rgb[0] = 0.0; + rgb[1] = (1.0 - bl); + rgb[2] = bl; + + } else { + bl = (ang - th2)/th1; + rgb[0] = bl; + rgb[1] = 0.0; + rgb[2] = (1.0 - bl); + } +} + +/* ---------------------------------------------------------- */ /* Print an int vector to a string. */ /* Returned static buffer is re-used every 5 calls. */ char *icmPiv(int di, int *p) { diff --git a/icc/icc.h b/icc/icc.h index e0bf88e..1e2caf8 100644..100755 --- a/icc/icc.h +++ b/icc/icc.h @@ -33,7 +33,7 @@ #define ICCLIB_VERSION 0x020021 #define ICCLIB_VERSION_STR "2.21" -#undef ENABLE_V4 /* V4 is not fully implemented */ +#undef ENABLE_V4 /* [und] V4 is not fully implemented, but enables parsing */ /* * Note XYZ scaling to 1.0, not 100.0 @@ -360,6 +360,9 @@ typedef int icmSig; /* Otherwise un-enumerated 4 byte signature */ /* A monochrome CIE Y space */ #define icmSigYData ((icColorSpaceSignature) icmMakeTag('Y',' ',' ',' ')) +/* A modern take on Lab */ +#define icmSigLptData ((icColorSpaceSignature) icmMakeTag('L','p','t',' ')) + /* Pseudo Color Space Signatures - just used within icclib */ @@ -1778,13 +1781,23 @@ extern ICCLIB_API unsigned int icmCSSig2chanNames( icColorSpaceSignature sig, ch #define icmSet3(d_ary, s_val) ((d_ary)[0] = (s_val), (d_ary)[1] = (s_val), \ (d_ary)[2] = (s_val)) +/* Copy a 2 vector */ +#define icmCpy2(d_ary, s_ary) ((d_ary)[0] = (s_ary)[0], (d_ary)[1] = (s_ary)[1]) + /* Copy a 3 vector */ #define icmCpy3(d_ary, s_ary) ((d_ary)[0] = (s_ary)[0], (d_ary)[1] = (s_ary)[1], \ (d_ary)[2] = (s_ary)[2]) +/* Copy a 4 vector */ +#define icmCpy4(d_ary, s_ary) ((d_ary)[0] = (s_ary)[0], (d_ary)[1] = (s_ary)[1], \ + (d_ary)[2] = (s_ary)[2], (d_ary)[3] = (s_ary)[3]) + /* Clamp a 3 vector to be +ve */ void icmClamp3(double out[3], double in[3]); +/* Invert a 3 vector */ +void icmInv3(double out[3], double in[3]); + /* Add two 3 vectors */ void icmAdd3(double out[3], double in1[3], double in2[3]); @@ -1805,6 +1818,9 @@ void icmMul3(double out[3], double in1[3], double in2[3]); #define ICMMUL3(o, i, j) ((o)[0] = (i)[0] * (j)[0], (o)[1] = (i)[1] * (j)[1], (o)[2] = (i)[2] * (j)[2]) +/* Take values to power */ +void icmPow3(double out[3], double in[3], double p); + /* Take absolute of a 3 vector */ void icmAbs3(double out[3], double in[3]); @@ -1816,6 +1832,8 @@ double icmDot3(double in1[3], double in2[3]); /* Compute the cross product of two 3D vectors, out = in1 x in2 */ void icmCross3(double out[3], double in1[3], double in2[3]); +#define icmNorm2(i) sqrt((i)[0] * (i)[0] + (i)[1] * (i)[1]) + /* Compute the norm squared (length squared) of a 3 vector */ double icmNorm3sq(double in[3]); @@ -1831,15 +1849,29 @@ void icmScale3(double out[3], double in[3], double rat); #define ICMSCALE3(o, i, j) ((o)[0] = (i)[0] * (j), (o)[1] = (i)[1] * (j), (o)[2] = (i)[2] * (j)) +/* Scale a 3 vector by the given ratio and add it */ +void icmScaleAdd3(double out[3], double in2[3], double in1[3], double rat); + /* Compute a blend between in0 and in1 */ void icmBlend3(double out[3], double in0[3], double in1[3], double bf); /* Clip a vector to the range 0.0 .. 1.0 */ void icmClip3(double out[3], double in[3]); +/* Clip a vector to the range 0.0 .. 1.0 */ +/* and return nz if clipping occured */ +int icmClip3sig(double out[3], double in[3]); + +/* Clip a vector to the range 0.0 .. 1.0 */ +/* and return any clipping margine */ +double icmClip3marg(double out[3], double in[3]); + /* Normalise a 3 vector to the given length. Return nz if not normalisable */ int icmNormalize3(double out[3], double in[3], double len); +/* Compute the norm (length) of of a vector defined by two points */ +double icmNorm22(double in1[2], double in0[2]); + /* Compute the norm squared (length squared) of a vector defined by two points */ double icmNorm33sq(double in1[3], double in0[3]); @@ -1854,6 +1886,8 @@ void icmScale33(double out[3], double in1[3], double in0[3], double rat); /* Return nz if not normalisable */ int icmNormalize33(double out[3], double in1[3], double in0[3], double len); +/* Set a 3x3 matrix to a value */ +void icmSetVal3x3(double mat[3][3], double val); /* Set a 3x3 matrix to unity */ void icmSetUnity3x3(double mat[3][3]); @@ -1861,6 +1895,9 @@ void icmSetUnity3x3(double mat[3][3]); /* Copy a 3x3 transform matrix */ void icmCpy3x3(double out[3][3], double mat[3][3]); +/* Add a 3x3 transform matrix to another */ +void icmAdd3x3(double dst[3][3], double src1[3][3], double src2[3][3]); + /* Scale each element of a 3x3 transform matrix */ void icmScale3x3(double dst[3][3], double src[3][3], double scale); @@ -1868,10 +1905,6 @@ void icmScale3x3(double dst[3][3], double src[3][3], double scale); /* Organization is mat[out][in] */ void icmMulBy3x3(double out[3], double mat[3][3], double in[3]); -/* Add one 3x3 to another */ -/* dst = src1 + src2 */ -void icmAdd3x3(double dst[3][3], double src1[3][3], double src2[3][3]); - /* Tensor product. Multiply two 3 vectors to form a 3x3 matrix */ /* src1[] forms the colums, and src2[] forms the rows in the result */ void icmTensMul3(double dst[3][3], double src1[3], double src2[3]); @@ -1937,6 +1970,44 @@ double icmPlaneDist3(double eq[4], double p[3]); /* - - - - - - - - - - - - - - - - - - - - - - - */ +/* Multiply 4 vector by 4x4 transform matrix */ +/* Organization is mat[out][in] */ +void icmMulBy4x4(double out[4], double mat[4][4], double in[4]); + +/* Transpose a 4x4 matrix */ +void icmTranspose4x4(double out[4][4], double in[4][4]); + +/* Clip a vector to the range 0.0 .. 1.0 */ +/* and return any clipping margine */ +double icmClip4marg(double out[4], double in[4]); + +/* - - - - - - - - - - - - - - - - - - - - - - - */ + +/* Multiply 5 vector by 5x5 transform matrix */ +/* Organization is mat[out][in] */ +void icmMulBy5x5(double out[5], double mat[5][5], double in[5]); + +/* Transpose a 5x5 matrix */ +void icmTranspose5x5(double out[5][5], double in[5][5]); + +/* Clip a vector to the range 0.0 .. 1.0 */ +/* and return any clipping margine */ +double icmClip5marg(double out[5], double in[5]); + + +/* Multiply 6 vector by 6x6 transform matrix */ +/* Organization is mat[out][in] */ +void icmMulBy6x6(double out[6], double mat[6][6], double in[6]); + +/* Transpose a 6x6 matrix */ +void icmTranspose6x6(double out[6][6], double in[6][6]); + +/* Clip a vector to the range 0.0 .. 1.0 */ +/* and return any clipping margine */ +double icmClip6marg(double out[6], double in[6]); + +/* - - - - - - - - - - - - - - - - - - - - - - - */ + /* Given 2 2D points, compute a plane equation. */ /* The normal will be right handed given the order of the points */ /* The plane equation will be the 2 normal components and the constant. */ @@ -1947,10 +2018,30 @@ int icmPlaneEqn2(double eq[3], double p0[2], double p1[2]); /* distance from the plane */ double icmPlaneDist2(double eq[3], double p[2]); +/* Return the closest point on an implicit line to a point. */ +/* Also return the absolute distance */ +double icmImpLinePointClosest2(double cp[2], double eq[3], double pp[2]); + +/* Return the point of intersection of two implicit lines . */ +/* Return nz if there is no intersection (lines are parallel) */ +int icmImpLineIntersect2(double res[2], double eq1[3], double eq2[3]); + + +/* Compute the closest point on a line to a point. */ +/* Return closest point and parameter value if not NULL. */ +/* Return nz if the line length is zero */ +int icmLinePointClosest2(double cp[2], double *pa, + double la0[2], double la1[2], double pp[2]); + /* Given two infinite 2D lines define by two pairs of points, compute the intersection. */ /* Return nz if there is no intersection (lines are parallel) */ int icmLineIntersect2(double res[2], double p1[2], double p2[2], double p3[2], double p4[2]); +/* Given two finite 2D lines define by 4 points, compute their paramaterized intersection. */ +/* aprm may be NULL */ +/* Return nz if there is no intersection (lines are parallel or do not cross in length) */ +int icmParmLineIntersect2(double ares[2], double aprm[2], double p1[2], double p2[2], double p3[2], double p4[2]); + /* Multiply 2 array by 2x2 transform matrix */ void icmMulBy2x2(double out[2], double mat[2][2], double in[2]); @@ -1983,18 +2074,32 @@ extern ICCLIB_API void icmXYZ2Lab(icmXYZNumber *w, double *out, double *in); /* Perceptual Lab to CIE XYZ */ extern ICCLIB_API void icmLab2XYZ(icmXYZNumber *w, double *out, double *in); -/* LCh to Lab */ +/* CIE XYZ to perceptual Lpt */ +extern ICCLIB_API void icmXYZ2Lpt(icmXYZNumber *w, double *out, double *in); + +/* Perceptual Lpt to CIE XYZ */ +extern ICCLIB_API void icmLpt2XYZ(icmXYZNumber *w, double *out, double *in); + +/* LCh to Lab (general) */ extern ICCLIB_API void icmLCh2Lab(double *out, double *in); -/* Lab to LCh */ +/* Lab to LCh (general) */ extern ICCLIB_API void icmLab2LCh(double *out, double *in); + /* XYZ to Yxy */ extern ICCLIB_API void icmXYZ2Yxy(double *out, double *in); /* Yxy to XYZ */ extern ICCLIB_API void icmYxy2XYZ(double *out, double *in); +/* XYZ to xy */ +extern ICCLIB_API void icmXYZ2xy(double *out, double *in); + +/* Y & xy to XYZ */ +extern ICCLIB_API void icmY_xy2XYZ(double *out, double *xy, double Y); + + /* CIE XYZ to perceptual Luv */ extern ICCLIB_API void icmXYZ2Luv(icmXYZNumber *w, double *out, double *in); @@ -2003,12 +2108,16 @@ extern ICCLIB_API void icmLuv2XYZ(icmXYZNumber *w, double *out, double *in); /* CIE XYZ to perceptual CIE 1976 UCS diagram Yu'v'*/ -/* (Yu'v' is a better chromaticity space than Yxy) */ +/* (Yu'v' is a better linear chromaticity space than Yxy) */ extern ICCLIB_API void icmXYZ21976UCS(double *out, double *in); /* Perceptual CIE 1976 UCS diagram Yu'v' to CIE XYZ */ extern ICCLIB_API void icm1976UCS2XYZ(double *out, double *in); +/* CIE XYZ to perceptual CIE 1976 UCS diagram u'v'*/ +/* (u'v' is a better linear chromaticity space than xy) */ +extern ICCLIB_API void icmXYZ21976UCSuv(double *out, double *in); + /* CIE XYZ to perceptual CIE 1960 UCS */ /* (This was obsoleted by the 1976UCS, but is still used */ @@ -2072,9 +2181,18 @@ extern ICCLIB_API double icmLabDE(double *in0, double *in1); /* Return the normal Delta E squared, given two Lab values */ extern ICCLIB_API double icmLabDEsq(double *in0, double *in1); +/* Return the normal Delta E squared given two XYZ values */ +extern ICCLIB_API double icmXYZLabDEsq(icmXYZNumber *w, double *in0, double *in1); + /* Return the normal Delta E given two XYZ values */ extern ICCLIB_API double icmXYZLabDE(icmXYZNumber *w, double *in0, double *in1); +/* Return the normal Delta E squared given two XYZ values */ +extern ICCLIB_API double icmXYZLptDEsq(icmXYZNumber *w, double *in0, double *in1); + +/* Return the normal Delta E given two XYZ values */ +extern ICCLIB_API double icmXYZLptDE(icmXYZNumber *w, double *in0, double *in1); + /* Return the CIE94 Delta E color difference measure for two Lab values */ extern ICCLIB_API double icmCIE94(double *in0, double *in1); @@ -2249,6 +2367,13 @@ double icmDICOM_bwd(double L); /* ---------------------------------------------------------- */ +/* Some utility functions */ + +/* Convert an angle in radians into chromatic RGB values */ +/* in a simple geometric fashion with 0 = Red */ +void icmRad2RGB(double rgb[3], double ang); + +/* ---------------------------------------------------------- */ /* Print an int vector to a string. */ /* Returned static buffer is re-used every 5 calls. */ char *icmPiv(int di, int *p); diff --git a/icc/iccV42.h b/icc/iccV42.h index a84f79d..a84f79d 100644..100755 --- a/icc/iccV42.h +++ b/icc/iccV42.h diff --git a/icc/iccdump.c b/icc/iccdump.c index 8574258..8574258 100644..100755 --- a/icc/iccdump.c +++ b/icc/iccdump.c diff --git a/icc/icclu.c b/icc/icclu.c index 5c732d0..5c732d0 100644..100755 --- a/icc/icclu.c +++ b/icc/icclu.c diff --git a/icc/iccrw.c b/icc/iccrw.c index f33c164..f33c164 100644..100755 --- a/icc/iccrw.c +++ b/icc/iccrw.c diff --git a/icc/iccstd.c b/icc/iccstd.c index 6629250..6629250 100644..100755 --- a/icc/iccstd.c +++ b/icc/iccstd.c diff --git a/icc/icctest.c b/icc/icctest.c index 647ba07..647ba07 100644..100755 --- a/icc/icctest.c +++ b/icc/icctest.c diff --git a/icc/lab2lab.icm b/icc/lab2lab.icm Binary files differindex 39a5911..39a5911 100644..100755 --- a/icc/lab2lab.icm +++ b/icc/lab2lab.icm diff --git a/icc/log.txt b/icc/log.txt index b531f5c..b531f5c 100644..100755 --- a/icc/log.txt +++ b/icc/log.txt diff --git a/icc/lutest.c b/icc/lutest.c index fb05ea9..fb05ea9 100644..100755 --- a/icc/lutest.c +++ b/icc/lutest.c diff --git a/icc/mcheck.c b/icc/mcheck.c index 51368ca..51368ca 100644..100755 --- a/icc/mcheck.c +++ b/icc/mcheck.c diff --git a/icc/mkDispProf.c b/icc/mkDispProf.c index b7c32c6..b7c32c6 100644..100755 --- a/icc/mkDispProf.c +++ b/icc/mkDispProf.c diff --git a/icc/sRGB.icm b/icc/sRGB.icm Binary files differindex 59b4507..59b4507 100644..100755 --- a/icc/sRGB.icm +++ b/icc/sRGB.icm diff --git a/icc/testDE2K.c b/icc/testDE2K.c index 11a4201..11a4201 100644..100755 --- a/icc/testDE2K.c +++ b/icc/testDE2K.c diff --git a/icc/todo.txt b/icc/todo.txt index bdbaa5e..bdbaa5e 100644..100755 --- a/icc/todo.txt +++ b/icc/todo.txt diff --git a/imdi/Jamfile b/imdi/Jamfile index 79b27fb..79b27fb 100644..100755 --- a/imdi/Jamfile +++ b/imdi/Jamfile diff --git a/imdi/License.txt b/imdi/License.txt index a871fcf..a871fcf 100644..100755 --- a/imdi/License.txt +++ b/imdi/License.txt diff --git a/imdi/Makefile b/imdi/Makefile index 5523893..5523893 100644..100755 --- a/imdi/Makefile +++ b/imdi/Makefile diff --git a/imdi/Makefile.OSX b/imdi/Makefile.OSX index 1e03a43..1e03a43 100644..100755 --- a/imdi/Makefile.OSX +++ b/imdi/Makefile.OSX diff --git a/imdi/Makefile.UNIX b/imdi/Makefile.UNIX index 37aab1a..37aab1a 100644..100755 --- a/imdi/Makefile.UNIX +++ b/imdi/Makefile.UNIX diff --git a/imdi/Makefile.WNT b/imdi/Makefile.WNT index 601e1f6..601e1f6 100644..100755 --- a/imdi/Makefile.WNT +++ b/imdi/Makefile.WNT diff --git a/imdi/Readme.txt b/imdi/Readme.txt index a12d649..a12d649 100644..100755 --- a/imdi/Readme.txt +++ b/imdi/Readme.txt diff --git a/imdi/afiles b/imdi/afiles index 81f6220..81f6220 100644..100755 --- a/imdi/afiles +++ b/imdi/afiles diff --git a/imdi/cctiff.c b/imdi/cctiff.c index 582f2ad..582f2ad 100644..100755 --- a/imdi/cctiff.c +++ b/imdi/cctiff.c diff --git a/imdi/cctiffo.c b/imdi/cctiffo.c index c155e03..c155e03 100644..100755 --- a/imdi/cctiffo.c +++ b/imdi/cctiffo.c diff --git a/imdi/cgen.c b/imdi/cgen.c index b186dd6..b186dd6 100644..100755 --- a/imdi/cgen.c +++ b/imdi/cgen.c diff --git a/imdi/ctest.c b/imdi/ctest.c index caf0692..caf0692 100644..100755 --- a/imdi/ctest.c +++ b/imdi/ctest.c diff --git a/imdi/greytiff.c b/imdi/greytiff.c index af52013..af52013 100644..100755 --- a/imdi/greytiff.c +++ b/imdi/greytiff.c diff --git a/imdi/imdi.c b/imdi/imdi.c index 8174c8e..8174c8e 100644..100755 --- a/imdi/imdi.c +++ b/imdi/imdi.c diff --git a/imdi/imdi.h b/imdi/imdi.h index 1e72b8c..1e72b8c 100644..100755 --- a/imdi/imdi.h +++ b/imdi/imdi.h diff --git a/imdi/imdi_arch.h b/imdi/imdi_arch.h index afceb73..afceb73 100644..100755 --- a/imdi/imdi_arch.h +++ b/imdi/imdi_arch.h diff --git a/imdi/imdi_gen.c b/imdi/imdi_gen.c index ab17ad3..ab17ad3 100644..100755 --- a/imdi/imdi_gen.c +++ b/imdi/imdi_gen.c diff --git a/imdi/imdi_gen.h b/imdi/imdi_gen.h index 8a7ced9..8a7ced9 100644..100755 --- a/imdi/imdi_gen.h +++ b/imdi/imdi_gen.h diff --git a/imdi/imdi_make.c b/imdi/imdi_make.c index 7990f53..7990f53 100644..100755 --- a/imdi/imdi_make.c +++ b/imdi/imdi_make.c diff --git a/imdi/imdi_tab.c b/imdi/imdi_tab.c index 4f448f0..4f448f0 100644..100755 --- a/imdi/imdi_tab.c +++ b/imdi/imdi_tab.c diff --git a/imdi/imdi_tab.h b/imdi/imdi_tab.h index 403fcaa..403fcaa 100644..100755 --- a/imdi/imdi_tab.h +++ b/imdi/imdi_tab.h diff --git a/imdi/imdi_utl.h b/imdi/imdi_utl.h index f1a3ff5..f1a3ff5 100644..100755 --- a/imdi/imdi_utl.h +++ b/imdi/imdi_utl.h diff --git a/imdi/itest.c b/imdi/itest.c index 8edcb8b..8edcb8b 100644..100755 --- a/imdi/itest.c +++ b/imdi/itest.c diff --git a/imdi/refi.c b/imdi/refi.c index 55fe449..55fe449 100644..100755 --- a/imdi/refi.c +++ b/imdi/refi.c diff --git a/imdi/refi.h b/imdi/refi.h index 26570c4..26570c4 100644..100755 --- a/imdi/refi.h +++ b/imdi/refi.h diff --git a/imdi/ssort.c b/imdi/ssort.c index f9a25fd..f9a25fd 100644..100755 --- a/imdi/ssort.c +++ b/imdi/ssort.c diff --git a/install.bat b/install.bat index 4c27fda..4c27fda 100644..100755 --- a/install.bat +++ b/install.bat diff --git a/jam.patch b/jam.patch index 7133c90..7133c90 100644..100755 --- a/jam.patch +++ b/jam.patch diff --git a/jcnf/Jamfile b/jcnf/Jamfile index ea1e8f7..ea1e8f7 100644..100755 --- a/jcnf/Jamfile +++ b/jcnf/Jamfile diff --git a/jcnf/Readme.txt b/jcnf/Readme.txt index 295c026..295c026 100644..100755 --- a/jcnf/Readme.txt +++ b/jcnf/Readme.txt diff --git a/jcnf/afiles b/jcnf/afiles index 39508fa..39508fa 100644..100755 --- a/jcnf/afiles +++ b/jcnf/afiles diff --git a/jcnf/jcnf.c b/jcnf/jcnf.c index 799be7c..273796e 100644..100755 --- a/jcnf/jcnf.c +++ b/jcnf/jcnf.c @@ -413,6 +413,7 @@ static jc_error jcnf_delete_key( if ((ix+1) < p->nkeys) { memmove(p->keys+ix, p->keys+ix+1,sizeof(jc_key *) * p->nkeys-ix-1); } + free(p->keys[p->nkeys-1]); p->nkeys--; p->modified = 1; @@ -607,6 +608,7 @@ static int jcnf_yajl_start_map(void *ctx) { return 1; } +/* Callback from yajl */ static int jcnf_yajl_map_key(void *ctx, const unsigned char * stringVal, size_t stringLen) { jcnf *p = (jcnf *)ctx; @@ -650,6 +652,8 @@ static int jcnf_yajl_end_map(void *ctx) { /* End of map without start of map */ return 0; } + if (p->recds[p->nrecd-1].key != NULL) + free(p->recds[p->nrecd-1].key); p->nrecd--; #ifdef NEVER diff --git a/jcnf/jcnf.h b/jcnf/jcnf.h index d861d3d..d861d3d 100644..100755 --- a/jcnf/jcnf.h +++ b/jcnf/jcnf.h diff --git a/jcnf/test.c b/jcnf/test.c index ddf4f5b..ddf4f5b 100644..100755 --- a/jcnf/test.c +++ b/jcnf/test.c diff --git a/jcnf/test.jcnf b/jcnf/test.jcnf index d37b286..d37b286 100644..100755 --- a/jcnf/test.jcnf +++ b/jcnf/test.jcnf diff --git a/lib/Readme.txt b/lib/Readme.txt index 79e1dde..79e1dde 100644..100755 --- a/lib/Readme.txt +++ b/lib/Readme.txt diff --git a/lib/afiles b/lib/afiles index c519e4e..c519e4e 100644..100755 --- a/lib/afiles +++ b/lib/afiles diff --git a/link/Jamfile b/link/Jamfile index 319757e..3dc4269 100644 --- a/link/Jamfile +++ b/link/Jamfile @@ -18,6 +18,8 @@ HDRS = ../h ../icc ../rspl ../plot ../numlib $(TIFFINC) ; LINKLIBS = $(TIFFLIB) $(JPEGLIB) ../icc/libicc ../plot/libplot ../numlib/libnum ../numlib/libui $(LibWin) ; +LINKFLAGS += $(GUILINKFLAGS) ; + # K only reprocessor #Main icc2ko : icc2ko.c ; diff --git a/link/collink.c b/link/collink.c index dffa8df..798bc14 100644..100755 --- a/link/collink.c +++ b/link/collink.c @@ -35,11 +35,6 @@ /* NOTES: - Video :- current WTW TV encoding is clipped, not passed through with extrapolation. - If the display does a per component clipping, then passing through is probably - a bad thing, and cliping is the right behaviour, and just pass - the sync level though. - Normally the device side per channel curves are copied from the source profiles to the link profile on the assumption that the raw linearisation they do is good, and should be maintained @@ -152,14 +147,23 @@ #define USE_APXLS /* [Define] Use least squares approximation setting cLUT */ #define USE_CAM_CLIP_OPT /* [Define] Clip out of gamut in CAM space rather than XYZ or L*a*b* */ #define ENKHACK /* [Define] Enable K hack code */ +#undef PRESERVE_SYNC /* [Undef] Preserve video encoded sync level values */ #undef WARN_CLUT_CLIPPING /* [Undef] Print warning if setting clut clips */ #undef DEBUG /* [Und] Report values of each sample transformed */ -#undef DEBUGC /* [Und] ie "if (tt)" */ /* Debug condition */ +#undef DEBUGC /* [Und] ie "if (tt)" */ /* Debug condition. Look for DEBUGC */ #undef DEBUG_ONE /* [Unf] test a single value out. Look for DBGNO to set value. */ #undef NEUTKDEBUG /* [Unf] print info about neutral L -> K mapping */ +#ifndef USE_APXLS +# pragma message("!!!!!!!!!!!! USE_APXLS turned off !!!!!!!!!") +#endif + +#ifndef USE_CAM_CLIP_OPT +# pragma message("!!!!!!!!!!!! USE_CAM_CLIP_OPT turned off !!!!!!!!!") +#endif + #include <stdio.h> #include <stdlib.h> #include <stdarg.h> @@ -248,6 +252,10 @@ void usage(char *diag, ...) { 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," h:hkscale Helmholtz-Kohlrausch effect scale factor (default 1.0)\n"); + fprintf(stderr," m:mtaf Mid-tone partial adaptation factor (default 0.0)\n"); + fprintf(stderr," m:X:Y:Z Mid-tone Adaptation white as XYZ (default D50)\n"); + fprintf(stderr," m:x:y Mid-tone Adaptation white as x, y\n"); fprintf(stderr," -t tlimit set source total ink limit, 0 - 400%% (estimate by default)\n"); fprintf(stderr," -T klimit set source black ink limit, 0 - 100%% (estimate by default)\n"); fprintf(stderr," Inverse outprofile A2B Options:\n"); @@ -733,8 +741,10 @@ void devi_devip(void *cntx, double *out, double *in) { double full[3]; /* Full value in clip direction (Video) */ #ifdef DEBUGC -// if (in[0] == 1.0 && in[1] == 1.0 && in[2] == 1.0 && in[3]) -// tt = 1; + if (fabs(in[0] - 0.098030) < 1e-3 + && fabs(in[1] - 0.368630) < 1e-3 + && fabs(in[2] - 0.556860) < 1e-3) + tt = 1; #endif #ifdef DEBUG @@ -758,7 +768,7 @@ void devi_devip(void *cntx, double *out, double *in) { #ifdef DEBUG if (p->in.tvenc) { - DEBUGCND printf("After TVdecode:\n",icmPdv(p->in.chan, out)); + DEBUGCND printf("After TVdecode: %s\n",icmPdv(p->in.chan, out)); } #endif /* Input curve */ @@ -789,14 +799,14 @@ void devi_devip(void *cntx, double *out, double *in) { if (rv >= 2) error("icc lookup failed: %d, %s",p->in.c->errc,p->in.c->err); #ifdef DEBUG - DEBUGCND printf("After input curve:\n",icmPdv(p->in.chan, out)); + DEBUGCND printf("After input curve: %s\n",icmPdv(p->in.chan, out)); #endif } if (p->in.lcurve) { /* Apply Y to L* */ y2l_curve(out, out, p->in.lcurve == 2); #ifdef DEBUG - DEBUGCND printf("After Y -. L* curve:\n",icmPdv(p->in.chan, out)); + DEBUGCND printf("After Y -. L* curve: %s\n",icmPdv(p->in.chan, out)); #endif } @@ -852,8 +862,10 @@ void devip_devop(void *cntx, double *out, double *in) { #ifdef DEBUGC tt = 0; -// if (in[0] == 58.0/64.0 && in[1] == 58.0/64.0 && in[2] == 58.0/64.0) - if (in[0] == 4.0/64.0 && in[1] == 4.0/64.0 && in[2] == 4.0/64.0) + + if (fabs(in[0] - 0.164720) < 1e-3 + && fabs(in[1] - 0.393636) < 1e-3 + && fabs(in[2] - 0.631392) < 1e-3) tt = 1; #endif @@ -1419,6 +1431,7 @@ void devip_devop(void *cntx, double *out, double *in) { } else { /* Use inverse A2B table */ int i; #ifdef USE_MERGE_CLUT_OPT +# pragma message("!!!!!!!!!!!! USE_MERGE_CLUT_OPT turned on !!!!!!!!!") /* Because we have used the ICX_MERGE_CLUT flag, we don't need */ /* to call inv_out_abs() and inv_output() */ #else @@ -1535,7 +1548,10 @@ void devip_devop(void *cntx, double *out, double *in) { /* Clip or pass sync through */ if (out[i] < 0.0 || out[i] > 1.0 /* clip */ - || fabs(uci[i] - full[i]) < 1e-6) /* or input is at sync level */ +#ifdef PRESERVE_SYNC + || fabs(uci[i] - full[i]) < 1e-6 /* or input is at sync level */ +#endif + ) out[i] = full[i]; } } @@ -1551,7 +1567,10 @@ void devip_devop(void *cntx, double *out, double *in) { out[i] = ifull + (out[i] - ifull) * (uci[i] - ifull)/(cin[i] - ifull); if (out[i] < 0.0 || out[i] > 1.0 /* clip */ - || fabs(uci[i] - full[i]) < 1e-6) /* or input is at sync level */ +#ifdef PRESERVE_SYNC + || fabs(uci[i] - full[i]) < 1e-6 /* or input is at sync level */ +#endif + ) out[i] = full[i]; } } @@ -1906,6 +1925,9 @@ main(int argc, char *argv[]) { ivc.Yf = -1.0; ivc.Yg = -1.0; ivc.Gxyz[0] = -1.0; ivc.Gxyz[1] = -1.0; ivc.Gxyz[2] = -1.0; + ivc.hkscale = -1.0; + ivc.mtaf = -1.0; + ivc.Wxyz2[0] = -1.0; ivc.Wxyz2[1] = -1.0; ivc.Wxyz2[2] = -1.0; ovc.Ev = -1; ovc.Wxyz[0] = -1.0; ovc.Wxyz[1] = -1.0; ovc.Wxyz[2] = -1.0; @@ -1915,6 +1937,9 @@ main(int argc, char *argv[]) { ovc.Yf = -1.0; ovc.Yg = -1.0; ovc.Gxyz[0] = -1.0; ovc.Gxyz[1] = -1.0; ovc.Gxyz[2] = -1.0; + ovc.hkscale = -1.0; + ovc.mtaf = -1.0; + ovc.Wxyz2[0] = -1.0; ovc.Wxyz2[1] = -1.0; ovc.Wxyz2[2] = -1.0; if (argc < 4) usage("Too few arguments, got %d expect at least 3",argc-1); @@ -2255,6 +2280,20 @@ main(int argc, char *argv[]) { vc->Yg = x/100.0; } else usage("Viewing condition (-%cf) unrecognised flare '%s'",argv[fa][1],na+1); + } else if (na[0] == 'h' || na[0] == 'H') { + if (na[1] != ':') + usage("Viewing conditions (-%ch) missing ':'",argv[fa][1]); + vc->hkscale = atof(na+2); + } else if (na[0] == 'm' || na[0] == 'M') { + double x, y, z; + if (sscanf(na+1,":%lf:%lf:%lf",&x,&y,&z) == 3) { + vc->Wxyz2[0] = x; vc->Wxyz2[1] = y; vc->Wxyz2[2] = z; + } else if (sscanf(na+1,":%lf:%lf",&x,&y) == 2) { + vc->Wxyz2[0] = x; vc->Wxyz2[1] = y; vc->Wxyz2[2] = -1; + } else if (sscanf(na+1,":%lf",&x) == 1) { + vc->mtaf = x; + } else + usage("Viewing condition (-%cm) unrecognised flare '%s'",argv[fa][1],na+1); } else usage("Viewing condition (-%c) unrecognised sub flag '%c'",argv[fa][1],na[0]); vcset = 1; /* Viewing conditions were set by user */ @@ -3103,6 +3142,30 @@ main(int argc, char *argv[]) { vc->Gxyz[2] = z/y * vc->Gxyz[1]; *set = 1; } + + if (v->hkscale >= 0.0) { + vc->hkscale = v->hkscale; + *set = 1; + } + if (v->mtaf >= 0.0) { + vc->mtaf = v->mtaf; + *set = 1; + } + if (v->Wxyz2[0] >= 0.0 && v->Wxyz2[1] > 0.0 && v->Wxyz2[2] >= 0.0) { + /* Normalise XYZ */ + vc->Wxyz2[0] = v->Wxyz2[0]/v->Wxyz2[1] * vc->Wxyz2[1]; + vc->Wxyz2[2] = v->Wxyz2[2]/v->Wxyz2[1] * vc->Wxyz2[1]; + *set = 1; + } + if (v->Wxyz2[0] >= 0.0 && v->Wxyz2[1] >= 0.0 && v->Wxyz2[2] < 0.0) { + /* Convert Yxy to XYZ */ + double x = v->Wxyz2[0]; + double y = v->Wxyz2[1]; /* If Y == 1.0, then X+Y+Z = 1/y */ + double z = 1.0 - x - y; + vc->Wxyz2[0] = x/y * vc->Wxyz2[1]; + vc->Wxyz2[2] = z/y * vc->Wxyz2[1]; + *set = 1; + } } if (li.verb) @@ -4337,7 +4400,6 @@ main(int argc, char *argv[]) { /* The eeColor hard wires 1.0 input to 1.0 output in its cLUT, */ /* so de-scale the cLUT to match this, and re-scale in the */ /* output 1D lut */ - li.coscale[0] = li.coscale[1] = li.coscale[2] = 1.0; /* Default - do nothing */ if (li.tdlut == 1) { /* eeColor encoded input */ double inout[3] = { 1.0, 1.0, 1.0 }; @@ -4395,7 +4457,7 @@ main(int argc, char *argv[]) { if (li.verb) printf("Filling in Lut table\n"); #ifdef DEBUG_ONE -#define DBGNO 1 /* Up to 10 */ +#define DBGNO 2 /* Up to 10 */ #ifndef NEVER /* Test a single given rgb/cmyk -> cmyk value */ @@ -4403,10 +4465,18 @@ main(int argc, char *argv[]) { double in[10][MAX_CHAN]; double out[MAX_CHAN]; - in[0][0] = 125.0/255.0; - in[0][1] = 61.4/255.0; - in[0][2] = 28.42/255.0; - in[0][0] = 0.5; + in[0][0] = 0.09803; // Bad + in[0][1] = 0.30588; + in[0][2] = 0.55686; + + in[1][0] = 0.09803; // Good + in[1][1] = 0.36863; + in[1][2] = 0.55686; + +// in[0][0] = 125.0/255.0; +// in[0][1] = 61.4/255.0; +// in[0][2] = 28.42/255.0; +// in[0][0] = 0.5; // in[0][0] = 0.2; // in[0][1] = 0.2; @@ -5104,8 +5174,9 @@ int write_MadVR_3DLut(clink *li, icc *icc, char *fname) { //printf("~1 %f %f %f -> %f %f %f\n", in[0], in[1], in[2], out[0], out[1], out[2]); +#ifdef PRESERVE_SYNC if (li->in.tvenc == 8 || li->in.tvenc == 9) { /* xvYCC */ - for (i = 1; i < 3; i++) { /* Force 'sync' entry values on CbCr*/ + for (i = 1; i < 3; i++) { /* Force 'sync' entry values on CbCr */ if (gc[i] == 0) { out[i] = 0.0; } else if (gc[i] == 255) { @@ -5113,6 +5184,7 @@ int write_MadVR_3DLut(clink *li, icc *icc, char *fname) { } } } +#endif if (li->out.tvenc == 0) { /* Full range 16 bits */ iout[0] = (int)(out[0] * 0xffff + 0.5); @@ -5148,7 +5220,7 @@ int write_MadVR_3DLut(clink *li, icc *icc, char *fname) { /* This can be used to ensure that the Graphics Card VideoLuts */ /* are correctly setup to match what the 3dLut is expecting. */ - /* Note that the calibration is full range, never TV encoded output values */ + /* Note that the calibration curves are full range, never TV encoded output values */ /* Format is (little endian): 4 byte magic number 'cal1' diff --git a/link/monoplot.c b/link/monoplot.c index 2af1aac..2af1aac 100644..100755 --- a/link/monoplot.c +++ b/link/monoplot.c diff --git a/link/pathplot.c b/link/pathplot.c index afe1fee..afe1fee 100644..100755 --- a/link/pathplot.c +++ b/link/pathplot.c @@ -2,9 +2,153 @@ Argyll CMS change log ===================== +Version 2.1.0 Beta +------------- + +* Started adding comms for Lumagen Radiance detection. + +Version 2.0.0 17th November 2017 +------------- + +* Returned input profile forced Absolute Colorimetric option with + -ua flag, after the -u option was changed in V1.5.0. + +* Added support for "pm" viewing condition (Print evaluation with partial + Mid-tone adaptation), and associated m: viewing condition parameter. + This is intended to address certain situations involving the use of + papers containing FWA/OBE brighteners when viewed in an environment that + has a very noticeably warmer white point than the paper itself under the + illuminant. + +* Added support for the X-Rite i1Studio + (AKA new ColorMunki Spectrometer) instrument. + Note that you may have to un-install and re-install the + system drivers on MSWindows, or update the udev 55-Argyll.rules + file on Linux. + +* Slight improvement to i1d3 accuracy, by rounding + the frequency mode measurements up by 0.5. + This makes frequency and period modes mesh better + in adaptive mode, as well as improving non-adaptive + mode accuracy subtly. (Thanks to Marc Repnow for + noticing this.) + +* Try and fix problem in triggering calibration when + ARGYLL_NOT_INTERACTIVE is set. + +* Fixed rspl scattered data setup to be unrestricted in + input dimensions. + +* Improve compatibility of txt2ti3, and added -D option to mark + output as Display but not Normalized to white. + +* Changed Huey driver to ignore return status of unlock command. + (Doesn't help make it work on the crippled "HueyColor" + some embeded instruments though!). + +* Modified collink to control Video encoded in/out sync level + preservation with #PRESERVE_SYNC, and default this to off. + +* Added experimental perceptual space "Lpt" based on + CIE 2012 cone space transform + IPT matrix and L* curve, + designed to replace L*a*b*. + +* Added support for custom Observer by using a .cmf file as + an argument to all tools taking an observer parameter. + +* Added support for proposed CIE 2012 2 degree & 10 degree observers. + These are based on the CIE (2006) 2-deg LMS cone fundamentals. + +* Fix problem with dispwin -E option not being shown in usage, + and only being applied when a calibration file is used. + (Thanks to Florian Hoch). + +* Added spotread -u option to display XYZ amd CIE 1976 Yuv values. + +* Added XRGA conversion support to spec2cie, as well as + better support in chartread and txt2ti3 for tracking + XRGA standard and polarization filter use. + +* Fix bug in spec2cie processing emissive .sp files. + +* Fix problem with i1d3 running direct USB (i.e. Not via HID) + on MSWin. + +* Fixed bug in render/timage -p. This wasn't working since + dithering was left on and 16 bit or dithered L*a*b* output + was broken. + +* Changed spotread ambient readings (CCT, CRI, TLCI) to show + CCT delta E in 1960 Duv units and others in Delta E 2000. + Also renamed (Invalid) notification to (Caution), since + the computed values themselves are not necessarily invalid, + just that the illuminant is out of whiteness (red/green) tollerance. + +* Added ARGYLL_UNTWIST_GAMUT_SURFACE environment variable, + that enables extra gamut clip surface processing that + may improve the smoothness of device links and B2A tables + for poorly behaved devices. Makes processing slower, + and can harm the accuracy and smoothness in other cases, + so probably shouldn't be used by default. + +* Fixed bug introduced in new colorimetric nearest clipping code + in rspl/rev.c in V1.9.0 that caused colprof using some ink limit + settings (such as -L0) to crash. + +* Fixed bug introduced in new colorimetric nearest clipping code + in rspl/rev.c in V1.9.0 that caused some (mainly XYZ clut) profiles + to clip badly, causing banding. + +* Improved dispcal -R VideoLUT depth measurement + algorithm robustness (allow for rounding offset). + +* Worked around latest OS X super slow opening + serial port problem (1.5 seconds to open a port!) + +* Added ColorCheckerHalfPassport.cht file. + +* Fixed bug in ChromeCast mDNS parsing that caused problems + with some devices with long names being detected. + +* Now ignoring Chromecast-Audio and (.ca flags & 1) == 0 devices, + and showing the friendly chromecast name if available. + +* Wait longer to find more Chromecasts, even if we've found one. + +* Fixed colprof bug when handling Display L*a*b* .ti3 data - + (Only converted L*a*b* of first sample to XYZ internally). + +* Added Wacom i1d3 support. + +* Changed dispwin to by default ignore Gnome colord, + and use its native ucmm for storage of display profiles, + since colord support for ArgyllCMS has proven unreliable. + This can be re-enabled by setting the ARGYLL_USE_COLORD + environment variable (i.e. to "true"). + +* Change X11 root window _ICC_PROFILE_xxx atom setting for + Xrandr case to now match the Xinerama order, so that + _ICC_PROFILE_xxx atoms match, irrespective of which + extension applications are using. This improves conformance + to "ICC Profiles in X Specification 0.2". + +* Improved ucmm install/load/delete to better respect + systemlocal/user scopes, as well as eliminating need + for profile name on delete when ucmm is used. + +* Improve fast serial port scan to better detect Lumagen Radiance + without upsetting it. + +* Added ARGYLL_EXCLUDE_SERIAL_SCAN environment variable, to allow + suppression of fast serial port scan of sensitive devices. + Version 1.9.2 14th October 2016 ------------- +* Added CMYKOGB and CMYKRGB 7 channel ink preset, and made + targen more flexible in matching pre-conditioning profiles + to targen ink selection. + * Fix oeminst for OS X save location. * Fix oeminst for OS X Spyder 4 CD calibration file location. diff --git a/makeall.bat b/makeall.bat index fe99e59..fe99e59 100644..100755 --- a/makeall.bat +++ b/makeall.bat diff --git a/makeall.sh b/makeall.sh index eb4ac7d..eb4ac7d 100644..100755 --- a/makeall.sh +++ b/makeall.sh diff --git a/makeinstall.sh b/makeinstall.sh index be2b03d..be2b03d 100644..100755 --- a/makeinstall.sh +++ b/makeinstall.sh diff --git a/makeoemdnldbin.sh b/makeoemdnldbin.sh index b77fb8b..b77fb8b 100644..100755 --- a/makeoemdnldbin.sh +++ b/makeoemdnldbin.sh diff --git a/makepackagebin.sh b/makepackagebin.sh index 0b88664..2688bf4 100644..100755 --- a/makepackagebin.sh +++ b/makepackagebin.sh @@ -25,6 +25,8 @@ VERSION=`grep ARGYLL_VERSION_STR h/aconfig.h | head -1 | sed 's/# define ARGYLL_ # # OS X i386 10.7 [bash] darwin11 x86_64-apple-darwin11 x86_64 # +# OS X i386 10.11 [bash] darwin16 x86_64-apple-darwin16 x86_64 +# # Linux RH 4.0 [bash] linux-gnu i686-redhat-linux-gnu i686 # # Linux Fedora 7.1 [bash] linux-gnu i386-redhat-linux-gnu i386 @@ -97,7 +99,12 @@ else if [ X$OSTYPE = "Xdarwin8.0" ] ; then USBBINFILES="binfiles.osx" USETAR=true else if [ X$OSTYPE = "Xdarwin10.0" \ - -o X$OSTYPE = "Xdarwin11" ] ; then + -o X$OSTYPE = "Xdarwin11" \ + -o X$OSTYPE = "Xdarwin12" \ + -o X$OSTYPE = "Xdarwin13" \ + -o X$OSTYPE = "Xdarwin14" \ + -o X$OSTYPE = "Xdarwin15" \ + -o X$OSTYPE = "Xdarwin16" ] ; then if [ X$HOSTTYPE = "Xx86_64" ] ; then echo "We're on OSX 10.6 x86_64!" PACKAGE=Argyll_V${VERSION}_osx10.6_x86_64_bin.tgz diff --git a/namedc/Jamfile b/namedc/Jamfile index 62d4c7e..af70dee 100644..100755 --- a/namedc/Jamfile +++ b/namedc/Jamfile @@ -13,6 +13,8 @@ Library libnamedc : namedc.c ; LINKLIBS = ./libnamedc ../xicc/libxicc ../spectro/libconv ../icc/libicc ../cgats/libcgats ../plot/libplot ../numlib/libui ../numlib/libnum ../xml/libmxml ; +LINKFLAGS += $(GUILINKFLAGS) ; + # Individual stand alone test of namedc MainVariant namedc : namedc.c : : STANDALONE_TEST ; diff --git a/namedc/License.txt b/namedc/License.txt index a871fcf..a871fcf 100644..100755 --- a/namedc/License.txt +++ b/namedc/License.txt diff --git a/namedc/afiles b/namedc/afiles index cd1bf61..cd1bf61 100644..100755 --- a/namedc/afiles +++ b/namedc/afiles diff --git a/namedc/namedc.c b/namedc/namedc.c index 2fc7796..2fc7796 100644..100755 --- a/namedc/namedc.c +++ b/namedc/namedc.c diff --git a/namedc/namedc.h b/namedc/namedc.h index cc8917d..cc8917d 100644..100755 --- a/namedc/namedc.h +++ b/namedc/namedc.h diff --git a/namedc/txt2iccnc.c b/namedc/txt2iccnc.c index 3ea1bc9..cd6fb6e 100644..100755 --- a/namedc/txt2iccnc.c +++ b/namedc/txt2iccnc.c @@ -32,6 +32,7 @@ #else #include "numsup.h" #endif +#include "cgats.h" #include "xspect.h" #include "ui.h" diff --git a/notes.txt b/notes.txt index 3bcc065..3bcc065 100644..100755 --- a/notes.txt +++ b/notes.txt diff --git a/numlib/Jamfile b/numlib/Jamfile index 1053612..2d5edaf 100644..100755 --- a/numlib/Jamfile +++ b/numlib/Jamfile @@ -20,13 +20,13 @@ Headers = numlib.h libui.h ; HDRS = ../h ; # Numeric library -Library libnum.lib : numsup.c dnsq.c powell.c dhsx.c ludecomp.c svd.c zbrent.c rand.c sobol.c aatree.c ; +Library libnum.lib : numsup.c dnsq.c powell.c dhsx.c varmet.c ludecomp.c svd.c zbrent.c rand.c sobol.c aatree.c quadprog.c ; # Link all utilities with libnum LINKLIBS = libnum ; # All test programs are made from a single source file -MainsFromSources dnsqtest.c tpowell.c tdhsx.c LUtest.c svdtest.c zbrenttest.c soboltest.c ; +MainsFromSources dnsqtest.c tpowell.c tdhsx.c LUtest.c svdtest.c zbrenttest.c soboltest.c qptest.c ; # Compile .c as .m if $(OS) = MACOSX { diff --git a/numlib/LUtest.c b/numlib/LUtest.c index feb2277..feb2277 100644..100755 --- a/numlib/LUtest.c +++ b/numlib/LUtest.c diff --git a/numlib/License.txt b/numlib/License.txt index a871fcf..a871fcf 100644..100755 --- a/numlib/License.txt +++ b/numlib/License.txt diff --git a/numlib/Readme.txt b/numlib/Readme.txt index 8cc0173..8cc0173 100644..100755 --- a/numlib/Readme.txt +++ b/numlib/Readme.txt diff --git a/numlib/aatree.c b/numlib/aatree.c index 2f38b1d..2f38b1d 100644..100755 --- a/numlib/aatree.c +++ b/numlib/aatree.c diff --git a/numlib/aatree.h b/numlib/aatree.h index 4212b09..325bf1e 100644..100755 --- a/numlib/aatree.h +++ b/numlib/aatree.h @@ -4,6 +4,8 @@ /* Andersson binary balanced tree library + Log n performance on insert/erase + > Created (Julienne Walker): September 10, 2005 This code is in the public domain. Anyone may @@ -33,6 +35,7 @@ typedef struct aat_atree aat_atree_t; typedef struct aat_atrav aat_atrav_t; /* User-defined item handling */ +/* Return -1, 0, +1 */ typedef int (*cmp_f) ( const void *p1, const void *p2 ); /* Andersson tree functions */ diff --git a/numlib/afiles b/numlib/afiles index 29d6699..b2138b2 100644..100755 --- a/numlib/afiles +++ b/numlib/afiles @@ -11,6 +11,8 @@ numsup.h powell.h powell.c tpowell.c +varmet.h +varmet.c dhsx.h dhsx.c tdhsx.c @@ -30,5 +32,8 @@ sobol.h soboltest.c aatree.h aatree.c +quadprog.h +quadprog.c +qptest.c ui.h ui.c diff --git a/numlib/dhsx.c b/numlib/dhsx.c index 180d15c..e9da0eb 100644..100755 --- a/numlib/dhsx.c +++ b/numlib/dhsx.c @@ -20,7 +20,9 @@ #undef DEBUG -static void simplexinit(int di, double *cp, double *r,double **p); +int dhsx_debug = 1; + +static void simplexinit(int di, double *cp, double **p, double *r, double sv, int ii); static double trypoint(int di,double *cp, double **p, double *y, int hix, double hpfac, double (*funk)(void *fdata, double *tp), void *fdata, double *tryp); @@ -28,68 +30,98 @@ static double trypoint(int di,double *cp, double **p, double *y, int hix, double #define ALPHA 0.7 /* Extrapolate hight point through oposite face factor */ #define GAMMA 1.4 /* Aditional extrapolation if ALPHA is good */ -#define BETA 0.4 /* One dimensional contraction factor */ +#define BETA 0.4 /* One dimensional contraction factor (smaller is more) */ +#define DELTA 0.5 /* Multi dimensional contraction factor (smaller is more) */ #define NONEXP 2 /* non expanding passes */ #else /* Standard tuning values */ -#define ALPHA 1.0 /* Extrapolate hight point through oposite face factor */ -#define GAMMA 2.0 /* Aditional extrapolation if ALPHA is good */ -#define BETA 0.5 /* One dimensional contraction factor */ -#define NONEXP 2 /* non expanding passes */ +#define ALPHA 1.0 /* [1.0] Extrapolate hight point through oposite face factor */ +#define GAMMA 2.0 /* [2.0] Aditional extrapolation if ALPHA is good */ +#define BETA 0.4 /* [0.5] One dimensional contraction factor (smaller is more) */ +#define DELTA 0.4 /* [0.5] Multi dimensional contraction factor (smaller is more) */ +#define NONEXP 3 /* [3] non expanding passes */ #endif - /* Down hill simplex function */ /* return 0 on sucess, 1 on failure due to excessive itterations */ /* Result will be in cp */ -/* Arrays start at 0 */ int dhsx( double *rv, /* If not NULL, return the residual error */ int di, /* Dimentionality */ -double *cp, /* Initial starting point */ +double *cp, /* Initial starting point, return minimum */ double *s, /* Size of initial search area */ double ftol, /* Finishing tollerance of error change */ -double atol, /* Absolute return value tollerance */ +double athr, /* Absolute return value threshold. (Set high to not use) */ int maxit, /* Maximum iterations allowed */ double (*funk)(void *fdata, double *tp), /* Error function to evaluate */ void *fdata /* Data needed by function */ ) { + int ii = 0; /* Initial simplex orientation */ int i, j; - int lox, hix, nhix; /* Lowest point index, highest point, next highest point */ - int nsp = di+1; /* Number of simplex verticy points */ int nit; /* Number of iterations */ + int nsp = di+1; /* Number of simplex verticy points */ double tryy, ysave; double tol; - double **p; /* Simplex array */ - double *y; /* values of func at verticies */ + double **p; /* Current simplex array */ + double *y; /* Values of func at verticies */ + double **p2; /* Trial simplex array */ + double *y2; /* Trial values of func at verticies */ + int lox, hix, nhix; /* Lowest point index, highest point, next highest point */ double *tryp; /* Temporary used by trypoint() */ /* Allocate array arrays */ - y = dvector(0, di); /* Value of function at verticies */ - tryp = dvector(0, di-1); - p = dmatrix(0, di+1, 0, di); /* Vertex array of dimentions */ + tryp = dvector(0, di-1); /* Trial value */ + p = dmatrix(0, nsp-1, 0, di-1); /* Vertex array of dimentions */ + y = dvector(0, nsp-1); /* Value of function at verticies */ + p2 = dmatrix(0, nsp-1, 0, di-1); /* Trial vertex array of dimentions */ + y2 = dvector(0, nsp-1); /* Trial value of function at verticies */ /* Init the search simplex */ - simplexinit(di, cp, s, p); + simplexinit(di, cp, p, s, 1.0, ii); + + /* Compute initial y (function) values at simplex verticies */ + for (i = 0; i < nsp; i++) /* For all verticies */ + y[i] = (*funk)(fdata, p[i]); /* Compute error function */ - /* Compute current center point position */ - for (j = 0; j < di; j++) { /* For all dimensions */ + /* Locate verticy with best value */ + lox = 0; + for (i = 0; i < nsp; i++) { + if (y[i] < y[lox]) + lox = i; + } + tryy = (*funk)(fdata, cp); /* Value at initial point */ + + /* If our initial point is better than any of the simplex verticies */ + if (y[lox] > tryy) { + /* Move all the verticies to match moving lox to cp */ + for (i = 0; i < nsp; i++) { + if (i == lox) + continue; + for (j = 0; j < di; j++) + p[i][j] += cp[j] - p[lox][j]; + y[i] = (*funk)(fdata, p[i]); /* Compute error function */ + } + /* Make lox be the input point */ + for (j = 0; j < di; j++) + p[lox][j] = cp[j]; + y[lox] = tryy; + } + + /* Compute current center point location as sum of verticies. */ + /* (We use this to compute moves) */ + for (j = 0; j < di; j++) { /* For all dimensions */ double sum; for (i = 0, sum = 0.0; i < nsp; i++) /* For all verticies */ sum += p[i][j]; cp[j] = sum; } - /* Compute initial y (function) values at verticies */ - for (i = 0; i < nsp; i++) /* For all verticies */ - y[i] = (*funk)(fdata,p[i]); /* Compute error function */ - /* Untill we find a solution or give up */ - for (nit = 0; nit < maxit; nit++) { - /* Find highest, next highest and lowest vertex */ + for (nit = 0; ; nit++) { + /* Find highest, next highest and lowest vertex */ lox = nhix = hix = 0; for (i = 0; i < nsp; i++) { if (y[i] < y[lox]) @@ -104,82 +136,189 @@ void *fdata /* Data needed by function */ tol = y[hix] - y[lox]; -#ifdef DEBUG /* 2D */ - printf("Current vs = %f,%f %f,%f %f,%f\n", - p[0].c[0],p[0].c[1],p[1].c[0],p[1].c[1],p[2].c[0],p[2].c[1]); - printf("Current errs = %e %e %e\n",y[0],y[1],y[2]); - printf("Current sxs = %d %d %d\n",sy[0]->no,sy[1]->no,sy[2]->no); - printf("Current y[hix] = %e\n",y[hix]); +#ifdef DEBUG + if (dhsx_debug) { + printf("Current vs =\n"); + for (i = 0; i < nsp; i++) + printf(" %d: %s\n",i,debPdv(di, p[i])); + printf("Current errs = %s\n",debPdv(nsp,y)); + printf("Current y[lox] = %e, y[hix] = %e\n",y[lox], y[hix]); + } +#endif /* DEBUG */ + + /* If we look like we are about to finish, */ + /* see if we should re-start with a new simplex. */ + if (tol < ftol && y[lox] < athr /* Found an adequate solution */ + && nit < maxit) { + double scale = 0.0; + int lox2; + +#ifdef DEBUG + if (dhsx_debug) printf(" nit %d, tol %e\n",nit, tol); +#endif /* DEBUG */ + + /* compute center location */ + tryy = 1.0/nsp; + for (j = 0; j < di; j++) /* For all dimensions */ + cp[j] *= tryy; /* Set cp to center point of simplex */ + + /* Compute scaled distance of vertexes from center */ + for (i = 0; i < nsp; i++) { + double dist = 0.0; + for (j = 0; j < di; j++) { + double tt = (cp[j] - p[i][j])/s[j]; + dist += tt * tt; + } + scale += sqrt(dist); + } + scale /= (double)nsp; /* Average scale compared to starting simplex */ +#ifdef DEBUG + if (dhsx_debug) printf(" ave scale = %f\n",scale); +#endif /* DEBUG */ + + /* Enlarge search space, but not more than initial */ + scale *= 10.0; + if (scale > 1.0) + scale = 1.0; + + /* Compute trial simplex with different orientation */ + if (++ii >= (di+1)) + ii = 0; + + /* Init the search simplex */ + simplexinit(di, cp, p2, s, scale, ii); + + /* Compute y (function) values at simplex verticies */ + for (i = 0; i < nsp; i++) /* For all verticies */ + y2[i] = (*funk)(fdata, p2[i]); /* Compute error function */ + + /* Locate verticy with best value */ + lox2 = 0; + for (i = 0; i < nsp; i++) { + if (y2[i] < y2[lox2]) + lox2 = i; + } +#ifdef DEBUG + if (dhsx_debug) printf(" y2lox %f ylox %f\n",y2[lox2], y[lox]); +#endif /* DEBUG */ + + /* If any of its vertexes are better than current best, switch */ + /* to it and continue (i.e. re-start) */ + if (y2[lox2] < y[lox]) { + +#ifdef DEBUG + if (dhsx_debug) printf(" restarting\n"); #endif /* DEBUG */ - if (tol < ftol && y[lox] < atol) { /* Found an adequate solution */ - /* (allow 10 x range for disambiguator) */ - /* set cp[] to best point, and return error value of that point */ - tryy = 1.0/(di+1); + for (i = 0; i < nsp; i++) { + for (j = 0; j < di; j++) + p[i][j] = p2[i][j]; + y[i] = y2[i]; + } + + /* Compute current center point location as sum of verticies. */ + /* (We use this to compute moves) */ + for (j = 0; j < di; j++) { /* For all dimensions */ + double sum; + for (i = 0, sum = 0.0; i < nsp; i++) /* For all verticies */ + sum += p[i][j]; + cp[j] = sum; + } + + /* Find highest, next highest and lowest vertex */ + lox = nhix = hix = 0; + for (i = 0; i < nsp; i++) { + if (y[i] < y[lox]) + lox = i; + if (y[i] > y[hix]) { + nhix = hix; + hix = i; + } else if (y[i] > y[nhix]) { + nhix = i; + } + } + + tol = y[hix] - y[lox]; + } + } + + if ((tol < ftol && y[lox] < athr) /* Found an adequate solution */ + || ((nit+1) >= maxit)) { /* Or we are about to fail */ + + /* convert cp[] to center point location, */ + /* and use best out of it and any simplex verticy. */ + tryy = 1.0/nsp; for (j = 0; j < di; j++) /* For all dimensions */ cp[j] *= tryy; /* Set cp to center point of simplex */ #ifdef DEBUG - printf("C point = %f,%f\n",cp[0],cp[1]); + if (dhsx_debug) printf("C point = %s\n",debPdv(di,cp)); #endif - tryy = (*funk)(fdata,cp); /* Compute error function */ + tryy = (*funk)(fdata, cp); /* Compute error function */ if (tryy > y[lox]) { /* Center point is not the best */ +#ifdef DEBUG + if (dhsx_debug) printf("C point val %f is not best, using sx %d val %f instead\n",tryy,lox,y[lox]); +#endif tryy = y[lox]; for (j = 0; j < di; j++) cp[j] = p[lox][j]; } - free_dmatrix(p, 0, di+1, 0, di); + free_dvector(y2, 0, nsp-1); + free_dmatrix(p2, 0, nsp-1, 0, di-1); + free_dvector(y, 0, nsp-1); + free_dmatrix(p, 0, nsp-1, 0, di-1); free_dvector(tryp, 0, di-1); - free_dvector(y, 0, di); -printf("~1 itterations = %d\n",nit); +#ifdef DEBUG + if (dhsx_debug) printf("Total itterations = %d\n",nit); +#endif if (rv != NULL) *rv = tryy; + if ((nit+1) >= maxit) + return 1; /* Failed */ return 0; } - if (nit > NONEXP) { /* Only try expanding after a couple of iterations */ + /* Only try expanding after a couple of iterations */ + if (nit > NONEXP) { /* Try moving the high point through the oposite face by ALPHA */ #ifdef DEBUG - printf("dhsx: try moving high point %d through oposite face",hix); + if (dhsx_debug) printf("dhsx: try moving high point %d through oposite face",hix); #endif tryy = trypoint(di, cp, p, y, hix, -ALPHA, funk, fdata, tryp); } + /* If gave good result, continue on in that direction */ if (nit > NONEXP && tryy <= y[lox]) { #ifdef DEBUG - verbose(4,"dhsx: moving high through oposite face worked"); + if (dhsx_debug) printf("dhsx: moving high through oposite face worked"); #endif - /* Gave good result, so continue on in that direction */ - tryy=trypoint(di,cp,p,y,hix,GAMMA,funk,fdata,tryp); + tryy = trypoint(di, cp, p, y, hix, GAMMA, funk, fdata, tryp); + /* else if ALPHA move made things worse, do a one dimensional */ + /* contraction by a factor BETA */ } else if (nit <= NONEXP || tryy >= y[nhix]) { - /* else if ALPHA move made things worse, do a one dimensional */ - /* contraction by a factor BETA */ #ifdef DEBUG - verbose(4,"dhsx: else try moving contracting point %d, y[ini] = %f",hix,y[hix]); + if (dhsx_debug) printf("dhsx: else try moving contracting point %d, y[ini] = %f",hix,y[hix]); #endif ysave = y[hix]; tryy = trypoint(di, cp, p, y, hix, BETA, funk, fdata, tryp); if (tryy >= ysave) { #ifdef DEBUG - verbose(4,"dhsx: contracting didn't work, try contracting other points to low"); + if (dhsx_debug) printf("dhsx: contracting didn't work, try contracting other points to low"); #endif /* That still didn't help us, so move all the */ - /* other points towards the high point */ + /* other points towards the low point */ for (i = 0; i < nsp; i++) { /* For all verts except low */ if (i != lox) { - for (j = 0; j < di; j++) { /* For all dimensions */ - cp[j] = 0.5 * (p[i][j] + p[lox][j]); - p[i][j] = cp[j]; - } - /* Compute function value for new point */ - y[i] = (*funk)(fdata,p[i]); /* Compute error function */ + for (j = 0; j < di; j++) /* For all dimensions */ + p[i][j] = DELTA * p[i][j] + (1.0 - DELTA) * p[lox][j]; + y[i] = (*funk)(fdata, p[i]); /* Compute function value for new point */ } } - /* Re-compute current center point value */ + /* Re-compute current center point location */ for (j = 0; j < di; j++) { double sum; for (i = 0,sum = 0.0;i<nsp;i++) @@ -188,22 +327,17 @@ printf("~1 itterations = %d\n",nit); } } else { #ifdef DEBUG - verbose(4,"dhsx: contracting point %d worked, tryy = %e, ysave = %e",hix,tryy,ysave); + if (dhsx_debug) printf("dhsx: contracting point %d worked, tryy = %e, ysave = %e",hix,tryy,ysave); #endif } } } - free_dmatrix(p, 0, di+1, 0, di); - free_dvector(tryp, 0, di-1); - free_dvector(y, 0, di); - if (rv != NULL) - *rv = tryy; - return 1; /* Failed */ } /* Try moving the high point through the opposite face */ /* by a factor of fac, and replaces the high point if */ -/* that proves to be better. */ +/* that proves to be better. Return the failed or new */ +/* function value. */ static double trypoint( int di, /* Dimentionality */ double *cp, /* nsp * center coord/Returned coordinate */ @@ -229,7 +363,7 @@ double *tryp /* temporary array of size di-1 */ /* If new high point pos. is better */ if (tryy < y[hix]) { #ifdef DEBUG - printf("Try gave improved %e from sx %d",tryy,lsxp->last_fwd->no); + if (dhsx_debug) printf("Try gave improved %e from sx %d",tryy,hix); #endif y[hix] = tryy; /* Replace func val of hi with trial */ @@ -239,8 +373,7 @@ double *tryp /* temporary array of size di-1 */ } } else { #ifdef DEBUG - verbose(4,"Try gave worse %e from sx %d",tryy, - lsxp->last_fwd == NULL ? -999 : lsxp->last_fwd->no); + if (dhsx_debug) printf("Try gave worse %e from sx %d",tryy,hix); #endif } return tryy; /* Function value of trial point */ @@ -251,17 +384,19 @@ double *tryp /* temporary array of size di-1 */ static void simplexinit( int di, /* Dimentionality */ -double *cp, /* Initial solution values */ +double *cp, /* Initial solution location */ +double **p, /* Simplex to initialize */ double *s, /* initial radius for each dimention */ -double **p /* Simplex to initialize */ +double sv, /* Radius scaling value */ +int ii /* Coordinate to start with */ ) { double bb; double hh = 0.5; /* Constant */ double rr = sqrt(3.0)/2.0; /* Constant */ - int i,j; - for (i = 0; i <= di; i++) { /* For each vertex */ + int i, j; + for (i = 0; i < (di+1); i++) { /* For each vertex */ /* The bounding points form a equalateral simplex */ - /* whose vertexes are on a spehere about the data */ + /* whose vertexes are on a sphere about the data */ /* point center. The coordinate sequence is: */ /* B = sphere radius */ /* H = 0.5 */ @@ -287,16 +422,25 @@ double **p /* Simplex to initialize */ /* etc. */ bb = 1.0; /* Initial unscaled radius */ for (j = 0; j < di; j++) { /* For each coordinate in vertex */ - if (j > i) - p[i][j] = cp[j] + s[j] * 0.0; /* If beyond last */ - else if (j == i) /* If last non-zero */ - p[i][j] = cp[j] + s[j] * bb; - else if (i == di && j == (di-1)) /* If last of last */ - p[i][j] = cp[j] + s[j] * -1.0 * bb; + if (j > ii) + p[i][j] = cp[j] + sv * s[j] * 0.0; /* If beyond last */ + else if (j == ii) /* If last non-zero */ + p[i][j] = cp[j] + sv * s[j] * bb; + else if (ii == di && j == (di-1)) /* If last of last */ + p[i][j] = cp[j] + sv * s[j] * -1.0 * bb; else /* If before last */ - p[i][j] = cp[j] + s[j] * -hh * bb; + p[i][j] = cp[j] + sv * s[j] * -hh * bb; bb *= rr; } + /* Increment coordinate number with wrap around */ + if (++ii >= (di+1)) + ii = 0; + } +#ifdef DEBUG + if (dhsx_debug) { + for (i = 0; i < (di+1); i++) + printf(" p[%d] = %s\n",i,debPdv(di,p[i])); } +#endif } diff --git a/numlib/dhsx.h b/numlib/dhsx.h index 828b8b2..78cdb10 100644..100755 --- a/numlib/dhsx.h +++ b/numlib/dhsx.h @@ -11,29 +11,23 @@ #endif /* Down hill simplex function */ -/* return err on sucess, -1.0 on failure */ -/* Result will be in cp */ -/* Arrays start at 0 */ - -/* Standard interface for optimizer function */ /* return 0 on sucess, 1 on failure due to excessive itterations */ /* Result will be in cp */ -/* Arrays start at 0 */ int dhsx( -double *rv, /* If not NULL, return the residual error */ -int di, /* Dimentionality */ -double cp[], /* Initial starting point */ -double s[], /* Size of initial search area */ -double ftol, /* Tollerance of error change to stop on */ -double atol, /* Absolute return value tollerance */ -int maxit, /* Maximum iterations allowed */ -double (*funk)(void *fdata, double tp[]), /* Error function to evaluate */ -void *fdata /* Data needed by function */ + double *rv, /* If not NULL, return the residual error */ + int di, /* Dimentionality */ + double *cp, /* Initial starting point, return minimum */ + double *s, /* Size of initial search area */ + double ftol, /* Finishing tollerance of error change */ + double athr, /* Absolute return value threshold. (Set high to not use) */ + int maxit, /* Maximum iterations allowed */ + double (*funk)(void *fdata, double *tp), /* Error function to evaluate */ + void *fdata /* Data needed by function */ ); double dhsx_funk( /* Return function value */ - void *fdata, /* Opaque data pointer */ - double tp[]); /* Multivriate input value */ + void *fdata, /* Opaque data pointer */ + double tp[]); /* Multivriate input value */ #ifdef __cplusplus } diff --git a/numlib/dnsq.c b/numlib/dnsq.c index 75f00a8..75f00a8 100644..100755 --- a/numlib/dnsq.c +++ b/numlib/dnsq.c diff --git a/numlib/dnsq.h b/numlib/dnsq.h index e06e562..e06e562 100644..100755 --- a/numlib/dnsq.h +++ b/numlib/dnsq.h diff --git a/numlib/dnsqtest.c b/numlib/dnsqtest.c index 3f02819..3f02819 100644..100755 --- a/numlib/dnsqtest.c +++ b/numlib/dnsqtest.c diff --git a/numlib/ludecomp.c b/numlib/ludecomp.c index 72e014a..b756bfe 100644..100755 --- a/numlib/ludecomp.c +++ b/numlib/ludecomp.c @@ -162,6 +162,8 @@ int n /* Dimensionality */ } /* Decompose the square matrix A[][] into lower and upper triangles */ +/* NOTE that it returns transposed inverse by normal convention. */ +/* Use sym_matrix_trans() to fix this. */ /* Return 1 if the matrix is singular. */ int lu_decomp( @@ -339,6 +341,8 @@ int *pivx /* Pivoting row permutations record */ /* Invert a matrix A using lu decomposition */ +/* NOTE that it returns transposed inverse by normal convention. */ +/* Use sym_matrix_trans() to fix this, or use matrix_trans_mult() */ /* Return 1 if the matrix is singular, 0 if OK */ int lu_invert( @@ -385,7 +389,10 @@ int n /* Dimensionality */ return 0; } -#ifdef NEVER /* It's not clear that this is correct */ +/* Invert a matrix A using lu decomposition, and polish it. */ +/* NOTE that it returns transposed inverse by normal convention. */ +/* Use sym_matrix_trans() to fix this, or use matrix_trans_mult() */ +/* Return 1 if the matrix is singular, 0 if OK */ int lu_polished_invert( double **a, /* A[][] input matrix, returns inversion of A */ @@ -413,8 +420,8 @@ int n /* Dimensionality */ return i; } - for (k = 0; k < 10; k++) { - matrix_mult(t1, n, n, aa, n, n, a, n, n); + for (k = 0; k < 20; k++) { + matrix_trans_mult(t1, n, n, aa, n, n, a, n, n); for (i = 0; i < n; i++) { for (j = 0; j < n; j++) { t2[i][j] = a[i][j]; @@ -432,9 +439,10 @@ int n /* Dimensionality */ free_dmatrix(t2, 0, n-1, 0, n-1); return 0; } -#endif /* Pseudo-Invert matrix A using lu decomposition */ +/* NOTE that it returns transposed inverse by normal convention. */ +/* Use matrix_trans() to fix this, or use matrix_trans_mult(). */ /* Return 1 if the matrix is singular, 0 if OK */ int lu_psinvert( diff --git a/numlib/ludecomp.h b/numlib/ludecomp.h index cdb4382..1075a5b 100644..100755 --- a/numlib/ludecomp.h +++ b/numlib/ludecomp.h @@ -69,6 +69,8 @@ int *pivx /* Pivoting row permutations record */ ); /* Invert a matrix A using lu decomposition */ +/* NOTE that it returns transposed inverse by normal convention. */ +/* Use sym_matrix_trans() to fix this, or use matrix_trans_mult() */ /* Return 1 if the matrix is singular, 0 if OK */ int lu_invert( @@ -76,7 +78,19 @@ double **a, /* A[][] input matrix, returns inversion of A */ int n /* Dimensionality */ ); +/* Invert a matrix A using lu decomposition, and polish it. */ +/* NOTE that it returns transposed inverse by normal convention. */ +/* Use sym_matrix_trans() to fix this, or use matrix_trans_mult() */ +/* Return 1 if the matrix is singular, 0 if OK */ +int +lu_polished_invert( +double **a, /* A[][] input matrix, returns inversion of A */ +int n /* Dimensionality */ +); + /* Pseudo-Invert matrix A using lu decomposition */ +/* NOTE that it returns transposed inverse by normal convention. */ +/* Use matrix_trans() to fix this, or use matrix_trans_mult(). */ /* Return 1 if the matrix is singular, 0 if OK */ int lu_psinvert( diff --git a/numlib/numlib.h b/numlib/numlib.h index aa34b2d..430ce7a 100644..100755 --- a/numlib/numlib.h +++ b/numlib/numlib.h @@ -8,11 +8,13 @@ #include "dnsq.h" /* Non-linear equation solver */ #include "powell.h" /* Powell multi dimentional minimiser */ #include "dhsx.h" /* Downhill simplex multi dimentional minimiser */ +#include "varmet.h" /* Variable Metric multi dimentional minimiser */ #include "ludecomp.h" /* LU decomposition matrix solver */ #include "svd.h" /* Singular Value decomposition matrix solver */ #include "zbrent.h" /* 1 dimentional brent root search */ #include "rand.h" /* Random number generators */ #include "sobol.h" /* Sub-random vector generators */ #include "aatree.h" /* Anderson balanced binary tree */ +#include "quadprog.h" /* Quadradic Programming solution */ #endif /* NUMLIB_H */ diff --git a/numlib/numsup.c b/numlib/numsup.c index 39011ae..eab81ed 100644..100755 --- a/numlib/numsup.c +++ b/numlib/numsup.c @@ -483,17 +483,34 @@ a1log *del_a1log(a1log *log) { return NULL; } +/* Set the debug level. */ +void a1log_debug(a1log *log, int level) { + if (log != NULL) { + log->debug = level; + } +} + +/* Set the vebosity level. */ +void a1log_verb(a1log *log, int level) { + if (log != NULL) { + log->verb = level; + } +} + /* Set the tag. Note that the tage string is NOT copied, just referenced */ void a1log_tag(a1log *log, char *tag) { - log->tag = tag; + if (log != NULL) { + log->tag = tag; + } } /* Log a verbose message if level >= verb */ void a1logv(a1log *log, int level, char *fmt, ...) { + if (log != NULL) { if (log->verb >= level) { va_list args; - + A1LOG_LOCK(log, 0); va_start(args, fmt); log->logv(log->cntx, log, fmt, args); @@ -511,7 +528,7 @@ void a1logd(a1log *log, int level, char *fmt, ...) { A1LOG_LOCK(log, 1); va_start(args, fmt); - log->loge(log->cntx, log, fmt, args); + log->logd(log->cntx, log, fmt, args); va_end(args); A1LOG_UNLOCK(log); } @@ -601,6 +618,8 @@ void a1logue(a1log *log) { void adump_bytes(a1log *log, char *pfx, unsigned char *buf, int base, int len) { int i, j, ii; char oline[200] = { '\000' }, *bp = oline; + if (pfx == NULL) + pfx = ""; for (i = j = 0; i < len; i++) { if ((i % 16) == 0) bp += sprintf(bp,"%s%04x:",pfx,base+i); @@ -827,7 +846,7 @@ void osx_userinitiated_start() { } /* Create a reason string */ - str = objc_msgSend(objc_getClass("NSString"), sel_getUid("alloc")); + str = objc_msgSend((id)objc_getClass("NSString"), sel_getUid("alloc")); str = objc_msgSend(str, sel_getUid("initWithUTF8String:"), "ArgyllCMS"); /* Start activity that tells App Nap to mind its own business. */ @@ -842,8 +861,9 @@ void osx_userinitiated_end() { if (osx_userinitiated_cnt == 0 && osx_userinitiated_activity != nil) { a1logd(g_log, 7, "OS X - User Initiated Activity end"); objc_msgSend( - objc_msgSend(objc_getClass("NSProcessInfo"), sel_getUid("processInfo")), - sel_getUid("endActivity:"), osx_userinitiated_activity); + objc_msgSend((id)objc_getClass("NSProcessInfo"), + sel_getUid("processInfo")), sel_getUid("endActivity:"), + osx_userinitiated_activity); osx_userinitiated_activity = nil; } } @@ -885,7 +905,7 @@ void osx_latencycritical_start() { } /* Create a reason string */ - str = objc_msgSend(objc_getClass("NSString"), sel_getUid("alloc")); + str = objc_msgSend((id)objc_getClass("NSString"), sel_getUid("alloc")); str = objc_msgSend(str, sel_getUid("initWithUTF8String:"), "Measuring Color"); /* Start activity that tells App Nap to mind its own business. */ @@ -900,8 +920,9 @@ void osx_latencycritical_end() { if (osx_latencycritical_cnt == 0 && osx_latencycritical_activity != nil) { a1logd(g_log, 7, "OS X - Latency Critical Activity end"); objc_msgSend( - objc_msgSend(objc_getClass("NSProcessInfo"), sel_getUid("processInfo")), - sel_getUid("endActivity:"), osx_latencycritical_activity); + objc_msgSend((id)objc_getClass("NSProcessInfo"), + sel_getUid("processInfo")), sel_getUid("endActivity:"), + osx_latencycritical_activity); osx_latencycritical_activity = nil; } } @@ -957,7 +978,7 @@ int nh /* Highest index */ } /* --------------------- */ -/* 2D Double vector malloc/free */ +/* 2D Double matrix malloc/free */ double **dmatrix( int nrl, /* Row low index */ int nrh, /* Row high index */ @@ -1179,7 +1200,7 @@ int nch } /* --------------------- */ -/* 2D vector copy */ +/* matrix copy */ void copy_dmatrix( double **dst, double **src, @@ -1713,6 +1734,19 @@ void matrix_trans(double **d, double **s, int nr, int nc) { } } +/* Transpose a 0 base symetrical matrix in place */ +void sym_matrix_trans(double **m, int n) { + int i, j; + + for (i = 0; i < n; i++) { + for (j = i+1; j < n; j++) { + double tt = m[j][i]; + m[j][i] = m[i][j]; + m[i][j] = tt; + } + } +} + /* Multiply two 0 based matricies */ /* Return nz on matching error */ int matrix_mult( @@ -1746,20 +1780,260 @@ int matrix_mult( return 0; } -/* Diagnostic - print to g_log debug */ -void matrix_print(char *c, double **a, int nr, int nc) { +/* Matrix multiply transpose of s1 by s2 */ +/* 0 based matricies, */ +/* This is usefull for using results of lu_invert() */ +int matrix_trans_mult( + double **d, int nr, int nc, + double **ts1, int nr1, int nc1, + double **s2, int nr2, int nc2 +) { + int i, j, k; + + /* s1 and s2 must mesh */ + if (nr1 != nr2) + return 1; + + /* Output rows = s1 rows */ + if (nr != nc1) + return 2; + + /* Output colums = s2 columns */ + if (nc != nc2) + return 2; + + for (i = 0; i < nc1; i++) { + for (j = 0; j < nc2; j++) { + d[i][j] = 0.0; + for (k = 0; k < nr1; k++) { + d[i][j] += ts1[k][i] * s2[k][j]; + } + } + } + + return 0; +} + +/* Multiply a 0 based matrix by a vector */ +/* d may be same as v */ +int matrix_vect_mult( + double *d, int nd, + double **m, int nr, int nc, + double *v, int nv +) { int i, j; - a1logd(g_log, 0, "%s, %d x %d\n",c,nr,nc); + double *_v = v, vv[20]; - for (j = 0; j < nr; j++) { - a1logd(g_log, 0, " "); - for (i = 0; i < nc; i++) { - a1logd(g_log, 0, " %.2f",a[j][i]); + if (d == v) { + if (nv <= 20) { + _v = vv; + } else { + _v = dvector(0, nv-1); } + for (j = 0; j < nv; j++) + _v[j] = v[j]; + } + + /* Input vector must match matrix columns */ + if (nv != nc) + return 1; + + /* Output vector must match matrix rows */ + if (nd != nr) + return 1; + + for (i = 0; i < nd; i++) { + d[i] = 0.0; + for (j = 0; j < nv; j++) + d[i] += m[i][j] * _v[j]; + } + + if (_v != v && _v != vv) + free_dvector(_v, 0, nv-1); + + return 0; +} + + +/* Set zero based dvector */ +void vect_set(double *d, double v, int len) { + int i; + for (i = 0; i < len; i++) + d[i] = v; +} + +/* Copy zero based dvector */ +void vect_cpy(double *d, double *s, int len) { + int i; + for (i = 0; i < len; i++) + d[i] = s[i]; +} + + +/* Negate and copy a vector, d = -v */ +/* d may be same as v */ +void vect_neg(double *d, double *s, int len) { + int i; + for (i = 0; i < len; i++) + d[i] = -s[i]; +} + +/* Add two vectors */ +/* d may be same as v */ +void vect_add( + double *d, + double *v, int len +) { + int i; + + for (i = 0; i < len; i++) + d[i] += v[i]; +} + +/* Subtract two vectors, d -= v */ +/* d may be same as v */ +void vect_sub( + double *d, double *v, int len +) { + int i; + for (i = 0; i < len; i++) + d[i] -= v[i]; +} + + +/* - - - - - - - - - - - - - - - - - - - - - - */ + +/* Print double matrix to g_log debug */ +/* id identifies matrix */ +/* pfx used at start of each line */ +/* Assumed indexed from 0 */ +void adump_dmatrix(a1log *log, char *id, char *pfx, double **a, int nr, int nc) { + int i, j; + a1logd(g_log, 0, "%s%s[%d][%d]\n",pfx,id,nr,nc); + + for (j = 0; j < nr; j++) { + a1logd(g_log, 0, "%s ",pfx); + for (i = 0; i < nc; i++) + a1logd(g_log, 0, "%f%s",a[j][i], i < (nc-1) ? ", " : ""); + a1logd(g_log, 0, "\n"); + } +} + +/* Print float matrix to g_log debug */ +/* id identifies matrix */ +/* pfx used at start of each line */ +/* Assumed indexed from 0 */ +void adump_fmatrix(a1log *log, char *id, char *pfx, float **a, int nr, int nc) { + int i, j; + a1logd(g_log, 0, "%s%s[%d][%d]\n",pfx,id,nr,nc); + + for (j = 0; j < nr; j++) { + a1logd(g_log, 0, "%s ",pfx); + for (i = 0; i < nc; i++) + a1logd(g_log, 0, "%f%s",a[j][i], i < (nc-1) ? ", " : ""); a1logd(g_log, 0, "\n"); } } +/* Print int matrix to g_log debug */ +/* id identifies matrix */ +/* pfx used at start of each line */ +/* Assumed indexed from 0 */ +void adump_imatrix(a1log *log, char *id, char *pfx, int **a, int nr, int nc) { + int i, j; + a1logd(g_log, 0, "%s%s[%d][%d]\n",pfx,id,nr,nc); + + for (j = 0; j < nr; j++) { + a1logd(g_log, 0, "%s ",pfx); + for (i = 0; i < nc; i++) + a1logd(g_log, 0, "%d%s",a[j][i], i < (nc-1) ? ", " : ""); + a1logd(g_log, 0, "\n"); + } +} + +/* Print short matrix to g_log debug */ +/* id identifies matrix */ +/* pfx used at start of each line */ +/* Assumed indexed from 0 */ +void adump_smatrix(a1log *log, char *id, char *pfx, short **a, int nr, int nc) { + int i, j; + a1logd(g_log, 0, "%s%s[%d][%d]\n",pfx,id,nr,nc); + + for (j = 0; j < nr; j++) { + a1logd(g_log, 0, "%s ",pfx); + for (i = 0; i < nc; i++) + a1logd(g_log, 0, "%d%s",a[j][i], i < (nc-1) ? ", " : ""); + a1logd(g_log, 0, "\n"); + } +} + +/* Print double vector to g_log debug */ +/* id identifies vector */ +/* pfx used at start of each line */ +/* Assumed indexed from 0 */ +void adump_dvector(a1log *log, char *id, char *pfx, double *a, int nc) { + int i; + a1logd(g_log, 0, "%s%s[%d]\n",pfx,id,nc); + a1logd(g_log, 0, "%s ",pfx); + for (i = 0; i < nc; i++) + a1logd(g_log, 0, "%f%s",a[i], i < (nc-1) ? ", " : ""); + a1logd(g_log, 0, "\n"); +} + +/* Print float vector to g_log debug */ +/* id identifies vector */ +/* pfx used at start of each line */ +/* Assumed indexed from 0 */ +void adump_fvector(a1log *log, char *id, char *pfx, float *a, int nc) { + int i; + a1logd(g_log, 0, "%s%s[%d]\n",pfx,id,nc); + a1logd(g_log, 0, "%s ",pfx); + for (i = 0; i < nc; i++) + a1logd(g_log, 0, "%f%s",a[i], i < (nc-1) ? ", " : ""); + a1logd(g_log, 0, "\n"); +} + +/* Print int vector to g_log debug */ +/* id identifies vector */ +/* pfx used at start of each line */ +/* Assumed indexed from 0 */ +void adump_ivector(a1log *log, char *id, char *pfx, int *a, int nc) { + int i; + a1logd(g_log, 0, "%s%s[%d]\n",pfx,id,nc); + a1logd(g_log, 0, "%s ",pfx); + for (i = 0; i < nc; i++) + a1logd(g_log, 0, "%d%s",a[i], i < (nc-1) ? ", " : ""); + a1logd(g_log, 0, "\n"); +} + +/* Print short vector to g_log debug */ +/* id identifies vector */ +/* pfx used at start of each line */ +/* Assumed indexed from 0 */ +void adump_svector(a1log *log, char *id, char *pfx, short *a, int nc) { + int i; + a1logd(g_log, 0, "%s%s[%d]\n",pfx,id,nc); + a1logd(g_log, 0, "%s ",pfx); + for (i = 0; i < nc; i++) + a1logd(g_log, 0, "%d%s",a[i], i < (nc-1) ? ", " : ""); + a1logd(g_log, 0, "\n"); +} + +/* Print C double matrix to g_log debug */ +/* id identifies matrix */ +/* pfx used at start of each line */ +/* Assumed indexed from 0 */ +void adump_C_dmatrix(a1log *log, char *id, char *pfx, double *a, int nr, int nc) { + int i, j; + a1logd(g_log, 0, "%s%s[%d][%d]\n",pfx,id,nr,nc); + + for (j = 0; j < nr; j++, a += nc) { + a1logd(g_log, 0, "%s ",pfx); + for (i = 0; i < nc; i++) + a1logd(g_log, 0, "%f%s",a[i], i < (nc-1) ? ", " : ""); + a1logd(g_log, 0, "\n"); + } +} /*******************************************/ /* Platform independent IEE754 conversions */ @@ -2286,10 +2560,12 @@ void msec_sleep(unsigned int msec) { } -#if defined(__APPLE__) && !defined(CLOCK_MONOTONIC) +#if defined(__APPLE__) /* && !defined(CLOCK_MONOTONIC) */ #include <mach/mach_time.h> +/* Return the current time in msec */ +/* since the first invokation of msec_time() */ unsigned int msec_time() { mach_timebase_info_data_t timebase; static uint64_t startup = 0; @@ -2400,6 +2676,9 @@ char *debPiv(int di, int *p) { int e; char *bp; + if (p == NULL) + return "(null)"; + if (++ix >= 5) ix = 0; bp = buf[ix]; @@ -2418,11 +2697,14 @@ char *debPiv(int di, int *p) { /* Print a double color vector to a string. */ /* Returned static buffer is re-used every 5 calls. */ char *debPdv(int di, double *p) { - static char buf[5][DEB_MAX_CHAN * 16]; + static char buf[5][DEB_MAX_CHAN * 100]; static int ix = 0; int e; char *bp; + if (p == NULL) + return "(null)"; + if (++ix >= 5) ix = 0; bp = buf[ix]; @@ -2441,11 +2723,14 @@ char *debPdv(int di, double *p) { /* Print a float color vector to a string. */ /* Returned static buffer is re-used every 5 calls. */ char *debPfv(int di, float *p) { - static char buf[5][DEB_MAX_CHAN * 16]; + static char buf[5][DEB_MAX_CHAN * 100]; static int ix = 0; int e; char *bp; + if (p == NULL) + return "(null)"; + if (++ix >= 5) ix = 0; bp = buf[ix]; diff --git a/numlib/numsup.h b/numlib/numsup.h index 9d55daf..86ad6a8 100644..100755 --- a/numlib/numsup.h +++ b/numlib/numsup.h @@ -78,6 +78,14 @@ # endif #endif +#ifndef INLINE +# ifdef _MSC_VER +# define INLINE __inline +# else +# define INLINE inline +# endif +#endif + #else /* !__STDC_VERSION__ */ #ifdef _MSC_VER @@ -100,6 +108,10 @@ # define ATTRIBUTE_NORETURN __declspec(noreturn) #endif +#ifndef INLINE +# define INLINE __inline +#endif + #else /* !_MSC_VER */ /* The following works on a lot of modern systems, including */ @@ -131,6 +143,9 @@ #ifndef ATTRIBUTE_NORETURN # define ATTRIBUTE_NORETURN __attribute__((noreturn)) #endif +#ifndef INLINE +# define INLINE inline +#endif /* INLINE */ #endif /* !_MSC_VER */ #endif /* !__STDC_VERSION__ */ @@ -299,6 +314,12 @@ a1log *new_a1log_d(a1log *log); /* Returns NULL */ a1log *del_a1log(a1log *log); +/* Set the debug logging level. */ +void a1log_debug(a1log *log, int level); + +/* Set the vebosity level. */ +void a1log_verb(a1log *log, int level); + /* Set the tag. Note that the tag string is NOT copied, just referenced */ void a1log_tag(a1log *log, char *tag); @@ -398,6 +419,7 @@ void free_dhmatrix(double **m, int nrl, int nrh, int ncl, int nch); void copy_dmatrix(double **dst, double **src, int nrl, int nrh, int ncl, int nch); void copy_dmatrix_to3x3(double dst[3][3], double **src, int nrl, int nrh, int ncl, int nch); +/* Convert from C matrix to matrix */ double **convert_dmatrix(double *a,int nrl,int nrh,int ncl,int nch); void free_convert_dmatrix(double **m,int nrl,int nrh,int ncl,int nch); @@ -437,6 +459,9 @@ void free_smatrix(short **m,int nrl,int nrh,int ncl,int nch); /* Transpose a 0 base matrix */ void matrix_trans(double **d, double **s, int nr, int nc); +/* Transpose a 0 base symetrical matrix in place */ +void sym_matrix_trans(double **m, int n); + /* Matrix multiply 0 based matricies */ int matrix_mult( double **d, int nr, int nc, @@ -444,8 +469,63 @@ int matrix_mult( double **s2, int nr2, int nc2 ); -/* Diagnostic */ -void matrix_print(char *c, double **a, int nr, int nc); +/* Matrix multiply transpose of s1 by s2 */ +/* 0 based matricies, */ +/* This is usefull for using results of lu_invert() */ +int matrix_trans_mult( + double **d, int nr, int nc, + double **ts1, int nr1, int nc1, + double **s2, int nr2, int nc2 +); + +/* Multiply a 0 based matrix by a vector */ +/* d may be same as v */ +int matrix_vect_mult( + double *d, int nd, + double **m, int nr, int nc, + double *v, int nv +); + +/* Set zero based dvector */ +void vect_set(double *d, double v, int len); + +/* Copy zero based dvector */ +void vect_cpy(double *d, double *s, int len); + +/* Negate and copy a vector, d = -v */ +/* d may be same as v */ +void vect_neg(double *d, double *s, int len); + +/* Add two vectors, d += v */ +/* d may be same as v */ +void vect_add( + double *d, double *v, int len +); + +/* Subtract two vectors, d -= v */ +/* d may be same as v */ +void vect_sub( + double *d, double *v, int len +); + + +/* Diagnostics */ +/* id identifies matrix/vector */ +/* pfx used at start of each line */ +/* Assumed indexed from 0 */ + +void adump_dmatrix(a1log *log, char *id, char *pfx, double **a, int nr, int nc); +void adump_fmatrix(a1log *log, char *id, char *pfx, float **a, int nr, int nc); +void adump_imatrix(a1log *log, char *id, char *pfx, int **a, int nr, int nc); +void adump_smatrix(a1log *log, char *id, char *pfx, short **a, int nr, int nc); + +void adump_dvector(a1log *log, char *id, char *pfx, double *a, int nc); +void adump_fvector(a1log *log, char *id, char *pfx, float *a, int nc); +void adump_ivector(a1log *log, char *id, char *pfx, int *a, int nc); +void adump_svector(a1log *log, char *id, char *pfx, short *a, int nc); + +/* Dump C type matrix */ +void adump_C_dmatrix(a1log *log, char *id, char *pfx, double *a, int nr, int nc); /* =========================================================== */ @@ -547,11 +627,11 @@ double usec_time(); /* Returned static buffer is re-used every 5 calls. */ char *debPiv(int di, int *p); -/* Print a double color vector to a string. */ +/* Print a double vector to a string. */ /* Returned static buffer is re-used every 5 calls. */ char *debPdv(int di, double *p); -/* Print a float color vector to a string. */ +/* Print a float vector to a string. */ /* Returned static buffer is re-used every 5 calls. */ char *debPfv(int di, float *p); diff --git a/numlib/powell.c b/numlib/powell.c index 5d2adac..47acc15 100644..100755 --- a/numlib/powell.c +++ b/numlib/powell.c @@ -42,18 +42,34 @@ #undef SLOPE_SANITY_CHECK /* exermental */ #undef ABSTOL /* Make tollerance absolute */ -#undef DEBUG /* Some debugging printfs (not comprehensive) */ + /* Some debugging printfs (not comprehensive): */ +#undef PDEBUG /* Powell debug */ +#undef CDEBUG /* Conjgrad debug */ +#undef LDEBUG /* Line min debug */ + +#if defined(PDEBUG) +# undef PDBG +# define PDBG(xxx) printf xxx ; +#else +# undef PDBG +# define PDBG(xxx) +#endif -#ifdef DEBUG -#undef DBG -#define DBG(xxx) printf xxx ; +#if defined(CDEBUG) +# undef CDBG +# define CDBG(xxx) printf xxx ; #else -#undef DBG -#define DBG(xxx) +# undef CDBG +# define CDBG(xxx) #endif -static double linmin(double p[], double xi[], int n, double ftol, - double (*func)(void *fdata, double tp[]), void *fdata); +#if defined(LDEBUG) +# undef LDBG +# define LDBG(xxx) printf xxx ; +#else +# undef LDBG +# define LDBG(xxx) +#endif /* Standard interface for powell function */ /* return 0 on sucess, 1 on failure due to excessive itterions */ @@ -120,7 +136,7 @@ void *pdata /* Opaque data needed by prog() */ /* Loop over all directions in the set */ for (i = 0; i < di; i++) { - DBG(("Looping over direction %d\n",i)) + PDBG(("Looping over direction %d\n",i)) for (j = 0; j < di; j++) /* Extract this direction to make search vector */ svec[j] = dmtx[j][i]; @@ -161,10 +177,10 @@ void *pdata /* Opaque data needed by prog() */ /* reached a suitable tollerance, then finish */ if (iter > 1 && curdel <= stopth) { //printf("~1 ### stopping on itter %d because curdel %f <= stopth %f\n",iter, curdel,stopth); - DBG(("Reached stop tollerance because curdel %f <= stopth %f\n",curdel,stopth)) + PDBG(("Reached stop tollerance because curdel %f <= stopth %f\n",curdel,stopth)) break; } - DBG(("Not stopping because curdel %f > stopth %f\n",curdel,stopth)) + PDBG(("Not stopping because curdel %f > stopth %f\n",curdel,stopth)) //printf("~1 ### recomputing direction\n"); for (i = 0; i < di; i++) { @@ -212,7 +228,7 @@ void *pdata /* Opaque data needed by prog() */ if (iter < maxit) return 0; - DBG(("powell: returning 1 due to excessive itterations\n")) + PDBG(("powell: returning 1 due to excessive itterations\n")) return 1; /* Failed due to execessive itterations */ } @@ -225,7 +241,7 @@ void *pdata /* Opaque data needed by prog() */ int conjgrad( double *rv, /* If not NULL, return the residual error */ int di, /* Dimentionality */ -double cp[], /* Initial starting point */ +double cp[], /* Initial starting point and return value */ double s[], /* Size of initial search area */ #ifdef ABSTOL double ftol, /* Absolute tollerance of error change to stop on */ @@ -257,7 +273,7 @@ void *pdata /* Opaque data needed by prog() */ if (prog != NULL) /* Report initial progress */ prog(pdata, pc); - /* Initial function evaluation */ + /* Initial gradient function evaluation */ retv = (*dfunc)(fdata, svec, cp); /* svec[] seems to be large after this. */ @@ -272,21 +288,22 @@ void *pdata /* Opaque data needed by prog() */ else svec_sca = 1.0/svec_sca; -//printf("~1 ### initial dir = %f %f\n", svec[0],svec[1]); -//printf("~1 ### initial retv = %f\n",retv); + CDBG((" initial dir = %s\n", debPdv(di,svec))); + CDBG((" initial retv = %f\n",retv)); + /* Initial vector setup */ for (i = 0; i < di; i++) { gvec[i] = hvec[i] = -svec[i]; /* Inverse gradient */ svec[i] = s[i] * -svec[i] * svec_sca; /* Scale the search vector */ } -//printf("~1 ### svec = %f %f\n", svec[0],svec[1]); + CDBG(("Initial svec = %s\n", debPdv(di,svec))); /* Itterate untill we converge on a solution, or give up. */ for (iter = 1; iter < maxit; iter++) { double gamden, gamnum, gam; double pretv; /* Previous function return value */ - DBG(("conjrad: about to do linmin\n")) + CDBG(("conjrad: about to do linmin\n")) pretv = retv; retv = linmin(cp, svec, di, ftol, func, fdata); @@ -296,7 +313,7 @@ void *pdata /* Opaque data needed by prog() */ stopth = ftol * 0.5 * (fabs(pretv) + fabs(retv) + DBL_EPSILON); // Old code #endif curdel = fabs(pretv - retv); -//printf("~1 ### this retv = %f, pretv = %f, curdel = %f\n",retv,pretv,curdel); + CDBG((" this retv = %f, pretv = %f, curdel = %f\n",retv,pretv,curdel)); if (startdel < 0.0) { startdel = curdel; } else { @@ -312,31 +329,30 @@ void *pdata /* Opaque data needed by prog() */ /* If we have had at least one change of direction and */ /* reached a suitable tollerance, then finish */ if (iter > 1 && curdel <= stopth) { -//printf("~1 ### stopping on itter %d because curdel %f <= stopth %f\n",iter, curdel,stopth); + CDBG((" stopping on itter %d because curdel %f <= stopth %f\n",iter, curdel,stopth)); break; } -//printf("~1 ### Not stopping on itter %d because curdel %f > stopth %f\n",iter, curdel,stopth); + CDBG((" not stopping on itter %d because curdel %f > stopth %f\n",iter, curdel,stopth)); - DBG(("conjrad: recomputing direction\n")) -//printf("~1 ### recomputing direction\n"); + CDBG(("conjrad: recomputing direction\n")) (*dfunc)(fdata, svec, cp); /* (Don't use retv as it wrecks stop test) */ + CDBG((" pderiv = %s\n", debPdv(di,svec))); -//printf("~1 ### pderiv = %f %f\n", svec[0],svec[1]); /* Compute gamma */ for (gamnum = gamden = 0.0, i = 0; i < di; i++) { gamnum += svec[i] * (gvec[i] + svec[i]); gamden += gvec[i] * gvec[i]; } -//printf("~1 ### gamnum = %f, gamden = %f\n", gamnum,gamden); + CDBG((" gamnum = %f, gamden = %f\n", gamnum,gamden)); if (gamden == 0.0) { /* Gradient is exactly zero */ - DBG(("conjrad: gradient is exactly zero\n")) + CDBG(("conjrad: gradient is exactly zero\n")) break; } gam = gamnum/gamden; - DBG(("conjrad: gamma = %f = %f/%f\n",gam,gamnum,gamden)) -//printf("~1 ### gvec[] = %f %f, gamma = %f, hvec = %f %f\n", gvec[0],gvec[1],gam,hvec[0],hvec[1]); + CDBG(("conjrad: gamma = %f = %f/%f\n",gam,gamnum,gamden)); + CDBG((" gvec[] = %s, hvec = %s\n", debPdv(di,gvec),debPdv(di,hvec))); /* Adjust seach direction */ for (i = 0; i < di; i++) { @@ -357,8 +373,7 @@ void *pdata /* Opaque data needed by prog() */ svec_sca = 1.0/svec_sca; for (i = 0; i < di; i++) svec[i] = svec[i] * s[i] * svec_sca; -//printf("~1 ### svec = %f %f\n", svec[0],svec[1]); - + CDBG((" svec = %s\n", debPdv(di,svec))); } /* Free up all the temporary vectors and matrix */ free_dvector(hvec,0,di-1); @@ -371,7 +386,7 @@ void *pdata /* Opaque data needed by prog() */ if (rv != NULL) *rv = retv; -//printf("~1 ### done\n"); + CDBG((" conjgrad returning = %f\n", retv)); if (iter < maxit) return 0; @@ -386,7 +401,7 @@ void *pdata /* Opaque data needed by prog() */ /* Line bracketing and minimisation routine. */ /* Return value at minimum. */ -static double linmin( +double linmin( double cp[], /* Start point, and returned value */ double xi[], /* Search vector */ int di, /* Dimensionality */ @@ -411,7 +426,7 @@ void *fdata) /* Opaque data for func() */ /* -------------------------- */ /* First bracket the solution */ - DBG(("linmin: Bracketing solution\n")) + LDBG(("linmin: Bracketing solution\n")) /* The line is measured as startpoint + offset * search vector. */ /* (Search isn't symetric, but it seems to depend on cp being */ @@ -427,7 +442,7 @@ void *fdata) /* Opaque data for func() */ xt[i] = cp[i] + xx * xi[i]; xf = (*func)(fdata, xt); - DBG(("linmin: Initial points a:%f:%f -> b:%f:%f\n",ax,af,xx,xf)) + LDBG(("linmin: Initial points a:%f:%f -> b:%f:%f\n",ax,af,xx,xf)) /* Fix it so that we are decreasing from point a -> x */ if (xf > af) { @@ -435,21 +450,21 @@ void *fdata) /* Opaque data for func() */ tt = ax; ax = xx; xx = tt; tt = af; af = xf; xf = tt; } - DBG(("linmin: Ordered Initial points a:%f:%f -> b:%f:%f\n",ax,af,xx,xf)) + LDBG(("linmin: Ordered Initial points a:%f:%f -> b:%f:%f\n",ax,af,xx,xf)) bx = xx + POWELL_GOLD * (xx-ax); /* Guess b beyond a -> x */ for (i = 0; i < di; i++) xt[i] = cp[i] + bx * xi[i]; bf = (*func)(fdata, xt); - DBG(("linmin: Initial bracket a:%f:%f x:%f:%f b:%f:%f\n",ax,af,xx,xf,bx,bf)) + LDBG(("linmin: Initial bracket a:%f:%f x:%f:%f b:%f:%f\n",ax,af,xx,xf,bx,bf)) #ifdef SLOPE_SANITY_CHECK /* If we're not seeing a slope indicitive of progress */ /* of order ftol, give up straight away */ if (2000.0 * fabs(xf - bf) <= ftol * (fabs(xf) + fabs(bf)) && 2000.0 * fabs(af - xf) <= ftol * (fabs(af) + fabs(xf))) { - DBG(("linmin: giving up because slope is too shallow\n")) + LDBG(("linmin: giving up because slope is too shallow\n")) if (xt != XT) free_dvector(xt,0,di-1); @@ -470,9 +485,9 @@ void *fdata) /* Opaque data for func() */ double ulim, ux, uf; double tt, r, q; -// DBG(("linmin: Not bracketed a:%f:%f x:%f%f b:%f:%f\n",ax,af,xx,xf,bx,bf)) - DBG(("linmin: Not bracketed because xf %f > bf %f\n",xf, bf)) - DBG((" ax = %f, xx = %f, bx = %f\n",ax,xx,bx)) +// LDBG(("linmin: Not bracketed a:%f:%f x:%f%f b:%f:%f\n",ax,af,xx,xf,bx,bf)) + LDBG(("linmin: Not bracketed because xf %f > bf %f\n",xf, bf)) + LDBG((" ax = %f, xx = %f, bx = %f\n",ax,xx,bx)) /* Compute ux by parabolic interpolation from a, x & b */ q = (xx - bx) * (xf - af); @@ -544,7 +559,7 @@ void *fdata) /* Opaque data for func() */ bx = ux; bf = uf; //printf("~1 move along to the right (a<-x, x<-b, b-<u)\n"); } - DBG(("linmin: Got bracket a:%f:%f x:%f:%f b:%f:%f\n",ax,af,xx,xf,bx,bf)) + LDBG(("linmin: Got bracket a:%f:%f x:%f:%f b:%f:%f\n",ax,af,xx,xf,bx,bf)) /* Got bracketed minimum between a -> x -> b */ //printf("~1 got bracketed minimum at %f (%f), %f (%f), %f (%f)\n",ax,af,xx,xf,bx,bf); @@ -581,12 +596,12 @@ void *fdata) /* Opaque data for func() */ #endif double tol2 = 2.0 * tol1; - DBG(("linmin: Got bracket a:%f:%f x:%f:%f b:%f:%f\n",ax,af,xx,xf,bx,bf)) + LDBG(("linmin: Got bracket a:%f:%f x:%f:%f b:%f:%f\n",ax,af,xx,xf,bx,bf)) /* See if we're done */ //printf("~1 linmin check %f <= %f\n",fabs(xx - mx), tol2 - 0.5 * (bx - ax)); if (fabs(xx - mx) <= (tol2 - 0.5 * (bx - ax))) { - DBG(("linmin: We're done because %f <= %f\n",fabs(xx - mx), tol2 - 0.5 * (bx - ax))) + LDBG(("linmin: We're done because %f <= %f\n",fabs(xx - mx), tol2 - 0.5 * (bx - ax))) break; } @@ -603,13 +618,13 @@ void *fdata) /* Opaque data for func() */ te = e; /* Save previous e value */ e = de; /* Previous steps distance moved */ - DBG(("linmin: Trial parabolic fit\n" )) + LDBG(("linmin: Trial parabolic fit\n" )) if (fabs(p) >= fabs(0.5 * q * te) || p <= q * (ax-xx) || p >= q * (bx-xx)) { /* Give up on the parabolic fit, and use the golden section search */ e = ((xx >= mx) ? ax-xx : bx-xx); /* Override previous distance moved */ de = POWELL_CGOLD * e; - DBG(("linmin: Moving to golden section search\n" )) + LDBG(("linmin: Moving to golden section search\n" )) } else { /* Use parabolic fit */ de = p/q; /* Change in xb */ ux = xx + de; /* Trial point according to parabolic fit */ @@ -619,24 +634,24 @@ void *fdata) /* Opaque data for func() */ else de = -tol1; } - DBG(("linmin: Using parabolic fit\n" )) + LDBG(("linmin: Using parabolic fit\n" )) } } else { /* Keep using the golden section search */ e = ((xx >= mx) ? ax-xx : bx-xx); /* Override previous distance moved */ de = POWELL_CGOLD * e; - DBG(("linmin: Continuing golden section search\n" )) + LDBG(("linmin: Continuing golden section search\n" )) } if (fabs(de) >= tol1) { /* If de moves as much as tol1 would */ ux = xx + de; /* use it */ - DBG(("linmin: ux = %f = xx %f + de %f\n",ux,xx,de)) + LDBG(("linmin: ux = %f = xx %f + de %f\n",ux,xx,de)) } else { /* else move by tol1 in direction de */ if (de > 0.0) { ux = xx + tol1; - DBG(("linmin: ux = %f = xx %f + tol1 %f\n",ux,xx,tol1)) + LDBG(("linmin: ux = %f = xx %f + tol1 %f\n",ux,xx,tol1)) } else { ux = xx - tol1; - DBG(("linmin: ux = %f = xx %f - tol1 %f\n",ux,xx,tol1)) + LDBG(("linmin: ux = %f = xx %f - tol1 %f\n",ux,xx,tol1)) } } @@ -646,6 +661,7 @@ void *fdata) /* Opaque data for func() */ uf = (*func)(fdata, xt); if (uf <= xf) { /* Found new best solution */ + LDBG(("linmin: found new best solution at %f val %f\n",ux,uf)) if (ux >= xx) { ax = xx; af = xf; /* New lower bracket */ } else { @@ -654,8 +670,9 @@ void *fdata) /* Opaque data for func() */ vx = wx; vf = wf; /* New previous 2nd best solution */ wx = xx; wf = xf; /* New 2nd best solution from previous best */ xx = ux; xf = uf; /* New best solution from latest */ - DBG(("linmin: found new best solution\n")) } else { /* Found a worse solution */ + LDBG(("linmin: found new worse solution at %f val %f\n",ux,uf)) + LDBG(("linmin: current best at %f val %f\n",xx,xf)) if (ux < xx) { ax = ux; af = uf; /* New lower bracket */ } else { @@ -667,13 +684,13 @@ void *fdata) /* Opaque data for func() */ } else if (uf <= vf || vx == xx || vx == wx) { /* New 3rd best, or equal 1st & 2nd */ vx = ux; vf = uf; /* New previous 2nd best from latest */ } - DBG(("linmin: found new worse solution\n")) } } /* !!! should do something if iter > POWELL_MAXIT !!!! */ /* Solution is at xx, xf */ /* Compute solution vector */ + LDBG(("linmin: computing soln from best at %f val %f\n",xx,xf)) for (i = 0; i < di; i++) cp[i] += xx * xi[i]; } diff --git a/numlib/powell.h b/numlib/powell.h index a1db8b6..4b86573 100644..100755 --- a/numlib/powell.h +++ b/numlib/powell.h @@ -54,18 +54,20 @@ double powell_funk( /* Return function value */ void *fdata, /* Opaque data pointer */ double tp[]); /* Multivriate input value */ -/* Line in multi-dimensional space minimiser */ -double brentnd( /* vector multiplier return value */ -double ax, /* Minimum of multiplier range */ -double bx, /* Starting point multiplier of search */ -double cx, /* Maximum of multiplier range */ -double ftol, /* Tollerance to stop search */ -double *xmin, /* Return value of multiplier at minimum */ -int n, /* Dimensionality */ +/* Line bracketing and minimisation routine. */ +/* Return value at minimum. */ +double linmin( +double cp[], /* Start point, and returned value */ +double xi[], /* Search vector */ +int di, /* Dimensionality */ +#ifdef ABSTOL +double ftol, /* Absolute tolerance to stop on */ +#else +double ftol, /* Relative tolerance to stop on */ +#endif double (*func)(void *fdata, double tp[]), /* Error function to evaluate */ -void *fdata, /* Opaque data */ -double pcom[], /* Base vector point */ -double xicom[]); /* Vector that will be multiplied and added to pcom[] */ +void *fdata /* Opaque data for func() */ +); #ifdef __cplusplus } diff --git a/numlib/qptest.c b/numlib/qptest.c new file mode 100755 index 0000000..cc826f1 --- /dev/null +++ b/numlib/qptest.c @@ -0,0 +1,105 @@ +/* + + This file contains just an example on how to set-up the matrices for using with + the quadprog() function. + + The test problem is the following: + + Given: + G = 4 -2 g0^T = [6 0] + -2 4 + + Solve: + min f(x) = 1/2 x G x + g0 x + s.t. + x_1 + x_2 = 3 + x_1 >= 0 + x_2 >= 0 + x_1 + x_2 >= 2 + + The solution is x^T = [1 2] and f(x) = 12 + +*/ + +#include "stdio.h" +#include "numlib.h" +#include "quadprog.h" + +int main() { + double **GG, **G, **CE, **CI; + double *g0, *ce0, *ci0, *x; + int n, m, p; + int i, j; + double f, sum = 0.0; + + n = 2; + + /* Orginal, unchanged G */ + GG = dmatrix(0, n-1, 0, n-1); + GG[0][0] = 4.0; + GG[0][1] = -2.0; + GG[1][0] = -2.0; + GG[1][1] = 4.0; + + /* Working copy - gets modified */ + G = dmatrix(0, n-1, 0, n-1); + copy_dmatrix(G, GG, 0, n-1, 0, n-1); + + g0 = dvector(0, n-1); + g0[0] = 6.0; + g0[1] = 0.0; + + p = 1; + + CE = dmatrix(0, n-1, 0, p-1); + CE[0][0] = 1.0; + CE[1][0] = 1.0; + + ce0 = dvector(0, p-1); + ce0[0] = -3.0; + + m = 3; + CI = dmatrix(0, n-1, 0, m-1); + CI[0][0] = 1.0; + CI[0][1] = 0.0; + CI[0][2] = 1.0; + CI[1][0] = 0.0; + CI[1][1] = 1.0; + CI[1][2] = 1.0; + + ci0 = dvector(0, m-1); + ci0[0] = 0.0; + ci0[1] = 0.0; + ci0[2] = -2.0; + + x = dvector(0, n-1); + + f = quadprog(x, G, g0, CE, ce0, CI, ci0, n, p, m); + + if (f == QP_INFEASIBLE) + printf("Failed to find solution\n"); + else { + printf("Function value at %f %f = %f\n",x[0],x[1],f); + + for (i = 0; i < n; i++) + for (j = 0; j < n; j++) + sum += x[i] * GG[i][j] * x[j]; + sum *= 0.5; + + for (i = 0; i < n; i++) + sum += g0[i] * x[i]; + + printf("Double check funtion value %f\n",sum); + } + + free_dmatrix(GG, 0, n-1, 0, n-1); + free_dmatrix(G, 0, n-1, 0, n-1); + free_dvector(g0, 0, n-1); + free_dmatrix(CE, 0, n-1, 0, p-1); + free_dvector(ce0, 0, p-1); + free_dmatrix(CI, 0, n-1, 0, m-1); + free_dvector(ci0, 0, m-1); + free_dvector(x, 0, n-1); + + return 0; +} diff --git a/numlib/quadprog.c b/numlib/quadprog.c new file mode 100755 index 0000000..847601f --- /dev/null +++ b/numlib/quadprog.c @@ -0,0 +1,845 @@ + +/* + Quadradic Programming soliution. + + Based on Luca Di Gaspero's QuadProgpp++, made available with + the following license: + + MIT License + + Copyright (c) 2007-2016 Luca Di Gaspero + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + Translation to C by Graeme W. Gill, Copyright 2017, also licensed under the + above license. +*/ + +/* + + The quadprog_solve() function implements the algorithm of Goldfarb and Idnani + for the solution of a (convex) Quadratic Programming problem + by means of an active-set dual method. + +The problem is in the form: + +min 0.5 * x G x + g0 x +s.t. + CE^T x + ce0 = 0 + CI^T x + ci0 >= 0 + + The matrix and vectors dimensions are as follows: + G: n * n + g0: n + + CE: n * p + ce0: p + + CI: n * m + ci0: m + + x: n + + References: D. Goldfarb, A. Idnani. A numerically stable dual method for solving + strictly convex quadratic programs. Mathematical Programming 27 (1983) pp. 1-33. + +*/ + +#include "numsup.h" +#include "quadprog.h" + +#undef TRACE_SOLVER /* Print progress */ + +/* Utility functions for updating some data needed by the solution method */ +INLINE static void compute_d(double *d, double **J, double *np, int n); +INLINE static void update_z(double *z, double **J, double *d, int iq, int n); +INLINE static void update_r(double **R, double *r, double *d, int iq, int n); +static int add_constraint(double **R, double **J, double *d, int *piq, double *prnorm, int n); +INLINE static void delete_constraint(double **R, double **J, int *A, double *u, + int n, int p, int *piq, int l); + +/* Utility functions for computing the Cholesky decomposition and solving */ +/* linear systems */ +static void cholesky_decomposition(double **A, int n); +static void cholesky_solve(double **L, double *x, double *b, int n); +INLINE static void forward_elimination(double **L, double *y, double *b, int n); +INLINE static void backward_elimination(double **U, double *x, double *y, int n); + +/* Utility functions for computing the scalar product and the euclidean */ +/* distance between two numbers */ +INLINE static double scalar_product(double *x, double *y, int n); +INLINE static double distance(double a, double b); + +/* Utility functions for printing vectors and matrices */ +static void print_matrix(char* name, double **A, int n, int m); + +static void print_vector(char* name, double *v, int n); +static void print_ivector(char* name, int *v, int n); + +#define FMIN(A,B) ((A) < (B) ? (A) : (B)) + +#define FMAX(A,B) ((A) > (B) ? (A) : (B)) + +#define ASZ 10 +#define VSZ 20 + +double quadprog( /* Return solution cost, QP_INFEASIBLE if infeasible/error */ + double *x, /* Return x[n] value */ + double **G, /* G[n][n] Quadratic combination matrix - modified */ + double *g0, /* g0[n] Direct vector */ + double **CE, /* CE[n][p] Equality constraint matrix */ + double *ce0, /* ce0[p] Equality constraing constants */ + double **CI, /* CI[n][m] Constraint matrix */ + double *ci0, /* cie[m] Constraint constants */ + int n, /* Number of variables */ + int p, /* Number of equalities */ + int m /* Number of constraints */ +) { + int i, j, k, l; /* indices */ + int ip; /* index of the constraint to be added to the active set */ + double f_value = QP_INFEASIBLE, psi, c1, c2, sum, ss, R_norm; + double inf; + double t, t1, t2; /* t is the step length, which is the minimum of the partial */ + /* step length t1 and the full step length t2 */ + int q, iq, iter = 0; + + double **R, **J; + double *s, *z, *r, *d, *np, *u, *x_old, *u_old; + int *A, *A_old, *iai; + short *iaexcl; + + double *_R[ASZ], __R[ASZ][ASZ], *_J[ASZ], __J[ASZ][ASZ]; + double _s[VSZ], _z[VSZ], _r[VSZ], _d[VSZ], _np[VSZ], _u[VSZ], _x_old[VSZ], _u_old[VSZ]; + int _A[VSZ], _A_old[VSZ], _iai[VSZ]; + short _iaexcl[VSZ]; + + /* Avoid malloc's if we can.. */ + if (n <= ASZ) { + R = _R; + J = _J; + for (i = 0; i < n; i++) { + _R[i] = __R[i]; + _J[i] = __J[i]; + } + } else { + R = dmatrix(0, n-1, 0, n-1); + J = dmatrix(0, n-1, 0, n-1); + } + + if (n <= VSZ) { + x_old = _x_old; + z = _z; + d = _d; + np = _np; + } else { + x_old = dvector(0, n-1); + z = dvector(0, n-1); + d = dvector(0, n-1); + np = dvector(0, n-1); + } + + if ((m + p) <= VSZ) { + s = _s; + r = _r; + u = _u; + u_old = _u_old; + A = _A; + A_old = _A_old; + iai = _iai; + iaexcl = _iaexcl; + } else { + s = dvector(0, m + p-1); + r = dvector(0, m + p-1); + u = dvector(0, m + p-1); + u_old = dvector(0, m + p-1); + A = ivector(0, m + p-1); + A_old = ivector(0, m + p-1); + iai = ivector(0, m + p-1); + iaexcl = svector(0, m + p-1); + } + + q = 0; /* size of the active set A (containing the indices of the active constraints) */ + +#ifdef TRACE_SOLVER + printf("\nStarting solve_quadprog\n"); + print_matrix("G", G, n, n); + print_vector("g0", g0, n); + print_matrix("CE", CE, n, p); + print_vector("ce0", ce0, p); + print_matrix("CI", CI, n, m); + print_vector("ci0", ci0, m); +#endif + + /* + * Preprocessing phase + */ + + /* compute the trace of the original matrix G */ + c1 = 0.0; + for (i = 0; i < n; i++) + c1 += G[i][i]; + /* decompose the matrix G in the form L^T L */ + cholesky_decomposition(G, n); +#ifdef TRACE_SOLVER + print_matrix("G", G, n, n); +#endif + + /* initialize the matrix R */ + for (i = 0; i < n; i++) { + d[i] = 0.0; + for (j = 0; j < n; j++) + R[i][j] = 0.0; + } + R_norm = 1.0; /* this variable will hold the norm of the matrix R */ + + /* compute the inverse of the factorized matrix G^-1, this is the initial value for H */ + c2 = 0.0; + for (i = 0; i < n; i++) { + d[i] = 1.0; + forward_elimination(G, z, d, n); + for (j = 0; j < n; j++) + J[i][j] = z[j]; + c2 += z[i]; + d[i] = 0.0; + } +#ifdef TRACE_SOLVER + print_matrix("J", J, n, n); +#endif + + /* c1 * c2 is an estimate for cond(G) */ + + /* Find the unconstrained minimizer of the quadratic form 0.5 * x G x + g0 x */ + /* this is a feasible point in the dual space */ + /* x = G^-1 * g0 */ + cholesky_solve(G, x, g0, n); + for (i = 0; i < n; i++) + x[i] = -x[i]; + /* and compute the current solution value */ + f_value = 0.5 * scalar_product(g0, x, n); +#ifdef TRACE_SOLVER + printf("Unconstrained solution: %f",f_value); + print_vector("x", x, n); +#endif + + /* Add equality constraints to the working set A */ + iq = 0; + for (i = 0; i < p; i++) { + for (j = 0; j < n; j++) + np[j] = CE[j][i]; + compute_d(d, J, np, n); + update_z(z, J, d, iq, n); + update_r(R, r, d, iq, n); +#ifdef TRACE_SOLVER + print_matrix("R", R, n, n); + print_vector("z", z, n); + print_vector("r", r, iq); + print_vector("d", d, n); +#endif + + /* compute full step length t2: i.e., the minimum step in primal space s.t. */ + /* the contraint becomes feasible */ + t2 = 0.0; + if (fabs(scalar_product(z, z, n)) > DBL_EPSILON) /* i.e. z != 0 */ + t2 = (-scalar_product(np, x, n) - ce0[i]) / scalar_product(z, np, n); + + /* set x = x + t2 * z */ + for (k = 0; k < n; k++) + x[k] += t2 * z[k]; + + /* set u = u+ */ + u[iq] = t2; + for (k = 0; k < iq; k++) + u[k] -= t2 * r[k]; + + /* compute the new solution value */ + f_value += 0.5 * (t2 * t2) * scalar_product(z, np, n); + A[i] = -i - 1; + + if (!add_constraint(R, J, d, &iq, &R_norm, n)) { + /* Equality constraints are linearly dependent */ +#ifdef TRACE_SOLVER + printf("Constraints are linearly dependent\n"); +#endif + goto done; + } + } + + /* set iai = K \ A */ + for (i = 0; i < m; i++) + iai[i] = i; + + /* Hmm. Use of crossing goto's is a little Fortran like... */ + +l1: iter++; +#ifdef TRACE_SOLVER + print_vector("x", x, n); +#endif + /* step 1: choose a violated constraint */ + for (i = p; i < iq; i++) { + ip = A[i]; + iai[ip] = -1; + } + + /* compute s[x] = ci^T * x + ci0 for all elements of K \ A */ + ss = 0.0; + psi = 0.0; /* this value will contain the sum of all infeasibilities */ + ip = 0; /* ip will be the index of the chosen violated constraint */ + for (i = 0; i < m; i++) { + iaexcl[i] = 1; + sum = 0.0; + for (j = 0; j < n; j++) + sum += CI[j][i] * x[j]; + sum += ci0[i]; + s[i] = sum; + psi += FMIN(0.0, sum); + } +#ifdef TRACE_SOLVER + print_vector("s", s, m); +#endif + + if (fabs(psi) <= m * DBL_EPSILON * c1 * c2* 100.0) { + /* numerically there are not infeasibilities anymore */ + q = iq; + + goto done; + } + + /* save old values for u and A */ + for (i = 0; i < iq; i++) { + u_old[i] = u[i]; + A_old[i] = A[i]; + } + + /* and for x */ + for (i = 0; i < n; i++) + x_old[i] = x[i]; + +l2: /* Step 2: check for feasibility and determine a new S-pair */ + for (i = 0; i < m; i++) { + if (s[i] < ss && iai[i] != -1 && iaexcl[i]) { + ss = s[i]; + ip = i; + } + } + if (ss >= 0.0) { + q = iq; + + goto done; + } + + /* set np = n[ip] */ + for (i = 0; i < n; i++) + np[i] = CI[i][ip]; + /* set u = [u 0]^T */ + u[iq] = 0.0; + /* add ip to the active set A */ + A[iq] = ip; + +#ifdef TRACE_SOLVER + printf("Trying with constraint %d\n",ip); + print_vector("np", np, n); +#endif + +l2a: + /* Step 2a: determine step direction */ + /* compute z = H np: the step direction in the primal space (through J, see the paper) */ + compute_d(d, J, np, n); + update_z(z, J, d, iq, n); + /* compute N* np (if q > 0): the negative of the step direction in the dual space */ + update_r(R, r, d, iq, n); +#ifdef TRACE_SOLVER + printf("Step direction z\n"); + print_vector("z", z, n); + print_vector("r", r, iq + 1); + print_vector("u", u, iq + 1); + print_vector("d", d, n); + print_ivector("A", A, iq + 1); +#endif + + /* Step 2b: compute step length */ + l = 0; + /* Compute t1: partial step length (maximum step in dual space */ + /* without violating dual feasibility */ + t1 = QP_INFEASIBLE; /* +inf */ + /* find the index l s.t. it reaches the minimum of u+[x] / r */ + for (k = p; k < iq; k++) { + if (r[k] > 0.0) { + if (u[k] / r[k] < t1) { + t1 = u[k] / r[k]; + l = A[k]; + } + } + } + /* Compute t2: full step length (minimum step in primal space */ + /* such that the constraint ip becomes feasible */ + if (fabs(scalar_product(z, z, n)) > DBL_EPSILON) { /* i.e. z != 0 */ + t2 = -s[ip] / scalar_product(z, np, n); + if (t2 < 0) /* patch suggested by Takano Akio for handling numerical inconsistencies */ + t2 = QP_INFEASIBLE; + } else + t2 = QP_INFEASIBLE; /* +inf */ + + /* the step is chosen as the minimum of t1 and t2 */ + t = FMIN(t1, t2); +#ifdef TRACE_SOLVER + printf("Step sizes: %f (t1 = %f, t2 = %f\n",t,t1,t2); +#endif + + /* Step 2c: determine new S-pair and take step: */ + + /* case (i): no step in primal or dual space */ + if (t >= QP_INFEASIBLE) { + /* QPP is infeasible */ + // FIXME: unbounded to raise + q = iq; + f_value = QP_INFEASIBLE; + goto done; + } + /* case (ii): step in dual space */ + if (t2 >= QP_INFEASIBLE) { + /* set u = u + t * [-r 1] and drop constraint l from the active set A */ + for (k = 0; k < iq; k++) + u[k] -= t * r[k]; + u[iq] += t; + iai[l] = l; + delete_constraint(R, J, A, u, n, p, &iq, l); +#ifdef TRACE_SOLVER + printf(" in dual space: %f\n",f_value); + print_vector("x", x, n); + print_vector("z", z, n); + print_ivector("A", A, iq + 1); +#endif + goto l2a; + } + + /* case (iii): step in primal and dual space */ + + /* set x = x + t * z */ + for (k = 0; k < n; k++) + x[k] += t * z[k]; + /* update the solution value */ + f_value += t * scalar_product(z, np, n) * (0.5 * t + u[iq]); + /* u = u + t * [-r 1] */ + for (k = 0; k < iq; k++) + u[k] -= t * r[k]; + u[iq] += t; +#ifdef TRACE_SOLVER + printf(" in both spaces: %f\n",f_value); + print_vector("x", x, n); + print_vector("u", u, iq + 1); + print_vector("r", r, iq + 1); + print_ivector("A", A, iq + 1); +#endif + + if (fabs(t - t2) < DBL_EPSILON) { +#ifdef TRACE_SOLVER + printf("Full step has taken %f\n",t); + print_vector("x", x, n); +#endif + /* full step has taken */ + /* add constraint ip to the active set*/ + if (!add_constraint(R, J, d, &iq, &R_norm, n)) { + iaexcl[ip] = 0; + delete_constraint(R, J, A, u, n, p, &iq, ip); +#ifdef TRACE_SOLVER + print_matrix("R", R, n, n); + print_ivector("A", A, iq); + print_ivector("iai", iai, iq); // ?? iq size of m+p ? +#endif + for (i = 0; i < m; i++) + iai[i] = i; + for (i = p; i < iq; i++) { + A[i] = A_old[i]; + u[i] = u_old[i]; + iai[A[i]] = -1; + } + for (i = 0; i < n; i++) + x[i] = x_old[i]; + goto l2; /* go to step 2 */ + } else + iai[ip] = -1; +#ifdef TRACE_SOLVER + print_matrix("R", R, n, n); + print_ivector("A", A, iq); + print_ivector("iai", iai, iq); // ?? iq size of m+p ? +#endif + goto l1; + } + + /* a patial step has taken */ +#ifdef TRACE_SOLVER + printf("Partial step has taken %f\n",t); + print_vector("x", x, n); +#endif + /* drop constraint l */ + iai[l] = l; + delete_constraint(R, J, A, u, n, p, &iq, l); +#ifdef TRACE_SOLVER + print_matrix("R", R, n, n); + print_ivector("A", A, iq); +#endif + + /* update s[ip] = CI * x + ci0 */ + sum = 0.0; + for (k = 0; k < n; k++) + sum += CI[k][ip] * x[k]; + s[ip] = sum + ci0[ip]; + +#ifdef TRACE_SOLVER + print_vector("s", s, m); +#endif + goto l2a; + + done:; + + /* Cleanup and return f value */ + if (n > ASZ) { + free_dmatrix(R, 0, n-1, 0, n-1); + free_dmatrix(J, 0, n-1, 0, n-1); + } + + if (n > VSZ) { + free_dvector(x_old, 0, n-1); + free_dvector(z, 0, n-1); + free_dvector(d, 0, n-1); + free_dvector(np, 0, n-1); + } + + if ((m + p) > VSZ) { + free_dvector(s, 0, m + p-1); + free_dvector(r, 0, m + p-1); + free_dvector(u, 0, m + p-1); + free_dvector(u_old, 0, m + p-1); + free_ivector(A, 0, m + p-1); + free_ivector(A_old, 0, m + p-1); + free_ivector(iai, 0, m + p-1); + free_svector(iaexcl, 0, m + p-1); + } + + return f_value; +} + +INLINE static void compute_d(double *d, double **J, double *np, int n) { + int i, j; + double sum; + + /* compute d = H^T * np */ + for (i = 0; i < n; i++) { + sum = 0.0; + for (j = 0; j < n; j++) + sum += J[j][i] * np[j]; + d[i] = sum; + } +} + +INLINE static void update_z(double *z, double **J, double *d, int iq, int n) { + int i, j; + + /* setting of z = H * d */ + for (i = 0; i < n; i++) { + z[i] = 0.0; + for (j = iq; j < n; j++) + z[i] += J[i][j] * d[j]; + } +} + +INLINE static void update_r(double **R, double *r, double *d, int iq, int n) { + int i, j; + double sum; + + /* setting of r = R^-1 d */ + for (i = iq - 1; i >= 0; i--) { + sum = 0.0; + for (j = i + 1; j < iq; j++) + sum += R[i][j] * r[j]; + r[i] = (d[i] - sum) / R[i][i]; + } +} + +static int add_constraint(double **R, double **J, double *d, int *piq, double *prnorm, int n) { + int iq = *piq; + int i, j, k; + double cc, ss, h, t1, t2, xny; + +#ifdef TRACE_SOLVER + printf("Add constraint %d",iq); +#endif + + /* we have to find the Givens rotation which will reduce the element */ + /* d[j] to zero. if it is already zero we don't have to do anything, except */ + /* of decreasing j */ + for (j = n - 1; j >= iq + 1; j--) { + /* The Givens rotation is done with the matrix (cc cs, cs -cc). */ + /* If cc is one, then element (j) of d is zero compared with element */ + /* (j - 1). Hence we don't have to do anything. */ + /* If cc is zero, then we just have to switch column (j) and column (j - 1) */ + /* of J. Since we only switch columns in J, we have to be careful how we */ + /* update d depending on the sign of gs. */ + /* Otherwise we have to apply the Givens rotation to these columns. */ + /* The i - 1 element of d has to be updated to h. */ + cc = d[j - 1]; + ss = d[j]; + h = distance(cc, ss); + if (fabs(h) < DBL_EPSILON) /* h == 0 */ + continue; + d[j] = 0.0; + ss = ss / h; + cc = cc / h; + if (cc < 0.0) { + cc = -cc; + ss = -ss; + d[j - 1] = -h; + } else + d[j - 1] = h; + xny = ss / (1.0 + cc); + for (k = 0; k < n; k++) { + t1 = J[k][j - 1]; + t2 = J[k][j]; + J[k][j - 1] = t1 * cc + t2 * ss; + J[k][j] = xny * (t1 + J[k][j - 1]) - t2; + } + } + /* update the number of constraints added*/ + *piq = ++iq; + /* To update R we have to put the iq components of the d vector into column iq - 1 of R */ + for (i = 0; i < iq; i++) + R[i][iq - 1] = d[i]; +#ifdef TRACE_SOLVER + printf("/%d\n", iq); + print_matrix("R", R, iq, iq); + print_matrix("J", J, n, n); + print_vector("d", d, iq); +#endif + + if (fabs(d[iq - 1]) <= DBL_EPSILON * *prnorm) { + /* problem degenerate */ + return 0; + } + *prnorm = (double)FMAX(*prnorm, fabs(d[iq - 1])); + + return 1; +} + +static void delete_constraint(double **R, double **J, int *A, double *u, + int n, int p, int *piq, int l) { + int iq = *piq; + int i, j, k, qq = -1; // just to prevent warnings from smart compilers + double cc, ss, h, xny, t1, t2; + +#ifdef TRACE_SOLVER + printf("Delete constraint %d %d",l,iq); +#endif + + /* Find the index qq for active constraint l to be removed */ + for (i = p; i < iq; i++) { + if (A[i] == l) { + qq = i; + break; + } + } + + /* remove the constraint from the active set and the duals */ + for (i = qq; i < iq - 1; i++) { + A[i] = A[i + 1]; + u[i] = u[i + 1]; + for (j = 0; j < n; j++) + R[j][i] = R[j][i + 1]; + } + + A[iq - 1] = A[iq]; + u[iq - 1] = u[iq]; + A[iq] = 0; + u[iq] = 0.0; + for (j = 0; j < iq; j++) + R[j][iq - 1] = 0.0; + + /* constraint has been fully removed */ + *piq = --iq; + +#ifdef TRACE_SOLVER + printf("/%d\n",iq); +#endif + + if (iq == 0) + return; + + for (j = qq; j < iq; j++) { + cc = R[j][j]; + ss = R[j + 1][j]; + h = distance(cc, ss); + if (fabs(h) < DBL_EPSILON) // h == 0 + continue; + cc = cc / h; + ss = ss / h; + R[j + 1][j] = 0.0; + if (cc < 0.0) { + R[j][j] = -h; + cc = -cc; + ss = -ss; + } else + R[j][j] = h; + + xny = ss / (1.0 + cc); + for (k = j + 1; k < iq; k++) { + t1 = R[j][k]; + t2 = R[j + 1][k]; + R[j][k] = t1 * cc + t2 * ss; + R[j + 1][k] = xny * (t1 + R[j][k]) - t2; + } + for (k = 0; k < n; k++) { + t1 = J[k][j]; + t2 = J[k][j + 1]; + J[k][j] = t1 * cc + t2 * ss; + J[k][j + 1] = xny * (J[k][j] + t1) - t2; + } + } +} + +INLINE static double distance(double a, double b) { + double a1, b1, t; + a1 = fabs(a); + b1 = fabs(b); + if (a1 > b1) { + t = (b1 / a1); + return a1 * sqrt(1.0 + t * t); + } else if (b1 > a1) { + t = (a1 / b1); + return b1 * sqrt(1.0 + t * t); + } + return a1 * sqrt(2.0); +} + + +INLINE static double scalar_product(double *x, double *y, int n) { + int i; + double sum; + + sum = 0.0; + for (i = 0; i < n; i++) + sum += x[i] * y[i]; + return sum; +} + +// !!! this doesn't work for semi-definite matricies, ie. +// they will jave diagonal sum == 0.0 !!! +static void cholesky_decomposition(double **A, int n) { + int i, j, k; + double sum; + + for (i = 0; i < n; i++) { + for (j = i; j < n; j++) { + sum = A[i][j]; + for (k = i - 1; k >= 0; k--) + sum -= A[i][k] * A[j][k]; +#ifdef TRACE_SOLVER + printf("sum[%d][%d] = %f\n",i,j,sum); +#endif + if (i == j) { + if (sum <= 0.0) + { + // raise error + print_matrix("A", A, n, n); + error("QuadProg:cholesky decomposition, matrix is not postive definite, sum: %e",sum); + } + A[i][i] = sqrt(sum); + } else + A[j][i] = sum / A[i][i]; + } + for (k = i + 1; k < n; k++) + A[i][k] = A[k][i]; + } +} + +static void cholesky_solve(double **L, double *x, double *b, int n) { + double *y, _y[VSZ]; + + if (n <= VSZ) + y = _y; + else + y = dvector(0, n-1); + + /* Solve L * y = b */ + forward_elimination(L, y, b, n); + + /* Solve L^T * x = y */ + backward_elimination(L, x, y, n); + + if (n > VSZ) + free_dvector(y, 0, n-1); +} + +INLINE static void forward_elimination(double **L, double *y, double *b, int n) { + int i, j; + + y[0] = b[0] / L[0][0]; + for (i = 1; i < n; i++) { + y[i] = b[i]; + for (j = 0; j < i; j++) + y[i] -= L[i][j] * y[j]; + y[i] = y[i] / L[i][i]; + } +} + +INLINE static void backward_elimination(double **U, double *x, double *y, int n) { + int i, j; + + x[n - 1] = y[n - 1] / U[n - 1][n - 1]; + for (i = n - 2; i >= 0; i--) { + x[i] = y[i]; + for (j = i + 1; j < n; j++) + x[i] -= U[i][j] * x[j]; + x[i] = x[i] / U[i][i]; + } +} + +/* --------------------------------------------------- */ + +static void print_matrix(char *name, double **A, int n, int m) { + int i, j; + + printf("%s: \n",name); + for (i = 0; i < n; i++) { + printf(" "); + for (j = 0; j < m; j++) + printf("%f%s", A[i][j], j < (m-1) ? ", " : ""); + printf("\n"); + } + printf("\n"); +} + +static void print_vector(char *name, double *v, int n) { + int i; + + printf("%s: \n",name); + printf(" "); + for (i = 0; i < n; i++) + printf("%f%s", v[i], i < (n-1) ? ", " : ""); + printf("\n\n"); +} + +static void print_ivector(char *name, int *v, int n) { + int i; + + printf("%s: \n",name); + printf(" "); + for (i = 0; i < n; i++) + printf("%d%s", v[i], i < (n-1) ? ", " : ""); + printf("\n\n"); +} + diff --git a/numlib/quadprog.h b/numlib/quadprog.h new file mode 100755 index 0000000..7d28ec8 --- /dev/null +++ b/numlib/quadprog.h @@ -0,0 +1,67 @@ + +#ifndef QUADPROG_H +#define QUADPROG_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* + Quadradic Programming solution. + + Based on Luca Di Gaspero's QuadProgpp++, made available under the MIT license. + + Translation to C by Graeme W. Gill, Copyright 2017, also licensed under the + MIT license. +*/ + +/* + + The quadprog_solve() function implements the algorithm of Goldfarb and Idnani + for the solution of a (convex) Quadratic Programming problem + by means of an active-set dual method. + +The problem is in the form: + +min 0.5 * x G x + g0 x +s.t. + CE^T x + ce0 = 0 + CI^T x + ci0 >= 0 + + The matrix and vectors dimensions are as follows: + G: n * n + g0: n + + CE: n * p + ce0: p + + CI: n * m + ci0: m + + x: n + + References: D. Goldfarb, A. Idnani. A numerically stable dual method for solving + strictly convex quadratic programs. Mathematical Programming 27 (1983) pp. 1-33. + +*/ + +#define QP_INFEASIBLE 1.0E300 + +double quadprog( /* Return solution cost, QP_INFEASIBLE if infeasible/error */ + double *x, /* Return x[n] value */ + double **G, /* G[n][n] Quadratic combination matrix - modified */ + double *g0, /* g0[n] Direct vector */ + double **CE, /* CE[n][p] Equality constraint matrix */ + double *ce0, /* ce0[p] Equality constraing constants */ + double **CI, /* CI[n][m] Constraint matrix */ + double *ci0, /* cie[m] Constraint constants */ + int n, /* Number of variables */ + int p, /* Number of equalities */ + int m /* Number of constraints */ +); + +#ifdef __cplusplus + } +#endif + +#endif /*define QUADPROG_H */ diff --git a/numlib/rand.c b/numlib/rand.c index 436de52..9e58de3 100644..100755 --- a/numlib/rand.c +++ b/numlib/rand.c @@ -19,84 +19,128 @@ /* (From Knuth & H.W.Lewis) */ #define PSRAND32L(S) ((S) * 1664525L + 1013904223L) +/* - - - - - - - - - - - - - - - */ +/* Global state random generator */ + +static rand_state g_rand = { 0 }; /* Use default seed for global state generator */ + /* Return a 32 bit number between 0 and 4294967295 */ /* Use Knuth shuffle to improve PSRAND32 sequence */ unsigned int rand32( /* Return 32 bit random number */ unsigned int seed /* Optional seed. Non-zero re-initialized with that seed */ ) { -#define TSIZE 2843 /* Prime */ - static unsigned int last, ran = 0x12345678; /* Default seed */ - static unsigned int pvs[TSIZE]; - static int pvs_inited = 0; - int i; - - if (seed != 0) - { - pvs_inited = 0; - ran = seed;; - } - - /* Init random storage locations */ - if (pvs_inited == 0) - { - for (i = 0; i < TSIZE; i++) - pvs[i] = ran = PSRAND32(ran); - last = ran; - pvs_inited = 1; - } - i = last % TSIZE; /* New location */ - last = pvs[i]; /* Value generated */ - pvs[i] = ran = PSRAND32(ran); /* New value */ - - return last-1; + return rand32_th(NULL, seed); } /* return a random number between 0.0 and 1.0 */ /* based on rand32 */ double ranno(void) { - return rand32(0) / 4294967295.0; + return rand32_th(NULL, 0) / 4294967295.0; } /* Return a random double in the range min to max */ double d_rand(double min, double max) { - double tt; - tt = ranno(); - return min + (max - min) * tt; + return d_rand_th(NULL, min, max); } /* Return a random integer in the range min to max inclusive */ int i_rand(int min, int max) { - double tt; - tt = ranno(); - return min + (int)floor(0.5 + ((double)(max - min)) * tt); + return i_rand_th(NULL, min, max); } - /* Return a random floating point number with a gausian/normal */ /* distribution, centered about 0.0, with standard deviation 1.0 */ /* This uses the Box-Muller transformation */ double norm_rand(void) { - static int r2 = 0; /* Can use 2nd number generated */ - static double nr2; + return norm_rand_th(NULL); +} + +/* - - - - - - - - - - - - - - - */ +/* Explicit state random generator */ + +/* Init rand_state to default */ +void rand_init(rand_state *p) { + if (p == NULL) + p = &g_rand; + p->pvs_inited = 0; + p->ran = 0; +} + +/* Return a 32 bit number between 0 and 4294967295 */ +/* Use Knuth shuffle to improve PSRAND32 sequence */ +unsigned int +rand32_th(rand_state *p, +unsigned int seed /* Optional seed. Non-zero re-initialized with that seed */ +) { + int i; + + if (p == NULL) + p = &g_rand; + + if (seed != 0) { + p->pvs_inited = 0; + p->ran = seed; + } + + /* Init random storage locations */ + if (p->pvs_inited == 0) { + if (p->ran == 0) + p->ran = RAND_SEED; + for (i = 0; i < RAND_TSIZE; i++) + p->pvs[i] = p->ran = PSRAND32(p->ran); + p->last = p->ran; + p->pvs_inited = 1; + } + i = p->last % RAND_TSIZE; /* New location */ + p->last = p->pvs[i]; /* Value generated */ + p->pvs[i] = p->ran = PSRAND32(p->ran); /* New value */ + + return p->last-1; +} + +/* return a random number between 0.0 and 1.0 */ +/* based on rand32 */ +double ranno_th(rand_state *p) { + return rand32_th(NULL, 0) / 4294967295.0; +} + +/* Return a random double in the range min to max */ +double +d_rand_th(rand_state *p, double min, double max) { + return min + (max - min) * ranno_th(p); +} + +/* Return a random integer in the range min to max inclusive */ +int +i_rand_th(rand_state *p, int min, int max) { + return min + (int)floor(0.5 + ((double)(max - min)) * ranno_th(p)); +} + +/* Return a random floating point number with a gausian/normal */ +/* distribution, centered about 0.0, with standard deviation 1.0 */ +/* This uses the Box-Muller transformation */ +double norm_rand_th(rand_state *p) { + if (p == NULL) + p = &g_rand; - if (r2 == 0) { + if (p->r2 == 0) { double v1, v2, t1, t2, r1; do { - v1 = d_rand(-1.0, 1.0); - v2 = d_rand(-1.0, 1.0); + v1 = d_rand_th(p, -1.0, 1.0); + v2 = d_rand_th(p, -1.0, 1.0); t1 = v1 * v1 + v2 * v2; } while (t1 == 0.0 || t1 >= 1.0); t2 = sqrt(-2.0 * log(t1)/t1); - nr2 = v2 * t2; /* One for next time */ - r2 = 1; + p->nr2 = v2 * t2; /* One for next time */ + p->r2 = 1; r1 = v1 * t2; return r1; } else { - r2 = 0; - return nr2; + p->r2 = 0; + return p->nr2; } } diff --git a/numlib/rand.h b/numlib/rand.h index 46f79f2..e190fcd 100644..100755 --- a/numlib/rand.h +++ b/numlib/rand.h @@ -13,6 +13,9 @@ extern "C" { #endif +/* - - - - - - - - - - - - - - - */ +/* Global state random generator */ + /* Return a random number between 0 and 4294967294 */ unsigned int rand32( /* Return 32 bit random number */ @@ -29,6 +32,43 @@ double d_rand(double min, double max); /* and an average deviation of 0.564 */ double norm_rand(void); +/* - - - - - - - - - - - - - - - */ +/* Explicit state random generator */ +/* Use NULL for global state */ + +#define RAND_TSIZE 2843 /* Prime */ +#define RAND_SEED 0x12345678 /* Default seed */ + +/* Should set to 0 to default intialize */ +typedef struct { + int pvs_inited; + unsigned int ran, last; + unsigned int pvs[RAND_TSIZE]; + + /* normal distribution 2nd value */ + int r2; /* 2nd value available */ + double nr2; /* 2nd value */ +} rand_state; + +/* Init rand_state to default */ +void rand_init(rand_state *p); + +/* Return a random number between 0 and 4294967294 */ +unsigned int +rand32_th(rand_state *p, +unsigned int seed); /* Optional seed. Non-zero re-initialized with that seed */ + +/* Return a random integer in the range min to max inclusive */ +int i_rand_th(rand_state *p, int min, int max); + +/* Return a random double in the range min to max inclusive */ +double d_rand_th(rand_state *p, double min, double max); + +/* Return a random floating point number with a gausian/normal */ +/* distribution, centered about 0.0, with standard deviation 1.0 */ +/* and an average deviation of 0.564 */ +double norm_rand_th(rand_state *p); + #ifdef __cplusplus } #endif diff --git a/numlib/sobol.c b/numlib/sobol.c index 40a2c38..40a2c38 100644..100755 --- a/numlib/sobol.c +++ b/numlib/sobol.c diff --git a/numlib/sobol.h b/numlib/sobol.h index 08ac5c0..08ac5c0 100644..100755 --- a/numlib/sobol.h +++ b/numlib/sobol.h diff --git a/numlib/soboltest.c b/numlib/soboltest.c index 32c26ee..32c26ee 100644..100755 --- a/numlib/soboltest.c +++ b/numlib/soboltest.c diff --git a/numlib/svd.c b/numlib/svd.c index fdb8edd..fdb8edd 100644..100755 --- a/numlib/svd.c +++ b/numlib/svd.c diff --git a/numlib/svd.h b/numlib/svd.h index 59b080d..6a89210 100644..100755 --- a/numlib/svd.h +++ b/numlib/svd.h @@ -13,13 +13,44 @@ extern "C" { #endif +/* + + U[] decomposes A[]'s columns into orthogonal, singular vectors. + U[]'s columns are vectors that sum to 1.0, i.e. they leave a vectors normal unchanged. + The inverse of U[] is its transpose. + U[]'s columns corresponding to non-zero W[] are the orthonormal vectors that span + the (input) RANGE space. Columns corresponding to zero W[] are zero. + + W[] will return singlular values, i.e. the weighting of the singular vectors. + It's inverse is is the reciprical of its elements. + + V[] composes the singular vectors back into A[]'s rows. + V[]'s columns and rows are orthonormal. + V[]'s columns corresponding to non-zero W[] are the orthonormal vectors that span + the (output) RANGE space. + v[]'s columns corresponding to zero W[] are the (output) othonormal vectors that span + the NULL space. + The inverse of V[] is its transpose. + + To re-form, A = U.W.Vt, i.e. multiply by transpose of V. + + i.e. mult. input vector[m] by U[] converts to [n] compact, orthogonal + basis vectors. W then scales them appropiately, setting null space + vectors to 0. V[] then transforms from the orthogonal basis vectors + to A[]'s output space. + + To reveal NULL space, make sure n >= m, since U[] vectors corrsponding + to zero's are set to zero. + +*/ + /* Compute Singular Value Decomposition of A = U.W.Vt */ /* Return status value: */ /* 0 - no error */ /* 1 - m < n error */ int svdecomp( -double **a, /* A[0..m-1][0..n-1], return U[][] */ -double *w, /* return W[0..n-1] */ +double **a, /* A[0..m-1][0..n-1], return U[0..m-1][0..n-1] */ +double *w, /* return W[0..n-1] = singular values */ double **v, /* return V[0..n-1][0..n-1] (not transpose!) */ int m, /* Number of equations */ int n /* Number of unknowns */ diff --git a/numlib/svdtest.c b/numlib/svdtest.c index 100120d..100120d 100644..100755 --- a/numlib/svdtest.c +++ b/numlib/svdtest.c diff --git a/numlib/tdhsx.c b/numlib/tdhsx.c index d1738c4..d1738c4 100644..100755 --- a/numlib/tdhsx.c +++ b/numlib/tdhsx.c diff --git a/numlib/tpowell.c b/numlib/tpowell.c index f7b0aad..f7b0aad 100644..100755 --- a/numlib/tpowell.c +++ b/numlib/tpowell.c diff --git a/numlib/ui.c b/numlib/ui.c index 390a332..390a332 100644..100755 --- a/numlib/ui.c +++ b/numlib/ui.c diff --git a/numlib/ui.h b/numlib/ui.h index a282c26..a282c26 100644..100755 --- a/numlib/ui.h +++ b/numlib/ui.h diff --git a/numlib/varmet.c b/numlib/varmet.c new file mode 100755 index 0000000..3c4b61a --- /dev/null +++ b/numlib/varmet.c @@ -0,0 +1,290 @@ + +/* Multi-dimentional minizer using Variable Metric method */ +/* This is good for smoother, well behaved functions. */ + +/* Code is an original expression of the algorithms decsribed in */ +/* "Numerical Recipes in C", by W.H.Press, B.P.Flannery, */ +/* S.A.Teukolsky & W.T.Vetterling. */ + +/* + * Copyright 2000, 2006, 2007, 2017 Graeme W. Gill + * All rights reserved. + * + * This material is licenced under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3 :- + * see the License.txt file for licencing details. + */ + +/* TTBD: + Fix error handling to return status (malloc, excessive itters) + Create to "safe" library ? + Make standalone - ie remove numsup ? + */ + +/* Note that all arrays are indexed from 0 */ + +#include "numsup.h" +#include "powell.h" +#include "varmet.h" + +#undef DEBUG /* Debug */ + +#if defined(PDEBUG) || defined(CDEBUG) +# undef DBG +# define DBG(xxx) printf xxx ; +#else +# undef DBG +# define DBG(xxx) +#endif + +#define FMAX(A,B) ((A) > (B) ? (A) : (B)) +#define EPS 1.0e-10 /* Machine precision. */ +#define TOLX (4 * EPS) /* X value stop value */ +#define MAXLEN 100.0 /* Maximum step length */ + +void linesearch(int di, double cpold[], double fpold, double g[], double p[], double cpnew[], + double *pfp, double maxstep, double (*func)(void *fdata, double tp[]), void *fdata); + +/* return 0 on sucess, 1 on failure due to excessive itterions */ +/* Result will be in cp */ +/* Note that we could use gradient in line minimiser, */ +/* but haven't bothered yet. */ +int varmet( +double *rv, /* If not NULL, return the residual error */ +int di, /* Dimentionality */ +double cp[], /* Initial starting point */ +double s[], /* Size of initial search area */ +double ftol, /* Tollerance of error change to stop on */ +int maxit, /* Maximum iterations allowed */ +double (*func)(void *fdata, double tp[]), /* Error function to evaluate */ +double (*dfunc)(void *fdata, double dp[], double tp[]), /* Gradient function to evaluate */ +void *fdata /* Opaque data needed by function */ +) { + int iter; + double fp, sumsq, maxstep; + double *sdir, sumsdir; /* Search direction */ + double *dp, *lastdp; + double **hessian; /* Hessian matrix */ + double *hlastdp; /* Hessian times lastdp */ + double *cpnew; /* new cp value from linemin */ + double test; + + double den, fac, fad, fae; + double sumdg; + int i, j; + + sdir = dvector(0, di-1); + dp = dvector(0, di-1); + lastdp = dvector(0, di-1); + hessian = dmatrix(0, di-1, 0, di-1); + hlastdp = dvector(0, di-1); + cpnew = dvector(0, di-1); + + fp = (*dfunc)(fdata, dp, cp); + + /* Initial line direction and pde squared */ + sumsq = 0.0; + for (i = 0; i < di ;i++) { + sdir[i] = -dp[i]; + sumsq += cp[i] * cp[i]; + } + + DBG((" initial fp %f dp %s\n", fp, debPdv(di, dp))); + + /* Initialize inverse Hessian to unity */ + for (i = 0; i < di ;i++) { + for (j = 0; j < di ; j++) { + if (i == j) + hessian[i][j] = 1.0; + else + hessian[i][j] = 0.0; + } + } + + /* Maximum line search step size */ + maxstep = MAXLEN * FMAX(sqrt(sumsq), (double)di); + + /* Until we give up */ + for (iter = 0; iter < maxit; iter++) { + + /* Search in direction sdir */ + linesearch(di, cp, fp, dp, sdir, cpnew, &fp, maxstep, func, fdata); + + for (i = 0; i < di; i++) { + sdir[i] = cpnew[i] - cp[i]; /* Update the line direction, */ + cp[i] = cpnew[i]; /* and the current point. */ + } + + /* Test for convergence on x */ + test = 0.0; + for (i = 0 ; i < di; i++) { + double tt = fabs(sdir[i]) / FMAX(fabs(cp[i]), 1.0); + if (tt > test) + test = tt; + } + + if (test < TOLX) { + break; + } + + for (i = 0; i < di; i++) /* Save previous partial deriv. */ + lastdp[i] = dp[i]; + + (*dfunc)(fdata, dp, cp); /* and get the new gradient. */ + + test = 0.0; /* Test for convergence on zero gradient. */ + den = FMAX(fp, 1.0); + + for (i = 0; i < di; i++) { + double tt = fabs(dp[i]) * FMAX(fabs(cp[i]),1.0) / den; + if (tt > test) + test = tt; + } + + if (test < ftol) { + break; + } + + for (i = 0 ; i < di; i++) + lastdp[i] = dp[i] - lastdp[i]; /* Compute diference of gradients, */ + + for (i = 0; i < di; i++) { /* and difernce times current matrix. */ + hlastdp[i] = 0.0; + for (j = 0; j < di; j++) + hlastdp[i] += hessian[i][j] * lastdp[j]; + } + + /* Calculate dot products for the denominator */ + fac = fae = sumdg = sumsdir = 0.0; + for (i = 0; i < di; i++) { + fac += lastdp[i] * sdir[i]; + fae += lastdp[i] * hlastdp[i]; + sumdg += lastdp[i] * lastdp[i]; + sumsdir += sdir[i] * sdir[i]; + } + if (fac > sqrt(EPS * sumdg * sumsdir)) { /* Skip update if fac not sufficiently posive */ + fac = 1.0/fac; + fad = 1.0/fae; + /* The vector that makes BFGS diferent from DFP: */ + for (i = 0; i < di;i++) + lastdp[i] = fac * sdir[i] - fad * hlastdp[i]; + for (i = 0; i < di;i++) { /* The BFGS updating formula: */ + for (j = i; j < di; j++) { + hessian[i][j] += fac * sdir[i] * sdir[j] + - fad * hlastdp[i] * hlastdp[j] + fae * lastdp[i] * lastdp[j]; + hessian[j][i] = hessian[i][j]; + } + } + } + for (i = 0; i < di; i++) { /* Now calculate the next direction to go, */ + sdir[i] = 0.0; + for (j = 0; j < di; j++) + sdir[i] -= hessian[i][j] * dp[j]; + } + } + + free_dvector(cpnew, 0, di-1); + free_dvector(hlastdp, 0, di-1); + free_dmatrix(hessian, 0, di-1, 0, di-1); + free_dvector(lastdp, 0, di-1); + free_dvector(dp, 0, di-1); + free_dvector(sdir, 0, di-1); + if (rv != NULL) + *rv = fp; + return 0; +} + +#define ALPHA 1.0e-4 /* Ensures sucesscient decrease in function value. */ +#define LTOLX 1.0e-7 /* Convergence criterion on linesearch. */ + +void linesearch( +int di, +double cpold[], +double fpold, +double dp[], /* Partial derivative */ +double sdir[], /* Current value */ +double cpnew[], +double *pfp, /* Return value */ +double maxstep, +double (*func)(void *fdata, double tp[]), +void *fdata +) { + double sum, slope; + double slen, slen_min; + double test, fval; + int i; + + for (sum = 0.0, i = 0; i < di; i++) + sum += sdir[i] * sdir[i]; + sum = sqrt(sum); + + if (sum > maxstep) { + for (i = 0; i < di; i++) + sdir[i] *= maxstep/sum; /* Scale if attempted step is too big. */ + } + for (slope = 0.0, i = 0; i < di; i++) + slope += dp[i] * sdir[i]; + + if (slope >= 0.0) + error("Roundoff problem in linesearch."); + + test = 0.0; + for (i = 0;i < di; i++) { + double tt = fabs(sdir[i])/FMAX(fabs(cpold[i]), 1.0); + if (tt > test) + test = tt; + } + + slen_min = TOLX/test; + slen = 1.0; /* Try full step */ + + /* Start of iteration loop. */ + for (;;) { + double slen_2 = slen, slen_t; + + for (i = 0; i < di;i++) + cpnew[i] = cpold[i] + slen * sdir[i]; + + *pfp = (*func)(fdata, cpnew); + + if (slen < slen_min) { + for (i = 0; i < di; i++) + cpnew[i] = cpold[i]; + return; + + } else if (*pfp <= (fpold + ALPHA * slen * slope)) + return; + + /* Backtracking */ + else { + /* First time through */ + if (slen == 1.0) + slen_t = -slope/(2.0 * (*pfp - fpold - slope)); + /* 2nd and subsequent times through */ + else { + double aa, bb; + double rhs_1, rhs_2; + + rhs_1 = *pfp - fpold - slen * slope; + rhs_2 = fval - fpold - slen_2 * slope; + aa = (rhs_1/(slen * slen) - rhs_2/(slen_2 * slen_2))/(slen - slen_2); + bb = (-slen_2 * rhs_1/(slen * slen)+slen * rhs_2/(slen_2 * slen_2))/(slen - slen_2); + if (aa == 0.0) + slen_t = -slope/(2.0 * bb); + else { + double dd = bb * bb - 3.0 * aa * slope; + if (dd < 0.0) + slen_t = 0.5 * slen; + else if (bb <= 0.0) + slen_t = (-bb + sqrt(dd))/(3.0 * aa); + else + slen_t = -slope/(bb + sqrt(dd)); + } + if (slen_t > 0.5 * slen) + slen_t = 0.5 * slen; + } + } + slen_2 = slen; + fval = *pfp; + slen = FMAX(slen_t, 0.1 * slen); + } +} diff --git a/numlib/varmet.h b/numlib/varmet.h new file mode 100755 index 0000000..5f24445 --- /dev/null +++ b/numlib/varmet.h @@ -0,0 +1,55 @@ +#ifndef VARMET_H +#define VARMET_H + +/* Variable Metric multivariate minimiser */ + +/* + * Copyright 2000, 2007 Graeme W. Gill + * All rights reserved. + * + * This material is licenced under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3 :- + * see the License.txt file for licencing details. + */ + +#ifdef __cplusplus + extern "C" { +#endif + +/* Variable Metric Gradient optimiser */ +/* return 0 on sucess, 1 on failure due to excessive itterations */ +/* Result will be in cp */ +int varmet( +double *rv, /* If not NULL, return the residual error */ +int di, /* Dimentionality */ +double cp[], /* Initial starting point */ +double s[], /* Size of initial search area */ +double ftol, /* Tollerance of error change to stop on */ +int maxit, /* Maximum iterations allowed */ +double (*func)(void *fdata, double tp[]), /* Error function to evaluate */ +double (*dfunc)(void *fdata, double dp[], double tp[]), /* Gradient function to evaluate */ +void *fdata /* Opaque data needed by function */ +); + +/* Example user function declarations */ +double varmet_funk( /* Return function value */ + void *fdata, /* Opaque data pointer */ + double tp[]); /* Multivriate input value */ + +/* Line in multi-dimensional space minimiser */ +double brentnd( /* vector multiplier return value */ +double ax, /* Minimum of multiplier range */ +double bx, /* Starting point multiplier of search */ +double cx, /* Maximum of multiplier range */ +double ftol, /* Tollerance to stop search */ +double *xmin, /* Return value of multiplier at minimum */ +int n, /* Dimensionality */ +double (*func)(void *fdata, double tp[]), /* Error function to evaluate */ +void *fdata, /* Opaque data */ +double pcom[], /* Base vector point */ +double xicom[]); /* Vector that will be multiplied and added to pcom[] */ + +#ifdef __cplusplus + } +#endif + +#endif /* VARMET_H */ diff --git a/numlib/zbrent.c b/numlib/zbrent.c index a811818..a811818 100644..100755 --- a/numlib/zbrent.c +++ b/numlib/zbrent.c diff --git a/numlib/zbrent.h b/numlib/zbrent.h index 2f8aac4..2f8aac4 100644..100755 --- a/numlib/zbrent.h +++ b/numlib/zbrent.h diff --git a/numlib/zbrenttest.c b/numlib/zbrenttest.c index d7b44d3..d7b44d3 100644..100755 --- a/numlib/zbrenttest.c +++ b/numlib/zbrenttest.c diff --git a/plot/Imakefile b/plot/Imakefile index 316b296..316b296 100644..100755 --- a/plot/Imakefile +++ b/plot/Imakefile diff --git a/plot/Jamfile b/plot/Jamfile index 5468cd6..9ced816 100644..100755 --- a/plot/Jamfile +++ b/plot/Jamfile @@ -22,9 +22,6 @@ if $(UNIX) && $(OS) != MACOSX { ObjectHdrs plot : $(LibWinH) ; } -# Individual stand alone test of plot library -MainVariant plot : plot.c : : STANDALONE_TEST : ../h ../numlib ../spectro : : ../spectro/libconv.lib ../numlib/libnum.lib ../numlib/libui.lib ; - # VRML plot library Library libvrml : vrml.c : : : ../h ../icc ../cgats ../numlib ../gamut ; @@ -38,6 +35,10 @@ if [ GLOB $(PATH) : xxd xxd.exe ] { GenFileNNDnc x3dom.js.h : xxd -i "<" [ NormPaths x3dom.js ] ">" [ NormPaths x3dom.js.h ] ; } +# Individual stand alone test of plot library +LINKFLAGS += $(GUILINKFLAGS) ; +MainVariant plot : plot.c : : STANDALONE_TEST : ../h ../numlib ../spectro : : ../spectro/libconv.lib ../numlib/libnum.lib ../numlib/libui.lib ; + #MainsFromSources ttt.c : : : ../numlib ; #Main ttt : ttt.c : : : ../numlib : : ../numlib/libnum libplot : ; diff --git a/plot/License.txt b/plot/License.txt index a871fcf..a871fcf 100644..100755 --- a/plot/License.txt +++ b/plot/License.txt diff --git a/plot/Readme.txt b/plot/Readme.txt index 6d15a37..6d15a37 100644..100755 --- a/plot/Readme.txt +++ b/plot/Readme.txt diff --git a/plot/X3DOM_LICENSE.txt b/plot/X3DOM_LICENSE.txt index d9c2faf..d9c2faf 100644..100755 --- a/plot/X3DOM_LICENSE.txt +++ b/plot/X3DOM_LICENSE.txt diff --git a/plot/afiles b/plot/afiles index 9e3f888..9e3f888 100644..100755 --- a/plot/afiles +++ b/plot/afiles diff --git a/plot/plot.c b/plot/plot.c index d7b4799..be4d1cf 100644..100755 --- a/plot/plot.c +++ b/plot/plot.c @@ -553,11 +553,13 @@ int zero /* Flag - make sure zero is in y range */ } /* Public routines */ -/* Plot up to 10 graphs + optional crosses. Wait for a key */ +/* Plot up to 10 graphs + optional crosses */ +/* if dowait > 0, wait for user key */ +/* if dowait < 0, wait for no seconds */ /* return 0 on success, -1 on error */ /* If n is -ve, reverse the X axis */ int -do_plot10p( +do_plot10pw( double *x, /* X coord */ double *y1, /* Black */ double *y2, /* Red */ @@ -571,7 +573,8 @@ double *y9, /* Grey */ double *y10,/* White */ int n, /* Number of values */ double *xp, double *yp, /* And crosses */ -int m) { +int m, +int dowait) { int i, j; double xmin, xmax, ymin, ymax; int nn = abs(n); @@ -588,8 +591,8 @@ int m) { yy[5] = y6; yy[6] = y7; yy[7] = y8; - yy[9] = y9; - yy[5] = y10; + yy[8] = y9; + yy[9] = y10; /* Determine min and max dimensions of plot */ xmin = ymin = 1e6; @@ -633,12 +636,34 @@ int m) { ymax += 0.5, ymin -= 0.5; return do_plot_imp(PLOTF_NONE, - xmin, xmax, ymin, ymax, 1.0, 1, + xmin, xmax, ymin, ymax, 1.0, dowait, x, NULL, yy, NULL, n, xp, yp, NULL, NULL, m, NULL, NULL, NULL, NULL, NULL, 0); } +/* Plot up to 10 graphs + optional crosses. Wait for a key */ +/* return 0 on success, -1 on error */ +/* If n is -ve, reverse the X axis */ +int +do_plot10p( +double *x, /* X coord */ +double *y1, /* Black */ +double *y2, /* Red */ +double *y3, /* Green */ +double *y4, /* Blue */ +double *y5, /* Yellow */ +double *y6, /* Purple */ +double *y7, /* Brown */ +double *y8, /* Orange */ +double *y9, /* Grey */ +double *y10,/* White */ +int n, /* Number of values */ +double *xp, double *yp, /* And crosses */ +int m) { + return do_plot10pw(x, y1, y2, y3, y4, y5, y6, y7, y8, y9, y10, n, xp, yp, m, 1); +} + /* Plot a bunch of vectors + optional crosses */ /* return 0 on success, -1 on error */ diff --git a/plot/plot.h b/plot/plot.h index b7d06f7..8e3db5e 100644..100755 --- a/plot/plot.h +++ b/plot/plot.h @@ -53,7 +53,7 @@ int do_plot6p(double *x, double *y1, double *y2, double *y3, double *y4, double int n, double *x7, double *y7, int m); /* Public routines */ -/* Plot up to 10 graphs */ +/* Plot up to 10 graphs. Wait for a key */ /* return 0 on success, -1 on error */ /* Graph order is Black = Y1, Red = Y2, Green = Y3, Blue = Y4, Yellow = Y5, Purple = Y6 */ /* Brown = Y7, Orange = Y8, Grey = Y9, White = Y10 */ @@ -69,6 +69,15 @@ int do_plot10p(double *x, double *y1, double *y2, double *y3, double *y4, double double *y7, double *y8, double *y9, double *y10, int n, double *xp, double *yp, int m); +/* Plot up to 10 graphs + optional crosses */ +/* if dowait > 0, wait for user key */ +/* if dowait < 0, wait for no seconds */ +/* return 0 on success, -1 on error */ +/* If n is -ve, reverse the X axis */ +int do_plot10pw(double *x, double *y1, double *y2, double *y3, double *y4, double *y5, double *y6, + double *y7, double *y8, double *y9, double *y10, + int n, double *xp, double *yp, int m, int dowait); + /* Plot a bunch of vectors + points + optional colored points & notation */ /* return 0 on success, -1 on error */ /* Vectors are x1, y1 to x2, y2 with 'X' at x2, y2, */ diff --git a/plot/vrml.c b/plot/vrml.c index d56e62d..ebe69a9 100644..100755 --- a/plot/vrml.c +++ b/plot/vrml.c @@ -70,7 +70,8 @@ static void cs2xyz(vrml *s, double *out, double *in) { } /* Add a sphere at the given location, with transparency. */ -/* if col[] is NULL, use natural color. */ +/* If col[] is NULL, use natural color. */ +/* rad is in normalized delta E scale units */ /* Need to do this before or after start_line_set()/dd_vertex()/make_lines() ! */ static void add_marker_trans(vrml *s, double pos[3], double col[3], double trans, double rad) { double rgb[3], xyz[3]; @@ -97,7 +98,7 @@ static void add_marker_trans(vrml *s, double pos[3], double col[3], double trans fprintf(s->fp," Transform { translation %f %f %f\n", xyz[0], xyz[1], xyz[2]); fprintf(s->fp," children [\n"); fprintf(s->fp," Shape{\n"); - fprintf(s->fp," geometry Sphere { radius %f }\n", s->scale * rad); + fprintf(s->fp," geometry Sphere { radius %f }\n", rad); fprintf(s->fp," appearance Appearance { material Material { \n"); if (trans > 0.0) { fprintf(s->fp," transparency %f, \n",trans); @@ -119,7 +120,7 @@ static void add_marker_trans(vrml *s, double pos[3], double col[3], double trans fprintf(s->fp," <Material diffuseColor='%f %f %f'></Material>\n", rgb[0], rgb[1], rgb[2]); } fprintf(s->fp," </Appearance>\n"); - fprintf(s->fp," <Sphere radius='%f'></Sphere>\n",s->scale * rad); + fprintf(s->fp," <Sphere radius='%f'></Sphere>\n",rad); fprintf(s->fp," </Shape>\n"); fprintf(s->fp," </Transform>\n"); } @@ -127,6 +128,7 @@ static void add_marker_trans(vrml *s, double pos[3], double col[3], double trans /* Add a sphere at the given location. */ /* if col[] is NULL, use natural color. */ +/* rad is in normalized delta E scale units */ /* Need to do this before or after start_line_set()/dd_vertex()/make_lines() ! */ /* (Hasn't been fixed to work in RGB space) */ static void add_marker(vrml *s, double pos[3], double col[3], double rad) { @@ -134,6 +136,7 @@ static void add_marker(vrml *s, double pos[3], double col[3], double rad) { } /* Add a cone marker to the plot. col == NULL for natural color */ +/* rad is in normalized delta E scale units */ /* Need to do this before or after start_line_set()/dd_vertex()/make_lines() ! */ static void add_cone(vrml *s, double pp0[3], double pp1[3], double col[3], double rad) { double rgb[3]; @@ -232,7 +235,7 @@ static void add_cone(vrml *s, double pp0[3], double pp1[3], double col[3], doubl fprintf(s->fp," translation %f %f %f\n",loc[1], loc[2], loc[0]); fprintf(s->fp," children [\n"); fprintf(s->fp," Shape { \n"); - fprintf(s->fp," geometry Cone { bottomRadius %f height %f }\n",s->scale * rad,len); + fprintf(s->fp," geometry Cone { bottomRadius %f height %f }\n",rad,len); fprintf(s->fp," appearance Appearance { material Material { diffuseColor %f %f %f } }\n",rgb[0],rgb[1],rgb[2]); fprintf(s->fp," } \n"); fprintf(s->fp," ]\n"); @@ -246,7 +249,7 @@ static void add_cone(vrml *s, double pp0[3], double pp1[3], double col[3], doubl fprintf(s->fp," <Appearance>\n"); fprintf(s->fp," <Material diffuseColor='%f %f %f'></Material>\n", rgb[0], rgb[1], rgb[2]); fprintf(s->fp," </Appearance>\n"); - fprintf(s->fp," <Cone bottomRadius='%f' height='%f'></Cone>\n",s->scale * rad, len); + fprintf(s->fp," <Cone bottomRadius='%f' height='%f'></Cone>\n",rad, len); fprintf(s->fp," </Shape>\n"); fprintf(s->fp," </Transform>\n"); } @@ -254,6 +257,7 @@ static void add_cone(vrml *s, double pp0[3], double pp1[3], double col[3], doubl } /* Add a text marker to the plot. col == NULL for natural color */ +/* size is in normalized delta E scale units */ /* (Need to do this before or after start_line_set()/dd_vertex()/make_lines() !) */ static void add_text(vrml *s, char *text, double p[3], double col[3], double size) { double rgb[3], xyz[3]; @@ -282,7 +286,7 @@ static void add_text(vrml *s, char *text, double p[3], double col[3], double siz fprintf(s->fp," Shape{\n"); fprintf(s->fp," geometry Text { string [\"%s\"]\n",text); fprintf(s->fp," fontStyle FontStyle { family \"SANS\" style \"BOLD\" size %f }\n", - s->scale * size); + size); fprintf(s->fp," }\n"); fprintf(s->fp," appearance Appearance { material Material "); fprintf(s->fp,"{ diffuseColor %f %f %f } }\n", rgb[0], rgb[1], rgb[2]); @@ -298,7 +302,7 @@ static void add_text(vrml *s, char *text, double p[3], double col[3], double siz fprintf(s->fp," <Material diffuseColor='%f %f %f'></Material>\n", rgb[0], rgb[1], rgb[2]); fprintf(s->fp," </Appearance>\n"); fprintf(s->fp," <Text string='\"%s\"'>\n",text); - fprintf(s->fp," <FontStyle family='\"SANS\"' style='BOLD' size='%f'></FontStyle>\n", s->scale * size); + fprintf(s->fp," <FontStyle family='\"SANS\"' style='BOLD' size='%f'></FontStyle>\n", size); fprintf(s->fp," </Text>\n"); fprintf(s->fp," </Shape>\n"); fprintf(s->fp," </Transform>\n"); @@ -1432,7 +1436,6 @@ double vdist s->off = 50.0; /* z axis offset */ } - /* Create filename with the right exension */ { char *xl = NULL; diff --git a/plot/vrml.h b/plot/vrml.h index d3c86c3..287c7e5 100644..100755 --- a/plot/vrml.h +++ b/plot/vrml.h @@ -103,17 +103,21 @@ struct _vrml { /* Add a spherical marker point to the plot. col == NULL for natural color */ + /* rad is in normalized delta E scale units */ /* (Need to do this before or after start_line_set()/dd_vertex()/make_lines() !) */ void (*add_marker)(struct _vrml *s, double pos[3], double col[3], double rad); /* Add a spherical marker with transparency */ + /* rad is in normalized delta E scale units */ void (*add_marker_trans)(struct _vrml *s, double pos[3], double col[3], double trans, double rad); /* Add a cone marker to the plot. col == NULL for natural color */ + /* rad is in normalized delta E scale units */ /* (Need to do this before or after start_line_set()/dd_vertex()/make_lines() !) */ void (*add_cone)(struct _vrml *s, double p0[3], double p1[3], double col[3], double rad); /* Add a text marker to the plot. col == NULL for natural color */ + /* size is in normalized delta E scale units */ /* (Need to do this before or after start_line_set()/dd_vertex()/make_lines() !) */ void (*add_text)(struct _vrml *s, char *text, double p[3], double col[3], double size); diff --git a/plot/x3dom.css b/plot/x3dom.css index c92109d..c92109d 100644..100755 --- a/plot/x3dom.css +++ b/plot/x3dom.css diff --git a/plot/x3dom.css.h b/plot/x3dom.css.h index d10fb9b..d10fb9b 100644..100755 --- a/plot/x3dom.css.h +++ b/plot/x3dom.css.h diff --git a/plot/x3dom.js b/plot/x3dom.js index 5744b3c..5744b3c 100644..100755 --- a/plot/x3dom.js +++ b/plot/x3dom.js diff --git a/plot/x3dom.js.h b/plot/x3dom.js.h index 11ea311..11ea311 100644..100755 --- a/plot/x3dom.js.h +++ b/plot/x3dom.js.h diff --git a/profile/Jamfile b/profile/Jamfile index 0c857a8..988e556 100644 --- a/profile/Jamfile +++ b/profile/Jamfile @@ -30,6 +30,8 @@ Library libprof : profin.c profout.c ; LINKLIBS = ../rspl/librspl ../icc/libicc ../cgats/libcgats ../numlib/libnum ../plot/libplot ../plot/libvrml ../numlib/libui ; +LINKFLAGS += $(GUILINKFLAGS) ; + # Simple profile generator Main simpprof : simpprof.c ; diff --git a/profile/applycal.c b/profile/applycal.c index ff9a76d..991ce72 100644..100755 --- a/profile/applycal.c +++ b/profile/applycal.c @@ -524,10 +524,7 @@ main(int argc, char *argv[]) { double val; val = i/(ro->size-1.0); //printf("~1 Input val %f", val); - if (inp) - val = cal->interp_ch(cal, j, val); /* Input calibration */ - else - val = cal->inv_interp_ch(cal, j, val); /* Inverse output calibration */ + val = cal->inv_interp_ch(cal, j, val); /* Inverse output calibration */ //printf(", after inv curve %f", val); wo->lookup_fwd(wo, &val, &val); /* Original curve */ //printf(", after orig %f\n", val); diff --git a/profile/cb2ti3.c b/profile/cb2ti3.c index 4fc7866..4fc7866 100644..100755 --- a/profile/cb2ti3.c +++ b/profile/cb2ti3.c diff --git a/profile/colprof.c b/profile/colprof.c index b359ebb..eb3417f 100644..100755 --- a/profile/colprof.c +++ b/profile/colprof.c @@ -25,6 +25,10 @@ /* * TTBD: + * + * Should add -ua option, to restore option to force input profile to be + * absolute intent for all ICC intents. + * * Should allow ICC Device attributes to be set. * * Add Argyll private tag to record ink limit etc. to automate link parameters. @@ -121,6 +125,7 @@ void usage(char *diag, ...) { // fprintf(stderr," -I ver Set ICC profile version > 2.2.0\n"); // fprintf(stderr," ver = 4, Enable ICC V4 creation\n"); fprintf(stderr," -u If input profile, auto scale WP to allow extrapolation\n"); + fprintf(stderr," -ua If input profile, force absolute intent\n"); fprintf(stderr," -uc If input profile, clip cLUT values above WP\n"); fprintf(stderr," -U scale If input profile, scale media white point by scale\n"); fprintf(stderr," -R Restrict white <= 1.0, black and primaries to be +ve\n"); @@ -131,7 +136,7 @@ void usage(char *diag, ...) { fprintf(stderr," -i illum Choose illuminant for computation of CIE XYZ from spectral data & FWA:\n"); fprintf(stderr," A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp\n"); fprintf(stderr," -o observ Choose CIE Observer for spectral data:\n"); - fprintf(stderr," 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2\n"); + fprintf(stderr," 1931_2 (def), 1964_10, 2012_2, 2012_10, S&B 1955_2, shaw, J&V 1978_2, or file.cmf\n"); fprintf(stderr," -r avgdev Average deviation of device+instrument readings as a percentage (default %4.2f%%)\n",DEFAVGDEV); /* Research options: */ /* fprintf(stderr," -r sSMOOTH RSPL or shaper suplimental optimised smoothing factor\n"); */ @@ -187,7 +192,8 @@ int main(int argc, char *argv[]) { int noptop = 0; /* Use colormetric source gamut to make perceptual table */ int nostos = 0; /* Use colormetric source gamut to make saturation table */ int gamdiag = 0; /* Make gamut mapping diagnostic wrl plots */ - int autowpsc = 0; /* Auto scale the WP to prevent clipping above WP patch */ + int autowpsc = 0; /* 1 = Auto scale the WP to prevent clipping above WP patch */ + /* 2 = Force absolute colorimetric */ int clipovwp = 0; /* Clip cLUT values above WP */ int clipprims = 0; /* Clip white, black and primaries */ // double bpo[3] = { -1,-1,-1 }; /* Black point override hack XYZ value */ @@ -209,7 +215,8 @@ int main(int argc, char *argv[]) { /* xspect will use illum/cust_illum if tillum == none */ icxIllumeType illum = icxIT_none; /* Spectral illuminant (defaults to D50) */ xspect cust_illum; /* Custom illumination spectrum */ - icxObserverType observ = icxOT_none; /* Observer (defaults to 1931 2 degree) */ + icxObserverType obType = icxOT_none; /* Observer (defaults to 1931 2 degree) */ + xspect custObserver[3]; /* If obType = icxOT_custom */ int gcompr = 0, gexpr = 0; /* Gamut compression/expansion % instead of Input icc profile */ char ipname[MAXNAMEL+1] = ""; /* Input icc profile - enables gamut map */ char sgname[MAXNAMEL+1] = ""; /* Image source gamut name */ @@ -251,6 +258,9 @@ int main(int argc, char *argv[]) { ivc_p.Yf = -1.0; ivc_p.Yg = -1.0; ivc_p.Gxyz[0] = -1.0; ivc_p.Gxyz[1] = -1.0; ivc_p.Gxyz[2] = -1.0; + ivc_p.hkscale = -1.0; + ivc_p.mtaf = -1.0; + ivc_p.Wxyz2[0] = -1.0; ivc_p.Wxyz2[1] = -1.0; ivc_p.Wxyz2[2] = -1.0; ovc_p.Ev = -1; ovc_p.Wxyz[0] = -1.0; ovc_p.Wxyz[1] = -1.0; ovc_p.Wxyz[2] = -1.0; @@ -260,6 +270,9 @@ int main(int argc, char *argv[]) { ovc_p.Yf = -1.0; ovc_p.Yg = -1.0; ovc_p.Gxyz[0] = -1.0; ovc_p.Gxyz[1] = -1.0; ovc_p.Gxyz[2] = -1.0; + ovc_p.hkscale = -1.0; + ovc_p.mtaf = -1.0; + ovc_p.Wxyz2[0] = -1.0; ovc_p.Wxyz2[1] = -1.0; ovc_p.Wxyz2[2] = -1.0; xicc_enum_gmapintent(&pgmi, icxPerceptualGMIntent, NULL); xicc_enum_gmapintent(&sgmi, icxSaturationGMIntent, NULL); @@ -462,7 +475,10 @@ int main(int argc, char *argv[]) { else if (argv[fa][1] == 'u') { autowpsc = 1; clipovwp = 0; - if (argv[fa][2] == 'c') { + if (argv[fa][2] == 'a') { + autowpsc = 2; + clipovwp = 0; + } else if (argv[fa][2] == 'c') { autowpsc = 0; clipovwp = 1; } else if (argv[fa][2] != '\000') { @@ -713,24 +729,32 @@ int main(int argc, char *argv[]) { fa = nfa; if (strcmp(na, "1931_2") == 0) { /* Classic 2 degree */ spec = 1; - observ = icxOT_CIE_1931_2; + obType = icxOT_CIE_1931_2; } else if (strcmp(na, "1964_10") == 0) { /* Classic 10 degree */ spec = 1; - observ = icxOT_CIE_1964_10; + obType = icxOT_CIE_1964_10; + } else if (strcmp(na, "2012_2") == 0) { /* Latest 2 degree */ + spec = 1; + obType = icxOT_CIE_2012_2; + } else if (strcmp(na, "2012_10") == 0) { /* Latest 10 degree */ + spec = 1; + obType = icxOT_CIE_2012_10; } else if (strcmp(na, "1955_2") == 0) { /* Stiles and Burch 1955 2 degree */ spec = 1; - observ = icxOT_Stiles_Burch_2; + obType = icxOT_Stiles_Burch_2; } else if (strcmp(na, "1978_2") == 0) { /* Judd and Voss 1978 2 degree */ spec = 1; - observ = icxOT_Judd_Voss_2; + obType = icxOT_Judd_Voss_2; } else if (strcmp(na, "shaw") == 0) { /* Shaw and Fairchilds 1997 2 degree */ spec = 1; - observ = icxOT_Shaw_Fairchild_2; - } else - usage("Unrecognised argument '%s' to observer flag -o",na); + obType = icxOT_Shaw_Fairchild_2; + } else { /* Assume it's a filename */ + obType = icxOT_custom; + if (read_cmf(custObserver, na) != 0) + usage(0,"Failed to read custom observer CMF from -o file '%s'",na); + } } - /* Average Deviation percentage */ else if (argv[fa][1] == 'r') { if (na == NULL) usage("Expected argument to average deviation flag -r"); @@ -915,6 +939,22 @@ int main(int argc, char *argv[]) { vc->Yg = x/100.0; } else usage("Viewing condition (-%cg) unrecognised flare '%s'",argv[fa][1],na+1); + + } else if (na[0] == 'h' || na[0] == 'H') { + if (na[1] != ':') + usage("Viewing conditions (-%ch) missing ':'",argv[fa][1]); + vc->hkscale = atof(na+2); + } else if (na[0] == 'm' || na[0] == 'M') { + double x, y, z; + if (sscanf(na+1,":%lf:%lf:%lf",&x,&y,&z) == 3) { + vc->Wxyz2[0] = x; vc->Wxyz2[1] = y; vc->Wxyz2[2] = z; + } else if (sscanf(na+1,":%lf:%lf",&x,&y) == 2) { + vc->Wxyz2[0] = x; vc->Wxyz2[1] = y; vc->Wxyz2[2] = -1; + } else if (sscanf(na+1,":%lf",&x) == 1) { + vc->mtaf = x; + } else + usage("Viewing condition (-%cm) unrecognised flare '%s'",argv[fa][1],na+1); + } else usage("Viewing condition (-%c) unrecognised sub flag '%c'",argv[fa][1],na[0]); } @@ -1018,8 +1058,8 @@ int main(int argc, char *argv[]) { if (illum == icxIT_none) illum = icxIT_D50; - if (observ == icxOT_none) - observ = icxOT_CIE_1931_2; + if (obType == icxOT_none) + obType = icxOT_CIE_1931_2; /* See if CIE is actually available - some sources of .TI3 don't provide it */ if (!spec @@ -1034,7 +1074,7 @@ int main(int argc, char *argv[]) { printf("No CIE data found, switching to spectral with standard observer & D50\n"); spec = 1; illum = icxIT_D50; - observ = icxOT_CIE_1931_2; + obType = icxOT_CIE_1931_2; } /* If we requested spectral, check that it is available */ @@ -1164,8 +1204,10 @@ int main(int argc, char *argv[]) { error ("Output profile can only be a cLUT algorithm"); } - if (autowpsc) + if (autowpsc == 1) error ("Input auto WP scale mode isn't applicable to an output device"); + if (autowpsc == 2) + error ("Force absolute colorimetric isn't applicable to an output device"); if (clipovwp) error ("Input cLUT clipping above WP mode isn't applicable to an output device"); @@ -1174,8 +1216,8 @@ int main(int argc, char *argv[]) { gamdiag, verify, clipprims, iwpscale, // NULL, /* bpo */ &ink, inname, outname, icg, - spec, tillum, &cust_tillum, illum, &cust_illum, observ, fwacomp, - smooth, avgdev, 1.0, + spec, tillum, &cust_tillum, illum, &cust_illum, obType, custObserver, + fwacomp, smooth, avgdev, 1.0, gcompr, gexpr, ipname[0] != '\000' ? ipname : NULL, sgname[0] != '\000' ? sgname : NULL, @@ -1200,7 +1242,7 @@ int main(int argc, char *argv[]) { make_input_icc(ptype, iccver, verb, iquality, oquality, noisluts, noipluts, nooluts, nocied, verify, autowpsc, clipovwp, iwpscale, doinb2a, doinextrap, clipprims, - inname, outname, icg, emis, spec, illum, &cust_illum, observ, + inname, outname, icg, emis, spec, illum, &cust_illum, obType, custObserver, smooth, avgdev, &xpi); /* Display or Projector */ @@ -1223,8 +1265,8 @@ int main(int argc, char *argv[]) { gamdiag, verify, clipprims, iwpscale, // bpo[1] >= 0.0 ? bpo : NULL, NULL, inname, outname, icg, - spec, icxIT_none, NULL, illum, &cust_illum, observ, 0, - smooth, avgdev, demph, + spec, icxIT_none, NULL, illum, &cust_illum, obType, custObserver, + 0, smooth, avgdev, demph, gcompr, gexpr, ipname[0] != '\000' ? ipname : NULL, sgname[0] != '\000' ? sgname : NULL, diff --git a/profile/colverify.c b/profile/colverify.c index 86d5575..d7100a3 100644..100755 --- a/profile/colverify.c +++ b/profile/colverify.c @@ -81,8 +81,8 @@ usage(void) { fprintf(stderr," -i illum Choose illuminant for computation of CIE XYZ from spectral data & FWA:\n"); fprintf(stderr," A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp\n"); fprintf(stderr," -o observ Choose CIE Observer for spectral data:\n"); - fprintf(stderr," 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2\n"); - fprintf(stderr," -L profile.%s Skip any first file out of profile gamut patches\n",ICC_FILE_EXT_ND); + fprintf(stderr," 1931_2 (def), 1964_10, 2012_2, 2012_10, S&B 1955_2, shaw, J&V 1978_2 or file.cmf\n"); + fprintf(stderr," -L profile.%s Skip any first file, out of profile gamut patches\n",ICC_FILE_EXT_ND); fprintf(stderr," -X file.ccmx Apply Colorimeter Correction Matrix to second file\n"); // fprintf(stderr," -Z A|X Just print Average|Max +tab\n"); fprintf(stderr," target.ti3 Target (reference) PCS or spectral values.\n"); @@ -156,7 +156,8 @@ int main(int argc, char *argv[]) xspect cust_tillum, *tillump = NULL; /* Custom target/simulated illumination spectrum */ icxIllumeType illum = icxIT_none; /* Spectral defaults to D50 */ xspect cust_illum; /* Custom illumination spectrum */ - icxObserverType observ = icxOT_none; /* Defaults to 1931 2 degree */ + icxObserverType obType = icxOT_none; /* Defaults to 1931 2 degree */ + xspect custObserver[3]; /* If obType = icxOT_custom */ icmXYZNumber labw = icmD50; /* The Lab white reference */ @@ -375,21 +376,30 @@ int main(int argc, char *argv[]) fa = nfa; if (strcmp(na, "1931_2") == 0) { /* Classic 2 degree */ spec = 1; - observ = icxOT_CIE_1931_2; + obType = icxOT_CIE_1931_2; } else if (strcmp(na, "1964_10") == 0) { /* Classic 10 degree */ spec = 1; - observ = icxOT_CIE_1964_10; + obType = icxOT_CIE_1964_10; + } else if (strcmp(na, "2012_2") == 0) { /* Latest 2 degree */ + spec = 1; + obType = icxOT_CIE_2012_2; + } else if (strcmp(na, "2012_10") == 0) { /* Latest 10 degree */ + spec = 1; + obType = icxOT_CIE_2012_10; } else if (strcmp(na, "1955_2") == 0) { /* Stiles and Burch 1955 2 degree */ spec = 1; - observ = icxOT_Stiles_Burch_2; + obType = icxOT_Stiles_Burch_2; } else if (strcmp(na, "1978_2") == 0) { /* Judd and Voss 1978 2 degree */ spec = 1; - observ = icxOT_Judd_Voss_2; + obType = icxOT_Judd_Voss_2; } else if (strcmp(na, "shaw") == 0) { /* Shaw and Fairchilds 1997 2 degree */ spec = 1; - observ = icxOT_Shaw_Fairchild_2; - } else - usage(); + obType = icxOT_Shaw_Fairchild_2; + } else { /* Assume it's a filename */ + obType = icxOT_custom; + if (read_cmf(custObserver, na) != 0) + usage(); + } } /* Gamut limit profile for first file */ @@ -697,7 +707,7 @@ int main(int argc, char *argv[]) icxIllumeType l_tillum = tillum; xspect *l_tillump = tillump; icxIllumeType l_illum = illum; - icxObserverType l_observ = observ; + icxObserverType l_observ = obType; if ((ii = cgf->find_kword(cgf, 0, "SPECTRAL_BANDS")) < 0) error ("Input file doesn't contain keyword SPECTRAL_BANDS"); @@ -750,7 +760,7 @@ int main(int argc, char *argv[]) l_observ = icxOT_CIE_1931_2; if ((sp2cie = new_xsp2cie(l_illum, l_illum == icxIT_none ? NULL : &cust_illum, - l_observ, NULL, icSigXYZData, icxClamp)) == NULL) + l_observ, custObserver, icSigXYZData, icxClamp)) == NULL) error("Creation of spectral conversion object failed"); if (l_fwacomp) { @@ -939,8 +949,8 @@ int main(int argc, char *argv[]) /* Use location to match */ if (useloc) { for (i = 0; i < cg[0].npat; i++) { - if (cg[0].pat[0].loc == '\000' - || cg[1].pat[0].loc == '\000') + if (cg[0].pat[0].loc[0] == '\000' + || cg[1].pat[0].loc[0] == '\000') error("Need both files to have SAMPLE_LOC field to match on location"); for (j = 0; j < cg[1].npat; j++) { diff --git a/profile/invprofcheck.c b/profile/invprofcheck.c index 0d6176c..0d6176c 100644..100755 --- a/profile/invprofcheck.c +++ b/profile/invprofcheck.c diff --git a/profile/kodak2ti3.c b/profile/kodak2ti3.c index b510719..b510719 100644..100755 --- a/profile/kodak2ti3.c +++ b/profile/kodak2ti3.c diff --git a/profile/ls2ti3.c b/profile/ls2ti3.c index 3330e16..3330e16 100644..100755 --- a/profile/ls2ti3.c +++ b/profile/ls2ti3.c diff --git a/profile/mppcheck.c b/profile/mppcheck.c index 6615a84..6615a84 100644..100755 --- a/profile/mppcheck.c +++ b/profile/mppcheck.c diff --git a/profile/mppprof.c b/profile/mppprof.c index 41fe2fc..41fe2fc 100644..100755 --- a/profile/mppprof.c +++ b/profile/mppprof.c diff --git a/profile/printcal.c b/profile/printcal.c index 9bbcb41..9bbcb41 100644..100755 --- a/profile/printcal.c +++ b/profile/printcal.c diff --git a/profile/prof.h b/profile/prof.h index 486c5b8..eae8c9a 100644..100755 --- a/profile/prof.h +++ b/profile/prof.h @@ -62,7 +62,8 @@ void make_output_icc( icxIllumeType illum, /* CIE calc. illuminant spectrum, and FWA inst. */ /* illuminant if tillum not set. */ xspect *cust_illum, /* Custom CIE illumination spectrum if illum == icxIT_custom */ - icxObserverType observ, /* CIE calc. observer */ + icxObserverType obType, /* CIE calc. observer */ + xspect custObserver[3], /* If obType = icxOT_custom */ int fwacomp, /* FWA compensation requested */ double smooth, /* RSPL smoothing factor, -ve if raw */ double avgdev, /* reading Average Deviation as a proportion of the input range */ @@ -108,7 +109,8 @@ void make_input_icc( int spec, /* Use spectral data flag */ icxIllumeType illum, /* Spectral illuminant */ xspect *cust_illum, /* Possible custom illumination */ - icxObserverType observ, /* Spectral observer */ + icxObserverType obType, /* Spectral observer */ + xspect custObserver[3], /* If obType = icxOT_custom */ double smooth, /* RSPL smoothing factor, -ve if raw */ double avgdev, /* reading Average Deviation as a proportion of the input range */ profxinf *xpi /* Optional Profile creation extra data */ diff --git a/profile/profcheck.c b/profile/profcheck.c index c5703da..62d39bd 100644..100755 --- a/profile/profcheck.c +++ b/profile/profcheck.c @@ -71,7 +71,7 @@ usage(void) { fprintf(stderr," -i illum Choose illuminant for computation of CIE XYZ from spectral data & FWA:\n"); fprintf(stderr," A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp\n"); fprintf(stderr," -o observ Choose CIE Observer for spectral data:\n"); - fprintf(stderr," 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2\n"); + fprintf(stderr," 1931_2 (def), 1964_10, 2012_2, 2012_10, S&B 1955_2, shaw, J&V 1978_2 or file.cmf\n"); fprintf(stderr," -I intent r = relative colorimetric, a = absolute (default)\n"); fprintf(stderr," data.ti3 Test data file\n"); fprintf(stderr," iccprofile.icm Profile to check against\n"); @@ -130,7 +130,8 @@ int main(int argc, char *argv[]) xspect cust_tillum, *tillump = NULL; /* Custom target/simulated illumination spectrum */ icxIllumeType illum = icxIT_none; /* Spectral defaults */ xspect cust_illum; /* Custom illumination spectrum */ - icxObserverType observ = icxOT_none; + icxObserverType obType = icxOT_none; + xspect custObserver[3]; /* If obType = icxOT_custom */ int sortbyde = 0; /* Sort by delta E */ @@ -363,21 +364,30 @@ int main(int argc, char *argv[]) fa = nfa; if (strcmp(na, "1931_2") == 0) { /* Classic 2 degree */ spec = 1; - observ = icxOT_CIE_1931_2; + obType = icxOT_CIE_1931_2; } else if (strcmp(na, "1964_10") == 0) { /* Classic 10 degree */ spec = 1; - observ = icxOT_CIE_1964_10; + obType = icxOT_CIE_1964_10; + } else if (strcmp(na, "2012_2") == 0) { /* Latest 2 degree */ + spec = 1; + obType = icxOT_CIE_2012_2; + } else if (strcmp(na, "2012_10") == 0) { /* Latest 10 degree */ + spec = 1; + obType = icxOT_CIE_2012_10; } else if (strcmp(na, "1955_2") == 0) { /* Stiles and Burch 1955 2 degree */ spec = 1; - observ = icxOT_Stiles_Burch_2; + obType = icxOT_Stiles_Burch_2; } else if (strcmp(na, "1978_2") == 0) { /* Judd and Voss 1978 2 degree */ spec = 1; - observ = icxOT_Judd_Voss_2; + obType = icxOT_Judd_Voss_2; } else if (strcmp(na, "shaw") == 0) { /* Shaw and Fairchilds 1997 2 degree */ spec = 1; - observ = icxOT_Shaw_Fairchild_2; - } else - usage(); + obType = icxOT_Shaw_Fairchild_2; + } else { /* Assume it's a filename */ + obType = icxOT_custom; + if (read_cmf(custObserver, na) != 0) + usage(); + } } /* Intent (only applies to ICC profile) */ @@ -466,8 +476,8 @@ int main(int argc, char *argv[]) if (illum == icxIT_none) illum = icxIT_D50; - if (observ == icxOT_none) - observ = icxOT_CIE_1931_2; + if (obType == icxOT_none) + obType = icxOT_CIE_1931_2; /* See if CIE is actually available - some sources of .TI3 don't provide it */ if (!spec @@ -482,7 +492,7 @@ int main(int argc, char *argv[]) printf("No CIE data found, switching to spectral with standard observer & D50\n"); spec = 1; illum = icxIT_D50; - observ = icxOT_CIE_1931_2; + obType = icxOT_CIE_1931_2; } /* Figure out what sort of device colorspace it is */ @@ -772,7 +782,7 @@ int main(int argc, char *argv[]) /* Create a spectral conversion object */ if ((sp2cie = new_xsp2cie(illum, illum == icxIT_none ? NULL : &cust_illum, - observ, NULL, icSigLabData, icxClamp)) == NULL) + obType, custObserver, icSigLabData, icxClamp)) == NULL) error("Creation of spectral conversion object failed"); if (fwacomp) { diff --git a/profile/profin.c b/profile/profin.c index 9287cf9..92317bb 100644..100755 --- a/profile/profin.c +++ b/profile/profin.c @@ -261,7 +261,8 @@ make_input_icc( int nooluts, /* nz to supress creation of output (PCS) shaper luts */ int nocied, /* nz to supress inclusion of .ti3 data in profile */ int verify, - int autowpsc, /* nz for Auto scale the WP to prevent clipping above WP patch */ + int autowpsc, /* 1 for Auto scale the WP to prevent clipping above WP patch */ + /* 2 = Force absolute colorimetric */ int clipovwp, /* nz for Clip cLUT values above WP */ double wpscale, /* >= 0.0 for media white point scale factor */ int dob2a, /* nz to create a B2A table as well */ @@ -274,7 +275,8 @@ make_input_icc( int spec, /* Use spectral data flag */ icxIllumeType illum, /* Spectral illuminant */ xspect *cust_illum, /* Possible custom illumination */ - icxObserverType observ, /* Spectral observer */ + icxObserverType obType, /* Spectral observer */ + xspect custObserver[3], /* If obType = icxOT_custom */ double smooth, /* RSPL smoothing factor, -ve if raw */ double avgdev, /* reading Average Deviation as a proportion of the input range */ profxinf *xpi /* Optional Profile creation extra data */ @@ -784,7 +786,7 @@ make_input_icc( illum = icxIT_none; cust_illum = NULL; } - if ((sp2cie = new_xsp2cie(illum, cust_illum, observ, NULL, + if ((sp2cie = new_xsp2cie(illum, cust_illum, obType, custObserver, wantLab ? icSigLabData : icSigXYZData, icxClamp)) == NULL) error("Creation of spectral conversion object failed"); @@ -835,8 +837,10 @@ make_input_icc( flags |= ICX_SET_WHITE; /* Compute & use white */ /* ICX_SET_WHITE_C isn't applicable to matrix profiles */ - if (autowpsc) + if (autowpsc == 1) flags |= ICX_SET_WHITE_US; /* Compute & use white without scaling to L */ + else if (autowpsc == 2) + flags |= ICX_SET_WHITE_ABS; /* Set dummy D50 white point to force absolute intent */ flags |= ICX_WRITE_WBL; /* Matrix: write white/black/luminence */ @@ -1117,8 +1121,10 @@ make_input_icc( flags |= ICX_SET_WHITE; /* Compute & use white */ if (clipovwp) flags |= ICX_SET_WHITE_C; /* Compute & use white and clip cLUT over D50 */ - else if (autowpsc) + else if (autowpsc == 1) flags |= ICX_SET_WHITE_US; /* Compute & use white without scaling to L */ + else if (autowpsc == 2) + flags |= ICX_SET_WHITE_ABS; /* Set dummy D50 white point to force absolute intent */ /* Setup RGB -> Lab conversion object from scattered data. */ /* Note that we've layered it on a native XYZ icc profile. */ diff --git a/profile/profout.c b/profile/profout.c index f12589b..47726f1 100644..100755 --- a/profile/profout.c +++ b/profile/profout.c @@ -684,7 +684,8 @@ make_output_icc( icxIllumeType illum, /* CIE calc. illuminant spectrum, and FWA inst. */ /* illuminant if tillum not set. */ xspect *cust_illum, /* Custom CIE illumination spectrum if illum == icxIT_custom */ - icxObserverType observ, /* CIE calc. observer */ + icxObserverType obType, /* CIE calc. observer */ + xspect custObserver[3], /* If obType = icxOT_custom */ int fwacomp, /* FWA compensation requested */ double smooth, /* RSPL smoothing factor, -ve if raw */ double avgdev, /* reading Average Deviation as a proportion of the input range */ @@ -1711,7 +1712,6 @@ make_output_icc( if (isdisp) { if (isLab) { icmLab2XYZ(&icmD50, tpat[i].v, tpat[i].v); - isLab = 0; } else if (isdnormed) { tpat[i].v[0] /= 100.0; /* Normalise XYZ to range 0.0 - 1.0 */ tpat[i].v[1] /= 100.0; @@ -1737,6 +1737,8 @@ make_output_icc( } } } + if (isdisp) /* Converted to XYZ for display */ + isLab = 0; } else { /* Using spectral data */ int ii; @@ -1790,13 +1792,13 @@ make_output_icc( if (!isdisp && illum != icxIT_D50) { ill_wp = _ill_wp; - /* Compute XYZ of illuminant */ - if (icx_ill_sp2XYZ(ill_wp, observ, NULL, illum, 0.0, cust_illum) != 0) + /* Compute normalised XYZ of illuminant */ + if (icx_ill_sp2XYZ(ill_wp, obType, custObserver, illum, 0.0, cust_illum, 0) != 0) error("icx_ill_sp2XYZ returned error"); } /* Create a spectral conversion object */ - if ((sp2cie = new_xsp2cie(illum, cust_illum, observ, NULL, + if ((sp2cie = new_xsp2cie(illum, cust_illum, obType, custObserver, wantLab ? icSigLabData : icSigXYZData, icxClamp)) == NULL) error("Creation of spectral conversion object failed"); @@ -2019,7 +2021,7 @@ make_output_icc( #ifdef IGNORE_DISP_ZEROS /* If a display has a very good black, and the instrument is not sensitive */ - /* enough to properly measur the near black values and returns 0.0, */ + /* enough to properly measure the near black values and returns 0.0, */ /* then the resulting profile will tend to incorrectly boost the */ /* dark shadows. A heuristic to counteract this problem is to */ /* ignore any readings that have any value <= 0.0 except */ @@ -2204,7 +2206,7 @@ make_output_icc( if (v->Yg >= 0.0) vc->Yg = v->Yg; if (v->Gxyz[0] >= 0.0 && v->Gxyz[1] > 0.0 && v->Gxyz[2] >= 0.0) { - /* Normalise XYZ to current media white */ + /* Normalise XYZ */ vc->Gxyz[0] = v->Gxyz[0]/v->Gxyz[1] * vc->Gxyz[1]; vc->Gxyz[2] = v->Gxyz[2]/v->Gxyz[1] * vc->Gxyz[1]; } @@ -2218,6 +2220,21 @@ make_output_icc( } if (v->hkscale >= 0.0) vc->hkscale = v->hkscale; + if (v->mtaf >= 0.0) + vc->mtaf = v->mtaf; + if (v->Wxyz2[0] >= 0.0 && v->Wxyz2[1] > 0.0 && v->Wxyz2[2] >= 0.0) { + /* Normalise XYZ */ + vc->Wxyz2[0] = v->Wxyz2[0]/v->Wxyz2[1] * vc->Wxyz2[1]; + vc->Wxyz2[2] = v->Wxyz2[2]/v->Wxyz2[1] * vc->Wxyz2[1]; + } + if (v->Wxyz2[0] >= 0.0 && v->Wxyz2[1] >= 0.0 && v->Wxyz2[2] < 0.0) { + /* Convert Yxy to XYZ */ + double x = v->Wxyz2[0]; + double y = v->Wxyz2[1]; /* If Y == 1.0, then X+Y+Z = 1/y */ + double z = 1.0 - x - y; + vc->Wxyz2[0] = x/y * vc->Wxyz2[1]; + vc->Wxyz2[2] = z/y * vc->Wxyz2[1]; + } } /* Get a suitable forward conversion object to invert. */ @@ -2540,7 +2557,8 @@ make_output_icc( cx.icam = new_icxcam(cam_default); cx.icam->set_view(cx.icam, ivc.Ev, ivc.Wxyz, ivc.La, ivc.Yb, ivc.Lv, ivc.Yf, ivc.Yg, ivc.Gxyz, - XICC_USE_HK, ivc.hkscale); + XICC_USE_HK, ivc.hkscale, + ivc.mtaf, ivc.Wxyz2); } /* Create a dumy source gamut, used by new_gammap to create */ diff --git a/profile/simpprof.c b/profile/simpprof.c index 61128ff..61128ff 100644..100755 --- a/profile/simpprof.c +++ b/profile/simpprof.c diff --git a/profile/splitti3.c b/profile/splitti3.c index eb92938..eb92938 100644..100755 --- a/profile/splitti3.c +++ b/profile/splitti3.c diff --git a/profile/txt2ti3.c b/profile/txt2ti3.c index 662fdc3..2a3d9e7 100644..100755 --- a/profile/txt2ti3.c +++ b/profile/txt2ti3.c @@ -24,7 +24,47 @@ Do we need to worry about normalising display values to Y = 100, or marking them not normalised ? - Should have an option to output .ti1 files instead of .ti3. + Should have an option to output .ti1 files instead of .ti3 ? + + Should parse and support XRGA & Polarized tags. + + + ~~ + + MEASUREMENT_SOURCE + iSis_INFO + Illumination=D50 + + ObserverAngle=2 + + Filter=Unknown + Filter=None + Filter=No + Filter=UVcut + Filter=D50 + + (??? + Filter=Polarizer + Filter=D65 + ???) + + MeasurementCondition=M1 + + ILLUMINATION_NAME "D50" + OBSERVER_ANGLE "2" + FILTER "UVcut" + + ICCOLOR_CSV + MeasurementOptics=Remission + + DEVCALSTD UNKNOWN + DEVCALSTD XRDI + DEVCALSTD GMDI + DEVCALSTD XRGA + + Cxf:DevicePolarization + Cxf:DeviceFilter + SpectralPolFilter */ @@ -57,7 +97,8 @@ usage(char *mes) { /* fprintf(stderr," -v Verbose mode\n"); */ fprintf(stderr," -2 Create dummy .ti2 file as well\n"); fprintf(stderr," -l limit set ink limit, 0 - 400%% (default max in file)\n"); - fprintf(stderr," -d Set type of device as Display, not Output\n"); + fprintf(stderr," -d Set type of device as Display, rather than Output\n"); + fprintf(stderr," -D Set type of device as Display and not normalized\n"); fprintf(stderr," -i Set type of device as Input, not Output\n"); fprintf(stderr," -T Transpose sample name Letters and Numbers\n"); fprintf(stderr," [devfile] Input Device CMYK target file (typically file.txt)\n"); @@ -73,7 +114,7 @@ int main(int argc, char *argv[]) int fa,nfa; /* current argument we're looking at */ int verb = 0; int out2 = 0; /* Create dumy .ti2 file output */ - int disp = 0; /* nz if this is a display device */ + int disp = 0; /* 1 if this is a display device, 2 if nor normalized */ int inp = 0; /* nz if this is an input device */ int transpose = 0; /* nz to transpose letters and numbers */ static char devname[MAXNAMEL+1] = { 0 }; /* Input CMYK/Device .txt file (may be null) */ @@ -96,7 +137,8 @@ int main(int argc, char *argv[]) time_t clk = time(0); struct tm *tsp = localtime(&clk); char *atm = asctime(tsp); /* Ascii time */ - char *devcalstd = NULL; /* X-Rite calibration standard if any */ + xcalstd calstd = xcalstd_none; /* X-Rite Calibration standard */ + int isPolarize = 0; /* nz if polarized measurement */ int islab = 0; /* CIE is Lab rather than XYZ */ int specmin = 0, specmax = 0, specnum = 0; /* Min and max spectral in nm, inclusive */ int npat = 0; /* Number of patches */ @@ -145,6 +187,10 @@ int main(int argc, char *argv[]) disp = 1; inp = 0; + } else if (argv[fa][1] == 'D') { + disp = 2; + inp = 0; + } else if (argv[fa][1] == 'i') { disp = 0; inp = 1; @@ -217,11 +263,25 @@ int main(int argc, char *argv[]) if ((npat = cmy->t[0].nsets) <= 0) error("No patches"); + /* See if we can figure out polarization and xrga */ + if ((ti = cmy->find_field(cmy, 0, "MEASUREMENT_SOURCE")) >= 0) { + if (strstr(cmy->t[0].kdata[ti], "Filter=Polarizer") != NULL) + isPolarize = 1; + } + if ((ti = cmy->find_field(cmy, 0, "FILTER")) >= 0) { + if (strstr(cmy->t[0].kdata[ti], "Polariz") != NULL) + isPolarize = 1; + } + if ((ti = cmy->find_field(cmy, 0, "DEVCALSTD")) >= 0) { + calstd = str2xcalstd(cmy->t[0].kdata[ti]); + } + if ((f_id1 = cmy->find_field(cmy, 0, "SampleName")) < 0 && (f_id1 = cmy->find_field(cmy, 0, "Sample_Name")) < 0 && (f_id1 = cmy->find_field(cmy, 0, "SAMPLE_NAME")) < 0 - && (f_id1 = cmy->find_field(cmy, 0, "SAMPLE_ID")) < 0) - error("Input file '%s' doesn't contain field SampleName, Sample_Name, SAMPLE_NAME or SAMPLE_ID",devname); + && (f_id1 = cmy->find_field(cmy, 0, "SAMPLE_ID")) < 0 + && (f_id1 = cmy->find_field(cmy, 0, "SampleID")) < 0) + error("Input file '%s' doesn't contain field SampleName, Sample_Name, SAMPLE_NAME, SAMPLE_ID or SampleID",devname); if (cmy->t[0].ftype[f_id1] != nqcs_t && cmy->t[0].ftype[f_id1] != cs_t && cmy->t[0].ftype[f_id1] != i_t) @@ -285,7 +345,8 @@ int main(int argc, char *argv[]) if (verb && ndchan > 0) printf("Read device values\n"); if (cmy->find_field(cmy, 0, "XYZ_X") >= 0 - || cmy->find_field(cmy, 0, "LAB_L") >= 0) { + || cmy->find_field(cmy, 0, "LAB_L") >= 0 + || cmy->find_field(cmy, 0, "Lab_L") >= 0) { /* We've got a new combined device+cie file as the first one. */ /* Shuffle it into ciename , and ciename into specname */ @@ -308,21 +369,33 @@ int main(int argc, char *argv[]) if (npat != ncie->t[0].nsets) error("Number of patches between '%s' and '%s' doesn't match",devname,ciename); + /* See if we can figure out polarization and xrga */ + if ((ti = ncie->find_field(ncie, 0, "MEASUREMENT_SOURCE")) >= 0) { + if (strstr(ncie->t[0].kdata[ti], "Filter=Polarizer") != NULL) + isPolarize = 1; + } + if ((ti = ncie->find_field(ncie, 0, "FILTER")) >= 0) { + if (strstr(ncie->t[0].kdata[ti], "Polariz") != NULL) + isPolarize = 1; + } + if ((ti = ncie->find_field(ncie, 0, "DEVCALSTD")) >= 0) { + calstd = str2xcalstd(ncie->t[0].kdata[ti]); + } + if ((f_id2 = ncie->find_field(ncie, 0, "SampleName")) < 0 && (f_id2 = ncie->find_field(ncie, 0, "Sample_Name")) < 0 && (f_id2 = ncie->find_field(ncie, 0, "SAMPLE_NAME")) < 0 - && (f_id2 = ncie->find_field(ncie, 0, "SAMPLE_ID")) < 0) - error("Input file '%s' doesn't contain field SampleName, Sample_Name, SAMPLE_NAME or SAMPLE_ID",ciename); + && (f_id2 = ncie->find_field(ncie, 0, "SAMPLE_ID")) < 0 + && (f_id2 = ncie->find_field(ncie, 0, "SampleID")) < 0) + error("Input file '%s' doesn't contain field SampleName, Sample_Name, SAMPLE_NAME, SAMPLE_ID or SampleID",ciename); if (ncie->t[0].ftype[f_id2] != nqcs_t && ncie->t[0].ftype[f_id2] != cs_t - && cmy->t[0].ftype[f_id2] != i_t) + && ncie->t[0].ftype[f_id2] != i_t) error("Field SampleName (%s) from cie file '%s' is wrong type",ncie->t[0].fsym[f_id2],ciename); - if ((ti = ncie->find_kword(ncie, 0, "DEVCALSTD")) >= 0) - devcalstd = ncie->t[0].kdata[ti]; - if (ncie->find_field(ncie, 0, "XYZ_X") < 0 - && ncie->find_field(ncie, 0, "LAB_L") < 0) { + && ncie->find_field(ncie, 0, "LAB_L") < 0 + && ncie->find_field(ncie, 0, "Lab_L") < 0) { /* Not a cie file. See if it's a spectral file */ if (ncie->find_field(ncie, 0, "nm500") < 0 @@ -330,7 +403,7 @@ int main(int argc, char *argv[]) && ncie->find_field(ncie, 0, "SPECTRAL_NM_500") < 0 && ncie->find_field(ncie, 0, "R_500") < 0 && ncie->find_field(ncie, 0, "SPECTRAL_500") < 0) - error("Input file '%s' doesn't contain field XYZ_X or spectral",ciename); /* Nope */ + error("Input file '%s' doesn't contain field XYZ_X, LAB_L or spectral",ciename); /* Nope */ /* We have a spectral file only. Fix things and drop through */ ncie->del(ncie); @@ -339,9 +412,11 @@ int main(int argc, char *argv[]) ciename[0] = '\000'; } else { /* Continue dealing with cie value file */ - char *fields[2][3] = { + int fix = 0; + char *fields[3][3] = { { "XYZ_X", "XYZ_Y", "XYZ_Z" }, - { "LAB_L", "LAB_A", "LAB_B" } + { "LAB_L", "LAB_A", "LAB_B" }, + { "Lab_L", "Lab_a", "Lab_b" } }; if (ncie->find_field(ncie, 0, "nm500") >= 0 @@ -354,16 +429,22 @@ int main(int argc, char *argv[]) strcpy(specname, ciename); } - if (ncie->find_field(ncie, 0, "LAB_L") >= 0) + if (ncie->find_field(ncie, 0, "LAB_L") >= 0) { + fix = 1; + islab = 1; + } else if (ncie->find_field(ncie, 0, "Lab_L") >= 0) { + fix = 2; islab = 1; + } for (i = 0; i < 3; i++) { - if ((f_cie[i] = ncie->find_field(ncie, 0, fields[islab][i])) < 0) - error("Input file '%s' doesn't contain field XYZ_Y",fields[islab][i], ciename); + if ((f_cie[i] = ncie->find_field(ncie, 0, fields[fix][i])) < 0 + && (f_cie[i] = ncie->find_field(ncie, 0, fields[fix+1][i])) < 0) + error("Input file '%s' doesn't contain field %s",ciename,fields[fix][i]); if (ncie->t[0].ftype[f_cie[i]] != r_t) - error("Field %s from file '%s' is wrong type - expect float",fields[islab][i], ciename); + error("Field %s from file '%s' is wrong type - expect float",fields[fix][i], ciename); } if (verb) printf("Found CIE values\n"); @@ -385,14 +466,28 @@ int main(int argc, char *argv[]) if (npat != spec->t[0].nsets) error("Number of patches between '%s' and '%s' doesn't match",specname); + /* See if we can figure out polarization and xrga */ + if ((ti = spec->find_field(spec, 0, "MEASUREMENT_SOURCE")) >= 0) { + if (strstr(spec->t[0].kdata[ti], "Filter=Polarizer") != NULL) + isPolarize = 1; + } + if ((ti = spec->find_field(spec, 0, "FILTER")) >= 0) { + if (strstr(spec->t[0].kdata[ti], "Polariz") != NULL) + isPolarize = 1; + } + if ((ti = spec->find_field(spec, 0, "DEVCALSTD")) >= 0) { + calstd = str2xcalstd(spec->t[0].kdata[ti]); + } + if ((f_id3 = spec->find_field(spec, 0, "SampleName")) < 0 && (f_id3 = spec->find_field(spec, 0, "Sample_Name")) < 0 && (f_id3 = spec->find_field(spec, 0, "SAMPLE_NAME")) < 0 - && (f_id3 = spec->find_field(spec, 0, "SAMPLE_ID")) < 0) - error("Input file '%s' doesn't contain field SampleName, Sample_Name, SAMPLE_NAME or SAMPLE_ID",specname); + && (f_id3 = spec->find_field(spec, 0, "SAMPLE_ID")) < 0 + && (f_id3 = spec->find_field(spec, 0, "SampleID")) < 0) + error("Input file '%s' doesn't contain field SampleName, Sample_Name, SAMPLE_NAME, SAMPLE_ID or SampleID",specname); if (spec->t[0].ftype[f_id3] != nqcs_t && spec->t[0].ftype[f_id3] != cs_t - && cmy->t[0].ftype[f_id3] != i_t) + && spec->t[0].ftype[f_id3] != i_t) error("Field SampleName (%s) from spec file '%s' is wrong type",spec->t[0].fsym[f_id3],specname); /* Find the spectral readings nm range */ @@ -486,9 +581,12 @@ int main(int argc, char *argv[]) ocg->add_kword(ocg, 0, "ORIGINATOR", "Argyll target", NULL); atm[strlen(atm)-1] = '\000'; /* Remove \n from end */ ocg->add_kword(ocg, 0, "CREATED",atm, NULL); - if (disp) + if (disp) { ocg->add_kword(ocg, 0, "DEVICE_CLASS","DISPLAY", NULL); /* What sort of device this is */ - else if (inp) + + if (disp == 2) + ocg->add_kword(ocg, 0, "NORMALIZED_TO_Y_100","NO", NULL); /* What sort of device this is */ + }else if (inp) ocg->add_kword(ocg, 0, "DEVICE_CLASS","INPUT", NULL); /* What sort of device this is */ else ocg->add_kword(ocg, 0, "DEVICE_CLASS","OUTPUT", NULL); /* What sort of device this is */ @@ -497,8 +595,11 @@ int main(int argc, char *argv[]) /* Assume this - could try reading from file INSTRUMENTATION "SpectroScan" ?? */ ocg->add_kword(ocg, 0, "TARGET_INSTRUMENT", inst_name(instSpectrolino) , NULL); - if (devcalstd != NULL) - ocg->add_kword(ocg, 0, "DEVCALSTD", devcalstd, NULL); + if (calstd != xcalstd_none) + ocg->add_kword(ocg, 0, "DEVCALSTD", xcalstd2str(calstd), NULL); + + if (isPolarize) + ocg->add_kword(ocg, 0, "INSTRUMENT_FILTER", "POLARIZED", NULL); /* Fields we want */ ocg->add_field(ocg, 0, "SAMPLE_ID", nqcs_t); diff --git a/ref/3dap5k.sp b/ref/3dap5k.sp index cfbc67d..cfbc67d 100644..100755 --- a/ref/3dap5k.sp +++ b/ref/3dap5k.sp diff --git a/ref/CIE_C.sp b/ref/CIE_C.sp index 8b771fe..8b771fe 100644..100755 --- a/ref/CIE_C.sp +++ b/ref/CIE_C.sp diff --git a/ref/CMP_DT_003.cht b/ref/CMP_DT_003.cht index 37411af..37411af 100644..100755 --- a/ref/CMP_DT_003.cht +++ b/ref/CMP_DT_003.cht diff --git a/ref/CMP_Digital_Target-4.cht b/ref/CMP_Digital_Target-4.cht index eb95ed8..eb95ed8 100644..100755 --- a/ref/CMP_Digital_Target-4.cht +++ b/ref/CMP_Digital_Target-4.cht diff --git a/ref/CMP_Digital_Target-4.cie b/ref/CMP_Digital_Target-4.cie index 6c8ff5d..6c8ff5d 100644..100755 --- a/ref/CMP_Digital_Target-4.cie +++ b/ref/CMP_Digital_Target-4.cie diff --git a/ref/CMP_Digital_Target-4.ti2 b/ref/CMP_Digital_Target-4.ti2 index 8cc38ea..8cc38ea 100644..100755 --- a/ref/CMP_Digital_Target-4.ti2 +++ b/ref/CMP_Digital_Target-4.ti2 diff --git a/ref/CMP_Digital_Target-7.cht b/ref/CMP_Digital_Target-7.cht index d188517..d188517 100644..100755 --- a/ref/CMP_Digital_Target-7.cht +++ b/ref/CMP_Digital_Target-7.cht diff --git a/ref/CRT.ccss b/ref/CRT.ccss index 49d4bb8..49d4bb8 100644..100755 --- a/ref/CRT.ccss +++ b/ref/CRT.ccss diff --git a/ref/ClayRGB1998.icm b/ref/ClayRGB1998.icm Binary files differindex 4c8ecb3..4c8ecb3 100644..100755 --- a/ref/ClayRGB1998.icm +++ b/ref/ClayRGB1998.icm diff --git a/ref/ColorChecker.cht b/ref/ColorChecker.cht index 1da441b..1da441b 100644..100755 --- a/ref/ColorChecker.cht +++ b/ref/ColorChecker.cht diff --git a/ref/ColorChecker.cie b/ref/ColorChecker.cie index 8c78ff6..8c78ff6 100644..100755 --- a/ref/ColorChecker.cie +++ b/ref/ColorChecker.cie diff --git a/ref/ColorChecker.ti2 b/ref/ColorChecker.ti2 index 6ede47a..6ede47a 100644..100755 --- a/ref/ColorChecker.ti2 +++ b/ref/ColorChecker.ti2 diff --git a/ref/ColorCheckerDC.cht b/ref/ColorCheckerDC.cht index ad7ea29..ad7ea29 100644..100755 --- a/ref/ColorCheckerDC.cht +++ b/ref/ColorCheckerDC.cht diff --git a/ref/ColorCheckerDC.ti2 b/ref/ColorCheckerDC.ti2 index f87284c..f87284c 100644..100755 --- a/ref/ColorCheckerDC.ti2 +++ b/ref/ColorCheckerDC.ti2 diff --git a/ref/ColorCheckerPassport.cht b/ref/ColorCheckerPassport.cht index 5378c2f..5378c2f 100644..100755 --- a/ref/ColorCheckerPassport.cht +++ b/ref/ColorCheckerPassport.cht diff --git a/ref/ColorCheckerPassport.cie b/ref/ColorCheckerPassport.cie index f25c019..f25c019 100644..100755 --- a/ref/ColorCheckerPassport.cie +++ b/ref/ColorCheckerPassport.cie diff --git a/ref/ColorCheckerSG.cht b/ref/ColorCheckerSG.cht index 1836f73..1836f73 100644..100755 --- a/ref/ColorCheckerSG.cht +++ b/ref/ColorCheckerSG.cht diff --git a/ref/ColorCheckerSG.ti2 b/ref/ColorCheckerSG.ti2 index 239b9e6..239b9e6 100644..100755 --- a/ref/ColorCheckerSG.ti2 +++ b/ref/ColorCheckerSG.ti2 diff --git a/ref/D50_0.0.sp b/ref/D50_0.0.sp index 8904fca..8904fca 100644..100755 --- a/ref/D50_0.0.sp +++ b/ref/D50_0.0.sp diff --git a/ref/D50_0.1.sp b/ref/D50_0.1.sp index ad747fb..ad747fb 100644..100755 --- a/ref/D50_0.1.sp +++ b/ref/D50_0.1.sp diff --git a/ref/D50_0.3.sp b/ref/D50_0.3.sp index 1a64a27..1a64a27 100644..100755 --- a/ref/D50_0.3.sp +++ b/ref/D50_0.3.sp diff --git a/ref/D50_0.5.sp b/ref/D50_0.5.sp index 367d0d3..367d0d3 100644..100755 --- a/ref/D50_0.5.sp +++ b/ref/D50_0.5.sp diff --git a/ref/D50_0.7.sp b/ref/D50_0.7.sp index 2e0b2e8..2e0b2e8 100644..100755 --- a/ref/D50_0.7.sp +++ b/ref/D50_0.7.sp diff --git a/ref/D50_1.0.sp b/ref/D50_1.0.sp index d74e76a..d74e76a 100644..100755 --- a/ref/D50_1.0.sp +++ b/ref/D50_1.0.sp diff --git a/ref/D50_1.2.sp b/ref/D50_1.2.sp index 180d650..180d650 100644..100755 --- a/ref/D50_1.2.sp +++ b/ref/D50_1.2.sp diff --git a/ref/D50_1.5.sp b/ref/D50_1.5.sp index 786e292..786e292 100644..100755 --- a/ref/D50_1.5.sp +++ b/ref/D50_1.5.sp diff --git a/ref/D50_1.7.sp b/ref/D50_1.7.sp index ba8dc6b..ba8dc6b 100644..100755 --- a/ref/D50_1.7.sp +++ b/ref/D50_1.7.sp diff --git a/ref/D50_2.0.sp b/ref/D50_2.0.sp index efa0214..efa0214 100644..100755 --- a/ref/D50_2.0.sp +++ b/ref/D50_2.0.sp diff --git a/ref/D50_2.5.sp b/ref/D50_2.5.sp index 8057f14..8057f14 100644..100755 --- a/ref/D50_2.5.sp +++ b/ref/D50_2.5.sp diff --git a/ref/D50_3.0.sp b/ref/D50_3.0.sp index e68d891..e68d891 100644..100755 --- a/ref/D50_3.0.sp +++ b/ref/D50_3.0.sp diff --git a/ref/EBU3213_PAL.icm b/ref/EBU3213_PAL.icm Binary files differindex b0e67bc..b0e67bc 100644..100755 --- a/ref/EBU3213_PAL.icm +++ b/ref/EBU3213_PAL.icm diff --git a/ref/ECI2002.ti2 b/ref/ECI2002.ti2 index 0ab3095..0ab3095 100644..100755 --- a/ref/ECI2002.ti2 +++ b/ref/ECI2002.ti2 diff --git a/ref/ECI2002R.ti2 b/ref/ECI2002R.ti2 index d3f2d8b..d3f2d8b 100644..100755 --- a/ref/ECI2002R.ti2 +++ b/ref/ECI2002R.ti2 diff --git a/ref/F1.sp b/ref/F1.sp index 908cd72..908cd72 100644..100755 --- a/ref/F1.sp +++ b/ref/F1.sp diff --git a/ref/F5.sp b/ref/F5.sp index 4959a50..4959a50 100644..100755 --- a/ref/F5.sp +++ b/ref/F5.sp diff --git a/ref/F8.sp b/ref/F8.sp index f1e7beb..f1e7beb 100644..100755 --- a/ref/F8.sp +++ b/ref/F8.sp diff --git a/ref/FograStrip2.ti1 b/ref/FograStrip2.ti1 index f8abae7..f8abae7 100644..100755 --- a/ref/FograStrip2.ti1 +++ b/ref/FograStrip2.ti1 diff --git a/ref/FograStrip2_2.ti2 b/ref/FograStrip2_2.ti2 index b84cb9d..b84cb9d 100644..100755 --- a/ref/FograStrip2_2.ti2 +++ b/ref/FograStrip2_2.ti2 diff --git a/ref/FograStrip3.ti1 b/ref/FograStrip3.ti1 index 4cf126f..4cf126f 100644..100755 --- a/ref/FograStrip3.ti1 +++ b/ref/FograStrip3.ti1 diff --git a/ref/FograStrip3_3.ti2 b/ref/FograStrip3_3.ti2 index 8f9822e..8f9822e 100644..100755 --- a/ref/FograStrip3_3.ti2 +++ b/ref/FograStrip3_3.ti2 diff --git a/ref/GTIPlus.sp b/ref/GTIPlus.sp index 4c4c164..4c4c164 100644..100755 --- a/ref/GTIPlus.sp +++ b/ref/GTIPlus.sp diff --git a/ref/Hutchcolor.cht b/ref/Hutchcolor.cht index fcc5135..fcc5135 100644..100755 --- a/ref/Hutchcolor.cht +++ b/ref/Hutchcolor.cht diff --git a/ref/LaserSoftDCPro.cht b/ref/LaserSoftDCPro.cht index e5df741..e5df741 100644..100755 --- a/ref/LaserSoftDCPro.cht +++ b/ref/LaserSoftDCPro.cht diff --git a/ref/License.txt b/ref/License.txt index a871fcf..a871fcf 100644..100755 --- a/ref/License.txt +++ b/ref/License.txt diff --git a/ref/Office.sp b/ref/Office.sp index 290d310..290d310 100644..100755 --- a/ref/Office.sp +++ b/ref/Office.sp diff --git a/ref/ProPhoto.icm b/ref/ProPhoto.icm Binary files differindex cb6ee56..cb6ee56 100644..100755 --- a/ref/ProPhoto.icm +++ b/ref/ProPhoto.icm diff --git a/ref/ProPhotoLin.icm b/ref/ProPhotoLin.icm Binary files differindex 28369aa..28369aa 100644..100755 --- a/ref/ProPhotoLin.icm +++ b/ref/ProPhotoLin.icm diff --git a/ref/QPcard_201.cht b/ref/QPcard_201.cht index a9d9542..a9d9542 100644..100755 --- a/ref/QPcard_201.cht +++ b/ref/QPcard_201.cht diff --git a/ref/QPcard_201.cie b/ref/QPcard_201.cie index ecd1a3a..ecd1a3a 100644..100755 --- a/ref/QPcard_201.cie +++ b/ref/QPcard_201.cie diff --git a/ref/QPcard_202.cht b/ref/QPcard_202.cht index 4d10406..4d10406 100644..100755 --- a/ref/QPcard_202.cht +++ b/ref/QPcard_202.cht diff --git a/ref/QPcard_202.cie b/ref/QPcard_202.cie index 683b6c0..683b6c0 100644..100755 --- a/ref/QPcard_202.cie +++ b/ref/QPcard_202.cie diff --git a/ref/ReadMe.txt b/ref/ReadMe.txt index 10dc457..10dc457 100644..100755 --- a/ref/ReadMe.txt +++ b/ref/ReadMe.txt diff --git a/ref/Rec2020.icm b/ref/Rec2020.icm Binary files differindex 0decaf6..0decaf6 100644..100755 --- a/ref/Rec2020.icm +++ b/ref/Rec2020.icm diff --git a/ref/Rec709.icm b/ref/Rec709.icm Binary files differindex abf0a63..abf0a63 100644..100755 --- a/ref/Rec709.icm +++ b/ref/Rec709.icm diff --git a/ref/SMPTE431_P3.icm b/ref/SMPTE431_P3.icm Binary files differindex 8055849..8055849 100644..100755 --- a/ref/SMPTE431_P3.icm +++ b/ref/SMPTE431_P3.icm diff --git a/ref/SMPTE_RP145_NTSC.icm b/ref/SMPTE_RP145_NTSC.icm Binary files differindex 7fc78fb..7fc78fb 100644..100755 --- a/ref/SMPTE_RP145_NTSC.icm +++ b/ref/SMPTE_RP145_NTSC.icm diff --git a/ref/SOtele.sp b/ref/SOtele.sp index f63d90e..f63d90e 100644..100755 --- a/ref/SOtele.sp +++ b/ref/SOtele.sp diff --git a/ref/SpyderChecker.cht b/ref/SpyderChecker.cht index 1c0ef3a..1c0ef3a 100644..100755 --- a/ref/SpyderChecker.cht +++ b/ref/SpyderChecker.cht diff --git a/ref/SpyderChecker.cie b/ref/SpyderChecker.cie index 302e416..302e416 100644..100755 --- a/ref/SpyderChecker.cie +++ b/ref/SpyderChecker.cie diff --git a/ref/SpyderChecker24.cht b/ref/SpyderChecker24.cht index a67bbf6..a67bbf6 100644..100755 --- a/ref/SpyderChecker24.cht +++ b/ref/SpyderChecker24.cht diff --git a/ref/SpyderChecker24.cie b/ref/SpyderChecker24.cie index 49bdf61..49bdf61 100644..100755 --- a/ref/SpyderChecker24.cie +++ b/ref/SpyderChecker24.cie diff --git a/ref/StandardObs2deg.cmf b/ref/StandardObs2deg.cmf new file mode 100644 index 0000000..cb2b3b4 --- /dev/null +++ b/ref/StandardObs2deg.cmf @@ -0,0 +1,23 @@ +CMF + +# CIE 2012 2 Degree Standard Observer. + +DESCRIPTOR "Argyll Spectral power/reflectance information" +ORIGINATOR "Argyll CMS" +CREATED "Mon Oct 17 06:50:43 2016" +SPECTRAL_BANDS "441" +SPECTRAL_START_NM "390.000000" +SPECTRAL_END_NM "830.000000" +SPECTRAL_NORM "1.000000" + +NUMBER_OF_FIELDS 441 +BEGIN_DATA_FORMAT +SPEC_390 SPEC_391 SPEC_392 SPEC_393 SPEC_394 SPEC_395 SPEC_396 SPEC_397 SPEC_398 SPEC_399 SPEC_400 SPEC_401 SPEC_402 SPEC_403 SPEC_404 SPEC_405 SPEC_406 SPEC_407 SPEC_408 SPEC_409 SPEC_410 SPEC_411 SPEC_412 SPEC_413 SPEC_414 SPEC_415 SPEC_416 SPEC_417 SPEC_418 SPEC_419 SPEC_420 SPEC_421 SPEC_422 SPEC_423 SPEC_424 SPEC_425 SPEC_426 SPEC_427 SPEC_428 SPEC_429 SPEC_430 SPEC_431 SPEC_432 SPEC_433 SPEC_434 SPEC_435 SPEC_436 SPEC_437 SPEC_438 SPEC_439 SPEC_440 SPEC_441 SPEC_442 SPEC_443 SPEC_444 SPEC_445 SPEC_446 SPEC_447 SPEC_448 SPEC_449 SPEC_450 SPEC_451 SPEC_452 SPEC_453 SPEC_454 SPEC_455 SPEC_456 SPEC_457 SPEC_458 SPEC_459 SPEC_460 SPEC_461 SPEC_462 SPEC_463 SPEC_464 SPEC_465 SPEC_466 SPEC_467 SPEC_468 SPEC_469 SPEC_470 SPEC_471 SPEC_472 SPEC_473 SPEC_474 SPEC_475 SPEC_476 SPEC_477 SPEC_478 SPEC_479 SPEC_480 SPEC_481 SPEC_482 SPEC_483 SPEC_484 SPEC_485 SPEC_486 SPEC_487 SPEC_488 SPEC_489 SPEC_490 SPEC_491 SPEC_492 SPEC_493 SPEC_494 SPEC_495 SPEC_496 SPEC_497 SPEC_498 SPEC_499 SPEC_500 SPEC_501 SPEC_502 SPEC_503 SPEC_504 SPEC_505 SPEC_506 SPEC_507 SPEC_508 SPEC_509 SPEC_510 SPEC_511 SPEC_512 SPEC_513 SPEC_514 SPEC_515 SPEC_516 SPEC_517 SPEC_518 SPEC_519 SPEC_520 SPEC_521 SPEC_522 SPEC_523 SPEC_524 SPEC_525 SPEC_526 SPEC_527 SPEC_528 SPEC_529 SPEC_530 SPEC_531 SPEC_532 SPEC_533 SPEC_534 SPEC_535 SPEC_536 SPEC_537 SPEC_538 SPEC_539 SPEC_540 SPEC_541 SPEC_542 SPEC_543 SPEC_544 SPEC_545 SPEC_546 SPEC_547 SPEC_548 SPEC_549 SPEC_550 SPEC_551 SPEC_552 SPEC_553 SPEC_554 SPEC_555 SPEC_556 SPEC_557 SPEC_558 SPEC_559 SPEC_560 SPEC_561 SPEC_562 SPEC_563 SPEC_564 SPEC_565 SPEC_566 SPEC_567 SPEC_568 SPEC_569 SPEC_570 SPEC_571 SPEC_572 SPEC_573 SPEC_574 SPEC_575 SPEC_576 SPEC_577 SPEC_578 SPEC_579 SPEC_580 SPEC_581 SPEC_582 SPEC_583 SPEC_584 SPEC_585 SPEC_586 SPEC_587 SPEC_588 SPEC_589 SPEC_590 SPEC_591 SPEC_592 SPEC_593 SPEC_594 SPEC_595 SPEC_596 SPEC_597 SPEC_598 SPEC_599 SPEC_600 SPEC_601 SPEC_602 SPEC_603 SPEC_604 SPEC_605 SPEC_606 SPEC_607 SPEC_608 SPEC_609 SPEC_610 SPEC_611 SPEC_612 SPEC_613 SPEC_614 SPEC_615 SPEC_616 SPEC_617 SPEC_618 SPEC_619 SPEC_620 SPEC_621 SPEC_622 SPEC_623 SPEC_624 SPEC_625 SPEC_626 SPEC_627 SPEC_628 SPEC_629 SPEC_630 SPEC_631 SPEC_632 SPEC_633 SPEC_634 SPEC_635 SPEC_636 SPEC_637 SPEC_638 SPEC_639 SPEC_640 SPEC_641 SPEC_642 SPEC_643 SPEC_644 SPEC_645 SPEC_646 SPEC_647 SPEC_648 SPEC_649 SPEC_650 SPEC_651 SPEC_652 SPEC_653 SPEC_654 SPEC_655 SPEC_656 SPEC_657 SPEC_658 SPEC_659 SPEC_660 SPEC_661 SPEC_662 SPEC_663 SPEC_664 SPEC_665 SPEC_666 SPEC_667 SPEC_668 SPEC_669 SPEC_670 SPEC_671 SPEC_672 SPEC_673 SPEC_674 SPEC_675 SPEC_676 SPEC_677 SPEC_678 SPEC_679 SPEC_680 SPEC_681 SPEC_682 SPEC_683 SPEC_684 SPEC_685 SPEC_686 SPEC_687 SPEC_688 SPEC_689 SPEC_690 SPEC_691 SPEC_692 SPEC_693 SPEC_694 SPEC_695 SPEC_696 SPEC_697 SPEC_698 SPEC_699 SPEC_700 SPEC_701 SPEC_702 SPEC_703 SPEC_704 SPEC_705 SPEC_706 SPEC_707 SPEC_708 SPEC_709 SPEC_710 SPEC_711 SPEC_712 SPEC_713 SPEC_714 SPEC_715 SPEC_716 SPEC_717 SPEC_718 SPEC_719 SPEC_720 SPEC_721 SPEC_722 SPEC_723 SPEC_724 SPEC_725 SPEC_726 SPEC_727 SPEC_728 SPEC_729 SPEC_730 SPEC_731 SPEC_732 SPEC_733 SPEC_734 SPEC_735 SPEC_736 SPEC_737 SPEC_738 SPEC_739 SPEC_740 SPEC_741 SPEC_742 SPEC_743 SPEC_744 SPEC_745 SPEC_746 SPEC_747 SPEC_748 SPEC_749 SPEC_750 SPEC_751 SPEC_752 SPEC_753 SPEC_754 SPEC_755 SPEC_756 SPEC_757 SPEC_758 SPEC_759 SPEC_760 SPEC_761 SPEC_762 SPEC_763 SPEC_764 SPEC_765 SPEC_766 SPEC_767 SPEC_768 SPEC_769 SPEC_770 SPEC_771 SPEC_772 SPEC_773 SPEC_774 SPEC_775 SPEC_776 SPEC_777 SPEC_778 SPEC_779 SPEC_780 SPEC_781 SPEC_782 SPEC_783 SPEC_784 SPEC_785 SPEC_786 SPEC_787 SPEC_788 SPEC_789 SPEC_790 SPEC_791 SPEC_792 SPEC_793 SPEC_794 SPEC_795 SPEC_796 SPEC_797 SPEC_798 SPEC_799 SPEC_800 SPEC_801 SPEC_802 SPEC_803 SPEC_804 SPEC_805 SPEC_806 SPEC_807 SPEC_808 SPEC_809 SPEC_810 SPEC_811 SPEC_812 SPEC_813 SPEC_814 SPEC_815 SPEC_816 SPEC_817 SPEC_818 SPEC_819 SPEC_820 SPEC_821 SPEC_822 SPEC_823 SPEC_824 SPEC_825 SPEC_826 SPEC_827 SPEC_828 SPEC_829 SPEC_830 +END_DATA_FORMAT + +NUMBER_OF_SETS 3 +BEGIN_DATA +0.000486536 0.000576500 0.000682183 0.000805985 0.000950455 0.00111847 0.00131163 0.00153406 0.00178899 0.00207964 0.00240917 0.00277698 0.00319287 0.00366591 0.00420808 0.00483502 0.00543794 0.00612333 0.00689682 0.00776297 0.00872414 0.00951886 0.0103691 0.0112867 0.0122865 0.0133880 0.0142332 0.0151568 0.0161646 0.0172619 0.0184539 0.0192497 0.0200953 0.0209919 0.0219398 0.0229394 0.0238694 0.0248493 0.0258894 0.0270008 0.0281969 0.0292616 0.0303990 0.0315967 0.0328413 0.0341163 0.0352698 0.0364424 0.0376522 0.0389194 0.0402687 0.0410767 0.0419536 0.0428956 0.0438977 0.0449514 0.0458461 0.0467819 0.0477634 0.0487937 0.0498792 0.0508307 0.0518442 0.0529281 0.0540960 0.0553579 0.0570081 0.0587765 0.0606578 0.0626469 0.0647350 0.0676411 0.0706931 0.0738897 0.0772297 0.0807110 0.0842464 0.0879026 0.0916726 0.0955442 0.0995008 0.103123 0.106822 0.110639 0.114624 0.118833 0.122638 0.126682 0.130958 0.135460 0.140178 0.144749 0.149466 0.154282 0.159141 0.163988 0.169243 0.174529 0.179942 0.185593 0.191593 0.199136 0.207152 0.215546 0.224198 0.232964 0.243716 0.254629 0.265765 0.277192 0.289002 0.302103 0.315738 0.329905 0.344589 0.359765 0.375594 0.391909 0.408703 0.425981 0.443734 0.461073 0.478911 0.497356 0.516517 0.536542 0.554113 0.572311 0.590937 0.609779 0.628602 0.644476 0.659970 0.675131 0.690038 0.704748 0.717973 0.731096 0.744208 0.757366 0.770657 0.781187 0.791895 0.802858 0.814121 0.825744 0.836818 0.848107 0.859385 0.870432 0.881023 0.890221 0.898652 0.906289 0.913120 0.919097 0.923708 0.927781 0.931650 0.935668 0.940197 0.944762 0.949897 0.955302 0.960687 0.965730 0.969715 0.973163 0.976176 0.978902 0.981437 0.984379 0.987201 0.989875 0.992314 0.994487 0.996330 0.997823 0.998949 0.999677 1.000000 0.999887 0.999202 0.997808 0.995562 0.992336 0.988102 0.983220 0.978190 0.973453 0.969486 0.966098 0.963478 0.961161 0.958702 0.955665 0.951722 0.946862 0.941191 0.934789 0.927751 0.920156 0.912108 0.903694 0.894987 0.886074 0.876160 0.866069 0.855737 0.845091 0.834097 0.823114 0.811727 0.799948 0.787776 0.775239 0.761969 0.748378 0.734473 0.720298 0.705859 0.691177 0.676309 0.661276 0.646135 0.630915 0.615370 0.599867 0.584497 0.569304 0.554370 0.539678 0.525090 0.510399 0.495437 0.480076 0.464467 0.448543 0.432511 0.416551 0.400835 0.385474 0.370505 0.355932 0.341754 0.327973 0.314601 0.301674 0.289227 0.277289 0.265875 0.254737 0.244023 0.233622 0.223429 0.213361 0.203367 0.193498 0.183815 0.174370 0.165201 0.156425 0.147979 0.139886 0.132153 0.124798 0.117756 0.111077 0.104746 0.0987385 0.0930437 0.0876006 0.0824426 0.0775554 0.0729239 0.0685374 0.0643824 0.0604503 0.0567301 0.0532114 0.0498863 0.0467440 0.0437764 0.0409754 0.0383316 0.0358380 0.0334859 0.0312712 0.0291871 0.0272285 0.0253893 0.0236638 0.0220427 0.0205175 0.0190811 0.0177273 0.0164517 0.0152571 0.0141462 0.0131190 0.0121750 0.0113109 0.0105174 0.00978530 0.00910671 0.00847506 0.00788549 0.00733516 0.00682206 0.00634435 0.00589989 0.00548665 0.00510183 0.00474276 0.00440720 0.00409300 0.00379855 0.00352331 0.00326656 0.00302753 0.00280558 0.00259989 0.00240949 0.00223348 0.00207108 0.00192137 0.00178341 0.00165608 0.00153825 0.00142897 0.00132741 0.00123287 0.00114504 0.00106350 0.000987999 0.000918149 0.000853607 0.000793911 0.000738608 0.000687299 0.000639640 0.000595298 0.000554029 0.000515560 0.000479694 0.000446220 0.000414976 0.000385909 0.000358936 0.000334001 0.000310997 0.000289818 0.000270254 0.000252110 0.000235215 0.000219417 0.000204618 0.000190769 0.000177844 0.000165802 0.000154611 0.000144225 0.000134583 0.000125626 0.000117299 0.000109552 0.000102343 0.0000956229 0.0000893523 0.0000834966 0.0000780227 0.0000729026 0.0000681198 0.0000636595 0.0000595090 0.0000556495 0.0000520642 0.0000487266 0.0000456091 0.0000426881 0.0000399459 0.0000373659 0.0000349469 0.0000326867 0.0000305818 0.0000286282 0.0000268185 0.0000251387 0.0000235739 0.0000221116 0.0000207404 0.0000194524 0.0000182427 0.0000171078 0.0000160446 0.0000150492 0.0000141184 0.0000132473 0.0000124314 0.0000116665 0.0000109492 0.0000102757 9.64427e-006 9.05268e-006 8.49874e-006 7.98071e-006 7.49648e-006 7.04373e-006 6.62014e-006 6.22388e-006 5.85294e-006 5.50563e-006 5.17963e-006 4.87338e-006 4.58491e-006 4.31281e-006 4.05592e-006 3.81371e-006 3.58588e-006 3.37189e-006 3.17139e-006 2.98370e-006 2.80802e-006 2.64366e-006 2.48977e-006 2.34564e-006 2.21062e-006 2.08400e-006 1.96498e-006 1.85297e-006 1.74738e-006 1.64774e-006 1.55370e-006 1.46506e-006 1.38157e-006 1.30295e-006 1.22895e-006 1.15934e-006 1.09392e-006 1.03245e-006 9.74704e-007 +0.000432021 0.000514053 0.000611236 0.000726037 0.000861207 0.00101973 0.00120365 0.00141722 0.00166400 0.00194764 0.00227162 0.00263593 0.00305039 0.00352435 0.00407015 0.00470361 0.00531985 0.00602565 0.00683244 0.00775275 0.00880019 0.00972066 0.0107399 0.0118713 0.0131311 0.0145384 0.0156969 0.0169716 0.0183795 0.0199412 0.0216810 0.0230272 0.0244975 0.0260873 0.0277894 0.0295928 0.0313296 0.0331568 0.0351029 0.0371993 0.0394848 0.0416739 0.0440400 0.0465544 0.0491763 0.0518568 0.0543365 0.0568276 0.0593713 0.0620164 0.0648231 0.0667969 0.0689106 0.0711511 0.0734985 0.0759331 0.0780811 0.0802737 0.0825095 0.0847888 0.0871099 0.0891422 0.0912348 0.0934234 0.0957502 0.0982570 0.101486 0.104944 0.108599 0.112416 0.116347 0.121657 0.127136 0.132790 0.138619 0.144631 0.150674 0.156867 0.163175 0.169569 0.176001 0.181712 0.187440 0.193258 0.199252 0.205518 0.210987 0.216766 0.222852 0.229229 0.235889 0.242220 0.248712 0.255271 0.261810 0.268208 0.275155 0.282022 0.288970 0.296161 0.303785 0.313697 0.324187 0.335076 0.346171 0.357238 0.371113 0.385008 0.399025 0.413294 0.427964 0.444389 0.461433 0.479054 0.497199 0.515821 0.535104 0.554769 0.574797 0.595151 0.615790 0.635465 0.655470 0.675991 0.697248 0.719454 0.738258 0.757742 0.777592 0.797453 0.816936 0.832212 0.846642 0.860316 0.873366 0.885905 0.896334 0.906449 0.916370 0.926202 0.936065 0.942481 0.949006 0.955643 0.962392 0.969280 0.975162 0.980965 0.986454 0.991423 0.995648 0.998118 0.999576 1.000000 0.999369 0.997663 0.994332 0.990297 0.985929 0.981584 0.977638 0.973564 0.969860 0.966115 0.961967 0.957033 0.950599 0.943266 0.935266 0.926845 0.918211 0.909977 0.901585 0.892835 0.883582 0.873667 0.862977 0.851565 0.839538 0.826979 0.813970 0.800569 0.786661 0.772136 0.756865 0.740730 0.723750 0.706210 0.688464 0.670868 0.653689 0.636817 0.620476 0.604489 0.588703 0.572973 0.557210 0.541344 0.525353 0.509220 0.492935 0.476492 0.460027 0.443639 0.427446 0.411544 0.395599 0.379989 0.364658 0.349562 0.334676 0.320134 0.305834 0.291851 0.278247 0.265075 0.252235 0.239868 0.227957 0.216483 0.205431 0.194797 0.184577 0.174766 0.165367 0.156365 0.147688 0.139400 0.131487 0.123937 0.116733 0.109868 0.103332 0.0971245 0.0912348 0.0856549 0.0804189 0.0754638 0.0707791 0.0663497 0.0621617 0.0582061 0.0544737 0.0509540 0.0476404 0.0445234 0.0415939 0.0388347 0.0362335 0.0337765 0.0314537 0.0292307 0.0271495 0.0252189 0.0234425 0.0218215 0.0203488 0.0189993 0.0177475 0.0165736 0.0154607 0.0144054 0.0134013 0.0124515 0.0115577 0.0107206 0.00993532 0.00920422 0.00852464 0.00789386 0.00730847 0.00676296 0.00625896 0.00579458 0.00536757 0.00497587 0.00461696 0.00428706 0.00398280 0.00370114 0.00343945 0.00319588 0.00296892 0.00275768 0.00256105 0.00237809 0.00220799 0.00204977 0.00190265 0.00176584 0.00163868 0.00152042 0.00141029 0.00130760 0.00121177 0.00112221 0.00103852 0.000960670 0.000888674 0.000822393 0.000761666 0.000706202 0.000655408 0.000608742 0.000565696 0.000525887 0.000488945 0.000454649 0.000422778 0.000393158 0.000365620 0.000339987 0.000316114 0.000293849 0.000273057 0.000253625 0.000235455 0.000218512 0.000202740 0.000188102 0.000174545 0.000162009 0.000150429 0.000139728 0.000129841 0.000120706 0.000112268 0.000104459 0.0000972189 0.0000904952 0.0000842403 0.0000784175 0.0000730021 0.0000679715 0.0000633064 0.0000589831 0.0000549815 0.0000512713 0.0000478258 0.0000446230 0.0000416393 0.0000388561 0.0000362596 0.0000338365 0.0000315732 0.0000294598 0.0000274859 0.0000256478 0.0000239414 0.0000223613 0.0000209033 0.0000195583 0.0000183137 0.0000171562 0.0000160741 0.0000150581 0.0000141008 0.0000132006 0.0000123562 0.0000115663 0.0000108289 0.0000101418 9.50149e-006 8.90469e-006 8.34825e-006 7.82908e-006 7.34473e-006 6.89176e-006 6.46760e-006 6.06954e-006 5.69558e-006 5.34378e-006 5.01336e-006 4.70369e-006 4.41395e-006 4.14339e-006 3.89093e-006 3.65485e-006 3.43349e-006 3.22545e-006 3.02932e-006 2.84426e-006 2.67013e-006 2.50694e-006 2.35459e-006 2.21282e-006 2.08116e-006 1.95860e-006 1.84410e-006 1.73669e-006 1.63568e-006 1.54037e-006 1.45051e-006 1.36589e-006 1.28630e-006 1.21153e-006 1.14132e-006 1.07535e-006 1.01331e-006 9.54908e-007 8.99915e-007 8.48069e-007 7.99281e-007 7.53456e-007 7.10436e-007 6.70150e-007 6.32423e-007 5.97094e-007 5.63959e-007 5.32846e-007 5.03599e-007 4.76077e-007 4.50121e-007 4.25599e-007 4.02375e-007 3.80356e-007 3.59451e-007 3.39632e-007 3.20897e-007 3.03217e-007 2.86563e-007 2.70910e-007 2.56189e-007 2.42346e-007 2.29318e-007 2.17056e-007 2.05506e-007 1.94606e-007 1.84305e-007 1.74549e-007 1.65295e-007 1.56501e-007 1.48152e-007 1.40231e-007 1.32725e-007 1.25611e-007 1.18879e-007 1.12507e-007 1.06484e-007 1.00795e-007 9.54185e-008 +0.0112859 0.0132722 0.0156194 0.0183907 0.0216591 0.0255081 0.0300011 0.0352675 0.0414281 0.0486165 0.0569825 0.0665941 0.0777326 0.0906493 0.105642 0.123063 0.140054 0.159351 0.181232 0.206013 0.234032 0.258506 0.285361 0.314853 0.347265 0.382938 0.411256 0.441605 0.474081 0.508782 0.545811 0.570502 0.596013 0.622337 0.649444 0.677335 0.702388 0.727882 0.753753 0.779969 0.806450 0.826771 0.847047 0.867388 0.887948 0.908860 0.926604 0.944553 0.962533 0.980383 0.997879 0.999194 0.999844 1.000000 0.999870 0.999638 0.994834 0.989517 0.983090 0.974956 0.964583 0.948032 0.929586 0.910012 0.890013 0.870252 0.855423 0.840987 0.826642 0.812152 0.797275 0.790277 0.782220 0.772862 0.762028 0.749528 0.734516 0.717733 0.699263 0.679154 0.657489 0.631917 0.605593 0.578960 0.552408 0.526296 0.498148 0.471176 0.445507 0.421224 0.398377 0.376034 0.354937 0.334817 0.315432 0.296609 0.279024 0.262038 0.245871 0.230693 0.216620 0.204806 0.193823 0.183497 0.173668 0.164214 0.156319 0.148534 0.140842 0.133234 0.125710 0.118596 0.111548 0.104584 0.0977280 0.0910017 0.0844928 0.0782733 0.0724517 0.0671031 0.0622739 0.0578578 0.0538922 0.0502822 0.0469527 0.0438408 0.0406535 0.0376714 0.0348901 0.0323036 0.0299072 0.0275734 0.0254199 0.0234265 0.0215776 0.0198596 0.0182264 0.0167180 0.0153310 0.0140621 0.0129061 0.0118102 0.0108132 0.00990156 0.00906381 0.00829075 0.00756656 0.00689905 0.00628589 0.00572468 0.00521234 0.00474188 0.00431376 0.00392408 0.00356918 0.00324583 0.00294939 0.00267945 0.00243370 0.00220997 0.00200643 0.00181983 0.00165042 0.00149684 0.00135774 0.00123190 0.00111759 0.00101415 0.000920419 0.000835383 0.000758113 0.000688181 0.000624611 0.000566886 0.000514517 0.000467027 0.000423998 0.000385020 0.000349688 0.000317664 0.000288625 0.000262299 0.000238418 0.000216756 0.000197106 0.000179279 0.000163101 0.000148427 0.000135116 0.000123047 0.000112107 0.000102136 0.0000930950 0.0000848911 0.0000774403 0.0000706708 0.0000645164 0.0000589181 0.0000538252 0.0000491883 0.0000449663 0.0000411192 0.0000376176 0.0000344331 0.0000315377 0.0000289069 0.0000264909 0.0000242936 0.0000222918 0.0000204633 0.0000187904 0.0000172662 0.0000158704 0.0000145931 0.0000134256 0.0000123592 0.0000113798 0.0000104854 9.66690e-006 8.91717e-006 8.22954e-006 7.59806e-006 7.01825e-006 6.48611e-006 5.99775e-006 5.54972e-006 1.00051e-011 1.00311e-011 1.00572e-011 1.00833e-011 1.01095e-011 1.01357e-011 1.01619e-011 1.01882e-011 1.02145e-011 1.02409e-011 1.02723e-011 1.03038e-011 1.03353e-011 1.03670e-011 1.03987e-011 1.04304e-011 1.04623e-011 1.04942e-011 1.05262e-011 1.05582e-011 1.05904e-011 1.06226e-011 1.06548e-011 1.06872e-011 1.07196e-011 1.07416e-011 1.07636e-011 1.07856e-011 1.08077e-011 1.08297e-011 1.08518e-011 1.08739e-011 1.08960e-011 1.09182e-011 1.09403e-011 1.09679e-011 1.09955e-011 1.10231e-011 1.10507e-011 1.10784e-011 1.11008e-011 1.11231e-011 1.11455e-011 1.11679e-011 1.11903e-011 1.12072e-011 1.12242e-011 1.12412e-011 1.12581e-011 1.12751e-011 1.12920e-011 1.13090e-011 1.13259e-011 1.13429e-011 1.13598e-011 1.13768e-011 1.13938e-011 1.14107e-011 1.14277e-011 1.14446e-011 1.14616e-011 1.14785e-011 1.14955e-011 1.15124e-011 1.15294e-011 1.15463e-011 1.15633e-011 1.15803e-011 1.15972e-011 1.16142e-011 1.16311e-011 1.16481e-011 1.16650e-011 1.16820e-011 1.16989e-011 1.17159e-011 1.17329e-011 1.17498e-011 1.17668e-011 1.17837e-011 1.18007e-011 1.18176e-011 1.18346e-011 1.18515e-011 1.18685e-011 1.18854e-011 1.19024e-011 1.19194e-011 1.19363e-011 1.19533e-011 1.19702e-011 1.19872e-011 1.20041e-011 1.20211e-011 1.20380e-011 1.20550e-011 1.20720e-011 1.20889e-011 1.21059e-011 1.21228e-011 1.21398e-011 1.21567e-011 1.21737e-011 1.21906e-011 1.22076e-011 1.22245e-011 1.22415e-011 1.22585e-011 1.22754e-011 1.22924e-011 1.23093e-011 1.23263e-011 1.23432e-011 1.23602e-011 1.23771e-011 1.23941e-011 1.24111e-011 1.24280e-011 1.24450e-011 1.24619e-011 1.24789e-011 1.24958e-011 1.25128e-011 1.25297e-011 1.25467e-011 1.25636e-011 1.25806e-011 1.25976e-011 1.26145e-011 1.26315e-011 1.26484e-011 1.26654e-011 1.26823e-011 1.26993e-011 1.27162e-011 1.27332e-011 1.27502e-011 1.27671e-011 1.27841e-011 1.28010e-011 1.28180e-011 1.28349e-011 1.28519e-011 1.28688e-011 1.28858e-011 1.29027e-011 1.29197e-011 1.29367e-011 1.29536e-011 1.29706e-011 1.29875e-011 1.30045e-011 1.30214e-011 1.30384e-011 1.30553e-011 1.30723e-011 1.30893e-011 1.31062e-011 1.31232e-011 1.31401e-011 1.31571e-011 1.31740e-011 1.31910e-011 1.32079e-011 1.32249e-011 1.32418e-011 1.32588e-011 1.32758e-011 1.32927e-011 1.33097e-011 1.33266e-011 1.33436e-011 1.33605e-011 1.33775e-011 1.33944e-011 1.34114e-011 1.34284e-011 1.34453e-011 1.34623e-011 1.34792e-011 1.34962e-011 1.35131e-011 1.35301e-011 1.35470e-011 1.35640e-011 1.35809e-011 1.35979e-011 1.36149e-011 1.36318e-011 1.36488e-011 1.36657e-011 1.36827e-011 1.36996e-011 1.37166e-011 1.37335e-011 1.37505e-011 1.37675e-011 1.37844e-011 1.38014e-011 1.38183e-011 1.38353e-011 1.38522e-011 1.38692e-011 1.38861e-011 1.39031e-011 1.39200e-011 1.39370e-011 1.39540e-011 1.39709e-011 1.39879e-011 1.40048e-011 1.40218e-011 1.40387e-011 1.40557e-011 1.40726e-011 +END_DATA diff --git a/ref/Trulux.sp b/ref/Trulux.sp index fc5bb0f..fc5bb0f 100644..100755 --- a/ref/Trulux.sp +++ b/ref/Trulux.sp diff --git a/ref/TruluxPlus.sp b/ref/TruluxPlus.sp index 0fd9c39..0fd9c39 100644..100755 --- a/ref/TruluxPlus.sp +++ b/ref/TruluxPlus.sp diff --git a/ref/afiles b/ref/afiles index 1b1fc6c..f52fe6c 100644..100755 --- a/ref/afiles +++ b/ref/afiles @@ -73,3 +73,4 @@ TruluxPlus.sp example.sp example121.sp CRT.ccss +StandardObs2deg.cmf diff --git a/ref/ccxx.ti1 b/ref/ccxx.ti1 index 47f2b13..47f2b13 100644..100755 --- a/ref/ccxx.ti1 +++ b/ref/ccxx.ti1 diff --git a/ref/cmyk.icm b/ref/cmyk.icm Binary files differindex 7f07077..7f07077 100644..100755 --- a/ref/cmyk.icm +++ b/ref/cmyk.icm diff --git a/ref/example.sp b/ref/example.sp index 08d836e..08d836e 100644..100755 --- a/ref/example.sp +++ b/ref/example.sp diff --git a/ref/example121.sp b/ref/example121.sp index d139c38..d139c38 100644..100755 --- a/ref/example121.sp +++ b/ref/example121.sp diff --git a/ref/i1_RGB_Scan_1.4.cht b/ref/i1_RGB_Scan_1.4.cht index 3a3d7c9..3a3d7c9 100644..100755 --- a/ref/i1_RGB_Scan_1.4.cht +++ b/ref/i1_RGB_Scan_1.4.cht diff --git a/ref/i1_RGB_Scan_1.4.ti2 b/ref/i1_RGB_Scan_1.4.ti2 index 8aaf081..8aaf081 100644..100755 --- a/ref/i1_RGB_Scan_1.4.ti2 +++ b/ref/i1_RGB_Scan_1.4.ti2 diff --git a/ref/it8.cht b/ref/it8.cht index f1e256d..f1e256d 100644..100755 --- a/ref/it8.cht +++ b/ref/it8.cht diff --git a/ref/lab2lab.icm b/ref/lab2lab.icm Binary files differindex 39a5911..39a5911 100644..100755 --- a/ref/lab2lab.icm +++ b/ref/lab2lab.icm diff --git a/ref/linear.cal b/ref/linear.cal index bdbf22c..1dafbde 100644..100755 --- a/ref/linear.cal +++ b/ref/linear.cal @@ -2,7 +2,7 @@ CAL DESCRIPTOR "Argyll Device Calibration Curves" ORIGINATOR "Argyll synthcal" -CREATED "Tue Sep 27 01:29:33 2016" +CREATED "Fri Nov 17 01:11:11 2017" DEVICE_CLASS "DISPLAY" COLOR_REP "RGB" diff --git a/ref/sRGB.icm b/ref/sRGB.icm Binary files differindex 59b4507..59b4507 100644..100755 --- a/ref/sRGB.icm +++ b/ref/sRGB.icm diff --git a/ref/strange.cal b/ref/strange.cal index 94bacf5..b31bbed 100644..100755 --- a/ref/strange.cal +++ b/ref/strange.cal @@ -2,7 +2,7 @@ CAL DESCRIPTOR "Argyll Device Calibration Curves" ORIGINATOR "Argyll synthcal" -CREATED "Tue Sep 27 01:29:33 2016" +CREATED "Fri Nov 17 01:11:11 2017" DEVICE_CLASS "DISPLAY" COLOR_REP "RGB" diff --git a/render/Jamfile b/render/Jamfile index 7c9704b..7c9704b 100644..100755 --- a/render/Jamfile +++ b/render/Jamfile diff --git a/render/License.txt b/render/License.txt index a871fcf..a871fcf 100644..100755 --- a/render/License.txt +++ b/render/License.txt diff --git a/render/Readme.txt b/render/Readme.txt index 6ed3ea7..6ed3ea7 100644..100755 --- a/render/Readme.txt +++ b/render/Readme.txt diff --git a/render/afiles b/render/afiles index 26a7384..26a7384 100644..100755 --- a/render/afiles +++ b/render/afiles diff --git a/render/makecharts.ksh b/render/makecharts.ksh index 98ceb11..98ceb11 100644..100755 --- a/render/makecharts.ksh +++ b/render/makecharts.ksh diff --git a/render/render.c b/render/render.c index d6ab108..b4acb6c 100644..100755 --- a/render/render.c +++ b/render/render.c @@ -84,7 +84,7 @@ static void cvt_Lab_to_CIELAB16(double *out, double *in) { out[0] = 100.0; out[0] = out[0] / 100.0 * 65535.0; - out[1] = in[1]; + out[1] = 256.0 * in[1]; if (out[1] < -32768.0) out[1] = -32768.0; else if (out[1] > 32767.0) @@ -92,7 +92,7 @@ static void cvt_Lab_to_CIELAB16(double *out, double *in) { if (out[1] < 0.0) out[1] = 65536.0 + out[1]; - out[2] = in[2]; + out[2] = 256.0 * in[2]; if (out[2] < -32768.0) out[2] = -32768.0; else if (out[2] > 32767.0) @@ -733,6 +733,7 @@ static int render2d_write( for (j = 0; j < s->ncc; j++) pixv1[x][j] = rv[j]; pixv1[x][PRIX2D] = rv[PRIX2D]; +//printf("x %d y %d, set %f %f %f ix %f\n",x,y,rv[0],rv[1],rv[2], rv[PRIX2D]); } pthp = &th->xl; th = th->xl; @@ -827,7 +828,9 @@ static int render2d_write( /* Translate from render value to output pixel value */ if (s->dpth == bpc8_2d) { - /* if dithering and dithering all or found FG in line */ + + /* if dithering and dithering all or found FG in line, */ + /* start with 16 bit values to dither from */ if (s->dither) { unsigned short *p = ((unsigned short *)dithbuf16) + x * s->ncc; @@ -839,6 +842,8 @@ static int render2d_write( for (j = 0; j < s->ncc; j++) p[j] = (int)(65535.0 * cc[j] + 0.5); } + + /* Else quantize to 8 bits */ } else { unsigned char *p = ((unsigned char *)outbuf) + x * s->ncc; if (s->csp == lab_2d) { @@ -932,6 +937,7 @@ static int render2d_write( #endif if (fmt == tiff_file) { #ifdef RENDER_TIFF + if (TIFFWriteScanline(wh, outbuf, y, 0) < 0) { a1loge(g_log, 1, "Failed to write TIFF file '%s' line %d\n",filename,y); return 1; @@ -1230,7 +1236,6 @@ static int rectvs2d_rend(prim2d *ss, color2d rv, double x, double y) { rv[j] = 0.0; for (i = 0; i < 4; i++) rv[j] += b[i] * s->c[i][j]; - rv[j] = rv[j]; } rv[PRIX2D] = s->ix; diff --git a/render/render.h b/render/render.h index 26b7028..26b7028 100644..100755 --- a/render/render.h +++ b/render/render.h diff --git a/render/screens.h b/render/screens.h index 353597b..353597b 100644..100755 --- a/render/screens.h +++ b/render/screens.h diff --git a/render/thscreen.c b/render/thscreen.c index 7c115f3..7c115f3 100644..100755 --- a/render/thscreen.c +++ b/render/thscreen.c diff --git a/render/thscreen.h b/render/thscreen.h index f14a8a4..f14a8a4 100644..100755 --- a/render/thscreen.h +++ b/render/thscreen.h diff --git a/render/timage.c b/render/timage.c index 20c999a..54ce04f 100644..100755 --- a/render/timage.c +++ b/render/timage.c @@ -39,7 +39,7 @@ #include "render.h" #define DEF_DPI 200 -#define DITHER 0x8002 /* [0] 1 for test 8 bit dithering, 2 for test error diffusion */ +#define DITHER 0 /* [0] 1 for test 8 bit dithering, 2 for test error diffusion */ /* 0x8001 for dithering FG only, 0x8002 for err. diff. FG only */ #undef PNG_MEM /* Test PNG save to memory */ diff --git a/rspl/Jamfile b/rspl/Jamfile index 0d93acc..6f80f9f 100644 --- a/rspl/Jamfile +++ b/rspl/Jamfile @@ -27,6 +27,8 @@ HDRS = ../h ../numlib ../plot $(TIFFINC) ; LINKLIBS = librspl ../plot/libplot ../numlib/libnum ../numlib/libui ../plot/libvrml ../icc/libicc $(TIFFLIB) $(JPEGLIB) ; # Test programs +LINKFLAGS += $(GUILINKFLAGS) ; + MainsFromSources revbench.c c1.c cw1.c cw3.c c1df.c t2d.c t2ddf.c t3d.c t3ddf.c tnd.c trnd.c ; BUILD_TESTS = false ; diff --git a/rspl/c1.c b/rspl/c1.c index 31849ee..31849ee 100644..100755 --- a/rspl/c1.c +++ b/rspl/c1.c diff --git a/rspl/c1df.c b/rspl/c1df.c index 4020d7a..4020d7a 100644..100755 --- a/rspl/c1df.c +++ b/rspl/c1df.c diff --git a/rspl/cw1.c b/rspl/cw1.c index 2a026c8..2a026c8 100644..100755 --- a/rspl/cw1.c +++ b/rspl/cw1.c diff --git a/rspl/cw3.c b/rspl/cw3.c index e26cb7a..e26cb7a 100644..100755 --- a/rspl/cw3.c +++ b/rspl/cw3.c diff --git a/rspl/gam.c b/rspl/gam.c index 0765e05..2a9a63b 100644..100755 --- a/rspl/gam.c +++ b/rspl/gam.c @@ -21,9 +21,14 @@ /* This probably needs re-writing, since (I think) it doesn't take gamut - self intersection into account. Outline would be: + self intersection into account. The rspl/rec.c code works more + reliably, but doesn't cope with concavities that cross the line + to the focal point. So can this "surface following" code be + adapted to solve this type of problem ? - Have a spactial cache structure that contains list of potentialy + Outline would be: + + Have a spatial cache structure that contains list of potentialy intersecting triangles for any point. Create this incrementally. Each triangle can be replaced by a list of fragment triangles sharing the same plane. @@ -61,6 +66,9 @@ Each intersection adds new nodes, and splits a triangle into about 8 smaller triangles. Trick is to avoid slivers and numerical issues with triangles. + + Alternative would be to not split triangles, but just track + the line of intersection ? */ @@ -72,6 +80,7 @@ Add ink limit support. This be done by breaking a cell into a fixed geometry of smaller simplexes by dividing the cell into two on each axis. + (rspl/rev.c has code for this ??) Need to then add scan that detects areas to prune, that then ties in with rev code to mark such diff --git a/rspl/gam.h b/rspl/gam.h index 0892e4d..0892e4d 100644..100755 --- a/rspl/gam.h +++ b/rspl/gam.h diff --git a/rspl/mlbs.c b/rspl/mlbs.c index bbe3865..bbe3865 100644..100755 --- a/rspl/mlbs.c +++ b/rspl/mlbs.c diff --git a/rspl/mlbs.h b/rspl/mlbs.h index 4678cfd..4678cfd 100644..100755 --- a/rspl/mlbs.h +++ b/rspl/mlbs.h diff --git a/rspl/opt.c b/rspl/opt.c index d5a70ce..d5a70ce 100644..100755 --- a/rspl/opt.c +++ b/rspl/opt.c diff --git a/rspl/rev.c b/rspl/rev.c index f2f717b..017943b 100644..100755 --- a/rspl/rev.c +++ b/rspl/rev.c @@ -72,7 +72,6 @@ a particular aux target that lies within that segment. (1150 near black, k ~= 0.4). - */ #include <stdio.h> @@ -109,9 +108,13 @@ //#undef DMALLOC_GLOBALS #define DOSORT /* [def] Cell sort for better speed */ +#undef EN_UNTWIST /* [und] Force attempt to try and untwist gamut surface */ + /* - Seems to improve some, make some worse ?? (i.e Bonet) */ + /* By default this is controlled using ARGYLL_UNTWIST_GAMUT_SURFACE */ + /* environment variable. */ #undef REVTABLESTATS /* [und] Reverse table stats */ -#undef REVVRML /* [und] Reverse table plots */ +#undef REVVRML /* [und] Reverse table 3D plots */ #undef DEBUG1 /* [und] Higher level code */ #undef DEBUG2 /* [und] Lower level code */ @@ -172,16 +175,16 @@ int thissz, lastsz = -1; #endif #ifdef REVTABLESTATS -#pragma message("!!!!!!!!! REVTABLESTATS set in rspl/rev.c !!!!!!!!!!!") +# pragma message("!!!!!!!!! REVTABLESTATS set in rspl/rev.c !!!!!!!!!!!") #endif #ifdef REVVRML -#pragma message("!!!!!!!!! REVVRML set in rspl/rev.c !!!!!!!!!!!") -#include "vrml.h" +# pragma message("!!!!!!!!! REVVRML set in rspl/rev.c !!!!!!!!!!!") +# include "vrml.h" #endif #ifdef CHECK_NNLU -#pragma message("!!!!!!!!! CHECK_NNLU set in rspl/rspl.h !!!!!!!!!!!") +# pragma message("!!!!!!!!! CHECK_NNLU set in rspl/rspl.h !!!!!!!!!!!") #endif /* Do an arbitrary printf */ @@ -356,7 +359,7 @@ static void rev_test_vram(size_t size) { static void *rev_malloc(rspl *s, size_t size) { void *rv; - if ((size + 1 * 1024 * 1204) > g_test_ram) + if ((size + 1 * 1024 * 1024) > g_test_ram) rev_test_vram(size); if ((rv = malloc(size)) == NULL) { rev_reduce_cache(size); @@ -371,7 +374,7 @@ static void *rev_malloc(rspl *s, size_t size) { static void *rev_calloc(rspl *s, size_t num, size_t size) { void *rv; - if (((num * size) + 1 * 1024 * 1204) > g_test_ram) + if (((num * size) + 1 * 1024 * 1024) > g_test_ram) rev_test_vram(size); if ((rv = calloc(num, size)) == NULL) { rev_reduce_cache(num * size); @@ -386,7 +389,7 @@ static void *rev_calloc(rspl *s, size_t num, size_t size) { static void *rev_realloc(rspl *s, void *ptr, size_t size) { void *rv; - if ((size + 1 * 1024 * 1204) > g_test_ram) + if ((size + 1 * 1024 * 1024) > g_test_ram) rev_test_vram(size); if ((rv = realloc(ptr, size)) == NULL) { rev_reduce_cache(size); /* approximation */ @@ -1323,7 +1326,7 @@ set_search_limit( /* should evaluate in[0..di-1], and return number that is not to exceed */ /* limitv. NULL if not used */ void *lcntx, /* Context passed to limit() */ - double limitv /* Value that limit() is not to exceed */ + double limitv /* Value that limitf() is not to exceed */ ) { schbase *b = NULL; /* Pointer to search base information structure */ @@ -4025,10 +4028,11 @@ double *err /* Output error (weighted) distance at solution point */ } #ifdef DEBUG - if (wsrv2) + if (wsrv2) { DBG(("Got second ink limit triangle in tetrahedron\n")); - else if (wsrv) + } else if (wsrv) { DBG(("Got first ink limit triangle in tetrahedron\n")); + } #endif *err = dist; return wsrv; @@ -6820,7 +6824,7 @@ static void free_surfhash(rspl *s, int del) { /* vertex status */ typedef enum { - vtx_norm = 0, /* Normal vertex in primary bxcell */ + vtx_norm = 0, /* Normal vertex in primary bxcell - initial value */ vtx_sha = 1, /* Vertex has been shadowed */ vtx_del = 2, /* Vertex has been deleted because it's shadowed */ vtx_oil = 3 /* Vertex is over ink limit */ @@ -6828,8 +6832,9 @@ typedef enum { struct _vtxrec { int ix; /* fwd index of vertex */ - int cix; /* Cell index for this vertex */ - double v[MXRO]; /* Output value of vertex */ + int cix; /* Fwd cell vertex is in index */ + double vv[MXRO]; /* Output value of vertex */ + double vl[MXRO]; /* Log compressed output value of vertex */ double dist; /* Distance from center point squared */ int tcount; /* Touch count for converting to fwd cells */ int acount; /* Actual count for converting to fwd cells */ @@ -6866,7 +6871,7 @@ struct _vtxcache { }; typedef struct _vtxcache vtxcache; -/* Create the vertex list & hash */ +/* Create the (empty) vertex list & hash */ static void create_vtxrec_list(rspl *s, vtxcache *vc) { vc->hash_size = primes[3]; /* 3373 */ if ((vc->hash = (vtxrec **) rev_calloc(s, vc->hash_size, sizeof(vtxrec *))) == NULL) @@ -6949,16 +6954,67 @@ static vtxrec *get_vtxrec(vtxcache *vc, int ix) { hash = ix % vc->hash_size; - for (vx = vc->hash[hash]; vx != NULL; vx = vx->hlink) { + for (vx = vc->hash[hash]; vx != NULL; vx = vx->hlink) { if (vx->ix == ix) return vx; } return NULL; } +/* Log compress an output value wrt to center point */ +static void logcomp( + rspl *s, + double *out, + double *in, + double *cent +) { + int f, fdi = s->fdi; + double len; + + if (s->rev.surflin_en) { +#ifdef NEVER + /* (This doesn't seem to improve things) */ + /* Calculate vector length */ + for (len = 0.0, f = 0; f < fdi; f++) { + double tt= in[f] - cent[f]; + len += tt * tt; + } + len = sqrt(len); + + /* change length to log length */ + if (len > DBL_EPSILON) { + + len = 20.0 * pow(len, 0.25)/len; /* Ratio */ + + for (f = 0; f < fdi; f++) { + double tt = in[f] - cent[f]; + out[f] = len * tt + cent[f]; + } + } +#else + if (s->rev.surflin != NULL) { + co p; + + for (f = 0; f < fdi; f++) + p.p[f] = in[f]; + s->rev.surflin->interp(s->rev.surflin, &p); + for (f = 0; f < fdi; f++) + out[f] = p.v[f] - s->rev.linoff[f]; + } else { + for (f = 0; f < fdi; f++) + out[f] = in[f]; + } +#endif + } else { + for (f = 0; f < fdi; f++) + out[f] = in[f]; + } +} + /* Create a new vtxrec or return the current one. */ /* Allocates it, adds it to cache. */ /* DOESN"T add it to vtxlist. */ +/* If new, sets status = vtx_norm */ static vtxrec *new_vtxrec( rspl *s, vtxcache *vc, @@ -7005,12 +7061,15 @@ static vtxrec *new_vtxrec( /* Get the output value */ for (f = 0; f < fdi; f++) - vx->v[f] = gp[f]; + vx->vv[f] = gp[f]; + + /* Set vl[] */ + logcomp(s, vx->vl, vx->vv, s->rev.ocent); /* Compute distance to overall center point squared */ vx->dist = 0.0; for (f = 0; f < fdi; f++) { - double tt = gp[f] - s->rev.ocent[f]; + double tt = vx->vl[f] - s->rev.ocent[f]; vx->dist += tt * tt; } @@ -7020,7 +7079,7 @@ static vtxrec *new_vtxrec( int mi; double gw = s->rev.gw[f]; double gl = s->rev.gl[f]; - t = (vx->v[f] - gl)/gw; + t = (vx->vv[f] - gl)/gw; mi = (int)floor(t); /* Grid coordinate */ if (mi < 0) /* Limit to valid cube base index range */ mi = 0; @@ -7442,7 +7501,7 @@ static void extend_bxcell_shadow_group( /* vertex length from gamut center */ for (vlen= 0.0, f = 0; f < fdi; f++) { - double tt = vx->v[f] - s->rev.ocent[f]; + double tt = vx->vl[f] - s->rev.ocent[f]; vlen += tt * tt; } vlen = sqrt(vlen); @@ -7453,7 +7512,7 @@ static void extend_bxcell_shadow_group( scale = 1.0; for (f = 0; f < fdi; f++) - sv[f] = (scale * (vx->v[f] - s->rev.ocent[f])) + s->rev.ocent[f]; + sv[f] = (scale * (vx->vl[f] - s->rev.ocent[f])) + s->rev.ocent[f]; /* Distance from scaled vertex to group center */ for (w = 0.0, f = 0; f < fdi; f++) { @@ -8389,13 +8448,13 @@ static void plot_fxcell_surface(rspl *s, int dofclabels, int dobxcells, int dowa is inside or on the surface of the gamut. A simple and definitive topological rule hasn't been forthcoming, so a simpler heursitic of visiblilty from a singe internal "focal" point is currently used. - calc_ocent() attempts to choose a point with best visibilit of + calc_ocent() attempts to choose a point with best visibility of all the gamut surfaces, since any self-shadowing results in gamut surface holes. Improvements would be to create per-axis mappings (and separate the shadow vertex locations from the real ones) to re-shape - the gamut into a squere as much as possible. + the gamut into a square as much as possible. Multiple external focal points could be used, a vertex being shadowed only when it can't be "seen" by any external focal point. It's hard to figure how to make the latter @@ -8408,12 +8467,19 @@ static void plot_fxcell_surface(rspl *s, int dofclabels, int dobxcells, int dowa accelleration structure for shadow testing (BSP tree ??), and build the gamut surface incrementally from existing furthest points. + + (Have loop re-orderings been exausted ? i.e. can overlap + triangle processing "Do a first pass for each test vertex, + testing against just the triangles that are associated with + it's triangle" be used for main shadowing testing ?) */ /* Struct to slice locus points */ struct _slpoint { double v[MXRO]; /* Point location */ - double rad; /* Distance from ccent */ + double wrad; /* Weighted radius */ + double rad; /* Distance from ccent along slice */ + double minrad; /* Minimum distance from ccent */ double cvec[MXRO]; /* Vector from this point to ccent */ double len; /* Length of segment, -1 if no good */ @@ -8426,12 +8492,15 @@ struct _ocenctx { int ares; /* angle resolution */ slpoint *p[MXRO]; /* Slice locus points */ double ccent[MXRO]; /* Construction center point */ + double ret; /* return value */ + int oog; /* flag set if center is out of gamut */ int debug; }; typedef struct _ocenctx ocenctx; /* Given a set of slice locus points and a proposed center point, */ -/* compute the weighted averag of the orthogonality of the point */ +/* compute the weighted average of the orthogonality of the point */ /* to each locus line segment. (smaller is better) */ +/* (Used for optimizing the focal/center point.) */ static double aorthog(void *_ctx, double *cent) { ocenctx *ctx = (ocenctx *) _ctx; rspl *s = ctx->s; @@ -8441,6 +8510,8 @@ static double aorthog(void *_ctx, double *cent) { double ang, aang = 0.0; int naang = 0; + ctx->oog = 0; + if (ctx->debug) printf("aorthog called with cent %s\n",debPdv(fdi,cent)); for (ff = 0; ff < fdi; ff++) { @@ -8480,7 +8551,10 @@ static double aorthog(void *_ctx, double *cent) { /* Normalized difference in distance over length */ /* Compute dot product of cv and segment vector */ + /* (ang range 0.0 .. 1.0 */ ang = fabs(trad - nrad)/ctx->p[ff][aa].len; + if (ang > 1.0) + ang = 1.0; if (ctx->debug) printf(" aa %d: trad %f nrad %f, diff %f, len %f, ang %f\n",aa,trad,nrad,fabs(trad - nrad),ctx->p[ff][aa].len,ang); @@ -8493,14 +8567,11 @@ static double aorthog(void *_ctx, double *cent) { if (dot < 0.0) { if (ctx->debug) printf(" dot is %f\n",dot); - ang = 50.0; /* Big value */ + ang = 50.0; /* Big value */ + ctx->oog = 1; } else { ang = pow(ang, 50.0); /* Weight high angles */ } - - if (ang > aang) - aang = ang; - aang += ang; naang++; } @@ -8509,6 +8580,8 @@ static double aorthog(void *_ctx, double *cent) { if (ctx->debug) printf(" returning %f\n",aang); + ctx->ret = aang; + return aang; } @@ -8518,6 +8591,7 @@ static double aorthog(void *_ctx, double *cent) { /* surface of the gamut. */ static void calc_ocent(rspl *s) { int i, j, aa, mm; + int e, ee, di = s->di; int f, ff, fdi = s->fdi; int rgres = s->rev.res; /* number of bwd cells */ double minmax[2][MXRO][MXRO]; /* Range min/max points for each axis */ @@ -8527,14 +8601,15 @@ static void calc_ocent(rspl *s) { double ss[MXRO]; ocenctx ctx; /* Context */ double atanscale; + int ici, nici; /* Scan the forward array for the min and max points of each axis */ for (f = 0; f < fdi; f++) { - minmax[0][f][f] = 1e30; - minmax[1][f][f] = -1e30; + minmax[0][f][f] = 1e200; + minmax[1][f][f] = -1e200; } - /* Scan the Grid for min/max values */ + /* Scan the fwd Grid for min/max values */ for (gp = s->g.a, ep = s->g.a + s->g.no * s->g.pss; gp < ep; gp += s->g.pss) { for (ff = 0; ff < fdi; ff++) { if (minmax[0][ff][ff] > gp[ff]) { @@ -8550,8 +8625,8 @@ static void calc_ocent(rspl *s) { if (fdi == 1) { for (f = 0; f < fdi; f++) - s->rev.ocent[f] = 0.5 * (minmax[0][0][f] + minmax[1][0][f]); - DBG(("calc_ocent: got ocent = %s\n",debPdv(fdi,s->rev.ocent))); + s->rev.ocent[f] = 0.5 * (minmax[0][f][f] + minmax[1][f][f]); + DBG(("calc_ocent: got 1d ocent = %s\n",debPdv(fdi,s->rev.ocent))); return; } @@ -8569,7 +8644,8 @@ static void calc_ocent(rspl *s) { for (f = 0; f < fdi; f++) s->rev.ocent[f] = ctx.ccent[f] /= ((fdi-1) * 2.0); - DBG(("calc_ocent: ccent = %s\n",debPdv(fdi,ctx.ccent))); + DBG(("calc_ocent: initial ccent = %s\n",debPdv(fdi,ctx.ccent))); +//printf("calc_ocent: initial ccent = %s\n",debPdv(fdi,ctx.ccent)); /* If it's all to hard ... */ if (fdi != 3) { @@ -8581,11 +8657,17 @@ static void calc_ocent(rspl *s) { midix[f] = (int)((ctx.ccent[f] - s->rev.gl[f])/s->rev.gw[f] + 0.5); mid[f] = (midix[f]+0.5) * s->rev.gw[f] + s->rev.gl[f]; } +//printf("calc_ocent: mid point = %s\n",debPdv(fdi,mid)); /* Array for each slice values at angle (+ repeat at end) */ ctx.debug = 0; ctx.s = s; - ctx.ares = 20; + ctx.ares = (rgres + 1) & ~1; /* Make even so that there is an opposite angle */ + if (ctx.ares < 6) + ctx.ares = 6; + else if (ctx.ares > 20) + ctx.ares = 20; +//printf(" ocent ares %d\n",ctx.ares); atanscale = ctx.ares/(2.0 * DBL_PI); for (ff = 0; ff < fdi; ff++) { if ((ctx.p[ff] = (slpoint *)rev_calloc(s, ctx.ares+1,sizeof(slpoint))) == NULL) @@ -8593,96 +8675,201 @@ static void calc_ocent(rspl *s) { INCSZ(s, (ctx.ares+1) * sizeof(slpoint)); } -//printf("~1 locating center point\n"); + /* Use 5 passes to locate a more reliable initial center point */ + for (nici = 10, ici = 0; ici < nici; ici++) { +//printf(" locating center point iter %d\n",ici); - /* Set initial radius values */ - for (aa = 0; aa < ctx.ares; aa++) { - for (ff = 0; ff < fdi; ff++) - ctx.p[ff][aa].rad = -1.0; - } - - /* Take three slices through the rev[] array, plotting */ - /* the maximum circumference for the slice */ + /* Set initial radius values */ + for (ff = 0; ff < fdi; ff++) { + for (aa = 0; aa < ctx.ares; aa++) { + ctx.p[ff][aa].wrad = -1.0; + ctx.p[ff][aa].rad = -1.0; + ctx.p[ff][aa].minrad = 1e38; + } + } + + /* Take three slices through the rev[] array, plotting */ + /* the maximum circumference for the slice */ - /* For the axis we're slicing */ - for (ff = 0; ff < fdi; ff++) { - DCOUNT(cc, MXRO, 2, 0, 0, rgres); /* Counter through bwd cells */ - double vv[MXRO]; - int aa; - + /* For the axis we're slicing */ + for (ff = 0; ff < fdi; ff++) { + FCOUNT(cc, MXRO, 3); /* Counter through bwd cells */ + int start[3], endp1[3]; + double vv[MXRO]; + int aa; + //printf(" slice axis %d\n",ff); - /* Scan this slice of rev[] */ - DC_INIT(cc); - while (!DC_DONE(cc)) { - int ix; - int slix[2]; /* Indexes in slice direction */ - int *rp; - int co[MXRO]; - - /* Compute bx index */ - ix = 0; - for (j = f = 0; f < fdi; f++) { - if (f == ff) - co[f] = midix[f]; - else { - slix[j] = f; - co[f] = cc[j++]; + /* Setup "fat" slice range */ + for (f = 0; f < fdi; f++) { + if (f == ff) { + start[f] = midix[f]-1; + if (start[f] < 0) + start[f] = 0; + endp1[f] = midix[f]+2; + if (endp1[f] > rgres) + endp1[f] = rgres; + } else { + start[f] = 0; + endp1[f] = rgres; } - ix += co[f] * s->rev.coi[f]; } -//printf(" bx %d, %d ix %d\n",co[0],co[1],co[2],ix); + FRECONFA(cc, start, endp1); + +//printf(" slice range %d - %d, %d - %d, %d - %d\n", start[0], endp1[0]-1, start[1], endp1[1]-1, start[2], endp1[2]-1); + + /* Scan this 3 thick, 2D slice of rev[] */ + FC_INIT(cc); + while (!FC_DONE(cc)) { + int ix; + int slix[MXRO]; /* Indexes in slice direction + orthogonal */ + int *rp; + + /* Compute bx index */ + ix = 0; + for (j = f = 0; f < fdi; f++) { + ix += cc[f] * s->rev.coi[f]; + if (f != ff) + slix[j++] = f; + } + slix[j++] = ff; +//printf(" bx %d, %d ix %d\n",cc[0],cc[1],cc[2],ix); - if (s->rev.rev[ix] == NULL) { + if (s->rev.rev[ix] == NULL) { //printf(" rev is empty\n"); - goto next_bx; - } + goto next_bx; + } - /* For all the vertex values in bx rev[] */ - for (rp = s->rev.rev[ix]+3; *rp != -1; rp++) { - float *fcb = s->g.a + *rp * s->g.pss; - double x, y, rad, ang; + /* For all the cubes bx rev[] */ + for (rp = s->rev.rev[ix]+3; *rp != -1; rp++) { -//printf(" vtx %d\n",*rp); - /* Ignore over ink limit values */ - if (s->limiten && fcb[-1] > s->limitv) - continue; - - /* Compute radius and normalize */ - x = fcb[slix[0]] - ctx.ccent[slix[0]]; - y = fcb[slix[1]] - ctx.ccent[slix[1]]; - rad = sqrt(x * x + y * y); - if (rad < EPS) - continue; + /* For each vertx of this cube */ + for (ee = 0; ee < (1<<di); ee++) { + int vix = *rp + s->g.hi[ee]; + float *gp = s->g.a + vix * s->g.pss; /* Pointer to float of fwd vertex */ + double fcb[MXRO]; + double x, y, z, wrad, rad, ang; - /* Quantized angle this point is at */ - ang = atanscale * atan2(y, x); - aa = (int)floor(ang); - if (aa < 0) - aa += ctx.ares; - if (aa >= ctx.ares) - aa -= ctx.ares; + /* Don't add over ink limit vertexes */ + if (s->limiten && gp[-1] > s->limitv) { + continue; + } + + for (f = 0; f < fdi; f++) + fcb[f] = gp[f]; + + /* (Don't) Convert output values to log values */ + /* logcomp(s, fcb, fcb, ctx.ccent); */ + + /* Compute 2D radius and normalize */ + x = fcb[slix[0]] - ctx.ccent[slix[0]]; + y = fcb[slix[1]] - ctx.ccent[slix[1]]; + z = fcb[slix[2]] - ctx.ccent[slix[2]]; + /* wrad is "elipsoid" weighted radius in slice */ + wrad = x * x + y * y - 1.5 * z * z; + wrad = sqrt(wrad < 0.0 ? 0.0 : wrad); + rad = sqrt(x * x + y * y); + if (rad < EPS || wrad < EPS) + continue; + + /* Quantized angle this point is at */ + ang = atanscale * atan2(y, x); + aa = (int)floor(ang); + if (aa < 0) + aa += ctx.ares; + if (aa >= ctx.ares) + aa -= ctx.ares; //printf(" slice %d vtx %f %f %f rad %f, ang %f aa %d\n", ff, fcb[0], fcb[1], fcb[2], rad, ang, aa); - if (rad > ctx.p[ff][aa].rad) { - ctx.p[ff][aa].rad = rad; + if (wrad > ctx.p[ff][aa].wrad) { + ctx.p[ff][aa].wrad = wrad; + ctx.p[ff][aa].rad = rad; - for (f = 0; f < fdi; f++) { - ctx.p[ff][aa].v[f] = fcb[f]; + /* Copy far point */ + for (f = 0; f < fdi; f++) + ctx.p[ff][aa].v[f] = fcb[f]; + + /* (don't) Flatten the points to lie on the notional center */ + /* ctx.p[ff][aa].v[ff] = ctx.ccent[ff]; */ + } + + /* Track min in case ccent is not within slice */ + if (rad < ctx.p[ff][aa].minrad) { + ctx.p[ff][aa].minrad = rad; + } } - /* Flatten the points to lie on the notional center */ - ctx.p[ff][aa].v[ff] = ctx.ccent[ff]; } + next_bx:; + FC_INC(cc); } - next_bx:; - DC_INC(cc); + + /* Repeat first in extra at end */ + ctx.p[ff][ctx.ares] = ctx.p[ff][0]; /* Structure copy */ } - /* Repeat first in extra at end */ - ctx.p[ff][ctx.ares] = ctx.p[ff][0]; /* Structure copy */ + /* Check if center point is within slice by looking for empty entries. */ + { + double ccvec[MXRO]; /* Center correction vector */ + double ccount = 0.0; + + for (f = 0; f < fdi; f++) + ccvec[f] = 0.0; + + for (ff = 0; ff < fdi; ff++) { + for (aa = 0; aa < ctx.ares; aa++) { + +//printf(" slice %d aa %d, vtx %s rad %f, irad %f\n", ff, aa, debPdv(fdi,ctx.p[ff][aa].v), ctx.p[ff][aa].rad, ctx.p[ff][aa].minrad); + + /* Either the grid is very sparse, or our center */ + /* is outside */ + if (ctx.p[ff][aa].rad < 0.0) { + int oaa = aa + (ctx.ares/2); + if (oaa >= ctx.ares) + oaa -= ctx.ares; + +//printf(" oaa %d, vtx %s rad %f, irad %f\n", oaa, debPdv(fdi,ctx.p[ff][oaa].v), ctx.p[ff][oaa].rad, ctx.p[ff][oaa].minrad); + + /* If oposite side has an entry */ + if (ctx.p[ff][oaa].rad > 0.0) { + double cor[MXRO]; + double prop = (3.0 * ctx.p[ff][oaa].minrad + + ctx.p[ff][oaa].rad)/4.0; + + prop /= ctx.p[ff][oaa].rad; /* Proportion of distance to v[] */ + + for (f = 0; f < fdi; f++) + cor[f] = prop * (ctx.p[ff][oaa].v[f] - ctx.ccent[f]); +//printf(" prop %f, corr %s\n",prop,debPdv(fdi,cor)); + for (f = 0; f < fdi; f++) + ccvec[f] += cor[f]; + ccount++; + } + } + } + } + +//printf("ccount %f\n",ccount); + if (ccount > 0.0) { /* Make adjustment */ + if (ici < (nici-1)) { + for (f = 0; f < fdi; f++) + ccvec[f] /= ccount; +//printf("Corecting center by %s\n",debPdv(fdi,ccvec)); + for (f = 0; f < fdi; f++) + ctx.ccent[f] += ccvec[f]; +//printf("cceny now %s\n",debPdv(fdi,ctx.ccent)); + } else { /* Last round and correction needed */ + if (0.0 && s->verbose) + fprintf(stdout, "%cFailed to locate aprox. gamut center\n",cr_char); + } + } else { + break; /* We're done */ + } + } } +//printf("calc_ocent: refined ccent = %s\n",debPdv(fdi,ctx.ccent)); + /* Pre-compute point to point info to speed optimization */ for (ff = 0; ff < fdi; ff++) { for (aa = 0; aa < ctx.ares; aa++) { @@ -8706,7 +8893,9 @@ static void calc_ocent(rspl *s) { /* slice segment. This should maximize visibility of the inner of the */ /* gamut surface, for shadow testing. */ for (f = 0; f < fdi; f++) - ss[f] = 5.0; + ss[f] = fabs(0.1 * (minmax[1][f][f] - minmax[0][f][f])); + +//ctx.debug = 1; /* return 0 on sucess, 1 on failure due to excessive itterations */ if (powell(NULL, fdi, s->rev.ocent, ss, 1e-3, 500, aorthog, (void *)&ctx, NULL, NULL)) { @@ -8715,8 +8904,16 @@ static void calc_ocent(rspl *s) { s->rev.ocent[f] = ctx.ccent[f]; } -// ctx.debug = 1; -// printf("Final angle = %f\n", aorthog(&ctx, ctx.ccent)); +//ctx.debug = 1; + + /* Check result */ + aorthog(&ctx, ctx.ccent); + + /* Hmm. This isn't very reliable in detecting failure. */ + if (ctx.oog) + printf("calc_ocent failed to return in-gamut focal point!\n"); + +//printf("Final angle = %f\n", ctx.ret); #ifdef REVVRML /* Plotting routine declarations */ /* Diagnostic - dump the gamut slice locii */ @@ -8729,7 +8926,7 @@ static void calc_ocent(rspl *s) { double blue[3] = { 0.1, 0.1, 0.8 }; double *rgb[3] = { red, green, blue }; - wrl = new_vrml("section", 0, vrml_lab); + wrl = new_vrml("section", 0, s->rev.probxyz ? vrml_xyz : vrml_lab); wrl->add_marker(wrl, s->rev.ocent, NULL, 1.0); /* Show vertex labels */ @@ -8772,7 +8969,384 @@ static void calc_ocent(rspl *s) { DECSZ(s, (ctx.ares+1) * sizeof(slpoint)); } - DBG(("calc_ocent: got ocent = %s\n",debPdv(fdi,s->rev.ocent))); + DBG(("calc_ocent: final ocent = %s\n",debPdv(fdi,s->rev.ocent))); +//printf("calc_ocent: final ocent = %s\n",debPdv(fdi,s->rev.ocent)); +} + +/* Create gamut surface linearization (surflin) transform. */ +/* This is used by logcomp() to try and straighten out the */ +/* device response so that the ocent is "visible" from */ +/* any point on the surface. */ +/* (We assume we are called at the correct point when bx->status == bx_uninit) */ +static int calc_surflin( +rspl *s, +vtxcache *vc, /* Vertexes */ +assdire *edgdir /* Edge lookup for vertex */ +) { + int i, j, g; + int e, ee, di = s->di; + int f, ff, fdi = s->fdi; + vtxrec *vx, *nvx; + int nitter, itter; + + double vxv[POW2MXRI][MXRO]; /* Overal fwd interp vertex values */ + int nvtx; + cow *mpoints; + int gres[MXDO]; + double min[MXDO], max[MXDO]; + double vmin[MXDO], vmax[MXDO]; + + for (f = 0; f < fdi; f++) + gres[f] = s->g.bres; // ?? + +//printf("calc_surflin: rspl res %d\n",gres[0]); + DBG(("calc_surflin: rspl res %d\n",gres[0])); + +//printf("~1 gres = %d %d %d\n", s->g.res[0], s->g.res[1], s->g.res[2]); +//printf("~1 ci = %d %d %d\n", s->g.ci[0], s->g.ci[1], s->g.ci[2]); + + /* Lookup interpolation cube corners */ + for (ee = 0; ee < (1<<di); ee++) { + int ix; + float *fcb; + for (ix = e = 0; e < di; e++) { + if (ee & (1<<e)) + ix += s->g.ci[e] * (s->g.res[e] - 1); + } + fcb = s->g.a + ix * s->g.pss; + for (f = 0; f < fdi; f++) + vxv[ee][f] = fcb[f]; +//printf("~1 cube corners %d = %f %f %f\n",ee, vxv[ee][0], vxv[ee][1], vxv[ee][2]); + } + +//printf("calc_surflin: counting number of vertexes:\n"); + /* Count the number of vertexes we may need */ + nvtx = 0; + for (i = 0; i < vc->hash_size; i++) { + for (vx = vc->hash[i]; vx != NULL; vx = vx->hlink) { + nvtx++; + } + } + DBG(("calc_surflin: %d mapping points\n",nvtx)); +//printf("calc_surflin: %d mapping points\n",nvtx); + +//printf("calc_surflin: computing goal values:\n"); + /* Currently the vertex vl = vv = output value of vertex. */ + /* Temporarily replace vv with the idealize (linear interp) output "goal" values. */ + for (i = 0; i < vc->hash_size; i++) { + for (vx = vc->hash[i]; vx != NULL; vx = vx->hlink) { + int tix; /* Temp fwd cell index */ + double we[MXRI]; /* Vertex input position == 1.0 - Weight */ + double gw[POW2MXRI]; /* weight for each grid cube corner */ + double w; + + /* Compute this vertexes relative input position */ + for (tix = vx->ix, e = 0; e < di; e++) { + int dix; + dix = tix % s->g.res[e]; + tix /= s->g.res[e]; + we[e] = (double)dix/(s->g.res[e]-1.0); + } + + /* Compute corner weights needed for interpolation */ + gw[0] = 1.0; + for (e = 0, g = 1; e < di; g *= 2, e++) { + for (j = 0; j < g; j++) { + gw[g+j] = gw[j] * we[e]; + gw[j] *= (1.0 - we[e]); + } + } + + /* Linear interpolated output values */ + w = gw[0]; + for (f = 0; f < fdi; f++) /* Base of cube */ + vx->vv[f] = w * vxv[0][f]; + + for (g = 1; g < (1<<di); g++) { /* For all other corners of cube */ + w = gw[g]; + for (f = 0; f < fdi; f++) + vx->vv[f] += w * vxv[g][f]; + } + } + } + + /* Now itteratively adjust the vl values to better match the scaled */ + /* relative positions of the goal values. */ + + /* Go through them again to get every line they are part of */ + /* (We're assuming we need exponentially more itters with finer point */ + /* spacing ?) */ + nitter = (int)(0.06 * s->g.bres * s->g.bres + 0.5); + if (nitter < 1) + nitter = 1; + for (itter = 0; itter < nitter; itter++) { + + DBG(("calc_surflin: maping itter %d\n",itter)); +//printf("calc_surflin: maping itter %d\n",itter); + + for (i = 0; i < vc->hash_size; i++) { + for (vx = vc->hash[i]; vx != NULL; vx = vx->hlink) { + assdire *edg; /* Edge table */ + float *fp; + int fl; + double agrad, aorad; + int nn; + double scale; + + fp = s->g.a + vx->ix * s->g.pss; /* This vertex in fwd grid */ + fl = FLV(fp); /* Edge flags for this vertex */ + edg = edgdir + fl; + + /* For vertexes at the end of all possible edges common with this vertex, */ + /* compute average radius */ + agrad = aorad = 0.0; + for (j = 0; j < edgdir[fl].no; j++) { + int eix; + + /* Index number of vertex other than the one we got it from */ + if (edg->ti[j].goffs[0] != 0) + eix = vx->ix + edg->ti[j].goffs[0]; + else + eix = vx->ix + edg->ti[j].goffs[1]; + + if ((nvx = get_vtxrec(vc, eix)) != NULL) { + double glen, olen; + glen = olen = 0.0; + for (f = 0; f < fdi; f++) { + double tt; + + tt = vx->vv[f] - nvx->vv[f]; + glen += tt * tt; + + tt = vx->vl[f] - nvx->vl[f]; + olen += tt * tt; + } + glen = sqrt(glen); + olen = sqrt(olen); + agrad += glen; + aorad += olen; + nn++; + } + } + + if (nn == 0) { /* Hmm. No neighors ? */ + vx->status = vtx_del; /* Mark it as isolated */ + continue; + } + + scale = aorad/agrad; /* Local scale factor from goal to output */ + + /* Reset the current vertex output value based on the relative */ + /* position of it in goal space */ + for (f = 0; f < fdi; f++) + vx->vl[f] = 0.0; + + nn = 0; + for (j = 0; j < edgdir[fl].no; j++) { + int eix; + + /* Index number of vertex other than the one we got it from */ + if (edg->ti[j].goffs[0] != 0) + eix = vx->ix + edg->ti[j].goffs[0]; + else + eix = vx->ix + edg->ti[j].goffs[1]; + + if ((nvx = get_vtxrec(vc, eix)) != NULL) { + for (f = 0; f < fdi; f++) + vx->vl[f] += nvx->vl[f] + scale * (vx->vv[f] - nvx->vv[f]); + nn++; + } + } + for (f = 0; f < fdi; f++) + vx->vl[f] /= (double)nn; + } + } + } + + DBG(("calc_surflin: creating rspl\n")); +//printf("calc_surflin: creating rspl\n"); + + /* Now construct rspl setup mapping points from vertex normal output values */ + /* to adjusted vl values */ + + if ((s->rev.surflin = new_rspl(RSPL_NOFLAGS, fdi, fdi)) == NULL) + error("calc_surflin: new_rspl failed"); + + nvtx++; /* One for center point */ + + /* Allocate rspl setup points */ + if ((mpoints = malloc(sizeof(cow) * 2 * nvtx)) == NULL) +// if ((mpoints = malloc(sizeof(cow) * nvtx)) == NULL) + error("calc_surflin: malloc of %d rspl setup points failed",nvtx); + + nvtx = 0; + +#ifndef NEVER + /* Center point */ + for (f = 0; f < fdi; f++) { + mpoints[nvtx].p[f] = s->rev.ocent[f]; + mpoints[nvtx].v[f] = s->rev.ocent[f]; + } + mpoints[nvtx].w = 10.0; + nvtx++; +#endif + + /* Set the surface mapping points and restore vertexes values */ + for (i = 0; i < vc->hash_size; i++) { + for (vx = vc->hash[i]; vx != NULL; vx = vx->hlink) { + float *fcb; + + fcb = s->g.a + vx->ix * s->g.pss; /* This vertex in fwd grid */ + + /* Actual output value as source of mapping */ + for (f = 0; f < fdi; f++) + mpoints[nvtx].p[f] = vx->vv[f] = fcb[f]; + + if (vx->status != vtx_norm) { /* Skip isolated values */ + vx->status = vtx_norm; /* Restore vtx contents */ + for (f = 0; f < fdi; f++) + vx->vl[f] = vx->vv[f]; + continue; + } + + for (f = 0; f < fdi; f++) + mpoints[nvtx].v[f] = vx->vl[f]; + mpoints[nvtx].w = 1.0; + nvtx++; + + vx->status = vtx_norm; /* Restore vtx contents */ + for (f = 0; f < fdi; f++) + vx->vl[f] = vx->vv[f]; + +//printf("Map[%d] %f %f %f -> %f %f %f\n", nvtx-1, mpoints[nvtx-1].p[0], mpoints[nvtx-1].p[1], mpoints[nvtx-1].p[2], mpoints[nvtx-1].v[0], mpoints[nvtx-1].v[1], mpoints[nvtx-1].v[2]); + +#ifndef NEVER + /* Add intermediate "fixed" point */ + for (f = 0; f < fdi; f++) { + mpoints[nvtx].p[f] = mpoints[nvtx].v[f] + = 0.5 * mpoints[nvtx-1].p[f] + 0.5 * s->rev.ocent[f]; + } + mpoints[nvtx].w = 0.5; + nvtx++; +#endif + } + } + + for (f = 0; f < fdi; f++) { + min[f] = 1e38; + max[f] = -1e38; + vmin[f] = 1e38; + vmax[f] = -1e38; + } + for (i = 0; i < nvtx; i++) { + +#ifdef NEVER + /* Blend with original values */ + for (f = 0; f < fdi; f++) + mpoints[i].v[f] = 0.5 * mpoints[i].p[f] + 0.5 * mpoints[i].v[f]; +#endif + + for (f = 0; f < fdi; f++) { + if (mpoints[i].p[f] < min[f]) + min[f] = mpoints[i].p[f]; + if (mpoints[i].p[f] > max[f]) + max[f] = mpoints[i].p[f]; + + if (mpoints[i].v[f] < vmin[f]) + vmin[f] = mpoints[i].v[f]; + if (mpoints[i].v[f] > vmax[f]) + vmax[f] = mpoints[i].v[f]; + } + } + +#ifdef REVVRML /* Plot mapping vectors red->green */ + { + vrml *wrl; + double red[3] = { 1.0, 0.0, 0.0 }; + double green[3] = { 0.0, 1.0, 0.0 }; + + wrl = new_vrml("suflinvecss", 0, vrml_lab); + wrl->start_line_set(wrl, 0); + + for (i = 0; i < nvtx; i++) { + wrl->add_col_vertex(wrl, 0, mpoints[i].p, red); + wrl->add_col_vertex(wrl, 0, mpoints[i].v, green); + + } + + wrl->make_lines(wrl, 0, 2); + wrl->del(wrl); + } +#endif + + DBG(("calc_surflin: mapping points set, about to creat rspl:\n")); +//printf("calc_surflin: mapping points set, about to creat rspl:\n"); + + /* Fit the rspl */ + s->rev.surflin->fit_rspl_w(s->rev.surflin, RSPL_NOFLAGS, mpoints, nvtx, + min, max, gres, vmin, vmax, 4.0, NULL, NULL); + + DBG(("calc_surflin: mapping created\n")); +//printf("calc_surflin: mapping created\n"); + +#ifdef NEVER + { + double de; + co p; + extern double icmNorm33(double *, double *); + + /* Check fit */ + de = 0.0; + + for (i = 0; i < nvtx; i++) { + for (f = 0; f < fdi; f++) + p.p[f] = mpoints[i].p[f]; + + s->rev.surflin->interp(s->rev.surflin, &p); + + de += icmNorm33(mpoints[i].v, p.v); + } + de = de/(double)nvtx; + + printf("Avg fit error = %f\n",de); + } +#endif + + free(mpoints); + + /* Lookup ocent mapping offset */ + { + co p; + + for (f = 0; f < fdi; f++) + p.p[f] = s->rev.ocent[f]; + s->rev.surflin->interp(s->rev.surflin, &p); +//printf("opoint mapping %f %f %f -> %f %f %f\n", p.p[0], p.p[1], p.p[2], p.v[0], p.v[1], p.v[2]); + for (f = 0; f < fdi; f++) + s->rev.linoff[f] = p.v[f] - s->rev.ocent[f]; + } + + +#ifndef NEVER + /* Put the transform into use */ + s->rev.surflin_en = 1; + + /* Transform all the vertexes */ + for (i = 0; i < vc->hash_size; i++) { + for (vx = vc->hash[i]; vx != NULL; vx = vx->hlink) { + logcomp(s, vx->vl, vx->vv, s->rev.ocent); + + /* Compute distance to overall center point squared */ + vx->dist = 0.0; + for (f = 0; f < fdi; f++) { + double tt = vx->vl[f] - s->rev.ocent[f]; + vx->dist += tt * tt; + } + } + } +#endif + + return 0; } /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -8800,6 +9374,7 @@ rspl *s /* Note that bit 1 can be set for cells that are not */ /* to be explored because they are in the gamut interior, */ /* and because they have already been added to the seedlist. */ + int pass; /* Construction pass */ float *gp; /* Pointer to fwd grid points */ DCOUNT(gg, MXRO, fdi, 0, 0, rgres); /* Track the prime seed coordinate */ @@ -8835,9 +9410,24 @@ rspl *s int nnmxrevcelldepth = 0; /* Maximum nnrev[] list lengths */ int nnrevshare = 0; /* Sum of nnrev[] list reference counts */ #endif + datao rgmin, rgmax; DBG(("init_revaccell called, di = %d, fdi = %d, mgres = %d\n",di,fdi,(int)s->g.mres)); + /* To help VRML diagnostics, make a guess as to whether the output */ + /* space is XYZ like, or L*a*b* like */ + + s->get_out_range(s, rgmin, rgmax); /* overall output min/max */ + + if (fdi >= 3 + && rgmin[0] >= -1.0 && rgmax[0] < 3.0 + && rgmin[1] >= -1.0 && rgmax[1] < 3.0 + && rgmin[2] >= -1.0 && rgmax[2] < 3.0) { + s->rev.probxyz = 1; + if (s->verbose) + fprintf(stdout, "%cLooks like an XYZ space\n",cr_char); + } + if (fdi > 1 && s->verbose) fprintf(stdout, "%cInitializing nnrev arrays...\n",cr_char); @@ -8885,7 +9475,7 @@ rspl *s /* * The rev[] and nnrev[] grids contain pointers to lists of grid cube base indexes. * If the pointer is NULL, then there are no base indexes in that list. - * A non NULL list uses element [0] to indicate the alocation size of the list, + * A non NULL list uses element [0] to indicate the allocation size of the list, * [1] contains the index of the next free location, [2] contains the reference * count (lists may be shared), the list starts at [3]. The last entry is marked with -1. */ @@ -8897,6 +9487,8 @@ rspl *s double iv[MXDI]; /* Input value corresponding to grid */ DBG(("Looking up fwd vertex ink limit values\n")); +//printf("Looking up fwd vertex ink limit values\n"); +//printf("s->limitv = %f\n",s->limitv); /* Calling the limit function for each fwd vertex could be bad */ /* if the limit function is slow. Maybe an octree type algorithm */ /* could be used if this is a problem ? */ @@ -8906,7 +9498,9 @@ rspl *s for (e = 0; e < di; e++) iv[e] = s->g.l[e] + gc[e] * s->g.w[e]; /* Input sample values */ gp[-1] = (float)(INKSCALE * s->limitf(s->lcntx, iv)); +//printf("~1 set ix %d limitv to %f\n",i,gp[-1]); } +//else printf("~1 ix %d limitv is %f\n",i,gp[-1]); EC_INC(gc); } s->g.limitv_cached = 1; @@ -8958,6 +9552,7 @@ rspl *s uil = oil = 0; for (f = 0; f < fdi; f++) /* Init output min/max */ min[f] = max[f] = gp[f]; + if (!s->limiten || gp[-1] <= s->limitv) uil = 1; else @@ -9065,7 +9660,7 @@ rspl *s } /* Next reverse grid point in intersecting cube */ } /* Next base grid point */ - DBG(("We skipped %d cells that were over the limit\n",nskcells)); + DBG(("We skipped %d/%d cells that were over the limit\n",nskcells,gno)); #ifdef CHECK_NNLU if (fdi > 1) { @@ -9180,7 +9775,6 @@ rspl *s cc[f] += (ff & 1) ? 1 : -1; vflagp += (ff & 1) ? s->rev.coi[f] : -s->rev.coi[f]; - /* Out of bounds or empty */ if (cc[f] < 0 || cc[f] >= rgres || ((*vflagp & 0xf) == 0)) { vflag[i] = (vflag[i] & ~0xf) | 2; /* Convert this one to empty surface cell */ @@ -9256,7 +9850,7 @@ rspl *s } } - } else { + } else { /* di >= 3 gamut surface finding */ #ifdef REVVRML /* Plot the initial surface bxcells & their fwd cells. */ @@ -9289,7 +9883,7 @@ rspl *s /* - - - - - - - - - - - - - - */ /* fill, thin and add, until */ /* there is no more work to do. */ - for (;;) { + for (pass = 0;; pass++) { int phase; int morevtxadded = 0; #if defined(REVTABLESTATS) || defined(DEBUG) @@ -9301,7 +9895,7 @@ rspl *s /* For each surface bxcell, convert the corresponding */ /* rev[] fwd cubes into vertices. */ - /* (Musk keep bxcells even if none of their verticies */ + /* (Must keep bxcells even if none of their verticies */ /* are physically in them, so that those verticies get thinned. */ /* could only remove them if vertex was not in any surface cell ?) */ for (pbx = &s->rev.surflist, bx = *pbx; bx != NULL; bx = nbx) { @@ -9368,10 +9962,10 @@ rspl *s /* Expand a bxcell's shadow testing group values based on it's vertex list */ /* so that shadow testing works correctly for vertexes that don't */ /* actually lie within the bxcell. (Note that in fact the triangle */ - /* testing creates triangles that are mode of vertexes that may not */ - /* be in this bx's list, so the shadow size doesn't accturatly reprsent */ + /* testing creates triangles that are made of vertexes that may not */ + /* be in this bx's list, so the shadow size doesn't accuratly reprsent */ /* the possible shadow area. It's not clear what consequences this has, */ - /* if any. If we extanded the group to cover this, we would need to have ) */ + /* if any. If we extanded the group to cover this, we would need to have */ /* two groups, a shadower group including those vertexes, and a shadowee */ /* goup for just those vertexes that are part of the bx. */ extend_bxcell_shadow_group(s, &vc, bx); @@ -9380,6 +9974,19 @@ rspl *s morevtxadded = 1; } + /* Compute transform rspl that helps "unfold" any regions of the surface */ + /* that overlap from the perspective of ocent, to try and avoid gaps in */ + /* the final gamut surface. Existing vtxrec are converted to have vl */ + /* in the unfolded space. */ + if (pass == 0 /* && function flag set */) { +#ifndef EN_UNTWIST /* Control using an environment variable */ + if (getenv("ARGYLL_UNTWIST_GAMUT_SURFACE") != NULL) +#endif + { + calc_surflin(s, &vc, edgdir); + } + } + DBG(("thinning surface vertex lists and converting to cells\n")); /* (Sorting bxcells doesn't seem to make any performace difference.) */ @@ -9440,8 +10047,8 @@ rspl *s /* If any of bx is further from nbx and their bounding */ /* cylinders overlap in perspective from rev.ocenter, */ /* assume nbx is a shadow */ - if (shadow_group_group(s, s->rev.ocent, bx->g.bcent, bx->cc, bx->dw, - nbx->g.bcent, nbx->cc, nbx->dw)) { + if (shadow_group_group(s, s->rev.ocent, bx->g.bcent, bx->cc, + bx->dw, nbx->g.bcent, nbx->cc, nbx->dw)) { nbx->wlist = bx->wlist; bx->wlist = nbx; //printf("~1 adding shadow nnrev[%d] from xlist\n",nbx->ix); @@ -9511,8 +10118,8 @@ rspl *s /* marked deleted ??) */ if ( // vx->status == vtx_norm && - shadow_group_vertex(s, s->rev.ocent, bx->g.bcent, bx->cc, bx->dw, - vx->v)) { + shadow_group_vertex(s, s->rev.ocent, bx->g.bcent, bx->cc, + bx->dw, vx->vl)) { add_vtxrec_list(&vc, vx, 0); /* Add if not deleted */ //printf(" Added ix %d from bx %d\n",vx->ix,nbx->ix); } @@ -9529,7 +10136,8 @@ rspl *s error("Failed to find vertex %s in cache",*rp); if (vx->status == vtx_norm && - shadow_group_vertex(s, s->rev.ocent, bx->g.bcent, bx->cc, bx->dw, vx->v)) { + shadow_group_vertex(s, s->rev.ocent, bx->g.bcent, bx->cc, + bx->dw, vx->vl)) { add_vtxrec_list(&vc, vx, 1); /* Add if not hidden/deleted */ } } @@ -9543,7 +10151,7 @@ rspl *s /* For vertexes of this bxcell and shadowers, */ /* in order from largst to smallest distance from center. */ for (vx = vc.vtxlist; vx != NULL; vx = vx->tlist) { - float *vp; /* Vertex being tested */ + float *fcb; /* Vertex being tested */ int fl; assdire *tri; /* Triangle table */ @@ -9556,8 +10164,8 @@ rspl *s //printf("~1 doing vertex %d at %s dist %f\n",vx->ix, debPdv(fdi,vx->v), sqrt(vx->dist)); - vp = s->g.a + vx->ix * s->g.pss; /* This vertex in fwd grid */ - fl = FLV(vp); /* Edge flags for this vertex */ + fcb = s->g.a + vx->ix * s->g.pss; /* This vertex in fwd grid */ + fl = FLV(fcb); /* Edge flags for this vertex */ tri = tridir + fl; //printf("~1 fl %d = 0o%o, no triangles %d\n",fl, fl, tri->no); @@ -9597,7 +10205,7 @@ rspl *s for (e = 0; e <= sdi; e++) { for (f = 0; f < fdi; f++) - v[e][f] = trivx[e]->v[f]; + v[e][f] = trivx[e]->vl[f]; } /* Compute shadow group params of triangle for quick vertex test */ @@ -9633,7 +10241,7 @@ rspl *s /* Do quick check against triangle */ if (!shadow_group_vertex(s, - s->rev.ocent, gc, cc, dw, nvx->v)) { + s->rev.ocent, gc, cc, dw, nvx->vl)) { //printf("~1 shadow group check shows no intersection\n"); continue; } @@ -9644,11 +10252,14 @@ rspl *s shdwd = wsrv = 0; /* Compute line delta */ - vp = s->g.a + nvx->ix * s->g.pss; - for (f = 0; f < fdi; f++) { - pv[f] = vp[f]; + fcb = s->g.a + nvx->ix * s->g.pss; + for (f = 0; f < fdi; f++) + pv[f] = fcb[f]; + + logcomp(s, pv, pv, s->rev.ocent); + + for (f = 0; f < fdi; f++) de[f] = pv[f] - s->rev.ocent[f]; - } /* Setup line cla and clb */ init_line_eq_imp(s, NULL, &cla, clb, s->rev.ocent, de, 0); @@ -9773,13 +10384,13 @@ rspl *s /* Check all of its neighbor vertexes, to see if */ /* it's safe to actually delete them. */ if (vx->status >= vtx_sha) { /* vertex to delete ? */ - float *vp; + float *fcb; int fl; assdire *edg; /* Edge table */ //printf("Checking vx %d neighbors\n",vx->ix); - vp = s->g.a + vx->ix * s->g.pss; /* This vertex in fwd grid */ - fl = FLV(vp); /* Edge flags for this vertex */ + fcb = s->g.a + vx->ix * s->g.pss; /* This vertex in fwd grid */ + fl = FLV(fcb); /* Edge flags for this vertex */ edg = edgdir + fl; /* For all possible edges that use this vertex */ @@ -9972,7 +10583,7 @@ rspl *s /* Struct to hold test vertex locations */ struct _tvxrec { - double v[MXRO]; + double v[MXRO]; /* Log output vertex value */ double dist; /* Distance from center point squared */ int ix[MXRO+1]; /* Indexes of the triangle verticies */ int shad; /* Test result */ @@ -10082,10 +10693,10 @@ rspl *s for (j = 0; j <= sdi; j++) { if (trivx[j]->status == vtx_norm) { for (f = 0; f < fdi; f++) - tvx->v[f] += 0.95/nntvsh * trivx[j]->v[f]; + tvx->v[f] += 0.95/nntvsh * trivx[j]->vl[f]; } else { for (f = 0; f < fdi; f++) - tvx->v[f] += 0.05/ntvsh * trivx[j]->v[f]; + tvx->v[f] += 0.05/ntvsh * trivx[j]->vl[f]; trivx[j]->cross = 1; /* For diagnostics */ } } @@ -10202,7 +10813,7 @@ rspl *s for (j = 0; j <= sdi; j++) { for (f = 0; f < fdi; f++) - v[j][f] = trivx[j]->v[f]; + v[j][f] = trivx[j]->vl[f]; } /* Compute shadow group params of triangle for quick vertex test */ @@ -10380,7 +10991,7 @@ rspl *s for (j = 0; j <= sdi; j++) { for (f = 0; f < fdi; f++) - v[j][f] = trivx[j]->v[f]; + v[j][f] = trivx[j]->vl[f]; } /* Compute shadow group params of triangle for quick vertex test */ @@ -10570,7 +11181,7 @@ rspl *s vtxrec *vx; if ((vx = get_vtxrec(&vc, *rp)) == NULL) - continue; /* Hmm. */ + continue; /* Hmm. Delete it.*/ /* Keep all the un-shadowed or preserved vertexes */ if (vx->status == vtx_norm @@ -10618,9 +11229,9 @@ rspl *s /* Add extra over ink limit vertexes. */ for (bx = s->rev.surflist; bx != NULL; bx = bx->slist) { int sdi = 1; /* sub-simplexes are edges */ - int *crp, *rp, *nrp; - int ttouch; + int *rp; vtxrec *vx, *nvx; + int *exlist = NULL; /* Add over ink limit vertexes, so that fwd cells will straddle */ /* the ink limit boundary. */ @@ -10630,8 +11241,8 @@ rspl *s /* over ink limit verticies.) */ if (s->limiten && vflag[bx->ix] & 0x10) { int *rp; -//printf("~1 ink limitin is enabled bx %d\n", bx->ix); +//printf("~1 ink limitin is enabled bx %d\n", bx->ix); for (rp = bx->sl+3; *rp != -1; rp++) { float *vp, *evp; int fl; @@ -10671,7 +11282,7 @@ rspl *s //printf(" Checking edge %d (%f) -> %d (%f)\n", vx->ix, vp[-1], eix, evp[-1]); - /* If over limit, add it to the list */ + /* If over limit, add it to the expansion list */ if (evp[-1] > s->limitv) { //printf("~1 added over ink limit vertex %d\n",eix); @@ -10679,10 +11290,18 @@ rspl *s continue; /* Added by another bx */ nvx = new_vtxrec(s, &vc, eix); nvx->status = vtx_oil; - add2indexlist(s, &bx->sl, eix, 0); + add2indexlist(s, &exlist, eix, 0); } } } + + /* If we found over ink limit verticies, add them to our list */ + if (exlist != NULL) { + for (rp = exlist+3; *rp != -1; rp++) { + add2indexlist(s, &bx->sl, *rp, 0); + } + free_indexlist(s, &exlist); + } } } @@ -10808,6 +11427,11 @@ rspl *s bx->status = bx_conv; } + if (s->rev.surflin != NULL) { /* Don't need surflin anymore */ + s->rev.surflin->del(s->rev.surflin); + s->rev.surflin = NULL; + s->rev.surflin_en = 0; + } if (cla != NULL) free_dmatrix(cla, 0, fdi-1, 0, fdi); free_trirec(s, &stc); @@ -11911,7 +12535,7 @@ int dofwlabels /* Plot fwd cell base indexs */ double grey[3] = { 0.5, 0.5, 0.5 }; double white[3] = { 1.0, 1.0, 1.0 }; - wrl = new_vrml("raw_bxfwcells", 0, vrml_lab); + wrl = new_vrml("raw_bxfwcells", 0, s->rev.probxyz ? vrml_xyz : vrml_lab); wrl->add_marker(wrl, s->rev.ocent, NULL, 1.0); if (dofwlabels) { @@ -12080,7 +12704,7 @@ double xv[MXRO] /* Intersection point */ double blue[3] = { 0.1, 0.1, 0.8 }; double yellow[3] = { 0.8, 0.8, 0.1 }; - wrl = new_vrml("tri_check", 0, vrml_lab); + wrl = new_vrml("tri_check", 0, s->rev.probxyz ? vrml_xyz : vrml_lab); /* Gamut center point marker */ wrl->add_marker(wrl, s->rev.ocent, NULL, 1.0); @@ -12166,6 +12790,8 @@ double xv[MXRO] /* Intersection point */ /* Main summary plot at each thinning round and at end. */ /* Show vertex surface & optional added or deleted vertexes, */ /* + optional bxcells. */ +#define VV vv /* Actual surface values */ +//#define VV vl /* Logf mapped surface values */ static void plot_vtx_surface( rspl *s, int dovtxlabels, /* Show vertex index numbers */ @@ -12193,9 +12819,9 @@ assdire *edgdir /* Edge lookup for vertex */ bxcell *vbx; if (dopres) - wrl = new_vrml("final_surface", 0, vrml_lab); + wrl = new_vrml("last_surface", 0, s->rev.probxyz ? vrml_xyz : vrml_lab); else - wrl = new_vrml("thinned_surface", 0, vrml_lab); + wrl = new_vrml("thinned_surface", 0, s->rev.probxyz ? vrml_xyz : vrml_lab); wrl->add_marker(wrl, s->rev.ocent, NULL, 1.0); if (dovtxlabels) { @@ -12209,7 +12835,7 @@ assdire *edgdir /* Edge lookup for vertex */ || (dopres && vx->pres) || (dooil && vx->status == vtx_oil)) { sprintf(index, "%d",vx->ix); - wrl->add_text(wrl, index, vx->v, cyan, 0.3); + wrl->add_text(wrl, index, vx->VV, cyan, 0.3); } } } @@ -12218,20 +12844,25 @@ assdire *edgdir /* Edge lookup for vertex */ /* Go through the vertex hash to set every vertex value */ for (i = 0; i < vc->hash_size; i++) { for (vx = vc->hash[i]; vx != NULL; vx = vx->hlink) { + double *col = NULL; if (vx->status != vtx_norm && vx->addvtx) error ("Found vertex that is both deleted and cause of added bxcell"); if (doadded && vx->addvtx) /* Cause of added bxcell */ - vx->vrmlix = wrl->add_col_vertex(wrl, 0, vx->v, green); + col = green; else if (dopres && vx->pres) /* Preserved vertex */ - vx->vrmlix = wrl->add_col_vertex(wrl, 0, vx->v, yellow); + col = yellow; else if (dodeleted && (vx->status == vtx_sha || vx->status == vtx_del)) - vx->vrmlix = wrl->add_col_vertex(wrl, 0, vx->v, red); + col = red; else if (dooil && vx->status == vtx_oil) - vx->vrmlix = wrl->add_col_vertex(wrl, 0, vx->v, blue); + col = blue; else if (vx->status == vtx_norm) - vx->vrmlix = wrl->add_col_vertex(wrl, 0, vx->v, white); + col = white; + + if (col != NULL) { + vx->vrmlix = wrl->add_col_vertex(wrl, 0, vx->VV, col); + } } } @@ -12304,26 +12935,26 @@ assdire *edgdir /* Edge lookup for vertex */ col = white; for (f = 0; f < fdi; f++) - vv[f] = vx->v[f] + off; + vv[f] = vx->VV[f] + off; lix[0] = wrl->add_vertex(wrl, 2, vv); for (f = 0; f < fdi; f++) - vv[f] = vx->v[f] - off; + vv[f] = vx->VV[f] - off; lix[1] = wrl->add_vertex(wrl, 2, vv); wrl->add_col_line(wrl, 2, lix, col); for (f = 0; f < fdi; f++) - vv[f] = vx->v[f] + ((f & 1) ? off : -off); + vv[f] = vx->VV[f] + ((f & 1) ? off : -off); lix[0] = wrl->add_vertex(wrl, 2, vv); for (f = 0; f < fdi; f++) - vv[f] = vx->v[f] - ((f & 1) ? off : -off); + vv[f] = vx->VV[f] - ((f & 1) ? off : -off); lix[1] = wrl->add_vertex(wrl, 2, vv); wrl->add_col_line(wrl, 2, lix, col); for (f = 0; f < fdi; f++) - vv[f] = vx->v[f] + ((f & 2) ? off : -off); + vv[f] = vx->VV[f] + ((f & 2) ? off : -off); lix[0] = wrl->add_vertex(wrl, 2, vv); for (f = 0; f < fdi; f++) - vv[f] = vx->v[f] - ((f & 2) ? off : -off); + vv[f] = vx->VV[f] - ((f & 2) ? off : -off); lix[1] = wrl->add_vertex(wrl, 2, vv); wrl->add_col_line(wrl, 2, lix, col); } @@ -12396,7 +13027,7 @@ int bxix /* Index of bx cell causing touches */ double white[3] = { 1.0, 1.0, 1.0 }; double red[3] = { 0.8, 0.1, 0.1 }; - wrl = new_vrml("add_touch_bxcells", 0, vrml_lab); + wrl = new_vrml("add_touch_bxcells", 0, s->rev.probxyz ? vrml_xyz : vrml_lab); /* Gamut center point marker */ wrl->add_marker(wrl, s->rev.ocent, NULL, 1.0); @@ -12461,7 +13092,7 @@ int dowait /* Wait for a return key */ double grey[3] = { 0.5, 0.5, 0.5 }; double white[3] = { 1.0, 1.0, 1.0 }; - wrl = new_vrml("thinned_fwcells", 0, vrml_lab); + wrl = new_vrml("thinned_fwcells", 0, s->rev.probxyz ? vrml_xyz : vrml_lab); wrl->add_marker(wrl, s->rev.ocent, NULL, 1.0); if (dofclabels) { diff --git a/rspl/rev.h b/rspl/rev.h index 6fc79cb..80b9fa9 100644..100755 --- a/rspl/rev.h +++ b/rspl/rev.h @@ -62,10 +62,10 @@ * Reversing the Parameter -> Baricentric equations gives the * following interpolation equation using Parameter coordinates: * - * VV0 - VV1 * P0 - * + VV1 - VV2 * P1 - * + VV2 - VV3 * P2 - * + VV3 + * (VV0 - VV1) * P0 + * + (VV1 - VV2) * P1 + * + (VV2 - VV3) * P2 + * + VV3 * * Note that withing the simplex, 0 <= P0 && P0 <= P1 && P1 <= P2 && P2 <= 1 * @@ -270,6 +270,7 @@ struct _bxcell{ bxstat status; /* State of sl list */ int *sl; /* fwd vertex seed list for surface bxcells */ + /* or cell list after conversion to cells */ int *dl; /* deleted fwd vertex list for this bxcell */ int *scell; /* If non-NULL, this is a (non-surface) */ @@ -441,6 +442,8 @@ struct _rev_struct { /* All other sections depend on this. */ int fastsetup; /* Flag - NZ if fast setup at cost of slow throughput */ + int probxyz; /* Flag - NZ - guess if XYZ for VRML diagnostics use */ + int lchweighted; /* Non-zero if nearest search is LCh weighted */ double lchw[MXRO]; /* LCh nearest weighting */ double lchw_sq[MXRO]; /* LCh nearest weighting squared */ @@ -465,7 +468,7 @@ struct _rev_struct { int rev_valid; /* nz if this information in rev[] and nnrev[] is valid */ int **rev; /* Exact reverse lookup starting list. */ int **nnrev; /* Nearest reverse lookup starting list. */ - /* These lists are of fwd grid indexes. */ + /* These lists are of fwd grid base indexes. */ /* [0] is allocation length */ /* [1] is the next free entry index (length + 3, not counting -1) */ /* [2] is index into share lists, -1 if not shared. */ @@ -474,6 +477,10 @@ struct _rev_struct { double ocent[MXRO]; /* rev cell gamut "center" point for thinning and shadow testing. */ + int surflin_en; /* Flag set when suflin is enabled */ + struct _rspl *surflin; /* gamut surface linearization transform used by logcomp() */ + double linoff[MXRO]; /* ocent offset after surflin mapping */ + bxcell *surflist; /* Linked list of rev[] bwd cells that contain gamut surface fwd cells. */ /* Used to speed up fill_nncell() when rev.fastsetup is set, else NULL */ int surf_hash_size; /* Current size of bxcell hash list */ diff --git a/rspl/revbench.c b/rspl/revbench.c index f61ff2e..f61ff2e 100644..100755 --- a/rspl/revbench.c +++ b/rspl/revbench.c diff --git a/rspl/rspl.c b/rspl/rspl.c index db63a47..db63a47 100644..100755 --- a/rspl/rspl.c +++ b/rspl/rspl.c diff --git a/rspl/rspl.h b/rspl/rspl.h index 7d096f9..dc4e14d 100644..100755 --- a/rspl/rspl.h +++ b/rspl/rspl.h @@ -24,13 +24,15 @@ /** General Limits **/ -#define MXDI 10 /* Maximum input dimensionality */ -#define MXDO 10 /* Maximum output dimensionality (Is not fully tested!!!) */ -#define LOG2MXDI 4 /* log2 MXDI */ -#define DEF2MXDI 16 /* Default allocation size for 2^di (di=4) */ -#define POW2MXDI 1024 /* 2 ^ MXDI */ -#define DEF3MXDI 81 /* Default allocation size for 3^di (di=4) */ -#define POW3MXDI 59049 /* 3 ^ MXDI */ +#define MXDI 10 /* Maximum input dimensionality */ +#define MXDO 10 /* Maximum output dimensionality (Is not fully tested!!!) */ +#define LOG2MXDI 4 /* log2 MXDI */ +#define DEF2MXDI 16 /* Default allocation size for 2^di (di=4) */ +#define POW2MXDI 1024 /* 2 ^ MXDI */ +#define DEF3MXDI 81 /* Default allocation size for 3^di (di=4) */ +#define POW3MXDI 59049 /* 3 ^ MXDI */ +#define HACOMPS ((POW3MXDI + 2 * MXDI + 1)/2) /* Maximum number of array components */ + /* 295255 - not used ? */ #if MXDI > MXDO /* Maximum of either DI or DO */ # define MXDIDO MXDI @@ -38,14 +40,13 @@ # define MXDIDO MXDO #endif -/* RESTRICTED SIZE Limits, used for reverse, spline and scattered interpolation */ +/* RESTRICTED SIZE Limits, used for reverse and spline */ #define MXRI 4 /* Maximum input dimensionality */ #define MXRO 10 /* Maximum output dimensionality (Is not fully tested!!!) */ #define LOG2MXRI 2 /* log2 MXRI */ #define POW2MXRI 16 /* 2 ^ MXRI */ #define POW3MXRI 81 /* 3 ^ MXRI */ -#define HACOMPS ((POW3MXRI + 2 * MXRI + 1)/2) /* Maximum number of array components */ #define POW2MXRO 1024 /* 2 ^ MXRO */ #if MXRI > MXRO /* Maximum of either RI or RO */ @@ -93,9 +94,9 @@ typedef struct { /* Scattered data Per data point data (internal) */ struct _rpnts { - double p[MXRI]; /* Data position [di] */ - double v[MXRO]; /* Data value [fdi] */ - double k[MXRO]; /* Weight factor (nominally 1.0, less for lower confidence data point) */ + double p[MXDI]; /* Data position [di] */ + double v[MXDO]; /* Data value [fdi] */ + double k[MXDO]; /* Weight factor (nominally 1.0, less for lower confidence data point) */ // double fe; /* Fit error in output pass (ausm) */ }; typedef struct _rpnts rpnts; @@ -114,7 +115,7 @@ typedef struct { typedef struct { int niters; /* Number of multigrid itterations needed */ int **ires; /* Resolution for each itteration and dimension */ - void **mgtmps[MXRO]; /* Store pointers to re-usable mgtmp when incremental */ + void **mgtmps[MXDO]; /* Store pointers to re-usable mgtmp when incremental */ /* (These don't seem to be used anymore. was incremental removed ?) */ } it_info; @@ -260,7 +261,7 @@ struct _rspl { #define RSPL_VERBOSE 0x8000 /* Turn on print progress messages */ #define RSPL_NOVERBOSE 0x4000 /* Turn off print progress messages */ - /* Initialise from scattered data. RESTRICTED SIZE */ + /* Initialise from scattered data. */ /* Return non-zero if result is non-monotonic */ int (*fit_rspl)( @@ -282,7 +283,7 @@ struct _rspl { /* gres[] entries per dimension. Used to scale smoothness criteria */ ); - /* Initialise from scattered data, with per point weighting. RESTRICTED SIZE */ + /* Initialise from scattered data, with per point weighting. */ /* Return non-zero if result is non-monotonic */ int (*fit_rspl_w)( @@ -305,7 +306,7 @@ struct _rspl { ); /* Initialise from scattered data, with per point individual out weighting. */ - /* RESTRICTED SIZE Return non-zero if result is non-monotonic */ + /* Return non-zero if result is non-monotonic */ int (*fit_rspl_ww)( struct _rspl *s, /* this */ @@ -327,7 +328,6 @@ struct _rspl { ); /* Initialise from scattered data, with weak default function. */ - /* RESTRICTED SIZE */ /* Return non-zero if result is non-monotonic */ int (*fit_rspl_df)( @@ -353,7 +353,6 @@ struct _rspl { ); /* Initialise from scattered data, with per point weighting and weak default function. */ - /* RESTRICTED SIZE */ /* Return non-zero if result is non-monotonic */ int (*fit_rspl_w_df)( diff --git a/rspl/rspl1.c b/rspl/rspl1.c index 3996269..3996269 100644..100755 --- a/rspl/rspl1.c +++ b/rspl/rspl1.c diff --git a/rspl/rspl1.h b/rspl/rspl1.h index 63be428..63be428 100644..100755 --- a/rspl/rspl1.h +++ b/rspl/rspl1.h diff --git a/rspl/rspl_imp.h b/rspl/rspl_imp.h index 0cd8805..0cd8805 100644..100755 --- a/rspl/rspl_imp.h +++ b/rspl/rspl_imp.h diff --git a/rspl/scat.c b/rspl/scat.c index f94e074..87835ea 100644..100755 --- a/rspl/scat.c +++ b/rspl/scat.c @@ -221,20 +221,24 @@ struct _mgtmp { int bres, brix; /* Biggest resolution and its index */ double mres; /* Geometric mean res[] */ int no; /* Total number of points in grid = res ^ di */ - ratai l,h,w; /* Grid low, high, grid cell width */ + datai l,h,w; /* Grid low, high, grid cell width */ double *ipos[MXDI]; /* Optional relative grid cell position for each input dim cell */ /* Grid array offset lookups */ - int ci[MXRI]; /* Grid coordinate increments for each dimension */ - int hi[POW2MXRI]; /* Combination offset for sequence through cube. */ + int ci[MXDI]; /* Grid coordinate increments for each dimension */ + int hi[POW2MXDI]; /* Combination offset for sequence through cube. */ } g; - /* Data point grid dependent information */ + /* Data point grid dependent information - allocate for size of 2^di */ struct mgdat { int b; /* Index for associated base grid point, in grid points */ - double w[POW2MXRI]; /* Weight for surrounding gridpoints [2^di] */ + double w[0]; /* Weight for surrounding gridpoints [2^di] */ } *d; + int sizeof_mgdat; /* sizeof(mgdat) + sizeof(double) * (1<<di) */ + + /* Address of mgdat at index N from given mgtmp *M */ +#define MGDAT_N(M,N) ((struct mgdat *)(((char *)&(M)->d[0]) + (N) * (M)->sizeof_mgdat)) /* Equation Solution related (Grid point solutions) */ struct { @@ -245,8 +249,7 @@ struct _mgtmp { /* and +/-1 offset in all dimensions, but only the +ve offset */ /* half of the sparse matrix is stored, due to equations */ /* being symetrical. */ -#define XCOLPMAX (HACOMPS+8) - int xcol[XCOLPMAX]; /* A array column translation from packed to sparse index */ + int *xcol; /* A array column translation from packed to sparse index */ int *ixcol; /* A array column translation from sparse to packed index */ double *b; /* b vector for RHS of simultabeous equation b[g.no] */ double normb; /* normal of b vector */ @@ -408,11 +411,11 @@ fit_rspl_imp( void *d, /* Array holding position and function values of data points */ int dtp, /* Flag indicating data type, 0 = (co *), 1 = (cow *), 2 = (coww *) */ int dno, /* Number of data points */ - ratai glow, /* Grid low scale - will be expanded to enclose data, NULL = default 0.0 */ - ratai ghigh, /* Grid high scale - will be expanded to enclose data, NULL = default 1.0 */ + datai glow, /* Grid low scale - will be expanded to enclose data, NULL = default 0.0 */ + datai ghigh, /* Grid high scale - will be expanded to enclose data, NULL = default 1.0 */ int gres[MXDI], /* Spline grid resolution */ - ratao vlow, /* Data value low normalize, NULL = default 0.0 */ - ratao vhigh, /* Data value high normalize - NULL = default 1.0 */ + datao vlow, /* Data value low normalize, NULL = default 0.0 */ + datao vhigh, /* Data value high normalize - NULL = default 1.0 */ double smooth, /* Smoothing factor, 0.0 = default 1.0 */ /* (if -ve, overides optimised smoothing, and sets raw smoothing */ /* typically between 1e-7 .. 1e-1) */ @@ -430,12 +433,11 @@ fit_rspl_imp( int i, e, f; #ifdef NEVER -printf("~1 rspl: gres = %d %d %d %d, smooth = %f, avgdev = %f %f %f\n", -gres[0], gres[1], gres[2], gres[3], smooth, avgdev[0], avgdev[1], avgdev[2]); -printf("~1 rspl: glow = %f %f %f %f ghigh = %f %f %f %f\n", -glow[0], glow[1], glow[2], glow[3], ghigh[0], ghigh[1], ghigh[2], ghigh[3]); -printf("~1 rspl: vlow = %f %f %f vhigh = %f %f %f\n", -vlow[0], vlow[1], vlow[2], vhigh[0], vhigh[1], vhigh[2]); +printf("~1 rspl: di %d, fdi %d\n",fdi); +printf("~1 rspl: gres = %s, smooth = %f, avgdev = %s\n", +debPiv(di, gres),smooth, debPdv(fdi,avgdev)); +printf("~1 rspl: glow = %s ghigh = %s\n", debPdv(di,glow), debPdv(di,ghigh)); +printf("~1 rspl: vlow = %s vhigh = %s\n",debPdv(fdi,vlow), debPdv(fdi,vhigh)); printf("~1 rspl: flags = 0x%x\n",flags); #endif @@ -444,9 +446,9 @@ printf("~1 rspl: flags = 0x%x\n",flags); #endif /* This is a restricted size function */ - if (di > MXRI) + if (di > MXDI) error("rspl: fit can't handle di = %d",di); - if (fdi > MXRO) + if (fdi > MXDO) error("rspl: fit can't handle fdi = %d",fdi); /* set debug level */ @@ -528,8 +530,9 @@ printf("~1 rspl: flags = 0x%x\n",flags); for (i = 0; i < dno; i++) { for (e = 0; e < s->di; e++) { - if (dp[i].p[e] > s->g.h[e]) + if (dp[i].p[e] > s->g.h[e]) { s->g.h[e] = dp[i].p[e]; + } if (dp[i].p[e] < s->g.l[e]) s->g.l[e] = dp[i].p[e]; } @@ -882,11 +885,11 @@ fit_rspl( int flags, /* Combination of flags */ co *d, /* Array holding position and function values of data points */ int dno, /* Number of data points */ - ratai glow, /* Grid low scale - will be expanded to enclose data, NULL = default 0.0 */ - ratai ghigh, /* Grid high scale - will be expanded to enclose data, NULL = default 1.0 */ + datai glow, /* Grid low scale - will be expanded to enclose data, NULL = default 0.0 */ + datai ghigh, /* Grid high scale - will be expanded to enclose data, NULL = default 1.0 */ int gres[MXDI], /* Spline grid resolution */ - ratao vlow, /* Data value low normalize, NULL = default 0.0 */ - ratao vhigh, /* Data value high normalize - NULL = default 1.0 */ + datao vlow, /* Data value low normalize, NULL = default 0.0 */ + datao vhigh, /* Data value high normalize - NULL = default 1.0 */ double smooth, /* Smoothing factor, nominal = 1.0 */ double avgdev[MXDO], /* Average Deviation of function values as proportion of function range. */ @@ -906,11 +909,11 @@ fit_rspl_w( int flags, /* Combination of flags */ cow *d, /* Array holding position, function and weight values of data points */ int dno, /* Number of data points */ - ratai glow, /* Grid low scale - will be expanded to enclose data, NULL = default 0.0 */ - ratai ghigh, /* Grid high scale - will be expanded to enclose data, NULL = default 1.0 */ + datai glow, /* Grid low scale - will be expanded to enclose data, NULL = default 0.0 */ + datai ghigh, /* Grid high scale - will be expanded to enclose data, NULL = default 1.0 */ int gres[MXDI], /* Spline grid resolution */ - ratao vlow, /* Data value low normalize, NULL = default 0.0 */ - ratao vhigh, /* Data value high normalize - NULL = default 1.0 */ + datao vlow, /* Data value low normalize, NULL = default 0.0 */ + datao vhigh, /* Data value high normalize - NULL = default 1.0 */ double smooth, /* Smoothing factor, nominal = 1.0 */ double avgdev[MXDO], /* Average Deviation of function values as proportion of function range. */ @@ -930,11 +933,11 @@ fit_rspl_ww( int flags, /* Combination of flags */ coww *d, /* Array holding position, function and weight values of data points */ int dno, /* Number of data points */ - ratai glow, /* Grid low scale - will be expanded to enclose data, NULL = default 0.0 */ - ratai ghigh, /* Grid high scale - will be expanded to enclose data, NULL = default 1.0 */ + datai glow, /* Grid low scale - will be expanded to enclose data, NULL = default 0.0 */ + datai ghigh, /* Grid high scale - will be expanded to enclose data, NULL = default 1.0 */ int gres[MXDI], /* Spline grid resolution */ - ratao vlow, /* Data value low normalize, NULL = default 0.0 */ - ratao vhigh, /* Data value high normalize - NULL = default 1.0 */ + datao vlow, /* Data value low normalize, NULL = default 0.0 */ + datao vhigh, /* Data value high normalize - NULL = default 1.0 */ double smooth, /* Smoothing factor, nominal = 1.0 */ double avgdev[MXDO], /* Average Deviation of function values as proportion of function range. */ @@ -1530,15 +1533,17 @@ static mgtmp *new_mgtmp( #endif /* Allocate space for auiliary data point related info */ - if ((m->d = (struct mgdat *) calloc(dno, sizeof(struct mgdat))) == NULL) + m->sizeof_mgdat = sizeof(struct mgdat) + sizeof(double) * (1 << di); + if ((m->d = (struct mgdat *) calloc(dno, m->sizeof_mgdat)) == NULL) error("rspl: malloc failed - mgtmp"); /* fill in the aux data point info */ /* (We're assuming N-linear interpolation here. */ /* Perhaps we should try simplex too ?) */ for (n = 0; n < dno; n++) { - double we[MXRI]; /* 1.0 - Weight in each dimension */ + double we[MXDI]; /* 1.0 - Weight in each dimension */ int ix = 0; /* Index to base corner of surrounding cube in grid points */ + struct mgdat *dd; /* Figure out which grid cell the point falls into */ for (e = 0; e < di; e++) { @@ -1557,21 +1562,22 @@ static mgtmp *new_mgtmp( ix += mi * m->g.ci[e]; /* Add Index offset for grid cube base in dimen */ we[e] = t - (double)mi; /* 1.0 - weight */ } - m->d[n].b = ix; + dd = MGDAT_N(m, n); + dd->b = ix; /* Compute corner weights needed for interpolation */ - m->d[n].w[0] = 1.0; + dd->w[0] = 1.0; for (e = 0, g = 1; e < di; g *= 2, e++) { for (i = 0; i < g; i++) { - m->d[n].w[g+i] = m->d[n].w[i] * we[e]; - m->d[n].w[i] *= (1.0 - we[e]); + dd->w[g+i] = dd->w[i] * we[e]; + dd->w[i] *= (1.0 - we[e]); } } #ifdef DEBUG printf("Data point %d weighting factors = \n",n); for (e = 0; e < (1 << di); e++) { - printf("%d: %f\n",e,m->d[n].w[e]); + printf("%d: %f\n",e,dd->w[e]); } #endif /* DEBUG */ @@ -1588,6 +1594,7 @@ static mgtmp *new_mgtmp( /* Set the solution matricies to unalocated */ m->q.A = NULL; + m->q.xcol = NULL; m->q.ixcol = NULL; m->q.b = NULL; m->q.x = NULL; @@ -1620,6 +1627,7 @@ static void free_mgtmp(mgtmp *m) { } free_dvector(m->q.x,0,gno-1); free_dvector(m->q.b,0,gno-1); + free((void *)m->q.xcol); free((void *)m->q.ixcol); free_dmatrix(m->q.A,0,gno-1,0,m->q.acols-1); free((void *)m->d); @@ -1770,8 +1778,24 @@ mgtmp *sm /* Optional smoothing map for ausm mode */ DCOUNT(gc, MXDIDO, di, -2, -2, 3); /* Step through +/- 2 cube offset */ #endif int ix; /* Grid point offset in grid points */ + int xcolpmax; acols = 0; + /* Allocate xcol[] */ + if (xcol == NULL) { + /* Comput used dimensions XCOLPMAX, */ + /* = number of array components, */ + /* = HACOMPS + 8 */ + xcolpmax = 1; + for (k = 0; k < di; k++) + xcolpmax *= 3; + xcolpmax += 2 * di + 1; + xcolpmax /= 2; + xcolpmax += 8; + if ((xcol = (int *) malloc(xcolpmax * sizeof(int))) == NULL) + error("rspl malloc failed - xcol"); + } + DC_INIT(gc); while (!DC_DONE(gc)) { @@ -1796,7 +1820,7 @@ mgtmp *sm /* Optional smoothing map for ausm mode */ for (ix = 0, k = 0; k < di; k++) ix += gc[k] * gci[k]; /* Multi-dimension grid offset */ if (ix >= 0) { - if (acols >= XCOLPMAX) + if (acols >= xcolpmax) error("rspl internal: exceeded xcol bounds"); xcol[acols++] = ix; /* We only store half, due to symetry */ } @@ -1849,6 +1873,7 @@ mgtmp *sm /* Optional smoothing map for ausm mode */ m->q.b = b; m->q.x = x; m->q.acols = acols; + m->q.xcol = xcol; m->q.ixcol = ixcol; } else { /* re-initializing, zero matrices */ @@ -2264,7 +2289,8 @@ mgtmp *sm /* Optional smoothing map for ausm mode */ /* Accumulate data point dependent factors */ for (n = 0; n < dno; n++) { /* Go through all the data points */ int j,k; - int bp = m->d[n].b; /* index to base grid point in grid points */ + struct mgdat *dd = MGDAT_N(m, n); + int bp = dd->b; /* index to base grid point in grid points */ /* For each point in the cube as the base grid point, */ /* add in the appropriate weighting for its weighted neighbors. */ @@ -2274,7 +2300,7 @@ mgtmp *sm /* Optional smoothing map for ausm mode */ ai = bp + m->g.hi[j]; /* A matrix index */ - w = m->d[n].w[j]; /* Base point grid weight */ + w = dd->w[j]; /* Base point grid weight */ d = 2.0 * s->d.a[n].k[f] * w; /* (2.0, w are derivtv factors, k data pnt wgt) */ tt = d * s->d.a[n].v[f]; /* Change in data component */ @@ -2287,7 +2313,7 @@ mgtmp *sm /* Optional smoothing map for ausm mode */ for (k = j+1; k < (1 << di); k++) { /* Binary sequence */ int ii; ii = ixcol[m->g.hi[k] - m->g.hi[j]]; /* A matrix column index */ - A[ai][ii] += d * m->d[n].w[k]; /* dui component due to ui+1 */ + A[ai][ii] += d * dd->w[k]; /* dui component due to ui+1 */ } } } @@ -2337,14 +2363,15 @@ static void comp_fit_errors( /* Compute error for each data point */ for (n = 0; n < dno; n++) { int j; - int bp = m->d[n].b; /* index to base grid point in grid points */ + struct mgdat *dd = MGDAT_N(m, n); + int bp = dd->b; /* index to base grid point in grid points */ double val; /* Current interpolated value */ double err; double gain = 1.0; /* Compute the interpolated grid value for this data point */ for (val = 0.0, j = 0; j < (1 << di); j++) /* Binary sequence */ - val += m->d[n].w[j] * x[bp + m->g.hi[j]]; + val += dd->w[j] * x[bp + m->g.hi[j]]; err = s->d.a[n].v[f] - val; err *= 0.8; @@ -2367,8 +2394,8 @@ static double mgtmp_interp( rspl *s = m->s; int di = s->di; int e, n; - double we[MXRI]; /* 1.0 - Weight in each dimension */ - double gw[POW2MXRI]; /* weight for each grid cube corner */ + double we[MXDI]; /* 1.0 - Weight in each dimension */ + double gw[POW2MXDI]; /* weight for each grid cube corner */ double *gp; /* Pointer to x2[] grid cube base */ double val; @@ -2428,7 +2455,7 @@ static void init_soln( /* For all output grid points */ EC_INIT(gc); for (n = 0; n < gno; n++) { - double p[MXRI]; /* Grid relative location */ + double p[MXDI]; /* Grid relative location */ for (e = 0; e < di; e++) p[e] = (double)gc[e]/(m1->g.res[e] - 1.0); @@ -2645,7 +2672,7 @@ one_itter1( /* For each dimension */ for (d = 0; d < di; d++) { int ld = d == 0 ? 1 : 0; /* lowest dim */ - int sof, gc[MXRI]; + int sof, gc[MXDI]; //printf("~1 doing one_itter1 for dim %d\n",d); for (e = 0; e < di; e++) @@ -2713,7 +2740,7 @@ one_itter2( double ovsh /* Overshoot to use, 1.0 for none */ ) { int e,i,k; - int gc[MXRI]; + int gc[MXDI]; for (i = e = 0; e < di; e++) gc[e] = 0; /* init coords */ diff --git a/rspl/scat2.c b/rspl/scat2.c index 7579366..7579366 100644..100755 --- a/rspl/scat2.c +++ b/rspl/scat2.c diff --git a/rspl/sm1.c b/rspl/sm1.c index 5bcf26e..5bcf26e 100644..100755 --- a/rspl/sm1.c +++ b/rspl/sm1.c diff --git a/rspl/sm2.c b/rspl/sm2.c index 84bc8cf..84bc8cf 100644..100755 --- a/rspl/sm2.c +++ b/rspl/sm2.c diff --git a/rspl/sm3.c b/rspl/sm3.c index 9307787..9307787 100644..100755 --- a/rspl/sm3.c +++ b/rspl/sm3.c diff --git a/rspl/smtmpp.c b/rspl/smtmpp.c index 1264d4b..1264d4b 100644..100755 --- a/rspl/smtmpp.c +++ b/rspl/smtmpp.c diff --git a/rspl/smtnd.c b/rspl/smtnd.c index f105429..355d20b 100644..100755 --- a/rspl/smtnd.c +++ b/rspl/smtnd.c @@ -1031,7 +1031,7 @@ static void do_test( if (verb) printf("Measured noise average deviation = %f%%\n",tnoise * 100.0); /* Fit to scattered data */ - if (verb) printf("Fitting the scattered data, smooth = %f, avgdev = %f\n",smooth,avgdev != NULL ? avgdev[0] : 0.0); + if (verb) printf("Fitting the scattered data, smooth = %f, avgdev = %f\n",smooth, avgdev[0]); avgdev[0] = 0.25 * noise; rss->fit_rspl(rss, flags, /* Non-mon and clip flags */ diff --git a/rspl/spline.c b/rspl/spline.c index dabeb0f..dabeb0f 100644..100755 --- a/rspl/spline.c +++ b/rspl/spline.c diff --git a/rspl/stest.c b/rspl/stest.c index d1cf2da..d1cf2da 100644..100755 --- a/rspl/stest.c +++ b/rspl/stest.c diff --git a/rspl/t2d.c b/rspl/t2d.c index e3f304c..e3f304c 100644..100755 --- a/rspl/t2d.c +++ b/rspl/t2d.c diff --git a/rspl/t2ddf.c b/rspl/t2ddf.c index 115d5f5..115d5f5 100644..100755 --- a/rspl/t2ddf.c +++ b/rspl/t2ddf.c diff --git a/rspl/t3d.c b/rspl/t3d.c index c526669..c526669 100644..100755 --- a/rspl/t3d.c +++ b/rspl/t3d.c diff --git a/rspl/t3ddf.c b/rspl/t3ddf.c index 4a43f0d..4a43f0d 100644..100755 --- a/rspl/t3ddf.c +++ b/rspl/t3ddf.c diff --git a/rspl/tnd.c b/rspl/tnd.c index 89718d9..89718d9 100644..100755 --- a/rspl/tnd.c +++ b/rspl/tnd.c diff --git a/rspl/trnd.c b/rspl/trnd.c index 2676182..2676182 100644..100755 --- a/rspl/trnd.c +++ b/rspl/trnd.c diff --git a/scanin/CMP_DT_003.cht b/scanin/CMP_DT_003.cht index 37411af..37411af 100644..100755 --- a/scanin/CMP_DT_003.cht +++ b/scanin/CMP_DT_003.cht diff --git a/scanin/CMP_Digital_Target-4.cht b/scanin/CMP_Digital_Target-4.cht index eb95ed8..eb95ed8 100644..100755 --- a/scanin/CMP_Digital_Target-4.cht +++ b/scanin/CMP_Digital_Target-4.cht diff --git a/scanin/CMP_Digital_Target-4.cie b/scanin/CMP_Digital_Target-4.cie index 6c8ff5d..6c8ff5d 100644..100755 --- a/scanin/CMP_Digital_Target-4.cie +++ b/scanin/CMP_Digital_Target-4.cie diff --git a/scanin/CMP_Digital_Target-4.ti2 b/scanin/CMP_Digital_Target-4.ti2 index 8cc38ea..8cc38ea 100644..100755 --- a/scanin/CMP_Digital_Target-4.ti2 +++ b/scanin/CMP_Digital_Target-4.ti2 diff --git a/scanin/CMP_Digital_Target-7.cht b/scanin/CMP_Digital_Target-7.cht index d188517..d188517 100644..100755 --- a/scanin/CMP_Digital_Target-7.cht +++ b/scanin/CMP_Digital_Target-7.cht diff --git a/scanin/ColorChecker.cht b/scanin/ColorChecker.cht index 1da441b..1da441b 100644..100755 --- a/scanin/ColorChecker.cht +++ b/scanin/ColorChecker.cht diff --git a/scanin/ColorChecker.cie b/scanin/ColorChecker.cie index 8c78ff6..8c78ff6 100644..100755 --- a/scanin/ColorChecker.cie +++ b/scanin/ColorChecker.cie diff --git a/scanin/ColorCheckerDC.cht b/scanin/ColorCheckerDC.cht index ad7ea29..ad7ea29 100644..100755 --- a/scanin/ColorCheckerDC.cht +++ b/scanin/ColorCheckerDC.cht diff --git a/scanin/ColorCheckerDC.ti2 b/scanin/ColorCheckerDC.ti2 index f87284c..f87284c 100644..100755 --- a/scanin/ColorCheckerDC.ti2 +++ b/scanin/ColorCheckerDC.ti2 diff --git a/scanin/ColorCheckerHalfPassport.cht b/scanin/ColorCheckerHalfPassport.cht new file mode 100755 index 0000000..8185e59 --- /dev/null +++ b/scanin/ColorCheckerHalfPassport.cht @@ -0,0 +1,58 @@ +BOXES 25 + F _ _ 97.0 17.0 157.3 17.0 157.3 107.0 97.0 107.0 + D ALL ALL _ _ 59.0 5.0 98.0 11.0 0.0 0.0 + X A D 1 6 12.4 12.4 98.5 93.4 15.0 -15.0 + +BOX_SHRINK 2.0 + +REF_ROTATION 0.0 + +XLIST 8 + 98.5 1.0 1.0 + 110.9 1.0 1.0 + 113.5 1.0 1.0 + 125.9 1.0 1.0 + 128.5 1.0 1.0 + 140.9 1.0 1.0 + 143.5 1.0 1.0 + 155.9 1.0 1.0 + +YLIST 12 + 18.5 1.0 1.0 + 30.9 1.0 1.0 + 33.5 1.0 1.0 + 45.8 1.0 1.0 + 48.4 1.0 1.0 + 60.7 1.0 1.0 + 63.4 1.0 1.0 + 75.7 1.0 1.0 + 78.4 1.0 1.0 + 93.4 1.0 1.0 + 99.4 1.0 1.0 + 105.7 1.0 1.0 + +EXPECTED XYZ 24 + A1 11.411919 10.072672 5.112897 + A2 38.118655 34.074205 18.53409 + A3 16.687521 18.224488 25.41503 + A4 11.119565 13.272712 5.165291 + A5 23.995041 23.022599 32.25695 + A6 29.864887 41.242607 33.61720 + B1 40.774497 30.980646 4.853984 + B2 12.786912 11.654674 29.31582 + B3 29.900282 19.631992 10.31426 + B4 8.854344 6.750602 10.88177 + B5 35.445183 44.094908 8.863355 + B6 49.113465 43.647237 6.214123 + C1 6.659992 5.799339 20.11315 + C2 15.407588 23.700772 7.772715 + C3 21.254733 12.710445 3.970060 + C4 58.616280 59.203678 6.871706 + C5 31.444170 20.458848 23.34756 + C6 13.290512 19.046913 29.20373 + D1 87.016740 90.636247 69.99650 + D2 57.632418 59.860806 48.52846 + D3 35.434916 36.927843 30.23039 + D4 18.558911 19.319142 15.73822 + D5 8.770657 9.165214 7.636996 + D6 3.216922 3.320339 2.732945 diff --git a/scanin/ColorCheckerHalfPassport.cie b/scanin/ColorCheckerHalfPassport.cie new file mode 100755 index 0000000..681d808 --- /dev/null +++ b/scanin/ColorCheckerHalfPassport.cie @@ -0,0 +1,38 @@ +CTI3 +DESCRIPTOR "ColorChecker Half Passport CIE data" +ORIGINATOR "Ben Goren <ben@trumpetpower.com>" +CREATED "Fri Aug 3 15:35:05 MST 2012" + +KEYWORD "SAMPLE_LOC" +NUMBER_OF_FIELDS 7 +BEGIN_DATA_FORMAT +SAMPLE_LOC XYZ_X XYZ_Y XYZ_Z LAB_L LAB_A LAB_B +END_DATA_FORMAT + +NUMBER_OF_SETS 24 +BEGIN_DATA +A1 11.411919 10.072672 5.112897 37.972545 12.849750 13.905933 +A2 38.118655 34.074205 18.534096 65.021429 17.736538 18.105244 +A3 16.687521 18.224488 25.415039 49.767263 -4.838656 -21.688821 +A4 11.119565 13.272712 5.165291 43.171313 -11.673243 22.599880 +A5 23.995041 23.022599 32.256955 55.095608 8.054000 -23.674108 +A6 29.864887 41.242607 33.617201 70.345563 -33.879730 0.591375 +B1 40.774497 30.980646 4.853984 62.491292 36.974257 57.538878 +B2 12.786912 11.654674 29.315826 40.661930 10.745627 -43.972357 +B3 29.900282 19.631992 10.314269 51.418556 47.835790 16.229131 +B4 8.854344 6.750602 10.881778 31.232269 21.992198 -20.376399 +B5 35.445183 44.094908 8.863355 72.291888 -22.389553 57.145982 +B6 49.113465 43.647237 6.214123 71.992078 20.037754 67.243006 +C1 6.659992 5.799339 20.113152 28.900464 11.613838 -47.531575 +C2 15.407588 23.700772 7.772715 55.786947 -38.099805 32.761011 +C3 21.254733 12.710445 3.970060 42.323678 50.646029 27.808803 +C4 58.616280 59.203678 6.871706 81.403423 3.722966 80.589317 +C5 31.444170 20.458848 23.347563 52.352077 49.539466 -13.465303 +C6 13.290512 19.046913 29.203736 50.742046 -29.398805 -26.412062 +D1 87.016740 90.636247 69.996509 96.260066 -0.692605 4.206323 +D2 57.632418 59.860806 48.528468 81.762472 -0.207864 0.973581 +D3 35.434916 36.927843 30.230398 67.222860 -0.574879 0.364223 +D4 18.558911 19.319142 15.738222 51.058515 -0.355289 0.481164 +D5 8.770657 9.165214 7.636996 36.300462 -0.566396 -0.303560 +D6 3.216922 3.320339 2.732945 21.283684 0.258119 0.046995 +END_DATA diff --git a/scanin/ColorCheckerPassport.cht b/scanin/ColorCheckerPassport.cht index 5378c2f..5378c2f 100644..100755 --- a/scanin/ColorCheckerPassport.cht +++ b/scanin/ColorCheckerPassport.cht diff --git a/scanin/ColorCheckerPassport.cie b/scanin/ColorCheckerPassport.cie index f25c019..f25c019 100644..100755 --- a/scanin/ColorCheckerPassport.cie +++ b/scanin/ColorCheckerPassport.cie diff --git a/scanin/ColorCheckerSG.cht b/scanin/ColorCheckerSG.cht index 1836f73..1836f73 100644..100755 --- a/scanin/ColorCheckerSG.cht +++ b/scanin/ColorCheckerSG.cht diff --git a/scanin/ColorCheckerSG.ti2 b/scanin/ColorCheckerSG.ti2 index 239b9e6..239b9e6 100644..100755 --- a/scanin/ColorCheckerSG.ti2 +++ b/scanin/ColorCheckerSG.ti2 diff --git a/scanin/Hutchcolor.cht b/scanin/Hutchcolor.cht index fcc5135..fcc5135 100644..100755 --- a/scanin/Hutchcolor.cht +++ b/scanin/Hutchcolor.cht diff --git a/scanin/Jamfile b/scanin/Jamfile index 203ba2a..c62a1c2 100644..100755 --- a/scanin/Jamfile +++ b/scanin/Jamfile @@ -26,6 +26,8 @@ InstallFile $(DESTDIR)$(PREFIX)/$(REFSUBDIR) : $(Samples) ; # Chart recognition library Library libscanrd : scanrd.c : : : ../numlib ; +LINKFLAGS += $(GUILINKFLAGS) ; + # IT8 chart reader - sucks in tiff file and spits out cgats file Main scanin : scanin.c ; # ObjectHdrs scanin : ../h ../cgats ../numlib ../icc ../rspl ../gamut ../xicc $(TIFFINC) ; diff --git a/scanin/LaserSoftDCPro.cht b/scanin/LaserSoftDCPro.cht index e5df741..e5df741 100644..100755 --- a/scanin/LaserSoftDCPro.cht +++ b/scanin/LaserSoftDCPro.cht diff --git a/scanin/License.txt b/scanin/License.txt index a871fcf..a871fcf 100644..100755 --- a/scanin/License.txt +++ b/scanin/License.txt diff --git a/scanin/QPcard_201.cht b/scanin/QPcard_201.cht index a9d9542..a9d9542 100644..100755 --- a/scanin/QPcard_201.cht +++ b/scanin/QPcard_201.cht diff --git a/scanin/QPcard_201.cie b/scanin/QPcard_201.cie index ecd1a3a..ecd1a3a 100644..100755 --- a/scanin/QPcard_201.cie +++ b/scanin/QPcard_201.cie diff --git a/scanin/QPcard_202.cht b/scanin/QPcard_202.cht index 4d10406..4d10406 100644..100755 --- a/scanin/QPcard_202.cht +++ b/scanin/QPcard_202.cht diff --git a/scanin/QPcard_202.cie b/scanin/QPcard_202.cie index 683b6c0..683b6c0 100644..100755 --- a/scanin/QPcard_202.cie +++ b/scanin/QPcard_202.cie diff --git a/scanin/Readme.txt b/scanin/Readme.txt index 2976595..2976595 100644..100755 --- a/scanin/Readme.txt +++ b/scanin/Readme.txt diff --git a/scanin/SpyderChecker.cht b/scanin/SpyderChecker.cht index 1c0ef3a..1c0ef3a 100644..100755 --- a/scanin/SpyderChecker.cht +++ b/scanin/SpyderChecker.cht diff --git a/scanin/SpyderChecker.cie b/scanin/SpyderChecker.cie index 302e416..302e416 100644..100755 --- a/scanin/SpyderChecker.cie +++ b/scanin/SpyderChecker.cie diff --git a/scanin/SpyderChecker24.cht b/scanin/SpyderChecker24.cht index a67bbf6..a67bbf6 100644..100755 --- a/scanin/SpyderChecker24.cht +++ b/scanin/SpyderChecker24.cht diff --git a/scanin/SpyderChecker24.cie b/scanin/SpyderChecker24.cie index 49bdf61..49bdf61 100644..100755 --- a/scanin/SpyderChecker24.cie +++ b/scanin/SpyderChecker24.cie diff --git a/scanin/afiles b/scanin/afiles index cd76a75..64f2259 100644..100755 --- a/scanin/afiles +++ b/scanin/afiles @@ -17,6 +17,8 @@ Hutchcolor.cht i1_RGB_Scan_1.4.cht ColorCheckerPassport.cht ColorCheckerPassport.cie +ColorCheckerHalfPassport.cht +ColorCheckerHalfPassport.cie QPcard_201.cht QPcard_201.cie QPcard_202.cht diff --git a/scanin/i1_RGB_Scan_1.4.cht b/scanin/i1_RGB_Scan_1.4.cht index 3a3d7c9..3a3d7c9 100644..100755 --- a/scanin/i1_RGB_Scan_1.4.cht +++ b/scanin/i1_RGB_Scan_1.4.cht diff --git a/scanin/it8.cht b/scanin/it8.cht index f1e256d..f1e256d 100644..100755 --- a/scanin/it8.cht +++ b/scanin/it8.cht diff --git a/scanin/scanin.c b/scanin/scanin.c index 860d831..860d831 100644..100755 --- a/scanin/scanin.c +++ b/scanin/scanin.c diff --git a/scanin/scanrd.c b/scanin/scanrd.c index 7e497be..8e30a76 100644..100755 --- a/scanin/scanrd.c +++ b/scanin/scanrd.c @@ -3471,7 +3471,7 @@ scanrd_ *s ADD_ITEM_TO_TOP(s->alist,sp); /* Add it to the active list */ sp->active = 1; sp->ps[0] = calloc(s->tdepth * binsize,sizeof(unsigned long)); - if (sp->ps == NULL) + if (sp->ps[0] == NULL) error("do_value_scan: Failed to malloc sbox histogram array"); for (e = 1; e < s->depth; e++) sp->ps[e] = sp->ps[e-1] + binsize; diff --git a/scanin/scanrd.h b/scanin/scanrd.h index 9507981..9507981 100644..100755 --- a/scanin/scanrd.h +++ b/scanin/scanrd.h diff --git a/scanin/scanrd_.h b/scanin/scanrd_.h index 52d6368..52d6368 100644..100755 --- a/scanin/scanrd_.h +++ b/scanin/scanrd_.h diff --git a/spectro/IntsLib_Readme.txt b/spectro/IntsLib_Readme.txt index c8df3d3..c8df3d3 100644..100755 --- a/spectro/IntsLib_Readme.txt +++ b/spectro/IntsLib_Readme.txt diff --git a/spectro/Jamfile b/spectro/Jamfile index 94a2f70..f40ef19 100644..100755 --- a/spectro/Jamfile +++ b/spectro/Jamfile @@ -11,6 +11,11 @@ if $(OS) = MACOSX { ObjectCcFlags dispwin_dispwin : -ObjC ; } +if $(USE_CMFM) = true { + echo "CMF Measurement device support is enabled" ; + DEFINES += ENABLE_CMFM ; +} + if [ GLOB [ NormPaths . ] : fastserio.c ] { # echo "!!!!!!!!! fastserio.c is enabled !!!!!!!!!" ; # DEFINES += ENABLE_FTDI ; @@ -127,6 +132,24 @@ if $(USE_DEMOINST) = true && [ GLOB [ NormPaths . ] : demoinst.c ] { INST_SRCS += demoinst.c ; } +if $(USE_VTPGLUT) = true && [ GLOB [ NormPaths . ] : vtpglut.c ] { + echo "Compiling Video Test Pattern Generator and 3DLUT support" ; + DEFINES += ENABLE_VTPGLUT ; + INST_SRCS += vtpglut.c ; +} + +if $(USE_PRINTERS) = true && [ GLOB [ NormPaths . ] : printers.c ] { + echo "Compiling Printer support" ; + DEFINES += ENABLE_DEMOINST ; + INST_SRCS += printers.c ; +} + +if $(USE_CMFM) = true && [ GLOB [ NormPaths . ] : colvis.c ] { + echo "Compiling ColVis support" ; + DEFINES += ENABLE_CMFM ; + INST_SRCS += colvis.c ; +} + Library libinst : inst.c insttypes.c icoms.c disptechs.c rspec.c xrga.c $(INST_SRCS) ; # Display access library @@ -138,7 +161,8 @@ Library libdisp : dispsup.c dispwin.c webwin.c ccwin.c # applications need to know about different instrument or display types, but not access them. */ # (Note we're working around a bug in Jam caused by objects shared between libraries) Object insttypes2 : insttypes.c ; -LibraryFromObjects libinsttypes : insttypes2 ; +Object xrga2 : xrga.c ; +LibraryFromObjects libinsttypes : insttypes2 xrga2 ; Object disptechs2 : disptechs.c ; LibraryFromObjects libdisptechs : disptechs2 ; @@ -171,6 +195,8 @@ if $(LIBUSB_IS_DLL) = true { LINKLIBS += $(LIBUSBDIR)/$(LIBUSB) ; } +LINKFLAGS += $(GUILINKFLAGS) ; + # General target reader program Main chartread : chartread.c ../target/alphix.c : : : ../target : : ; @@ -180,10 +206,8 @@ Main illumread : illumread.c : : : ../target : : ; # Printed target spot reader utility Main spotread : spotread.c : : : : : ; -# Test code -if $(HOME) = "d:\\usr\\graeme" && $(PWD) = "/src/argyll/spectro" { - Main setoem : setoem.c : : : : : ../numlib/libui ; -} +echo "HOME = " $(HOME) ; +echo "PWD = " $(PWD) ; # CCMX and CCSStool Main ccxxmake : ccxxmake.c : : : : : libdisp ; diff --git a/spectro/License.txt b/spectro/License.txt index a871fcf..a871fcf 100644..100755 --- a/spectro/License.txt +++ b/spectro/License.txt diff --git a/spectro/License2.txt b/spectro/License2.txt index 05ca889..05ca889 100644..100755 --- a/spectro/License2.txt +++ b/spectro/License2.txt diff --git a/spectro/License3.txt b/spectro/License3.txt index 94a9ed0..94a9ed0 100644..100755 --- a/spectro/License3.txt +++ b/spectro/License3.txt diff --git a/spectro/LzmaDec.c b/spectro/LzmaDec.c index 8c1a148..8c1a148 100644..100755 --- a/spectro/LzmaDec.c +++ b/spectro/LzmaDec.c diff --git a/spectro/LzmaDec.h b/spectro/LzmaDec.h index 6045fae..6045fae 100644..100755 --- a/spectro/LzmaDec.h +++ b/spectro/LzmaDec.h diff --git a/spectro/LzmaTypes.h b/spectro/LzmaTypes.h index 7732c24..7732c24 100644..100755 --- a/spectro/LzmaTypes.h +++ b/spectro/LzmaTypes.h diff --git a/spectro/Makefile.OSX b/spectro/Makefile.OSX index 485cbf4..485cbf4 100644..100755 --- a/spectro/Makefile.OSX +++ b/spectro/Makefile.OSX diff --git a/spectro/Makefile.SA b/spectro/Makefile.SA index 5913126..5913126 100644..100755 --- a/spectro/Makefile.SA +++ b/spectro/Makefile.SA diff --git a/spectro/Makefile.UNIX b/spectro/Makefile.UNIX index adafa67..adafa67 100644..100755 --- a/spectro/Makefile.UNIX +++ b/spectro/Makefile.UNIX diff --git a/spectro/Makefile.WNT b/spectro/Makefile.WNT index 83eef28..83eef28 100644..100755 --- a/spectro/Makefile.WNT +++ b/spectro/Makefile.WNT diff --git a/spectro/Readme.txt b/spectro/Readme.txt index b9fe0aa..b9fe0aa 100644..100755 --- a/spectro/Readme.txt +++ b/spectro/Readme.txt diff --git a/spectro/SOtele.sp b/spectro/SOtele.sp index f63d90e..f63d90e 100644..100755 --- a/spectro/SOtele.sp +++ b/spectro/SOtele.sp diff --git a/spectro/afiles b/spectro/afiles index 8891ce7..9c14a9b 100644..100755 --- a/spectro/afiles +++ b/spectro/afiles @@ -111,6 +111,9 @@ usbio_lx.c usbio_bsd.c hidio.h hidio.c +vtpglut.h +vtpglut.c +vtpgluttypes.h pollem.h pollem.c dispwin.c diff --git a/spectro/aglob.c b/spectro/aglob.c index dbf9157..dbf9157 100644..100755 --- a/spectro/aglob.c +++ b/spectro/aglob.c diff --git a/spectro/aglob.h b/spectro/aglob.h index dbb5025..dbb5025 100644..100755 --- a/spectro/aglob.h +++ b/spectro/aglob.h diff --git a/spectro/average.c b/spectro/average.c index e961262..e961262 100644..100755 --- a/spectro/average.c +++ b/spectro/average.c diff --git a/spectro/base64.c b/spectro/base64.c index 8e07967..8e07967 100644..100755 --- a/spectro/base64.c +++ b/spectro/base64.c diff --git a/spectro/base64.h b/spectro/base64.h index 29ca140..29ca140 100644..100755 --- a/spectro/base64.h +++ b/spectro/base64.h diff --git a/spectro/ccwin.c b/spectro/ccwin.c index a89bc65..a89bc65 100644..100755 --- a/spectro/ccwin.c +++ b/spectro/ccwin.c diff --git a/spectro/ccwin.h b/spectro/ccwin.h index 9fb902d..9fb902d 100644..100755 --- a/spectro/ccwin.h +++ b/spectro/ccwin.h diff --git a/spectro/ccxx.ti1 b/spectro/ccxx.ti1 index 47f2b13..47f2b13 100644..100755 --- a/spectro/ccxx.ti1 +++ b/spectro/ccxx.ti1 diff --git a/spectro/ccxxmake.c b/spectro/ccxxmake.c index 740eb0a..4d8c057 100644..100755 --- a/spectro/ccxxmake.c +++ b/spectro/ccxxmake.c @@ -179,7 +179,7 @@ usage(int flag, char *diag, ...) { // fprintf(stderr," -V Use adaptive measurement mode (if available)\n"); fprintf(stderr," -C \"command\" Invoke shell \"command\" each time a color is set\n"); fprintf(stderr," -o observ Choose CIE Observer for CCMX spectrometer data:\n"); - fprintf(stderr," 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2\n"); + fprintf(stderr," 1931_2 (def), 1964_10, 2012_2, 2012_10, S&B 1955_2, shaw, J&V 1978_2 or file.cmf\n"); fprintf(stderr," -s steps Override default patch sequence combination steps (default %d)\n",DEFAULT_MSTEPS); fprintf(stderr," -W n|h|x Override serial port flow control: n = none, h = HW, x = Xon/Xoff\n"); fprintf(stderr," -D [level] Print debug diagnostics to stderr\n"); @@ -221,7 +221,8 @@ int main(int argc, char *argv[]) { int faketoggle = 0; /* Toggle fake between "colorimeter" and "spectro" */ int fakeseq = 0; /* Fake auto CCMX sequence */ int spec = 0; /* Need spectral data to implement option */ - icxObserverType observ = icxOT_CIE_1931_2; + icxObserverType obType = icxOT_CIE_1931_2; + xspect custObserver[3]; /* If obType = icxOT_custom */ int override = 1; /* Override redirect on X11 */ icompaths *icmps = NULL; /* Ports to choose from */ int comno = COMPORT; /* COM port used */ @@ -466,21 +467,30 @@ int main(int argc, char *argv[]) { if (na == NULL) usage(0,"Parameter expecte after -o"); if (strcmp(na, "1931_2") == 0) { /* Classic 2 degree */ spec = 2; - observ = icxOT_CIE_1931_2; + obType = icxOT_CIE_1931_2; } else if (strcmp(na, "1964_10") == 0) { /* Classic 10 degree */ spec = 2; - observ = icxOT_CIE_1964_10; + obType = icxOT_CIE_1964_10; + } else if (strcmp(na, "2012_2") == 0) { /* Latest 2 degree */ + spec = 2; + obType = icxOT_CIE_2012_2; + } else if (strcmp(na, "2012_10") == 0) { /* Latest 10 degree */ + spec = 2; + obType = icxOT_CIE_2012_10; } else if (strcmp(na, "1955_2") == 0) { /* Stiles and Burch 1955 2 degree */ spec = 2; - observ = icxOT_Stiles_Burch_2; + obType = icxOT_Stiles_Burch_2; } else if (strcmp(na, "1978_2") == 0) { /* Judd and Voss 1978 2 degree */ spec = 2; - observ = icxOT_Judd_Voss_2; + obType = icxOT_Judd_Voss_2; } else if (strcmp(na, "shaw") == 0) { /* Shaw and Fairchilds 1997 2 degree */ spec = 2; - observ = icxOT_Shaw_Fairchild_2; - } else - usage(0,"-o parameter '%s' not recognised",na); + obType = icxOT_Shaw_Fairchild_2; + } else { /* Assume it's a filename */ + obType = icxOT_custom; + if (read_cmf(custObserver, na) != 0) + usage(0,"Failed to read custom observer CMF from -o file '%s'",na); + } } else if (argv[fa][1] == 's') { fa = nfa; @@ -874,7 +884,7 @@ int main(int argc, char *argv[]) { } /* Create a spectral conversion object */ - if ((sp2cie = new_xsp2cie(icxIT_none, NULL, observ, NULL, icSigXYZData, icxClamp)) == NULL) + if ((sp2cie = new_xsp2cie(icxIT_none, NULL, obType, custObserver, icSigXYZData, icxClamp)) == NULL) error("Creation of spectral conversion object failed"); for (i = 0; i < npat; i++) { @@ -938,8 +948,8 @@ int main(int argc, char *argv[]) { cgf = NULL; } - if (spec != 0 && observ != icxOT_CIE_1931_2) - oname = standardObserverDescription(observ); + if (spec != 0 && obType != icxOT_CIE_1931_2) + oname = standardObserverDescription(obType); if (oname != NULL) { char *tt = colname; @@ -1211,8 +1221,8 @@ int main(int argc, char *argv[]) { for (i = 0; ; i++) { if (paths[i] == NULL) break; - if ((paths[i]->itype == instSpyder1 && setup_spyd2(0) == 0) - || (paths[i]->itype == instSpyder2 && setup_spyd2(1) == 0)) + if ((paths[i]->dtype == instSpyder1 && setup_spyd2(0) == 0) + || (paths[i]->dtype == instSpyder2 && setup_spyd2(1) == 0)) fprintf(stderr," %d = '%s' !! Disabled - no firmware !!\n",i+1,paths[i]->name); else fprintf(stderr," %d = '%s'\n",i+1,paths[i]->name); @@ -1308,7 +1318,7 @@ int main(int argc, char *argv[]) { if (spec) { /* Create a spectral conversion object */ - if ((sp2cie = new_xsp2cie(icxIT_none, NULL, observ, NULL, icSigXYZData, icxClamp)) == NULL) + if ((sp2cie = new_xsp2cie(icxIT_none, NULL, obType, custObserver, icSigXYZData, icxClamp)) == NULL) error("Creation of spectral conversion object failed"); } for (i = 0; i < npat; i++) { /* For all grid points */ @@ -1327,7 +1337,7 @@ int main(int argc, char *argv[]) { if (fake) refname = "fake spectrometer"; else - refname = inst_name(it->itype); + refname = inst_name(it->dtype); gotref = 1; if (sp2cie != NULL) sp2cie->del(sp2cie); @@ -1342,7 +1352,7 @@ int main(int argc, char *argv[]) { if (fake) colname = "fake colorimeter"; else - colname = inst_name(it->itype); + colname = inst_name(it->dtype); gotcol = 1; } } @@ -1427,8 +1437,8 @@ int main(int argc, char *argv[]) { continue; } - if (spec != 0 && observ != icxOT_CIE_1931_2) - oname = standardObserverDescription(observ); + if (spec != 0 && obType != icxOT_CIE_1931_2) + oname = standardObserverDescription(obType); if (oname != NULL) { /* Incorporate observer name in colname */ char *tt = colname; diff --git a/spectro/chartread.c b/spectro/chartread.c index e1624e1..6a9db39 100644..100755 --- a/spectro/chartread.c +++ b/spectro/chartread.c @@ -265,6 +265,7 @@ int disbidi, /* Disable automatic bi-directional strip recognition */ int highres, /* Use high res spectral mode */ char *ccxxname, /* Colorimeter Correction/Colorimeter Calibration name */ icxObserverType obType, /* ccss observer */ +xspect custObserver[3], /* If obType = icxOT_custom */ double scan_tol, /* Modify patch consistency tolerance */ int pbypatch, /* Patch by patch measurement */ int xtern, /* Use external (user supplied) values rather than instument read */ @@ -468,7 +469,7 @@ a1log *log /* verb, debug & error log */ it->del(it); return -1; } - if ((rv = it->get_set_opt(it, inst_opt_set_ccss_obs, obType, NULL)) != inst_ok) { + if ((rv = it->get_set_opt(it, inst_opt_set_ccss_obs, obType, custObserver)) != inst_ok) { printf("\nSetting CCSS observer failed with error :'%s' (%s)\n", it->inst_interp_error(it, rv), it->interp_error(it, rv)); cs->del(cs); @@ -489,7 +490,7 @@ a1log *log /* verb, debug & error log */ /* If non-standard observer wasn't set by a CCSS file above */ if (obType != icxOT_default && (cap2 & inst2_ccss) && ccssset == 0) { - if ((rv = it->get_set_opt(it, inst_opt_set_ccss_obs, obType, NULL)) != inst_ok) { + if ((rv = it->get_set_opt(it, inst_opt_set_ccss_obs, obType, custObserver)) != inst_ok) { printf("\nSetting CCSS observer failed with error :'%s' (%s)\n", it->inst_interp_error(it, rv), it->interp_error(it, rv)); it->del(it); @@ -552,12 +553,10 @@ a1log *log /* verb, debug & error log */ rmode = 0; } } else if (displ) { -printf("~1 using displ mode\n"); /* We assume a display mode will always be spot by spot */ mode = inst_mode_emis_spot; rmode = 0; } else if (emis) { -printf("~1 using emis mode\n"); if (pbypatch && it->check_mode(it, inst_mode_emis_spot) == inst_ok) { mode = inst_mode_emis_spot; @@ -1466,7 +1465,7 @@ printf("~1 using emis mode\n"); /* DTP51 has a nasty habit of misaligning test squares by +/- 1 */ /* See if this might have happened */ - if (it->itype == instDTP51) { + if (it->dtype == instDTP51) { loff = -1; hoff = 1; } @@ -2155,9 +2154,9 @@ usage() { fprintf(stderr," -X file.ccss Use Colorimeter Calibration Spectral Samples for calibration\n"); fprintf(stderr," -Q observ Choose CIE Observer for CCSS instrument:\n"); #ifdef SALONEINSTLIB - fprintf(stderr," 1931_2 (def), 1964_10\n"); + fprintf(stderr," 1931_2 (def), 1964_10, 2012_2, 2012_10\n"); #else /* !SALONEINSTLIB */ - fprintf(stderr," 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2\n"); + fprintf(stderr," 1931_2 (def), 1964_10, 2012_2, 2012_10, S&B 1955_2, shaw, J&V 1978_2 or file.cmf\n"); #endif /* !SALONEINSTLIB */ } fprintf(stderr," -T ratio Modify strip patch consistency tolerance by ratio\n"); @@ -2208,6 +2207,7 @@ int main(int argc, char *argv[]) { int doplot = 0; /* Plot spectral of patch by patch */ char ccxxname[MAXNAMEL+1] = "\000"; /* Colorimeter Correction/Colorimeter Calibration name */ icxObserverType obType = icxOT_default; /* ccss observer */ + xspect custObserver[3]; /* If obType = icxOT_custom */ static char inname[MAXNAMEL+1] = { 0 }; /* Input cgats file base name */ static char outname[MAXNAMEL+1] = { 0 }; /* Output cgats file base name */ cgats *icg; /* input cgats structure */ @@ -2300,6 +2300,10 @@ int main(int argc, char *argv[]) { obType = icxOT_CIE_1931_2; } else if (strcmp(na, "1964_10") == 0) { /* Classic 10 degree */ obType = icxOT_CIE_1964_10; + } else if (strcmp(na, "2012_2") == 0) { /* Latest 2 degree */ + obType = icxOT_CIE_2012_2; + } else if (strcmp(na, "2012_10") == 0) { /* Latest 10 degree */ + obType = icxOT_CIE_2012_10; #ifndef SALONEINSTLIB } else if (strcmp(na, "1955_2") == 0) { /* Stiles and Burch 1955 2 degree */ obType = icxOT_Stiles_Burch_2; @@ -2308,8 +2312,11 @@ int main(int argc, char *argv[]) { } else if (strcmp(na, "shaw") == 0) { /* Shaw and Fairchilds 1997 2 degree */ obType = icxOT_Shaw_Fairchild_2; #endif /* !SALONEINSTLIB */ - } else - usage(); + } else { /* Assume it's a filename */ + obType = icxOT_custom; + if (read_cmf(custObserver, na) != 0) + usage(); + } } /* Scan tolerance ratio */ @@ -2992,7 +2999,7 @@ int main(int argc, char *argv[]) { if (read_strips(itype, scols, &atype, npat, totpa, stipa, pis, paix, saix, ixord, rstart, rand, hex, ipath, fc, plen, glen, tlen, trans, emis, displ, dtype, fe, scalstd, &ucalstd, nocal, disbidi, highres, - ccxxname, obType, + ccxxname, obType, custObserver, scan_tol, pbypatch, xtern, spectral, uvmode, accurate_expd, emit_warnings, doplot, g_log) == 0) { /* And save the result */ @@ -3009,6 +3016,13 @@ int main(int argc, char *argv[]) { if (displ == 0 && trans == 0 && ucalstd != xcalstd_none) ocg->add_kword(ocg, 0, "DEVCALSTD",xcalstd2str(ucalstd), NULL); + if (fe == inst_opt_filter_pol) + ocg->add_kword(ocg, 0, "INSTRUMENT_FILTER", "POLARIZED", NULL); + else if (fe == inst_opt_filter_D65) + ocg->add_kword(ocg, 0, "INSTRUMENT_FILTER", "D65", NULL); + else if (fe == inst_opt_filter_UVCut) + ocg->add_kword(ocg, 0, "INSTRUMENT_FILTER", "UVCUT", NULL); + /* Count patches actually read */ for (nrpat = i = 0; i < npat; i++) { if (cols[i].rr) { diff --git a/spectro/colorhug.c b/spectro/colorhug.c index fefe766..aa8ba21 100644..100755 --- a/spectro/colorhug.c +++ b/spectro/colorhug.c @@ -33,6 +33,7 @@ #include "sa_config.h" #include "numsup.h" #endif /* SALONEINSTLIB */ +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -1197,7 +1198,7 @@ colorhug_get_set_opt(inst *pp, inst_opt_type m, ...) { } /* Constructor */ -extern colorhug *new_colorhug(icoms *icom, instType itype) { +extern colorhug *new_colorhug(icoms *icom, instType dtype) { colorhug *p; int i; @@ -1223,9 +1224,9 @@ extern colorhug *new_colorhug(icoms *icom, instType itype) { p->del = colorhug_del; p->icom = icom; - p->itype = itype; + p->dtype = dtype; - if (itype == instColorHug2) + if (dtype == instColorHug2) p->stype = ch_two; icmSetUnity3x3(p->ccmat); diff --git a/spectro/colorhug.h b/spectro/colorhug.h index 8617705..8617705 100644..100755 --- a/spectro/colorhug.h +++ b/spectro/colorhug.h diff --git a/spectro/conv.c b/spectro/conv.c index 284a30c..a728566 100644..100755 --- a/spectro/conv.c +++ b/spectro/conv.c @@ -41,6 +41,9 @@ #include <stdarg.h> #include <errno.h> #include <string.h> +#include <sys/time.h> +#include <sys/types.h> +#include <pwd.h> /* select() defined, but not poll(), so emulate poll() */ #if defined(FD_CLR) && !defined(POLLIN) @@ -59,6 +62,7 @@ #include "sa_config.h" #endif #include "numsup.h" +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -241,6 +245,12 @@ void empty_con_chars(void) { if ((stdinh = GetStdHandle(STD_INPUT_HANDLE)) == INVALID_HANDLE_VALUE) return; for (;;) { + /* Wait for 1msec */ + + /* Do dummy read, as stdin seems to be signalled on startup */ + if (WaitForSingleObject(stdinh, 1) == WAIT_OBJECT_0) + ReadFile(stdinh, buf, 0, &bread, NULL); + if (WaitForSingleObject(stdinh, 1) == WAIT_OBJECT_0) { ReadFile(stdinh, buf, 100, &bread, NULL); } else { @@ -423,6 +433,13 @@ athread *new_athread( /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ +/* Return the login $HOME directory. */ +/* (Useful if we might be running sudo) */ +/* No NT equivalent ?? */ +char *login_HOME() { + return getenv("HOME"); +} + /* Delete a file */ void delete_file(char *fname) { _unlink(fname); @@ -789,6 +806,7 @@ static void *threadproc( athread *p = (athread *)param; /* Register this thread with the Objective-C garbage collector */ + /* (Hmm. Done by default in latter versions though, hence deprecated in them ?) */ #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 objc_registerThreadWithCollector(); #endif @@ -833,6 +851,29 @@ athread *new_athread( /* - - - - - - - - - - - - - - - - - - - - - - - - */ +/* Return the login $HOME directory. */ +/* (Useful if we might be running sudo) */ +char *login_HOME() { + + if (getuid() == 0) { /* If we are running as root */ + char *uids; + + if ((uids = getenv("SUDO_UID")) != NULL) { /* And we sudo's to get it */ + int uid; + struct passwd *pwd; + + uid = atoi(uids); + + if ((pwd = getpwuid(uid)) != NULL) { + return pwd->pw_dir; + } + } + } + + return getenv("HOME"); +} + + /* Delete a file */ void delete_file(char *fname) { unlink(fname); diff --git a/spectro/conv.h b/spectro/conv.h index a6adcbf..14e5636 100644..100755 --- a/spectro/conv.h +++ b/spectro/conv.h @@ -168,6 +168,10 @@ athread *new_athread(int (*function)(void *context), void *context); /* - - - - - - - - - - - - - - - - - - -- */ +/* Return the login $HOME directory. */ +/* (Useful if we might be running sudo) */ +char *login_HOME(); + /* Delete a file */ void delete_file(char *fname); diff --git a/spectro/cubecal.h b/spectro/cubecal.h index 93f1ada..93f1ada 100644..100755 --- a/spectro/cubecal.h +++ b/spectro/cubecal.h diff --git a/spectro/dev.h b/spectro/dev.h index 0b62de3..004c20f 100644..100755 --- a/spectro/dev.h +++ b/spectro/dev.h @@ -29,13 +29,15 @@ /* Device base object. */ #define DEV_OBJ_BASE \ a1log *log; /* Pointer to debug & error logging class */ \ + devType dtype; /* Device type determined by driver */ \ icoms *icom; /* Device coms object */ \ - instType itype; /* Device type determined by driver */ \ + int gotcoms; /* Coms established flag */ \ + int inited; /* Device open and initialized flag */ \ /* The base object type */ struct _dev { DEV_OBJ_BASE - }; typedef struct _dev dev; +}; typedef struct _dev dev; #define DEV_H #endif /* DEV_H */ diff --git a/spectro/dispcal.c b/spectro/dispcal.c index 65e2f10..a4798af 100644..100755 --- a/spectro/dispcal.c +++ b/spectro/dispcal.c @@ -151,6 +151,8 @@ #undef CHECK_MODEL /* Do readings to check the accuracy of our model */ #undef SHOW_WINDOW_ONFAKE /* Display a test window up for a fake device */ +#undef DEBUG_MEAS_RES /* Debug just VideoLUT resolution code */ + /* Invoke with -dfake for testing with a fake device. */ /* Will use a fake.icm/.icc profile if present, or a built in fake */ /* device behaviour if not. */ @@ -178,18 +180,19 @@ #define RDAC_SMOOTH 0.3 /* RAMDAC curve fitting smoothness */ #define MEAS_RES /* Measure the RAMNDAC entry size */ -#ifdef DEBUG_PLOT +#if defined(DEBUG_PLOT) || defined(DEBUG) || defined(DEBUG_MEAS_RES) #include "plot.h" #endif #if defined(DEBUG) - -#define DBG(xxx) fprintf xxx ; -#define dbgo stderr +# define DBG(xxx) fprintf xxx ; +# define DEBUG_MEAS_RES #else -#define DBG(xxx) +# define DBG(xxx) #endif /* DEBUG */ +#define dbgo stderr + /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* Sample points used in initial device model optimisation */ @@ -1242,6 +1245,7 @@ static double comp_ct( int plank, /* NZ if Plankian locus, 0 if Daylight locus */ int dovct, /* NZ if visual match, 0 if traditional correlation */ icxObserverType obType, /* If not default, set a custom observer */ + xspect custObserver[3], /* If obType = icxOT_custom */ double xyz[3] /* Color to match */ ) { double ct_xyz[3]; /* XYZ on locus */ @@ -1254,7 +1258,7 @@ static double comp_ct( obType = icxOT_CIE_1931_2; if ((ct = icx_XYZ2ill_ct(ct_xyz, plank != 0 ? icxIT_Ptemp : icxIT_Dtemp, - obType, NULL, xyz, NULL, dovct)) < 0) + obType, custObserver, xyz, NULL, dovct)) < 0) error("Got bad color temperature conversion\n"); if (de != NULL) { @@ -1317,7 +1321,7 @@ static int comp_ramdac_prec( val[i] = (double)i; meas[i] = ttt[i].XYZ[1]; } -#ifdef DEBUG +#ifdef DEBUG_MEAS_RES fprintf(dbgo,"raw measurements:\n"); do_plot(val, meas, NULL, NULL, 17); #endif @@ -1337,67 +1341,85 @@ static int comp_ramdac_prec( /* Create score for each hypothesis */ scale = 1.0; - for (j = 0; j < 5; j++) { + for (j = 0; j < 5; j++) { /* Res 8, 9, 10, 11, 12 bits */ int k; - int step = 1 << (4 - j); + int step = 1 << (4 - j); /* Step 16, 8, 4, 2, 1 */ double v = 0.0; double merr; + int off; + double oscore; /* Offset score */ bits[j] = 8.0 + j; + score[j] = 1e38; - /* Create the target response */ - for (i = 0; i < 17;) { - for (k = 0; k < step && (i+k) < 17; k++) { - targ[i + k] = v; + /* Try possible offsets */ + for (off = 0; off < step; off++) { + int ik = off; /* Initial k */ + + /* Create the target response */ + for (i = 0; i < 17;) { + int ii; /* Actual count of loop */ + for (ii = 0, k = ik; k < step && (i+k) < 17; k++, ii++) { + targ[i + ii] = v; //printf("j %d: targ[%d] = %f\n",j,i+k,v); + } + v += step/16.0; + i += ii; + ik = 0; } - v += step/16.0; - i += k; - } - /* Tweak it for typical display non-linearity */ - min = 1e9, max = -1e9; - for (i = 0; i < 17; i++) { - targ[i] = pow((NVAL + targ[i]/16.0)/255.0, 2.2); - if (targ[i] < min) - min = targ[i]; - if (targ[i] > max) - max = targ[i]; - } - for (i = 0; i < 17; i++) - targ[i] = (targ[i] - min)/(max - min); + /* Tweak it for typical display non-linearity */ + min = 1e9, max = -1e9; + for (i = 0; i < 17; i++) { + targ[i] = pow((NVAL + targ[i]/16.0)/255.0, 2.2); + if (targ[i] < min) + min = targ[i]; + if (targ[i] > max) + max = targ[i]; + } + for (i = 0; i < 17; i++) + targ[i] = (targ[i] - min)/(max - min); + + /* Try and make fit a little better */ + /* with a crude optimisation */ + for (k = 0; k < 50; k++) { + + merr = 0.0; + for (i = 0; i < 17; i++) + merr += targ[i] - meas[i]; + merr /= 17.0; - /* Try and make fit a little better */ - /* with a crude optimisation */ - for (k = 0; k < 50; k++) { + for (i = 0; i < 17; i++) { + targ[i] *= (1.0 + 0.5 * merr); + targ[i] -= 0.5 * merr; +// targ[i] -= merr; + } + } - merr = 0.0; - for (i = 0; i < 17; i++) - merr += targ[i] - meas[i]; - merr /= 17.0; - + oscore = 0.0; for (i = 0; i < 17; i++) { - targ[i] *= (1.0 + 0.5 * merr); - targ[i] -= 0.5 * merr; -// targ[i] -= merr; + double tt = targ[i] - meas[i]; + tt *= tt; + oscore += tt; } - } - score[j] = 0.0; - for (i = 0; i < 17; i++) { - double tt = targ[i] - meas[i]; - score[j] += tt * tt; +#ifdef DEBUG_MEAS_RES + printf("%d bits %d offset score %f\n",8+j,off,oscore); + do_plot(val, meas, targ, NULL, 17); +#endif + /* keep best score from offsets */ + if (oscore < score[j]) + score[j] = oscore; } + score[j] *= scale; - scale *= 1.1; + scale *= 1.7; /* De-weight higher bit depth slightly */ + /* Correct if overall graph is symetrical */ + /* around minimum value ? */ -#ifdef DEBUG - printf("%d bits score %f\n",8+j,score[j]); - do_plot(val, meas, targ, NULL, 17); -#endif } - /* Pick the best score */ + /* Locate the best and second best scores */ bcor = bcor2 = 1e8; bbits = 0; @@ -1415,9 +1437,15 @@ static int comp_ramdac_prec( /* Don't pick anything if it's not reasonably certain */ if (bcor2/bcor < 1.3 || (bcor2/bcor < 2.1 && bcor > 0.15) - ) rbits = 0; + ) { +#ifdef DEBUG_MEAS_RES + printf("bcor2/bcor < 1.3 %d\n",bcor2/bcor < 1.3); + printf("bcor2/bcor < 2.1 %d && bcor > 0.15 %d -> %d\n", bcor2/bcor < 2.1, bcor > 0.15, bcor2/bcor < 2.1 && bcor > 0.15); +#endif + rbits = 0; + } -#ifdef DEBUG +#ifdef DEBUG_MEAS_RES printf("Win score %f by cor %f, ratio %f\n",bcor, bcor2 - bcor, bcor2/bcor); printf("Best %d, returning %d bits\n",bbits,rbits); do_plot10(bits, score, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5, 1); @@ -1489,7 +1517,7 @@ double g_def_gamma = 2.4; */ /* Flag = 0x0000 = default */ -/* Flag & 0x0001 = list ChromCast's */ +/* Flag & 0x0001 = list ChromeCast's */ void usage(int flag, char *diag, ...) { int i; disppath **dp; @@ -1532,10 +1560,10 @@ void usage(int flag, char *diag, ...) { if (flag & 0x001) { ccast_id **ids; if ((ids = get_ccids()) == NULL) { - fprintf(stderr," ** Error discovering ChromCasts **\n"); + fprintf(stderr," ** Error discovering ChromeCasts **\n"); } else { if (ids[0] == NULL) - fprintf(stderr," ** No ChromCasts found **\n"); + fprintf(stderr," ** No ChromeCasts found **\n"); else { int i; for (i = 0; ids[i] != NULL; i++) @@ -1548,7 +1576,7 @@ void usage(int flag, char *diag, ...) { fprintf(stderr," -dmadvr Display via MadVR Video Renderer\n"); #endif // fprintf(stderr," -d fake Use a fake display device for testing, fake%s if present\n",ICC_FILE_EXT); - fprintf(stderr," -c listno Set communication port from the following list (default %d)\n",COMPORT); + fprintf(stderr," -c listno Choose instrument from the following list (default %d)\n",COMPORT); if ((icmps = new_icompaths(g_log)) != NULL) { icompath **paths; if ((paths = icmps->paths) != NULL) { @@ -1556,8 +1584,8 @@ void usage(int flag, char *diag, ...) { for (i = 0; ; i++) { if (paths[i] == NULL) break; - if ((paths[i]->itype == instSpyder1 && setup_spyd2(0) == 0) - || (paths[i]->itype == instSpyder2 && setup_spyd2(1) == 0)) + if ((paths[i]->dtype == instSpyder1 && setup_spyd2(0) == 0) + || (paths[i]->dtype == instSpyder2 && setup_spyd2(1) == 0)) fprintf(stderr," %d = '%s' !! Disabled - no firmware !!\n",i+1,paths[i]->name); else fprintf(stderr," %d = '%s'\n",i+1,paths[i]->name); @@ -1614,7 +1642,7 @@ void usage(int flag, char *diag, ...) { if (cap2 & inst2_ccss) { fprintf(stderr," -X file.ccss Use Colorimeter Calibration Spectral Samples for calibration\n"); fprintf(stderr," -Q observ Choose CIE Observer for spectrometer or CCSS colorimeter data:\n"); - fprintf(stderr," 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2, 1964_10c\n"); + fprintf(stderr," 1931_2 (def), 1964_10, 2012_2, 2012_10, S&B 1955_2, shaw, J&V 1978_2, 1964_10c or file.cmf\n"); } fprintf(stderr," -I b|w Drift compensation, Black: -Ib, White: -Iw, Both: -Ibw\n"); fprintf(stderr," -Y R:rate Override measured refresh rate with rate Hz\n"); @@ -1702,6 +1730,8 @@ int main(int argc, char *argv[]) { ccss *ccs = NULL; /* Colorimeter Calibration Spectral Samples */ int spec = 0; /* Want spectral data from instrument */ icxObserverType obType = icxOT_default; + xspect custObserver[3]; /* If obType = icxOT_custom */ + disprd *dr = NULL; /* Display patch read object */ csamp asgrey; /* Main calibration loop test points */ double dispLum = 0.0; /* Display luminence reading */ @@ -1733,12 +1763,18 @@ int main(int argc, char *argv[]) { /* causes warning messages in 10.10. */ /* OS X 10.6+ uses a nominal gamma of 2.2 */ - if (Gestalt(gestaltSystemVersionMajor, &MacMajVers) == noErr + if ( +#ifdef NEVER + Gestalt(gestaltSystemVersionMajor, &MacMajVers) == noErr && Gestalt(gestaltSystemVersionMinor, &MacMinVers) == noErr - && Gestalt(gestaltSystemVersionBugFix, &MacBFVers) == noErr) { - if (MacMajVers >= 10 && MacMinVers >= 6) { + && Gestalt(gestaltSystemVersionBugFix, &MacBFVers) == noErr + && MacMajVers >= 10 && MacMinVers >= 6 +#else + floor(kCFCoreFoundationVersionNumber) >= kCFCoreFoundationVersionNumber10_6 +#endif + + ) { g_def_gamma = 2.4; - } } #endif /* >= 1040 */ } @@ -1818,7 +1854,7 @@ int main(int argc, char *argv[]) { ccdisp = atoi(na+3); if (ccdisp <= 0) - usage(0,"ChromCast number must be in range 1..N"); + usage(0,"ChromeCast number must be in range 1..N"); } fa = nfa; #ifdef NT @@ -1916,6 +1952,10 @@ int main(int argc, char *argv[]) { obType = icxOT_CIE_1931_2; } else if (strcmp(na, "1964_10") == 0) { /* Classic 10 degree */ obType = icxOT_CIE_1964_10; + } else if (strcmp(na, "2012_2") == 0) { /* Latest 2 degree */ + obType = icxOT_CIE_2012_2; + } else if (strcmp(na, "2012_10") == 0) { /* Latest 10 degree */ + obType = icxOT_CIE_2012_10; } else if (strcmp(na, "1964_10c") == 0) { /* 10 degree corrected */ obType = icxOT_CIE_1964_10c; } else if (strcmp(na, "1955_2") == 0) { /* Stiles and Burch 1955 2 degree */ @@ -1924,8 +1964,11 @@ int main(int argc, char *argv[]) { obType = icxOT_Judd_Voss_2; } else if (strcmp(na, "shaw") == 0) { /* Shaw and Fairchilds 1997 2 degree */ obType = icxOT_Shaw_Fairchild_2; - } else - usage(0,"-Q parameter '%s' not recognised",na); + } else { /* Assume it's a filename */ + obType = icxOT_custom; + if (read_cmf(custObserver, na) != 0) + usage(0,"Failed to read custom observer CMF from -Q file '%s'",na); + } /* Change color callout */ } else if (argv[fa][1] == 'C') { @@ -2288,13 +2331,13 @@ int main(int argc, char *argv[]) { /* If we've requested ChromeCast, look it up */ if (ccdisp) { if ((ccids = get_ccids()) == NULL) - error("discovering ChromCasts failed"); + error("discovering ChromeCasts failed"); if (ccids[0] == NULL) - error("There are no ChromCasts to use\n"); + error("There are no ChromeCasts to use\n"); for (i = 0; ccids[i] != NULL; i++) ; if (ccdisp < 1 || ccdisp > i) - error("Chosen ChromCasts (%d) is outside list (1..%d)\n",ccdisp,i); + error("Chosen ChromeCasts (%d) is outside list (1..%d)\n",ccdisp,i); ccid = ccids[ccdisp-1]; } @@ -2353,7 +2396,7 @@ int main(int argc, char *argv[]) { cmx != NULL ? cmx->cc_cbid : 0, cmx != NULL ? cmx->matrix : NULL, ccs != NULL ? ccs->samples : NULL, ccs != NULL ? ccs->no_samp : 0, - spec, obType, NULL, bdrift, wdrift, + spec, obType, custObserver, bdrift, wdrift, "fake" ICC_FILE_EXT, g_log)) == NULL) error("new_disprd() failed with '%s'\n",disprd_err(errc)); @@ -2409,10 +2452,10 @@ int main(int argc, char *argv[]) { wp[0] = w[0]/(w[0] + w[1] + w[2]); wp[1] = w[1]/(w[0] + w[1] + w[2]); - cct = comp_ct(&cct_de, NULL, 1, 0, obType, w); /* Compute CCT */ - cdt = comp_ct(&cdt_de, NULL, 0, 0, obType, w); /* Compute CDT */ - vct = comp_ct(&vct_de, NULL, 1, 1, obType, w); /* Compute VCT */ - vdt = comp_ct(&vdt_de, NULL, 0, 1, obType, w); /* Compute VDT */ + cct = comp_ct(&cct_de, NULL, 1, 0, obType, custObserver, w); /* Compute CCT */ + cdt = comp_ct(&cdt_de, NULL, 0, 0, obType, custObserver, w); /* Compute CDT */ + vct = comp_ct(&vct_de, NULL, 1, 1, obType, custObserver, w); /* Compute VCT */ + vdt = comp_ct(&vdt_de, NULL, 0, 1, obType, custObserver, w); /* Compute VDT */ /* Compute advertised current gamma - use the gross curve shape for robustness */ cgamma = pop_gamma(tcols[0].XYZ[1], tcols[1].XYZ[1], tcols[2].XYZ[1]); @@ -3193,9 +3236,9 @@ int main(int argc, char *argv[]) { } else if (temp > 0.0) { /* Daylight color temperature */ double XYZ[3]; if (planckian) - rv = icx_ill_sp2XYZ(XYZ, icxOT_default, NULL, icxIT_Ptemp, temp, NULL); + rv = icx_ill_sp2XYZ(XYZ, icxOT_default, NULL, icxIT_Ptemp, temp, NULL, 0); else - rv = icx_ill_sp2XYZ(XYZ, icxOT_default, NULL, icxIT_Dtemp, temp, NULL); + rv = icx_ill_sp2XYZ(XYZ, icxOT_default, NULL, icxIT_Dtemp, temp, NULL, 0); if (rv != 0) error("Failed to compute XYZ of target color temperature %f\n",temp); icmXYZ2Yxy(tYxy, XYZ); @@ -3222,7 +3265,7 @@ int main(int argc, char *argv[]) { } else { /* Target is native white */ printf("\nAdjust R,G & B gain to desired white point. Press space when done.\n"); /* Compute the CT and delta E to white locus of target */ - ct = comp_ct(&ct_de, NULL, planckian, dovct, obType, tcols[0].XYZ); + ct = comp_ct(&ct_de, NULL, planckian, dovct, obType, custObserver, tcols[0].XYZ); printf(" Initial Br %.2f, x %.4f , y %.4f , %c%cT %4.0fK DE 2K %4.1f\n", tarw, tYxy[1],tYxy[2], dovct ? 'V' : 'C', planckian ? 'C' : 'D', ct,ct_de); @@ -3264,7 +3307,7 @@ int main(int argc, char *argv[]) { } else { /* Target is native white */ double lxyz[3]; /* Locus XYZ */ - ct = comp_ct(&ct_de, lxyz, planckian, dovct, obType, tcols[0].XYZ); + ct = comp_ct(&ct_de, lxyz, planckian, dovct, obType, custObserver, tcols[0].XYZ); icmXYZ2Yxy(tYxy, lxyz); /* lxyz is already normalised */ @@ -3476,9 +3519,9 @@ int main(int argc, char *argv[]) { } else if (temp > 0.0) { /* Daylight color temperature */ double XYZ[3]; if (planckian) - rv = icx_ill_sp2XYZ(XYZ, icxOT_default, NULL, icxIT_Ptemp, temp, NULL); + rv = icx_ill_sp2XYZ(XYZ, icxOT_default, NULL, icxIT_Ptemp, temp, NULL, 0); else - rv = icx_ill_sp2XYZ(XYZ, icxOT_default, NULL, icxIT_Dtemp, temp, NULL); + rv = icx_ill_sp2XYZ(XYZ, icxOT_default, NULL, icxIT_Dtemp, temp, NULL, 0); if (rv != 0) error("Failed to compute XYZ of target color temperature %f\n",temp); icmXYZ2Yxy(tYxy, XYZ); @@ -3652,9 +3695,9 @@ int main(int argc, char *argv[]) { } else if (temp > 0.0) { /* Daylight color temperature */ double XYZ[3]; if (planckian) - rv = icx_ill_sp2XYZ(XYZ, icxOT_default, NULL, icxIT_Ptemp, temp, NULL); + rv = icx_ill_sp2XYZ(XYZ, icxOT_default, NULL, icxIT_Ptemp, temp, NULL, 0); else - rv = icx_ill_sp2XYZ(XYZ, icxOT_default, NULL, icxIT_Dtemp, temp, NULL); + rv = icx_ill_sp2XYZ(XYZ, icxOT_default, NULL, icxIT_Dtemp, temp, NULL, 0); if (rv != 0) error("Failed to compute XYZ of target color temperature %f\n",temp); icmXYZ2Yxy(tYxy, XYZ); @@ -3695,7 +3738,7 @@ int main(int argc, char *argv[]) { icmXYZ2Lab(&tXYZ, bLab, bLab); /* And color temperature */ - ct = comp_ct(&ct_de, NULL, planckian, dovct, obType, tcols[2].XYZ); + ct = comp_ct(&ct_de, NULL, planckian, dovct, obType, custObserver, tcols[2].XYZ); printf("\n"); @@ -4187,9 +4230,9 @@ int main(int argc, char *argv[]) { } else if (temp > 0.0) { /* Daylight color temperature */ if (planckian) - rv = icx_ill_sp2XYZ(x.twh, icxOT_default, NULL, icxIT_Ptemp, temp, NULL); + rv = icx_ill_sp2XYZ(x.twh, icxOT_default, NULL, icxIT_Ptemp, temp, NULL, 0); else - rv = icx_ill_sp2XYZ(x.twh, icxOT_default, NULL, icxIT_Dtemp, temp, NULL); + rv = icx_ill_sp2XYZ(x.twh, icxOT_default, NULL, icxIT_Dtemp, temp, NULL, 0); if (rv != 0) error("Failed to compute XYZ of target color temperature %f\n",temp); //printf("~1 Raw target from temp %f XYZ = %f %f %f\n",temp,x.twh[0],x.twh[1],x.twh[2]); @@ -4360,7 +4403,7 @@ int main(int argc, char *argv[]) { 0.2, /* Background relative to reference white */ 80.0, /* Display is 80 cd/m^2 */ 0.0, 0.01, x.nwh, /* 0% flare and 1% glare same white point */ - 0, 1.0); + 0, 1.0, 0.0, NULL); break; case gt_Rec709: @@ -4371,7 +4414,7 @@ int main(int argc, char *argv[]) { 0.2, /* Background relative to reference white */ 1000.0/3.1415, /* Luminance of white in the Image field (cd/m^2) */ 0.0, 0.01, x.nwh, /* 0% flare and 1% glare same white point */ - 0, 1.0); + 0, 1.0, 0.0, NULL); break; default: @@ -4384,7 +4427,7 @@ int main(int argc, char *argv[]) { 0.2, /* Background relative to reference white */ x.twh[1], /* Target white level (cd/m^2) */ 0.0, 0.01, x.nwh, /* 0% flare and 1% glare same white point */ - 0, 1.0); + 0, 1.0, 0.0, NULL); /* Compute the normalisation values */ x.svc->XYZ_to_cam(x.svc, Jab, x.nwh); /* Relative white point */ diff --git a/spectro/dispread.c b/spectro/dispread.c index 4c96b76..5e332cc 100644..100755 --- a/spectro/dispread.c +++ b/spectro/dispread.c @@ -53,8 +53,8 @@ #include "copyright.h" #include "aconfig.h" #include "numlib.h" -#include "xspect.h" #include "cgats.h" +#include "xspect.h" #include "insttypes.h" #include "conv.h" #include "icoms.h" @@ -98,7 +98,7 @@ static int gcc_bug_fix(int i) { */ /* Flag = 0x0000 = default */ -/* Flag & 0x0001 = list ChromCast's */ +/* Flag & 0x0001 = list ChromeCast's */ void usage(int flag, char *diag, ...) { int i; disppath **dp; @@ -141,10 +141,10 @@ void usage(int flag, char *diag, ...) { if (flag & 0x001) { ccast_id **ids; if ((ids = get_ccids()) == NULL) { - fprintf(stderr," ** Error discovering ChromCasts **\n"); + fprintf(stderr," ** Error discovering ChromeCasts **\n"); } else { if (ids[0] == NULL) - fprintf(stderr," ** No ChromCasts found **\n"); + fprintf(stderr," ** No ChromeCasts found **\n"); else { int i; for (i = 0; ids[i] != NULL; i++) @@ -165,8 +165,8 @@ void usage(int flag, char *diag, ...) { for (i = 0; ; i++) { if (paths[i] == NULL) break; - if ((paths[i]->itype == instSpyder1 && setup_spyd2(0) == 0) - || (paths[i]->itype == instSpyder2 && setup_spyd2(1) == 0)) + if ((paths[i]->dtype == instSpyder1 && setup_spyd2(0) == 0) + || (paths[i]->dtype == instSpyder2 && setup_spyd2(1) == 0)) fprintf(stderr," %d = '%s' !! Disabled - no firmware !!\n",i+1,paths[i]->name); else fprintf(stderr," %d = '%s'\n",i+1,paths[i]->name); @@ -201,7 +201,7 @@ void usage(int flag, char *diag, ...) { if (cap2 & inst2_ccss) { fprintf(stderr," -X file.ccss Use Colorimeter Calibration Spectral Samples for calibration\n"); fprintf(stderr," -Q observ Choose CIE Observer for spectrometer or CCSS colorimeter data:\n"); - fprintf(stderr," 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2, 1964_10c\n"); + fprintf(stderr," 1931_2 (def), 1964_10, 2012_2, 2012_10, S&B 1955_2, shaw, J&V 1978_2, 1964_10c or file.cmf\n"); } fprintf(stderr," -I b|w Drift compensation, Black: -Ib, White: -Iw, Both: -Ibw\n"); fprintf(stderr," -Y R:rate Override measured refresh rate with rate Hz\n"); @@ -252,6 +252,7 @@ int main(int argc, char *argv[]) { ccss *ccs = NULL; /* Colorimeter Calibration Spectral Samples */ int spec = 0; /* Don't save spectral information */ icxObserverType obType = icxOT_default; + xspect custObserver[3]; /* If obType = icxOT_custom */ int webdisp = 0; /* NZ for web display, == port number */ int ccdisp = 0; /* NZ for ChromeCast, == list index */ ccast_id **ccids = NULL; @@ -356,7 +357,7 @@ int main(int argc, char *argv[]) { ccdisp = atoi(na+3); if (ccdisp <= 0) - usage(0,"ChromCast number must be in range 1..N"); + usage(0,"ChromeCast number must be in range 1..N"); } fa = nfa; #ifdef NT @@ -531,6 +532,10 @@ int main(int argc, char *argv[]) { obType = icxOT_CIE_1931_2; } else if (strcmp(na, "1964_10") == 0) { /* Classic 10 degree */ obType = icxOT_CIE_1964_10; + } else if (strcmp(na, "2012_2") == 0) { /* Latest 2 degree */ + obType = icxOT_CIE_2012_2; + } else if (strcmp(na, "2012_10") == 0) { /* Latest 10 degree */ + obType = icxOT_CIE_2012_10; } else if (strcmp(na, "1964_10c") == 0) { /* 10 degree corrected */ obType = icxOT_CIE_1964_10c; } else if (strcmp(na, "1955_2") == 0) { /* Stiles and Burch 1955 2 degree */ @@ -539,9 +544,11 @@ int main(int argc, char *argv[]) { obType = icxOT_Judd_Voss_2; } else if (strcmp(na, "shaw") == 0) { /* Shaw and Fairchilds 1997 2 degree */ obType = icxOT_Shaw_Fairchild_2; - } else - usage(0,"-Q parameter '%s' not recognised",na); - + } else { /* Assume it's a filename */ + obType = icxOT_custom; + if (read_cmf(custObserver, na) != 0) + usage(0,"Failed to read custom observer CMF from -Q file '%s'",na); + } /* Change color callout */ } else if (argv[fa][1] == 'C') { @@ -683,13 +690,13 @@ int main(int argc, char *argv[]) { /* If we've requested ChromeCast, look it up */ if (ccdisp) { if ((ccids = get_ccids()) == NULL) - error("discovering ChromCasts failed"); + error("discovering ChromeCasts failed"); if (ccids[0] == NULL) - error("There are no ChromCasts to use\n"); + error("There are no ChromeCasts to use\n"); for (i = 0; ccids[i] != NULL; i++) ; if (ccdisp < 1 || ccdisp > i) - error("Chosen ChromCasts (%d) is outside list (1..%d)\n",ccdisp,i); + error("Chosen ChromeCasts (%d) is outside list (1..%d)\n",ccdisp,i); ccid = ccids[ccdisp-1]; } @@ -924,7 +931,7 @@ int main(int argc, char *argv[]) { cmx != NULL ? cmx->cc_cbid : 0, cmx != NULL ? cmx->matrix : NULL, ccs != NULL ? ccs->samples : NULL, ccs != NULL ? ccs->no_samp : 0, - spec, obType, NULL, bdrift, wdrift, + spec, obType, custObserver, bdrift, wdrift, "fake" ICC_FILE_EXT, g_log)) == NULL) error("new_disprd failed with '%s'\n",disprd_err(errc)); @@ -1083,7 +1090,7 @@ int main(int argc, char *argv[]) { ocg->add_kword(ocg, 0, "NORMALIZED_TO_Y_100","NO", NULL); /* Write out the calibration if we have it */ - if (cal != NULL && cal[0][0] >= 0.0) { + if (cal[0][0] >= 0.0) { ocg->add_other(ocg, "CAL"); /* our special type is Calibration file */ ocg->add_table(ocg, tt_other, 1); /* Add another table for RAMDAC values */ ocg->add_kword(ocg, 1, "DESCRIPTOR", "Argyll Device Calibration State",NULL); diff --git a/spectro/dispsup.c b/spectro/dispsup.c index 281912d..21e847f 100644..100755 --- a/spectro/dispsup.c +++ b/spectro/dispsup.c @@ -32,9 +32,11 @@ #include <sys/types.h> #include <time.h> #include <string.h> +#include <ctype.h> #include "copyright.h" #include "aconfig.h" #include "numlib.h" +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" diff --git a/spectro/dispsup.h b/spectro/dispsup.h index 07a66e2..07a66e2 100644..100755 --- a/spectro/dispsup.h +++ b/spectro/dispsup.h diff --git a/spectro/disptechs.c b/spectro/disptechs.c index bade777..bade777 100644..100755 --- a/spectro/disptechs.c +++ b/spectro/disptechs.c diff --git a/spectro/disptechs.h b/spectro/disptechs.h index 9860eac..9860eac 100644..100755 --- a/spectro/disptechs.h +++ b/spectro/disptechs.h diff --git a/spectro/dispwin.c b/spectro/dispwin.c index 368f707..7761db1 100644..100755 --- a/spectro/dispwin.c +++ b/spectro/dispwin.c @@ -17,6 +17,15 @@ /* TTBD * + * Should add support for XRandR 1.5 MST support, so that a Monitor driven + * by multiple CRTCs gets treated as a single item. (How does Xinerama emulation + * handle this though ?) - i.e. might have to duplicate profile atoms, + * set both VideoLUTs when one is set, deal with EDID/ucmm confusion etc. + * Note that XRandR Xinerama emulation changes with v1.5 and MST. + * + * Should look at MSWin & OS X uninstall profile function, and see if + * requirement of supplying profile name can be removed (just like X11 case). + * * Should probably check the display attributes (like visual depth) * and complain if we aren't using 24 bit color or better. * @@ -56,7 +65,7 @@ #include "numlib.h" #include "cgats.h" #include "conv.h" -#include "xicc.h" +# include "xicc.h" #include "disptechs.h" #include "dispwin.h" #include "ui.h" @@ -66,6 +75,9 @@ #ifdef NT # include "madvrwin.h" #endif +#include "insttypes.h" +#include "inst.h" +#include "icoms.h" #if defined(UNIX_X11) # include <dlfcn.h> # if defined(USE_UCMM) @@ -92,6 +104,7 @@ */ #include <Foundation/Foundation.h> +#include <CoreFoundation/CoreFoundation.h> #include <AppKit/AppKit.h> @@ -153,8 +166,9 @@ CFUUIDRef CGDisplayCreateUUIDFromDisplayID (uint32_t displayID); #endif -/* ----------------------------------------------- */ -/* Dealing with locating displays */ +/* ===================================================================== */ +/* Display enumeration code */ +/* ===================================================================== */ int callback_ddebug = 0; /* Diagnostic global for get_displays() and get_a_display() */ /* and events */ @@ -597,11 +611,16 @@ disppath **get_displays() { } #if RANDR_MAJOR == 1 && RANDR_MINOR >= 2 && !defined(DISABLE_RANDR) - /* Use Xrandr 1.2 if it's available, and if it's not disabled */ + /* Use Xrandr 1.2 if it's available, and if it's not disabled. */ if (getenv("ARGYLL_IGNORE_XRANDR1_2") == NULL && XRRQueryExtension(mydisplay, &evb, &erb) != 0 && XRRQueryVersion(mydisplay, &majv, &minv) && majv == 1 && minv >= 2) { + static void *xrr_found = NULL; /* .so handle */ + static XRRScreenResources *(*_XRRGetScreenResourcesCurrent) + (Display *dpy, Window window) = NULL; + static RROutput (*_XRRGetOutputPrimary)(Display *dpy, Window window) = NULL; + int defsix; /* Default Screen index */ if (XSetErrorHandler(null_error_handler) == 0) { debugrr("get_displays failed on XSetErrorHandler\n"); @@ -610,20 +629,38 @@ disppath **get_displays() { return NULL; } + /* Get functions available in Xrandr V1.3 */ + if (minv >= 3 && xrr_found == NULL) { + if ((xrr_found = dlopen("libXrandr.so", RTLD_LAZY)) != NULL) { + _XRRGetScreenResourcesCurrent = dlsym(xrr_found, "XRRGetScreenResourcesCurrent"); + _XRRGetOutputPrimary = dlsym(xrr_found, "XRRGetOutputPrimary"); + } + } + + /* Hmm. Do Xrandr systems alway have only one Screen, */ + /* just like Xinerama ? */ dcount = ScreenCount(mydisplay); - /* Go through all the screens */ + debugrr2((errout,"get_displays using %d XRandR Screens\n",dcount)); + + /* Not sure what to do with this. */ + /* Should we go through X11 screens with this first ? */ + /* (How does Xrandr translate Screen 1..n to Xinerama ?????) */ + defsix = DefaultScreen(mydisplay); + + /* In order to be in sync with an application using Xinerama, */ + /* we need to generate our screen indexes in the same */ + /* order as Xinerama. */ + + /* Go through all the X11 screens */ for (i = 0; i < dcount; i++) { - static void *xrr_found = NULL; /* .so handle */ - static XRRScreenResources *(*_XRRGetScreenResourcesCurrent) - (Display *dpy, Window window) = NULL; XRRScreenResources *scrnres; - int jj; /* Screen index */ - - if (minv >= 3 && xrr_found == NULL) { - if ((xrr_found = dlopen("libXrandr.so", RTLD_LAZY)) != NULL) - _XRRGetScreenResourcesCurrent = dlsym(xrr_found, "XRRGetScreenResourcesCurrent"); - } + int has_primary = 0; + int pix = -1; /* CRTC index containing primary */ + int pop = -1; /* Output index containing primary */ + int jj; /* Xinerama screen ix */ + int xj; /* working crtc index */ + int xk; /* working output index */ if (minv >= 3 && _XRRGetScreenResourcesCurrent != NULL) { scrnres = _XRRGetScreenResourcesCurrent(mydisplay, RootWindow(mydisplay,i)); @@ -637,70 +674,150 @@ disppath **get_displays() { free_disppaths(disps); return NULL; } + /* We have to scan through CRTC's & outputs in the same order */ + /* as the XRANDR XInerama implementation in the X server. */ + /* This is a little tricky, as we need to do the primary output, */ + /* first, while keeping the rest in order. */ + + /* Locate the crtc index that contains the primary (if any) */ + if (minv >= 3 && _XRRGetOutputPrimary != NULL) { + XID primary; /* Primary output ID */ + + primary = _XRRGetOutputPrimary(mydisplay, RootWindow(mydisplay,i)); + debugrr2((errout,"XRRGetOutputPrimary returned XID %x\n",primary)); + + if (primary != None) { + for (j = 0; j < scrnres->ncrtc; j++) { + XRRCrtcInfo *crtci = NULL; + + if ((crtci = XRRGetCrtcInfo(mydisplay, scrnres, scrnres->crtcs[j])) == NULL) + continue; + + if (crtci->mode == None || crtci->noutput == 0) { + XRRFreeCrtcInfo(crtci); + continue; + } + + for (k = 0; k < crtci->noutput; k++) { + if (crtci->outputs[k] == primary) { + pix = j; + pop = k; + } + } + XRRFreeCrtcInfo(crtci); + } + if (pix < 0) { /* Didn't locate primary */ + debugrr2((errout,"Couldn't locate primary CRTC!\n")); + } else { + debugrr2((errout,"Primary is at CRTC %d Output %d\n",pix,pop)); + has_primary = 1; + } + } + } - /* Look at all the screens outputs */ - for (jj = j = 0; j < scrnres->noutput; j++) { - XRROutputInfo *outi = NULL; + /* Look through all the Screens CRTC's */ + for (jj = xj = j = 0; j < scrnres->ncrtc; j++, xj++) { + char *pp; XRRCrtcInfo *crtci = NULL; - - if ((outi = XRRGetOutputInfo(mydisplay, scrnres, scrnres->outputs[j])) == NULL) { - debugrr("XRRGetOutputInfo failed\n"); - XRRFreeScreenResources(scrnres); - XCloseDisplay(mydisplay); - free_disppaths(disps); - return NULL; + XRROutputInfo *outi0 = NULL; + + if (has_primary) { + if (j == 0) + xj = pix; /* Start with crtc containing primary */ + + else if (xj == pix) /* We've up to primary that we've alread done */ + xj++; /* Skip it */ } - - if (outi->connection == RR_Disconnected || - outi->crtc == None) { - XRRFreeOutputInfo(outi); + + if ((crtci = XRRGetCrtcInfo(mydisplay, scrnres, scrnres->crtcs[xj])) == NULL) { + debugrr2((errout,"XRRGetCrtcInfo of Screen %d CRTC %d failed\n",i,xj)); + if (has_primary && j == 0) + xj = -1; /* Start at beginning */ continue; } - /* Check that the VideoLUT's are accessible */ - { - XRRCrtcGamma *crtcgam = NULL; - - debugrr("Checking XRandR 1.2 VideoLUT access\n"); - if ((crtcgam = XRRGetCrtcGamma(mydisplay, outi->crtc)) == NULL - || crtcgam->size == 0) { - fprintf(stderr,"XRandR 1.2 is faulty - falling back to older extensions\n"); + debugrr2((errout,"XRRGetCrtcInfo of Screen %d CRTC %d has %d Outputs %s Mode\n",i,xj,crtci->noutput,crtci->mode == None ? "No" : "Valid")); + + if (crtci->mode == None || crtci->noutput == 0) { + debugrr2((errout,"CRTC skipped as it has no mode or no outputs\n",i,xj,crtci->noutput)); + XRRFreeCrtcInfo(crtci); + if (has_primary && j == 0) + xj = -1; /* Start at beginning */ + continue; + } + + /* This CRTC will now be counted as an Xinerama screen */ + /* For each output of Crtc */ + for (xk = k = 0; k < crtci->noutput; k++, xk++) { + XRROutputInfo *outi = NULL; + + if (has_primary && xj == pix) { + if (k == 0) + xk = pop; /* Start with primary output */ + else if (xk == pop) /* We've up to primary that we've alread done */ + xk++; /* Skip it */ + } + + if ((outi = XRRGetOutputInfo(mydisplay, scrnres, crtci->outputs[xk])) == NULL) { + debugrr2((errout,"XRRGetOutputInfo failed for Screen %d CRTC %d Output %d\n",i,xj,xk)); + goto next_output; + } + if (k == 0) /* Save this so we can label any clones */ + outi0 = outi; + + if (outi->connection == RR_Disconnected) { + debugrr2((errout,"Screen %d CRTC %d Output %d is disconnected\n",i,xj,xk)); + goto next_output; + } + + /* Check that the VideoLUT's are accessible */ + { + XRRCrtcGamma *crtcgam = NULL; + + debugrr("Checking XRandR 1.2 VideoLUT access\n"); + if ((crtcgam = XRRGetCrtcGamma(mydisplay, scrnres->crtcs[xj])) == NULL + || crtcgam->size == 0) { + fprintf(stderr,"XRRGetCrtcGamma failed - falling back to older extensions\n"); + if (crtcgam != NULL) + XRRFreeGamma(crtcgam); + if (outi != NULL && outi != outi0) + XRRFreeOutputInfo(outi); + if (outi0 != NULL) + XRRFreeOutputInfo(outi0); + XRRFreeCrtcInfo(crtci); + XRRFreeScreenResources(scrnres); + free_disppaths(disps); + disps = NULL; + goto done_xrandr; + } if (crtcgam != NULL) XRRFreeGamma(crtcgam); - free_disppaths(disps); - disps = NULL; - j = scrnres->noutput; - i = dcount; - XRRFreeOutputInfo(outi); - continue; /* Abort XRandR 1.2 */ } - if (crtcgam != NULL) - XRRFreeGamma(crtcgam); - } #ifdef NEVER - { - Atom *oprops; - int noprop; + { + Atom *oprops; + int noprop; - /* Get a list of the properties of the output */ - oprops = XRRListOutputProperties(mydisplay, scrnres->outputs[j], &noprop); + /* Get a list of the properties of the output */ + oprops = XRRListOutputProperties(mydisplay, crtci->outputs[xk], &noprop); - printf("num props = %d\n", noprop); - for (k = 0; k < noprop; k++) { - printf("%d: atom 0x%x, name = '%s'\n", k, oprops[k], XGetAtomName(mydisplay, oprops[k])); + printf("num props = %d\n", noprop); + for (k = 0; k < noprop; k++) { + printf("%d: atom 0x%x, name = '%s'\n", k, oprops[k], XGetAtomName(mydisplay, oprops[k])); + } } - } #endif /* NEVER */ - if ((crtci = XRRGetCrtcInfo(mydisplay, scrnres, outi->crtc)) != NULL) { - char *pp; - /* Add the output to the list */ + debugrr2((errout,"Adding Screen %d CRTC %d Output %d\n",i,xj,xk)); if (disps == NULL) { if ((disps = (disppath **)calloc(sizeof(disppath *), 1 + 1)) == NULL) { debugrr("get_displays failed on malloc\n"); XRRFreeCrtcInfo(crtci); - XRRFreeOutputInfo(outi); + if (outi != NULL && outi != outi0) + XRRFreeOutputInfo(outi); + if (outi0 != NULL) + XRRFreeOutputInfo(outi0); XRRFreeScreenResources(scrnres); XCloseDisplay(mydisplay); return NULL; @@ -710,7 +827,10 @@ disppath **get_displays() { sizeof(disppath *) * (ndisps + 2))) == NULL) { debugrr("get_displays failed on malloc\n"); XRRFreeCrtcInfo(crtci); - XRRFreeOutputInfo(outi); + if (outi != NULL && outi != outi0) + XRRFreeOutputInfo(outi); + if (outi0 != NULL) + XRRFreeOutputInfo(outi0); XRRFreeScreenResources(scrnres); XCloseDisplay(mydisplay); return NULL; @@ -721,44 +841,49 @@ disppath **get_displays() { if ((disps[ndisps] = calloc(sizeof(disppath),1)) == NULL) { debugrr("get_displays failed on malloc\n"); XRRFreeCrtcInfo(crtci); - XRRFreeOutputInfo(outi); + if (outi != NULL && outi != outi0) + XRRFreeOutputInfo(outi); + if (outi0 != NULL) + XRRFreeOutputInfo(outi0); XRRFreeScreenResources(scrnres); XCloseDisplay(mydisplay); free_disppaths(disps); return NULL; } - disps[ndisps]->screen = i; - disps[ndisps]->uscreen = i; - disps[ndisps]->rscreen = i; + disps[ndisps]->screen = i; /* X11 (virtual) Screen */ + disps[ndisps]->uscreen = jj; /* Xinerama/Xrandr screen */ + disps[ndisps]->rscreen = jj; disps[ndisps]->sx = crtci->x; disps[ndisps]->sy = crtci->y; disps[ndisps]->sw = crtci->width; disps[ndisps]->sh = crtci->height; - disps[ndisps]->crtc = outi->crtc; /* XID of crtc */ - disps[ndisps]->output = scrnres->outputs[j]; /* XID of output */ + disps[ndisps]->crtc = scrnres->crtcs[xj]; /* XID of CRTC */ + disps[ndisps]->output = crtci->outputs[xk]; /* XID of output */ - sprintf(desc1,"Screen %d, Output %s",ndisps+1,outi->name); + sprintf(desc1,"Monitor %d, Output %s",ndisps+1,outi->name); sprintf(desc2,"%s at %d, %d, width %d, height %d",desc1, disps[ndisps]->sx, disps[ndisps]->sy, disps[ndisps]->sw, disps[ndisps]->sh); - /* See if it is a clone */ - for (k = 0; k < ndisps; k++) { - if (disps[k]->crtc == disps[ndisps]->crtc) { - sprintf(desc1, "[ Clone of %d ]",k+1); - strcat(desc2, desc1); - } + /* If it is a clone */ + if (k > 0 & outi0 != NULL) { + sprintf(desc1, "[ Clone of %s ]",outi0->name); + strcat(desc2, desc1); } + if ((disps[ndisps]->description = strdup(desc2)) == NULL) { debugrr("get_displays failed on malloc\n"); XRRFreeCrtcInfo(crtci); - XRRFreeOutputInfo(outi); + if (outi != NULL && outi != outi0) + XRRFreeOutputInfo(outi); + if (outi0 != NULL) + XRRFreeOutputInfo(outi0); XRRFreeScreenResources(scrnres); XCloseDisplay(mydisplay); free_disppaths(disps); return NULL; } - + /* Form the display name */ if ((pp = strrchr(dnbuf, ':')) != NULL) { if ((pp = strchr(pp, '.')) != NULL) { @@ -768,27 +893,29 @@ disppath **get_displays() { if ((disps[ndisps]->name = strdup(dnbuf)) == NULL) { debugrr("get_displays failed on malloc\n"); XRRFreeCrtcInfo(crtci); - XRRFreeOutputInfo(outi); + if (outi != NULL && outi != outi0) + XRRFreeOutputInfo(outi); + if (outi0 != NULL) + XRRFreeOutputInfo(outi0); XRRFreeScreenResources(scrnres); XCloseDisplay(mydisplay); free_disppaths(disps); return NULL; } debugrr2((errout, "Display %d name = '%s'\n",ndisps,disps[ndisps]->name)); - + /* Create the X11 root atom of the default screen */ - /* that may contain the associated ICC profile */ - /* (The _%d variant will probably break with non-Xrandr */ - /* aware software if Xrandr is configured to have more than */ - /* a single virtual screen.) */ + /* that may contain the associated ICC profile. */ if (jj == 0) strcpy(desc1, "_ICC_PROFILE"); else - sprintf(desc1, "_ICC_PROFILE_%d",jj); + sprintf(desc1, "_ICC_PROFILE_%d",disps[ndisps]->uscreen); if ((disps[ndisps]->icc_atom = XInternAtom(mydisplay, desc1, False)) == None) error("Unable to intern atom '%s'",desc1); + debugrr2((errout,"Root atom '%s'\n",desc1)); + /* Create the atom of the output that may contain the associated ICC profile */ if ((disps[ndisps]->icc_out_atom = XInternAtom(mydisplay, "_ICC_PROFILE", False)) == None) error("Unable to intern atom '%s'","_ICC_PROFILE"); @@ -810,19 +937,22 @@ disppath **get_displays() { for (ii = 0; keys[ii][0] != '\000'; ii++) { /* Get the atom for the EDID data */ if ((edid_atom = XInternAtom(mydisplay, keys[ii], True)) == None) { - debugrr2((errout, "Unable to intern atom '%s'\n",keys[ii])); + // debugrr2((errout, "Unable to intern atom '%s'\n",keys[ii])); /* Try the next key */ - } else { - /* Get the EDID_DATA */ - if (XRRGetOutputProperty(mydisplay, scrnres->outputs[j], edid_atom, + /* Get the EDID_DATA */ + } else { + if (XRRGetOutputProperty(mydisplay, crtci->outputs[xk], edid_atom, 0, 0x7ffffff, False, False, XA_INTEGER, &ret_type, &ret_format, &ret_len, &ret_togo, &atomv) == Success && (ret_len == 128 || ret_len == 256)) { if ((disps[ndisps]->edid = malloc(sizeof(unsigned char) * ret_len)) == NULL) { debugrr("get_displays failed on malloc\n"); XRRFreeCrtcInfo(crtci); - XRRFreeOutputInfo(outi); + if (outi != NULL && outi != outi0) + XRRFreeOutputInfo(outi); + if (outi0 != NULL) + XRRFreeOutputInfo(outi0); XRRFreeScreenResources(scrnres); XCloseDisplay(mydisplay); free_disppaths(disps); @@ -840,22 +970,30 @@ disppath **get_displays() { if (keys[ii][0] == '\000') debugrr2((errout, "Failed to get EDID for display\n")); } - - jj++; /* Next enabled index */ ndisps++; /* Now it's number of displays */ - XRRFreeCrtcInfo(crtci); + + next_output:; + if (outi != NULL && outi != outi0) + XRRFreeOutputInfo(outi); + if (has_primary && xj == pix && k == 0) + xk = -1; /* Go to first output */ } - XRRFreeOutputInfo(outi); + next_screen:; + if (outi0 != NULL) + XRRFreeOutputInfo(outi0); + XRRFreeCrtcInfo(crtci); + jj++; /* Next Xinerama screen index */ + if (has_primary && j == 0) + xj = -1; /* Go to first screen */ } XRRFreeScreenResources(scrnres); } + done_xrandr:; XSetErrorHandler(NULL); - defsix = DefaultScreen(mydisplay); } #endif /* randr >= V 1.2 */ if (disps == NULL) { /* Use Older style identification */ - debugrr("get_displays checking for Xinerama\n"); if (XSetErrorHandler(null_error_handler) == 0) { debugrr("get_displays failed on XSetErrorHandler\n"); @@ -863,7 +1001,8 @@ disppath **get_displays() { return NULL; } - if (XineramaQueryExtension(mydisplay, &evb, &erb) != 0 + if (getenv("ARGYLL_IGNORE_XINERAMA") == NULL + && XineramaQueryExtension(mydisplay, &evb, &erb) != 0 && XineramaIsActive(mydisplay)) { xai = XineramaQueryScreens(mydisplay, &dcount); @@ -873,10 +1012,10 @@ disppath **get_displays() { XCloseDisplay(mydisplay); return NULL; } - defsix = 0; + debugrr2((errout,"get_displays using %d Xinerama Screens\n",dcount)); } else { dcount = ScreenCount(mydisplay); - defsix = DefaultScreen(mydisplay); + debugrr2((errout,"get_displays using %d X11 Screens\n",dcount)); } /* Allocate our list */ @@ -903,7 +1042,10 @@ disppath **get_displays() { /* Form the display name */ if ((pp = strrchr(dnbuf, ':')) != NULL) { if ((pp = strchr(pp, '.')) != NULL) { - sprintf(pp,".%d",i); + if (xai != NULL) /* Xinerama */ + sprintf(pp,".%d",0); + else + sprintf(pp,".%d",i); } } if ((disps[i]->name = strdup(dnbuf)) == NULL) { @@ -915,14 +1057,15 @@ disppath **get_displays() { debugrr2((errout, "Display %d name = '%s'\n",i,disps[i]->name)); if (xai != NULL) { /* Xinerama */ - disps[i]->screen = 0; /* We are asuming Xinerame creates a single virtual screen */ - disps[i]->uscreen = i; /* We are assuming xinerama lists screens in the same order */ + /* xai[i].screen_number should be == i */ + disps[i]->screen = 0; /* Assume Xinerame creates a single virtual X11 screen */ + disps[i]->uscreen = i; /* Underlying Xinerma screen */ disps[i]->rscreen = i; disps[i]->sx = xai[i].x_org; disps[i]->sy = xai[i].y_org; disps[i]->sw = xai[i].width; disps[i]->sh = xai[i].height; - } else { + } else { /* Plain X11 Screens */ disps[i]->screen = i; disps[i]->uscreen = i; disps[i]->rscreen = i; @@ -992,9 +1135,9 @@ disppath **get_displays() { && monitor.model != NULL && monitor.model[0] != '\000') sprintf(desc1, "%s",monitor.model); else - sprintf(desc1,"Screen %d",i+1); + sprintf(desc1,"Monitor %d",i+1); } else - sprintf(desc1,"Screen %d",i+1); + sprintf(desc1,"Monitor %d",i+1); sprintf(desc2,"%s at %d, %d, width %d, height %d",desc1, disps[i]->sx, disps[i]->sy, disps[i]->sw, disps[i]->sh); @@ -1006,14 +1149,15 @@ disppath **get_displays() { } } XSetErrorHandler(NULL); - } - /* Put the screen given by the display name at the top */ - { - disppath *tdispp; - tdispp = disps[defsix]; - disps[defsix] = disps[0]; - disps[0] = tdispp; + /* Put the default Screen the top of the list */ + if (xai == NULL) { + int defsix = DefaultScreen(mydisplay); + disppath *tdispp; + tdispp = disps[defsix]; + disps[defsix] = disps[0]; + disps[0] = tdispp; + } } if (xai != NULL) @@ -1087,6 +1231,8 @@ disppath *get_a_display(int ix) { disppath **paths, *rv = NULL; int i; + debugrr2((errout, "get_a_display called with ix %d\n",ix)); + if ((paths = get_displays()) == NULL) return NULL; @@ -1095,8 +1241,9 @@ disppath *get_a_display(int ix) { free_disppaths(paths); return NULL; } - if (i == ix) + if (i == ix) { break; + } } if ((rv = malloc(sizeof(disppath))) == NULL) { debugrr("get_a_display failed malloc\n"); @@ -1129,6 +1276,8 @@ disppath *get_a_display(int ix) { memmove(rv->edid, paths[i]->edid, rv->edid_len ); } #endif + debugrr2((errout, " Selected ix %d '%s' %s'\n",i,rv->name,rv->description)); + free_disppaths(paths); return rv; } @@ -1147,7 +1296,9 @@ void free_a_disppath(disppath *path) { } } -/* ----------------------------------------------- */ +/* ===================================================================== */ +/* RAMDAC access code */ +/* ===================================================================== */ /* For VideoLUT/RAMDAC use, we assume that the frame buffer */ /* may map through some intermediate hardware or lookup */ @@ -1465,7 +1616,7 @@ static char *iprof_path(p_scope scope, char *fname) { dirname = COLORSYNC_DIR_LOCAL; else { dirname = COLORSYNC_DIR_USER; - if ((home = getenv("HOME")) == NULL){ + if ((home = login_HOME()) == NULL){ return NULL; } } @@ -2273,7 +2424,10 @@ void dispwin_del_ramdac(ramdac *r) { free(r); } -/* ----------------------------------------------- */ +/* ===================================================================== */ +/* Profile install code */ +/* ===================================================================== */ + /* Useful function for X11 profile atom settings */ #if defined(UNIX_X11) @@ -2283,7 +2437,10 @@ static int set_X11_atom(dispwin *p, char *fname) { unsigned long psize, bread; unsigned char *atomv; - debugr("Setting _ICC_PROFILE property\n"); + if (p->myuscreen == 0) + debugr("Setting _ICC_PROFILE property\n"); + else + debugr2((errout,"Setting _ICC_PROFILE_%d property\n",p->myuscreen)); /* Read in the ICC profile, then set the X11 atom value */ #if !defined(O_CREAT) && !defined(_O_CREAT) @@ -2323,11 +2480,13 @@ static int set_X11_atom(dispwin *p, char *fname) { fclose(fp); - XChangeProperty(p->mydisplay, RootWindow(p->mydisplay, 0), p->icc_atom, + if (p->icc_atom != None) { + XChangeProperty(p->mydisplay, RootWindow(p->mydisplay, 0), p->icc_atom, XA_CARDINAL, 8, PropModeReplace, atomv, psize); + } #if RANDR_MAJOR == 1 && RANDR_MINOR >= 2 && !defined(DISABLE_RANDR) - if (p->icc_out_atom != 0) { + if (p->icc_out_atom != None) { /* If Xrandr 1.2, set property on output */ /* This seems to fail on some servers. Ignore the error ? */ if (XSetErrorHandler(null_error_handler) == 0) { @@ -2351,7 +2510,8 @@ static int set_X11_atom(dispwin *p, char *fname) { } #endif /* UNXI X11 */ -/* ----------------------------------------------- */ +/* ---------------------------------------------- */ + /* See if colord is available */ #if defined(UNIX_X11) && defined(USE_UCMM) @@ -2373,7 +2533,8 @@ int dispwin_checkfor_colord() { cd_found = NULL; - if ((cd_found = dlopen("libcolordcompat.so", RTLD_LAZY)) != NULL) { + if (getenv("ARGYLL_USE_COLORD") != NULL + && (cd_found = dlopen("libcolordcompat.so", RTLD_LAZY)) != NULL) { cd_edid_install_profile = dlsym(cd_found, "cd_edid_install_profile"); cd_edid_remove_profile = dlsym(cd_found, "cd_edid_remove_profile"); @@ -2394,7 +2555,6 @@ int dispwin_checkfor_colord() { #endif - /* ----------------------------------------------- */ /* Install a display profile and make */ /* it the default for this display. */ @@ -2630,7 +2790,7 @@ int dispwin_install_profile(dispwin *p, char *fname, ramdac *r, p_scope scope) { return 0; } -#else /* 10.6 and prior */ +#else /* OS X 10.6 and prior */ // Switch to using iprof_path() to simplify ? { CMError ev; @@ -2766,8 +2926,9 @@ int dispwin_install_profile(dispwin *p, char *fname, ramdac *r, p_scope scope) { /* Un-Install a display profile */ /* Return nz if failed, */ -/* 1 if not sucessfully deleted */ +/* 1 if not successfully deleted */ /* 2 if profile not found */ +/* NT and OS X need fname, *NIX does not. */ int dispwin_uninstall_profile(dispwin *p, char *fname, p_scope scope) { debugr2((errout,"dispwin_uninstall_profile '%s'\n", fname)); #ifdef NT @@ -2883,7 +3044,7 @@ int dispwin_uninstall_profile(dispwin *p, char *fname, p_scope scope) { } debug2((errout,"Set euid %d and egid %d\n",uid,gid)); } - /* If setting local system proile and not effective root, but sudo */ + /* If setting local system profile and not effective root, but sudo */ } else if (scope != p_scope_user && getuid() == 0 && geteuid() != 0) { if (getenv("SUDO_UID") != NULL && getenv("SUDO_GID") != NULL) { @@ -3029,14 +3190,15 @@ int dispwin_uninstall_profile(dispwin *p, char *fname, p_scope scope) { if (cd_found) ev = cd_edid_remove_profile(p->edid, p->edid_len, fname); else - ev = ucmm_uninstall_monitor_profile(sc, p->edid, p->edid_len, p->name, fname); + ev = ucmm_uninstall_monitor_profile(sc, p->edid, p->edid_len, p->name); if (ev != ucmm_ok) { debugr2((errout,"Installing profile '%s' failed with error %d '%s'\n",fname,ev,ucmm_error_string(ev))); return 1; } - XDeleteProperty(p->mydisplay, RootWindow(p->mydisplay, 0), p->icc_atom); + if (p->icc_atom != None) + XDeleteProperty(p->mydisplay, RootWindow(p->mydisplay, 0), p->icc_atom); #if RANDR_MAJOR == 1 && RANDR_MINOR >= 2 && !defined(DISABLE_RANDR) /* If Xrandr 1.2, set property on output */ @@ -3254,6 +3416,7 @@ icmFile *dispwin_get_profile(dispwin *p, char *name, int mxlen) { debugr2((errout,"Setting X11 atom to profile '%s' failed",profile)); /* Hmm. We ignore this error */ } + free(profile); return rd_fp; } if (ev != ucmm_no_profile) { @@ -3291,9 +3454,14 @@ icmFile *dispwin_get_profile(dispwin *p, char *name, int mxlen) { #endif /* randr >= V 1.2 */ if (atomv == NULL) { + if (p->icc_atom == None) { + debugr("Second or subsequent Output doesn't have ICC_PROFILE property\n"); + return NULL; + } + if (p->myuscreen != 0) sprintf(aname, "_ICC_PROFILE_%d",p->myuscreen); - + /* Get the ICC profile property */ if (XGetWindowProperty(p->mydisplay, RootWindow(p->mydisplay, 0), p->icc_atom, 0, 0x7ffffff, False, XA_CARDINAL, @@ -3336,7 +3504,7 @@ icmFile *dispwin_get_profile(dispwin *p, char *name, int mxlen) { return NULL; } -/* ----------------------------------------------- */ +/* ===================================================================== */ /* Restore the display state and free ramdacs */ static void restore_display(dispwin *p) { @@ -3416,6 +3584,8 @@ static void dispwin_sighandler(int arg) { static amutex_static(lock); dispwin *pp, *np; + debugrr("dispwin_sighandler called\n"); + /* Make sure we don't re-enter */ if (amutex_trylock(lock)) { return; @@ -3483,7 +3653,10 @@ static void dispwin_uninstall_signal_handlers(dispwin *p) { p->next = NULL; } -/* ----------------------------------------------- */ +/* ===================================================================== */ +/* Test patch window code */ +/* ===================================================================== */ + /* Test patch window specific declarations */ #ifdef UNIX_APPLE @@ -3531,6 +3704,7 @@ unsigned char emptyCursor[43] = { * the mouse enters the window. This needs the main thread * to be dedicated to running the event loop, so would involve * some trickiness after main() in every program. + * - we have done this with numlib/ui.c, so this is possible. */ - (void)resetCursorRects { [super resetCursorRects]; @@ -3671,8 +3845,7 @@ static void create_my_win(void *cntx) { /* Moves the window to the front of the screen list within its level, */ /* and show the window (i.e. make it "key") */ - /* Trigger warning on OS X 10.11 El Capitan ? */ - /* (Doesn't happen using 1.6.3 which ran everything in the main thread.) */ + /* Trigger warning on OS X 10.11 El Capitan if not run in the main thread. */ [cx->window makeKeyAndOrderFront: nil]; /* Use a null color transform to ensure device values */ @@ -3720,17 +3893,23 @@ static void create_my_win(void *cntx) { #endif /* >= 10.6 */ #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 - /* >= 10.6+ device colors don't work on secondary display, need null transform. */ - /* < 10.6 null transform doesn't work. */ + /* >= 10.6+ device colors don't work on secondary displays and need a null transform. */ + /* < 10.6 null transform doesn't work, but isn't needed. */ - if (Gestalt(gestaltSystemVersionMajor, &MacMajVers) == noErr + if ( +#ifdef NEVER + Gestalt(gestaltSystemVersionMajor, &MacMajVers) == noErr && Gestalt(gestaltSystemVersionMinor, &MacMinVers) == noErr && Gestalt(gestaltSystemVersionBugFix, &MacBFVers) == noErr && MacMajVers >= 10 && MacMinVers >= 6 +#else + floor(kCFCoreFoundationVersionNumber) >= kCFCoreFoundationVersionNumber10_6 +#endif + && cx->nscs == NULL) { warning("Unable to create null color transform - test colors may be wrong!"); } -#endif +#endif /* >= 1040 */ cx->err = 0; } @@ -3750,7 +3929,7 @@ double r, double g, double b /* Color values 0.0 - 1.0 */ double kr, kf; int update_delay = 0; - debugr("dispwin_set_color called\n"); + debugrr2((errout, "dispwin_set_color called on disp '%s'\n",p->name)); if (p->nowin) { return 1; @@ -3941,8 +4120,15 @@ double r, double g, double b /* Color values 0.0 - 1.0 */ /* Stop the system going to sleep */ UpdateSystemActivity(OverallAct); +/* + replacement ? + IOPMAssertionID assertionID; + IOPMAssertionDeclareUserActivity(CFSTR(""), kIOPMUserActiveLocal, &assertionID); +*/ + /* Make sure our window is brought to the front at least once, */ /* but not every time, in case the user wants to kill the application. */ + /* is orderFrontRegardless a replacement ?? */ if (p->btf == 0){ OSStatus stat; ProcessSerialNumber cpsn; @@ -4748,6 +4934,11 @@ int ddebug /* >0 to print debug statements to stderr */ dispwin_del(p); return NULL; } + if ((p->description = strdup(disp->description)) == NULL) { + debugr2((errout,"new_dispwin: Malloc failed\n")); + dispwin_del(p); + return NULL; + } p->ddid = disp->ddid; /* Display we're working on */ #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 @@ -4816,7 +5007,7 @@ int ddebug /* >0 to print debug statements to stderr */ if (p->rdepth != p->ndepth) { if (!p->warned) { - warning("new_dispwin: Frame buffer depth %d doesn't matcv VideoLUT %d",p->rdepth, p->ndepth); + warning("new_dispwin: Frame buffer depth %d doesn't match VideoLUT %d",p->rdepth, p->ndepth); p->warned = 1; } } @@ -4975,20 +5166,25 @@ int ddebug /* >0 to print debug statements to stderr */ /* open the display */ p->mydisplay = XOpenDisplay(bname); - if(!p->mydisplay) { - debugr2((errout,"new_dispwin: Unable to open display '%s'\n",bname)); + if (!p->mydisplay) { + debugrr2((errout,"new_dispwin: Unable to open display '%s'\n",bname)); dispwin_del(p); free(bname); return NULL; } + debugrr2((errout,"new_dispwin: Opened display '%s' OK\n",bname)); free(bname); - debugr("new_dispwin: Opened display OK\n"); if ((p->name = strdup(disp->name)) == NULL) { debugr2((errout,"new_dispwin: Malloc failed\n")); dispwin_del(p); return NULL; } + if ((p->description = strdup(disp->description)) == NULL) { + debugr2((errout,"new_dispwin: Malloc failed\n")); + dispwin_del(p); + return NULL; + } p->myscreen = disp->screen; p->myuscreen = disp->uscreen; p->myrscreen = disp->rscreen; @@ -5181,7 +5377,7 @@ int ddebug /* >0 to print debug statements to stderr */ } } - debugr2((errout,"new_dispwin: %s fdepth %d, rdepth %d, ndepth %d, edepth %d, r/g/b shifts %d %d %d\n", vinfo->class != TrueColor ? "TreuColor" : "DirectColor", p->fdepth,p->rdepth,p->ndepth,p->edepth, p->shift[0], p->shift[1], p->shift[2])); + debugrr2((errout,"new_dispwin: %s fdepth %d, rdepth %d, ndepth %d, edepth %d, r/g/b shifts %d %d %d\n", vinfo->class != TrueColor ? "TreuColor" : "DirectColor", p->fdepth,p->rdepth,p->ndepth,p->edepth, p->shift[0], p->shift[1], p->shift[2])); if (nowin == 0) { /* Create a window */ unsigned long attrmask = 0; @@ -5228,6 +5424,8 @@ int ddebug /* >0 to print debug statements to stderr */ p->ww = wi; p->wh = he; + debugrr2((errout,"new_dispwin: at %d, %d size %d, %d\n",p->tx,p->ty,p->ww,p->wh)); + /* Setup Size Hints */ mysizehints.flags = PPosition | USSize; mysizehints.x = xo; @@ -5630,7 +5828,7 @@ int ddebug /* >0 to print debug statements to stderr */ p->native = native &= ~2; } - debugr("new_dispwin: return sucessfully\n"); + debugr("new_dispwin: return successfully\n"); return p; } @@ -5887,7 +6085,8 @@ static int gcc_bug_fix(int i) { #include "numlib.h" /* Flag = 0x0000 = default */ -/* Flag & 0x0001 = list ChromCast's */ +/* Flag & 0x0001 = list ChromeCast's */ +/* Flag & 0x0002 = list VTPG's's */ static void usage(int flag, char *diag, ...) { disppath **dp; fprintf(stderr,"Test display patch window, Set Video LUTs, Install profiles, Version %s\n",ARGYLL_VERSION_STR); @@ -5923,13 +6122,13 @@ static void usage(int flag, char *diag, ...) { free_disppaths(dp); fprintf(stderr," -dweb[:port] Display via web server at port (default 8080)\n"); fprintf(stderr," -dcc[:n] Display via n'th ChromeCast (default 1, ? for list)\n"); - if (flag & 0x001) { + if (flag & 0x0001) { ccast_id **ids; if ((ids = get_ccids()) == NULL) { - fprintf(stderr," ** Error discovering ChromCasts **\n"); + fprintf(stderr," ** Error discovering ChromeCasts **\n"); } else { if (ids[0] == NULL) - fprintf(stderr," ** No ChromCasts found **\n"); + fprintf(stderr," ** No ChromeCasts found **\n"); else { int i; for (i = 0; ids[i] != NULL; i++) @@ -5942,8 +6141,28 @@ static void usage(int flag, char *diag, ...) { fprintf(stderr," -dmadvr Display via MadVR Video Renderer\n"); #endif +#ifdef ENABLE_VTPGLUT + fprintf(stderr," -dvtpg[:n] Display via n'th Video Test Patch Generator (default 1, ? for list)\n"); + if (flag & 0x0002) { + icompaths *icmps; + if ((icmps = new_icompaths_sel(g_log, icomt_vtpg | icomt_portattr_all)) != NULL) { + icompath **paths; + if ((paths = icmps->dpaths[dtix_vtpg]) != NULL) { + int i; + for (i = 0; ; i++) { + if (paths[i] == NULL) + break; + fprintf(stderr," %d = '%s'\n",i+1,paths[i]->name); + } + } else + fprintf(stderr," ** No VTPG's found **\n"); + } + } +#endif + fprintf(stderr," -P ho,vo,ss[,vs] Position test window and scale it\n"); fprintf(stderr," -F Fill whole screen with black background\n"); + fprintf(stderr," -E Video encode output as (16-235)/255 \"TV\" levels\n"); fprintf(stderr," -i Run forever with random values\n"); fprintf(stderr," -G filename Display RGB colors from CGATS (ie .ti1) file\n"); fprintf(stderr," -C r.rr,g.gg,b.bb Add this RGB color to list to be displayed\n"); @@ -5954,7 +6173,7 @@ static void usage(int flag, char *diag, ...) { fprintf(stderr," -s filename Save the currently loaded Video LUT to 'filename'\n"); fprintf(stderr," -c Load a linear display calibration\n"); fprintf(stderr," -V Verify that calfile/profile cal. is currently loaded in LUT\n"); - fprintf(stderr," -I Install profile for display and use it's calibration\n"); + fprintf(stderr," -I Install profile for display and use its calibration\n"); fprintf(stderr," -U Un-install profile for display\n"); fprintf(stderr," -S d Specify the install/uninstall scope for OS X [nlu] or X11/Vista [lu]\n"); fprintf(stderr," d is one of: n = network, l = local system, u = user (default)\n"); @@ -5981,6 +6200,9 @@ main(int argc, char *argv[]) { #ifdef NT int madvrdisp = 0; /* NZ for MadVR display */ #endif +#ifdef ENABLE_VTPGLUT + int vtpgdisp = 0; /* NZ for Video Test Pattern Generator, == list index */ +#endif disppath *disp = NULL; /* Display being used */ double hpatscale = 1.0, vpatscale = 1.0; /* scale factor for test patch size */ double ho = 0.0, vo = 0.0; /* Test window offsets, -1.0 to 1.0 */ @@ -6073,7 +6295,7 @@ main(int argc, char *argv[]) { ccdisp = atoi(na+3); if (ccdisp <= 0) - usage(0,"ChromCast number must be in range 1..N"); + usage(0,"ChromeCast number must be in range 1..N"); } fa = nfa; #ifdef NT @@ -6082,6 +6304,20 @@ main(int argc, char *argv[]) { madvrdisp = 1; fa = nfa; #endif +#ifdef ENABLE_VTPGLUT + } else if (strncmp(na,"vtpg",4) == 0 + || strncmp(na,"VTPG",4) == 0) { + vtpgdisp = 1; + if (na[4] == ':') { + if (na[3] < '0' || na[3] > '9') + usage(0x0002,"Available VTPG's"); + + vtpgdisp = atoi(na+3); + if (vtpgdisp <= 0) + usage(0,"VTPG number must be in range 1..N"); + } + fa = nfa; +#endif /* ENABLE_VTPGLUT */ } else { #if defined(UNIX_X11) int ix, iv; @@ -6259,8 +6495,13 @@ main(int argc, char *argv[]) { #endif /* Bomb on bad combinations (not all are being detected) */ - if (installprofile && calname[0] == '\000') - error("Can't install or uninstall a displays profile without profile argument"); + if (installprofile == 1 && calname[0] == '\000') + error("Can't install a displays profile without profile argument"); + +#if !defined(UNIX) + if (installprofile == 2 && calname[0] == '\000') + error("Can't uninstall a displays profile without profile argument"); +#endif if (verify && calname[0] == '\000' && loadprofile == 0) error("No calibration/profile provided to verify against"); @@ -6285,17 +6526,17 @@ main(int argc, char *argv[]) { } else if (ccdisp != 0) { ccast_id **ids; if ((ids = get_ccids()) == NULL) { - printf("Error - discovering ChromCasts failed\n"); + printf("Error - discovering ChromeCasts failed\n"); return -1; } if (ids[0] == NULL) { - printf("Error - there are no ChromCasts to use\n"); + printf("Error - there are no ChromeCasts to use\n"); return -1; } for (i = 0; ids[i] != NULL; i++) ; if (ccdisp < 1 || ccdisp > i) { - printf("Error - chosen ChromCasts (%d) is outside list (1..%d)\n",ccdisp,i); + printf("Error - chosen ChromeCasts (%d) is outside list (1..%d)\n",ccdisp,i); return -1; } @@ -6427,10 +6668,10 @@ main(int argc, char *argv[]) { if (rv == 2) warning("Profile '%s' not found to uninstall!",calname); else - error("Error trying to uninstall profile '%s'!",calname); + error("Error trying to uninstall profile for display '%s'!",dw->description); } if (verb) { - printf("Un-Installed '%s'\n",calname); + printf("Un-Installed profile for display '%s'\n",dw->description); } } @@ -6582,25 +6823,28 @@ main(int argc, char *argv[]) { dw->r->v[j][i] = val + w * (cal[j][ix+1] - val); } } - /* If the calibration was created with a restricted range video encoding, */ - /* ensure that the installed calibration applies this encoding. */ - if (out_tvenc) { - for (i = 0; i < dw->r->nent; i++) { - for (j = 0; j < 3; j++) { - dw->r->v[j][i] = (dw->r->v[j][i] * (235.0-16.0) + 16.0)/255.0; - - /* For video encoding the extra bits of precision are created by bit */ - /* shifting rather than scaling, so we need to scale the fp value to */ - /* account for this. */ - if (dw->edepth > 8) - dw->r->v[j][i] = (dw->r->v[j][i] * 255 * (1 << (dw->edepth - 8))) - /((1 << dw->edepth) - 1.0); - } + debug("Got cal file calibration\n"); + } + + /* If the calibration was created with a restricted range video encoding, */ + /* ensure that the installed calibration applies this encoding. */ + if (out_tvenc) { + if (verb) + printf("Using output TV encoding range of (16-235)/255\n"); + for (i = 0; i < dw->r->nent; i++) { + for (j = 0; j < 3; j++) { + dw->r->v[j][i] = (dw->r->v[j][i] * (235.0-16.0) + 16.0)/255.0; + + /* For video encoding the extra bits of precision are created by bit */ + /* shifting rather than scaling, so we need to scale the fp value to */ + /* account for this. */ + if (dw->edepth > 8) + dw->r->v[j][i] = (dw->r->v[j][i] * 255 * (1 << (dw->edepth - 8))) + /((1 << dw->edepth) - 1.0); } } - - debug("Got cal file calibration\n"); } + if (ccg != NULL) ccg->del(ccg); if (icco != NULL) diff --git a/spectro/dispwin.h b/spectro/dispwin.h index 47fd256..8130d5f 100644..100755 --- a/spectro/dispwin.h +++ b/spectro/dispwin.h @@ -118,10 +118,10 @@ typedef struct { CGDirectDisplayID ddid; #endif /* UNIX_APPLE */ #if defined(UNIX_X11) - int screen; /* Screen to select */ - int uscreen; /* Underlying screen */ - int rscreen; /* Underlying RAMDAC screen */ - Atom icc_atom; /* ICC profile root atom for this display */ + int screen; /* X11 (possibly virtual) Screen */ + int uscreen; /* Underlying Xinerma/XRandr screen */ + int rscreen; /* Underlying RAMDAC screen (user override) */ + Atom icc_atom; /* ICC profile root/output atom for this display */ unsigned char *edid; /* 128 or 256 bytes of monitor EDID, NULL if none */ int edid_len; /* 128 or 256 */ @@ -272,9 +272,9 @@ struct _dispwin { #if defined(UNIX_X11) Display *mydisplay; - int myscreen; /* Usual or virtual screen with Xinerama */ - int myuscreen; /* Underlying screen */ - int myrscreen; /* Underlying RAMDAC screen */ + int myscreen; /* Overall X11 (possibly virtual) Screen */ + int myuscreen; /* Underlying Xinerma/Xrandr screen */ + int myrscreen; /* Underlying RAMDAC screen (user override) */ Atom icc_atom; /* ICC profile root atom for this display */ unsigned char *edid; /* 128 or 256 bytes of monitor EDID, NULL if none */ int edid_len; /* 128 or 256 */ diff --git a/spectro/dtp20.c b/spectro/dtp20.c index a125a53..c33dc3d 100644..100755 --- a/spectro/dtp20.c +++ b/spectro/dtp20.c @@ -67,6 +67,7 @@ #include "sa_config.h" #endif /* SALONEINSTLIB */ #include "numsup.h" +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -1737,7 +1738,7 @@ inst_opt_type m, /* Requested status type */ } /* Constructor */ -extern dtp20 *new_dtp20(icoms *icom, instType itype) { +extern dtp20 *new_dtp20(icoms *icom, instType dtype) { dtp20 *p; if ((p = (dtp20 *)calloc(sizeof(dtp20),1)) == NULL) { a1loge(icom->log, 1, "new_dtp20: malloc failed!\n"); @@ -1761,7 +1762,7 @@ extern dtp20 *new_dtp20(icoms *icom, instType itype) { p->del = dtp20_del; p->icom = icom; - p->itype = itype; + p->dtype = dtype; p->cap = inst_mode_none; /* Unknown until set */ p->mode = inst_mode_none; /* Not in a known mode yet */ diff --git a/spectro/dtp20.h b/spectro/dtp20.h index a8b6862..a8b6862 100644..100755 --- a/spectro/dtp20.h +++ b/spectro/dtp20.h diff --git a/spectro/dtp22.c b/spectro/dtp22.c index 37249f0..34a8506 100644..100755 --- a/spectro/dtp22.c +++ b/spectro/dtp22.c @@ -51,6 +51,7 @@ #include "sa_config.h" #include "numsup.h" #endif /* !SALONEINSTLIB */ +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -97,9 +98,7 @@ extract_ec(char *s) { if (*p == '>') break; } - if ( (p-3) < s - || p[0] != '>' - || p[-3] != '<') + if ((p-3) < s || p[0] != '>' || p[-3] != '<') return -1; tt[0] = p[-2]; tt[1] = p[-1]; @@ -517,8 +516,8 @@ instClamping clamp) { /* NZ if clamp XYZ/Lab to be +ve */ } } } else { /* Inst error or switch activated */ - if (strlen(buf) >= 4 - && buf[0] == '<' && isdigit(buf[1]) && isdigit(buf[2]) && buf[3] == '>') { + if ((strlen(buf) >= 4 + && buf[0] == '<' && isdigit(buf[1]) && isdigit(buf[2]) && buf[3] == '>')) { if ((ev = dtp22_interp_code((inst *)p, extract_ec(buf))) != inst_ok) { dtp22_command(p, "CE\r", buf, MAX_MES_SIZE, 0.5); dtp22_command(p, "2PB\r", buf, MAX_MES_SIZE, 0.5); @@ -747,8 +746,8 @@ char id[CALIDLEN] /* Condition identifier (ie. white reference ID) */ } } } else { /* Inst error or switch activated */ - if (strlen(buf) >= 4 - && buf[0] == '<' && isdigit(buf[1]) && isdigit(buf[2]) && buf[3] == '>') { + if ((strlen(buf) >= 4 + && buf[0] == '<' && isdigit(buf[1]) && isdigit(buf[2]) && buf[3] == '>')) { if ((ev = dtp22_interp_code((inst *)p, extract_ec(buf))) != inst_ok) { dtp22_command(p, "CE\r", buf, MAX_MES_SIZE, 0.5); if (ev != inst_ok) @@ -1145,7 +1144,7 @@ extern dtp22 *new_dtp22(icoms *icom, instType itype) { p->del = dtp22_del; p->icom = icom; - p->itype = itype; + p->dtype = itype; p->mode = inst_mode_none; p->need_cal = 1; /* Do a white calibration each time we open the device */ diff --git a/spectro/dtp22.h b/spectro/dtp22.h index af565e8..af565e8 100644..100755 --- a/spectro/dtp22.h +++ b/spectro/dtp22.h diff --git a/spectro/dtp41.c b/spectro/dtp41.c index 97a3db1..e536cfc 100644..100755 --- a/spectro/dtp41.c +++ b/spectro/dtp41.c @@ -48,6 +48,7 @@ #include "sa_config.h" #include "numsup.h" #endif /* !SALONEINSTLIB */ +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -1331,7 +1332,7 @@ dtp41_get_set_opt(inst *pp, inst_opt_type m, ...) } /* Constructor */ -extern dtp41 *new_dtp41(icoms *icom, instType itype) { +extern dtp41 *new_dtp41(icoms *icom, instType dtype) { dtp41 *p; if ((p = (dtp41 *)calloc(sizeof(dtp41),1)) == NULL) { a1loge(icom->log, 1, "new_dtp41: malloc failed!\n"); @@ -1354,7 +1355,7 @@ extern dtp41 *new_dtp41(icoms *icom, instType itype) { p->del = dtp41_del; p->icom = icom; - p->itype = itype; + p->dtype = dtype; p->cap = inst_mode_none; /* Unknown until set */ p->mode = inst_mode_none; /* Not in a known mode yet */ p->nstaticr = 5; /* Number of static readings */ diff --git a/spectro/dtp41.h b/spectro/dtp41.h index 018ed5c..018ed5c 100644..100755 --- a/spectro/dtp41.h +++ b/spectro/dtp41.h diff --git a/spectro/dtp51.c b/spectro/dtp51.c index 0b2ecab..70932e5 100644..100755 --- a/spectro/dtp51.c +++ b/spectro/dtp51.c @@ -51,6 +51,7 @@ #include "sa_config.h" #include "numsup.h" #endif /* !SALONEINSTLIB */ +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -896,7 +897,7 @@ dtp51_get_set_opt(inst *pp, inst_opt_type m, ...) { } /* Constructor */ -extern dtp51 *new_dtp51(icoms *icom, instType itype) { +extern dtp51 *new_dtp51(icoms *icom, instType dtype) { dtp51 *p; if ((p = (dtp51 *)calloc(sizeof(dtp51),1)) == NULL) { a1loge(icom->log, 1, "new_dtp51: malloc failed!\n"); @@ -918,7 +919,7 @@ extern dtp51 *new_dtp51(icoms *icom, instType itype) { p->del = dtp51_del; p->icom = icom; - p->itype = itype; + p->dtype = dtype; p->native_calstd = xcalstd_xrdi; /* Not alterable */ diff --git a/spectro/dtp51.h b/spectro/dtp51.h index 804b8ae..804b8ae 100644..100755 --- a/spectro/dtp51.h +++ b/spectro/dtp51.h diff --git a/spectro/dtp92.c b/spectro/dtp92.c index 33b8fa0..fbcbd7e 100644..100755 --- a/spectro/dtp92.c +++ b/spectro/dtp92.c @@ -51,6 +51,7 @@ #include "sa_config.h" #include "numsup.h" #endif /* !SALONEINSTLIB */ +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -179,7 +180,7 @@ dtp92_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { char *brc[5] = { "30BR\r", "60BR\r", "18BR\r", "0CBR\r", "06BR\r" }; char *fcc; unsigned int etime; - instType itype = pp->itype; + instType dtype = pp->dtype; int ci, bi, i, se; inst_code ev = inst_ok; @@ -202,7 +203,7 @@ dtp92_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { /* */ /* Set config, interface, write end point, read end point, read quanta */ - if (itype == instDTP94) { + if (dtype == instDTP94) { wr_ep = 0x02; rd_ep = 0x81; } else { @@ -407,17 +408,17 @@ dtp92_init_inst(inst *pp) { return inst_unknown_model; if (strncmp(buf,"X-Rite DTP94",12) == 0) - p->itype = instDTP94; + p->dtype = instDTP94; else - p->itype = instDTP92; + p->dtype = instDTP92; - if (p->itype == instDTP92) { + if (p->dtype == instDTP92) { /* Turn echoing of characters off */ if ((ev = dtp92_command(p, "DEC\r", buf, MAX_MES_SIZE, DEF_TIMEOUT)) != inst_ok) return ev; } - if (p->itype == instDTP92) { + if (p->dtype == instDTP92) { /* Set decimal point on */ if ((ev = dtp92_command(p, "0106CF\r", buf, MAX_MES_SIZE, DEF_TIMEOUT)) != inst_ok) return ev; @@ -435,7 +436,7 @@ dtp92_init_inst(inst *pp) { if ((ev = dtp92_command(p, "010ACF\r", buf, MAX_MES_SIZE, DEF_TIMEOUT)) != inst_ok) return ev; - if (p->itype == instDTP92) { + if (p->dtype == instDTP92) { /* Set absolute (luminance) calibration */ if ((ev = dtp92_command(p, "0118CF\r", buf, MAX_MES_SIZE, DEF_TIMEOUT)) != inst_ok) return ev; @@ -449,13 +450,13 @@ dtp92_init_inst(inst *pp) { if ((ev = dtp92_command(p, "EFC\r", buf, MAX_MES_SIZE, DEF_TIMEOUT)) != inst_ok) return ev; - if (p->itype == instDTP94) { + if (p->dtype == instDTP94) { /* Compensate for offset drift */ if ((ev = dtp92_command(p, "0117CF\r", buf, MAX_MES_SIZE, DEF_TIMEOUT)) != inst_ok) return ev; } - if (p->itype == instDTP92) { + if (p->dtype == instDTP92) { /* Enable ABS mode (in case firmware doesn't default to this after EFC) */ if ((ev = dtp92_command(p, "0118CF\r", buf, MAX_MES_SIZE, DEF_TIMEOUT)) != inst_ok) return ev; @@ -505,7 +506,7 @@ dtp92_init_inst(inst *pp) { /* ??? Need to set CTYP appropriately ??? */ #ifdef NEVER /* Debug code */ - if (p->itype == instDTP94) { + if (p->dtype == instDTP94) { int i, val; char tb[50]; @@ -571,7 +572,7 @@ instClamping clamp) { /* NZ if clamp XYZ/Lab to be +ve */ /* Could change SS to suite level expected. */ #ifdef NEVER - if (p->itype == instDTP92) { + if (p->dtype == instDTP92) { /* Set sample size to 31 (default is 16) for low level readings */ if ((rv = dtp92_command(p, "1fSS\r", buf, MAX_MES_SIZE, DEF_TIMEOUT)) != inst_ok) return rv; @@ -652,7 +653,7 @@ instClamping clamp) { /* NZ if clamp XYZ/Lab to be +ve */ } #ifdef NEVER - if (p->itype == instDTP92) { + if (p->dtype == instDTP92) { /* Set sample size back to 16 */ if ((rv = dtp92_command(p, "10SS\r", buf, MAX_MES_SIZE, DEF_TIMEOUT)) != inst_ok) return rv; @@ -759,7 +760,7 @@ static inst_code dtp92_get_n_a_cals(inst *pp, inst_cal_type *pn_cals, inst_cal_t inst_cal_type n_cals = inst_calt_none; inst_cal_type a_cals = inst_calt_none; - if (p->itype == instDTP92) { + if (p->dtype == instDTP92) { if (p->need_ratio_cal) n_cals |= inst_calt_emis_ratio; a_cals |= inst_calt_emis_ratio; @@ -1058,7 +1059,7 @@ inst3_capability *pcap3) { | inst2_ccmx ; /* The '92 does have a switch, but we're not currently supporting it */ - if (p->itype == instDTP94) { + if (p->dtype == instDTP94) { cap2 |= inst2_disptype; } else { cap2 |= inst2_get_refresh_rate; @@ -1167,7 +1168,7 @@ static inst_disptypesel dtp94_disptypesel[4] = { }; static void set_base_disptype_list(dtp92 *p) { - if (p->itype == instDTP94) { + if (p->dtype == instDTP94) { p->_dtlist = dtp94_disptypesel; } else { p->_dtlist = dtp92_disptypesel; @@ -1218,7 +1219,7 @@ static inst_code set_disp_type(dtp92 *p, inst_disptypesel *dentry) { p->cbid = dentry->cbid; p->ucbid = dentry->cbid; /* is underying base if dentry is base selection */ - if (p->itype == instDTP92) { + if (p->dtype == instDTP92) { if (p->icx != 0) return inst_unsupported; @@ -1395,7 +1396,7 @@ dtp92_get_set_opt(inst *pp, inst_opt_type m, ...) { } /* Constructor */ -extern dtp92 *new_dtp92(icoms *icom, instType itype) { +extern dtp92 *new_dtp92(icoms *icom, instType dtype) { dtp92 *p; if ((p = (dtp92 *)calloc(sizeof(dtp92),1)) == NULL) { a1loge(icom->log, 1, "new_dtp92: malloc failed!\n"); @@ -1423,7 +1424,7 @@ extern dtp92 *new_dtp92(icoms *icom, instType itype) { p->del = dtp92_del; p->icom = icom; - p->itype = itype; + p->dtype = dtype; icmSetUnity3x3(p->ccmat); /* Set the colorimeter correction matrix to do nothing */ set_base_disptype_list(p); diff --git a/spectro/dtp92.h b/spectro/dtp92.h index 8a6885e..8a6885e 100644..100755 --- a/spectro/dtp92.h +++ b/spectro/dtp92.h diff --git a/spectro/ex1.c b/spectro/ex1.c index 5f4eae2..929af3d 100644..100755 --- a/spectro/ex1.c +++ b/spectro/ex1.c @@ -54,6 +54,7 @@ #include "sa_config.h" #include "numsup.h" #endif /* !SALONEINSTLIB */ +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -158,7 +159,7 @@ static int ex1_touch_calibration(ex1 *p); static inst_code ex1_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { ex1 *p = (ex1 *) pp; - instType itype = pp->itype; + instType dtype = pp->dtype; int se; inst_code ev = inst_ok; @@ -1210,7 +1211,7 @@ ex1_get_set_opt(inst *pp, inst_opt_type m, ...) { } /* Constructor */ -extern ex1 *new_ex1(icoms *icom, instType itype) { +extern ex1 *new_ex1(icoms *icom, instType dtype) { ex1 *p; if ((p = (ex1 *)calloc(sizeof(ex1),1)) == NULL) { a1loge(icom->log, 1, "new_ex1: malloc failed!\n"); @@ -1241,7 +1242,7 @@ extern ex1 *new_ex1(icoms *icom, instType itype) { p->del = ex1_del; p->icom = icom; - p->itype = itype; + p->dtype = dtype; p->want_dcalib = 1; /* Always do an initial dark calibration */ diff --git a/spectro/ex1.h b/spectro/ex1.h index a278777..a278777 100644..100755 --- a/spectro/ex1.h +++ b/spectro/ex1.h diff --git a/spectro/fakeread.c b/spectro/fakeread.c index 3cad93a..3cad93a 100644..100755 --- a/spectro/fakeread.c +++ b/spectro/fakeread.c diff --git a/spectro/hcfr.c b/spectro/hcfr.c index 22b5170..568c69f 100644..100755 --- a/spectro/hcfr.c +++ b/spectro/hcfr.c @@ -53,6 +53,7 @@ #include "sa_config.h" #include "numsup.h" #endif /* SALONEINSTLIB */ +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -125,7 +126,7 @@ hcfr_flush( int rv; for (rv = ICOM_OK;;) { - rv = c->read(c, buf, MAX_MES_SIZE, NULL, '\000', 100000, 0.05); + rv = c->read(c, buf, MAX_MES_SIZE, NULL, NULL, 100000, 0.05); if (rv != ICOM_OK) break; /* Expect timeout with nothing to read */ } @@ -933,7 +934,7 @@ hcfr_get_set_opt(inst *pp, inst_opt_type m, ...) { } /* Constructor */ -extern hcfr *new_hcfr(icoms *icom, instType itype) { +extern hcfr *new_hcfr(icoms *icom, instType dtype) { hcfr *p; if ((p = (hcfr *)calloc(sizeof(hcfr),1)) == NULL) { a1loge(icom->log, 1, "new_hcfr: malloc failed!\n"); @@ -957,7 +958,7 @@ extern hcfr *new_hcfr(icoms *icom, instType itype) { p->del = hcfr_del; p->icom = icom; - p->itype = itype; + p->dtype = dtype; icmSetUnity3x3(p->ccmat); /* Set the colorimeter correction matrix to do nothing */ p->dtech = disptech_unknown; diff --git a/spectro/hcfr.h b/spectro/hcfr.h index 2420fdf..2420fdf 100644..100755 --- a/spectro/hcfr.h +++ b/spectro/hcfr.h diff --git a/spectro/hidio.c b/spectro/hidio.c index 2d8649f..e78fb98 100644..100755 --- a/spectro/hidio.c +++ b/spectro/hidio.c @@ -73,6 +73,7 @@ #include "sa_config.h" #endif #include "numsup.h" +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -419,6 +420,8 @@ int hid_get_paths(icompaths *p) { /* Add the path to the list */ p->add_hid(p, pname, vid, pid, 0, hidd, itype); + } else { + a1logd(p->log, 4, "skipping HID device VID 0x%x PID 0x%x lid 0x%x that we don't want\n",vid, pid, lid); } if (ioob != 0) /* If we haven't kept it */ IOObjectRelease(ioob); /* Release found object */ diff --git a/spectro/hidio.h b/spectro/hidio.h index 87edd43..87edd43 100644..100755 --- a/spectro/hidio.h +++ b/spectro/hidio.h diff --git a/spectro/huey.c b/spectro/huey.c index 2c82b4c..7739f96 100644..100755 --- a/spectro/huey.c +++ b/spectro/huey.c @@ -49,6 +49,7 @@ #include "sa_config.h" #include "numsup.h" #endif /* SALONEINSTLIB */ +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -885,25 +886,38 @@ huey_check_unlock( if ((ev = huey_command(p, i1d_status, buf, buf, 1.0,1.0)) != inst_ok) return ev; - /* Hmm. Some Lenovo Huey's say they are unlocked, even when they are not. */ + /* Hmm. Some Lenovo Huey's (the HueyColors ?) aren't locked, */ + /* so the unlock command fails. */ if (p->lenovo || strncmp((char *)buf, "Locked", 6) == 0) { memset(buf, 0, 7); + + /* Set unlock codes */ if (p->lenovo) strcpy((char *)buf,"huyL"); else strcpy((char *)buf,"GrMb"); - if ((ev = huey_command(p, i1d_unlock, buf, buf, 1.0,1.0)) != inst_ok) - return ev; + if ((ev = huey_command(p, i1d_unlock, buf, buf, 1.0,1.0)) != inst_ok) { + a1logd(p->log,2,"huey_check_unlock: warning, unlock command returned error\n"); + /* Perhaps the error code is for wrong unlock code, so ignore this */ + /* and try a status command */ + } memset(buf, 0, 7); if ((ev = huey_command(p, i1d_status, buf, buf, 1.0,1.0)) != inst_ok) return ev; } + /* + Apparently the "ECCM3" is a "hueyCOLOR", which is actually + a monochrome sensor! It uses different instructions to the Huey, + and wouldn't be terribly useful to ArgyllCMS. + See <https://github.com/hughsie/colord/tree/master/src/sensors/huey2> + */ + if (strncmp((char *)buf, "huL002", 6) != 0 /* Lenovo Huey ? */ - && strncmp((char *)buf, "ECCM2 ", 6) != 0 /* Lenovo Thinkpad W530 Huey ? */ - && strncmp((char *)buf, "ECCM3 ", 6) != 0 /* Lenovo Thinkpad W530 Huey ? */ + && strncmp((char *)buf, "ECCM2 ", 6) != 0 /* Lenovo Thinkpad W530 HueyPro ? */ +// && strncmp((char *)buf, "ECCM3 ", 6) != 0 /* Lenovo Thinkpad P70 HueyColor ? */ && strncmp((char *)buf, "Cir001", 6) != 0) { /* Huey */ a1logd(p->log,1,"huey_check_unlock: unknown model '%s'\n",buf); return huey_interp_code((inst *)p, HUEY_UNKNOWN_MODEL); @@ -1732,7 +1746,7 @@ huey_get_set_opt(inst *pp, inst_opt_type m, ...) { } /* Constructor */ -extern huey *new_huey(icoms *icom, instType itype) { +extern huey *new_huey(icoms *icom, instType dtype) { huey *p; if ((p = (huey *)calloc(sizeof(huey),1)) == NULL) { a1loge(icom->log, 1, "new_huey: malloc failed!\n"); @@ -1756,7 +1770,7 @@ extern huey *new_huey(icoms *icom, instType itype) { p->del = huey_del; p->icom = icom; - p->itype = itype; + p->dtype = dtype; icmSetUnity3x3(p->ccmat); /* Set the colorimeter correction matrix to do nothing */ p->dtech = disptech_unknown; diff --git a/spectro/huey.h b/spectro/huey.h index f13056b..f13056b 100644..100755 --- a/spectro/huey.h +++ b/spectro/huey.h diff --git a/spectro/i1d3.c b/spectro/i1d3.c index 4562a52..7e5c396 100644..100755 --- a/spectro/i1d3.c +++ b/spectro/i1d3.c @@ -53,6 +53,7 @@ #include "sa_config.h" #include "numsup.h" #endif /* SALONEINSTLIB */ +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -125,8 +126,8 @@ typedef enum { i1d3_firmver = 0x0012, /* Firmware version string */ i1d3_firmdate = 0x0013, /* Firmware date string */ i1d3_locked = 0x0020, /* Get locked status */ - i1d3_measure1 = 0x0100, /* Used by all measure */ - i1d3_measure2 = 0x0200, /* Used by all measure except ambient */ + i1d3_freqmeas = 0x0100, /* Measure transition over given time */ + i1d3_periodmeas = 0x0200, /* Measure time between transition count */ i1d3_readintee = 0x0800, /* Read internal EEPROM */ i1d3_readextee = 0x1200, /* Read external EEPROM */ i1d3_setled = 0x2100, /* Set the LED state */ @@ -155,10 +156,10 @@ static char *inst_desc(i1Disp3CC cc) { return "GetFirmwareDate"; case i1d3_locked: return "GetLockedStatus"; - case i1d3_measure1: - return "Measure1"; - case i1d3_measure2: - return "Measure2"; + case i1d3_freqmeas: + return "Frequency Measure"; + case i1d3_periodmeas: + return "Period Measure"; case i1d3_readintee: return "ReadInternalEEPROM"; case i1d3_readextee: @@ -278,9 +279,9 @@ i1d3_command( } /* Hmm. Not sure about this bug workaround. Is this a rev B thing ? */ - /* May get status 0x83 on i1d3_measure2 when there are no transitions ? */ + /* May get status 0x83 on i1d3_periodmeas when there are no transitions ? */ /* If so, ignore the error. */ - if (rv == inst_ok && cc == i1d3_measure2 && recv[1] == 0x02 && recv[0] == 0x83) { + if (rv == inst_ok && cc == i1d3_periodmeas && recv[1] == 0x02 && recv[0] == 0x83) { int i; for (i = 2; i < 14; i++) { if (recv[i] != 0) @@ -587,7 +588,7 @@ i1d3_unlock( struct { char *pname; /* Product name */ unsigned int key[2]; /* Unlock code */ - i1d3_dtype dtype; /* Base type enumerator */ + i1d3_dtype btype; /* Base type enumerator */ i1d3_dtype stype; /* Sub type enumerator */ } codes[] = { { "i1Display3 ", { 0xe9622e9f, 0x8d63e133 }, i1d3_disppro, i1d3_disppro }, @@ -597,6 +598,7 @@ i1d3_unlock( { "i1Display3 ", { 0x160eb6ae, 0x14440e70 }, i1d3_disppro, i1d3_quato_sh3 }, { "i1Display3 ", { 0x291e41d7, 0x51937bdd }, i1d3_disppro, i1d3_hp_dreamc }, { "i1Display3 ", { 0xc9bfafe0, 0x02871166 }, i1d3_disppro, i1d3_sc_c6 }, + { "i1Display3 ", { 0x1abfae03, 0xf25ac8e8 }, i1d3_disppro, i1d3_wacom_dc }, { NULL } }; inst_code ev; @@ -630,7 +632,7 @@ i1d3_unlock( // codes[ix].key[0], codes[ix].key[1]); a1logd(p->log, 3, "i1d3_unlock: Trying unlock key %d/%d\n", ix+1, nix); - p->dtype = codes[ix].dtype; + p->btype = codes[ix].btype; p->stype = codes[ix].stype; /* Attempt unlock */ @@ -778,7 +780,7 @@ i1d3_read_external_eeprom( /* Take a raw measurement using a given integration time. */ /* The measurent is the count of (both) edges from the L2V */ -/* over the integration time */ +/* over the integration time. */ static inst_code i1d3_freq_measure( i1d3 *p, /* Object */ @@ -804,21 +806,31 @@ i1d3_freq_measure( todev[23] = 0; /* Unknown parameter, always 0 */ - if ((ev = i1d3_command(p, i1d3_measure1, todev, fromdev, I1D3_MEAS_TIMEOUT, 0)) != inst_ok) + if ((ev = i1d3_command(p, i1d3_freqmeas, todev, fromdev, I1D3_MEAS_TIMEOUT, 0)) != inst_ok) return ev; rgb[0] = (double)buf2uint(fromdev + 2); rgb[1] = (double)buf2uint(fromdev + 6); rgb[2] = (double)buf2uint(fromdev + 10); + /* The HW holds the L2F *OE high (disabled) until the start of the measurement period, */ + /* and this has the effect of holding the internal integrator in a reset state. */ + /* This then synchronizes the frequency output to the start of */ + /* the measurement, which has the effect of rounding down the count output. */ + /* To compensate, we have to add 0.5 to the count. */ + rgb[0] += 0.5; + rgb[1] += 0.5; + rgb[2] += 0.5; + return inst_ok; } /* Take a raw measurement that returns the number of clocks */ -/* between and initial edge and edgec[] subsequent edges of the L2F. */ -/* The edge count must be between 1 and 65535 inclusive. */ -/* Both edges are counted. It's advisable to use an even edgec[], */ -/* because the L2F output may not be symetric. */ +/* between and initial edge at the start of the period (triggered by */ +/* the *OE going low and the integrator being started) and edgec[] */ +/* subsequent edges of the L2F. The edge count must be between */ +/* 1 and 65535 inclusive. Both edges are counted. It's advisable */ +/* to use an even edgec[], because the L2F output may not be symetric. */ /* If there are no edges within 10 seconds, return a count of 0 */ static inst_code i1d3_period_measure( @@ -841,7 +853,7 @@ i1d3_period_measure( todev[7] = (unsigned char)mask; todev[8] = 0; /* Unknown parameter, always 0 */ - if ((ev = i1d3_command(p, i1d3_measure2, todev, fromdev, I1D3_MEAS_TIMEOUT, 0)) != inst_ok) + if ((ev = i1d3_command(p, i1d3_periodmeas, todev, fromdev, I1D3_MEAS_TIMEOUT, 0)) != inst_ok) return ev; rgb[0] = (double)buf2uint(fromdev + 2); @@ -932,6 +944,9 @@ i1d3_set_LEDs( To break up the USB synchronization, the integration time is randomized slightly. + + NOTE :- we should really switch to using period measurement mode here, + since it is more accurate ? */ #ifndef PSRAND32L @@ -1577,7 +1592,8 @@ i1d3_take_emis_measurement( isth = p->th_en; p->th_en = 0; - /* If we should take a frequency measurement first */ + /* If we should take a frequency measurement first, */ + /* since it is done in a predictable duration */ if (mode == i1d3_adaptive || mode == i1d3_frequency) { /* Typically this is 200msec for non-refresh, 400msec for refresh. */ @@ -1635,7 +1651,7 @@ i1d3_take_emis_measurement( continue; if (rmeas[i] < 10.0 - || (p->dtype != i1d3_munkdisp && rmeas[i] < 20.0)) { + || (p->btype != i1d3_munkdisp && rmeas[i] < 20.0)) { a1logd(p->log,3,"chan %d needs pre-measurement\n",i); mask2 |= 1 << i; } else { @@ -1667,7 +1683,7 @@ i1d3_take_emis_measurement( /* Transfer updated counts from 1st initial measurement */ for (i = 0; i < 3; i++) { if ((mask2 & (1 << i)) != 0) { - rmeas[i] = rmeas2[i]; + rmeas[i] = rmeas2[i]; /* Compute trial RGB in case we need it later */ if (rmeas[i] >= 0.5) { @@ -1680,7 +1696,7 @@ i1d3_take_emis_measurement( /* we are measuring a CRT with a refresh rate which adds innacuracy, */ /* and could result in a unecessarily long re-reading. */ /* Don't do this for Munki Display, because of its slow measurements. */ - if (p->dtype != i1d3_munkdisp) { + if (p->btype != i1d3_munkdisp) { for (i = 0; i < 3; i++) { if ((mask2 & (1 << i)) == 0) continue; @@ -2465,9 +2481,12 @@ i1d3_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { /* something to do with detaching the default HID driver ?? */ #if defined(UNIX_X11) usbflags |= icomuf_detach; - usbflags |= icomuf_no_open_clear; usbflags |= icomuf_reset_before_close; #endif + + /* On MSWin it doesn't like clearing on open when running direct (i.e not HID) */ + usbflags |= icomuf_no_open_clear; + /* Open as an HID if available */ if (p->icom->port_type(p->icom) == icomt_hid) { @@ -2579,7 +2598,7 @@ i1d3_init_inst(inst *pp) { return ev; if (p->prod_type == 0x0002) { /* If ColorMunki Display */ /* Set this in case it doesn't need unlocking */ - p->dtype = p->stype = i1d3_munkdisp; + p->btype = p->stype = i1d3_munkdisp; } if ((ev = i1d3_get_firmver(p, p->firm_ver)) != inst_ok) return ev; @@ -2731,7 +2750,7 @@ instClamping clamp) { /* NZ if clamp XYZ/Lab to be +ve */ } /* Attempt a refresh display frame rate calibration if needed */ - if (p->dtype != i1d3_munkdisp && p->refrmode != 0 && p->rrset == 0) { + if (p->btype != i1d3_munkdisp && p->refrmode != 0 && p->rrset == 0) { inst_code ev = inst_ok; p->mininttime = 2.0 * p->dinttime; @@ -2804,7 +2823,7 @@ double *ref_rate) { if (!p->inited) return inst_no_init; - if (p->dtype == i1d3_munkdisp) + if (p->btype == i1d3_munkdisp) return inst_unsupported; if (ref_rate != NULL) @@ -2928,7 +2947,7 @@ static inst_code i1d3_get_n_a_cals(inst *pp, inst_cal_type *pn_cals, inst_cal_ty inst_cal_type n_cals = inst_calt_none; inst_cal_type a_cals = inst_calt_none; - if (p->dtype != i1d3_munkdisp && p->refrmode != 0) { + if (p->btype != i1d3_munkdisp && p->refrmode != 0) { if (p->rrset == 0) n_cals |= inst_calt_ref_freq; a_cals |= inst_calt_ref_freq; @@ -2988,7 +3007,7 @@ char id[CALIDLEN] /* Condition identifier (ie. white reference ID) */ return inst_unsupported; } - if ((*calt & inst_calt_ref_freq) && p->dtype != i1d3_munkdisp && p->refrmode != 0) { + if ((*calt & inst_calt_ref_freq) && p->btype != i1d3_munkdisp && p->refrmode != 0) { inst_code ev = inst_ok; p->mininttime = 2.0 * p->dinttime; @@ -3498,7 +3517,7 @@ inst3_capability *pcap3) { | inst2_set_min_int_time ; - if (p->dtype != i1d3_munkdisp) { + if (p->btype != i1d3_munkdisp) { cap2 |= inst2_meas_disp_update; cap2 |= inst2_get_refresh_rate; cap2 |= inst2_set_refresh_rate; @@ -3865,7 +3884,7 @@ i1d3_get_set_opt(inst *pp, inst_opt_type m, ...) { p->omininttime = dval; /* Hmm. This code is duplicated a lot.. */ - if (p->dtype != i1d3_munkdisp && p->refrmode != 0) { + if (p->btype != i1d3_munkdisp && p->refrmode != 0) { inst_code ev = inst_ok; p->mininttime = 2.0 * p->dinttime; @@ -4038,7 +4057,7 @@ i1d3_get_set_opt(inst *pp, inst_opt_type m, ...) { } /* Constructor */ -extern i1d3 *new_i1d3(icoms *icom, instType itype) { +extern i1d3 *new_i1d3(icoms *icom, instType dtype) { i1d3 *p; if ((p = (i1d3 *)calloc(sizeof(i1d3),1)) == NULL) { @@ -4073,7 +4092,7 @@ extern i1d3 *new_i1d3(icoms *icom, instType itype) { p->del = i1d3_del; p->icom = icom; - p->itype = itype; + p->dtype = dtype; amutex_init(p->lock); icmSetUnity3x3(p->ccmat); diff --git a/spectro/i1d3.h b/spectro/i1d3.h index a7c3b24..6152a00 100644..100755 --- a/spectro/i1d3.h +++ b/spectro/i1d3.h @@ -87,7 +87,8 @@ typedef enum { i1d3_nec_ssp = 3, /* NEC SpectraSensor Pro */ i1d3_quato_sh3 = 4, /* Quato Silver Haze 3 */ i1d3_hp_dreamc = 5, /* HP DreameColor */ - i1d3_sc_c6 = 6 /* SpectraCal C6 */ + i1d3_sc_c6 = 6, /* SpectraCal C6 */ + i1d3_wacom_dc = 7 /* Wacom DC */ } i1d3_dtype; /* Measurement mode */ @@ -108,7 +109,7 @@ struct _i1d3 { inst_opt_type trig; /* Reading trigger mode */ /* Information and EEPROM values */ - i1d3_dtype dtype; /* Base type of instrument, ie i1d3_disppro or i1d3_munkdisp */ + i1d3_dtype btype; /* Base type of instrument, ie i1d3_disppro or i1d3_munkdisp */ i1d3_dtype stype; /* Sub type of instrument, ie. any of i1d3_dtype. */ /* (Only accurate if it needed unlocking). */ int status; /* 0 if status is ok (not sure what this is) */ diff --git a/spectro/i1disp.c b/spectro/i1disp.c index 9e4b01f..dfe4a60 100644..100755 --- a/spectro/i1disp.c +++ b/spectro/i1disp.c @@ -47,6 +47,7 @@ #include "sa_config.h" #include "numsup.h" #endif /* !SALONEINSTLIB */ +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -276,7 +277,7 @@ i1disp_rdreg_byte( int rsize; inst_code ev; - if (p->dtype == 0) { + if (p->btype == 0) { if (addr < 0 || addr > 127) return i1disp_interp_code((inst *)p, I1DISP_BAD_REG_ADDRESS); } else { @@ -484,7 +485,7 @@ i1disp_rdexreg_bytes( int ooff, rsize; inst_code ev; - if (p->dtype != 2) /* Only ColorMunki Smile ? */ + if (p->btype != 2) /* Only ColorMunki Smile ? */ return i1disp_interp_code((inst *)p, I1DISP_WRONG_DEVICE); if (addr < 0 || addr > 0x0200) @@ -649,7 +650,7 @@ i1d1_take_measurement( if (p->inited == 0) return i1disp_interp_code((inst *)p, I1DISP_NOT_INITED); - if (p->dtype != 0) + if (p->btype != 0) return i1disp_interp_code((inst *)p, I1DISP_WRONG_DEVICE); /* Do an initial measurement with minimum edge count of 1 */ @@ -858,13 +859,13 @@ i1d2_take_measurement( if (p->inited == 0) return i1disp_interp_code((inst *)p, I1DISP_NOT_INITED); - if (p->dtype == 0) + if (p->btype == 0) return i1disp_interp_code((inst *)p, I1DISP_WRONG_DEVICE); a1logd(p->log, 3, "i1d2_take_measurement called with refreshm = %d\n",refreshm); /* Do refresh period measurement */ - if (p->dtype == 1 && refreshm && p->rrset == 0) { + if (p->btype == 1 && refreshm && p->rrset == 0) { if ((ev = i1disp_do_fcal_setit(p)) != inst_ok) return ev; @@ -1040,13 +1041,13 @@ i1d2_take_measurement( if (p->inited == 0) return i1disp_interp_code((inst *)p, I1DISP_NOT_INITED); - if (p->dtype == 0) + if (p->btype == 0) return i1disp_interp_code((inst *)p, I1DISP_WRONG_DEVICE); a1logd(p->log, 3, "i1d2_take_measurement called with refreshm = %d\n",refreshm); /* Do refresh period measurement */ - if (p->dtype == 1 && refreshm && p->rrset == 0) { + if (p->btype == 1 && refreshm && p->rrset == 0) { if ((ev = i1disp_do_fcal_setit(p)) != inst_ok) return ev; @@ -1238,7 +1239,7 @@ i1disp_take_XYZ_measurement( inst_code ev; double *mat; /* Pointer to matrix */ - if (p->dtype == 0) { /* i1 disp 1 */ + if (p->btype == 0) { /* i1 disp 1 */ if ((ev = i1d1_take_measurement(p, 0, rgb)) != inst_ok) return ev; } else { /* i1 disp 2 or ColorMunki Smile */ @@ -1289,7 +1290,7 @@ i1disp_do_black_cal( double rgb1[3], rgb2[3]; /* RGB Readings */ inst_code ev; - if (p->dtype != 0) + if (p->btype != 0) return i1disp_interp_code((inst *)p, I1DISP_CANT_BLACK_CALIB); /* Do a couple of readings without subtracting the black */ @@ -1331,7 +1332,7 @@ i1disp_read_refrate( a1logd(p->log, 3, "Frequency calibration called\n"); - if (p->dtype != 1) + if (p->btype != 1) return inst_unsupported; if (ref_rate != NULL) @@ -1376,7 +1377,7 @@ i1disp_do_fcal_setit( a1logd(p->log, 3, "Frequency calibration called\n"); - if (p->dtype != 1) + if (p->btype != 1) return i1disp_interp_code((inst *)p, I1DISP_CANT_MEASP_CALIB); if ((ev = i1disp_read_refrate((inst *)p, &p->refrate)) != inst_ok @@ -1410,7 +1411,7 @@ i1disp_check_unlock( struct { unsigned char code[4]; - i1d2_dtype stype; + i1d2_stype stype; } codes[] = { { { 'G','r','M','b' }, i1d2_norm }, /* "GrMb" i1 Display */ { { 'L','i','t','e' }, i1d2_lite }, /* "Lite" i1 Display LT */ @@ -1429,7 +1430,7 @@ i1disp_check_unlock( { { 0x0e,0x0e,0x0e,0x0e }, i1d2_norm }, /* */ { { 0x11,0x02,0xde,0xf0 }, i1d2_norm }, /* Barco Chroma 5 ? */ // { { 0xff,0xff,0xff,0xff }, i1d2_norm }, /* Chroma 5 isn't locked ? */ - { { ' ',' ',' ',' ' }, -1 } + { { ' ',' ',' ',' ' }, i1d2_unkn } }; a1logd(p->log, 3, "i1disp: about to check response and unlock instrument if needed\n"); @@ -1444,7 +1445,7 @@ i1disp_check_unlock( /* Try each code in turn */ for (i = 0; ;i++) { - if (codes[i].stype == -1) { + if (codes[i].stype == i1d2_unkn) { a1logd(p->log, 3, "Failed to find correct unlock code\n"); return i1disp_interp_code((inst *)p, I1DISP_UNKNOWN_MODEL); } @@ -1489,37 +1490,37 @@ i1disp_check_unlock( /* Barco Chroma 5 with ver = 5.01 vv = '5' */ if (ver >= 4.0 && ver < 5.1 && vv == '5') { - p->dtype = 0; /* Sequel Chroma 4 ?? */ + p->btype = 0; /* Sequel Chroma 4 ?? */ p->stype = i1d1_chroma4; /* Treat like an Eye-One Display 1 */ /* Sequel Chroma 4 with vv == 0xff ???? */ /* Sencore ColorPro III with ver = 5.01 and vv = 0xff */ } else if (ver >= 4.0 && ver < 5.1 && vv == 0xff) { - p->dtype = 0; /* Eye-One Display 1 */ + p->btype = 0; /* Eye-One Display 1 */ p->stype = i1d1_sencoreIII; /* Sencore ColorPro IV with ver = 5.01 and vv = 'L' */ } else if (ver >= 4.0 && ver < 5.1 && vv == 'L') { - p->dtype = 0; /* Eye-One Display 1 */ + p->btype = 0; /* Eye-One Display 1 */ p->stype = i1d1_sencoreIV; /* Treat like an Eye-One Display 1 */ /* Sencore ColorPro V with ver = 5.01 and vv = 'B' */ } else if (ver >= 4.0 && ver < 5.1 && vv == 'B') { - p->dtype = 0; /* Eye-One Display 1 */ + p->btype = 0; /* Eye-One Display 1 */ p->stype = i1d1_sencoreV; /* Treat like an Eye-One Display 1 */ } else if (ver >= 5.1 && ver <= 5.3 && vv == 'L') { - p->dtype = 0; /* Eye-One Display 1 */ + p->btype = 0; /* Eye-One Display 1 */ } else if (ver >= 6.0 && ver <= 6.29 && vv == 'L') { - p->dtype = 1; /* Eye-One Display 2 */ + p->btype = 1; /* Eye-One Display 2 */ } else if (ver >= 6.0 && ver <= 6.29 && (vv = 0xff || vv == 'M')) { // Faulty Smile's have vv = 0xff /* ColorMunki Create ? */ /* ColorMunki Smile */ - if (p->dtype == 0) /* Not sure if this is set by Create */ - p->dtype = 1; + if (p->btype == 0) /* Not sure if this is set by Create */ + p->btype = 1; } else { /* Reject any version or model we don't know about */ @@ -1642,7 +1643,7 @@ i1disp_read_all_regs( p->serno[0] = '\000'; /* Read extra registers */ - if (p->dtype == 1) { + if (p->btype == 1) { #ifdef NEVER /* Not used, so don't bother */ for (i = 0; i < 3; i++) { @@ -1668,7 +1669,7 @@ i1disp_read_all_regs( /* ColorMunki Smile extra information */ /* (Colormunki Create too ????) */ - } else if (p->dtype == 2) { + } else if (p->btype == 2) { int i, v; /* Smile doesn't have ambient - reg144 seems to contain LCD cal type, */ @@ -1813,12 +1814,12 @@ i1disp_init_inst(inst *pp) { if (p->log->debug >= 3) { /* Dump all the register space */ - if (p->dtype < 2) { + if (p->btype < 2) { unsigned char buf[0x200]; int i, len; len = 128; - if (p->dtype != 0) + if (p->btype != 0) len = 160; for (i = 0; i < len; i++) { @@ -1985,11 +1986,11 @@ static inst_code i1disp_get_n_a_cals(inst *pp, inst_cal_type *pn_cals, inst_cal_ inst_cal_type n_cals = inst_calt_none; inst_cal_type a_cals = inst_calt_none; - if (p->dtype == 0) { /* Eye-One Display 1 */ + if (p->btype == 0) { /* Eye-One Display 1 */ a_cals |= inst_calt_emis_offset; } - if (p->dtype == 1 && p->refrmode != 0) { + if (p->btype == 1 && p->refrmode != 0) { if (p->rrset == 0) n_cals |= inst_calt_ref_freq; a_cals |= inst_calt_ref_freq; @@ -2015,7 +2016,7 @@ inst_code i1disp_calibrate( inst *pp, inst_cal_type *calt, /* Calibration type to do/remaining */ inst_cal_cond *calc, /* Current condition/desired condition */ -inst_calc_id_type *idtype, /* Condition identifier type */ +inst_calc_id_type *btype, /* Condition identifier type */ char id[CALIDLEN] /* Condition identifier (ie. white reference ID) */ ) { i1disp *p = (i1disp *)pp; @@ -2027,7 +2028,7 @@ char id[CALIDLEN] /* Condition identifier (ie. white reference ID) */ if (!p->inited) return inst_no_init; - *idtype = inst_calc_id_none; + *btype = inst_calc_id_none; id[0] = '\000'; if ((ev = i1disp_get_n_a_cals((inst *)p, &needed, &available)) != inst_ok) @@ -2056,7 +2057,7 @@ char id[CALIDLEN] /* Condition identifier (ie. white reference ID) */ } /* Do the appropriate calibration */ - if (p->dtype == 0) { /* Eye-One Display 1 */ + if (p->btype == 0) { /* Eye-One Display 1 */ if (*calt & inst_calt_emis_offset) { if ((*calc & inst_calc_cond_mask) != inst_calc_man_ref_dark) { @@ -2284,7 +2285,7 @@ inst3_capability *pcap3) { /* i1D2 has refresh display & ambient capability */ /* but i1D1 & ColorMunki Smile don't */ - if (p->dtype == 1) { + if (p->btype == 1) { cap1 |= inst_mode_emis_ambient | inst_mode_emis_refresh_ovd | inst_mode_emis_norefresh_ovd @@ -2322,7 +2323,7 @@ static inst_code i1disp_check_mode(inst *pp, inst_mode m) { /* Only display emission mode supported */ if (!IMODETST(m, inst_mode_emis_spot) - && !(p->dtype == 1 && IMODETST(m, inst_mode_emis_ambient))) { + && !(p->btype == 1 && IMODETST(m, inst_mode_emis_ambient))) { return inst_unsupported; } @@ -2410,7 +2411,7 @@ static inst_disptypesel smile_disptypesel[3] = { static void set_base_disptype_list(i1disp *p) { /* set the base display type list */ - if (p->itype == instSmile) { + if (p->dtype == instSmile) { p->_dtlist = smile_disptypesel; } else { p->_dtlist = i1disp_disptypesel; @@ -2632,7 +2633,7 @@ i1disp_get_set_opt(inst *pp, inst_opt_type m, ...) { } /* Constructor */ -extern i1disp *new_i1disp(icoms *icom, instType itype) { +extern i1disp *new_i1disp(icoms *icom, instType dtype) { i1disp *p; @@ -2663,13 +2664,13 @@ extern i1disp *new_i1disp(icoms *icom, instType itype) { p->del = i1disp_del; p->icom = icom; - p->itype = itype; + p->dtype = dtype; - if (p->itype == instI1Disp2) - p->dtype = 1; /* i1Display2 */ + if (p->dtype == instI1Disp2) + p->btype = 1; /* i1Display2 */ - else if (p->itype == instSmile) { - p->dtype = 2; /* Smile */ + else if (p->btype == instSmile) { + p->btype = 2; /* Smile */ } icmSetUnity3x3(p->ccmat); /* Set the colorimeter correction matrix to do nothing */ diff --git a/spectro/i1disp.h b/spectro/i1disp.h index eada827..61423b7 100644..100755 --- a/spectro/i1disp.h +++ b/spectro/i1disp.h @@ -78,6 +78,7 @@ /* Sub-type of instrument (i.e. based on vers, char code, unlock code) */ typedef enum { + i1d2_unkn = -1, i1d2_norm = 0, /* Normal (i1d1, i1d2, Smile) */ i1d2_lite = 1, /* "Lite" */ i1d2_munki = 2, /* "Munk" */ @@ -88,15 +89,15 @@ typedef enum { i1d1_sencoreIII = 7, /* Sencore ColorPro III */ i1d1_sencoreIV = 8, /* Sencore ColorPro IV */ i1d1_sencoreV = 9 /* Sencore ColorPro V */ -} i1d2_dtype; +} i1d2_stype; /* I1DISP communication object */ struct _i1disp { INST_OBJ_BASE - int dtype; /* Device type: 0 = i1D1, 1 = i1D2, 2 = Smile */ - i1d2_dtype stype; /* Sub type */ + int btype; /* Device type: 0 = i1D1, 1 = i1D2, 2 = Smile */ + i1d2_stype stype; /* Sub type */ inst_mode mode; /* Currently selected mode */ diff --git a/spectro/i1pro.c b/spectro/i1pro.c index 44614d2..4399c57 100644..100755 --- a/spectro/i1pro.c +++ b/spectro/i1pro.c @@ -64,6 +64,7 @@ #include "numsup.h" #include "rspl1.h" #endif /* SALONEINSTLIB */ +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -140,15 +141,15 @@ i1pro_determine_capabilities(i1pro *p) { ; /* Set the Pro capabilities mask */ - if (p->itype == instI1Pro - || p->itype == instI1Pro2) { + if (p->dtype == instI1Pro + || p->dtype == instI1Pro2) { p->cap |= inst_mode_ref_spot | inst_mode_ref_strip ; } /* Set the Pro2 capabilities mask */ - if (p->itype == instI1Pro2) { + if (p->dtype == instI1Pro2) { p->cap |= inst_mode_ref_uv ; } @@ -911,7 +912,7 @@ i1pro_del(inst *pp) { } /* Constructor */ -extern i1pro *new_i1pro(icoms *icom, instType itype) { +extern i1pro *new_i1pro(icoms *icom, instType dtype) { i1pro *p; int rv; if ((p = (i1pro *)calloc(sizeof(i1pro),1)) == NULL) { @@ -940,7 +941,7 @@ extern i1pro *new_i1pro(icoms *icom, instType itype) { p->del = i1pro_del; p->icom = icom; - p->itype = itype; + p->dtype = dtype; i1pro_determine_capabilities(p); diff --git a/spectro/i1pro.h b/spectro/i1pro.h index e449f2c..378dc30 100644..100755 --- a/spectro/i1pro.h +++ b/spectro/i1pro.h @@ -45,7 +45,7 @@ struct _i1pro { INST_OBJ_BASE - int dtype; /* Device type: 0 = ?? */ + int idtype; /* Device type: 0 = ?? */ /* *** i1pro private data **** */ inst_mode cap; /* Instrument mode capability */ diff --git a/spectro/i1pro_imp.c b/spectro/i1pro_imp.c index a8cb9e0..03f0a0d 100644..100755 --- a/spectro/i1pro_imp.c +++ b/spectro/i1pro_imp.c @@ -92,6 +92,7 @@ #include "numsup.h" #include "rspl1.h" #endif /* SALONEINSTLIB */ +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -372,7 +373,7 @@ void del_i1proimp(i1pro *p) { i1pro_state *s; i1pro_code ev; - if (p->itype != instI1Pro2 && (ev = i1pro_update_log(p)) != I1PRO_OK) { + if (p->dtype != instI1Pro2 && (ev = i1pro_update_log(p)) != I1PRO_OK) { a1logd(p->log,2,"i1pro_update_log: Updating the cal and log parameters to" " EEProm failed failed\n"); } @@ -458,7 +459,7 @@ i1pro_code i1pro_imp_init(i1pro *p) { a1logd(p->log,5,"i1pro_init:\n"); m->native_calstd = xcalstd_gmdi; /* Rev A-D */ - if (p->itype == instI1Pro2) { + if (p->dtype == instI1Pro2) { m->native_calstd = xcalstd_xrga; /* Rev E */ } m->target_calstd = xcalstd_native; /* Default to native calibration */ @@ -474,17 +475,17 @@ i1pro_code i1pro_imp_init(i1pro *p) { } /* Revert to i1pro if i1pro2 driver is not enabled */ - if (p->itype == instI1Pro2 + if (p->dtype == instI1Pro2 #ifdef ENABLE_2 && getenv("ARGYLL_DISABLE_I1PRO2_DRIVER") != NULL /* Disabled by environment */ #endif ) { - p->itype = instI1Pro; + p->dtype = instI1Pro; } - if (p->itype != instI1Monitor - && p->itype != instI1Pro - && p->itype != instI1Pro2) + if (p->dtype != instI1Monitor + && p->dtype != instI1Pro + && p->dtype != instI1Pro2) return I1PRO_UNKNOWN_MODEL; m->trig = inst_opt_trig_user; @@ -513,14 +514,14 @@ i1pro_code i1pro_imp_init(i1pro *p) { return ev; a1logd(p->log,2,"Firmware rev = %d, max +ve value = 0x%x\n",m->fwrev, m->maxpve); - if (p->itype == instI1Pro2 && m->fwrev < 600) { /* Hmm */ + if (p->dtype == instI1Pro2 && m->fwrev < 600) { /* Hmm */ a1logd(p->log,2, "Strange, firmware isn't up to i1pro2 but has extra pipe..revert to i1pro driver\n",m->fwrev); - p->itype = instI1Pro; + p->dtype = instI1Pro; } /* Get the EEProm size */ m->eesize = 8192; /* Rev A..D */ - if (p->itype == instI1Pro2) { + if (p->dtype == instI1Pro2) { #ifdef NEVER // ~~99 Hmm. makes it worse. Why ??? // /* Make sure LED sequence is finished, because it interferes with EEProm read! */ @@ -550,7 +551,7 @@ i1pro_code i1pro_imp_init(i1pro *p) { return ev; } - if (p->itype == instI1Pro2) { + if (p->dtype == instI1Pro2) { /* Get the Chip ID (This doesn't work until after reading the EEProm !) */ if ((ev = i1pro2_getchipid(p, m->chipid)) != I1PRO_OK) { free(eeprom); @@ -565,7 +566,7 @@ i1pro_code i1pro_imp_init(i1pro *p) { } /* Parse the i1pro2 extra data */ - if (p->itype == instI1Pro2) { + if (p->dtype == instI1Pro2) { if ((ev = m->data->parse_eeprom(m->data, eeprom, m->eesize, 1)) != I1PRO_OK) { free(eeprom); return ev; @@ -624,7 +625,7 @@ i1pro_code i1pro_imp_init(i1pro *p) { m->nsen = 128; m->nraw = 128; - if (p->itype == instI1Pro2) { + if (p->dtype == instI1Pro2) { int clkusec, subdiv, xraw, nraw; if ((ev = i1pro2_getmeaschar(p, &clkusec, &xraw, &nraw, &subdiv)) != I1PRO_OK) return ev; @@ -685,7 +686,7 @@ i1pro_code i1pro_imp_init(i1pro *p) { m->min_int_time = dp[0]; /* And then override it */ - if (p->itype == instI1Pro2) { + if (p->dtype == instI1Pro2) { m->min_int_time = m->subclkdiv2 * m->intclkp2; /* 0.004896 */ } else { if (m->fwrev >= 301) @@ -716,7 +717,7 @@ i1pro_code i1pro_imp_init(i1pro *p) { if ((m->white_ref[0] = m->data->get_doubles(m->data, &count, key_white_ref)) == NULL || count != m->nwav[0]) { - if (p->itype != instI1Monitor) + if (p->dtype != instI1Monitor) return I1PRO_HW_CALIBINFO; m->white_ref[0] = NULL; } @@ -727,7 +728,7 @@ i1pro_code i1pro_imp_init(i1pro *p) { if ((m->amb_coef[0] = m->data->get_doubles(m->data, &count, key_amb_coef)) == NULL || count != m->nwav[0]) { - if (p->itype != instI1Monitor + if (p->dtype != instI1Monitor && m->capabilities & 0x6000) /* Expect ambient calibration */ return I1PRO_HW_CALIBINFO; m->amb_coef[0] = NULL; @@ -799,7 +800,7 @@ i1pro_code i1pro_imp_init(i1pro *p) { } /* Read Rev E specific keys */ - if (p->itype == instI1Pro2) { + if (p->dtype == instI1Pro2) { int i, j; double *dp; int *sip; @@ -1001,7 +1002,7 @@ i1pro_code i1pro_imp_init(i1pro *p) { s->dark_int_time4 = DISP_INTT4; /* 0.1 */ s->idark_int_time[0] = s->idark_int_time[2] = m->min_int_time; - if (p->itype == instI1Pro2) { + if (p->dtype == instI1Pro2) { s->idark_int_time[1] = s->idark_int_time[3] = ADARKINT_MAX2; /* 4.0 */ } else { #ifdef USE_HIGH_GAIN_MODE @@ -1242,8 +1243,8 @@ i1pro_code i1pro_imp_init(i1pro *p) { } } - if (p->itype != instI1Monitor /* Monitor doesn't have reflective cal */ - && p->itype != instI1Pro2) { /* Rev E mode has different calibration */ + if (p->dtype != instI1Monitor /* Monitor doesn't have reflective cal */ + && p->dtype != instI1Pro2) { /* Rev E mode has different calibration */ /* Restore the previous reflective spot calibration from the EEProm */ /* Get ready to operate the instrument */ if ((ev = i1pro_restore_refspot_cal(p)) != I1PRO_OK) @@ -1266,11 +1267,11 @@ i1pro_code i1pro_imp_init(i1pro *p) { return ev; if (p->log->verb >= 1) { - a1logv(p->log,1,"Instrument Type: %s\n",inst_name(p->itype)); + a1logv(p->log,1,"Instrument Type: %s\n",inst_name(p->dtype)); a1logv(p->log,1,"Serial Number: %d\n",m->serno); a1logv(p->log,1,"Firmware version: %d\n",m->fwrev); a1logv(p->log,1,"CPLD version: %d\n",m->cpldrev); - if (p->itype == instI1Pro2) + if (p->dtype == instI1Pro2) a1logv(p->log,1,"Chip ID: %02x-%02x%02x%02x%02x%02x%02x%02x\n", m->chipid[0], m->chipid[1], m->chipid[2], m->chipid[3], m->chipid[4], m->chipid[5], m->chipid[6], m->chipid[7]); @@ -1290,7 +1291,7 @@ i1pro_code i1pro_imp_init(i1pro *p) { #ifdef NEVER // ~~99 play with LED settings - if (p->itype == instI1Pro2) { + if (p->dtype == instI1Pro2) { /* Makes it white */ unsigned char b2[] = { @@ -1355,7 +1356,7 @@ i1pro_code i1pro_imp_set_mode( switch(mmode) { case i1p_refl_spot: case i1p_refl_scan: - if (p->itype == instI1Monitor) + if (p->dtype == instI1Monitor) return I1PRO_INT_ILLEGALMODE; /* i1Monitor can't do reflection */ break; case i1p_emiss_spot_na: @@ -1414,11 +1415,11 @@ i1pro_code i1pro_imp_get_n_a_cals(i1pro *p, inst_cal_type *pn_cals, inst_cal_typ wl_valid = 0; } } - if ((curtime - cs->iddate) > ((p->itype == instI1Pro2) ? DCALTOUT2 : DCALTOUT)) { + if ((curtime - cs->iddate) > ((p->dtype == instI1Pro2) ? DCALTOUT2 : DCALTOUT)) { a1logd(p->log,2,"Invalidating adaptive dark cal as %d secs from last cal\n",curtime - cs->iddate); idark_valid = 0; } - if ((curtime - cs->ddate) > ((p->itype == instI1Pro2) ? DCALTOUT2 : DCALTOUT)) { + if ((curtime - cs->ddate) > ((p->dtype == instI1Pro2) ? DCALTOUT2 : DCALTOUT)) { a1logd(p->log,2,"Invalidating dark cal as %d secs from last cal\n",curtime - cs->ddate); dark_valid = 0; } @@ -1486,7 +1487,7 @@ i1pro_code i1pro_imp_get_n_a_cals(i1pro *p, inst_cal_type *pn_cals, inst_cal_typ && m->hr_inited /* and hi-res has been setup */ && (!m->emis_hr_cal || (n_cals & inst_calt_em_dark)) /* and the emis cal hasn't been */ /* fine tuned or we will be doing a dark cal */ - && p->itype != instI1Monitor) { /* i1Monitor doesn't have reflective cal capability */ + && p->dtype != instI1Monitor) { /* i1Monitor doesn't have reflective cal capability */ n_cals |= inst_calt_ref_white; /* Need a reflective white calibration */ a_cals |= inst_calt_ref_white; } @@ -1833,7 +1834,7 @@ i1pro_code i1pro_imp_calibrate( } #ifdef USE_HIGH_GAIN_MODE - if (p->itype != instI1Pro2) { /* Rev E doesn't have high gain mode */ + if (p->dtype != instI1Pro2) { /* Rev E doesn't have high gain mode */ nummeas = i1pro_comp_nummeas(p, s->dcaltime, s->idark_int_time[2]); a1logd(p->log,2,"Doing adaptive interpolated black calibration, dcaltime %f, idark_int_time[2] %f, nummeas %d, gainmode %d\n", s->dcaltime, s->idark_int_time[2], nummeas, 1); if ((ev = i1pro_dark_measure(p, s->idark_data[2], @@ -1883,7 +1884,7 @@ i1pro_code i1pro_imp_calibrate( ss->dark_int_time = s->dark_int_time; ss->dark_gain_mode = s->dark_gain_mode; #ifdef USE_HIGH_GAIN_MODE - for (j = 0; j < (p->itype != instI1Pro2) ? 4 : 2; j++) + for (j = 0; j < (p->dtype != instI1Pro2) ? 4 : 2; j++) #else for (j = 0; j < 2; j++) #endif @@ -1933,7 +1934,7 @@ i1pro_code i1pro_imp_calibrate( #endif #ifdef USE_HIGH_GAIN_MODE - if (p->itype != instI1Pro2) { /* Rev E doesn't have high gain mode */ + if (p->dtype != instI1Pro2) { /* Rev E doesn't have high gain mode */ // fprintf(stderr,"High gain offsets:\n"); // plot_raw(s->idark_data[2]); // fprintf(stderr,"High gain multiplier:\n"); @@ -1993,7 +1994,7 @@ i1pro_code i1pro_imp_calibrate( } #ifdef USE_HIGH_GAIN_MODE - if (p->itype != instI1Pro2) { /* Rev E doesn't have high gain mode */ + if (p->dtype != instI1Pro2) { /* Rev E doesn't have high gain mode */ s->idark_int_time[2] = s->inttime; nummeas = i1pro_comp_nummeas(p, s->dcaltime, s->idark_int_time[2]); a1logd(p->log,2,"Doing adaptive scan black calibration, dcaltime %f, idark_int_time[2] %f, nummeas %d, gainmode %d\n", s->dcaltime, s->idark_int_time[2], nummeas, s->gainmode); @@ -2043,7 +2044,7 @@ i1pro_code i1pro_imp_calibrate( ss->dark_int_time = s->dark_int_time; ss->dark_gain_mode = s->dark_gain_mode; #ifdef USE_HIGH_GAIN_MODE - for (j = 0; j < (p->itype != instI1Pro2) ? 4 : 2; j += 2) + for (j = 0; j < (p->dtype != instI1Pro2) ? 4 : 2; j += 2) #else for (j = 0; j < 2; j += 2) #endif @@ -2207,7 +2208,7 @@ i1pro_code i1pro_imp_calibrate( m->mmode = mmode; /* Restore actual mode */ return ev; } - } else if (p->itype != instI1Pro2 && s->gainmode == 0 && scale > m->highgain) { + } else if (p->dtype != instI1Pro2 && s->gainmode == 0 && scale > m->highgain) { #ifdef USE_HIGH_GAIN_MODE a1logd(p->log,3,"Scan signal is so low we're switching to high gain mode\n"); s->gainmode = 1; @@ -4218,7 +4219,7 @@ i1pro_code i1pro_save_calibration(i1pro *p) { i1pnonv x; int ss; int argyllversion = ARGYLL_VERSION; - int isRevE = p->itype == instI1Pro2 ? 1 : 0; + int isRevE = p->dtype == instI1Pro2 ? 1 : 0; strcpy(nmode, "w"); #if !defined(O_CREAT) && !defined(_O_CREAT) @@ -4230,7 +4231,8 @@ i1pro_code i1pro_save_calibration(i1pro *p) { /* Create the file name */ sprintf(cal_name, "ArgyllCMS/.i1p_%d.cal", m->serno); - if ((no_paths = xdg_bds(NULL, &cal_paths, xdg_cache, xdg_write, xdg_user, cal_name)) < 1) { + if ((no_paths = xdg_bds(NULL, &cal_paths, xdg_cache, xdg_write, xdg_user, xdg_none, + cal_name)) < 1) { a1logd(p->log,1,"i1pro_save_calibration xdg_bds returned no paths\n"); return I1PRO_INT_CAL_SAVE; } @@ -4353,7 +4355,8 @@ i1pro_code i1pro_restore_calibration(i1pro *p) { #endif /* Create the file name */ sprintf(cal_name, "ArgyllCMS/.i1p_%d.cal" SSEPS "color/.i1p_%d.cal", m->serno, m->serno); - if ((no_paths = xdg_bds(NULL, &cal_paths, xdg_cache, xdg_read, xdg_user, cal_name)) < 1) { + if ((no_paths = xdg_bds(NULL, &cal_paths, xdg_cache, xdg_read, xdg_user, xdg_none, + cal_name)) < 1) { a1logd(p->log,2,"i1pro_restore_calibration xdg_bds failed to locate file'\n"); return I1PRO_INT_CAL_RESTORE; } @@ -4394,7 +4397,7 @@ i1pro_code i1pro_restore_calibration(i1pro *p) { || argyllversion != ARGYLL_VERSION || ss != (sizeof(i1pro_state) + sizeof(i1proimp)) || serno != m->serno - || isRevE != (p->itype == instI1Pro2 ? 1 : 0) + || isRevE != (p->dtype == instI1Pro2 ? 1 : 0) || nraw != m->nraw || nwav0 != m->nwav[0] || nwav1 != m->nwav[1]) { @@ -4675,7 +4678,8 @@ i1pro_code i1pro_touch_calibration(i1pro *p) { /* Locate the file name */ sprintf(cal_name, "ArgyllCMS/.i1p_%d.cal" SSEPS "color/.i1p_%d.cal", m->serno, m->serno); - if ((no_paths = xdg_bds(NULL, &cal_paths, xdg_cache, xdg_read, xdg_user, cal_name)) < 1) { + if ((no_paths = xdg_bds(NULL, &cal_paths, xdg_cache, xdg_read, xdg_user, xdg_none, + cal_name)) < 1) { a1logd(p->log,2,"i1pro_restore_calibration xdg_bds failed to locate file'\n"); return I1PRO_INT_CAL_TOUCH; } @@ -5822,7 +5826,7 @@ i1pro_trigger_one_measure( *inttime = m->min_int_time; /* The Rev E measure mode has it's own settings */ - if (p->itype == instI1Pro2) { + if (p->dtype == instI1Pro2) { m->intclkp = m->intclkp2; /* From i1pro2_getmeaschar() ? */ m->subclkdiv = m->subclkdiv2; m->subtmode = 0; @@ -5892,7 +5896,7 @@ i1pro_trigger_one_measure( /* Compute integration clocks */ dintclocks = floor(*inttime/m->intclkp + 0.5); - if (p->itype == instI1Pro2) { + if (p->dtype == instI1Pro2) { if (dintclocks > 4294967296.0) /* This is probably not the actual limit */ return I1PRO_INT_INTTOOBIG; } else { @@ -5926,7 +5930,7 @@ i1pro_trigger_one_measure( if (gainmode == 0) measmodeflags |= I1PRO_MMF_LOWGAIN; /* Normal gain mode */ - if (p->itype == instI1Pro2) { + if (p->dtype == instI1Pro2) { measmodeflags2 = 0; if (s->scan && !(mmodif & 0x20)) /* Never scan on a calibration */ measmodeflags2 |= I1PRO2_MMF_SCAN; @@ -5958,7 +5962,7 @@ i1pro_trigger_one_measure( #endif /* NEVER */ { - if (p->itype != instI1Pro2) { /* Rev E sets the params in the measure command */ + if (p->dtype != instI1Pro2) { /* Rev E sets the params in the measure command */ /* Set the hardware for measurement */ if ((ev = i1pro_setmeasparams(p, intclocks, lampclocks, nummeas, measmodeflags)) != I1PRO_OK) return ev; @@ -5988,7 +5992,7 @@ i1pro_trigger_one_measure( /* Trigger a measurement */ usb_reinit_cancel(&m->rd_sync); /* Prepare to sync rd and trigger */ - if (p->itype != instI1Pro2) { + if (p->dtype != instI1Pro2) { if ((ev = i1pro_triggermeasure(p, TRIG_DELAY)) != I1PRO_OK) return ev; } else { @@ -7396,7 +7400,7 @@ void i1pro_sub_absraw( /* black. It's not clear why it works best this way, or how */ /* dependent on the particular instrument the magic numbers are, */ /* but it reduces the black level error from over 10% to about 0.3% */ - if (p->itype == instI1Pro2) { + if (p->dtype == instI1Pro2) { // double xx[NSEN_MAX], in[NSEN_MAX], res[NSEN_MAX]; double asub[NSEN_MAX]; double avgscell, zero; @@ -7516,7 +7520,7 @@ void i1pro_absraw_to_abswav( abswav[i][j] = tm[j] = oval; } - if (p->itype == instI1Pro2) { + if (p->dtype == instI1Pro2) { /* Now apply stray light compensation */ /* For each output wavelength */ for (j = 0; j < m->nwav[highres]; j++) { @@ -7613,7 +7617,7 @@ static double i1pro_raw2wav_uncal(i1pro *p, double raw) { double ov; int k; - if (p->itype == instI1Pro2) { + if (p->dtype == instI1Pro2) { raw = 128.0 - raw; /* Quadratic expects +ve correlation */ /* Compute polinomial */ @@ -7641,7 +7645,7 @@ static double i1pro_raw2wav(i1pro *p, int refl, double raw) { double ov; int k; - if (p->itype == instI1Pro2) { + if (p->dtype == instI1Pro2) { i1pro_state *s = &m->ms[m->mmode]; /* Correct for CCD offset and scale back to reference */ @@ -7980,6 +7984,7 @@ i1pro_code i1pro2_match_wl_meas(i1pro *p, double *pled_off, double *wlraw) { /* at 550 nm. (see above), which amounts to about +0.026, leaving 0.2528 */ /* unexplained. It appears the CCD wavelength has a dependence on the */ /* angle that the light enters the optics ?? */ + /* (- is it just a change in the spectrum shape ??) */ led_off += 0.2528; /* Hack to make ambient cap correction == white tile correction */ @@ -8813,7 +8818,7 @@ i1pro_code i1pro_create_hr(i1pro *p) { /* use the orginal filters to figure this out. */ if (m->raw2wav == NULL #ifndef ANALIZE_EXISTING - && p->itype != instI1Pro2 + && p->dtype != instI1Pro2 #endif ) { i1pro_fc coeff[100][16]; /* Existing filter cooefficients */ @@ -9418,7 +9423,7 @@ i1pro_code i1pro_create_hr(i1pro *p) { trspl->del(trspl); /* Upsample stray light */ - if (p->itype == instI1Pro2) { + if (p->dtype == instI1Pro2) { #ifdef ONEDSTRAYLIGHTUS double **slp; /* 2D Array of stray light values */ @@ -10727,7 +10732,7 @@ i1pro_code i1pro_optimise_sensor( /* expected level is < target_level/gain */ /* Hmm. It may not be a good idea to use high gain mode if it compromises */ /* the longer integration time which reduces noise. */ - if (p->itype != instI1Pro2 && new_int_time > m->max_int_time && permithg) { + if (p->dtype != instI1Pro2 && new_int_time > m->max_int_time && permithg) { new_int_time /= m->highgain; new_gain_mode = 1; a1logd(p->log,3,"Switching to high gain mode\n"); @@ -10810,7 +10815,7 @@ i1pro_prepare_idark( /* Compute base */ s->idark_data[i+0][j] = d01 - s->idark_data[i+1][j] * s->idark_int_time[i+0]; } - if (p->itype == instI1Pro2) /* Rev E doesn't have high gain mode */ + if (p->dtype == instI1Pro2) /* Rev E doesn't have high gain mode */ break; } } @@ -10928,7 +10933,7 @@ i1pro_reset( pbuf[0] = mask; - if (p->itype == instI1Pro2) { + if (p->dtype == instI1Pro2) { pbuf[1] = 0; /* Not known what i1pro2 second byte is for */ len = 2; } @@ -10978,7 +10983,7 @@ i1pro_readEEProm( short2buf(&pbuf[4], size); pbuf[6] = pbuf[7] = 0; /* Ignored */ - if (p->itype == instI1Pro2) + if (p->dtype == instI1Pro2) len = 6; se = p->icom->usb_control(p->icom, @@ -11066,7 +11071,7 @@ i1pro_writeEEProm( short2buf(&pbuf[4], size); short2buf(&pbuf[6], 0x100); /* Might be accidental, left over from getmisc.. */ - if (p->itype == instI1Pro2) + if (p->dtype == instI1Pro2) len = 6; se = p->icom->usb_control(p->icom, @@ -12112,7 +12117,7 @@ i1pro2_indLEDoff(void *pp) { #ifdef NEVER // ~~99 play with LED settings - if (p->itype == instI1Pro2) { + if (p->dtype == instI1Pro2) { // LED is capable of white and red @@ -12927,7 +12932,7 @@ static i1_dtype i1data_det_type(i1data *d, i1key key) { if (key < 0x100) return i1_dtype_section; - switch(key) { + switch((int)key) { /* Log keys */ case key_meascount: case key_meascount + 1000: diff --git a/spectro/i1pro_imp.h b/spectro/i1pro_imp.h index 582cc98..582cc98 100644..100755 --- a/spectro/i1pro_imp.h +++ b/spectro/i1pro_imp.h diff --git a/spectro/icoms.c b/spectro/icoms.c index eadecc9..875f3b6 100644..100755 --- a/spectro/icoms.c +++ b/spectro/icoms.c @@ -35,12 +35,16 @@ #include "sa_config.h" #endif #include "numsup.h" +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" #include "icoms.h" +icom_type dev_category(instType itype); +int serial_get_paths(icompaths *p, icom_type mask); + /* ----------------------------------------------------- */ /* Fake display & instrument device */ @@ -118,24 +122,32 @@ static icompath *icompaths_get_path( /* Return the device path corresponding to the port number, or NULL if out of range */ static icompath *icompaths_get_path_sel( icompaths *p, - icom_type dctype, /* Device type list */ + icom_dtix dtix, /* Device type list */ int port /* Enumerated port number, 1..n */ ) { /* Check it is an enumeration */ - if (dctype != dtix_combined - && dctype != dtix_inst - && dctype != dtix_3dlut - && dctype != dtix_vtpg - && dctype != dtix_printer) + if (dtix != dtix_combined + && dtix != dtix_inst + && dtix != dtix_3dlut + && dtix != dtix_vtpg + && dtix != dtix_printer + && dtix != dtix_cmfm) { +//printf("~1 unrec index\n"); return NULL; + } - if (dctype == dtix_inst) + if (dtix == dtix_inst) { +//printf("~1 inst\n"); return icompaths_get_path(p, port); + } - if (port <= 0 || port > p->ndpaths[dctype]) + if (port <= 0 || port > p->ndpaths[dtix]) { +//printf("~1 port %d out of range %d - %d\n", port,0, p->ndpaths[dtix]); return NULL; + } - return p->dpaths[dctype][port-1]; +//printf("~1 OK index for port %d\n",port); + return p->dpaths[dtix][port-1]; } /* Clear a single device paths list */ @@ -172,6 +184,7 @@ static void icompaths_clear_all(icompaths *p) { icompaths_clear(p, dtix_3dlut); icompaths_clear(p, dtix_vtpg); icompaths_clear(p, dtix_printer); + icompaths_clear(p, dtix_cmfm); icompaths_clear(p, dtix_combined); } @@ -183,7 +196,7 @@ static int icompaths_add_path(icompaths *p, int ix, icompath *xp) { if (xp == NULL) ix = dtix_combined; if (p->dpaths[ix] == NULL) { - if ((p->dpaths[ix] = (icompath **)calloc(sizeof(icompath *), 1 + 1)) == NULL) { + if ((p->dpaths[ix] = (icompath **)calloc(1 + 1, sizeof(icompath *))) == NULL) { a1loge(p->log, ICOM_SYS, "icompaths: calloc failed!\n"); return ICOM_SYS; } @@ -198,7 +211,7 @@ static int icompaths_add_path(icompaths *p, int ix, icompath *xp) { p->dpaths[ix][p->ndpaths[ix]+1] = NULL; } if (xp == NULL) { - if ((xp = calloc(sizeof(icompath), 1)) == NULL) { + if ((xp = calloc(1, sizeof(icompath))) == NULL) { a1loge(p->log, ICOM_SYS, "icompaths: malloc failed!\n"); return ICOM_SYS; } @@ -227,7 +240,7 @@ int icompaths_make_dslists(icompaths *p) { if ((rv = icompaths_add_path(p, dtix_inst, xp)) != ICOM_OK) return rv; } - if (xp->dctype & icomt_3dlut) { + if (xp->dctype & icomt_v3dlut) { if ((rv = icompaths_add_path(p, dtix_3dlut, xp)) != ICOM_OK) return rv; } @@ -239,6 +252,10 @@ int icompaths_make_dslists(icompaths *p) { if ((rv = icompaths_add_path(p, dtix_printer, xp)) != ICOM_OK) return rv; } + if (xp->dctype & icomt_cmfm) { + if ((rv = icompaths_add_path(p, dtix_cmfm, xp)) != ICOM_OK) + return rv; + } } /* Maintain backwards compatible instrument list alias */ @@ -289,9 +306,9 @@ int icompaths_set_serial_itype(icompath *p, devType itype) { char pname[400], *cp; /* Convert device type to category */ - p->dctype = (p->dctype & ~icomt_cat_mask) | inst_category(itype); + p->dctype = (p->dctype & ~icomt_cat_mask) | dev_category(itype); - p->itype = itype; + p->dtype = itype; /* Strip any existing description in brackets */ if ((cp = strchr(p->name, '(')) != NULL && cp > p->name) @@ -330,13 +347,13 @@ int icompath_set_usb(a1log *log, icompath *p, char *name, unsigned int vid, unsi a1logd(g_log, 8, "icompath_set_usb '%s' got dctype 0x%x\n",p->name,p->dctype); p->dctype |= icomt_usb; - p->dctype = (p->dctype & ~icomt_cat_mask) | inst_category(itype); + p->dctype = (p->dctype & ~icomt_cat_mask) | dev_category(itype); p->nep = nep; p->vid = vid; p->pid = pid; p->usbd = usbd; - p->itype = itype; + p->dtype = itype; a1logd(g_log, 8, "icompath_set_usb '%s' returning dctype 0x%x\n",p->name,p->dctype); @@ -375,7 +392,7 @@ static int icompaths_add_hid(icompaths *p, char *name, unsigned int vid, unsigne a1logd(g_log, 8, "icompaths_add_hid '%s' got dctype 0x%x\n",xp->name,xp->dctype); xp->dctype |= icomt_hid; - xp->dctype = (xp->dctype & ~icomt_cat_mask) | inst_category(itype); + xp->dctype = (xp->dctype & ~icomt_cat_mask) | dev_category(itype); if ((xp->name = strdup(name)) == NULL) { a1loge(p->log, ICOM_SYS, "icompaths: strdup failed!\n"); @@ -386,7 +403,7 @@ static int icompaths_add_hid(icompaths *p, char *name, unsigned int vid, unsigne xp->vid = vid; xp->pid = pid; xp->hidd = hidd; - xp->itype = itype; + xp->dtype = itype; a1logd(g_log, 8, "icompath_set_usb '%s' returning dctype 0x%x\n",xp->name,xp->dctype); @@ -398,20 +415,26 @@ static void icompaths_del(icompaths *p) { if (p != NULL) { icompaths_clear_all(p); + if (p->exlist != NULL) { + int i; + for (i = 0; i < p->exno; i++) { + if (p->exlist[i] != NULL) + free(p->exlist[i]); + } + free(p->exlist); + } p->log = del_a1log(p->log); /* Unreference it and set to NULL */ free(p); } } /* Create and return a list of available serial ports or USB devices for this system. */ -/* We look at the registry key "HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM" */ -/* to determine serial ports, and use libusb to discover USB devices. */ -/* return icom error */ +/* Return icom error */ int icompaths_refresh_paths_sel(icompaths *p, icom_type mask) { int rv, usbend = 0; int i, j; - a1logd(p->log, 7, "icoms_refresh_paths: called with mask = %d\n",mask); + a1logd(p->log, 7, "icoms_refresh_paths: called with mask = 0x%x\n",mask); /* Clear any existing device paths */ p->clear(p); @@ -451,9 +474,9 @@ int icompaths_refresh_paths_sel(icompaths *p, icom_type mask) { for (i = usbend; i < (np-1); i++) { for (j = i+1; j < np; j++) { - if ((pl[i]->itype == instUnknown && pl[j]->itype != instUnknown) - || (((pl[i]->itype == instUnknown && pl[j]->itype == instUnknown) - || (pl[i]->itype != instUnknown && pl[j]->itype != instUnknown)) + if ((pl[i]->dtype == instUnknown && pl[j]->dtype != instUnknown) + || (((pl[i]->dtype == instUnknown && pl[j]->dtype == instUnknown) + || (pl[i]->dtype != instUnknown && pl[j]->dtype != instUnknown)) && strcmp(pl[i]->name, pl[j]->name) > 0)) { icompath *tt = pl[i]; pl[i] = pl[j]; @@ -501,12 +524,91 @@ int icompaths_refresh_paths(icompaths *p) { return icompaths_refresh_paths_sel(p, icomt_instrument | icomt_portattr_all); } +static int create_fserexcl(icompaths *p) { + char *envv; + + p->exno = 0; + + /* Get the exclusion list */ + if ((envv = getenv("ARGYLL_EXCLUDE_SERIAL_SCAN")) != NULL) { + char *cp, *pcp; + + /* Count the number of strings */ + for (cp = envv;; cp++) { + if (*cp == ';' + || *cp == ',' + || *cp == '\000') + p->exno++; + if (*cp == '\000') + break; + } + + if ((p->exlist = (char **)calloc(p->exno, sizeof(char *))) == NULL) { + a1logd(p->log, 1, "create_fserexcl: calloc failed!\n"); + return 1; + } + + /* Copy strings to array */ + p->exno = 0; + for (pcp = cp = envv;; cp++) { + if (*cp == ';' + || *cp == ',' + || *cp == '\000') { + + if (cp - pcp > 0) { + if ((p->exlist[p->exno] = (char *)calloc(cp - pcp +1, sizeof(char))) == NULL) { + a1logd(p->log, 1, "create_fserexcl: calloc failed!\n"); + return 1; + } + memmove(p->exlist[p->exno], pcp, cp - pcp); + p->exlist[p->exno][cp - pcp] = '\000'; + p->exno++; + } + pcp = cp + 1; + } + if (*cp == '\000') + break; + } + +#ifdef NEVER + printf("Exclusion list len %d =\n",p->exno); + for (i = 0; i < p->exno; i++) + printf(" '%s'\n",p->exlist[i]); +#endif + } + return 0; +} + +/* Return nz if the given path is on the fast serial scan */ +/* exclusion list */ +static int icompaths_fs_excluded(icompaths *p, icompath *path) { + + a1logd(p->log, 5, "fs_excluded check '%s'\n",path->spath); + +#if defined(ENABLE_SERIAL) || defined(ENABLE_FAST_SERIAL) + if (p->exlist != NULL) { + int i; + + for (i = 0; i < p->exno; i++) { + if (strcmp(p->exlist[i], path->spath) == 0) { + a1logd(p->log, 5, "excluding '%s' from fast scan\n",path->spath); + return 1; + } + } + } +#endif + return 0; +} + /* Allocate an icom paths and set it to the list of available devices */ /* that match the icom_type mask. */ /* Return NULL on error */ icompaths *new_icompaths_sel(a1log *log, icom_type mask) { icompaths *p; - if ((p = (icompaths *)calloc(sizeof(icompaths), 1)) == NULL) { + + a1logd(log, 3, "new_icompath: called with mask 0x%x\n",mask); + + if ((p = (icompaths *)calloc(1, sizeof(icompaths))) == NULL) { a1loge(log, ICOM_SYS, "new_icompath: calloc failed!\n"); return NULL; } @@ -521,7 +623,9 @@ icompaths *new_icompaths_sel(a1log *log, icom_type mask) { p->del = icompaths_del; /* ====== internal implementation ======= */ + #if defined(ENABLE_SERIAL) || defined(ENABLE_FAST_SERIAL) + p->fs_excluded = icompaths_fs_excluded; p->add_serial = icompaths_add_serial; #endif /* ENABLE_SERIAL */ #ifdef ENABLE_USB @@ -532,6 +636,9 @@ icompaths *new_icompaths_sel(a1log *log, icom_type mask) { p->get_last_path = icompaths_get_last_path; /* ====================================== */ + /* Get list of fast scan exclusion devices */ + create_fserexcl(p); + if (icompaths_refresh_paths_sel(p, mask)) { a1loge(log, ICOM_SYS, "new_icompaths: icompaths_refresh_paths failed!\n"); free(p); @@ -581,7 +688,7 @@ static int icom_copy_path_to_icom(icoms *p, icompath *pp) { return rv; #endif p->dctype = pp->dctype; - p->itype = pp->itype; + p->dtype = pp->dtype; a1logd(g_log, 8, "icom_copy_path_to_icom '%s' returning dctype 0x%x\n",p->name,p->dctype); @@ -671,14 +778,20 @@ int frbw /* nz to Flush Read Before Write */ /* Return error if coms */ if (rv != ICOM_OK) { - a1logd(p->log, 8, "icoms_write_read: failed - returning 0x%x\n",rv); + if (rv & ICOM_TO) + a1logd(p->log, 8, "icoms_write_read: write T.O. %f sec. returning 0x%x\n",tout, rv); + else + a1logd(p->log, 8, "icoms_write_read: write failed - returning 0x%x\n",rv); return rv; } /* Read response */ rv = p->read(p, rbuf, bsize, bread, tc, ntc, tout); - a1logd(p->log, 8, "icoms_write_read: returning 0x%x\n",rv); + if (rv & ICOM_TO) + a1logd(p->log, 8, "icoms_write_read: read T.O. %f sec. returning 0x%x\n",tout, rv); + else + a1logd(p->log, 8, "icoms_write_read: read returning 0x%x\n",rv); return rv; } @@ -739,9 +852,9 @@ icoms *new_icoms( ) { icoms *p; - a1logd(log, 2, "new_icoms '%s' itype '%s' dctype 0x%x\n",ipath->name,inst_sname(ipath->itype),ipath->dctype); + a1logd(log, 2, "new_icoms '%s' itype '%s' dctype 0x%x\n",ipath->name,inst_sname(ipath->dtype),ipath->dctype); - if ((p = (icoms *)calloc(sizeof(icoms), 1)) == NULL) { + if ((p = (icoms *)calloc(1, sizeof(icoms))) == NULL) { a1loge(log, ICOM_SYS, "new_icoms: calloc failed!\n"); return NULL; } @@ -750,7 +863,7 @@ icoms *new_icoms( a1loge(log, ICOM_SYS, "new_icoms: strdup failed!\n"); return NULL; } - p->itype = ipath->itype; + p->dtype = ipath->dtype; /* Copy ipath info to this icoms */ if (icom_copy_path_to_icom(p, ipath)) { @@ -857,6 +970,8 @@ char *baud_rate_to_str(baud_rate br) { return "57600"; case baud_115200: return "115200"; + case baud_230400: + return "230400"; case baud_921600: return "921600"; } diff --git a/spectro/icoms.h b/spectro/icoms.h index be36cac..4e18b62 100644..100755 --- a/spectro/icoms.h +++ b/spectro/icoms.h @@ -55,11 +55,12 @@ typedef enum { /* Category of device */ icomt_instrument = 0x010000, /* Color measurement instrument (default) */ - icomt_3dlut = 0x020000, /* A 3D cLUT box */ - icomt_vtpg = 0x040000, /* A video test patern generator box */ + icomt_v3dlut = 0x020000, /* A Video 3D cLUT box */ + icomt_vtpg = 0x040000, /* A Video test patern generator box */ icomt_printer = 0x080000, /* A printing device */ + icomt_cmfm = 0x100000, /* A CMF Measuring device */ - icomt_cat_any = 0x0f0000, /* Could be any device category */ + icomt_cat_any = 0x1f0000, /* Could be any device category */ icomt_cat_mask = 0xff0000, /* Mask for device category */ /* Type of underlying communication port */ @@ -68,6 +69,7 @@ typedef enum { icomt_usb = 0x000002, /* USB port */ icomt_hid = 0x000004, /* HID USB port */ icomt_bt = 0x000008, /* Bluetooth (non-serial) */ +// icomt_net = 0x000010, /* Network Connected */ icomt_port_mask = 0x0000ff, /* Mask for port type */ @@ -83,7 +85,6 @@ typedef enum { icomt_portattr_all = icomt_portattr_mask /* Scan for all port types */ - } icom_type; /* Status bits/return values */ @@ -145,9 +146,9 @@ typedef struct { /* - - - - - - - - - - - - - - - - - - - - */ /* Store information about a possible instrument communication path */ -/* (Note a path doesn't have a reference to icompaths or its' log) */ +/* (Note a path doesn't have a reference to icompaths or its log) */ struct _icompath { - devType itype; /* Type of device if known */ + devType dtype; /* Type of device if known */ char *name; /* instance description */ icom_type dctype; /* Device and com. type */ @@ -171,6 +172,7 @@ typedef enum { dtix_3dlut, dtix_vtpg, dtix_printer, + dtix_cmfm, dtix_number /* Number of entries */ } icom_dtix; @@ -209,7 +211,7 @@ struct _icompaths { /* Return the device path corresponding to the port number, or NULL if out of range */ icompath *(*get_path_sel)( struct _icompaths *p, - icom_type dctype, /* Device type list */ + icom_dtix dtix, /* Device type list */ int port); /* Enumerated port number, 1..n */ /* Clear all the device paths */ @@ -220,7 +222,14 @@ struct _icompaths { /* ====== internal implementation ======= */ + /* Fast serial scan exclusion list - from ARGYLL_EXCLUDE_SERIAL_SCAN env. var. */ + int exno; + char **exlist; + #if defined(ENABLE_SERIAL) || defined(ENABLE_FAST_SERIAL) + /* Return nz if the serial port is on the fast serial scan exclusion list */ + int (*fs_excluded)(struct _icompaths *p, struct _icompath *path); + /* Add a serial path to combined. path is copied. Return icom error */ int (*add_serial)(struct _icompaths *p, char *name, char *spath, icom_type dctype); #endif /* ENABLE_SERIAL */ @@ -228,11 +237,11 @@ struct _icompaths { #ifdef ENABLE_USB /* Add a usb path to combined. usbd is taken, others are copied. Return icom error */ int (*add_usb)(struct _icompaths *p, char *name, unsigned int vid, unsigned int pid, - int nep, struct usb_idevice *usbd, devType itype); + int nep, struct usb_idevice *usbd, devType dtype); /* Add an hid path to combined. hidd is taken, others are copied. Return icom error */ int (*add_hid)(struct _icompaths *p, char *name, unsigned int vid, unsigned int pid, - int nep, struct hid_idevice *hidd, devType itype); + int nep, struct hid_idevice *hidd, devType dtype); #endif /* ENABLE_USB */ /* Delete the last combined path */ @@ -279,7 +288,8 @@ typedef enum { baud_38400 = 10, baud_57600 = 11, baud_115200 = 12, - baud_921600 = 13 + baud_230400 = 13, + baud_921600 = 14 } baud_rate; char *baud_rate_to_str(baud_rate br); @@ -327,7 +337,7 @@ struct _icoms { /* Copy of some of icompath contents: */ icom_type dctype; /* Device cat. and com. type */ - devType itype; /* Type of device if known */ + devType dtype; /* Type of device if known */ char *name; /* Device description */ diff --git a/spectro/icoms_nt.c b/spectro/icoms_nt.c index b9e0d0c..39ff6f0 100644..100755 --- a/spectro/icoms_nt.c +++ b/spectro/icoms_nt.c @@ -18,7 +18,7 @@ #include <conio.h> -instType fast_ser_inst_type(icoms *p, int tryhard, void *, void *); +devType fast_ser_dev_type(icoms *p, int tryhard, void *, void *); /* Add paths to serial connected device. */ /* Return an icom error */ @@ -128,12 +128,14 @@ int serial_get_paths(icompaths *p, icom_type mask) { icoms *icom; if ((path = p->get_last_path(p)) != NULL && (icom = new_icoms(path, p->log)) != NULL) { - devType itype = fast_ser_inst_type(icom, 0, NULL, NULL); - if (itype != instUnknown) - icompaths_set_serial_itype(path, itype); /* And set category */ + if (!p->fs_excluded(p, path)) { + devType itype = fast_ser_dev_type(icom, 0, NULL, NULL); + if (itype != instUnknown) + icompaths_set_serial_itype(path, itype); /* And set category */ + } icom->del(icom); } - a1logd(p->log, 8, "serial_get_paths: Identified '%s' dctype 0x%x\n",inst_sname(path->itype),path->dctype); + a1logd(p->log, 8, "serial_get_paths: Identified '%s' dctype 0x%x\n",inst_sname(path->dtype),path->dctype); } } if ((stat = RegCloseKey(sch)) != ERROR_SUCCESS) { @@ -163,6 +165,15 @@ void serial_close_port(icoms *p) { /* -------------------------------------------------------------------- */ +#ifndef CBR_230400 +# define CBR_230400 230400 +#endif +#ifndef CBR_460800 +# define CBR_460800 460800 +#endif +#ifndef CBR_512000 +# define CBR_512000 512000 +#endif #ifndef CBR_921600 # define CBR_921600 921600 #endif @@ -190,10 +201,12 @@ int delayms) { /* Delay after open in msec */ " Open delay = %d ms\n" ,p->name ,fc ,baud_rate_to_str(baud) ,parity ,stop ,word, delayms); +#ifdef NEVER /* Is this needed ? */ if (p->is_open) { a1logd(p->log, 8, "icoms_set_ser_port: closing port '%s'\n",p->name); p->close_port(p); } +#endif if (p->port_type(p) == icomt_serial) { DCB dcb; @@ -386,6 +399,9 @@ int delayms) { /* Delay after open in msec */ case baud_115200: dcb.BaudRate = CBR_115200; break; + case baud_230400: + dcb.BaudRate = CBR_230400; + break; case baud_921600: dcb.BaudRate = CBR_921600; break; diff --git a/spectro/icoms_ux.c b/spectro/icoms_ux.c index 9e79d7f..2ee19bd 100644..100755 --- a/spectro/icoms_ux.c +++ b/spectro/icoms_ux.c @@ -1,5 +1,6 @@ /* Unix icoms and serial I/O class */ +/* This is #includeed in icom.c */ /* * Argyll Color Correction System @@ -49,7 +50,7 @@ #endif /* UNIX_APPLE */ -instType fast_ser_inst_type(icoms *p, int tryhard, void *, void *); +devType fast_ser_dev_type(icoms *p, int tryhard, void *, void *); /* Add paths to serial connected device. */ /* Return an icom error */ @@ -142,12 +143,14 @@ int serial_get_paths(icompaths *p, icom_type mask) { icoms *icom; if ((path = p->get_last_path(p)) != NULL && (icom = new_icoms(path, p->log)) != NULL) { - instType itype = fast_ser_inst_type(icom, 0, NULL, NULL); - if (itype != instUnknown) - icompaths_set_serial_itype(path, itype); /* And set category */ + if (!p->fs_excluded(p, path)) { + instType itype = fast_ser_dev_type(icom, 0, NULL, NULL); + if (itype != instUnknown) + icompaths_set_serial_itype(path, itype); /* And set category */ + } icom->del(icom); } - a1logd(p->log, 8, "serial_get_paths: Identified '%s' dctype 0x%x\n",inst_sname(path->itype),path->dctype); + a1logd(p->log, 8, "serial_get_paths: Identified '%s' dctype 0x%x\n",inst_sname(path->dtype),path->dctype); } continue2: CFRelease(dfp); @@ -258,7 +261,7 @@ int serial_get_paths(icompaths *p, icom_type mask) { strcpy(dpath, dirn); strcat(dpath, de->d_name); - /* See if the serial port is real */ + /* See if the (not fast) serial port is real */ if (strncmp(de->d_name, "ttyUSB", 6) != 0 && strncmp(de->d_name, "ttyHS", 5) != 0 && strncmp(de->d_name, "rfcomm", 6) != 0) { @@ -320,12 +323,14 @@ int serial_get_paths(icompaths *p, icom_type mask) { icoms *icom; if ((path = p->get_last_path(p)) != NULL && (icom = new_icoms(path, p->log)) != NULL) { - instType itype = fast_ser_inst_type(icom, 0, NULL, NULL); - if (itype != instUnknown) - icompaths_set_serial_itype(path, itype); /* And set category */ + if (!p->fs_excluded(p, path)) { + instType itype = fast_ser_dev_type(icom, 0, NULL, NULL); + if (itype != instUnknown) + icompaths_set_serial_itype(path, itype); /* And set category */ + } icom->del(icom); } - a1logd(p->log, 8, "serial_get_paths: Identified '%s' dctype 0x%x\n",inst_sname(path->itype),path->dctype); + a1logd(p->log, 8, "serial_get_paths: Identified '%s' dctype 0x%x\n",inst_sname(path->dtype),path->dctype); } } closedir(dd); @@ -361,6 +366,15 @@ void serial_close_port(icoms *p) { #endif #if defined(UNIX_APPLE) || defined(__OpenBSD__) +# ifndef B230400 +# define B230400 230400 +# endif +# ifndef B460800 +# define B460800 460800 +# endif +# ifndef B512000 +# define B512000 512000 +# endif # ifndef B921600 # define B921600 921600 # endif @@ -393,10 +407,12 @@ int delayms) { /* Delay after open in msec */ ,p->name ,fc ,baud_rate_to_str(baud) ,parity ,stop ,word, delayms); +#ifdef NEVER /* This is too slow on OS X */ if (p->is_open) { /* Close it and re-open it */ a1logd(p->log, 8, "icoms_set_ser_port: closing port\n"); p->close_port(p); } +#endif if (p->port_type(p) == icomt_serial) { @@ -418,13 +434,27 @@ int delayms) { /* Delay after open in msec */ a1logd(p->log, 8, "icoms_set_ser_port: about to open serial port '%s'\n",p->spath); + /* Hmm. Recent OS X to FTDI can take 1500 msec to open. Why ? */ + /* O_NONBLOCK O_SYNC */ if ((p->fd = open(p->spath, O_RDWR | O_NOCTTY )) < 0) { - a1logd(p->log, 1, "icoms_set_ser_port: open port '%s' r/w failed with %d (%s)\n",p->spath,p->fd,strerror(errno)); + a1logd(p->log, 1, "icoms_set_ser_port: open port '%s' r/w failed with %d (%s)\n", + p->spath,p->fd,strerror(errno)); + return ICOM_SYS; + } if (delayms < 160) /* Seems to need at least 80 msec for many drivers */ delayms = 160; - msec_sleep(delayms); /* For Bluetooth */ + msec_sleep(delayms); /* For Bluetooth and other drivers */ + +#ifdef NEVER + /* If we used O_NONBLOCK */ + if (fcntl(p->fd, F_SETFL, 0) == -1) { + a1logd(p->log, 1, "icoms_set_ser_port: clearing O_NONBLOCK failed with %d (%s)\n", + p->spath,p->fd,strerror(errno)); + return ICOM_SYS; + } +#endif #ifdef NEVER /* See what supplementary groups we are a member of */ { @@ -460,11 +490,6 @@ int delayms) { /* Delay after open in msec */ fail:; } #endif - return ICOM_SYS; - } - - /* O_NONBLOCK O_SYNC */ - p->is_open = 1; } @@ -622,6 +647,9 @@ int delayms) { /* Delay after open in msec */ case baud_115200: speed = B115200; break; + case baud_230400: + speed = B230400; + break; case baud_921600: speed = B921600; break; diff --git a/spectro/ifiles b/spectro/ifiles index 706d0b7..706d0b7 100644..100755 --- a/spectro/ifiles +++ b/spectro/ifiles diff --git a/spectro/illumread.c b/spectro/illumread.c index 58569e3..28ecbca 100644..100755 --- a/spectro/illumread.c +++ b/spectro/illumread.c @@ -253,8 +253,8 @@ usage(char *diag, ...) { for (i = 0; ; i++) { if (paths[i] == NULL) break; - if ((paths[i]->itype == instSpyder1 && setup_spyd2(0) == 0) - || (paths[i]->itype == instSpyder2 && setup_spyd2(1) == 0)) + if ((paths[i]->dtype == instSpyder1 && setup_spyd2(0) == 0) + || (paths[i]->dtype == instSpyder2 && setup_spyd2(1) == 0)) fprintf(stderr," %d = '%s' !! Disabled - no firmware !!\n",i+1,paths[i]->name); else fprintf(stderr," %d = '%s'\n",i+1,paths[i]->name); @@ -999,8 +999,8 @@ int main(int argc, char *argv[]) for (i = 0; ; i++) { if (paths[i] == NULL) break; - if ((paths[i]->itype == instSpyder1 && setup_spyd2(0) == 0) - || (paths[i]->itype == instSpyder2 && setup_spyd2(1) == 0)) + if ((paths[i]->dtype == instSpyder1 && setup_spyd2(0) == 0) + || (paths[i]->dtype == instSpyder2 && setup_spyd2(1) == 0)) fprintf(stderr," %d = '%s' !! Disabled - no firmware !!\n",i+1,paths[i]->name); else fprintf(stderr," %d = '%s'\n",i+1,paths[i]->name); diff --git a/spectro/inflate.c b/spectro/inflate.c index 55d8e65..55d8e65 100644..100755 --- a/spectro/inflate.c +++ b/spectro/inflate.c diff --git a/spectro/inst.c b/spectro/inst.c index 681ef0a..07ace6e 100644..100755 --- a/spectro/inst.c +++ b/spectro/inst.c @@ -45,6 +45,8 @@ #include "sa_config.h" #endif /* !SALONEINSTLIB */ #include "numsup.h" +#include "rand.h" +#include "cgats.h" #include "xspect.h" #include "conv.h" @@ -58,7 +60,7 @@ #include "sort.h" #if defined(ENABLE_FAST_SERIAL) -instType fast_ser_inst_type(icoms *p, int tryhard, +devType fast_ser_dev_type(icoms *p, int tryhard, inst_code (*uicallback)(void *cntx, inst_ui_purp purp), void *cntx); # if defined(ENABLE_SERIAL) static instType ser_inst_type(icoms *p, @@ -66,6 +68,8 @@ static instType ser_inst_type(icoms *p, # endif /* ENABLE_SERIAL */ #endif /* ENABLE_FAST_SERIAL */ +icom_type dev_category(instType itype); + /* ------------------------------------ */ /* Default methods for instrument class */ @@ -89,7 +93,7 @@ inst *p) { /* Return the instrument type */ static instType get_itype(inst *p) { if (p != NULL) - return p->itype; + return p->dtype; return instUnknown; } @@ -523,6 +527,8 @@ static char *inst_interp_error(inst *p, inst_code ec) { return "Internal error - communications needed but not established"; case inst_no_init: return "Internal error - initialisation needed but not done"; + case inst_unsupported: + return "Unsupported function"; case inst_internal_error: return "Internal software error"; case inst_coms_fail: @@ -545,8 +551,6 @@ static char *inst_interp_error(inst *p, inst_code ec) { return "Instrument needs calibration"; case inst_cal_setup: return "Instrument needs to be setup for calibration"; - case inst_unsupported: - return "Unsupported function"; case inst_unexpected_reply: return "Unexpected Reply"; case inst_wrong_config: @@ -613,7 +617,7 @@ void *cntx /* Context for callback */ return NULL; } - a1logd(log, 2, "new_inst: called with path '%s' type '%s'\n",path->name,inst_sname(path->itype)); + a1logd(log, 2, "new_inst: called with path '%s' type '%s'\n",path->name,inst_sname(path->dtype)); if ((icom = new_icoms(path, log)) == NULL) { a1logd(log, 2, "new_inst: new_icoms failed to open it\n"); @@ -623,12 +627,12 @@ void *cntx /* Context for callback */ /* Set instrument type from USB port, if not specified */ - itype = icom->itype; /* Instrument type if its known from usb/hid */ + itype = icom->dtype; /* Instrument type if its known from usb/hid */ #if defined(ENABLE_FAST_SERIAL) if (itype == instUnknown && !nocoms && (icom->dctype & icomt_fastserial)) { - itype = fast_ser_inst_type(icom, 1, uicallback, cntx); /* Else type from serial */ - icom->dctype = (icom->dctype & ~icomt_cat_mask) | inst_category(itype); + itype = fast_ser_dev_type(icom, 1, uicallback, cntx); /* Else type from serial */ + icom->dctype = (icom->dctype & ~icomt_cat_mask) | dev_category(itype); a1logd(log, 8, "new_inst: fast set '%s' dctype 0x%x\n",icom->name,icom->dctype); } #endif /* ENABLE_FAST_SERIAL */ @@ -636,7 +640,7 @@ void *cntx /* Context for callback */ #if defined(ENABLE_SERIAL) if (itype == instUnknown && !nocoms) { itype = ser_inst_type(icom, uicallback, cntx); /* Else type from serial */ - icom->dctype = (icom->dctype & ~icomt_cat_mask) | inst_category(itype); + icom->dctype = (icom->dctype & ~icomt_cat_mask) | dev_category(itype); a1logd(log, 8, "new_inst: set '%s' dctype 0x%x\n",icom->name,icom->dctype); } #endif /* ENABLE_SERIAL */ @@ -957,7 +961,7 @@ int doccmx /* Add matching installed ccmx files */ iccmx *ss_list; /* Just ccmx's for this instrument */ - if ((ss_list = list_iccmx(p->itype, NULL)) == NULL) { + if ((ss_list = list_iccmx(p->dtype, NULL)) == NULL) { free(list); return inst_internal_error; } @@ -1111,7 +1115,7 @@ iccmx *list_iccmx(instType itype, int *no) { int npaths = 0; - npaths = xdg_bds(NULL, &paths, xdg_data, xdg_read, xdg_user, + npaths = xdg_bds(NULL, &paths, xdg_data, xdg_read, xdg_user, xdg_none, "ArgyllCMS/\052.ccmx" XDG_FUDGE "color/\052.ccmx" ); @@ -1251,7 +1255,7 @@ iccss *list_iccss(int *no) { int npaths = 0; - npaths = xdg_bds(NULL, &paths, xdg_data, xdg_read, xdg_user, + npaths = xdg_bds(NULL, &paths, xdg_data, xdg_read, xdg_user, xdg_none, "ArgyllCMS/\052.ccss" XDG_FUDGE "color/\052.ccss" ); @@ -1375,15 +1379,18 @@ void free_iccss(iccss *list) { /* Detect fast serial instruments */ #ifdef ENABLE_FAST_SERIAL + +static void radiance_delimiters(icoms *p, int lgchsum); +static void radiance_random(icoms *p, int lgchsum); static void hex2bin(char *buf, int len); /* Heuristicly determine the instrument type for */ /* a fast serial connection, and instUnknown if not serial. */ /* Set it in icoms and also return it. */ -instType fast_ser_inst_type( +devType fast_ser_dev_type( icoms *p, int tryhard, - inst_code (*uicallback)(void *cntx, inst_ui_purp purp), /* optional uicallback */ + inst_code (*uicallback)(void *cntx, inst_ui_purp purp), /* optional uicallback for abort */ void *cntx /* Context for callback */ ) { instType rv = instUnknown; @@ -1400,16 +1407,20 @@ instType fast_ser_inst_type( int se, len; double tryto = 0.1; /* [0.1] Communication timout */ // double tryto = 0.9; /* Communication timout (test) */ - - a1logd(p->log, 8, "fast_ser_inst_type: on '%s' dctype 0x%x\n",p->name,p->dctype); + + a1logd(p->log, 8, "fast_ser_dev_type: on '%s' dctype 0x%x\n",p->name,p->dctype); if (!(p->dctype & icomt_seriallike) && !(p->dctype & icomt_fastserial)) { - return p->itype; + return p->dtype; } /* The tick to give up on */ +#if defined(__APPLE__) + etime = msec_time() + (long)(2500.0 + 0.5); /* OS X open() is really slow (1500msec) */ +#else etime = msec_time() + (long)(2000.0 + 0.5); +#endif // etime = msec_time() + (long)(20000.0 + 0.5); /* (test) */ a1logd(p->log, 1, "fser_inst_type: Trying different baud rates (%u msec to go) Path %s%s\n", @@ -1427,7 +1438,7 @@ instType fast_ser_inst_type( if (!tryhard) break; /* try only once */ } - a1logd(p->log, 5, "Trying %s baud\n",baud_rate_to_str(brt[i])); + a1logd(p->log, 5, "Trying %s baud, %d msec to go\n",baud_rate_to_str(brt[i]),etime - msec_time()); if ((se = p->set_ser_port_ex(p, fc_None, brt[i], parity_none, stop_1, length_8, delayms)) != ICOM_OK) { @@ -1437,76 +1448,148 @@ instType fast_ser_inst_type( /* Assume Klein K10 only uses 9600. */ /* We need to also assume that we might be talking to a Spectrolino, */ - /* and avoid upsetting it. */ + /* and avoid upsetting it, or some other serial instrument that */ + /* is set to 9600 baud. */ if ((p->dctype & icomt_btserial) == 0 && brt[i] == baud_9600) { double sto = 0.2; /* Give 9600 a little more time */ int bread, len; + int lgchsum = 0; /* Try a spectrolino/spectroscan command first */ if (tryto > sto) sto = tryto; - p->write_read_ex(p, ";D024\r\n", 0, buf, BUFSZ-1, &bread, "\r", 1, sto, 1); + + /* Do first character only and see if there is an echo */ + p->write_read_ex(p, ";", 1, buf, BUFSZ-1, &bread, "\r", 1, 0.2, 1); + if (bread == 1 && buf[0] == ';') +#ifdef ENABLE_VTPGLUT + goto check_lumagen; +#else + goto continue_looking; +#endif + + /* Send the rest of the spectrolino command */ + p->write_read_ex(p, "D024\r\n", 0, buf, BUFSZ-1, &bread, "\r", 1, 0.2, 1); if (bread == 0) { - a1logd(p->log, 5, "fser_inst_type: Spectroino command returned nothing\n"); - goto not_k10; + char *bp; + a1logd(p->log, 5, "fser_inst_type: Spectrolino command returned nothing\n"); + +#ifdef ENABLE_VTPGLUT + /* It could be a Lumagen Radiance with echo off, */ + /* so poke it and see if it responds. */ + /* (Unfortunately the Lumagen delimeters modes aren't */ + /* backwards compatible, so we may have to poke it twice...) */ + /* Send "X" first, to get it out of menu mode ? */ + p->write_read_ex(p, "X", 1, buf, BUFSZ, NULL, "\n", 1, 0.1, 1); // Menu off + a1logd(p->log, 5, "fser_inst_type: Checking for Lumagen Radiance\n"); + p->write_read_ex(p, "#ZQS00\r", 0, buf, BUFSZ, &bread, "\n", 1, sto, 1); + if (bread == 0) { + p->write_read_ex(p, "#0ZQS008E\r", 0, buf, BUFSZ, &bread, "\n", 1, sto, 1); + lgchsum = 1; + } + + if (bread > 0 + && (bp = strrchr(buf, '!')) != NULL + && strlen(bp) >= 4 + && strncmp(bp,"!S00",4) == 0) { + goto check_lumagen; + } +#endif /* ENABLE_VTPGLUT */ + + /* Nope - look for something at a different baud rate */ + goto continue_looking; } + buf[bread] = '\000'; len = strlen(buf); a1logd(p->log, 5, "fser_inst_type: got %d bytes\n",len); - if (len < 4) { - a1logd(p->log, 5, "fser_inst_type: Reply was too short\n"); - goto not_k10; /* Not K10, X-Rite or Spectrolino */ - } - /* Is this a Spectrolino or Spectroscan error resonse ? */ - if (len >= 5 && strncmp(buf, ":26", 3) == 0 - || len >= 7 && strncmp(buf, ":D183", 5) == 0) { + if ((len >= 5 && strncmp(buf, ":26", 3) == 0) + || (len >= 7 && strncmp(buf, ":D183", 5) == 0)) { a1logd(p->log, 5, "fser_inst_type: Ignore Spectrolino\n"); return instUnknown; /* Not doing Spectrolino detection here */ } /* Is this an X-Rite error value such as "<01>" ? */ - if (buf[0] == '<' && isdigit(buf[1]) && isdigit(buf[2]) && buf[3] == '>') { + if ((buf[0] == '<' && isdigit(buf[1]) && isdigit(buf[2]) && buf[3] == '>') + || (isdigit(buf[0]) && isdigit(buf[1]) && buf[2] == '>')) { a1logd(p->log, 5, "fser_inst_type: Ignore X-Rite\n"); return instUnknown; /* Not doing X-Rite detection here */ } /* The Klein K10 seems to respond with it's calibration list, preceeded by "D4" ? */ - if (buf[0] != 'D' || buf[1] != '4') { - a1logd(p->log, 5, "fser_inst_type: Not Klein response\n"); - goto not_k10;; + if (buf[0] == 'D' && buf[1] == '4') { + a1logd(p->log, 5, "fser_inst_type: Looks like it may be a Klein\n"); + + /* Confirm this is a Klein instrument */ + + /* The first response is the calibration list, and it may need flushing. */ + /* (write_read_ex doesn't cope with time it takes to dump this.) */ + for (;;) { + bread = 0; + p->read(p, buf, BUFSZ, &bread, NULL, BUFSZ, 0.1); + if (bread == 0) + break; + } + + if ((se = p->write_read_ex(p, "P0\r", 0, buf, BUFSZ, NULL, ">", 1, tryto, 1)) == inst_ok) { + + /* Is this a Klein K1/K8/K10 response ? */ + if (strncmp(buf, "P0K-1 ", 6) == 0 + || strncmp(buf, "P0K-8 ", 6) == 0 + || strncmp(buf, "P0K-10", 6) == 0 + || strncmp(buf, "P0KV-10", 7) == 0) { + a1logd(p->log, 5, "fser_inst_type: found Klein K1/K8/K10\n"); + rv = instKleinK10; + break; + } + } } - a1logd(p->log, 5, "fser_inst_type: Looks like it may be a Klein\n"); +#ifdef ENABLE_VTPGLUT + /* Is this a Lumagen Radiance with echo on, it responds with ";D024..." */ + if ((len >= 4 && strncmp(buf, ";D024", 4) == 0) + || (len >= 4 && strncmp(buf, "!N\n\r", 4) == 0)) { + char *bp; - /* Confirm this is a Klein instrument */ + check_lumagen:; - /* The first response is the calibration list, and it may need flushing. */ - /* (write_read_ex doesn't cope with time it takes to dump this.) */ - for (;;) { - bread = 0; - p->read(p, buf, BUFSZ, &bread, NULL, BUFSZ, 0.1); - if (bread == 0) - break; - } + /* Send "X" first, to get it out of menu mode ? */ + p->write_read_ex(p, "X", 1, buf, BUFSZ, NULL, "\n", 1, 0.1, 1); // Menu off - if ((se = p->write_read_ex(p, "P0\r", 0, buf, BUFSZ, NULL, ">", 1, tryto, 1)) == inst_ok) { + /* Get the Lumagen device information */ + p->write_read_ex(p, lgchsum ? "#0ZQS018F\r" : "#ZQS01\r", + 0, buf, BUFSZ, &bread, "\n", 1, sto, 1); - /* Is this a Klein K1/K8/K10 response ? */ - if (strncmp(buf, "P0K-1 ", 6) == 0 - || strncmp(buf, "P0K-8 ", 6) == 0 - || strncmp(buf, "P0K-10", 6) == 0 - || strncmp(buf, "P0KV-10", 7) == 0) { - a1logd(p->log, 5, "fser_inst_type: found Klein K1/K8/K10\n"); - rv = instKleinK10; - break; + /* Might have echo with checksum, so lgchsum not set correctly */ + if (!lgchsum && bread > 0 && strstr(buf, "!N") != NULL) { + p->write_read_ex(p, "#0ZQS018F\r", 0, buf, BUFSZ, &bread, "\n", 1, sto, 1); + if (bread >= 11 && strncmp(buf, "#0ZQS018F!Y", 11) == 0) + lgchsum = 1; + } + + /* returns something like "ZQS01!S01,Radiance2020,030115,1016,001309\r\m" */ + if ((bp = strrchr(buf, '!')) != NULL && strlen(bp) >= 13) { + if (strncmp(bp,"!S01,Radiance",13) == 0) { + a1logd(p->log, 5, "fser_inst_type: Found Lumagen Radiance\n"); + +#ifdef NEVER /* Test various Lumagen com. settings */ + radiance_random(p, lgchsum); +// radiance_delimiters(p, lgchsum); +#endif + radiance_delimiters(p, lgchsum); + return devRadiance; + } } + a1logd(p->log, 5, "fser_inst_type: Not Lumagen Radiance\n"); + return instUnknown; } +#endif /* ENABLE_VTPGLUT */ - not_k10:; + continue_looking:; /* Check for user abort */ if (uicallback != NULL) { @@ -1516,7 +1599,7 @@ instType fast_ser_inst_type( return instUnknown; } } - } + } /* 9600 baud */ /* SwatchMate Cube only uses 38400 */ if ((p->dctype & icomt_btserial) == 0 && brt[i] == baud_38400) { @@ -1549,7 +1632,7 @@ instType fast_ser_inst_type( } /* JETI specbos or spectraval. */ - /* We are fudging the baud rate selection here - */ + /* We are not allowing for all possible baud rate selections here - */ /* the 1211 RS and BT can't handle 921600, */ /* while the 15x1 can handle 230400 & 3000000, which we don't test for... */ // if ((p->dctype & icomt_btserial) == 0 || brt[i] == baud_115200) @@ -1610,16 +1693,116 @@ instType fast_ser_inst_type( if (rv == instUnknown && msec_time() >= etime) { /* We haven't established comms */ a1logd(p->log, 5, "fser_inst_type: Failed to establish coms\n"); - p->itype = rv; + p->dtype = rv; return instUnknown; } a1logd(p->log, 5, "fser_inst_type: Instrument type is '%s'\n", inst_name(rv)); - p->itype = rv; + p->dtype = rv; return rv; } + +#ifdef ENABLE_VTPGLUT + + +/* + Lumagen uses following sequence to setup coms: + + Sent Recieved Comments + ---- -------- -------- + M0931 M0931 use %M0931 to ensure it's on + f Ok if on, else echo's 'f' + B009600 then close & re-open port at 9600 baud. +20x e 20x Ok Some sort of exit menu command ? + e Ok + I 030115.14.051d...... + g Ok5b28 + L000100NQ ..... + lots more + + These sequences seem to not honour the Delimeters etc., but + work all the time ?? + + Needs 'X' to exit M0931 to respond to normal "Z" sequences. + +*/ + +/* Switch Lumagen Radiance to Echo + Delimiters mode */ +static void radiance_delimiters(icoms *p, int lgchsum) { + time_t clk = time(0); + char *com, *chcom; + char buf[BUFSZ]; + + // Echo On + p->write_read_ex(p, lgchsum ? "#0ZE100\r" : "#ZE1\r", + 0, buf, BUFSZ, NULL, "\n", 1, 0.1, 1); + +#ifndef NEVER + // Delimeters off + com = "#ZD0\r"; + chcom = "#0ZD0FE\r"; +#else + // Delimiters on + com = "#ZD1\r"; + chcom = "#0ZD1FF\r"; +#endif + + p->write_read_ex(p, lgchsum ? chcom : com, 0, buf, BUFSZ, NULL, "\n", 1, 0.1, 1); + +#ifdef NEVER + // ~~~999 see if delimiters works +// p->write_read_ex(p, "%", 1, buf, BUFSZ, NULL, "\n", 1, 0.2, 1); // Doesn't work ! +// msec_sleep(1000); + p->write_read_ex(p, "M0931", 5, buf, BUFSZ, NULL, "\n", 1, 0.2, 1); + p->write_read_ex(p, "f", 1, buf, BUFSZ, NULL, "\n", 1, 0.2, 1); + p->write_read_ex(p, "X", 1, buf, BUFSZ, NULL, "\n", 1, 0.2, 1); // Menu off +// p->write_read_ex(p, "eeeeeeeeeeeeeeeeeeee", 20, buf, BUFSZ, NULL, "\n", 1, 0.2, 1); +#endif +} + +/* Test code for Lumagen com. settings; */ +/* - set a random echo and delimeters. */ +static void radiance_random(icoms *p, int lgchsum) { + time_t clk = time(0); + int ech, del; + char *com, *chcom; + char buf[BUFSZ]; + + rand32(clk); + + del = i_rand(0, 3); + ech = i_rand(0, 1); + + fprintf(stderr, "echo %d, del %d\n",ech, del); + // Random Echo: + if (ech == 1) { + p->write_read_ex(p, lgchsum ? "#0ZE100\r" : "#ZE1\r", + 0, buf, BUFSZ, NULL, "\n", 1, 0.1, 1); + } else { + p->write_read_ex(p, lgchsum ? "#0ZE0FF\r" : "#ZE0\r", + 0, buf, BUFSZ, NULL, "\n", 1, 0.1, 1); + } + + // Random Delimeters: + if (del == 0) { + com = "#ZD0\r"; + chcom = "#0ZD0FE\r"; + } else if (del == 1) { + com = "#ZD1\r"; + chcom = "#0ZD1FF\r"; + } else if (del == 2) { + com = "#ZD2\r"; + chcom = "#0ZD200\r"; + } else { + com = "#ZD3\r"; + chcom = "#0ZD301\r"; + } + p->write_read_ex(p, lgchsum ? chcom : com, 0, buf, BUFSZ, NULL, "\n", 1, 0.1, 1); +} +#endif /* ENABLE_VTPGLUT */ + #undef BUFSZ #endif /* ENABLE_FAST_SERIAL */ @@ -1654,7 +1837,7 @@ static instType ser_inst_type( #ifdef ENABLE_USB if (p->usbd != NULL || p->hidd != NULL) - return p->itype; + return p->dtype; #endif /* ENABLE_USB */ bi = 0; @@ -1677,38 +1860,35 @@ static instType ser_inst_type( a1logd(p->log, 5, "Trying %s baud\n",baud_rate_to_str(brt[i])); bread = 0; - /* Try a spectrolino/spectroscan command first */ - p->write_read_ex(p, ";D024\r\n", 0, buf, BUFSZ-1, &bread, "\r", 1, 0.5, 1); + /* Try a spectrolino/spectroscan command first, */ + /* but do first character only and see if there is an echo */ + p->write_read_ex(p, ";", 1, buf, BUFSZ-1, &bread, "\r", 1, 0.2, 1); + if (bread == 1 && buf[0] == ';') + goto continue_looking; /* It may be a Lumagen, so skip it. */ + + /* Send the rest of the spectrolino command */ + p->write_read_ex(p, "D024\r\n", 0, buf, BUFSZ-1, &bread, "\r", 1, 0.5, 1); if (bread == 0) { - /* Check for user abort */ - if (uicallback != NULL) { - inst_code ev; - if ((ev = uicallback(cntx, inst_negcoms)) == inst_user_abort) { - a1logd(p->log, 5, "ser_inst_type: User aborted\n"); - return instUnknown; - } - } - continue; + goto continue_looking; } buf[bread] = '\000'; len = strlen(buf); // a1logd(p->log, 5, "len = %d\n",len); - if (len < 4) - continue; /* The Klein K10 seems to respond with it's calibration list, preceeded by "D4" ? */ /* - don't know how reliable this is though. Another way may be to look for a */ /* response len > 100 characters ?? */ - if (buf[0] == 'D' && buf[1] == '4') { + if (len >= 3 && buf[0] == 'D' && buf[1] == '4') { // a1logd(p->log, 5, "klein\n"); klein = 1; break; } /* Is this an X-Rite error value such as "<01>" ? */ - if (buf[0] == '<' && isdigit(buf[1]) && isdigit(buf[2]) && buf[3] == '>') { + if ((len >= 4 && buf[0] == '<' && isdigit(buf[1]) && isdigit(buf[2]) && buf[3] == '>') + || (len >= 3 && isdigit(buf[0]) && isdigit(buf[1]) && buf[2] == '>')) { // a1logd(p->log, 5, "xrite\n"); xrite = 1; break; @@ -1726,9 +1906,24 @@ static instType ser_inst_type( ss = 1; break; } + + continue_looking:; + + /* Check for user abort */ + if (uicallback != NULL) { + inst_code ev; + if ((ev = uicallback(cntx, inst_negcoms)) == inst_user_abort) { + a1logd(p->log, 5, "ser_inst_type: User aborted\n"); + return instUnknown; + } + } } if (rv == instUnknown + && klein == 0 + && xrite == 0 + && ss == 0 + && so == 0 && msec_time() >= etime) { /* We haven't established comms */ a1logd(p->log, 5, "ser_inst_type: Failed to establish coms\n"); return instUnknown; @@ -1806,7 +2001,7 @@ static instType ser_inst_type( p->close_port(p); /* Or should we leave it open ?? */ - p->itype = rv; + p->dtype = rv; return rv; } @@ -1921,28 +2116,6 @@ int sym_to_inst_mode(inst_mode *mode, const char *sym) { return rv; } -/* ============================================================= */ -/* Utilities */ - -/* Return a string for the xcalstd enum */ -char *xcalstd2str(xcalstd std) { - switch(std) { - case xcalstd_native: - return "NATIVE"; - case xcalstd_xrdi: - return "XRDI"; - case xcalstd_gmdi: - return "GMDI"; - case xcalstd_xrga: - return "XRGA"; - default: - break; - } - return "None"; -} - - - diff --git a/spectro/inst.h b/spectro/inst.h index 01f579d..04e02d6 100644..100755 --- a/spectro/inst.h +++ b/spectro/inst.h @@ -43,6 +43,7 @@ and agreed to support. */ +#include "dev.h" /* Base device class */ #include "insttypes.h" /* libinst Includes this functionality */ #include "disptechs.h" /* libinst Includes this functionality */ #include "icoms.h" /* libinst Includes this functionality */ @@ -101,20 +102,6 @@ struct _ipatch { }; typedef struct _ipatch ipatch; -/* ------------------------------------------------------ */ -/* Gretag/X-Rite specific reflective measurement standard */ - -typedef enum { - xcalstd_none = -2, /* Not set */ - xcalstd_native = -1, /* No conversion */ - xcalstd_xrdi = 0, /* Historical X-Rite */ - xcalstd_gmdi = 1, /* Historical Gretag-Macbeth */ - xcalstd_xrga = 2, /* Current X-Rite */ -} xcalstd; - -/* Return a string for the xcalstd enum */ -char *xcalstd2str(xcalstd std); - /* ---------------------------------------- */ /* Instrument interface abstract base class */ @@ -301,7 +288,7 @@ typedef enum { /* Return a string with a symbolic encoding of the mode flags */ void inst_mode_to_sym(char sym[MAX_INST_MODE_SYM_SZ], inst_mode mode); -/* Return a set of mode flags that correspondf to the symbolic encoding */ +/* Return a set of mode flags that correspond to the symbolic encoding */ /* Return nz if a symbol wasn't recognized */ int sym_to_inst_mode(inst_mode *mode, const char *sym); @@ -363,6 +350,9 @@ typedef enum { typedef enum { inst3_none = 0x00000000, /* No capabilities */ + inst3_average = 0x00000001 /* Can set to average multiple measurements into 1 */ + /* See inst_opt_set_averages */ + } inst3_capability; /* - - - - - - - - - - - - - - - - - - - */ @@ -511,7 +501,10 @@ typedef enum { /* [xcalstd standard] */ inst_opt_get_xcalstd = 0x0023, /* Get the effective X-Rite ref. cal. standard */ /* [xcalstd *standard] */ - inst_opt_lamp_remediate = 0x0024 /* Remediate i1Pro lamp [double seconds] */ + inst_opt_lamp_remediate = 0x0024, /* Remediate i1Pro lamp [double seconds] */ + + inst_opt_set_averages = 0x0025 /* Set the number of measurements to average [int] */ + /* 0 for default */ } inst_opt_type; @@ -680,7 +673,7 @@ typedef enum { inst_conf_ambient } inst_config; -# define EXRA_INST_OBJ +# define EXTRA_INST_OBJ /* Off-line pending readings available (status) */ #define CALIDLEN 200 /* Maxumum length of calibration tile ID string */ @@ -692,12 +685,10 @@ typedef enum { /* after initialisation. */ #define INST_OBJ_BASE \ \ - EXRA_INST_OBJ \ - a1log *log; /* Pointer to debug & error logging class */ \ - instType itype; /* Instrument type determined by driver */ \ - icoms *icom; /* Instrument coms object */ \ - int gotcoms; /* Coms established flag */ \ - int inited; /* Instrument open and initialized flag */ \ + DEV_OBJ_BASE \ + \ + EXTRA_INST_OBJ \ + \ double cal_gy_level; /* Display calibration test window state */ \ int cal_gy_count; /* Display calibration test window state */ \ inst_code (*uicallback)(void *cntx, inst_ui_purp purp); \ diff --git a/spectro/instappsup.c b/spectro/instappsup.c index fc550b4..6c3dd68 100644..100755 --- a/spectro/instappsup.c +++ b/spectro/instappsup.c @@ -27,6 +27,7 @@ #include "sa_config.h" #endif /* !SALONEINSTLIB */ #include "numsup.h" +#include "cgats.h" #include "xspect.h" #include "conv.h" #include "insttypes.h" @@ -504,7 +505,7 @@ inst2_capability inst_show_disptype_options(FILE *fp, char *oline, icompaths *ic strcat(extra, "]"); } - fprintf(fp, "%s%s: %s%s\n",buf, inst_sname(it->itype), sels[j].desc, extra); + fprintf(fp, "%s%s: %s%s\n",buf, inst_sname(it->dtype), sels[j].desc, extra); if (j == 0) { for (m = 0; m < pstart; m++) diff --git a/spectro/instappsup.h b/spectro/instappsup.h index 8da4325..8da4325 100644..100755 --- a/spectro/instappsup.h +++ b/spectro/instappsup.h diff --git a/spectro/instlib.ksh b/spectro/instlib.ksh index 8b0303f..8b0303f 100644..100755 --- a/spectro/instlib.ksh +++ b/spectro/instlib.ksh diff --git a/spectro/instlib.txt b/spectro/instlib.txt index 661584d..661584d 100644..100755 --- a/spectro/instlib.txt +++ b/spectro/instlib.txt diff --git a/spectro/insttypeinst.h b/spectro/insttypeinst.h index 081d130..081d130 100644..100755 --- a/spectro/insttypeinst.h +++ b/spectro/insttypeinst.h diff --git a/spectro/insttypes.c b/spectro/insttypes.c index 760d678..2a61d21 100644..100755 --- a/spectro/insttypes.c +++ b/spectro/insttypes.c @@ -26,6 +26,7 @@ #include "sa_config.h" #endif /* !SALONEINSTLIB */ #include "numsup.h" +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -39,8 +40,8 @@ /* Given a device type, return the corrsponding */ /* category */ -extern icom_type inst_category(instType itype) { - switch (itype) { +extern icom_type dev_category(devType dtype) { + switch (dtype) { /* Color measurement instruments */ case instDTP22: @@ -80,19 +81,26 @@ extern icom_type inst_category(instType itype) { return icomt_instrument; +#ifdef ENABLE_VTPGLUT /* 3D cLUT box */ + case devRadiance: + return icomt_v3dlut | icomt_vtpg; + case devPrisma: + return icomt_v3dlut; /* Video test patern generator box */ - /* Printers */ - case devEpsonR1800: - return icomt_printer; +#endif + + case instFakeDisp: return icomt_unknown; // ??? - } + case devUnknown: + return icomt_unknown; // ??? + } return icomt_cat_any; } @@ -166,6 +174,16 @@ char *inst_sname(instType itype) { case instColorHug2: return "ColorHug2"; + +#ifdef ENABLE_VTPGLUT + case devRadiance: + return "Radiance"; + case devPrisma: + return "Prisma"; +#endif + + + default: break; } @@ -242,6 +260,16 @@ char *inst_name(instType itype) { case instColorHug2: return "Hughski ColorHug2"; + +#ifdef ENABLE_VTPGLUT + case devRadiance: + return "Lumagen Radiance"; + case devPrisma: + return "Q, Inc Prisma"; +#endif + + + default: break; } @@ -337,6 +365,16 @@ instType inst_enum(char *name) { return instColorHug2; +#ifdef ENABLE_VTPGLUT + if (strcmp(name, "Lumagen Radiance") == 0) + return devRadiance; + + if (strcmp(name, "Q, Inc Prisma") == 0) + return devPrisma; +#endif + + + return instUnknown; } @@ -371,6 +409,8 @@ int nep) { /* Number of end points */ return instI1Disp3; if (idProduct == 0x6003) /* ColorMinki Smile (aka. ColorMunki Display Lite) */ return instSmile; + if (idProduct == 0x6008) /* ColorMunki i1Studio */ + return instColorMunki; if (idProduct == 0xD020) /* DTP20 */ return instDTP20; if (idProduct == 0xD092) /* DTP92Q */ @@ -427,6 +467,8 @@ int nep) { /* Number of end points */ + + return instUnknown; } @@ -536,4 +578,40 @@ int inst_illuminant(xspect *sp, instType itype) { return 1; } +/* ============================================================= */ +/* XRGA support */ + +/* Return a string for the xcalstd enum */ +char *xcalstd2str(xcalstd std) { + switch(std) { + case xcalstd_native: + return "NATIVE"; + case xcalstd_xrdi: + return "XRDI"; + case xcalstd_gmdi: + return "GMDI"; + case xcalstd_xrga: + return "XRGA"; + default: + break; + } + return "None"; +} + +/* Parse a string to xcalstd, */ +/* return xcalstd_none if not recognized */ +xcalstd str2xcalstd(char *str) { + if (strcmp(str, "NATIVE") == 0) + return xcalstd_native; + if (strcmp(str, "XRDI") == 0) + return xcalstd_xrdi; + if (strcmp(str, "GMDI") == 0) + return xcalstd_gmdi; + if (strcmp(str, "XRGA") == 0) + return xcalstd_xrga; + + return xcalstd_none; +} + + diff --git a/spectro/insttypes.h b/spectro/insttypes.h index 8306bc8..104b25d 100644..100755 --- a/spectro/insttypes.h +++ b/spectro/insttypes.h @@ -65,21 +65,23 @@ typedef enum { instFakeDisp = 9998, /* Fake display & instrument device id */ +#ifdef ENABLE_VTPGLUT /* 3D cLUT box */ - // 20000 + devRadiance = 20000, /* Lumagen Radiance v3dlut & vtpg */ + devPrisma, /* Q, Inc Prisma v3dlut */ /* Video test patern generator box */ // 30000 +#endif + - /* Printers */ - devEpsonR1800 = 40000 /* Epson R1800 printer */ } devType; /* Aliases for backwards compatibility */ #define instUnknown devUnknown typedef devType instType; -typedef devType cLUTType; +typedef devType vcLUTType; typedef devType vtpgType; typedef devType printerType; @@ -90,7 +92,7 @@ enum _icom_type; /* Given a device type, return the corrsponding */ /* category */ -//extern _icom_type inst_category(instType itype); +//extern _icom_type dev_category(instType itype); /* Given its instrument type, return the matching */ /* short instrument name (static string), */ @@ -127,6 +129,24 @@ int nep); /* Number of end points (0 for prelim match) */ extern int inst_illuminant(xspect *sp, instType itype); +/* ------------------------------------------------------ */ +/* Gretag/X-Rite specific reflective measurement standard */ + +typedef enum { + xcalstd_none = -2, /* Not set */ + xcalstd_native = -1, /* No conversion */ + xcalstd_xrdi = 0, /* Historical X-Rite */ + xcalstd_gmdi = 1, /* Historical Gretag-Macbeth */ + xcalstd_xrga = 2, /* Current X-Rite */ +} xcalstd; + +/* Return a string for the xcalstd enum */ +char *xcalstd2str(xcalstd std); + +/* Parse a string to xcalstd, */ +/* return xcalstd_none if not recognized */ +xcalstd str2xcalstd(char *str); + #ifdef __cplusplus } #endif diff --git a/spectro/iusb.h b/spectro/iusb.h index 94047cf..94047cf 100644..100755 --- a/spectro/iusb.h +++ b/spectro/iusb.h diff --git a/spectro/kleink10.c b/spectro/kleink10.c index 3d67b6c..d169156 100644..100755 --- a/spectro/kleink10.c +++ b/spectro/kleink10.c @@ -54,6 +54,7 @@ #include "sa_config.h" #include "numsup.h" #endif /* !SALONEINSTLIB */ +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -354,7 +355,7 @@ k10_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { baud_rate brt[] = { baud_9600, baud_nc }; unsigned int etime; unsigned int i; - instType itype = pp->itype; + instType dtype = pp->dtype; int se; char *cp; @@ -1486,8 +1487,8 @@ static inst_code k10_imp_measure_refresh( /* Locate the smallest values and maximum time */ maxt = -1e6; - minv = minv = minv = 1e20; - maxv = maxv = maxv = -11e20; + minv = 1e20; + maxv = -11e20; for (i = nfsamps-1; i >= 0; i--) { if (samp[i] < minv) minv = samp[i]; @@ -2842,7 +2843,7 @@ k10_get_set_opt(inst *pp, inst_opt_type m, ...) { } /* Constructor */ -extern kleink10 *new_kleink10(icoms *icom, instType itype) { +extern kleink10 *new_kleink10(icoms *icom, instType dtype) { kleink10 *p; if ((p = (kleink10 *)calloc(sizeof(kleink10),1)) == NULL) { a1loge(icom->log, 1, "new_kleink10: malloc failed!\n"); @@ -2871,7 +2872,7 @@ extern kleink10 *new_kleink10(icoms *icom, instType itype) { p->del = k10_del; p->icom = icom; - p->itype = itype; + p->dtype = dtype; p->dtech = disptech_unknown; amutex_init(p->lock); diff --git a/spectro/kleink10.h b/spectro/kleink10.h index 136476a..136476a 100644..100755 --- a/spectro/kleink10.h +++ b/spectro/kleink10.h diff --git a/spectro/linear.cal b/spectro/linear.cal new file mode 100755 index 0000000..1dafbde --- /dev/null +++ b/spectro/linear.cal @@ -0,0 +1,272 @@ +CAL + +DESCRIPTOR "Argyll Device Calibration Curves" +ORIGINATOR "Argyll synthcal" +CREATED "Fri Nov 17 01:11:11 2017" +DEVICE_CLASS "DISPLAY" +COLOR_REP "RGB" + +NUMBER_OF_FIELDS 4 +BEGIN_DATA_FORMAT +RGB_I RGB_R RGB_G RGB_B +END_DATA_FORMAT + +NUMBER_OF_SETS 256 +BEGIN_DATA +0.00000 0.00000 0.00000 0.00000 +0.00392157 0.00392157 0.00392157 0.00392157 +0.00784314 0.00784314 0.00784314 0.00784314 +0.0117647 0.0117647 0.0117647 0.0117647 +0.0156863 0.0156863 0.0156863 0.0156863 +0.0196078 0.0196078 0.0196078 0.0196078 +0.0235294 0.0235294 0.0235294 0.0235294 +0.0274510 0.0274510 0.0274510 0.0274510 +0.0313725 0.0313725 0.0313725 0.0313725 +0.0352941 0.0352941 0.0352941 0.0352941 +0.0392157 0.0392157 0.0392157 0.0392157 +0.0431373 0.0431373 0.0431373 0.0431373 +0.0470588 0.0470588 0.0470588 0.0470588 +0.0509804 0.0509804 0.0509804 0.0509804 +0.0549020 0.0549020 0.0549020 0.0549020 +0.0588235 0.0588235 0.0588235 0.0588235 +0.0627451 0.0627451 0.0627451 0.0627451 +0.0666667 0.0666667 0.0666667 0.0666667 +0.0705882 0.0705882 0.0705882 0.0705882 +0.0745098 0.0745098 0.0745098 0.0745098 +0.0784314 0.0784314 0.0784314 0.0784314 +0.0823529 0.0823529 0.0823529 0.0823529 +0.0862745 0.0862745 0.0862745 0.0862745 +0.0901961 0.0901961 0.0901961 0.0901961 +0.0941176 0.0941176 0.0941176 0.0941176 +0.0980392 0.0980392 0.0980392 0.0980392 +0.101961 0.101961 0.101961 0.101961 +0.105882 0.105882 0.105882 0.105882 +0.109804 0.109804 0.109804 0.109804 +0.113725 0.113725 0.113725 0.113725 +0.117647 0.117647 0.117647 0.117647 +0.121569 0.121569 0.121569 0.121569 +0.125490 0.125490 0.125490 0.125490 +0.129412 0.129412 0.129412 0.129412 +0.133333 0.133333 0.133333 0.133333 +0.137255 0.137255 0.137255 0.137255 +0.141176 0.141176 0.141176 0.141176 +0.145098 0.145098 0.145098 0.145098 +0.149020 0.149020 0.149020 0.149020 +0.152941 0.152941 0.152941 0.152941 +0.156863 0.156863 0.156863 0.156863 +0.160784 0.160784 0.160784 0.160784 +0.164706 0.164706 0.164706 0.164706 +0.168627 0.168627 0.168627 0.168627 +0.172549 0.172549 0.172549 0.172549 +0.176471 0.176471 0.176471 0.176471 +0.180392 0.180392 0.180392 0.180392 +0.184314 0.184314 0.184314 0.184314 +0.188235 0.188235 0.188235 0.188235 +0.192157 0.192157 0.192157 0.192157 +0.196078 0.196078 0.196078 0.196078 +0.200000 0.200000 0.200000 0.200000 +0.203922 0.203922 0.203922 0.203922 +0.207843 0.207843 0.207843 0.207843 +0.211765 0.211765 0.211765 0.211765 +0.215686 0.215686 0.215686 0.215686 +0.219608 0.219608 0.219608 0.219608 +0.223529 0.223529 0.223529 0.223529 +0.227451 0.227451 0.227451 0.227451 +0.231373 0.231373 0.231373 0.231373 +0.235294 0.235294 0.235294 0.235294 +0.239216 0.239216 0.239216 0.239216 +0.243137 0.243137 0.243137 0.243137 +0.247059 0.247059 0.247059 0.247059 +0.250980 0.250980 0.250980 0.250980 +0.254902 0.254902 0.254902 0.254902 +0.258824 0.258824 0.258824 0.258824 +0.262745 0.262745 0.262745 0.262745 +0.266667 0.266667 0.266667 0.266667 +0.270588 0.270588 0.270588 0.270588 +0.274510 0.274510 0.274510 0.274510 +0.278431 0.278431 0.278431 0.278431 +0.282353 0.282353 0.282353 0.282353 +0.286275 0.286275 0.286275 0.286275 +0.290196 0.290196 0.290196 0.290196 +0.294118 0.294118 0.294118 0.294118 +0.298039 0.298039 0.298039 0.298039 +0.301961 0.301961 0.301961 0.301961 +0.305882 0.305882 0.305882 0.305882 +0.309804 0.309804 0.309804 0.309804 +0.313725 0.313725 0.313725 0.313725 +0.317647 0.317647 0.317647 0.317647 +0.321569 0.321569 0.321569 0.321569 +0.325490 0.325490 0.325490 0.325490 +0.329412 0.329412 0.329412 0.329412 +0.333333 0.333333 0.333333 0.333333 +0.337255 0.337255 0.337255 0.337255 +0.341176 0.341176 0.341176 0.341176 +0.345098 0.345098 0.345098 0.345098 +0.349020 0.349020 0.349020 0.349020 +0.352941 0.352941 0.352941 0.352941 +0.356863 0.356863 0.356863 0.356863 +0.360784 0.360784 0.360784 0.360784 +0.364706 0.364706 0.364706 0.364706 +0.368627 0.368627 0.368627 0.368627 +0.372549 0.372549 0.372549 0.372549 +0.376471 0.376471 0.376471 0.376471 +0.380392 0.380392 0.380392 0.380392 +0.384314 0.384314 0.384314 0.384314 +0.388235 0.388235 0.388235 0.388235 +0.392157 0.392157 0.392157 0.392157 +0.396078 0.396078 0.396078 0.396078 +0.400000 0.400000 0.400000 0.400000 +0.403922 0.403922 0.403922 0.403922 +0.407843 0.407843 0.407843 0.407843 +0.411765 0.411765 0.411765 0.411765 +0.415686 0.415686 0.415686 0.415686 +0.419608 0.419608 0.419608 0.419608 +0.423529 0.423529 0.423529 0.423529 +0.427451 0.427451 0.427451 0.427451 +0.431373 0.431373 0.431373 0.431373 +0.435294 0.435294 0.435294 0.435294 +0.439216 0.439216 0.439216 0.439216 +0.443137 0.443137 0.443137 0.443137 +0.447059 0.447059 0.447059 0.447059 +0.450980 0.450980 0.450980 0.450980 +0.454902 0.454902 0.454902 0.454902 +0.458824 0.458824 0.458824 0.458824 +0.462745 0.462745 0.462745 0.462745 +0.466667 0.466667 0.466667 0.466667 +0.470588 0.470588 0.470588 0.470588 +0.474510 0.474510 0.474510 0.474510 +0.478431 0.478431 0.478431 0.478431 +0.482353 0.482353 0.482353 0.482353 +0.486275 0.486275 0.486275 0.486275 +0.490196 0.490196 0.490196 0.490196 +0.494118 0.494118 0.494118 0.494118 +0.498039 0.498039 0.498039 0.498039 +0.501961 0.501961 0.501961 0.501961 +0.505882 0.505882 0.505882 0.505882 +0.509804 0.509804 0.509804 0.509804 +0.513725 0.513725 0.513725 0.513725 +0.517647 0.517647 0.517647 0.517647 +0.521569 0.521569 0.521569 0.521569 +0.525490 0.525490 0.525490 0.525490 +0.529412 0.529412 0.529412 0.529412 +0.533333 0.533333 0.533333 0.533333 +0.537255 0.537255 0.537255 0.537255 +0.541176 0.541176 0.541176 0.541176 +0.545098 0.545098 0.545098 0.545098 +0.549020 0.549020 0.549020 0.549020 +0.552941 0.552941 0.552941 0.552941 +0.556863 0.556863 0.556863 0.556863 +0.560784 0.560784 0.560784 0.560784 +0.564706 0.564706 0.564706 0.564706 +0.568627 0.568627 0.568627 0.568627 +0.572549 0.572549 0.572549 0.572549 +0.576471 0.576471 0.576471 0.576471 +0.580392 0.580392 0.580392 0.580392 +0.584314 0.584314 0.584314 0.584314 +0.588235 0.588235 0.588235 0.588235 +0.592157 0.592157 0.592157 0.592157 +0.596078 0.596078 0.596078 0.596078 +0.600000 0.600000 0.600000 0.600000 +0.603922 0.603922 0.603922 0.603922 +0.607843 0.607843 0.607843 0.607843 +0.611765 0.611765 0.611765 0.611765 +0.615686 0.615686 0.615686 0.615686 +0.619608 0.619608 0.619608 0.619608 +0.623529 0.623529 0.623529 0.623529 +0.627451 0.627451 0.627451 0.627451 +0.631373 0.631373 0.631373 0.631373 +0.635294 0.635294 0.635294 0.635294 +0.639216 0.639216 0.639216 0.639216 +0.643137 0.643137 0.643137 0.643137 +0.647059 0.647059 0.647059 0.647059 +0.650980 0.650980 0.650980 0.650980 +0.654902 0.654902 0.654902 0.654902 +0.658824 0.658824 0.658824 0.658824 +0.662745 0.662745 0.662745 0.662745 +0.666667 0.666667 0.666667 0.666667 +0.670588 0.670588 0.670588 0.670588 +0.674510 0.674510 0.674510 0.674510 +0.678431 0.678431 0.678431 0.678431 +0.682353 0.682353 0.682353 0.682353 +0.686275 0.686275 0.686275 0.686275 +0.690196 0.690196 0.690196 0.690196 +0.694118 0.694118 0.694118 0.694118 +0.698039 0.698039 0.698039 0.698039 +0.701961 0.701961 0.701961 0.701961 +0.705882 0.705882 0.705882 0.705882 +0.709804 0.709804 0.709804 0.709804 +0.713725 0.713725 0.713725 0.713725 +0.717647 0.717647 0.717647 0.717647 +0.721569 0.721569 0.721569 0.721569 +0.725490 0.725490 0.725490 0.725490 +0.729412 0.729412 0.729412 0.729412 +0.733333 0.733333 0.733333 0.733333 +0.737255 0.737255 0.737255 0.737255 +0.741176 0.741176 0.741176 0.741176 +0.745098 0.745098 0.745098 0.745098 +0.749020 0.749020 0.749020 0.749020 +0.752941 0.752941 0.752941 0.752941 +0.756863 0.756863 0.756863 0.756863 +0.760784 0.760784 0.760784 0.760784 +0.764706 0.764706 0.764706 0.764706 +0.768627 0.768627 0.768627 0.768627 +0.772549 0.772549 0.772549 0.772549 +0.776471 0.776471 0.776471 0.776471 +0.780392 0.780392 0.780392 0.780392 +0.784314 0.784314 0.784314 0.784314 +0.788235 0.788235 0.788235 0.788235 +0.792157 0.792157 0.792157 0.792157 +0.796078 0.796078 0.796078 0.796078 +0.800000 0.800000 0.800000 0.800000 +0.803922 0.803922 0.803922 0.803922 +0.807843 0.807843 0.807843 0.807843 +0.811765 0.811765 0.811765 0.811765 +0.815686 0.815686 0.815686 0.815686 +0.819608 0.819608 0.819608 0.819608 +0.823529 0.823529 0.823529 0.823529 +0.827451 0.827451 0.827451 0.827451 +0.831373 0.831373 0.831373 0.831373 +0.835294 0.835294 0.835294 0.835294 +0.839216 0.839216 0.839216 0.839216 +0.843137 0.843137 0.843137 0.843137 +0.847059 0.847059 0.847059 0.847059 +0.850980 0.850980 0.850980 0.850980 +0.854902 0.854902 0.854902 0.854902 +0.858824 0.858824 0.858824 0.858824 +0.862745 0.862745 0.862745 0.862745 +0.866667 0.866667 0.866667 0.866667 +0.870588 0.870588 0.870588 0.870588 +0.874510 0.874510 0.874510 0.874510 +0.878431 0.878431 0.878431 0.878431 +0.882353 0.882353 0.882353 0.882353 +0.886275 0.886275 0.886275 0.886275 +0.890196 0.890196 0.890196 0.890196 +0.894118 0.894118 0.894118 0.894118 +0.898039 0.898039 0.898039 0.898039 +0.901961 0.901961 0.901961 0.901961 +0.905882 0.905882 0.905882 0.905882 +0.909804 0.909804 0.909804 0.909804 +0.913725 0.913725 0.913725 0.913725 +0.917647 0.917647 0.917647 0.917647 +0.921569 0.921569 0.921569 0.921569 +0.925490 0.925490 0.925490 0.925490 +0.929412 0.929412 0.929412 0.929412 +0.933333 0.933333 0.933333 0.933333 +0.937255 0.937255 0.937255 0.937255 +0.941176 0.941176 0.941176 0.941176 +0.945098 0.945098 0.945098 0.945098 +0.949020 0.949020 0.949020 0.949020 +0.952941 0.952941 0.952941 0.952941 +0.956863 0.956863 0.956863 0.956863 +0.960784 0.960784 0.960784 0.960784 +0.964706 0.964706 0.964706 0.964706 +0.968627 0.968627 0.968627 0.968627 +0.972549 0.972549 0.972549 0.972549 +0.976471 0.976471 0.976471 0.976471 +0.980392 0.980392 0.980392 0.980392 +0.984314 0.984314 0.984314 0.984314 +0.988235 0.988235 0.988235 0.988235 +0.992157 0.992157 0.992157 0.992157 +0.996078 0.996078 0.996078 0.996078 +1.000000 1.000000 1.000000 1.000000 +END_DATA diff --git a/spectro/linear.sp b/spectro/linear.sp index 8851462..8851462 100644..100755 --- a/spectro/linear.sp +++ b/spectro/linear.sp diff --git a/spectro/madvrwin.c b/spectro/madvrwin.c index 305a240..305a240 100644..100755 --- a/spectro/madvrwin.c +++ b/spectro/madvrwin.c diff --git a/spectro/madvrwin.h b/spectro/madvrwin.h index bbaf32e..bbaf32e 100644..100755 --- a/spectro/madvrwin.h +++ b/spectro/madvrwin.h diff --git a/spectro/mongoose.c b/spectro/mongoose.c index 019101e..019101e 100644..100755 --- a/spectro/mongoose.c +++ b/spectro/mongoose.c diff --git a/spectro/mongoose.h b/spectro/mongoose.h index 1ee0c47..1ee0c47 100644..100755 --- a/spectro/mongoose.h +++ b/spectro/mongoose.h diff --git a/spectro/munki.c b/spectro/munki.c index 16cd863..306f1dc 100644..100755 --- a/spectro/munki.c +++ b/spectro/munki.c @@ -49,6 +49,7 @@ #include "sa_config.h" #include "numsup.h" #endif /* SALONEINSTLIB */ +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -1012,7 +1013,7 @@ munki_del(inst *pp) { } /* Constructor */ -extern munki *new_munki(icoms *icom, instType itype) { +extern munki *new_munki(icoms *icom, instType dtype) { munki *p; int rv; if ((p = (munki *)calloc(sizeof(munki),1)) == NULL) { @@ -1043,7 +1044,7 @@ extern munki *new_munki(icoms *icom, instType itype) { p->del = munki_del; p->icom = icom; - p->itype = itype; + p->dtype = dtype; /* Preliminary capabilities */ munki_determine_capabilities(p); diff --git a/spectro/munki.h b/spectro/munki.h index 01eda29..cb4d917 100644..100755 --- a/spectro/munki.h +++ b/spectro/munki.h @@ -46,7 +46,7 @@ struct _munki { INST_OBJ_BASE - int dtype; /* Device type: 0 = ?? */ + int idtype; /* Device type: 0 = ?? */ /* *** munki private data **** */ inst_mode cap; /* Instrument mode capability */ diff --git a/spectro/munki_imp.c b/spectro/munki_imp.c index eae2837..d8690e8 100644..100755 --- a/spectro/munki_imp.c +++ b/spectro/munki_imp.c @@ -60,6 +60,7 @@ #include "numsup.h" #include "rspl1.h" #endif /* SALONEINSTLIB */ +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -483,7 +484,7 @@ munki_code munki_imp_init(munki *p) { a1logd(p->log,2,"munki_init:\n"); - if (p->itype != instColorMunki) + if (p->dtype != instColorMunki) return MUNKI_UNKNOWN_MODEL; @@ -3183,7 +3184,8 @@ munki_code munki_save_calibration(munki *p) { #endif sprintf(cal_name, "ArgyllCMS/.mk_%s.cal", m->serno); - if ((no_paths = xdg_bds(NULL, &cal_paths, xdg_cache, xdg_write, xdg_user, cal_name)) < 1) { + if ((no_paths = xdg_bds(NULL, &cal_paths, xdg_cache, xdg_write, xdg_user, xdg_none, + cal_name)) < 1) { a1logd(p->log,1,"munki_save_calibration xdg_bds returned no paths\n"); return MUNKI_INT_CAL_SAVE; } @@ -3299,7 +3301,8 @@ munki_code munki_restore_calibration(munki *p) { #endif sprintf(cal_name, "ArgyllCMS/.mk_%s.cal" SSEPS "color/.mk_%s.cal", m->serno, m->serno); - if ((no_paths = xdg_bds(NULL, &cal_paths, xdg_cache, xdg_read, xdg_user, cal_name)) < 1) { + if ((no_paths = xdg_bds(NULL, &cal_paths, xdg_cache, xdg_read, xdg_user, xdg_none, + cal_name)) < 1) { a1logd(p->log,1,"munki_restore_calibration xdg_bds returned no paths\n"); return MUNKI_INT_CAL_RESTORE; } @@ -3616,7 +3619,8 @@ munki_code munki_touch_calibration(munki *p) { int rv; sprintf(cal_name, "ArgyllCMS/.mk_%s.cal" SSEPS "color/.mk_%s.cal", m->serno, m->serno); - if ((no_paths = xdg_bds(NULL, &cal_paths, xdg_cache, xdg_read, xdg_user, cal_name)) < 1) + if ((no_paths = xdg_bds(NULL, &cal_paths, xdg_cache, xdg_read, xdg_user, xdg_none, + cal_name)) < 1) return MUNKI_INT_CAL_TOUCH; a1logd(p->log,2,"munki_touch_calibration touching file '%s'\n",cal_paths[0]); diff --git a/spectro/munki_imp.h b/spectro/munki_imp.h index f639395..fca4c5f 100644..100755 --- a/spectro/munki_imp.h +++ b/spectro/munki_imp.h @@ -186,7 +186,8 @@ struct _munkiimp { /* Information from the HW */ int fwrev; /* int - Firmware revision number, from getfirm() */ - /* Typically 0120 = V1.32 */ + /* Typically 0120 = V1.32 (Build 1303) */ + /* i1Studio 0200 = V2.00 (Build 1310) */ unsigned char chipid[8]; /* HW serial number */ char vstring[37]; /* Asciiz version string */ int tickdur; /* Tick duration (usec, converted to intclkp) */ diff --git a/spectro/oemarch.c b/spectro/oemarch.c index c8775bf..1837e63 100644..100755 --- a/spectro/oemarch.c +++ b/spectro/oemarch.c @@ -51,6 +51,7 @@ #include "numsup.h" #endif /* SALONEINSTLIB */ #include "xdg_bds.h" +#include "cgats.h" #include "xspect.h" #include "conv.h" #include "aglob.h" diff --git a/spectro/oemarch.h b/spectro/oemarch.h index b0b1a65..b0b1a65 100644..100755 --- a/spectro/oemarch.h +++ b/spectro/oemarch.h diff --git a/spectro/oeminst.c b/spectro/oeminst.c index 726a54c..3a4b03b 100644..100755 --- a/spectro/oeminst.c +++ b/spectro/oeminst.c @@ -30,6 +30,7 @@ #include "conv.h" #include "aglob.h" #include "oemarch.h" +#include "cgats.h" #include "xspect.h" #include "disptechs.h" #include "ccmx.h" @@ -260,7 +261,8 @@ main(int argc, char *argv[]) { int npaths = 0; /* Get destination path. This may drop uid/gid if we are su */ - if ((npaths = xdg_bds(NULL, &paths, xdg_data, xdg_write, scope, install_name)) < 1) { + if ((npaths = xdg_bds(NULL, &paths, xdg_data, xdg_write, scope, xdg_none, + install_name)) < 1) { error("Failed to find/create XDG_DATA path '%s'",install_name); } if (install) diff --git a/spectro/pollem.c b/spectro/pollem.c index 855702b..855702b 100644..100755 --- a/spectro/pollem.c +++ b/spectro/pollem.c diff --git a/spectro/pollem.h b/spectro/pollem.h index bd879e1..bd879e1 100644..100755 --- a/spectro/pollem.h +++ b/spectro/pollem.h diff --git a/spectro/rspec.c b/spectro/rspec.c index 6a7f8c7..c50cd83 100644..100755 --- a/spectro/rspec.c +++ b/spectro/rspec.c @@ -47,6 +47,7 @@ #ifndef SALONEINSTLIB # include "plot.h" #endif +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -928,7 +929,8 @@ int calf_open(calf *x, a1log *log, char *fname, int wr) { sprintf(cal_name, "ArgyllCMS/%s", fname); else sprintf(cal_name, "ArgyllCMS/%s" SSEPS "color/%s", fname, fname); - if ((no_paths = xdg_bds(NULL, &cal_paths, xdg_cache, xdg_write, xdg_user, cal_name)) < 1) { + if ((no_paths = xdg_bds(NULL, &cal_paths, xdg_cache, xdg_write, xdg_user, xdg_none, + cal_name)) < 1) { a1logd(x->log,1,"calf_open: xdg_bds returned no paths\n"); return 1; } @@ -971,7 +973,8 @@ int calf_touch(a1log *log, char *fname) { /* Locate the file name */ sprintf(cal_name, "ArgyllCMS/%s" SSEPS "color/%s", fname, fname); - if ((no_paths = xdg_bds(NULL, &cal_paths, xdg_cache, xdg_read, xdg_user, cal_name)) < 1) { + if ((no_paths = xdg_bds(NULL, &cal_paths, xdg_cache, xdg_read, xdg_user, xdg_none, + cal_name)) < 1) { a1logd(log,2,"calf_touch: xdg_bds failed to locate file'\n"); return 1; } diff --git a/spectro/rspec.h b/spectro/rspec.h index 0cbee58..0cbee58 100644..100755 --- a/spectro/rspec.h +++ b/spectro/rspec.h diff --git a/spectro/sa_conv.c b/spectro/sa_conv.c index 84286ba..84286ba 100644..100755 --- a/spectro/sa_conv.c +++ b/spectro/sa_conv.c diff --git a/spectro/sa_conv.h b/spectro/sa_conv.h index 0f7e635..0f7e635 100644..100755 --- a/spectro/sa_conv.h +++ b/spectro/sa_conv.h diff --git a/spectro/smcube.c b/spectro/smcube.c index c450d48..9f6947d 100644..100755 --- a/spectro/smcube.c +++ b/spectro/smcube.c @@ -73,6 +73,7 @@ #include "numsup.h" #include "sa_conv.h" #endif /* !SALONEINSTLIB */ +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -203,7 +204,7 @@ smcube_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { baud_rate brt[] = { baud_38400, baud_nc }; unsigned int etime; unsigned int i; - instType itype = pp->itype; + instType dtype = pp->dtype; int se; inst_code ev = inst_ok; @@ -1133,7 +1134,7 @@ smcube_get_set_opt(inst *pp, inst_opt_type m, ...) { } /* Constructor */ -extern smcube *new_smcube(icoms *icom, instType itype) { +extern smcube *new_smcube(icoms *icom, instType dtype) { smcube *p; if ((p = (smcube *)calloc(sizeof(smcube),1)) == NULL) { a1loge(icom->log, 1, "new_smcube: malloc failed!\n"); @@ -1158,7 +1159,7 @@ extern smcube *new_smcube(icoms *icom, instType itype) { p->icom = icom; icom->icntx = (void *)p; /* Allow us to get instrument from icom */ - p->itype = itype; + p->dtype = dtype; amutex_init(p->lock); diff --git a/spectro/smcube.h b/spectro/smcube.h index 06aee9d..06aee9d 100644..100755 --- a/spectro/smcube.h +++ b/spectro/smcube.h diff --git a/spectro/spec2cie.c b/spectro/spec2cie.c index d77c334..6c56e67 100644..100755 --- a/spectro/spec2cie.c +++ b/spectro/spec2cie.c @@ -73,6 +73,7 @@ #include "conv.h" #include "icoms.h" #include "inst.h" +#include "xrga.h" #ifdef ALLOW_PLOT #include "plot.h" #include "ui.h" @@ -87,6 +88,7 @@ usage (void) fprintf (stderr, "\n"); fprintf (stderr, "Usage: spec2cie [options] input.[ti3|sp] output.[ti3|sp]\n"); fprintf (stderr, " -v Verbose mode\n"); + fprintf (stderr, " -A NN|AX|AG|XA|XG|GA|GX XRGA conversion (default NN)\n"); fprintf (stderr, " -I illum Override actual instrument illuminant in .ti3 or .sp file:\n"); fprintf (stderr, " A, C, D50, D50M2, D65, F5, F8, F10 or file.sp\n"); fprintf (stderr, " (only used in conjunction with -f)\n"); @@ -95,7 +97,7 @@ usage (void) fprintf (stderr, " -i illum Choose illuminant for computation of CIE XYZ from spectral data & FWA:\n"); fprintf (stderr, " A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp\n"); fprintf (stderr, " -o observ Choose CIE Observer for spectral data:\n"); - fprintf (stderr, " 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2 or file.cmf\n"); + fprintf (stderr, " 1931_2 (def), 1964_10, 2012_2, 2012_10, S&B 1955_2, shaw, J&V 1978_2 or file.cmf\n"); fprintf (stderr, " -n Don't output spectral values\n"); #ifdef ALLOW_PLOT fprintf (stderr, " -p Plot each values spectrum\n"); @@ -110,6 +112,10 @@ main(int argc, char *argv[]) { int fa, nfa; /* current argument we're looking at */ int verb = 0; + xcalstd calstd = xcalstd_none; /* X-Rite calibration standard of .ti3 file */ + xcalpol calpol = xcalstd_nonpol; /* If measurement is polarized */ + xcalstd calstdi = xcalstd_none; /* X-Rite calibration standard conversion in */ + xcalstd calstdo = xcalstd_none; /* X-Rite calibration standard conversion out */ int nospec = 0; /* NZ if not to output spectral values */ char *in_ti3_name; char *out_ti3_name; @@ -117,7 +123,7 @@ main(int argc, char *argv[]) cgats *ocg; /* output cgats structure */ cgats_set_elem *elems; - int isspect = 0; /* nz if SPECT file rathe than TI3 */ + int isspect = 0; /* nz if SPECT file rather than TI3 */ int isemis = 0; /* nz if this is an emissive reference */ int isdisp = 0; /* nz if this is a display device */ int isdnormed = 0; /* Has display data been normalised to 100 ? */ @@ -140,11 +146,11 @@ main(int argc, char *argv[]) xspect inst_cust_illum; /* Custom actual instrument illumination spectrum */ /* if inst_illum == icxIT_custom */ - icxObserverType observ = icxOT_none; - xspect cust_observ[3]; /* Custom observer CMF's */ + icxObserverType obType = icxOT_none; + xspect custObserver[3]; /* Custom observer CMF's */ int npat; /* Number of patches */ - int dti; /* Device Type index */ + int ti; /* Field index */ char *kw; int i, j, jj, k; @@ -175,12 +181,43 @@ main(int argc, char *argv[]) } if (argv[fa][1] == '?') - usage (); + usage(); /* Verbose */ else if (argv[fa][1] == 'v' || argv[fa][1] == 'V') verb = 1; + /* XRGA conversion */ + else if (argv[fa][1] == 'A') { + fa = nfa; + if (na == NULL) usage(); + if (na[0] == 'N' && na[1] == 'N') { + calstdi = xcalstd_none; + calstdo = xcalstd_none; + } else if (na[0] == 'A' && na[1] == 'X') { + calstdi = xcalstd_xrga; + calstdo = xcalstd_xrdi; + } else if (na[0] == 'A' && na[1] == 'G') { + calstdi = xcalstd_xrga; + calstdo = xcalstd_gmdi; + } else if (na[0] == 'X' && na[1] == 'A') { + calstdi = xcalstd_xrdi; + calstdo = xcalstd_xrga; + } else if (na[0] == 'X' && na[1] == 'G') { + calstdi = xcalstd_xrdi; + calstdo = xcalstd_gmdi; + } else if (na[0] == 'G' && na[1] == 'A') { + calstdi = xcalstd_gmdi; + calstdo = xcalstd_xrga; + } else if (na[0] == 'G' && na[1] == 'X') { + calstdi = xcalstd_gmdi; + calstdo = xcalstd_xrdi; + } else { + //usage("Paramater after -A '%c%c' not recognized",na[0],na[1]); + usage(); + } + } + /* Don't output spectral */ else if (argv[fa][1] == 'n' || argv[fa][1] == 'N') nospec = 1; @@ -327,25 +364,25 @@ main(int argc, char *argv[]) else if (argv[fa][1] == 'o' || argv[fa][1] == 'O') { fa = nfa; if (na == NULL) - usage (); + usage(); if (strcmp (na, "1931_2") == 0) { /* Classic 2 degree */ - observ = icxOT_CIE_1931_2; + obType = icxOT_CIE_1931_2; } else if (strcmp (na, "1964_10") == 0) { /* Classic 10 degree */ - observ = icxOT_CIE_1964_10; - } - else if (strcmp (na, "1955_2") == 0) { /* Stiles and Burch 1955 2 degree */ - observ = icxOT_Stiles_Burch_2; - } - else if (strcmp (na, "1978_2") == 0) { /* Judd and Voss 1978 2 degree */ - observ = icxOT_Judd_Voss_2; - } - else if (strcmp (na, "shaw") == 0) { /* Shaw and Fairchilds 1997 2 degree */ - observ = icxOT_Shaw_Fairchild_2; - } - else { /* Assume it's a filename */ - observ = icxOT_custom; - if (read_cmf (cust_observ, na) != 0) + obType = icxOT_CIE_1964_10; + } else if (strcmp(na, "2012_2") == 0) { /* Latest 2 degree */ + obType = icxOT_CIE_2012_2; + } else if (strcmp(na, "2012_10") == 0) { /* Latest 10 degree */ + obType = icxOT_CIE_2012_10; + } else if (strcmp (na, "1955_2") == 0) { /* Stiles and Burch 1955 2 degree */ + obType = icxOT_Stiles_Burch_2; + } else if (strcmp (na, "1978_2") == 0) { /* Judd and Voss 1978 2 degree */ + obType = icxOT_Judd_Voss_2; + } else if (strcmp (na, "shaw") == 0) { /* Shaw and Fairchilds 1997 2 degree */ + obType = icxOT_Shaw_Fairchild_2; + } else { /* Assume it's a filename */ + obType = icxOT_custom; + if (read_cmf (custObserver, na) != 0) usage (); } } @@ -376,21 +413,21 @@ main(int argc, char *argv[]) ocg = new_cgats (); /* Create a CGATS structure */ ocg->add_other (ocg, "CTI3"); /* Calibration Target Information 3 */ - icg->add_other (ocg, "SPECT"); /* Spectral file */ + ocg->add_other (ocg, "SPECT"); /* Spectral file */ if (icg->read_name (icg, in_ti3_name)) error ("CGATS file read error: %s", icg->err); + if (icg->ntables < 1) + error ("Input file doesn't contain at least one table"); + if (icg->ntables == 0 || icg->t[0].tt != tt_other || (icg->t[0].oi != 0 && icg->t[0].oi != 1)) error ("Input file isn't a CTI3 or SPECT format file"); - if (icg->t[0].oi == 1) + if (icg->t[0].oi == 1) /* SPECT type */ isspect = 1; - if (icg->ntables < 1) - error ("Input file doesn't contain at least one table"); - /* add table to output file */ if (isspect) ocg->add_table(ocg, tt_other, 1); @@ -416,14 +453,14 @@ main(int argc, char *argv[]) } if (isspect) { - if ((dti = icg->find_kword (icg, 0, "MEAS_TYPE")) < 0) + if ((ti = icg->find_kword (icg, 0, "MEAS_TYPE")) < 0) error ("Input file doesn't contain keyword MEAS_TYPE"); /* Reflective options when not a reflective profile type */ - if (strcmp(icg->t[0].kdata[dti],"EMISSION") == 0 - || strcmp(icg->t[0].kdata[dti],"AMBIENT") == 0 - || strcmp(icg->t[0].kdata[dti],"EMISSION_FLASH") == 0 - || strcmp(icg->t[0].kdata[dti],"AMBIENT_FLASH") == 0) { + if (strcmp(icg->t[0].kdata[ti],"EMISSION") == 0 + || strcmp(icg->t[0].kdata[ti],"AMBIENT") == 0 + || strcmp(icg->t[0].kdata[ti],"EMISSION_FLASH") == 0 + || strcmp(icg->t[0].kdata[ti],"AMBIENT_FLASH") == 0) { isemis = 1; if (illum != icxIT_none) error("-i illuminant can't be used for emissive reference type"); @@ -434,12 +471,12 @@ main(int argc, char *argv[]) } } else { - if ((dti = icg->find_kword (icg, 0, "DEVICE_CLASS")) < 0) + if ((ti = icg->find_kword (icg, 0, "DEVICE_CLASS")) < 0) error ("Input file doesn't contain keyword DEVICE_CLASS"); /* Reflective options when not a reflective profile type */ - if (strcmp(icg->t[0].kdata[dti],"DISPLAY") == 0 - || strcmp(icg->t[0].kdata[dti],"EMISINPUT") == 0) { + if (strcmp(icg->t[0].kdata[ti],"DISPLAY") == 0 + || strcmp(icg->t[0].kdata[ti],"EMISINPUT") == 0) { isemis = 1; if (illum != icxIT_none) error("-i illuminant can't be used for emissive reference type"); @@ -454,8 +491,38 @@ main(int argc, char *argv[]) if (illum == icxIT_none) illum = icxIT_D50; - if (observ == icxOT_none) - observ = icxOT_CIE_1931_2; + if (obType == icxOT_none) + obType = icxOT_CIE_1931_2; + + /* See if the measurements were polarized */ + if ((ti = icg->find_kword(icg, 0, "INSTRUMENT_FILTER")) >= 0 + && strcmp(icg->t[0].kdata[ti], "POLARIZED") == 0) { + calpol = xcalstd_pol; /* If measurement is polarized */ + } + + /* See if there is an XRGA anotation in the incoming file */ + if ((ti = icg->find_kword(icg, 0, "DEVCALSTD")) >= 0) { + calstd = str2xcalstd(icg->t[0].kdata[ti]); + } + + /* Check XRGA conversion */ + if (calstdo != xcalstd_none) { + + if (isemis || isdisp) + error("XRGA conversion only applies to reflective measurements"); + + if (calstd != xcalstd_none + && calstd != calstdi) { + warning("Input file calibration standard '%s' doesn't match -A parameter '%s'", + xcalstd2str(calstd), xcalstd2str(calstdi)); + } + + /* Anotate output file */ + if ((ti = ocg->find_kword (ocg, 0, "DEVCALSTD")) >= 0) + ocg->add_kword_at(ocg, 0, ti, "DEVCALSTD",xcalstd2str(calstdo), NULL); + else + ocg->add_kword(ocg, 0, "DEVCALSTD",xcalstd2str(calstdo), NULL); + } /* See if the display CIE data has been normalised to Y = 100 */ { @@ -477,7 +544,7 @@ main(int argc, char *argv[]) if ((ti = icg->find_kword(icg, 0, "COLOR_REP")) < 0) error("Input file doesn't contain keyword COLOR_REP"); - if (strcmp (icg->t[0].kdata[dti], "DISPLAY") == 0) { + if (strcmp (icg->t[0].kdata[ti], "DISPLAY") == 0) { isdisp = 1; } @@ -700,16 +767,16 @@ main(int argc, char *argv[]) } /* If CIE calculation illuminant is not standard, compute it's white point */ - if (illum != icxIT_D50) { + if (illum != icxIT_D50 && illum != icxIT_none) { ill_wp = _ill_wp; - /* Compute XYZ of illuminant */ - if (icx_ill_sp2XYZ(ill_wp, observ, cust_observ, illum, 0.0, &cust_illum) != 0) + /* Compute normalised XYZ of illuminant */ + if (icx_ill_sp2XYZ(ill_wp, obType, custObserver, illum, 0.0, &cust_illum, 0) != 0) error("icx_ill_sp2XYZ returned error"); } /* Create a spectral conversion object */ - if ((sp2cie = new_xsp2cie(illum, &cust_illum, observ, cust_observ, + if ((sp2cie = new_xsp2cie(illum, &cust_illum, obType, custObserver, icSigXYZData, icxClamp)) == NULL) { error ("Creation of spectral conversion object failed"); @@ -789,6 +856,10 @@ main(int argc, char *argv[]) for (j = 0; j < rmwsp.spec_n; j++) { rmwsp.spec[j] /= nw; /* Compute average */ } + + if (calstdo != xcalstd_none) + xspec_convert_xrga(&rmwsp, &rmwsp, calpol, calstdo, calstdi); + mwsp = rmwsp; /* Structure copy */ } @@ -838,7 +909,7 @@ main(int argc, char *argv[]) printf("FWA content = %f\n",FWAc); } - /* Create an FWA compensated white spectrum and XYZ value */ + /* Create an FWA compensated white spectrum and XYZ value */ sp2cie->sconvert (sp2cie, &rmwsp, mwXYZ, &mwsp); } @@ -895,6 +966,8 @@ main(int argc, char *argv[]) for (j = 0; j < sp.spec_n; j++) { sp.spec[j] = *((double *)icg->t[0].fdata[i][spi[j]]); } + if (calstdo != xcalstd_none) + xspec_convert_xrga(&sp, &sp, calpol, calstdo, calstdi); if (fwacomp) { corr_sp = sp; /* Copy spectrum */ diff --git a/spectro/specbos.c b/spectro/specbos.c index 4c5e4ba..136fb34 100644..100755 --- a/spectro/specbos.c +++ b/spectro/specbos.c @@ -63,6 +63,7 @@ #include "sa_config.h" #include "numsup.h" #endif /* !SALONEINSTLIB */ +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -74,6 +75,9 @@ static inst_code specbos_interp_code(inst *pp, int ec); #define MAX_MES_SIZE 500 /* Maximum normal message reply size */ #define MAX_RD_SIZE 8000 /* Maximum reading message reply size */ +#define DEFAULT_TRANS_NAV 10 /* Default transmission mode number of averages */ +#define DEFAULT_NAV 1 /* Default other mode number of averages */ + /* Interpret an icoms error into a SPECBOS error */ static int icoms2specbos_err(int se) { if (se != ICOM_OK) { @@ -132,13 +136,18 @@ int nd /* nz to disable debug messages */ return icoms2specbos_err(se); } - /* Over Bluetooth, we get an erronious string "AT+JSCR\r\n" mixed in our output. */ + /* Over Bluetooth, we get an erroneous string "AT+JSCR\r\n" mixed in our output. */ /* This would appear to be from the eBMU Bluetooth adapter AT command set. */ if (bread > 9 && strncmp(out, "AT+JSCR\r\n", 9) == 0) { a1logd(p->log, 8, "specbos: ignored 'AT+JSCR\\r\\n' response\n"); memmove(out, out+9, bsize-9); bread -= 9; } + if (bread > 8 && strncmp(out, "AT+JSCR\r", 8) == 0) { + a1logd(p->log, 8, "specbos: ignored 'AT+JSCR\\r' response\n"); + memmove(out, out+8, bsize-8); + bread -= 8; + } /* See if there was an error, and remove any enquire codes */ for (dp = cp = out; *cp != '\000' && (dp - out) < bsize; cp++) { @@ -221,7 +230,7 @@ specbos_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { unsigned int etime; unsigned int len, i; - instType itype = pp->itype; + instType dtype = pp->dtype; int se; inst_code ev = inst_ok; @@ -250,6 +259,8 @@ specbos_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { return ev; } + msec_sleep(600); + /* We need to setup communications */ } else { int delayms = 0; @@ -261,7 +272,7 @@ specbos_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { a1logd(p->log, 1, "specbos_init_coms: Trying different baud rates (%u msec to go)\n",etime - msec_time()); /* Spectraval Bluetooth serial doesn't seem to actuall function */ - /* until 600msec after it is opened. We get arroneos "AT+JSCR\r\n" reply */ + /* until 600msec after it is opened. We get an erroneous "AT+JSCR\r\n" reply */ /* within that time, and it won't re-open after closing. */ if (p->icom->dctype & icomt_btserial) delayms = 600; @@ -321,8 +332,8 @@ specbos_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { p->model = 1201; } else if ((len >= 10 && strncmp(buf, "JETI_SDCM3", 10) == 0) || (len >= 9 && strncmp(buf, "DCM3_JETI", 9) == 0) - || (len >= 17 && strncmp(buf, "PECFIRM_JETI_1501", 18) == 0) - || (len >= 18 && strncmp(buf, "SPECFIRM_JETI_1501", 17) == 0)) { + || (len >= 17 && strncmp(buf, "PECFIRM_JETI_1501", 17) == 0) + || (len >= 18 && strncmp(buf, "SPECFIRM_JETI_1501", 18) == 0)) { p->model = 1501; } else { if (len < 11 @@ -342,22 +353,32 @@ specbos_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { } a1logd(p->log, 2, "specbos_init_coms: init coms has suceeded\n"); - p->gotcoms = 1; - /* See if it's a 1501 or 1511 */ if (p->model == 1501) { + int i; int dispen = 0; - if ((ev = specbos_command(p, "*conf:dispen?\r", buf, MAX_MES_SIZE, 1.0)) != inst_ok) { - amutex_unlock(p->lock); - a1logd(p->log, 2, "specbos_init_coms: failed to get display status\n"); - return inst_protocol_error; - } - if (sscanf(buf, "%d ",&dispen) != 1) { - amutex_unlock(p->lock); - a1loge(p->log, 1, "specbos_init_inst: failed to parse display status\n"); - return ev; + /* Try a few times because of BT misbehaviour */ + for (i = 0; i < 3; i++) { + if ((ev = specbos_command(p, "*conf:dispen?\r", buf, MAX_MES_SIZE, 1.0)) != inst_ok) { + if (i < 3) + continue; + amutex_unlock(p->lock); + a1logd(p->log, 2, "specbos_init_coms: failed to get display status\n"); + return inst_protocol_error; + } + + if (sscanf(buf, "%d ",&dispen) != 1) { + if (i < 3) + continue; + amutex_unlock(p->lock); + a1loge(p->log, 1, "specbos_init_inst: failed to parse display status\n"); + return specbos_interp_code((inst *)p, SPECBOS_DATA_PARSE_ERROR); + } else { + break; + } } + a1logd(p->log, 1, " spectraval %s display\n",dispen ? "has" : "doesn't have"); if (dispen) { p->model = 1511; @@ -393,6 +414,8 @@ specbos_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { } #endif + p->gotcoms = 1; + amutex_unlock(p->lock); return inst_ok; } @@ -559,25 +582,33 @@ specbos_init_inst(inst *pp) { p->measto = 20.0; /* Set default. Specbos default is 60.0 */ if (p->model == 1211) - p->measto = 6.0; /* Same overall time as i1d3 ?? */ + p->measto = 6.0 + 3.6; /* Aprox. Same overall time as i1d3 ?? */ else if (p->model == 1201) - p->measto = 16.0; + p->measto = 16.0 + 3.6; else if (p->model == 1501 || p->model == 1511) - p->measto = 6.0; + p->measto = 6.0 + 3.6; /* Implement max auto int. time, to speed up display measurement */ if (p->model == 1501 || p->model == 1511) { +#ifdef NEVER /* Bound auto by integration time (worse for inttime > 1.0) */ int maxaver = 2; /* Maximum averages for auto int time */ double dmaxtint; int maxtint; /* Actual time taken depends on maxtint, autoavc & fudge factor. */ - dmaxtint = p->measto/(maxaver + 3.5); + dmaxtint = (p->measto - 3.6)/(2.0 * maxaver); + + //printf("dmaxtint %f\n",dmaxtint); maxtint = (int)(dmaxtint * 1000.0+0.5); - if (maxtint < 1000 || maxtint > 64999) - error("specbos: assert, maxtint %d out of range",maxtint); + if (maxtint < 1000 || maxtint > 64999) { + warning("specbos: assert, maxtint %d out of range",maxtint); + if (maxtint < 1000) + maxtint = 1000; + else if (maxtint > 64999) + maxtint = 64999; + } /* Set maximum integration time */ sprintf(mes, "*para:maxtint %d\r", maxtint); @@ -592,6 +623,45 @@ specbos_init_inst(inst *pp) { amutex_unlock(p->lock); return ev; } +#else /* Bound auto by no. averages (better - limit maxint to 1.0) */ + double dmaxtint = 1.0; /* Recommended maximum */ + int maxtint; + int maxaver; /* Maximum averages for auto int time */ + + maxtint = (int)(dmaxtint * 1000.0+0.5); + + if (maxtint < 1000 || maxtint > 64999) { + warning("specbos: assert, maxtint %d out of range",maxtint); + if (maxtint < 1000) + maxtint = 1000; + else if (maxtint > 64999) + maxtint = 64999; + } + + /* Set maximum integration time */ + sprintf(mes, "*para:maxtint %d\r", maxtint); + if ((ev = specbos_command(p, mes, buf, MAX_MES_SIZE, 1.0)) != inst_ok) { + amutex_unlock(p->lock); + return ev; + } + + /* Total time = overhead + initial sample + 2 * int time per measure */ + maxaver = (int)ceil((p->measto - 3.6)/(2.0 * dmaxtint)); + + //printf("maxaver %d\n",maxaver); + + if (maxaver < 2) { + warning("specbos: assert, maxaver %d out of range",maxaver); + maxaver = 2; + } + + /* Set maximum number of auto averages. Min value is 2 */ + sprintf(mes, "*para:maxaver %d\r", maxaver); + if ((ev = specbos_command(p, mes, buf, MAX_MES_SIZE, 1.0)) != inst_ok) { + amutex_unlock(p->lock); + return ev; + } +#endif /* spectraval doesn't support *fetch:XYZ command */ p->noXYZ = 1; @@ -600,38 +670,69 @@ specbos_init_inst(inst *pp) { double dmaxtin; int maxtin; - dmaxtin = p->measto/2.5; /* Fudge factor */ + /* Total time = overhead + initial sample + 2 * int time per measure */ + dmaxtin = (p->measto - 3.6)/2.0; /* Fudge factor */ + maxtin = (int)(dmaxtin * 1000.0+0.5); - if (maxtin < 1000 || maxtin > 64999) - error("specbos: assert, maxtin %d out of range",maxtin); + if (maxtin < 1000 || maxtin > 64999) { + warning("specbos: assert, maxtint %d out of range",maxtin); + if (maxtin < 1000) + maxtin = 1000; + else if (maxtin > 64999) + maxtin = 64999; + } /* Set maximum integration time */ - sprintf(mes, "*para:maxtint %d\r", maxtin); + /* (1201 *para:maxtint doesn't work !!) */ + sprintf(mes, "*conf:maxtin %d\r", maxtin); + if ((ev = specbos_command(p, mes, buf, MAX_MES_SIZE, 1.0)) != inst_ok) { + amutex_unlock(p->lock); + return ev; + } + +#ifdef NEVER /* Use default */ + /* Set split time to limit dark current error for long integration times */ + sprintf(mes, "*para:splitt %d\r", 1000); if ((ev = specbos_command(p, mes, buf, MAX_MES_SIZE, 1.0)) != inst_ok) { amutex_unlock(p->lock); return ev; } +#endif + } if (p->model == 1501 || p->model == 1511) { + int i; int wstart, wend, wstep; - /* Set the measurement format to None. We will read measurement manually. */ - /* (0 = None, 1 = Binary, 2 = ASCII) */ - if ((ev = specbos_command(p, "*para:form 0\r", buf, MAX_MES_SIZE, 1.0)) != inst_ok) { - amutex_unlock(p->lock); - return ev; - } + /* Try several times due to BT problems */ + for (i = 0; i < 3; i++) { + /* Set the measurement format to None. We will read measurement manually. */ + /* (0 = None, 1 = Binary, 2 = ASCII) */ + if ((ev = specbos_command(p, "*para:form 0\r", buf, MAX_MES_SIZE, 1.0)) != inst_ok) { + if (i < 3) + continue; + amutex_unlock(p->lock); + return ev; + } - if ((ev = specbos_command(p, "*para:wran?\r", buf, MAX_MES_SIZE, 1.0)) != inst_ok) { - amutex_unlock(p->lock); - return ev; - } - if (sscanf(buf, "%d %d %d",&wstart,&wend,&wstep) != 3) { - amutex_unlock(p->lock); - a1loge(p->log, 1, "specbos_init_inst: failed to parse wavelength range\n"); - return ev; + if ((ev = specbos_command(p, "*para:wran?\r", buf, MAX_MES_SIZE, 1.0)) != inst_ok) { + if (i < 3) + continue; + amutex_unlock(p->lock); + return ev; + } + if (sscanf(buf, "%d %d %d",&wstart,&wend,&wstep) != 3) { + if (i < 3) + continue; + amutex_unlock(p->lock); + a1loge(p->log, 1, "specbos_init_inst: failed to parse wavelength range\n"); + return specbos_interp_code((inst *)p, SPECBOS_DATA_PARSE_ERROR); + + } else { + break; + } } p->wl_short = (double)wstart; @@ -679,7 +780,7 @@ specbos_init_inst(inst *pp) { if (sscanf(buf, "Predefined start wave: %lf ",&p->wl_short) != 1) { amutex_unlock(p->lock); a1loge(p->log, 1, "specbos_init_inst: failed to parse start wave\n"); - return ev; + return specbos_interp_code((inst *)p, SPECBOS_DATA_PARSE_ERROR); } a1logd(p->log, 1, " Short wl range %f\n",p->wl_short); @@ -690,7 +791,7 @@ specbos_init_inst(inst *pp) { if (sscanf(buf, "Predefined end wave: %lf ",&p->wl_long) != 1) { amutex_unlock(p->lock); a1loge(p->log, 1, "specbos_init_inst: failed to parse end wave\n"); - return ev; + return specbos_interp_code((inst *)p, SPECBOS_DATA_PARSE_ERROR); } if (p->wl_long > 830.0) /* Could go to 1000 with 1211 */ p->wl_long = 830.0; /* Limit it to useful visual range */ @@ -807,13 +908,13 @@ specbos_get_target_laser( } if (p->model == 1501 || p->model == 1511) { if (sscanf(buf, "%d ",&lstate) != 1) { - a1loge(p->log, 2, "specbos_get_target_laser: failed to parse laser state\n"); - return inst_protocol_error; + a1logd(p->log, 1, "specbos_get_target_laser: failed to parse laser state\n"); + return specbos_interp_code((inst *)p, SPECBOS_DATA_PARSE_ERROR); } } else { if (sscanf(buf, "laser: %d ",&lstate) != 1) { - a1loge(p->log, 2, "specbos_get_target_laser: failed to parse laser state\n"); - return inst_protocol_error; + a1logd(p->log, 1, "specbos_get_target_laser: failed to parse laser state\n"); + return specbos_interp_code((inst *)p, SPECBOS_DATA_PARSE_ERROR); } } *laser = lstate; @@ -956,9 +1057,18 @@ instClamping clamp) { /* NZ if clamp XYZ/Lab to be +ve */ } } + /* If we have a requested number of averages */ + if (p->noaverage != 0) { + if ((rv = set_average(p, p->noaverage, 0)) != inst_ok) + return rv; + /* Set to average 10 readings for transmission */ - if ((p->mode & inst_mode_illum_mask) == inst_mode_transmission) { - if ((rv = set_average(p, 10, 0)) != inst_ok) + } else if ((p->mode & inst_mode_illum_mask) == inst_mode_transmission) { + if ((rv = set_average(p, DEFAULT_TRANS_NAV, 0)) != inst_ok) + return rv; + /* Or default 1 otherwise */ + } else { + if ((rv = set_average(p, DEFAULT_NAV, 0)) != inst_ok) return rv; } @@ -1037,7 +1147,7 @@ instClamping clamp) { /* NZ if clamp XYZ/Lab to be +ve */ &val->XYZ[0], &val->XYZ[1], &val->XYZ[2]) != 3) { amutex_unlock(p->lock); a1logd(p->log, 1, "specbos_read_sample: failed to parse '%s'\n",buf); - return inst_protocol_error; + return specbos_interp_code((inst *)p, SPECBOS_DATA_PARSE_ERROR); } /* Hmm. Some older firmware versions are reported to not support the */ @@ -1048,7 +1158,7 @@ instClamping clamp) { /* NZ if clamp XYZ/Lab to be +ve */ p->noXYZ = 1; if (p->model == 1501 || p->model == 1511) { - if ((ec = specbos_fcommand(p, "*calc:PHOTOmetric\r", buf, MAX_RD_SIZE, 0.5, 1, tnorm, 0)) + if ((ec = specbos_fcommand(p, "*calc:PHOTOmetric\r", buf, MAX_RD_SIZE, 1.0, 1, tnorm, 0)) != SPECBOS_OK) { amutex_unlock(p->lock); return specbos_interp_code((inst *)p, ec); @@ -1056,7 +1166,7 @@ instClamping clamp) { /* NZ if clamp XYZ/Lab to be +ve */ if (sscanf(buf, "%lf ", &Yxy[0]) != 1) { amutex_unlock(p->lock); a1logd(p->log, 1, "specbos_read_sample: failed to parse '%s'\n",buf); - return inst_protocol_error; + return specbos_interp_code((inst *)p, SPECBOS_DATA_PARSE_ERROR); } } else { if ((ec = specbos_fcommand(p, "*fetch:PHOTOmetric\r", buf, MAX_RD_SIZE, 0.5, 1, tnorm, 0)) @@ -1067,7 +1177,7 @@ instClamping clamp) { /* NZ if clamp XYZ/Lab to be +ve */ if (sscanf(buf, "Luminance[cd/m^2]: %lf ", &Yxy[0]) != 1) { amutex_unlock(p->lock); a1logd(p->log, 1, "specbos_read_sample: failed to parse '%s'\n",buf); - return inst_protocol_error; + return specbos_interp_code((inst *)p, SPECBOS_DATA_PARSE_ERROR); } } @@ -1080,7 +1190,7 @@ instClamping clamp) { /* NZ if clamp XYZ/Lab to be +ve */ if (sscanf(buf, " %lf %lf ", &Yxy[1], &Yxy[2]) != 2) { amutex_unlock(p->lock); a1logd(p->log, 1, "specbos_read_sample: failed to parse '%s'\n",buf); - return inst_protocol_error; + return specbos_interp_code((inst *)p, SPECBOS_DATA_PARSE_ERROR); } } else { if ((ec = specbos_fcommand(p, "*fetch:CHROMXY\r", buf, MAX_RD_SIZE, 0.5, 1, tnorm, 0)) @@ -1147,10 +1257,10 @@ instClamping clamp) { /* NZ if clamp XYZ/Lab to be +ve */ /* Fetch the spectral readings */ if (p->model == 1501 || p->model == 1511) - ec = specbos_fcommand(p, "*calc:sprad\r", buf, MAX_RD_SIZE, 4.0, + ec = specbos_fcommand(p, "*calc:sprad\r", buf, MAX_RD_SIZE, 6.0, 1, tspec, 0); else - ec = specbos_fcommand(p, "*fetch:sprad\r", buf, MAX_RD_SIZE, 4.0, + ec = specbos_fcommand(p, "*fetch:sprad\r", buf, MAX_RD_SIZE, 6.0, 2+p->nbands+1, tnorm, 0); if (ec != SPECBOS_OK) { a1logd(p->log, 1, "specbos_fcommand: failed with 0x%x\n",ec); @@ -1196,7 +1306,7 @@ instClamping clamp) { /* NZ if clamp XYZ/Lab to be +ve */ try_again:; } if (tries >= maxtries) { - a1logd(p->log, 1, "specbos_fcommand: ran out of retries\n"); + a1logd(p->log, 1, "specbos_fcommand: ran out of retries - parsing error ?\n"); amutex_unlock(p->lock); return inst_protocol_error; } @@ -1616,7 +1726,7 @@ char id[CALIDLEN] /* Condition identifier (ie. white reference ID) */ p->mode = inst_mode_emis_tele | inst_mode_spectral; p->doing_cal = 1; - /* Set to average 50 readings */ + /* Set to average 50 readings for calibration */ if ((ev = set_average(p, 50, 1)) != inst_ok) return ev; @@ -1982,9 +2092,9 @@ specbos_del(inst *pp) { if (p->th != NULL) { /* Terminate diffuser monitor thread */ int i; p->th_term = 1; /* Tell thread to exit on error */ - for (i = 0; p->th_termed == 0 && i < 5; i++) + for (i = 0; p->th_termed == 0 && i < 50; i++) msec_sleep(100); /* Wait for thread to terminate */ - if (i >= 5) { + if (i >= 50) { a1logd(p->log,3,"specbos diffuser thread termination failed\n"); } p->th->del(p->th); @@ -2007,6 +2117,7 @@ inst3_capability *pcap3) { specbos *p = (specbos *)pp; inst_mode cap1 = 0; inst2_capability cap2 = 0; + inst3_capability cap3 = 0; cap1 |= inst_mode_emis_tele | inst_mode_trans_spot /* Emulated transmission mode diffuse/90 */ @@ -2034,12 +2145,15 @@ inst3_capability *pcap3) { cap2 |= inst2_get_refresh_rate; } + /* Can average multiple measurements */ + cap3 |= inst3_average; + if (pcap1 != NULL) *pcap1 = cap1; if (pcap2 != NULL) *pcap2 = cap2; if (pcap3 != NULL) - *pcap3 = inst3_none; + *pcap3 = cap3; } /* Return current or given configuration available measurement modes. */ @@ -2368,6 +2482,24 @@ specbos_get_set_opt(inst *pp, inst_opt_type m, ...) { if (!p->inited) return inst_no_init; + if (m == inst_opt_set_averages) { + va_list args; + int nav = 1; + + va_start(args, m); + nav = va_arg(args, int); + va_end(args); + + if (nav < 0) + return inst_bad_parameter; + + p->noaverage = nav; + + /* Averages will get set before each measurement */ + + return inst_ok; + } + /* Use default implementation of other inst_opt_type's */ { inst_code rv; @@ -2382,7 +2514,7 @@ specbos_get_set_opt(inst *pp, inst_opt_type m, ...) { } /* Constructor */ -extern specbos *new_specbos(icoms *icom, instType itype) { +extern specbos *new_specbos(icoms *icom, instType dtype) { specbos *p; if ((p = (specbos *)calloc(sizeof(specbos),1)) == NULL) { a1loge(icom->log, 1, "new_specbos: malloc failed!\n"); @@ -2410,12 +2542,14 @@ extern specbos *new_specbos(icoms *icom, instType itype) { p->del = specbos_del; p->icom = icom; - p->itype = itype; - if (p->itype == instSpecbos1201) + p->dtype = dtype; + if (p->dtype == instSpecbos1201) p->model = 1201; amutex_init(p->lock); + p->noaverage = 1; + return p; } diff --git a/spectro/specbos.h b/spectro/specbos.h index 5c89fd5..ef6fc2f 100644..100755 --- a/spectro/specbos.h +++ b/spectro/specbos.h @@ -160,6 +160,9 @@ struct _specbos { int doing_cal; /* Flag - doing internal calibration measure */ /* Other state */ + int noaverage; /* Current setting of number of measurements to average */ + /* 0 for default */ + athread *th; /* Diffuser position monitoring thread */ volatile int th_term; /* nz to terminate thread */ volatile int th_termed; /* nz when thread terminated */ diff --git a/spectro/spotread.c b/spectro/spotread.c index c5ac955..16f6f2d 100644..100755 --- a/spectro/spotread.c +++ b/spectro/spotread.c @@ -277,7 +277,7 @@ usage(char *diag, ...) { #ifndef SALONEINSTLIB fprintf(stderr," -S Plot spectrum for each reading\n"); #endif /* !SALONEINSTLIB */ - fprintf(stderr," -c listno Set communication port from the following list (default %d)\n",COMPORT); + fprintf(stderr," -c listno Set instrument port from the following list (default %d)\n",COMPORT); if ((icmps = new_icompaths(g_log)) != NULL) { icompath **paths; if ((paths = icmps->paths) != NULL) { @@ -286,8 +286,8 @@ usage(char *diag, ...) { if (paths[i] == NULL) break; #if !defined(NOT_ALLINSTS) || defined(EN_SPYD2) - if ((paths[i]->itype == instSpyder1 && setup_spyd2(0) == 0) - || (paths[i]->itype == instSpyder2 && setup_spyd2(1) == 0)) + if ((paths[i]->dtype == instSpyder1 && setup_spyd2(0) == 0) + || (paths[i]->dtype == instSpyder2 && setup_spyd2(1) == 0)) fprintf(stderr," %d = '%s' !! Disabled - no firmware !!\n",i+1,paths[i]->name); else #endif @@ -318,9 +318,9 @@ usage(char *diag, ...) { #endif fprintf(stderr," -Q observ Choose CIE Observer for spectral data or CCSS instrument:\n"); #ifndef SALONEINSTLIB - fprintf(stderr," 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2\n"); + fprintf(stderr," 1931_2 (def), 1964_10, 2012_2, 2012_10, S&B 1955_2, shaw, J&V 1978_2 or file.cmf\n"); #else - fprintf(stderr," 1931_2 (def), 1964_10\n"); + fprintf(stderr," 1931_2 (def), 1964_10, 2012_2, 2012_10 or file.cmf\n"); #endif #ifndef SALONEINSTLIB fprintf(stderr," (Choose FWA during operation)\n"); @@ -334,6 +334,9 @@ usage(char *diag, ...) { fprintf(stderr," -A N|A|X|G XRGA conversion (default N)\n"); fprintf(stderr," -x Display Yxy instead of Lab\n"); fprintf(stderr," -h Display LCh instead of Lab\n"); +#ifndef SALONEINSTLIB + fprintf(stderr," -u Display Yuv instead of Lab\n"); +#endif fprintf(stderr," -V Show running average and std. devation from ref.\n"); #ifndef SALONEINSTLIB fprintf(stderr," -T Display correlated color temperatures, CRI and TLCI\n"); @@ -354,6 +357,7 @@ usage(char *diag, ...) { fprintf(stderr," -Y R:rate Override measured refresh rate with rate Hz\n"); fprintf(stderr," -Y A Use non-adaptive integration time mode (if available).\n"); fprintf(stderr," -Y l|L Test for i1Pro Lamp Drift (l), and remediate it (L)\n"); + fprintf(stderr," -Y a Use Averaging mode (if available).\n"); // fprintf(stderr," -Y U Test i1pro2 UV measurement mode\n"); #ifndef SALONEINSTLIB fprintf(stderr," -Y W:fname.sp Save white tile ref. spectrum to file\n"); @@ -389,8 +393,12 @@ int main(int argc, char *argv[]) { int refrmode = -1; /* -1 = default, 0 = non-refresh mode, 1 = refresh mode */ double refrate = 0.0; /* 0.0 = default, > 0.0 = override refresh rate */ int nadaptive = 0; /* Use non-apative mode if available */ + int averagemode = 0; /* Use averaging mode if available */ int doYxy= 0; /* Display Yxy instead of Lab */ int doLCh= 0; /* Display LCh instead of Lab */ +#ifndef SALONEINSTLIB + int doYuv= 0; /* Display Yuv instead of Lab */ +#endif int doCCT= 0; /* Display correlated color temperatures */ inst_mode mode = 0, smode = 0; /* Normal mode and saved readings mode */ inst_opt_type trigmode = inst_opt_unknown; /* Chosen trigger mode */ @@ -423,6 +431,7 @@ int main(int argc, char *argv[]) { icxIllumeType illum = icxIT_D50; /* Spectral defaults */ xspect cust_illum; /* Custom illumination spectrum */ icxObserverType obType = icxOT_default; + xspect custObserver[3]; /* If obType = icxOT_custom */ xspect sp; /* Last spectrum read */ xspect rsp; /* Reference spectrum */ xsp2cie *sp2cie = NULL; /* default conversion */ @@ -435,6 +444,9 @@ int main(int argc, char *argv[]) { double rLab[3] = { -10.0, 0, 0}; /* Reference Lab */ double Yxy[3] = { 0.0, 0, 0}; /* Yxy value */ double LCh[3] = { 0.0, 0, 0}; /* LCh value */ +#ifndef SALONEINSTLIB + double Yuv[3] = { 0.0, 0, 0}; /* Yuv value */ +#endif double refstats = 0; /* Print running avg & stddev against ref */ double rstat_n; /* Stats N */ double rstat_XYZ[3]; /* Stats sum of XYZ's */ @@ -616,6 +628,10 @@ int main(int argc, char *argv[]) { obType = icxOT_CIE_1931_2; } else if (strcmp(na, "1964_10") == 0) { /* Classic 10 degree */ obType = icxOT_CIE_1964_10; + } else if (strcmp(na, "2012_2") == 0) { /* Latest 2 degree */ + obType = icxOT_CIE_2012_2; + } else if (strcmp(na, "2012_10") == 0) { /* Latest 10 degree */ + obType = icxOT_CIE_2012_10; #ifndef SALONEINSTLIB } else if (strcmp(na, "1955_2") == 0) { /* Stiles and Burch 1955 2 degree */ obType = icxOT_Stiles_Burch_2; @@ -624,8 +640,11 @@ int main(int argc, char *argv[]) { } else if (strcmp(na, "shaw") == 0) { /* Shaw and Fairchilds 1997 2 degree */ obType = icxOT_Shaw_Fairchild_2; #endif /* !SALONEINSTLIB */ - } else - usage("Spectral observer type '%s' not recognised",na); + } else { + obType = icxOT_custom; + if (read_cmf(custObserver, na) != 0) + usage(0,"Failed to read custom observer CMF from -Q file '%s'",na); + } /* Request transmission measurement */ } else if (argv[fa][1] == 't') { @@ -730,11 +749,25 @@ int main(int argc, char *argv[]) { } else if (argv[fa][1] == 'x') { doYxy = 1; doLCh = 0; +#ifndef SALONEINSTLIB + doYuv = 0; +#endif /* Show LCh */ } else if (argv[fa][1] == 'h') { doYxy = 0; doLCh = 1; +#ifndef SALONEINSTLIB + doYuv = 0; +#endif + +#ifndef SALONEINSTLIB + /* Show Yuv */ + } else if (argv[fa][1] == 'u') { + doYxy = 0; + doLCh = 0; + doYuv = 1; +#endif /* Compute running average and standard deviation from ref. */ /* Also turns off clamping */ @@ -792,6 +825,8 @@ int main(int argc, char *argv[]) { if (na[0] == 'A') { nadaptive = 1; + } else if (na[0] == 'a') { + averagemode = 1; } else if (na[0] == 'r') { refrmode = 1; } else if (na[0] == 'n') { @@ -936,8 +971,8 @@ int main(int argc, char *argv[]) { double remtime = 0.0; int cooltime = 30; - if (it->itype != instI1Pro - && it->itype != instI1Pro2) { + if (it->dtype != instI1Pro + && it->dtype != instI1Pro2) { printf("LampDrift is only applicable to i1Pro instrument"); } @@ -1289,6 +1324,18 @@ int main(int argc, char *argv[]) { } it->capabilities(it, &cap, &cap2, &cap3); + /* If requested, average several readings (i.e. JETI 1211) */ + if (averagemode) { + if (!IMODETST(cap3, inst3_average)) { + if (verb) + printf("Requested averaging mode and instrument doesn't support it (ignored)\n"); + averagemode = 0; + } else if ((rv = it->get_set_opt(it, inst_opt_set_averages, 10)) != inst_ok) { + printf("Setting no of averages to 10 failed with '%s' (%s) !!!\n", + it->inst_interp_error(it, rv), it->interp_error(it, rv)); + } + } + /* Apply Extra filter compensation */ if (filtername[0] != '\000') { if ((rv = it->comp_filter(it, filtername)) != inst_ok) { @@ -1356,7 +1403,7 @@ int main(int argc, char *argv[]) { it->del(it); return -1; } - if ((rv = it->get_set_opt(it, inst_opt_set_ccss_obs, obType, NULL)) != inst_ok) { + if ((rv = it->get_set_opt(it, inst_opt_set_ccss_obs, obType, custObserver)) != inst_ok) { printf("\nSetting CCS Observer failed with error :'%s' (%s)\n", it->inst_interp_error(it, rv), it->interp_error(it, rv)); cs->del(cs); @@ -1392,7 +1439,7 @@ int main(int argc, char *argv[]) { /* If non-standard observer wasn't set by a CCSS file above */ if (obType != icxOT_default && (cap2 & inst2_ccss) && ccssset == 0) { - if ((rv = it->get_set_opt(it, inst_opt_set_ccss_obs, obType, 0)) != inst_ok) { + if ((rv = it->get_set_opt(it, inst_opt_set_ccss_obs, obType, custObserver)) != inst_ok) { printf("\nSetting CCSS Observer failed with error :'%s' (%s)\n", it->inst_interp_error(it, rv), it->interp_error(it, rv)); it->del(it); @@ -1500,7 +1547,7 @@ int main(int argc, char *argv[]) { illum = icxIT_none; /* Create a spectral conversion object */ - if ((sp2cie = new_xsp2cie(illum, &cust_illum, obType, NULL, icSigXYZData, + if ((sp2cie = new_xsp2cie(illum, &cust_illum, obType, custObserver, icSigXYZData, refstats ? icxNoClamp : icxClamp)) == NULL) error("Creation of spectral conversion object failed"); @@ -1573,6 +1620,7 @@ int main(int argc, char *argv[]) { #ifndef SALONEINSTLIB double cct, vct, vdt; double cct_de, vct_de, vdt_de; + double cct_sn, vct_sn, vdt_sn; /* Sign: 1 + above, -1 = below */ #endif /* !SALONEINSTLIB */ int ch = '0'; /* Character */ int sufwa = 0; /* Setup for FWA compensation */ @@ -2087,6 +2135,9 @@ int main(int argc, char *argv[]) { if (ch == 'K' || ch == 'k') { /* Do a calibration */ inst_code ev; + /* Should we do a get_n_a_cals() first, so we can abort */ + /* if no calibrations are available ?? */ + printf("\nDoing a calibration\n"); /* save current location */ @@ -2265,7 +2316,7 @@ int main(int argc, char *argv[]) { /* Creat the base conversion object */ if (sp2cief[fidx] == NULL) { if ((sp2cief[fidx] = new_xsp2cie(illum, &cust_illum, obType, - NULL, icSigXYZData, refstats ? icxNoClamp : icxClamp)) == NULL) + custObserver, icSigXYZData, refstats ? icxNoClamp : icxClamp)) == NULL) error("Creation of spectral conversion object failed"); } @@ -2404,24 +2455,36 @@ int main(int argc, char *argv[]) { icmXYZNumber wp; double nxyz[3], axyz[3]; double lab[3], alab[3]; + double yxy[3], ayxy[3]; + /* Y normalized sample */ nxyz[0] = XYZ[0] / XYZ[1]; nxyz[2] = XYZ[2] / XYZ[1]; nxyz[1] = XYZ[1] / XYZ[1]; /* Compute CCT */ - if ((cct = icx_XYZ2ill_ct(axyz, icxIT_Ptemp, obType, NULL, XYZ, NULL, 0)) < 0) + if ((cct = icx_XYZ2ill_ct(axyz, icxIT_Ptemp, obType, custObserver, nxyz, NULL, 0)) < 0) error ("Got bad cct\n"); axyz[0] /= axyz[1]; axyz[2] /= axyz[1]; axyz[1] /= axyz[1]; - icmAry2XYZ(wp, axyz); - icmXYZ2Lab(&wp, lab, nxyz); - icmXYZ2Lab(&wp, alab, axyz); - cct_de = icmLabDE(lab, alab); + icmXYZ21960UCS(lab, nxyz); + icmXYZ21960UCS(alab, axyz); + cct_de = sqrt((lab[1] - alab[1]) * (lab[1] - alab[1]) + + (lab[2] - alab[2]) * (lab[2] - alab[2])); + + + cct_sn = 1.0; + icmXYZ2Yxy(yxy, nxyz); + icmXYZ2Yxy(ayxy, axyz); + /* Dot product of vector from aprox. locus curve "center" */ + /* xy 0.5, 0.25 with vector from */ + if ((yxy[1] - ayxy[1]) * (ayxy[1] - 0.5) + + (yxy[2] - ayxy[2]) * (ayxy[2] - 0.25) < 0.0) + cct_sn = -1.0; /* Compute VCT */ - if ((vct = icx_XYZ2ill_ct(axyz, icxIT_Ptemp, obType, NULL, XYZ, NULL, 1)) < 0) + if ((vct = icx_XYZ2ill_ct(axyz, icxIT_Ptemp, obType, custObserver, nxyz, NULL, 1)) < 0) error ("Got bad vct\n"); axyz[0] /= axyz[1]; axyz[2] /= axyz[1]; @@ -2429,10 +2492,17 @@ int main(int argc, char *argv[]) { icmAry2XYZ(wp, axyz); icmXYZ2Lab(&wp, lab, nxyz); icmXYZ2Lab(&wp, alab, axyz); - vct_de = icmLabDE(lab, alab); - + vct_de = icmCIE2K(lab, alab); + + vct_sn = 1.0; + icmXYZ2Yxy(yxy, nxyz); + icmXYZ2Yxy(ayxy, axyz); + if ((yxy[1] - ayxy[1]) * (ayxy[1] - 0.5) + + (yxy[2] - ayxy[2]) * (ayxy[2] - 0.25) < 0.0) + vct_sn = -1.0; + /* Compute VDT */ - if ((vdt = icx_XYZ2ill_ct(axyz, icxIT_Dtemp, obType, NULL, XYZ, NULL, 1)) < 0) + if ((vdt = icx_XYZ2ill_ct(axyz, icxIT_Dtemp, obType, custObserver, nxyz, NULL, 1)) < 0) error ("Got bad vct\n"); axyz[0] /= axyz[1]; axyz[2] /= axyz[1]; @@ -2440,7 +2510,14 @@ int main(int argc, char *argv[]) { icmAry2XYZ(wp, axyz); icmXYZ2Lab(&wp, lab, nxyz); icmXYZ2Lab(&wp, alab, axyz); - vdt_de = icmLabDE(lab, alab); + vdt_de = icmCIE2K(lab, alab); + + vdt_sn = 1.0; + icmXYZ2Yxy(yxy, nxyz); + icmXYZ2Yxy(ayxy, axyz); + if ((yxy[1] - ayxy[1]) * (ayxy[1] - 0.5) + + (yxy[2] - ayxy[2]) * (ayxy[2] - 0.25) < 0.0) + vdt_sn = -1.0; } /* Compute D50 Lab from XYZ */ @@ -2452,6 +2529,9 @@ int main(int argc, char *argv[]) { /* Compute LCh from Lab */ icmLab2LCh(LCh, Lab); + /* Compute D50 Yuv from XYZ */ + icmXYZ21976UCS(Yuv, XYZ); + #else /* SALONEINSTLIB */ /* Compute D50 Lab from XYZ */ XYZ2Lab(Lab, XYZ); @@ -2503,6 +2583,9 @@ int main(int argc, char *argv[]) { /* recompute LCh from Lab */ icmLab2LCh(LCh, Lab); + + /* recompute Yuv */ + icmXYZ21976UCS(Yuv, XYZ); #else /* SALONEINSTLIB */ else { @@ -2534,6 +2617,12 @@ int main(int argc, char *argv[]) { /* Print out the XYZ and LCh */ printf("\n Result is XYZ: %f %f %f, LCh: %f %f %f\n", XYZ[0], XYZ[1], XYZ[2], LCh[0], LCh[1], LCh[2]); +#ifndef SALONEINSTLIB + } else if (doYuv) { + /* Print out the XYZ and Yuv */ + printf("\n Result is XYZ: %f %f %f, Yuv: %f %f %f\n", + XYZ[0], XYZ[1], XYZ[2], Yuv[0], Yuv[1], Yuv[2]); +#endif } else { /* Print out the XYZ and Lab */ printf("\n Result is XYZ: %f %f %f, D50 Lab: %f %f %f\n", @@ -2588,15 +2677,15 @@ int main(int argc, char *argv[]) { log(XYZ[1]/2.5)/log(2.0)); } else { #ifndef SALONEINSTLIB - printf(" Ambient = %.1f Lux%s, CCT = %.0fK (Delta E %f)\n", + printf(" Ambient = %.1f Lux%s, CCT = %.0fK (Duv %.4f)\n", XYZ[1], ambient == 2 ? "-Seconds" : "", - cct, cct_de); + cct, cct_sn * cct_de); if (ambient != 2) printf(" Suggested EV @ ISO100 for %.1f Lux incident light = %.1f\n", XYZ[1], log(XYZ[1]/2.5)/log(2.0)); - printf(" Closest Planckian temperature = %.0fK (Delta E %f)\n",vct, vct_de); - printf(" Closest Daylight temperature = %.0fK (Delta E %f)\n",vdt, vdt_de); + printf(" Closest Planckian temperature = %.0fK (DE2K %.1f)\n",vct, vct_sn * vct_de); + printf(" Closest Daylight temperature = %.0fK (DE2K %.1f)\n",vdt, vdt_sn * vdt_de); #else /* SALONEINSTLIB */ printf(" Ambient = %.1f Lux%s\n", XYZ[1], ambient == 2 ? "-Seconds" : ""); @@ -2604,9 +2693,9 @@ int main(int argc, char *argv[]) { } #ifndef SALONEINSTLIB } else if (doCCT) { - printf(" CCT = %.0fK (Delta E %f)\n",cct, cct_de); - printf(" Closest Planckian temperature = %.0fK (Delta E %f)\n",vct, vct_de); - printf(" Closest Daylight temperature = %.0fK (Delta E %f)\n",vdt, vdt_de); + printf(" CCT = %.0fK (Duv %.4f)\n",cct, cct_sn * cct_de); + printf(" Closest Planckian temperature = %.0fK (DE2K %.1f)\n",vct, vct_sn * vct_de); + printf(" Closest Daylight temperature = %.0fK (DE2K %.1f)\n",vdt, vdt_sn * vdt_de); #endif } #ifndef SALONEINSTLIB @@ -2616,7 +2705,7 @@ int main(int argc, char *argv[]) { double cri; cri = icx_CIE1995_CRI(&invalid, RR, &sp); printf(" Color Rendering Index (Ra) = %.1f [ R9 = %.1f ]%s\n", - cri, RR[9-1], invalid ? " (Invalid)" : ""); + cri, RR[9-1], invalid ? " (Caution)" : ""); for (i = 0; i < 14; i++) { printf(" R%d%s = %.1f", i+1, i < 9 ? " " : "", RR[i]); if (i == 6) @@ -2628,7 +2717,7 @@ int main(int argc, char *argv[]) { int invalid = 0; double tlci; tlci = icx_EBU2012_TLCI(&invalid, &sp); - printf(" Television Lighting Consistency Index 2012 (Qa) = %.1f%s\n",tlci,invalid ? " (Invalid)" : ""); + printf(" Television Lighting Consistency Index 2012 (Qa) = %.1f%s\n",tlci,invalid ? " (Caution)" : ""); } #endif diff --git a/spectro/spyd2.c b/spectro/spyd2.c index 85a2d7f..28051f3 100644..100755 --- a/spectro/spyd2.c +++ b/spectro/spyd2.c @@ -95,6 +95,7 @@ #include "sa_config.h" #include "numsup.h" #endif /* SALONEINSTLIB */ +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -2677,7 +2678,7 @@ spyd2_download_pld( int i; int id; - if (p->itype == instSpyder1) + if (p->dtype == instSpyder1) id = 0; else id = 1; @@ -2748,7 +2749,7 @@ spyd4_load_cal(spyd2 *p) { for (;;) { /* So we can break */ - if ((no_paths = xdg_bds(NULL, &bin_paths, xdg_data, xdg_read, xdg_user, + if ((no_paths = xdg_bds(NULL, &bin_paths, xdg_data, xdg_read, xdg_user, xdg_none, "ArgyllCMS/spyd4cal.bin" XDG_FUDGE "color/spyd4cal.bin" )) < 1) break; @@ -2884,15 +2885,15 @@ spyd2_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { /* it needs icomuf_resetep_before_read to work at all, and */ /* gets retries anyway. So we use the libusb-win32 driver for it. */ #if defined(NT) - if (p->itype == instSpyder3) { + if (p->dtype == instSpyder3) { usbflags |= icomuf_resetep_before_read; /* The spyder USB is buggy ? */ } #endif /* On OS X the Spyder 2 can't close properly */ #if defined(UNIX_APPLE) /* OS X*/ - if (p->itype == instSpyder1 - || p->itype == instSpyder2) { + if (p->dtype == instSpyder1 + || p->dtype == instSpyder2) { usbflags |= icomuf_reset_before_close; /* The spyder 2 USB is buggy ? */ } #endif @@ -2901,8 +2902,8 @@ spyd2_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { #if defined(UNIX_X11) /* Linux*/ /* On Linux the Spyder 2 doesn't work reliably unless each */ /* read is preceeded by a reset endpoint. */ - if (p->itype == instSpyder1 - || p->itype == instSpyder2) { + if (p->dtype == instSpyder1 + || p->dtype == instSpyder2) { usbflags |= icomuf_resetep_before_read; /* The spyder USB is buggy ? */ } #endif @@ -2937,11 +2938,11 @@ spyd2_init_inst(inst *pp) { if (p->gotcoms == 0) /* Must establish coms before calling init */ return spyd2_interp_code((inst *)p, SPYD2_NO_COMS); - if (p->itype != instSpyder1 - && p->itype != instSpyder2 - && p->itype != instSpyder3 - && p->itype != instSpyder4 - && p->itype != instSpyder5) + if (p->dtype != instSpyder1 + && p->dtype != instSpyder2 + && p->dtype != instSpyder3 + && p->dtype != instSpyder4 + && p->dtype != instSpyder5) return spyd2_interp_code((inst *)p, SPYD2_UNKNOWN_MODEL); p->refrate = DEFRRATE; @@ -2950,9 +2951,9 @@ spyd2_init_inst(inst *pp) { p->prevrawinv = 0; /* prevraw is valid */ /* For Spyder 1 & 2, reset the hardware and wait for it to become ready. */ - if (p->itype != instSpyder3 - && p->itype != instSpyder4 - && p->itype != instSpyder5) { + if (p->dtype != instSpyder3 + && p->dtype != instSpyder4 + && p->dtype != instSpyder5) { /* Reset the instrument */ if ((ev = spyd2_reset(p)) != inst_ok) @@ -3038,7 +3039,7 @@ spyd2_init_inst(inst *pp) { a1logv(p->log, 1, "Instrument Type: %s\n" "Serial Number: %s\n" "Hardware version: 0x%02x%02x\n" - ,inst_name(p->itype) ,p->serno ,p->hwver,p->fbits); + ,inst_name(p->dtype) ,p->serno ,p->hwver,p->fbits); return inst_ok; } @@ -3504,9 +3505,9 @@ inst3_capability *pcap3) { /* We don't seem to have a way of detecting the lack */ /* of ambinent capability, short of doing a read */ /* and noticing the result is zero. */ - if (p->itype == instSpyder3 - || p->itype == instSpyder4 - || p->itype == instSpyder5) { + if (p->dtype == instSpyder3 + || p->dtype == instSpyder4 + || p->dtype == instSpyder5) { cap1 |= inst_mode_emis_ambient; } @@ -3518,9 +3519,9 @@ inst3_capability *pcap3) { | inst2_emis_refr_meas ; - if (p->itype == instSpyder3 - || p->itype == instSpyder4 - || p->itype == instSpyder5) { + if (p->dtype == instSpyder3 + || p->dtype == instSpyder4 + || p->dtype == instSpyder5) { cap2 |= inst2_disptype; cap2 |= inst2_has_leds; cap2 |= inst2_ambient_mono; @@ -3528,8 +3529,8 @@ inst3_capability *pcap3) { cap2 |= inst2_disptype; } - if (p->itype == instSpyder4 - || p->itype == instSpyder5) + if (p->dtype == instSpyder4 + || p->dtype == instSpyder5) cap2 |= inst2_ccss; /* Spyder4 & 5 has spectral sensivities */ if (pcap1 != NULL) @@ -3747,8 +3748,8 @@ static inst_disptypesel spyd4_disptypesel[8] = { static void set_base_disptype_list(spyd2 *p) { /* set the base display type list */ - if (p->itype == instSpyder4 - || p->itype == instSpyder5) { + if (p->dtype == instSpyder4 + || p->dtype == instSpyder5) { if (spyd4_nocals <= 1) { p->_dtlist = spyd4_disptypesel_1; } else { /* spyd4_nocals == 6 or 7, Spyder 4 or 5. */ @@ -3757,7 +3758,7 @@ static void set_base_disptype_list(spyd2 *p) { /* So use the spyder 4 list */ p->_dtlist = spyd4_disptypesel; } - } else if (p->itype == instSpyder3) { + } else if (p->dtype == instSpyder3) { p->_dtlist = spyd3_disptypesel; } else { p->_dtlist = spyd2_disptypesel; @@ -4079,7 +4080,7 @@ spyd2_get_set_opt(inst *pp, inst_opt_type m, ...) { } /* Constructor */ -extern spyd2 *new_spyd2(icoms *icom, instType itype) { +extern spyd2 *new_spyd2(icoms *icom, instType dtype) { spyd2 *p; if ((p = (spyd2 *)calloc(sizeof(spyd2),1)) == NULL) { a1loge(icom->log, 1, "new_spyd2: malloc failed!\n"); @@ -4109,11 +4110,11 @@ extern spyd2 *new_spyd2(icoms *icom, instType itype) { p->del = spyd2_del; p->icom = icom; - p->itype = itype; + p->dtype = dtype; /* Load manufacturers Spyder4 calibrations */ - if (itype == instSpyder4 - || itype == instSpyder5) { + if (dtype == instSpyder4 + || dtype == instSpyder5) { int rv; p->hwver = 7; /* Set preliminary version */ if ((rv = spyd4_load_cal(p)) != SPYD2_OK) @@ -4121,11 +4122,11 @@ extern spyd2 *new_spyd2(icoms *icom, instType itype) { if (spyd4_nocals < 1) a1logd(p->log, 1, "Spyder4 choice of calibrations not available\n"); } - if (itype == instSpyder3) { + if (dtype == instSpyder3) { p->hwver = 4; /* Set preliminary version */ } - if (itype == instSpyder1 // ???? - || itype == instSpyder2) { + if (dtype == instSpyder1 // ???? + || dtype == instSpyder2) { p->hwver = 3; /* Set preliminary version */ } @@ -4164,7 +4165,8 @@ int setup_spyd2(int id) { else p1 = "ArgyllCMS/spyd2PLD.bin" XDG_FUDGE "color/spyd2PLD.bin"; - if ((no_paths = xdg_bds(NULL, &bin_paths, xdg_data, xdg_read, xdg_user, p1)) < 1) { + if ((no_paths = xdg_bds(NULL, &bin_paths, xdg_data, xdg_read, xdg_user, xdg_none, + p1)) < 1) { a1logd(g_log, 1, "setup_spyd2: failed to find PLD file on path '%s'\n",p1); break; } diff --git a/spectro/spyd2.h b/spectro/spyd2.h index 318ed7c..318ed7c 100644..100755 --- a/spectro/spyd2.h +++ b/spectro/spyd2.h diff --git a/spectro/ss.c b/spectro/ss.c index 260df4a..4f95fdb 100644..100755 --- a/spectro/ss.c +++ b/spectro/ss.c @@ -76,6 +76,7 @@ #include "sa_config.h" #include "numsup.h" #endif /* SALONEINSTLIB */ +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" @@ -223,7 +224,7 @@ ss_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { ss_command(p, SH_TMO); if (ss_sub_1(p) == ss_AnsPFX) { /* Got comms */ - p->itype = instSpectroScan; /* Preliminary */ + p->dtype = instSpectroScan; /* Preliminary */ break; } @@ -233,7 +234,7 @@ ss_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { ss_command(p, SH_TMO); if (ss_sub_1(p) == ss_ParameterAnswer) { /* Got comms */ - p->itype = instSpectrolino; + p->dtype = instSpectrolino; break; } @@ -259,7 +260,7 @@ ss_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { a1logd(p->log, 4, "ss_init_coms: got basic communications\n"); /* Finalise the communications */ - if (p->itype == instSpectrolino) { + if (p->dtype == instSpectrolino) { if ((ev = so_do_MeasControlDownload(p, fcc1)) != inst_ok) return ev; @@ -326,7 +327,7 @@ ss_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { a1logd(p->log, 4, "ss_init_coms: establish communications\n"); /* See if we have a Spectroscan or SpectroscanT, and get other details */ - p->itype = instUnknown; + p->dtype = instUnknown; { char devn[19]; @@ -335,9 +336,9 @@ ss_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { if (ev == inst_ok) { a1logd(p->log, 5, "ss_init_coms: got device name '%s'\n",devn); if (strncmp(devn, "SpectroScanT",12) == 0) { - p->itype = instSpectroScanT; + p->dtype = instSpectroScanT; } else if (strncmp(devn, "SpectroScan",11) == 0) { - p->itype = instSpectroScan; + p->dtype = instSpectroScan; } } } @@ -363,8 +364,8 @@ ss_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { || strncmp(devn, "Spectrolino",11) != 0) return inst_unknown_model; - if (p->itype == instUnknown) /* No SpectroScan */ - p->itype = instSpectrolino; + if (p->dtype == instUnknown) /* No SpectroScan */ + p->dtype = instSpectrolino; } } @@ -390,15 +391,15 @@ static void ss_determine_capabilities(ss *p) { | inst_mode_spectral ; - if (p->itype == instSpectrolino) { + if (p->dtype == instSpectrolino) { p->cap |= inst_mode_trans_spot; /* Support this manually using a light table */ } - if (p->itype == instSpectroScan - || p->itype == instSpectroScanT) /* Only in reflective mode */ + if (p->dtype == instSpectroScan + || p->dtype == instSpectroScanT) /* Only in reflective mode */ p->cap |= inst_mode_ref_xy; - if (p->itype == instSpectroScanT) { + if (p->dtype == instSpectroScanT) { p->cap |= inst_mode_trans_spot; } @@ -408,8 +409,8 @@ static void ss_determine_capabilities(ss *p) { | inst2_user_switch_trig ; - if (p->itype == instSpectroScan - || p->itype == instSpectroScanT) { + if (p->dtype == instSpectroScan + || p->dtype == instSpectroScanT) { /* These are not available in transmission mode */ if ((p->mode & inst_mode_illum_mask) != inst_mode_transmission) { p->cap2 |= inst2_xy_holdrel @@ -451,10 +452,10 @@ ss_init_inst(inst *pp) { } /* Reset the instrument to a known state */ - if (p->itype != instSpectrolino) { + if (p->dtype != instSpectrolino) { /* Initialise the device without resetting the baud rate */ - if (p->itype == instSpectroScanT) { + if (p->dtype == instSpectroScanT) { if ((rv = ss_do_SetTableMode(p, ss_tmt_Reflectance)) != inst_ok) return rv; } @@ -726,8 +727,8 @@ ipatch *vals) { /* Pointer to array of values */ if (!p->inited) return inst_no_init; - if (p->itype != instSpectroScan - && p->itype != instSpectroScanT) + if (p->dtype != instSpectroScan + && p->dtype != instSpectroScanT) return inst_unsupported; /* Move quickest in X direction to minimise noise, */ @@ -1044,7 +1045,7 @@ instClamping clamp) { /* NZ if clamp XYZ/Lab to be +ve */ break; } /* If SpectroScanT transmission, poll the enter key */ - if (p->itype == instSpectroScanT + if (p->dtype == instSpectroScanT && (p->mode & inst_mode_illum_mask) == inst_mode_transmission) { ss_sks sk; ss_ptt pt; @@ -1117,14 +1118,14 @@ instClamping clamp) { /* NZ if clamp XYZ/Lab to be +ve */ /* For the spectroscan, make sure the instrument is on line, */ /* since it may be off line to allow the user to position it. */ - if (p->itype != instSpectrolino && p->offline) { + if (p->dtype != instSpectrolino && p->offline) { if ((rv = p->xy_locate_end((inst *)p)) != inst_ok) return rv; } /* For reflection spot mode on a SpectroScan, lower the head. */ /* (A SpectroScanT in transmission will position automatically) */ - if (p->itype != instSpectrolino + if (p->dtype != instSpectrolino && (p->mode & inst_mode_illum_mask) != inst_mode_transmission) { if ((rv = ss_do_MoveDown(p)) != inst_ok) return rv; @@ -1139,7 +1140,7 @@ instClamping clamp) { /* NZ if clamp XYZ/Lab to be +ve */ /* For reflection spot mode on a SpectroScan, raise the head. */ /* (A SpectroScanT in transmission will position automatically) */ - if (p->itype != instSpectrolino + if (p->dtype != instSpectrolino && (p->mode & inst_mode_illum_mask) != inst_mode_transmission) { if ((rv = ss_do_MoveUp(p)) != inst_ok) return rv; @@ -1153,7 +1154,7 @@ instClamping clamp) { /* NZ if clamp XYZ/Lab to be +ve */ /* Emulated spot transmission mode: */ if ((p->mode & inst_mode_illum_mask) == inst_mode_transmission - && p->itype == instSpectrolino) { + && p->dtype == instSpectrolino) { ss_st rst; /* Return Spectrum Type (Reflectance/Density) */ ss_rvt rvf; /* Return Reference Valid Flag */ ss_aft af; /* Return filter being used (None/Pol/D65/UV/custom */ @@ -1376,7 +1377,7 @@ static inst_code ss_get_n_a_cals(inst *pp, inst_cal_type *pn_cals, inst_cal_type inst_cal_type a_cals = inst_calt_none; if ((p->mode & inst_mode_illum_mask) == inst_mode_transmission) { - if (p->itype == instSpectrolino) { /* Emulated transmission */ + if (p->dtype == instSpectrolino) { /* Emulated transmission */ if (p->need_wd_cal && p->noinitcalib == 0) n_cals |= inst_calt_ref_white; a_cals |= inst_calt_ref_white; @@ -1464,7 +1465,7 @@ char id[CALIDLEN] /* Condition identifier (ie. white reference ID) */ p->filt = ss_aft_NoFilter; /* Need no filter for emission */ /* Set mode to reflection as a default for calibration */ - if (p->itype == instSpectroScanT) { + if (p->dtype == instSpectroScanT) { if ((rv = ss_do_SetTableMode(p, ss_tmt_Reflectance)) != inst_ok) return rv; } else { @@ -1484,7 +1485,7 @@ char id[CALIDLEN] /* Condition identifier (ie. white reference ID) */ if (p->noinitcalib == 0) { /* Make sure we're in a condition to do the calibration */ - if (p->itype == instSpectrolino + if (p->dtype == instSpectrolino && (*calc & inst_calc_cond_mask) != inst_calc_man_ref_white) { *calc = inst_calc_man_ref_white; a1logd(p->log, 3, "ss cal need cond. inst_calc_man_ref_white and haven't got it\n"); @@ -1496,7 +1497,7 @@ char id[CALIDLEN] /* Condition identifier (ie. white reference ID) */ a1logd(p->log, 3, "ss cal doing white reflective cal\n"); /* For SpectroScan, move to the white reference in slot 1 and lower */ - if (p->itype != instSpectrolino) { + if (p->dtype != instSpectrolino) { if ((rv = ss_do_MoveToWhiteRefPos(p, ss_wrpt_RefTile1)) != inst_ok) return rv; if ((rv = ss_do_MoveDown(p)) != inst_ok) @@ -1510,7 +1511,7 @@ char id[CALIDLEN] /* Condition identifier (ie. white reference ID) */ rv = inst_ok; /* For SpectroScan, raise */ - if (p->itype != instSpectrolino) { + if (p->dtype != instSpectrolino) { if ((rv = ss_do_MoveUp(p)) != inst_ok) return rv; } @@ -1541,7 +1542,7 @@ char id[CALIDLEN] /* Condition identifier (ie. white reference ID) */ /* Emission or spot transmission mode, dark calibration. */ if ((p->mode & inst_mode_illum_mask) == inst_mode_emission || ((p->mode & inst_mode_illum_mask) == inst_mode_transmission - && p->itype == instSpectrolino)) { + && p->dtype == instSpectrolino)) { a1logd(p->log, 3, "emmission/transmission dark calibration:\n"); /* Set emission mode */ if ((rv = so_do_MeasControlDownload(p, ss_ctt_EmissionMeas)) != inst_ok) @@ -1563,7 +1564,7 @@ char id[CALIDLEN] /* Condition identifier (ie. white reference ID) */ /* Restore the instrument to the desired mode */ /* SpectroScanT - Transmission mode, set transmission mode. */ if ((p->mode & inst_mode_illum_mask) == inst_mode_transmission - && p->itype == instSpectroScanT) { + && p->dtype == instSpectroScanT) { if ((p->mode & inst_mode_illum_mask) == inst_mode_transmission) { if ((rv = ss_do_SetTableMode(p, ss_tmt_Transmission)) != inst_ok) @@ -1584,7 +1585,7 @@ char id[CALIDLEN] /* Condition identifier (ie. white reference ID) */ a1logd(p->log, 3, "ss cal need trans with calt = trans_white\n"); /* Emulated spot transmission using spectrolino */ - if ((*calt & inst_calt_trans_vwhite) && p->itype == instSpectrolino) { + if ((*calt & inst_calt_trans_vwhite) && p->dtype == instSpectrolino) { ss_st rst; /* Return Spectrum Type (Reflectance/Density) */ ss_rvt rvf; /* Return Reference Valid Flag */ ss_aft af; /* Return filter being used (None/Pol/D65/UV/custom */ @@ -1631,7 +1632,7 @@ char id[CALIDLEN] /* Condition identifier (ie. white reference ID) */ a1logd(p->log, 3, "transmission lino cal done\n"); /* SpectroScanT */ - } else if ((*calt & inst_calt_trans_white) && p->itype != instSpectrolino) { + } else if ((*calt & inst_calt_trans_white) && p->dtype != instSpectrolino) { /* Hmm. Should we really return a message and resume somehow, */ /* rather than communicating directly with the user... */ @@ -2154,7 +2155,7 @@ ss_del(inst *pp) { ss *p = (ss *)pp; if (p->inited - && p->itype == instSpectroScanT + && p->dtype == instSpectroScanT && (p->mode & inst_mode_illum_mask) == inst_mode_transmission) { ss_do_SetDeviceOnline(p); ss_do_SetTableMode(p, ss_tmt_Reflectance); @@ -2175,7 +2176,7 @@ ss_del(inst *pp) { } /* Constructor */ -extern ss *new_ss(icoms *icom, instType itype) { +extern ss *new_ss(icoms *icom, instType dtype) { ss *p; if ((p = (ss *)calloc(sizeof(ss),1)) == NULL) { a1loge(icom->log, 1, "new_ss: malloc failed!\n"); @@ -2209,7 +2210,7 @@ extern ss *new_ss(icoms *icom, instType itype) { /* Init state */ p->icom = icom; - p->itype = itype; + p->dtype = dtype; p->cap = inst_mode_none; /* Unknown until initialised */ p->mode = inst_mode_none; /* Not in a known mode yet */ p->nextmode = inst_mode_none; /* Not in a known mode yet */ diff --git a/spectro/ss.h b/spectro/ss.h index bc816e7..bc816e7 100644..100755 --- a/spectro/ss.h +++ b/spectro/ss.h diff --git a/spectro/ss_imp.c b/spectro/ss_imp.c index 05f0602..0de14ea 100644..100755 --- a/spectro/ss_imp.c +++ b/spectro/ss_imp.c @@ -50,6 +50,7 @@ #include "sa_config.h" #include "numsup.h" #endif /* SALONEINSTLIB */ +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" diff --git a/spectro/ss_imp.h b/spectro/ss_imp.h index ccd9ce3..ccd9ce3 100644..100755 --- a/spectro/ss_imp.h +++ b/spectro/ss_imp.h diff --git a/spectro/strange.cal b/spectro/strange.cal new file mode 100755 index 0000000..b31bbed --- /dev/null +++ b/spectro/strange.cal @@ -0,0 +1,272 @@ +CAL + +DESCRIPTOR "Argyll Device Calibration Curves" +ORIGINATOR "Argyll synthcal" +CREATED "Fri Nov 17 01:11:11 2017" +DEVICE_CLASS "DISPLAY" +COLOR_REP "RGB" + +NUMBER_OF_FIELDS 4 +BEGIN_DATA_FORMAT +RGB_I RGB_R RGB_G RGB_B +END_DATA_FORMAT + +NUMBER_OF_SETS 256 +BEGIN_DATA +0.00000 0.00000 0.00000 0.00000 +0.00392157 0.0000567518 0.0118787 0.0186065 +0.00784314 0.000184387 0.0206820 0.0302263 +0.0117647 0.000367355 0.0286065 0.0401466 +0.0156863 0.000599076 0.0360094 0.0491028 +0.0196078 0.000875445 0.0430471 0.0574042 +0.0235294 0.00119354 0.0498068 0.0652184 +0.0274510 0.00155112 0.0563438 0.0726496 +0.0313725 0.00194640 0.0626960 0.0797678 +0.0352941 0.00237789 0.0688909 0.0866232 +0.0392157 0.00284433 0.0749493 0.0932533 +0.0431373 0.00334462 0.0808876 0.0996872 +0.0470588 0.00387782 0.0867187 0.105948 +0.0509804 0.00444307 0.0924533 0.112053 +0.0549020 0.00503962 0.0981003 0.118020 +0.0588235 0.00566676 0.103667 0.123859 +0.0627451 0.00632388 0.109160 0.129583 +0.0666667 0.00701040 0.114585 0.135201 +0.0705882 0.00772579 0.119946 0.140720 +0.0745098 0.00846956 0.125248 0.146148 +0.0784314 0.00924125 0.130494 0.151490 +0.0823529 0.0100404 0.135689 0.156754 +0.0862745 0.0108667 0.140834 0.161942 +0.0901961 0.0117197 0.145932 0.167061 +0.0941176 0.0125991 0.150986 0.172112 +0.0980392 0.0135045 0.155998 0.177102 +0.101961 0.0144356 0.160971 0.182031 +0.105882 0.0153921 0.165905 0.186904 +0.109804 0.0163738 0.170803 0.191723 +0.113725 0.0173803 0.175665 0.196491 +0.117647 0.0184114 0.180495 0.201210 +0.121569 0.0194668 0.185292 0.205882 +0.125490 0.0205464 0.190059 0.210508 +0.129412 0.0216498 0.194796 0.215092 +0.133333 0.0227769 0.199504 0.219634 +0.137255 0.0239274 0.204184 0.224136 +0.141176 0.0251012 0.208838 0.228600 +0.145098 0.0262980 0.213466 0.233027 +0.149020 0.0275177 0.218069 0.237418 +0.152941 0.0287600 0.222648 0.241774 +0.156863 0.0300249 0.227204 0.246097 +0.160784 0.0313121 0.231737 0.250388 +0.164706 0.0326215 0.236248 0.254647 +0.168627 0.0339528 0.240737 0.258876 +0.172549 0.0353061 0.245205 0.263076 +0.176471 0.0366810 0.249654 0.267247 +0.180392 0.0380775 0.254082 0.271391 +0.184314 0.0394954 0.258491 0.275507 +0.188235 0.0409345 0.262882 0.279597 +0.192157 0.0423948 0.267254 0.283662 +0.196078 0.0438762 0.271609 0.287702 +0.200000 0.0453784 0.275946 0.291718 +0.203922 0.0469014 0.280266 0.295710 +0.207843 0.0484450 0.284570 0.299680 +0.211765 0.0500091 0.288857 0.303627 +0.215686 0.0515937 0.293128 0.307552 +0.219608 0.0531985 0.297384 0.311455 +0.223529 0.0548235 0.301625 0.315338 +0.227451 0.0564686 0.305851 0.319201 +0.231373 0.0581337 0.310063 0.323043 +0.235294 0.0598187 0.314260 0.326866 +0.239216 0.0615234 0.318443 0.330670 +0.243137 0.0632478 0.322613 0.334456 +0.247059 0.0649918 0.326769 0.338223 +0.250980 0.0667553 0.330911 0.341972 +0.254902 0.0685382 0.335041 0.345703 +0.258824 0.0703403 0.339159 0.349418 +0.262745 0.0721617 0.343264 0.353115 +0.266667 0.0740022 0.347356 0.356797 +0.270588 0.0758618 0.351437 0.360461 +0.274510 0.0777403 0.355505 0.364110 +0.278431 0.0796377 0.359563 0.367744 +0.282353 0.0815539 0.363608 0.371362 +0.286275 0.0834889 0.367643 0.374965 +0.290196 0.0854424 0.371666 0.378553 +0.294118 0.0874146 0.375679 0.382127 +0.298039 0.0894052 0.379681 0.385686 +0.301961 0.0914143 0.383672 0.389231 +0.305882 0.0934417 0.387653 0.392763 +0.309804 0.0954873 0.391624 0.396281 +0.313725 0.0975512 0.395585 0.399786 +0.317647 0.0996332 0.399536 0.403277 +0.321569 0.101733 0.403477 0.406756 +0.325490 0.103851 0.407409 0.410222 +0.329412 0.105987 0.411331 0.413676 +0.333333 0.108141 0.415244 0.417117 +0.337255 0.110313 0.419147 0.420546 +0.341176 0.112503 0.423042 0.423963 +0.345098 0.114710 0.426927 0.427368 +0.349020 0.116935 0.430804 0.430762 +0.352941 0.119177 0.434672 0.434144 +0.356863 0.121437 0.438532 0.437515 +0.360784 0.123714 0.442383 0.440875 +0.364706 0.126009 0.446225 0.444224 +0.368627 0.128321 0.450060 0.447563 +0.372549 0.130650 0.453886 0.450890 +0.376471 0.132997 0.457704 0.454207 +0.380392 0.135360 0.461514 0.457514 +0.384314 0.137741 0.465317 0.460811 +0.388235 0.140139 0.469111 0.464097 +0.392157 0.142554 0.472898 0.467374 +0.396078 0.144986 0.476678 0.470641 +0.400000 0.147435 0.480450 0.473898 +0.403922 0.149900 0.484214 0.477145 +0.407843 0.152383 0.487972 0.480383 +0.411765 0.154882 0.491722 0.483612 +0.415686 0.157398 0.495465 0.486831 +0.419608 0.159931 0.499200 0.490042 +0.423529 0.162480 0.502929 0.493243 +0.427451 0.165046 0.506651 0.496436 +0.431373 0.167628 0.510366 0.499619 +0.435294 0.170227 0.514075 0.502794 +0.439216 0.172842 0.517776 0.505961 +0.443137 0.175474 0.521472 0.509119 +0.447059 0.178122 0.525160 0.512269 +0.450980 0.180787 0.528842 0.515410 +0.454902 0.183467 0.532518 0.518543 +0.458824 0.186164 0.536187 0.521668 +0.462745 0.188877 0.539850 0.524785 +0.466667 0.191606 0.543507 0.527895 +0.470588 0.194351 0.547158 0.530996 +0.474510 0.197113 0.550803 0.534090 +0.478431 0.199890 0.554441 0.537176 +0.482353 0.202684 0.558074 0.540254 +0.486275 0.205493 0.561701 0.543325 +0.490196 0.208318 0.565322 0.546388 +0.494118 0.211159 0.568937 0.549444 +0.498039 0.214016 0.572547 0.552493 +0.501961 0.216889 0.576150 0.555535 +0.505882 0.219777 0.579748 0.558569 +0.509804 0.222681 0.583341 0.561597 +0.513725 0.225601 0.586928 0.564617 +0.517647 0.228536 0.590510 0.567631 +0.521569 0.231487 0.594086 0.570638 +0.525490 0.234454 0.597657 0.573638 +0.529412 0.237436 0.601222 0.576631 +0.533333 0.240434 0.604782 0.579618 +0.537255 0.243447 0.608337 0.582598 +0.541176 0.246476 0.611887 0.585571 +0.545098 0.249520 0.615431 0.588538 +0.549020 0.252579 0.618971 0.591499 +0.552941 0.255654 0.622505 0.594453 +0.556863 0.258744 0.626035 0.597401 +0.560784 0.261849 0.629559 0.600343 +0.564706 0.264970 0.633079 0.603279 +0.568627 0.268105 0.636594 0.606208 +0.572549 0.271256 0.640103 0.609132 +0.576471 0.274422 0.643608 0.612049 +0.580392 0.277603 0.647109 0.614961 +0.584314 0.280800 0.650604 0.617867 +0.588235 0.284011 0.654095 0.620766 +0.592157 0.287237 0.657581 0.623661 +0.596078 0.290478 0.661063 0.626549 +0.600000 0.293735 0.664540 0.629431 +0.603922 0.297006 0.668012 0.632308 +0.607843 0.300292 0.671480 0.635180 +0.611765 0.303593 0.674944 0.638045 +0.615686 0.306909 0.678403 0.640906 +0.619608 0.310239 0.681857 0.643761 +0.623529 0.313585 0.685308 0.646610 +0.627451 0.316945 0.688754 0.649454 +0.631373 0.320320 0.692195 0.652293 +0.635294 0.323709 0.695633 0.655126 +0.639216 0.327114 0.699066 0.657954 +0.643137 0.330533 0.702495 0.660777 +0.647059 0.333966 0.705919 0.663595 +0.650980 0.337414 0.709340 0.666408 +0.654902 0.340877 0.712756 0.669215 +0.658824 0.344354 0.716169 0.672018 +0.662745 0.347846 0.719577 0.674816 +0.666667 0.351352 0.722981 0.677608 +0.670588 0.354873 0.726381 0.680396 +0.674510 0.358408 0.729778 0.683179 +0.678431 0.361958 0.733170 0.685957 +0.682353 0.365522 0.736559 0.688730 +0.686275 0.369100 0.739943 0.691498 +0.690196 0.372693 0.743324 0.694262 +0.694118 0.376300 0.746701 0.697021 +0.698039 0.379921 0.750074 0.699775 +0.701961 0.383557 0.753443 0.702525 +0.705882 0.387207 0.756808 0.705270 +0.709804 0.390871 0.760170 0.708010 +0.713725 0.394549 0.763528 0.710746 +0.717647 0.398242 0.766882 0.713477 +0.721569 0.401948 0.770233 0.716204 +0.725490 0.405669 0.773580 0.718927 +0.729412 0.409404 0.776923 0.721645 +0.733333 0.413153 0.780263 0.724358 +0.737255 0.416916 0.783599 0.727068 +0.741176 0.420693 0.786932 0.729773 +0.745098 0.424484 0.790261 0.732473 +0.749020 0.428289 0.793587 0.735170 +0.752941 0.432108 0.796909 0.737862 +0.756863 0.435940 0.800228 0.740550 +0.760784 0.439787 0.803543 0.743234 +0.764706 0.443648 0.806855 0.745914 +0.768627 0.447523 0.810164 0.748589 +0.772549 0.451411 0.813469 0.751261 +0.776471 0.455314 0.816770 0.753928 +0.780392 0.459230 0.820069 0.756592 +0.784314 0.463160 0.823364 0.759251 +0.788235 0.467103 0.826656 0.761906 +0.792157 0.471061 0.829944 0.764558 +0.796078 0.475032 0.833230 0.767205 +0.800000 0.479017 0.836512 0.769849 +0.803922 0.483016 0.839790 0.772489 +0.807843 0.487028 0.843066 0.775124 +0.811765 0.491054 0.846339 0.777756 +0.815686 0.495094 0.849608 0.780385 +0.819608 0.499147 0.852874 0.783009 +0.823529 0.503214 0.856137 0.785630 +0.827451 0.507294 0.859397 0.788247 +0.831373 0.511388 0.862654 0.790860 +0.835294 0.515496 0.865908 0.793469 +0.839216 0.519617 0.869158 0.796075 +0.843137 0.523751 0.872406 0.798677 +0.847059 0.527899 0.875651 0.801276 +0.850980 0.532061 0.878892 0.803871 +0.854902 0.536236 0.882131 0.806462 +0.858824 0.540424 0.885367 0.809050 +0.862745 0.544626 0.888599 0.811634 +0.866667 0.548841 0.891829 0.814215 +0.870588 0.553070 0.895056 0.816792 +0.874510 0.557311 0.898280 0.819366 +0.878431 0.561567 0.901501 0.821936 +0.882353 0.565835 0.904719 0.824503 +0.886275 0.570117 0.907935 0.827066 +0.890196 0.574412 0.911147 0.829626 +0.894118 0.578721 0.914357 0.832183 +0.898039 0.583042 0.917564 0.834736 +0.901961 0.587377 0.920768 0.837286 +0.905882 0.591725 0.923969 0.839833 +0.909804 0.596087 0.927168 0.842376 +0.913725 0.600461 0.930363 0.844916 +0.917647 0.604849 0.933556 0.847453 +0.921569 0.609249 0.936747 0.849986 +0.925490 0.613663 0.939934 0.852516 +0.929412 0.618090 0.943119 0.855044 +0.933333 0.622530 0.946301 0.857567 +0.937255 0.626984 0.949481 0.860088 +0.941176 0.631450 0.952658 0.862606 +0.945098 0.635929 0.955832 0.865120 +0.949020 0.640421 0.959003 0.867631 +0.952941 0.644927 0.962172 0.870139 +0.956863 0.649445 0.965339 0.872644 +0.960784 0.653976 0.968502 0.875146 +0.964706 0.658521 0.971664 0.877645 +0.968627 0.663078 0.974822 0.880141 +0.972549 0.667648 0.977978 0.882634 +0.976471 0.672231 0.981132 0.885124 +0.980392 0.676827 0.984283 0.887610 +0.984314 0.681436 0.987431 0.890094 +0.988235 0.686058 0.990577 0.892575 +0.992157 0.690692 0.993721 0.895053 +0.996078 0.695340 0.996862 0.897528 +1.000000 0.700000 1.000000 0.900000 +END_DATA diff --git a/spectro/synthcal.c b/spectro/synthcal.c index 14471f6..14471f6 100644..100755 --- a/spectro/synthcal.c +++ b/spectro/synthcal.c diff --git a/spectro/synthread.c b/spectro/synthread.c index 3a23c31..3a23c31 100644..100755 --- a/spectro/synthread.c +++ b/spectro/synthread.c diff --git a/spectro/usbio.c b/spectro/usbio.c index fca997d..efd0dc8 100644..100755 --- a/spectro/usbio.c +++ b/spectro/usbio.c @@ -33,6 +33,7 @@ #include "sa_config.h" #endif #include "numsup.h" +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" diff --git a/spectro/usbio.h b/spectro/usbio.h index 2a01ea3..2a01ea3 100644..100755 --- a/spectro/usbio.h +++ b/spectro/usbio.h diff --git a/spectro/usbio_bsd.c b/spectro/usbio_bsd.c index 4b3e038..4b3e038 100644..100755 --- a/spectro/usbio_bsd.c +++ b/spectro/usbio_bsd.c diff --git a/spectro/usbio_lx.c b/spectro/usbio_lx.c index 6edcb29..135f8eb 100644..100755 --- a/spectro/usbio_lx.c +++ b/spectro/usbio_lx.c @@ -22,6 +22,7 @@ #include <sys/stat.h> #include <fcntl.h> #include <sys/ioctl.h> +#include <sys/time.h> #include <linux/usbdevice_fs.h> /* select() defined, but not poll(), so emulate poll() */ @@ -785,6 +786,9 @@ static int icoms_usb_transaction( in_usb_rw++; a1logd(p->log, 8, "icoms_usb_transaction: req type 0x%x ep 0x%x size %d to %d\n",ttype,endpoint,length, timeout); + if (transferred != NULL) + *transferred = 0; + if (!p->usbd->running) { in_usb_rw--; a1logv(p->log, 1, "icoms_usb_transaction: reaper thread is not running\n"); diff --git a/spectro/usbio_nt.c b/spectro/usbio_nt.c index 34426fd..f3748bb 100644..100755 --- a/spectro/usbio_nt.c +++ b/spectro/usbio_nt.c @@ -589,6 +589,9 @@ static int icoms_usb_transaction( a1logd(p->log, 8, "icoms_usb_transaction: req type 0x%x ep 0x%x size %d\n",ttype,endpoint,length); + if (transferred != NULL) + *transferred = 0; + if (ttype != icom_usb_trantype_interrutpt && ttype != icom_usb_trantype_bulk) { /* We only handle interrupt & bulk, not control */ @@ -692,6 +695,9 @@ int timeout) { a1logd(p->log, 8, "icoms_usb_control_msg: type 0x%x req 0x%x size %d\n",requesttype,request,size); + if (transferred != NULL) + *transferred = 0; + memset(&req, 0, sizeof(libusb_request)); req.timeout = timeout; diff --git a/spectro/usbio_ox.c b/spectro/usbio_ox.c index 2b09955..3923d6d 100644..100755 --- a/spectro/usbio_ox.c +++ b/spectro/usbio_ox.c @@ -457,12 +457,20 @@ char **pnames /* List of process names to try and kill before opening */ (*pluginref)->Stop(pluginref); IODestroyPlugInInterface(pluginref); // this stops IOServices though ?? + /* This can fail if the device has multiple interfaces, and */ + /* one of them is grabbed by a system interface (i.e. debug serial port) */ + /* So soft fail, and rely on ep use to fail for invalid interface */ if ((rv = (*(p->usbd->interfaces[i]))->USBInterfaceOpen( p->usbd->interfaces[i])) != kIOReturnSuccess) { - a1loge(p->log, rv, "usb_open_port: USBInterfaceOpen failed with 0x%x\n",rv); +#ifdef NEVER + a1loge(p->log, rv, "usb_open_port: USBInterfaceOpen %d failed with 0x%x\n",i, rv); IOObjectRelease(ioit); cleanup_device(p); return ICOM_SYS; +#else + a1logw(p->log, "usb_open_port: USBInterfaceOpen %d failed with 0x%x\n",i,rv); + continue; +#endif } /* Get the end point details, and set reference to pipe no and interfece ix */ @@ -580,6 +588,9 @@ static int icoms_usb_transaction( a1logd(p->log, 8, "icoms_usb_transaction: req type 0x%x ep 0x%x size %d\n",ttype,endpoint,length); + if (transferred != NULL) + *transferred = 0; + if (ttype != icom_usb_trantype_interrutpt && ttype != icom_usb_trantype_bulk) { /* We only handle interrupt & bulk, not control */ diff --git a/spectro/vinflate.c b/spectro/vinflate.c index 847fa28..847fa28 100644..100755 --- a/spectro/vinflate.c +++ b/spectro/vinflate.c diff --git a/spectro/vtpglut.c b/spectro/vtpglut.c new file mode 100755 index 0000000..2308466 --- /dev/null +++ b/spectro/vtpglut.c @@ -0,0 +1,570 @@ + +/* Abstract Video Test Patch Generator and/or 3dLUT class implemenation */ + +/* + * Argyll Color Correction System + * + * Author: Graeme W. Gill + * Date: 10/3/2001 + * + * Copyright 2001 - 2013 Graeme W. Gill + * All rights reserved. + * + * This material is licenced under the GNU GENERAL PUBLIC LICENSE Version 2 or later :- + * see the License2.txt file for licencing details. + */ + +#include <stdio.h> +#include <stdlib.h> +#include <stdarg.h> +#include <ctype.h> +#include <string.h> +#include <time.h> +#ifndef SALONEINSTLIB +#include "copyright.h" +#include "aconfig.h" +#else +#include "sa_config.h" +#endif /* !SALONEINSTLIB */ +#include "numsup.h" +#include "cgats.h" +#include "xspect.h" +#include "conv.h" + +#include "insttypes.h" +#include "icoms.h" +#include "vtpglut.h" +#include "rspec.h" +#include "vtpgluttypes.h" +#include "sort.h" + +icom_type dev_category(instType itype); + +/* --------------------------------------------------------- */ + +#if defined(ENABLE_FAST_SERIAL) +extern devType fast_ser_dev_type(icoms *p, int tryhard, + inst_code (*uicallback)(void *cntx, inst_ui_purp purp), void *cntx); +# if defined(ENABLE_SERIAL) +static devType ser_vtpglut_type(icoms *p, + vtpglut_code (*uicallback)(void *cntx, vtpglut_ui_purp purp), void *cntx); + +/* Translate vtpglut uicallback into inst callback */ +typedef struct { + void *cntx; + vtpglut_code (*uicallback)(void *cntx, vtpglut_ui_purp purp); +} vtpglut_callback_cntx; + +static inst_code ser_uicallback(void *cntx, inst_ui_purp purp) { + vtpglut_callback_cntx *p = (vtpglut_callback_cntx *)cntx; + vtpglut_ui_purp ser_purp; + + if (purp == vtpglut_negcoms) + ser_purp = inst_negcoms; + else + return inst_internal_error; + return p->uicallback(p->cntx, ser_purp); +} + +# endif /* ENABLE_SERIAL */ +#endif /* ENABLE_FAST_SERIAL */ + + +/* ------------------------------------ */ +/* Default methods for instrument class */ + +/* Establish communications at the indicated baud rate. */ +/* Timout in to seconds, and return non-zero error code */ +static vtpglut_code init_coms( +vtpglut *p) { /* Timeout */ + return vtpglut_unsupported; +} + +/* Initialise or re-initialise the INST */ +/* return non-zero on an error, with inst error code */ +static vtpglut_code init_vtpglut( +vtpglut *p) { + return vtpglut_unsupported; +} + +/* Return the device type */ +static devType get_dtype(vtpglut *p) { + if (p != NULL) + return p->dtype; + return devUnknown; +} + +/* Return the device serial number. */ +/* (This will be an empty string if there is no serial no) */ +static char *get_serial_no(vtpglut *p) { + return ""; +} + +/* Return the device mode/capabilities */ +static void capabilities(vtpglut *p, vtpglut_mode *cap1, + vtpglut_capability *cap2) { + if (cap1 != NULL) + *cap1 = vtpglut_mode_none; + if (cap2 != NULL) + *cap2 = vtpglut2_none; +} + +/* Check the device mode */ +static vtpglut_code check_mode( +vtpglut *p, +vtpglut_mode m) { /* Requested mode */ + return vtpglut_unsupported; +} + +/* Set the device mode */ +static vtpglut_code set_mode( +vtpglut *p, +vtpglut_mode m) { /* Requested mode */ + return vtpglut_unsupported; +} + +/* Get a status or set or get an option (default implementation) */ +vtpglut_code vtpglut_get_set_opt_def( +vtpglut *p, +vtpglut_opt_type m, /* Requested option type */ +va_list args) { /* Option parameters */ + return vtpglut_unsupported; +} + +/* Get a status or set or get an option */ +static vtpglut_code get_set_opt( +vtpglut *p, +vtpglut_opt_type m, /* Requested status type */ +...) { /* Status parameters */ + vtpglut_code rv; + va_list args; + + va_start(args, m); + rv = vtpglut_get_set_opt_def(p, m, args); /* Call the above */ + va_end(args); + + return rv; +} + +/* Supply a user interaction callback function. */ +static void set_uicallback( +vtpglut *pp, +vtpglut_code (*uicallback)(void *cntx, vtpglut_ui_purp purp), +void *cntx) { + pp->uicallback = uicallback; + pp->uic_cntx = cntx; +} + +/* Supply an asynchronous event callback function. */ +static void set_event_callback( +vtpglut *pp, +void (*eventcallback)(void *cntx, vtpglut_event_type event), +void *cntx) { + pp->eventcallback = eventcallback; + pp->event_cntx = cntx; +} + +/* Generic inst error codes interpretation */ +static char *vtpglut_interp_error(vtpglut *p, vtpglut_code ec) { + switch(ec & vtpglut_mask) { + case vtpglut_ok: + return "No error"; + case vtpglut_notify: + return "Notification"; + case vtpglut_warning: + return "Warning"; + case vtpglut_no_coms: + return "Internal error - communications needed but not established"; + case vtpglut_no_init: + return "Internal error - initialisation needed but not done"; + case vtpglut_unsupported: + return "Unsupported function"; + case vtpglut_internal_error: + return "Internal software error"; + case vtpglut_coms_fail: + return "Communications failure"; + case vtpglut_unknown_model: + return "Not expected device model"; + case vtpglut_protocol_error: + return "Communication protocol breakdown"; + case vtpglut_user_abort: + return "User hit Abort Key"; + case vtpglut_user_trig: + return "User hit Trigger Key"; + case vtpglut_unexpected_reply: + return "Unexpected Reply"; + case vtpglut_wrong_setup: + return "Wrong or conflicting setup"; + case vtpglut_hardware_fail: + return "Hardware Failure"; + case vtpglut_system_error: + return "Operating System Error"; + case vtpglut_bad_parameter: + return "Bad Parameter Value"; + case vtpglut_other_error: + return "Non-specific error"; + } + return "Unknown inst error code"; +} + +/* Instrument specific error codes interpretation */ +static char *interp_error(vtpglut *p, int ec) { + return "interp_error is uninplemented in base class!"; +} + +/* Return the last serial communication error code */ +/* (This is used for deciding fallback/retry strategies) */ +static int last_scomerr(vtpglut *p) { + return p->icom->lserr; +} + +/* ---------------------------------------------- */ + +/* Delete things set/done by new_vtpglut() */ +static vtpglut_code virtual_del(vtpglut *p) { + +#if defined(UNIX_APPLE) + osx_latencycritical_end(); +#endif + + return vtpglut_ok; +} + + +/* Virtual constructor. */ +/* Return NULL for unknown instrument, */ +/* or serial instrument if nocoms == 0. */ +extern vtpglut *new_vtpglut( +icompath *path, /* Device path to instrument */ +int nocoms, /* Don't open if communications are needed to establish inst type */ +a1log *log, /* log to use */ +vtpglut_code (*uicallback)(void *cntx, vtpglut_ui_purp purp), /* optional uicallback for abort */ +void *cntx /* Context for callback */ +) { + devType itype = devUnknown; /* Actual type */ + icoms *icom; + vtpglut *p = NULL; + + if (path == NULL) { + a1logd(log, 2, "new_vtpglut: got NULL path\n"); + return NULL; + } + + a1logd(log, 2, "new_vtpglut: called with path '%s' type '%s'\n",path->name,inst_sname(path->itype)); + + if ((icom = new_icoms(path, log)) == NULL) { + a1logd(log, 2, "new_vtpglut: new_icoms failed to open it\n"); + return NULL; + } + + + + /* Set device type from USB port, if not specified */ + itype = icom->itype; /* Instrument type if its known from usb/hid */ + +#if defined(ENABLE_FAST_SERIAL) + if (itype == instUnknown && !nocoms && (icom->dctype & icomt_fastserial)) { + vtpglut_callback_cntx wcntx; + + /* Wrap vtpglut callback in inst callback */ + wcntx.cntx = cntx; + wcntx.uicallback = uicallback; + + itype = fast_ser_dev_type(icom, 1, ser_uicallback, &wcntx); /* Else type from serial */ + icom->dctype = (icom->dctype & ~icomt_cat_mask) | dev_category(itype); + a1logd(log, 8, "new_vtpglut: fast set '%s' dctype 0x%x\n",icom->name,icom->dctype); + } +#endif /* ENABLE_FAST_SERIAL */ + +#if defined(ENABLE_SERIAL) + if (itype == instUnknown && !nocoms) { + itype = ser_vtpglut_type(icom, uicallback, cntx); /* Else type from serial */ + icom->dctype = (icom->dctype & ~icomt_cat_mask) | dev_category(itype); + a1logd(log, 8, "new_vtpglut: set '%s' dctype 0x%x\n",icom->name,icom->dctype); + } +#endif /* ENABLE_SERIAL */ + + +#ifdef ENABLE_SERIAL +// if (itype == devRadiance) +// p = (vtpglut *)new_radiance(icom, itype); +#endif /* ENABLE_SERIAL */ + +#ifdef ENABLE_USB +// if (itype == instXXXX) +// p = (vtpglut *)new_XXXX(icom, itype); +#endif /* ENABLE_USB */ + + + /* Nothing matched */ + if (p == NULL) { + a1logd(log, 2, "new_vtpglut: device type not recognised\n"); + icom->del(icom); + return NULL; + } + + p->vdel = virtual_del; + + /* Add default methods if constructor did not supply them */ + if (p->init_coms == NULL) + p->init_coms = init_coms; + if (p->init_vtpglut == NULL) + p->init_vtpglut = init_vtpglut; + if (p->get_dtype == NULL) + p->get_dtype = get_dtype; + if (p->get_serial_no == NULL) + p->get_serial_no = get_serial_no; + if (p->capabilities == NULL) + p->capabilities = capabilities; + if (p->check_mode == NULL) + p->check_mode = check_mode; + if (p->set_mode == NULL) + p->set_mode = set_mode; + if (p->get_set_opt == NULL) + p->get_set_opt = get_set_opt; + if (p->set_uicallback == NULL) + p->set_uicallback = set_uicallback; + if (p->set_event_callback == NULL) + p->set_event_callback = set_event_callback; + if (p->vtpglut_interp_error == NULL) + p->vtpglut_interp_error = vtpglut_interp_error; + if (p->interp_error == NULL) + p->interp_error = interp_error; + if (p->last_scomerr == NULL) + p->last_scomerr = last_scomerr; + + /* Set the provided user interaction callback */ + p->set_uicallback(p, uicallback, cntx); + +#if defined(UNIX_APPLE) + osx_latencycritical_start(); +#endif + + return p; +} + +/* ============================================================= */ +/* Detect serial device */ + +#ifdef ENABLE_SERIAL +static void hex2bin(char *buf, int len); + +/* Heuristicly determine the device type for */ +/* a serial connection, and devUnknown if not serial. */ +/* Set it in icoms and also return it. */ +static devType ser_vtpglut_type( + icoms *p, + vtpglut_code (*uicallback)(void *cntx, vtpglut_ui_purp purp), /* optional uicallback */ + void *cntx /* Context for callback */ +) { + devType rv = instUnknown; +#define BUFSZ (128 + 10) + char buf[BUFSZ]; + baud_rate brt[] = { baud_9600, baud_57600, baud_115200, baud_230400, baud_nc }; + unsigned int etime; + unsigned int bi, i; + int se, len, bread; + int lumagen = 0, lgchsum = 0; + +#ifdef ENABLE_USB + if (p->usbd != NULL || p->hidd != NULL) + return p->itype; +#endif /* ENABLE_USB */ + + bi = 0; + + /* The tick to give up on */ + etime = msec_time() + (long)(20.0 * 1000.0 + 0.5); + + a1logd(p->log, 1, "ser_vtpglut_type: Trying different baud rates (%u msec to go)\n",etime - msec_time()); + + /* Until we time out, find the correct baud rate */ + for (i = bi; msec_time() < etime; i++) { + lgchsum = 0; + + if (brt[i] == baud_nc) + i = 0; + if ((se = p->set_ser_port(p, fc_None, brt[i], parity_none, + stop_1, length_8)) != ICOM_OK) { + a1logd(p->log, 5, "ser_vtpglut_type: set_ser_port failed with 0x%x\n",se); + return instUnknown; /* Give up */ + } + + a1logd(p->log, 5, "Trying %s baud\n",baud_rate_to_str(brt[i])); + bread = 0; + + /* If Lumagen baud rate */ + if (brt[i] == baud_9600 + || brt[i] == baud_57600 + || brt[i] == baud_115200 + || brt[i] == baud_230400) { + + /* Try a spectrolino/spectroscan command first, so as not to upset it, */ + /* but do first character only and see if there is an echo */ + p->write_read_ex(p, ";", 1, buf, BUFSZ-1, &bread, "\r", 1, 0.2, 1); + if (bread == 1 && buf[0] == ';') + goto check_lumagen; /* It may be a Lumagen, so skip it. */ + + /* Send the rest of the spectrolino command */ + p->write_read_ex(p, "D024\r\n", 0, buf, BUFSZ-1, &bread, "\r", 1, 0.5, 1); + + + if (bread == 0) { + char *bp; + a1logd(p->log, 5, "ser_vtpglut_type: Spectrolino command returned nothing\n"); + + /* It could be a Lumagen Radiance with echo off, */ + /* so poke it and see if it responds. */ + /* (Unfortunately the Lumagen delimeters modes aren't */ + /* backwards compatible, so we may have to poke it twice...) */ + + /* Send "X" first, to get it out of menu mode ? */ + p->write_read_ex(p, "X", 1, buf, BUFSZ, NULL, "\n", 1, 0.1, 1); // Menu off + + a1logd(p->log, 5, "ser_vtpglut_type: Checking for Lumagen Radiance\n"); + p->write_read_ex(p, "#ZQS00\r", 0, buf, BUFSZ, &bread, "\n", 1, 0.5, 1); + if (bread == 0) { + p->write_read_ex(p, "#0ZQS008E\r", 0, buf, BUFSZ, &bread, "\n", 1, 0.5, 1); + lgchsum = 1; + } + + if (bread > 0 + && (bp = strrchr(buf, '!')) != NULL + && strlen(bp) >= 4 + && strncmp(bp,"!S00",4) == 0) { + goto check_lumagen; + } + + /* Nope - look for something at a different baud rate */ + goto continue_looking; + } + buf[bread] = '\000'; + len = strlen(buf); + + /* Is this a Lumagen Radiance with echo on, it responds with ";D024..." */ + if ((len >= 4 && strncmp(buf, ";D024", 4) == 0) + || (len >= 4 && strncmp(buf, "!N\n\r", 4) == 0)) { + char *bp; + + check_lumagen:; + + /* Get the Lumagen device information */ + p->write_read_ex(p, lgchsum ? "#0ZQS018F\r" : "#ZQS01\r", + 0, buf, BUFSZ, &bread, "\n", 1, 0.5, 1); + + /* Might have echo with checksum, so lgchsum not set correctly */ + if (!lgchsum && bread > 0 && strstr(buf, "!N") != NULL) { + p->write_read_ex(p, "#0ZQS018F\r", 0, buf, BUFSZ, &bread, "\n", 1, 0.5, 1); + if (bread >= 11 && strncmp(buf, "#0ZQS018F!Y", 11) == 0) + lgchsum = 1; + } + + /* returns something like "ZQS01!S01,Radiance2020,030115,1016,001309\r\m" */ + if ((bp = strrchr(buf, '!')) != NULL && strlen(bp) >= 13) { + if (strncmp(bp,"!S01,Radiance",13) == 0) { + a1logd(p->log, 5, "ser_vtpglut_type: Found Lumagen Radiance\n"); + lumagen = 1; + break; + } + } + a1logd(p->log, 5, "ser_vtpglut_type: Not Lumagen Radiance\n"); + goto continue_looking; + } + } /* Possibly Lumagen */ + + continue_looking:; + + /* Check for user abort */ + if (uicallback != NULL) { + vtpglut_code ev; + if ((ev = uicallback(cntx, vtpglut_negcoms)) == vtpglut_user_abort) { + a1logd(p->log, 5, "ser_vtpglut_type: User aborted\n"); + return instUnknown; + } + } + } /* next baud */ + + if (rv == instUnknown + && lumagen == 0 + && msec_time() >= etime) { /* We haven't established comms */ + a1logd(p->log, 5, "ser_vtpglut_type: Failed to establish coms\n"); + return instUnknown; + } + + a1logd(p->log, 5, "ser_vtpglut_type: Got coms with device\n"); + + if (lumagen) { + char *bp; + + /* Get the Lumagen device information */ + if ((se = p->write_read_ex(p, "ZQS01", 0, buf, BUFSZ, NULL, "\n", 1, 2.5, 1)) != 0) + return instUnknown; + + /* returns something like "ZQS01!S01,Radiance2020,030115,1016,001309\r\m" */ + if ((bp = strstr(buf, "!")) != NULL && strlen(bp) >= 13) { + if (strncmp(bp,"!S01,Radiance",13) == 0) { + rv = devRadiance; + } + } + } + + a1logd(p->log, 5, "ser_vtpglut_type: Device type is '%s'\n", inst_name(rv)); + + p->close_port(p); /* Or should we leave it open ?? */ + + p->itype = rv; + + return rv; +} +#undef BUFSZ + +#endif /* ENABLE_SERIAL */ + +#if defined(ENABLE_SERIAL) || defined(ENABLE_FAST_SERIAL) + +/* Convert an ASCII Hex character to an integer. */ +static int h2b(char c) { + if (c >= '0' && c <= '9') + return (c-(int)'0'); + if (c >= 'A' && c <= 'F') + return (10 + c-(int)'A'); + if (c >= 'a' && c <= 'f') + return (10 + c-(int)'a'); + return 0; +} + +/* Convert a Hex encoded buffer into binary. */ +/* len is number of bytes out */ +static void hex2bin(char *buf, int len) { + int i; + + for (i = 0; i < len; i++) { + buf[i] = (char)((h2b(buf[2 * i + 0]) << 4) + | (h2b(buf[2 * i + 1]) << 0)); + } +} + +#endif /* ENABLE_SERIAL */ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spectro/vtpglut.h b/spectro/vtpglut.h new file mode 100755 index 0000000..c461887 --- /dev/null +++ b/spectro/vtpglut.h @@ -0,0 +1,243 @@ + +#ifndef VTPGLUT_H + +/* + * v3dlut/vtpg API definition. + * + * Abstract base class for common color Video Test Pattern Generator interface + * and Video 3DLut devices. + */ + +/* + * Argyll Color Correction System + * + * Author: Graeme W. Gill + * Date: 15/3/2001 + * + * Copyright 2001 - 2013 Graeme W. Gill + * All rights reserved. + * + * This material is licenced under the GNU GENERAL PUBLIC LICENSE Version 2 or later :- + * see the License2.txt file for licencing details. + * + */ + +#include "dev.h" /* Device base class */ +#include "insttypes.h" /* libinst Includes this functionality */ +#include "icoms.h" /* libinst Includes this functionality */ +#include "conv.h" + +#ifdef __cplusplus + extern "C" { +#endif + +/* ------------------------------------------------- */ +/* aprox. debug level guide: + + 1,2 Applications, internal errors + 2,3 High level instrument drivers + 4,5 High level instrument communications + 6,7 High level serial/USB communications + 8,9 Low level serial/USB communications + +*/ + +/* ---------------------------------------- */ +/* Device interface abstract base class. */ + +/* This is used for all device types except color instruments */ + +/* Abstract return codes in ms 8bits. */ +/* Device dependant codes in ls 16 bits. */ +/* Note :- update vtpglut_interp_error() in other.c if anything here is changed. */ +/* and also check all the device specific XXX_interp_code() routines too. */ +typedef enum { + vtpglut_ok = 0x000000, + vtpglut_notify = 0x010000, /* A Notification */ + vtpglut_warning = 0x020000, /* A Warning */ + vtpglut_no_coms = 0x030000, /* init_coms() hasn't been called yet */ + vtpglut_no_init = 0x040000, /* init_dev() hasn't been called yet */ + vtpglut_unsupported = 0x050000, /* Unsupported function */ + vtpglut_internal_error = 0x060000, /* Internal software error */ + vtpglut_coms_fail = 0x070000, /* Communication failure */ + vtpglut_unknown_model = 0x080000, /* Not the expected device */ + vtpglut_protocol_error = 0x090000, /* Read or Write protocol error */ + vtpglut_user_abort = 0x0A0000, /* User hit escape */ + vtpglut_user_trig = 0x0C0000, /* User hit trigger key */ + vtpglut_unexpected_reply = 0x140000, /* Unexpected Reply */ + vtpglut_wrong_setup = 0x150000, /* Setup is wrong or conflicting */ + vtpglut_hardware_fail = 0x160000, /* Hardware failure */ + vtpglut_system_error = 0x170000, /* System call (ie malloc) fail */ + vtpglut_bad_parameter = 0x180000, /* Bad parameter value */ + vtpglut_other_error = 0x190000, /* Some other error */ + vtpglut_mask = 0xff0000, /* vtpglut_code mask value */ + vtpglut_dmask = 0x00ffff /* device specific mask value */ +} vtpglut_code; + +/* Device capabilities & modes */ +/* Note that due to the binary combinations, capabilities is not definititive */ +/* as to valid modes. check_mode() is definitive. */ +/* #defines are for saving modes in a version independent way. */ +/* Note :- update vtpglut_mode_sym[] table in vtpglut.c if anything here is changed. */ +typedef enum { + vtpglut_mode_none = 0x00000000, /* No capability/mode */ +} vtpglut_mode; + +typedef enum { + vtpglut2_none = 0x00000000, /* No capability */ +} vtpglut_capability; + + +/* Device options for get_set_opt() */ +typedef enum { + vtpglut_opt_unknown = 0x0000, /* Option not specified */ +} vtpglut_opt_type; + +/* User interaction callback (uicallback()) function purpose */ +/* (Make sure vtpglut.c inst_code ser_uicallbac() is updated if this changes. */ +typedef enum { + vtpglut_negcoms /* Negotiating communications - can abort */ +} vtpglut_ui_purp; + +/* Asynchronous event callback type */ +typedef enum { + inst_event_none /* (Placeholder) */ +} vtpglut_event_type; + +/* ---------------------------------------- */ +/* Device interface abstract base class */ + +# define EXTRA_VTPGLUT_OBJ + +/* vtpg/v3dlut interface base object */ +/* Note that some methods work after creation, while many */ +/* will return an error if communications hasn't been established and */ +/* the device initialised. Some may change their response before and */ +/* after initialisation. */ +#define VTPGLUT_OBJ_BASE \ + \ + DEV_OBJ_BASE \ + \ + EXTRA_VTPGLUT_OBJ \ + \ + vtpglut_code (*uicallback)(void *cntx, vtpglut_ui_purp purp); \ + void *uic_cntx; /* User interaction callback function */ \ + void (*eventcallback)(void *cntx, vtpglut_event_type event); \ + void *event_cntx; /* Asynchronous event callback function */ \ + \ + /* Virtual delete. Cleans up things done by new_vtpglut(). */ \ + vtpglut_code (*vdel)( \ + struct _vtpglut *p); \ + \ + /* Establish communications at the indicated baud rate. */ \ + /* (Serial parameters are ignored for USB/Network device) */ \ + /* Timout in to seconds, and return non-zero error code */ \ + vtpglut_code (*init_coms)( \ + struct _vtpglut *p); \ + \ + /* Initialise or re-initialise the vtpglut. */ \ + /* return non-zero on an error, with dev error code */ \ + vtpglut_code (*init_vtpglut)( \ + struct _vtpglut *p); \ + \ + /* Return the device type */ \ + /* (this could concievably change after init_vtpglut()) */ \ + /* Can be called before init */ \ + devType (*get_dtype)( \ + struct _vtpglut *p); \ + \ + /* Return the device serial number. */ \ + /* (This will be an empty string if there is no serial no) */ \ + char *(*get_serial_no)( \ + struct _vtpglut *p); \ + \ + /* Return the avilable devices modes and capabilities. */ \ + /* Can be called before init, but may be different to */ \ + /* what's returned after initilisation. */ \ + /* Note that these may change with the mode. */ \ + /* Arguments may be NULL */ \ + void (*capabilities)(struct _vtpglut *p, \ + vtpglut_mode *cap1, \ + vtpglut_capability *cap2); \ + \ + /* Check that the particular device measurement mode is valid, */ \ + /* since it's not possible to be 100% sure from capabilities */ \ + vtpglut_code (*check_mode)( \ + struct _vtpglut *p, \ + vtpglut_mode m); /* Requested mode */ \ + \ + /* Set the device mode */ \ + /* Note that this may change the capabilities. */ \ + vtpglut_code (*set_mode)( \ + struct _vtpglut *p, \ + vtpglut_mode m); /* Requested mode */ \ + \ + /* Get a status or get or set an option */ \ + /* option state. */ \ + /* Some options can be set before init */ \ + /* See vtpglut_opt_type typedef for list of mode types */ \ + vtpglut_code (*get_set_opt)( \ + struct _vtpglut *p, \ + vtpglut_opt_type m, /* Requested option mode */ \ + ...); /* Option parameters */ \ + \ + /* Supply a user interaction callback function. \ + * (Nothing currentlt defined) \ + * \ + * NULL can be set to disable the callback. \ + */ \ + void (*set_uicallback)(struct _vtpglut *p, \ + vtpglut_code (*uicallback)(void *cntx, vtpglut_ui_purp purp), \ + void *cntx); \ + \ + /* Supply an aynchronous event callback function. \ + * This is called from a different thread with the following possible events: \ + * \ + * inst_event_XXX: (placeholder) \ + * \ + * NULL can be set to disable the callback. \ + */ \ + void (*set_event_callback)(struct _vtpglut *p, \ + void (*eventcallback)(void *cntx, vtpglut_event_type event), \ + void *cntx); \ + \ + /* Generic device error codes interpretation */ \ + char * (*vtpglut_interp_error)(struct _vtpglut *p, vtpglut_code ec); \ + \ + /* Instrument specific error codes interpretation */ \ + char * (*interp_error)(struct _vtpglut *p, int ec); \ + \ + /* Return the last serial communication error code */ \ + /* (This is used for deciding fallback/retry strategies) */ \ + int (*last_scomerr)(struct _vtpglut *p); \ + \ + /* Destroy ourselves */ \ + void (*del)(struct _vtpglut *p); \ + + +/* The base object type */ +struct _vtpglut { + VTPGLUT_OBJ_BASE + }; typedef struct _vtpglut vtpglut; + +/* Virtual constructor. */ +/* Return NULL for unknown device, */ +/* or serial device if nocoms == 0. */ +/* (Doesn't copy icompaths log!) */ +extern vtpglut *new_vtpglut( + icompath *path, /* Device path for this device */ + int nocoms, /* Don't open if communications are needed to establish device type */ + a1log *log, /* Log to use */ + vtpglut_code (*uicallback)(void *cntx, vtpglut_ui_purp purp), + /* optional uicallback for abort */ + void *cntx /* Context for callback */ +); + +/* - - - - - - - - - - - - - - - - - - -- */ + +#ifdef __cplusplus + } +#endif + +#define VTPGLUT_H +#endif /* VTPGLUT_H */ diff --git a/spectro/vtpgluttypes.h b/spectro/vtpgluttypes.h new file mode 100755 index 0000000..081d130 --- /dev/null +++ b/spectro/vtpgluttypes.h @@ -0,0 +1,44 @@ + +/* Add instrument instance headers here */ + +/* + * Copyright 2001 - 2013 Graeme W. Gill + * All rights reserved. + * + * This material is licenced under the GNU GENERAL PUBLIC LICENSE Version 2 or later :- + * see the License2.txt file for licencing details. + */ + +#ifdef __cplusplus + extern "C" { +#endif + + +#ifdef ENABLE_SERIAL +# include "dtp22.h" +# include "dtp41.h" +# include "dtp51.h" +# include "ss.h" +#endif + +#ifdef ENABLE_FAST_SERIAL +# include "specbos.h" +# include "kleink10.h" +# include "smcube.h" +#endif + +#ifdef ENABLE_USB +# include "dtp20.h" +# include "dtp92.h" +# include "i1disp.h" +# include "i1d3.h" +# include "i1pro.h" +# include "munki.h" +# include "spyd2.h" +# include "huey.h" +# include "ex1.h" +# include "hcfr.h" +# include "colorhug.h" +#endif + + diff --git a/spectro/webwin.c b/spectro/webwin.c index 1d5f713..1d5f713 100644..100755 --- a/spectro/webwin.c +++ b/spectro/webwin.c diff --git a/spectro/webwin.h b/spectro/webwin.h index 1f4412a..1f4412a 100644..100755 --- a/spectro/webwin.h +++ b/spectro/webwin.h diff --git a/spectro/xdg_bds.c b/spectro/xdg_bds.c index 03f7561..73e3edd 100644..100755 --- a/spectro/xdg_bds.c +++ b/spectro/xdg_bds.c @@ -263,7 +263,10 @@ void xdg_free(char **paths, int nopaths) { /* type of storage and access required. Return 0 if there is an error. */ /* The files are always unique (ie. the first match to a given filename */ /* in the possible XDG list of directories is returned, and files with */ -/* the same name in other XDG directories are ignored) */ +/* the same name in other XDG directories are ignored), unless the */ +/* xdg_all_matches flag is set. */ +/* If xdg_read, then first user then local scope are searched. */ +/* If xdf_write, then only the specified scope is used. */ /* Wildcards should not be used for xdg_write. */ /* The list should be free'd using xdg_free() after use. */ /* XDG environment variables and the subpath are assumed to be using */ @@ -279,6 +282,7 @@ int xdg_bds( xdg_storage_type st, /* Specify the storage type */ xdg_op_type op, /* Operation type */ xdg_scope sc, /* Scope if write */ + xdg_options opt, /* Options flags */ char *pfname /* Sub-path and file name(s) */ ) { char *path = NULL; /* Directory paths to search, separated by ':' or ';' */ @@ -315,7 +319,7 @@ int xdg_bds( return 0; } #ifdef NT - } else if (getenv("HOME") == NULL && (xdg = getenv("APPDATA")) != NULL) { + } else if (login_HOME() == NULL && (xdg = getenv("APPDATA")) != NULL) { if ((path = cappend(path, xdg)) == NULL) { if (er != NULL) *er = xdg_alloc; a1loge(g_log, 1, "xdg_bds: malloc failed\n"); @@ -323,7 +327,7 @@ int xdg_bds( } #endif } else { - if ((home = getenv("HOME")) == NULL + if ((home = login_HOME()) == NULL #ifdef NT && (home = getenv("APPDATA")) == NULL #endif @@ -339,7 +343,7 @@ int xdg_bds( return 0; } #ifdef NT - if (getenv("HOME") != NULL) + if (login_HOME() != NULL) path = dappend(path, ".local/share"); #else #ifdef UNIX_APPLE @@ -363,7 +367,7 @@ int xdg_bds( return 0; } #ifdef NT - } else if (getenv("HOME") == NULL && (xdg = getenv("APPDATA")) != NULL) { + } else if (login_HOME() == NULL && (xdg = getenv("APPDATA")) != NULL) { if ((path = cappend(path, xdg)) == NULL) { if (er != NULL) *er = xdg_alloc; a1loge(g_log, 1, "xdg_bds: malloc failed\n"); @@ -371,7 +375,7 @@ int xdg_bds( } #endif } else { - if ((home = getenv("HOME")) == NULL + if ((home = login_HOME()) == NULL #ifdef NT && (home = getenv("APPDATA")) == NULL #endif @@ -387,7 +391,7 @@ int xdg_bds( return 0; } #ifdef NT - if (getenv("HOME") != NULL) + if (login_HOME() != NULL) path = dappend(path, ".config"); #else #ifdef UNIX_APPLE @@ -411,7 +415,7 @@ int xdg_bds( return 0; } #ifdef NT - } else if (getenv("HOME") == NULL && (xdg = getenv("APPDATA")) != NULL) { + } else if (login_HOME() == NULL && (xdg = getenv("APPDATA")) != NULL) { if ((path = cappend(path, xdg)) == NULL) { if (er != NULL) *er = xdg_alloc; a1loge(g_log, 1, "xdg_bds: malloc failed\n"); @@ -424,7 +428,7 @@ int xdg_bds( } #endif } else { - if ((home = getenv("HOME")) == NULL + if ((home = login_HOME()) == NULL #ifdef NT && (home = getenv("APPDATA")) == NULL #endif @@ -440,7 +444,7 @@ int xdg_bds( return 0; } #ifdef NT - if (getenv("HOME") != NULL) + if (login_HOME() != NULL) path = dappend(path, ".cache"); else path = dappend(path, "Cache"); @@ -662,18 +666,20 @@ int xdg_bds( } DBG((DBGA,"Found match with '%s'\n",fpath)) - /* Check that this one hasn't already been found */ - /* in a different search directory */ - for (i = 0; i < npaths; i++) { - if (strcmp(fpath + rlen, fnames[i]) == 0) { - /* Already been found earlier - ignore it */ - break; + if (opt != xdg_all_matches) { + /* Check that this one hasn't already been found */ + /* in a different search directory */ + for (i = 0; i < npaths; i++) { + if (strcmp(fpath + rlen, fnames[i]) == 0) { + /* Already been found earlier - ignore it */ + break; + } + } + if (i < npaths) { + free(fpath); + DBG((DBGA,"Ignoring it because it's already in list\n")) + continue; /* Ignore it */ } - } - if (i < npaths) { - free(fpath); - DBG((DBGA,"Ignoring it because it's already in list\n")) - continue; /* Ignore it */ } /* Found a file, so append it to the list */ @@ -969,7 +975,7 @@ static int runtest( } printf("\nTesting Variable %s\n",env); - if ((nopaths = xdg_bds(&er, &paths, st, xdg_write, sc, pfname)) == 0) { + if ((nopaths = xdg_bds(&er, &paths, st, xdg_write, sc, xdg_none, pfname)) == 0) { printf("Write test failed with %s\n",xdg_errstr(er)); return 1; } @@ -996,7 +1002,7 @@ static int runtest( } xdg_free(paths, nopaths); - if ((nopaths = xdg_bds(&er, &paths, st, xdg_read, sc, pfname)) < 1) { + if ((nopaths = xdg_bds(&er, &paths, st, xdg_read, sc, xdg_none, pfname)) < 1) { printf("Read test failed with %s\n",xdg_errstr(er)); return 1; } diff --git a/spectro/xdg_bds.h b/spectro/xdg_bds.h index 18101b0..9eb6651 100644..100755 --- a/spectro/xdg_bds.h +++ b/spectro/xdg_bds.h @@ -51,6 +51,12 @@ typedef enum { xdg_local /* Local System wide context */ } xdg_scope; +/* Optional flags */ +typedef enum { + xdg_none = 0x0000, /* No options */ + xdg_all_matches = 0x0001 /* Return all matching files */ +} xdg_options; + /* An error code */ typedef enum { xdg_ok = 0, @@ -96,6 +102,7 @@ int xdg_bds( xdg_storage_type st, /* Specify the storage type */ xdg_op_type op, /* Operation type */ xdg_scope sc, /* Scope if write */ + xdg_options opt, /* Options flags */ char *spath /* Sub-path and file name or file pattern */ ); diff --git a/spectro/xrga.c b/spectro/xrga.c index 0bf22fa..7318fce 100644..100755 --- a/spectro/xrga.c +++ b/spectro/xrga.c @@ -42,6 +42,7 @@ #ifndef SALONEINSTLIB # include "plot.h" #endif +#include "cgats.h" #include "xspect.h" #include "insttypes.h" #include "conv.h" diff --git a/spectro/xrga.h b/spectro/xrga.h index 0605fc8..0605fc8 100644..100755 --- a/spectro/xrga.h +++ b/spectro/xrga.h diff --git a/target/ColorChecker.ti2 b/target/ColorChecker.ti2 index 6ede47a..6ede47a 100644..100755 --- a/target/ColorChecker.ti2 +++ b/target/ColorChecker.ti2 diff --git a/target/ECI2002.ti2 b/target/ECI2002.ti2 index 0ab3095..0ab3095 100644..100755 --- a/target/ECI2002.ti2 +++ b/target/ECI2002.ti2 diff --git a/target/ECI2002R.ti2 b/target/ECI2002R.ti2 index d3f2d8b..d3f2d8b 100644..100755 --- a/target/ECI2002R.ti2 +++ b/target/ECI2002R.ti2 diff --git a/target/FograStrip2.ti1 b/target/FograStrip2.ti1 index f8abae7..f8abae7 100644..100755 --- a/target/FograStrip2.ti1 +++ b/target/FograStrip2.ti1 diff --git a/target/FograStrip2_2.ti2 b/target/FograStrip2_2.ti2 index b84cb9d..b84cb9d 100644..100755 --- a/target/FograStrip2_2.ti2 +++ b/target/FograStrip2_2.ti2 diff --git a/target/FograStrip3.ti1 b/target/FograStrip3.ti1 index 4cf126f..4cf126f 100644..100755 --- a/target/FograStrip3.ti1 +++ b/target/FograStrip3.ti1 diff --git a/target/FograStrip3_3.ti2 b/target/FograStrip3_3.ti2 index 8f9822e..8f9822e 100644..100755 --- a/target/FograStrip3_3.ti2 +++ b/target/FograStrip3_3.ti2 diff --git a/target/Jamfile b/target/Jamfile index 1ab2da6..07a6e5c 100644..100755 --- a/target/Jamfile +++ b/target/Jamfile @@ -34,6 +34,8 @@ LINKLIBS = ../xicc/libxcolorants ../spectro/libconv ../xicc/libxicc ../spectro/l $(TIFFLIB) $(JPEGLIB) $(PNGLIB) $(ZLIB) $(LibWin) ; +LINKFLAGS += $(GUILINKFLAGS) ; + #target generator Main targen : targen.c ofps.c ifarp.c simplat.c simdlat.c prand.c ; diff --git a/target/License.txt b/target/License.txt index a871fcf..a871fcf 100644..100755 --- a/target/License.txt +++ b/target/License.txt diff --git a/target/Readme.txt b/target/Readme.txt index 99a8317..99a8317 100644..100755 --- a/target/Readme.txt +++ b/target/Readme.txt diff --git a/target/afiles b/target/afiles index 4b06b9f..4b06b9f 100644..100755 --- a/target/afiles +++ b/target/afiles diff --git a/target/alphix.c b/target/alphix.c index 6e5fc85..6e5fc85 100644..100755 --- a/target/alphix.c +++ b/target/alphix.c diff --git a/target/alphix.h b/target/alphix.h index aad5b9f..aad5b9f 100644..100755 --- a/target/alphix.h +++ b/target/alphix.h diff --git a/target/filmtarg.c b/target/filmtarg.c index af341dd..af341dd 100644..100755 --- a/target/filmtarg.c +++ b/target/filmtarg.c diff --git a/target/i1_RGB_Scan_1.4.ti2 b/target/i1_RGB_Scan_1.4.ti2 index 8aaf081..8aaf081 100644..100755 --- a/target/i1_RGB_Scan_1.4.ti2 +++ b/target/i1_RGB_Scan_1.4.ti2 diff --git a/target/ifarp.c b/target/ifarp.c index 03fc914..03fc914 100644..100755 --- a/target/ifarp.c +++ b/target/ifarp.c diff --git a/target/ifarp.h b/target/ifarp.h index ee18840..ee18840 100644..100755 --- a/target/ifarp.h +++ b/target/ifarp.h diff --git a/target/ofps.c b/target/ofps.c index 5c2219c..54a0ea1 100644..100755 --- a/target/ofps.c +++ b/target/ofps.c @@ -108,7 +108,7 @@ which would probably be regarded as important. To measure spread, independent voronoi tessellations of - these sub dimensions would be neededi, and they could be + these sub dimensions would be needed, and they could be used partly driver optimization (??). For 1D device channels this wouldn't be so hard to @@ -1718,8 +1718,8 @@ static unsigned int comp_cmask(ofps *s, int *nix) { /* the resulting location to be the same of within this. */ for (e = 0; e <= di; e++) { int ix = nix[e]; - if (ix < 0 && ix >= -s->nbp) { /* If fake surface node */ - smask |= 1 << -ix-1; + if (ix < 0 && ix >= (-s->nbp)) { /* If fake surface node */ + smask |= 1 << (-ix-1); } else if (ix >= 0) { /* If real node */ cmask &= s->n[ix]->pmask; } @@ -1752,7 +1752,7 @@ static void det_vtx_gsurf(ofps *s, vtx *vx) { for (e = 0; e <= di; e++) { int ix = vx->nix[e]; if (ix < 0 && ix >= -s->nbp) { /* If fake surface node */ - smask |= 1 << -ix-1; + smask |= 1 << (-ix-1); } else if (ix >= 0) { vx->cmask &= s->n[ix]->pmask; } diff --git a/target/ofps.h b/target/ofps.h index 05ca121..05ca121 100644..100755 --- a/target/ofps.h +++ b/target/ofps.h diff --git a/target/ppoint.c b/target/ppoint.c index 217b1e9..217b1e9 100644..100755 --- a/target/ppoint.c +++ b/target/ppoint.c diff --git a/target/ppoint.h b/target/ppoint.h index 2a4bc52..2a4bc52 100644..100755 --- a/target/ppoint.h +++ b/target/ppoint.h diff --git a/target/prand.c b/target/prand.c index 7ce5760..7ce5760 100644..100755 --- a/target/prand.c +++ b/target/prand.c diff --git a/target/prand.h b/target/prand.h index d7e50eb..d7e50eb 100644..100755 --- a/target/prand.h +++ b/target/prand.h diff --git a/target/printtarg.c b/target/printtarg.c index 1b03b3c..1b03b3c 100644..100755 --- a/target/printtarg.c +++ b/target/printtarg.c diff --git a/target/randix.c b/target/randix.c index bf85764..bf85764 100644..100755 --- a/target/randix.c +++ b/target/randix.c diff --git a/target/randix.h b/target/randix.h index b4c36c0..b4c36c0 100644..100755 --- a/target/randix.h +++ b/target/randix.h diff --git a/target/simdlat.c b/target/simdlat.c index 50f159b..50f159b 100644..100755 --- a/target/simdlat.c +++ b/target/simdlat.c diff --git a/target/simdlat.h b/target/simdlat.h index 93e0ad3..93e0ad3 100644..100755 --- a/target/simdlat.h +++ b/target/simdlat.h diff --git a/target/simplat.c b/target/simplat.c index e738ff7..e738ff7 100644..100755 --- a/target/simplat.c +++ b/target/simplat.c diff --git a/target/simplat.h b/target/simplat.h index 4cede20..4cede20 100644..100755 --- a/target/simplat.h +++ b/target/simplat.h diff --git a/target/targen.c b/target/targen.c index 96cda6c..96cda6c 100644..100755 --- a/target/targen.c +++ b/target/targen.c diff --git a/target/targen.h b/target/targen.h index c99b551..c99b551 100644..100755 --- a/target/targen.h +++ b/target/targen.h diff --git a/tweak/Jamfile b/tweak/Jamfile index c788adf..fd168f5 100644..100755 --- a/tweak/Jamfile +++ b/tweak/Jamfile @@ -21,6 +21,8 @@ LINKLIBS = ../icc/libicc ../xicc/libxicc ../cgats/libcgats ../numlib/libnum ../plot/libplot ../plot/libvrml ../numlib/libui $(LibWin) ; +LINKFLAGS += $(GUILINKFLAGS) ; + # Profile refiner Main refine : refine.c ; diff --git a/tweak/License.txt b/tweak/License.txt index a871fcf..a871fcf 100644..100755 --- a/tweak/License.txt +++ b/tweak/License.txt diff --git a/tweak/Readme.txt b/tweak/Readme.txt index a409b90..a409b90 100644..100755 --- a/tweak/Readme.txt +++ b/tweak/Readme.txt diff --git a/tweak/afiles b/tweak/afiles index e455547..e455547 100644..100755 --- a/tweak/afiles +++ b/tweak/afiles diff --git a/tweak/refine.c b/tweak/refine.c index 4bcdfbb..c9e16bd 100644..100755 --- a/tweak/refine.c +++ b/tweak/refine.c @@ -175,7 +175,7 @@ void usage(char *diag, ...) { fprintf(stderr," -i illum Choose illuminant for computation of CIE XYZ from spectral data & FWA:\n"); fprintf(stderr," A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp\n"); fprintf(stderr," -o observ Choose CIE Observer for spectral data:\n"); - fprintf(stderr," 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2\n"); + fprintf(stderr," 1931_2, 1964_10, 2012_2 (def), 2012_10, S&B 1955_2, shaw, J&V 1978_2 or file.cmf\n"); fprintf(stderr," cietarget Target CIE or spectral values, CGATS file (e.g. .ti3)\n"); fprintf(stderr," ciecurrent Actual CIE or spectral values, CGATS file (e.g. .ti3)\n"); fprintf(stderr," [outdevicc] Output device ICC profile to set gamut limit (not used if -g)\n"); @@ -276,7 +276,8 @@ main(int argc, char *argv[]) { xspect cust_tillum, *tillump = NULL; /* Custom target/simulated illumination spectrum */ icxIllumeType illum = icxIT_D50; /* Spectral defaults */ xspect cust_illum; /* Custom illumination spectrum */ - icxObserverType observ = icxOT_Judd_Voss_2; + icxObserverType obType = icxOT_CIE_2012_2; + xspect custObserver[3]; /* If obType = icxOT_custom */ callback cb; /* Callback support stucture for setting abstract profile */ icmFile *rd_fp = NULL; /* Existing abstract profile to modify */ @@ -457,21 +458,30 @@ main(int argc, char *argv[]) { if (na == NULL) usage("Expected argument to -o"); if (strcmp(na, "1931_2") == 0) { /* Classic 2 degree */ spec = 1; - observ = icxOT_CIE_1931_2; + obType = icxOT_CIE_1931_2; } else if (strcmp(na, "1964_10") == 0) { /* Classic 10 degree */ spec = 1; - observ = icxOT_CIE_1964_10; + obType = icxOT_CIE_1964_10; + } else if (strcmp(na, "2012_2") == 0) { /* Latest 2 degree */ + spec = 1; + obType = icxOT_CIE_2012_2; + } else if (strcmp(na, "2012_10") == 0) { /* Latest 10 degree */ + spec = 1; + obType = icxOT_CIE_2012_10; } else if (strcmp(na, "1955_2") == 0) { /* Stiles and Burch 1955 2 degree */ spec = 1; - observ = icxOT_Stiles_Burch_2; + obType = icxOT_Stiles_Burch_2; } else if (strcmp(na, "1978_2") == 0) { /* Judd and Voss 1978 2 degree */ spec = 1; - observ = icxOT_Judd_Voss_2; + obType = icxOT_Judd_Voss_2; } else if (strcmp(na, "shaw") == 0) { /* Shaw and Fairchilds 1997 2 degree */ spec = 1; - observ = icxOT_Shaw_Fairchild_2; - } else - usage("Unrecogised argument '%s' to -o",na); + obType = icxOT_Shaw_Fairchild_2; + } else { /* Assume it's a filename */ + obType = icxOT_custom; + if (read_cmf(custObserver, na) != 0) + usage(0,"Failed to read custom observer CMF from -o file '%s'",na); + } } else @@ -537,7 +547,7 @@ main(int argc, char *argv[]) { printf("No CIE data found, switching to spectral with standard observer & D50 for file '%s'\n",cg[n].name); spec = 1; illum = icxIT_D50; - observ = icxOT_CIE_1931_2; + obType = icxOT_CIE_1931_2; } if (spec && cgf->find_kword(cgf, 0, "SPECTRAL_BANDS") < 0) error ("No spectral data data found in file '%s' when spectral expected",cg[n].name); @@ -662,7 +672,7 @@ main(int argc, char *argv[]) { /* Create a spectral conversion object */ if ((sp2cie = new_xsp2cie(illum, illum == icxIT_none ? NULL : &cust_illum, - observ, NULL, icSigLabData, icxClamp)) == NULL) + obType, custObserver, icSigLabData, icxClamp)) == NULL) error("Creation of spectral conversion object failed"); if (fwacomp) { diff --git a/ucmm/Jamfile b/ucmm/Jamfile index 23038f7..23038f7 100644..100755 --- a/ucmm/Jamfile +++ b/ucmm/Jamfile diff --git a/ucmm/afiles b/ucmm/afiles index 3204a05..3204a05 100644..100755 --- a/ucmm/afiles +++ b/ucmm/afiles diff --git a/ucmm/ucmm.c b/ucmm/ucmm.c index 52bd8f0..7f823c0 100644..100755 --- a/ucmm/ucmm.c +++ b/ucmm/ucmm.c @@ -143,7 +143,7 @@ static char *buf2hex(unsigned char *buf, int len) { } -/* Install a profile for a given monitor */ +/* Install a profile for a given monitor. */ /* Either EDID or display_name may be NULL, but not both. */ /* Any existing association is overwritten. Installed profiles */ /* are not deleted. */ @@ -153,7 +153,7 @@ ucmm_error ucmm_install_monitor_profile( int edid_len, /* Length of edid data */ char *display_name, /* Fall back device association, */ /* the X11 display name */ - char *profile /* Path to profile to be installed. */ + char *sprof /* Path to profile to be installed. */ ) { char *config_file = CONFIG_FILE; char *profile_dir = PROFILE_DIR; @@ -165,7 +165,7 @@ ucmm_error ucmm_install_monitor_profile( if (edid != NULL) edid_hash = fnv_32_buf(edid, edid_len); - debug2((errout,"ucmm_install_monitor_profile called with profile '%s', edid 0x%x, disp '%s'\n",profile,edid_hash,display_name)); + debug2((errout,"ucmm_install_monitor_profile called with profile '%s', edid 0x%x, disp '%s', scope '%s'\n",sprof,edid_hash,display_name, ucmm_scope_string(scope))); /* Verify that we've been given a suitable ICC profile */ /* And read it into a memory buffer */ @@ -173,8 +173,8 @@ ucmm_error ucmm_install_monitor_profile( icmFile *fp; icc *icco; - if ((fp = new_icmFileStd_name(profile,"r")) == NULL) { - debug2((errout,"Unable to ope file '%s'\n",profile)); + if ((fp = new_icmFileStd_name(sprof,"r")) == NULL) { + debug2((errout,"Unable to ope file '%s'\n",sprof)); return ucmm_invalid_profile; } @@ -185,7 +185,7 @@ ucmm_error ucmm_install_monitor_profile( } if (icco->read(icco,fp,0) != 0) { - debug2((errout,"icc read of '%s' failed\n",profile)); + debug2((errout,"icc read of '%s' failed\n",sprof)); icco->del(icco); fp->del(fp); return ucmm_invalid_profile; @@ -193,7 +193,7 @@ ucmm_error ucmm_install_monitor_profile( if (icco->header->deviceClass != icSigDisplayClass || icco->header->colorSpace != icSigRgbData) { - debug2((errout,"profile '%s' isn't an RGB display profile\n",profile)); + debug2((errout,"profile '%s' isn't an RGB display profile\n",sprof)); icco->del(icco); fp->del(fp); return ucmm_invalid_profile; @@ -215,6 +215,7 @@ ucmm_error ucmm_install_monitor_profile( if ((npaths = xdg_bds(&er, &paths, xdg_conf, xdg_write, scope == ucmm_local_system ? xdg_local : xdg_user, + xdg_none, config_file)) == 0) { return ucmm_open_config; } @@ -225,21 +226,22 @@ ucmm_error ucmm_install_monitor_profile( xdg_free(paths, npaths); /* Combined sub-path and profile name */ - if ((data_pathfile = malloc(strlen(profile_dir) + 1 + strlen(profile) + 1)) == NULL) + if ((data_pathfile = malloc(strlen(profile_dir) + 1 + strlen(sprof) + 1)) == NULL) return ucmm_resource; strcpy(data_pathfile, profile_dir); if (strlen(data_pathfile) > 1 && data_pathfile[strlen(data_pathfile)-1] != '/') strcat(data_pathfile, "/"); - if ((tt = strrchr(profile, '/')) != NULL) /* Get base name of profile */ + if ((tt = strrchr(sprof, '/')) != NULL) /* Get base name of profile */ tt++; else - tt = profile; + tt = sprof; strcat(data_pathfile, tt); if ((npaths = xdg_bds(&er, &paths, xdg_conf, xdg_write, scope == ucmm_local_system ? xdg_local : xdg_user, + xdg_none, data_pathfile)) == 0) { free(data_pathfile); free(conf_name); @@ -265,12 +267,12 @@ ucmm_error ucmm_install_monitor_profile( /* Read in the ICC profile, then set the X11 atom value */ #if defined(O_BINARY) || defined(_O_BINARY) - if ((fp = fopen(profile,"rb")) == NULL) + if ((fp = fopen(sprof,"rb")) == NULL) #else - if ((fp = fopen(profile,"r")) == NULL) + if ((fp = fopen(sprof,"r")) == NULL) #endif { - debug2((errout,"Can't open file '%s'\n",profile)); + debug2((errout,"Can't open file '%s'\n",sprof)); free(conf_name); free(data_name); return ucmm_profile_copy; @@ -278,7 +280,7 @@ ucmm_error ucmm_install_monitor_profile( /* Figure out how big it is */ if (fseek(fp, 0, SEEK_END)) { - debug2((errout,"Seek '%s' to EOF failed\n",profile)); + debug2((errout,"Seek '%s' to EOF failed\n",sprof)); free(conf_name); free(data_name); return ucmm_profile_copy; @@ -286,21 +288,21 @@ ucmm_error ucmm_install_monitor_profile( psize = (unsigned long)ftell(fp); if (fseek(fp, 0, SEEK_SET)) { - debug2((errout,"Seek '%s' to SOF failed\n",profile)); + debug2((errout,"Seek '%s' to SOF failed\n",sprof)); free(conf_name); free(data_name); return ucmm_profile_copy; } if ((pdata = (unsigned char *)malloc(psize)) == NULL) { - debug2((errout,"Failed to allocate buffer for profile '%s'\n",profile)); + debug2((errout,"Failed to allocate buffer for profile '%s'\n",sprof)); free(conf_name); free(data_name); return ucmm_profile_copy; } if (fread(pdata, 1, psize, fp) != psize) { - debug2((errout,"Failed to read profile '%s' into buffer\n",profile)); + debug2((errout,"Failed to read profile '%s' into buffer\n",sprof)); free(conf_name); free(data_name); return ucmm_profile_copy; @@ -311,6 +313,7 @@ ucmm_error ucmm_install_monitor_profile( /* Write the profile to its location */ if (mkpdirs(data_name)) { debug2((errout,"Can't create directories for file '%s'\n",data_name)); + free(pdata); free(conf_name); free(data_name); return ucmm_profile_copy; @@ -322,6 +325,7 @@ ucmm_error ucmm_install_monitor_profile( #endif { debug2((errout,"Can't create file '%s'\n",data_name)); + free(pdata); free(conf_name); free(data_name); return ucmm_profile_copy; @@ -329,11 +333,14 @@ ucmm_error ucmm_install_monitor_profile( if (fwrite(pdata, 1, psize, fp) != psize) { debug2((errout,"Failed to write profile '%s' into buffer\n",data_name)); + free(pdata); free(conf_name); free(data_name); return ucmm_profile_copy; } + free(pdata); + if (fclose(fp) != 0) { debug2((errout,"Failed to close profile '%s' into buffer\n",data_name)); free(conf_name); @@ -353,7 +360,8 @@ ucmm_error ucmm_install_monitor_profile( char *mname; /* Name of key to match to */ char *mval; /* Value to match */ int ix = 0; - int recno = -1; /* Number of the last record read */ + int recno = -1; /* Number of the last record read */ + char *xprofile = NULL; /* Path to existing profile, if any */ /* Open the configuration file for modification */ if (mkpdirs(conf_name)) { @@ -425,6 +433,7 @@ ucmm_error ucmm_install_monitor_profile( free(pp); continue; } + free(pp); if (ii > recno) /* Track biggest, so we know what to create next */ recno = ii; if ((pp = jc_get_nth_elem(key, 3)) != NULL && strcmp(pp, mname) == 0 && type == jc_string && strcmp(data, mval) == 0) { @@ -442,11 +451,32 @@ ucmm_error ucmm_install_monitor_profile( if (recno <= 0) recno = 1; debug2((errout, "Adding a new record %d\n",recno)); + + /* Delete any existing profile profile */ } else { + char *key; + jc_type type; + unsigned char *data; + size_t dataSize; + debug2((errout, "Replacing record %d\n",recno)); + + /* Get the existing profile path from the record */ + sprintf(keyn1, "devices/display/%d/ICC_PROFILE", recno); + key = keyn1; + debug2((errout,"Looking up record %d key '%s'\n",recno,keyn1)); + + if ((ev = jc->get_key(jc, -1, &key, &type, &data, &dataSize, NULL)) != jc_ok + || type != jc_string) { + debug2((errout,"jcnf locate/get_key failed with error %d\n",ev)); + } + if ((xprofile = strdup(data)) == NULL) { + debug2((errout,"jcnf get_key malloc failed\n")); + } + debug2((errout,"Existin profile '%s'\n",xprofile)); } - /* Write the record */ + /* Write the new/updated record */ sprintf(keyn1, "devices/display/%d/%s", recno, mname); sprintf(keyn2, "devices/display/%d/ICC_PROFILE", recno); if ((ev = jc->set_key(jc, -1, keyn1, jc_string, mval, strlen(mval)+1, NULL)) != jc_ok @@ -459,299 +489,54 @@ ucmm_error ucmm_install_monitor_profile( return ucmm_set_config; } free(mval); + debug2((errout,"Updated record\n")); - /* write to record the EDID or display name and the profile path */ - if ((ev = jc->update(jc)) != 0) { - debug2((errout,"jcnf write to '%s' failed with error %d\n",conf_name,ev)); - jc->del(jc); - free(conf_name); - free(data_name); - return ucmm_save_config; - } - debug2((errout,"Updated config file '%s'\n",conf_name)); - - /* We're done with this */ - jc->del(jc); - free(conf_name); - free(data_name); - } - debug2((errout,"ucmm done profile install\n")); - return ucmm_ok; -} - -/* Un-install a profile for a given monitor. */ -/* Either EDID or display_name may be NULL, but not both. */ -/* The monitor is left with no profile association. If a profile */ -/* name is provided and matches the one that was associated with */ -/* the monitor, and has no other association, then it will be deleted */ -/* from the data directory. */ -/* Return an error code */ -ucmm_error ucmm_uninstall_monitor_profile( - ucmm_scope scope, /* Scope of instalation */ - unsigned char *edid, /* Primary device identifier, NULL if none. */ - int edid_len, /* Length of edid data */ - char *display_name, /* Fall back device association, */ - char *profile /* Base name of profile to be deleted. NULL if not to be deleted. */ -) { - char *config_file = CONFIG_FILE; - char *profile_dir = PROFILE_DIR; - char *conf_name = NULL; /* Configuration path to use */ - char *data_name = NULL; /* Data path to use */ - char *dprof = NULL; /* Destination for profile */ - unsigned int edid_hash = 0; - - if (edid != NULL) - edid_hash = fnv_32_buf(edid, edid_len); - - debug2((errout,"ucmm_uninstall_monitor_profile called with profile '%s', edid 0x%x, disp '%s'\n",profile,edid_hash,display_name)); - - /* Locate the directories where the config file is, */ - /* and where the profile should be too. */ - { - int npaths; - xdg_error er; - char *data_pathfile; /* Path & name of destination */ - char **paths; - char *tt; - - if ((npaths = xdg_bds(&er, &paths, xdg_conf, xdg_read, - scope == ucmm_local_system ? xdg_local : xdg_user, - config_file)) == 0) { - return ucmm_open_config; - } - if ((conf_name = strdup(paths[0])) == NULL) { - xdg_free(paths, npaths); - return ucmm_resource; - } - xdg_free(paths, npaths); - - if (profile != NULL) { - /* Combined sub-path and profile name */ - if ((data_pathfile = malloc(strlen(profile_dir) + 1 + strlen(profile) + 1)) == NULL) - return ucmm_resource; - strcpy(data_pathfile, profile_dir); - - if (strlen(data_pathfile) > 1 && data_pathfile[strlen(data_pathfile)-1] != '/') - strcat(data_pathfile, "/"); - - if ((tt = strrchr(profile, '/')) != NULL) /* Get base name of profile */ - tt++; - else - tt = profile; - strcat(data_pathfile, tt); - - if ((npaths = xdg_bds(&er, &paths, xdg_conf, xdg_read, - scope == ucmm_local_system ? xdg_local : xdg_user, - data_pathfile)) == 0) { - free(data_pathfile); - free(conf_name); - return ucmm_open_config; - } - free(data_pathfile); - if ((data_name = strdup(paths[0])) == NULL) { - free(conf_name); - xdg_free(paths, npaths); - return ucmm_resource; - } - xdg_free(paths, npaths); - } - } - - debug2((errout,"config file = '%s'\n",conf_name)); - if (data_name != NULL) - debug2((errout,"data file = '%s'\n",data_name)); - - /* Get the config file */ - { - jc_error ev; - jcnf *jc; - char keyn1[100]; - char *mname; /* Name of key to match to */ - char *mval; /* Value to match */ - int ix; - int recno = -1; /* Number of the last record read */ - - /* Open the configuration file for modification */ - if (mkpdirs(conf_name)) { - debug2((errout,"Can't create directories for file '%s'\n",conf_name)); - free(conf_name); - if (data_name != NULL) - free(data_name); - return ucmm_open_config; - } - - if ((jc = new_jcnf(&ev, conf_name, jc_modify, jc_create)) == NULL) { - debug2((errout,"new_jcnf '%s' failed with error %d\n",conf_name,ev)); - free(conf_name); - if (data_name != NULL) - free(data_name); - return ucmm_open_config; - } - - /* if EDID supplied, Locate a matching EDID */ - if (edid != NULL) { - mname = "EDID"; - if ((mval = buf2hex(edid, edid_len)) == NULL) { - jc->del(jc); - free(conf_name); - if (data_name != NULL) - free(data_name); - return ucmm_resource; - } - - /* Else fall back to X11 display name and screen */ - } else { - if (display_name == NULL) { - jc->del(jc); - free(conf_name); - if (data_name != NULL) - free(data_name); - return ucmm_no_edid_or_display; - } - mname = "NAME"; - if ((mval = strdup(display_name)) == NULL) { - jc->del(jc); - free(conf_name); - if (data_name != NULL) - free(data_name); - return ucmm_resource; - } - } - - debug2((errout,"Searching for %s = '%s'\n",mname,mval)); - for (ix = 0;;ix++) { - char *key, *pp; - jc_type type; - unsigned char *data; - size_t dataSize; - int ii; - - if ((ev = jc->locate_key(jc, &ix, "devices/display/", 0, 0)) != jc_ok - || (ev = jc->get_key(jc, ix, &key, &type, &data, &dataSize, NULL)) != jc_ok) { - if (ev == jc_ix_oorange) { - break; - } - debug2((errout,"jcnf locate/get_key failed with error %d\n",ev)); - free(mval); - jc->del(jc); - free(conf_name); - if (data_name != NULL) - free(data_name); - return ucmm_open_config; - } - - if ((pp = jc_get_nth_elem(key, 2)) == NULL) { - continue; - } - if ((ii = atoi(pp)) == 0) { - free(pp); - continue; - } - if (ii > recno) /* Track biggest, so we know what to create next */ - recno = ii; - if ((pp = jc_get_nth_elem(key, 3)) != NULL && strcmp(pp, mname) == 0 && type == jc_string && strcmp(data, mval) == 0) { - /* Found matching record */ - free(pp); - break; - } - if (pp != NULL) - free(pp); - } - - if (ev == jc_ix_oorange) { - debug2((errout,"No matching display was found\n")); - free(mval); - jc->del(jc); - free(conf_name); - if (data_name != NULL) - free(data_name); - return ucmm_monitor_not_found; - /* (Should we delete the file anyway ???) */ - } - free(mval); - - debug2((errout,"Deleting record %d key '%s'\n",recno,keyn1)); - - /* Delete the record */ - sprintf(keyn1, "devices/display/%d/", recno); - - for (ix = -1;;ix--) { - if ((ev = jc->locate_key(jc, &ix, keyn1, 0, 1)) == jc_ok) { - if ((ev = jc->delete_key(jc, ix, NULL)) != jc_ok) { - debug2((errout,"jcnf delete_key failed with error %d\n",ev)); - jc->del(jc); - free(conf_name); - if (data_name != NULL) - free(data_name); - return ucmm_delete_key; - } - } else { - if (ev == jc_ix_oorange) { - break; - } - debug2((errout,"jcnf locate/get_key failed with error %d\n",ev)); - jc->del(jc); - free(conf_name); - if (data_name != NULL) - free(data_name); - return ucmm_open_config; - } - } - - if (data_name != NULL) { - /* See if the profile is used by any other device */ + if (xprofile != NULL) { - debug2((errout, "Searching for any reference to profile '%s'\n",data_name)); + /* See if the profile is used by any device in this scope's config */ + /* (including just installed profile) */ + debug2((errout, "Searching for any other reference to existin gprofile '%s'\n",xprofile)); for (ix = 0;;ix++) { char *key, *pp; - jc_type type; unsigned char *data; + jc_type type; size_t dataSize; - + if ((ev = jc->locate_key(jc, &ix, "devices/display/", 0, 0)) != jc_ok || (ev = jc->get_key(jc, ix, &key, &type, &data, &dataSize, NULL)) != jc_ok) { - if (ev == jc_ix_oorange) { + if (ev == jc_ix_oorange) break; - } debug2((errout,"jcnf locate/get_key failed with error %d\n",ev)); - jc->del(jc); - free(conf_name); - if (data_name != NULL) - free(data_name); - return ucmm_access_config; + break; } if ((pp = jc_get_nth_elem(key, 3)) == NULL) continue; if (strcmp(pp,"ICC_PROFILE") != 0 || type != jc_string - || strcmp(data, data_name) != 0) { + || strcmp(data, xprofile) != 0) { free(pp); continue; } free(pp); + debug2((errout, "Found reference at ix %d - not deleting %d\n",ix)); break; } - /* If not, delete the file */ + + /* If not, delete the profile */ if (ev == jc_ix_oorange) { - debug2((errout,"Deleting profile '%s'\n",data_name)); - if (unlink(data_name) != 0) { - debug2((errout,"ucmm unlink '%s' failed\n",data_name)); - jc->del(jc); - free(conf_name); - if (data_name != NULL) - free(data_name); - return ucmm_access_config; - } + debug2((errout,"Deleting existing profile '%s'\n",xprofile)); + if (unlink(xprofile) != 0) + debug2((errout,"ucmm unlink '%s' failed\n",xprofile)); } + free(xprofile); } - /* Update the config */ + /* write to record the EDID or display name and the profile path */ if ((ev = jc->update(jc)) != 0) { debug2((errout,"jcnf write to '%s' failed with error %d\n",conf_name,ev)); jc->del(jc); free(conf_name); - if (data_name != NULL) - free(data_name); + free(data_name); return ucmm_save_config; } debug2((errout,"Updated config file '%s'\n",conf_name)); @@ -759,36 +544,59 @@ ucmm_error ucmm_uninstall_monitor_profile( /* We're done with this */ jc->del(jc); free(conf_name); - if (data_name != NULL) - free(data_name); + free(data_name); } - debug2((errout,"ucmm done profile un-install\n")); + debug2((errout,"ucmm done profile install\n")); return ucmm_ok; } -/* Get an associated monitor profile. */ +/* Internal support function: */ +/* Locate an associated config record for a given device or name */ /* Return ucmm_no_profile if there is no installed profile for this */ /* monitor. */ /* Return an error code */ -ucmm_error ucmm_get_monitor_profile( +static ucmm_error ucmm_get_monitor_config( + char **pprofile, /* Return path to profile - free after use */ + int *precno, /* Return record no where display was located */ + jcnf **pjc, /* Return open jcnf */ unsigned char *edid, /* Primary device identifier, NULL if none. */ int edid_len, /* Length of edid data */ char *display_name, /* Fall back device association, */ - char **profile /* Return path to profile. free() afterwards. */ + jc_mod modify, /* Flag, nz to open for modification */ + ucmm_scope mscope /* If modify, specifies scope */ ) { - int scope; + int sscope, escope, scope; char *config_file = "color.jcnf"; - char *conf_name = NULL; /* Configuration path to use */ + char *conf_name; /* Path to config file, free() afterwards. */ unsigned int edid_hash = 0; + *pprofile = NULL; /* In case of failure */ + *precno = -1; + *pjc = NULL; + if (edid != NULL) edid_hash = fnv_32_buf(edid, edid_len); - debug2((errout,"ucmm_get_monitor_profile called edid 0x%x, disp '%s'\n",edid_hash,display_name)); + debug2((errout,"ucmm_get_monitor_config called edid 0x%x, modify %d, scope %d, disp '%s'\n",edid_hash,modify,scope,display_name)); + + if (modify == jc_modify) { + if (mscope == ucmm_user) { + sscope = 0; + escope = 0; + } else { /* Just local system */ + sscope = 1; + escope = 1; + } + } else { /* User and local system */ + sscope = 0; + escope = 1; + } /* Look at user then local system scope */ - for (scope = 0; scope < 2; scope++) { + for (scope = sscope; scope <= escope; scope++) { + debug2((errout," checking scope %d\n",scope)); + /* Locate the directories where the config file is, */ { int npaths; @@ -796,9 +604,12 @@ ucmm_error ucmm_get_monitor_profile( char **paths; char *tt; - if ((npaths = xdg_bds(&er, &paths, xdg_conf, xdg_read, - scope == ucmm_local_system ? xdg_local : xdg_user, + /* Open specific user/local (i.e. "write" semantics) */ + if ((npaths = xdg_bds(&er, &paths, xdg_conf, xdg_write, + scope == 0 ? xdg_user : xdg_local, + xdg_none, config_file)) == 0) { + debug2((errout," xdg_bds returned no paths\n")); continue; } if ((conf_name = strdup(paths[0])) == NULL) { @@ -808,25 +619,29 @@ ucmm_error ucmm_get_monitor_profile( xdg_free(paths, npaths); } + debug2((errout," xdg_bds returned config path '%s'\n",conf_name)); + /* Get the config file */ { + jcnf *jc; /* Return open jcnf */ jc_error ev; - jcnf *jc; char keyn1[100]; char *mname; /* Name of key to match to */ char *mval; /* Value to match */ int ix; - int recno = -1; /* Number of the last record read */ + int recno = -1; /* Number of the last record read */ char *key, *pp; jc_type type; unsigned char *data; size_t dataSize; - /* Open the configuration file for reading */ - if ((jc = new_jcnf(&ev, conf_name, jc_read, jc_no_create)) == NULL) { + /* Open the configuration file for reading or modification */ + if ((jc = new_jcnf(&ev, conf_name, modify, jc_no_create)) == NULL) { debug2((errout,"new_jcnf '%s' failed with error %d\n",conf_name,ev)); + free(conf_name); continue; /* Try the next scope */ } + free(conf_name); /* if EDID supplied, Locate a matching EDID */ if (edid != NULL) { @@ -834,7 +649,6 @@ ucmm_error ucmm_get_monitor_profile( if ((mval = buf2hex(edid, edid_len)) == NULL) { debug2((errout,"buf2jex failed\n")); jc->del(jc); - free(conf_name); return ucmm_resource; } @@ -843,14 +657,12 @@ ucmm_error ucmm_get_monitor_profile( if (display_name == NULL) { debug2((errout,"No EDID and display name failed\n")); jc->del(jc); - free(conf_name); return ucmm_no_edid_or_display; } mname = "NAME"; if ((mval = strdup(display_name)) == NULL) { debug2((errout,"strdup failed\n")); jc->del(jc); - free(conf_name); return ucmm_resource; } } @@ -867,10 +679,9 @@ ucmm_error ucmm_get_monitor_profile( debug2((errout,"jcnf locate/get_key failed with error %d\n",ev)); free(mval); jc->del(jc); - free(conf_name); return ucmm_open_config; } - + if ((pp = jc_get_nth_elem(key, 2)) == NULL) { continue; } @@ -878,10 +689,14 @@ ucmm_error ucmm_get_monitor_profile( free(pp); continue; } + free(pp); if (ii > recno) /* Track biggest, so we know what to create next */ recno = ii; - if ((pp = jc_get_nth_elem(key, 3)) != NULL && strcmp(pp, mname) == 0 && type == jc_string - && strcmp(data, mval) == 0) { + + if ((pp = jc_get_nth_elem(key, 3)) != NULL + && strcmp(pp, mname) == 0 + && type == jc_string + && strcmp(data, mval) == 0) { /* Found matching record */ free(pp); break; @@ -890,11 +705,13 @@ ucmm_error ucmm_get_monitor_profile( free(pp); } + free(mval); if (ev == jc_ix_oorange) { debug2((errout,"No matching display was found\n")); + jc->del(jc); + jc = NULL; continue; /* On to the next scope */ } - free(mval); /* Get the profile path from the record */ sprintf(keyn1, "devices/display/%d/ICC_PROFILE", recno); @@ -905,32 +722,200 @@ ucmm_error ucmm_get_monitor_profile( || type != jc_string) { debug2((errout,"jcnf locate/get_key failed with error %d\n",ev)); jc->del(jc); - free(conf_name); if (ev == jc_ix_oorange) { continue; /* try the next config */ } return ucmm_access_config; } - if ((*profile = strdup(data)) == NULL) { + if ((*pprofile = strdup(data)) == NULL) { debug2((errout,"jcnf get_key malloc failed\n")); jc->del(jc); - free(conf_name); return ucmm_resource; } - - /* We're done with this */ - jc->del(jc); - free(conf_name); + + /* We've found what we were looking for */ + *pjc = jc; + *precno = recno; + return ucmm_ok; - debug2((errout,"Returning current profile '%s'\n",data)); } } debug2((errout,"Failed to find a current profile\n")); return ucmm_no_profile; } + +/* Un-install a profile for a given monitor. */ +/* Either EDID or display_name may be NULL, but not both. */ +/* The monitor is left with no profile association. If a profile */ +/* name is provided and matches the one that was associated with */ +/* the monitor, and has no other association, then it will be deleted */ +/* from the data directory. */ +/* Return an error code */ +ucmm_error ucmm_uninstall_monitor_profile( + ucmm_scope scope, /* Scope of instalation */ + unsigned char *edid, /* Primary device identifier, NULL if none. */ + int edid_len, /* Length of edid data */ + char *display_name /* Fall back device association, */ +) { + char keyn1[100]; + char *dprof = NULL; /* Destination profile to be deleted */ + unsigned int edid_hash = 0; + jcnf *jc = NULL; + int recno = -1; + int ix; + ucmm_error ev = ucmm_ok; + + if (edid != NULL) + edid_hash = fnv_32_buf(edid, edid_len); + + debug2((errout,"ucmm_uninstall_monitor_profile called with edid hash 0x%x, disp '%s'\n",edid_hash,display_name)); + + /* Locate the config record containing the config file entry. */ + if ((ev = ucmm_get_monitor_config(&dprof, &recno, &jc, edid, edid_len, display_name, + jc_modify, scope)) != ucmm_ok) { + return ev; + } + + debug2((errout,"config file = '%s'\n",jc->fname)); + + /* Delete the record */ + sprintf(keyn1, "devices/display/%d/", recno); + + for (ix = -1;;ix--) { + if ((ev = jc->locate_key(jc, &ix, keyn1, 0, 1)) == jc_ok) { + if ((ev = jc->delete_key(jc, ix, NULL)) != jc_ok) { + debug2((errout,"jcnf delete_key failed with error %d\n",ev)); + jc->del(jc); + if (dprof != NULL) + free(dprof); + return ucmm_delete_key; + } + } else { + if (ev == jc_ix_oorange) { + break; + } + debug2((errout,"jcnf locate/get_key failed with error %d\n",ev)); + jc->del(jc); + if (dprof != NULL) + free(dprof); + return ucmm_open_config; + } + } + + /* See if the profile is used by any other device in this scope's config */ + debug2((errout, "Searching for any other reference to profile '%s'\n",dprof)); + for (ix = 0;;ix++) { + char *key, *pp; + jc_type type; + unsigned char *data; + size_t dataSize; + + if ((ev = jc->locate_key(jc, &ix, "devices/display/", 0, 0)) != jc_ok + || (ev = jc->get_key(jc, ix, &key, &type, &data, &dataSize, NULL)) != jc_ok) { + if (ev == jc_ix_oorange) { + break; + } + debug2((errout,"jcnf locate/get_key failed with error %d\n",ev)); + jc->del(jc); + if (dprof != NULL) + free(dprof); + return ucmm_access_config; + } + if ((pp = jc_get_nth_elem(key, 3)) == NULL) + continue; + if (strcmp(pp,"ICC_PROFILE") != 0 + || type != jc_string + || strcmp(data, dprof) != 0) { + free(pp); + continue; + } + free(pp); + debug2((errout, "Found reference at ix %d - not deleting %d\n",ix)); + break; + } + + /* If not, delete the file */ + if (ev == jc_ix_oorange) { + debug2((errout,"Deleting profile '%s'\n",dprof)); + if (unlink(dprof) != 0) { + debug2((errout,"ucmm unlink '%s' failed\n",dprof)); + jc->del(jc); + if (dprof != NULL) + free(dprof); + return ucmm_access_config; + } + } + + /* Update the config */ + if ((ev = jc->update(jc)) != 0) { + debug2((errout,"jcnf write to '%s' failed with error %d\n",jc->fname,ev)); + jc->del(jc); + if (dprof != NULL) + free(dprof); + return ucmm_save_config; + } + debug2((errout,"Updated config file '%s'\n",jc->fname)); + + /* We're done with this */ + jc->del(jc); + if (dprof != NULL) + free(dprof); + + debug2((errout,"ucmm done profile un-install\n")); + return ucmm_ok; +} + +/* Get an associated monitor profile. */ +/* Return ucmm_no_profile if there is no installed profile for this */ +/* monitor. */ +/* Return an error code */ +ucmm_error ucmm_get_monitor_profile( + unsigned char *edid, /* Primary device identifier, NULL if none. */ + int edid_len, /* Length of edid data */ + char *display_name, /* Fall back device association, */ + char **profile /* Return path to profile. free() afterwards. */ +) { + unsigned int edid_hash = 0; + jcnf *jc = NULL; + int recno; + ucmm_error ev = ucmm_ok; + + if (edid != NULL) + edid_hash = fnv_32_buf(edid, edid_len); + + debug2((errout,"ucmm_get_monitor_profile called with edid hash 0x%x, disp '%s'\n",edid_hash,display_name)); + + /* Locate the config record containing the config file entry. */ + /* (ucmm_user is ignored for jc_read) */ + if ((ev = ucmm_get_monitor_config(profile, &recno, &jc, edid, edid_len, display_name, + jc_read, ucmm_user)) != ucmm_ok) { + return ev; + } + + debug2((errout,"config file = '%s'\n",jc->fname)); + + /* We're done with this */ + jc->del(jc); + + debug2((errout,"Returning current profile '%s'\n",*profile)); + + return ucmm_ok; +} +/* Return an ASCII error message string interpretation of scope enum */ +char *ucmm_scope_string(ucmm_scope scope) { + + switch (scope) { + case ucmm_user: + return "User"; + case ucmm_local_system: + return "Local system"; + } + return "Unknown scope"; +} + /* Return an ASCII error message string interpretation of an error number */ char *ucmm_error_string(ucmm_error erno) { diff --git a/ucmm/ucmm.h b/ucmm/ucmm.h index fc08ca1..564af3e 100644..100755 --- a/ucmm/ucmm.h +++ b/ucmm/ucmm.h @@ -68,17 +68,13 @@ ucmm_error ucmm_install_monitor_profile( /* Un-install a profile for a given monitor. */ /* Either EDID or display_name may be NULL, but not both. */ -/* The monitor is left with no profile association. If a profile */ -/* name is provided and matches the one that was associated with */ -/* the monitor, and has no other association, then it will be deleted */ -/* from the data directory. */ +/* The monitor is left with no profile association. */ /* Return an error code */ ucmm_error ucmm_uninstall_monitor_profile( ucmm_scope scope, /* Scope of instalation */ unsigned char *edid, /* Primary device identifier, NULL if none. */ int edid_len, /* Length of edid data */ - char *display_name, /* Fall back device association, */ - char *profile /* Base name of profile to be deleted, NULL if not to be deleted. */ + char *display_name /* Fall back device association, */ ); /* Get an associated monitor profile. */ @@ -92,6 +88,9 @@ ucmm_error ucmm_get_monitor_profile( char **profile /* Return path to profile. free() afterwards. */ ); +/* Return an ASCII error message string interpretation of scope enum */ +char *ucmm_scope_string(ucmm_scope scope); + /* Return an ASCII error message string interpretation of an error number */ char *ucmm_error_string(ucmm_error erno); diff --git a/usb/45-Argyll.rules b/usb/45-Argyll.rules index beeda7c..7c7ab2a 100644..100755 --- a/usb/45-Argyll.rules +++ b/usb/45-Argyll.rules @@ -21,6 +21,9 @@ SYSFS{idVendor}=="0765", SYSFS{idProduct}=="5020", PROGRAM="/bin/sh -c 'K=%k; K= # ColorMunki Smile SYSFS{idVendor}=="0765", SYSFS{idProduct}=="6003", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="660", GROUP="colord" +# ColorMunki i1 Studio +SYSFS{idVendor}=="0765", SYSFS{idProduct}=="6008", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="660", GROUP="colord" + # DTP20 SYSFS{idVendor}=="0765", SYSFS{idProduct}=="d020", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="660", GROUP="colord" diff --git a/usb/55-Argyll.rules b/usb/55-Argyll.rules index 703d139..05fea85 100644..100755 --- a/usb/55-Argyll.rules +++ b/usb/55-Argyll.rules @@ -54,6 +54,9 @@ ATTRS{idVendor}=="0765", ATTRS{idProduct}=="5020", ENV{COLORD_SENSOR_KIND}="i1-d # ColorMunki Smile ATTRS{idVendor}=="0765", ATTRS{idProduct}=="6003", ENV{COLORD_SENSOR_KIND}="color-munki-smile", ENV{COLORD_SENSOR_CAPS}="lcd-ccfl lcd-white-led" +# ColorMunki i1 Studio +ATTRS{idVendor}=="0768", ATTRS{idProduct}=="6008", ENV{COLORD_SENSOR_KIND}="color-munki-photo" ENV{COLORD_SENSOR_CAPS}="lcd crt projector printer spot ambient" + # DTP20 ATTRS{idVendor}=="0765", ATTRS{idProduct}=="d020", ENV{COLORD_SENSOR_KIND}="dtp20" ENV{COLORD_SENSOR_CAPS}="printer spot" diff --git a/usb/Argyll b/usb/Argyll index b7eebc2..b7eebc2 100644..100755 --- a/usb/Argyll +++ b/usb/Argyll diff --git a/usb/Argyll.kext/Info.plist b/usb/Argyll.kext/Info.plist index 754e6d5..754e6d5 100644..100755 --- a/usb/Argyll.kext/Info.plist +++ b/usb/Argyll.kext/Info.plist diff --git a/usb/Argyll.usermap b/usb/Argyll.usermap index 8890153..8890153 100644..100755 --- a/usb/Argyll.usermap +++ b/usb/Argyll.usermap diff --git a/usb/ArgyllCMS.cat b/usb/ArgyllCMS.cat Binary files differindex cd06c92..d905b40 100644..100755 --- a/usb/ArgyllCMS.cat +++ b/usb/ArgyllCMS.cat diff --git a/usb/ArgyllCMS.inf b/usb/ArgyllCMS.inf index 4de9f51..e4d702f 100644..100755 --- a/usb/ArgyllCMS.inf +++ b/usb/ArgyllCMS.inf @@ -123,6 +123,7 @@ ServiceBinary = %12%\libusb0.sys "HueyL (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_5010
"Eye-One Display 3 (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_5020
"ColorMunki Smile (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_6003
+"i1 Studio (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_6008
"DTP20 (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_D020
"DTP92Q (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_D092
"DTP94 (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_D094
@@ -162,6 +163,7 @@ ServiceBinary = %12%\libusb0.sys "HueyL (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_5010
"Eye-One Display 3 (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_5020
"ColorMunki Smile (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_6003
+"i1 Studio (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_6008
"DTP20 (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_D020
"DTP92Q (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_D092
"DTP94 (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_D094
@@ -201,6 +203,7 @@ ServiceBinary = %12%\libusb0.sys "HueyL (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_5010
"Eye-One Display 3 (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_5020
"ColorMunki Smile (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_6003
+"i1 Studio (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_6008
"DTP20 (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_D020
"DTP92Q (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_D092
"DTP94 (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_D094
diff --git a/usb/ArgyllCMS.inf.d b/usb/ArgyllCMS.inf.d index c130cee..9cb0292 100644..100755 --- a/usb/ArgyllCMS.inf.d +++ b/usb/ArgyllCMS.inf.d @@ -11,6 +11,7 @@ "HueyL (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_5010
"Eye-One Display 3 (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_5020
"ColorMunki Smile (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_6003
+"i1 Studio (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_6008
"DTP20 (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_D020
"DTP92Q (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_D092
"DTP94 (Argyll)" = LIBUSB0_DEV, USB\VID_0765&PID_D094
diff --git a/usb/ArgyllCMS.inf.t b/usb/ArgyllCMS.inf.t index 635d9ef..635d9ef 100644..100755 --- a/usb/ArgyllCMS.inf.t +++ b/usb/ArgyllCMS.inf.t diff --git a/usb/ArgyllCMS_x64.cat b/usb/ArgyllCMS_x64.cat Binary files differindex 16b3ffa..f734475 100644..100755 --- a/usb/ArgyllCMS_x64.cat +++ b/usb/ArgyllCMS_x64.cat diff --git a/usb/Jamfile b/usb/Jamfile index 8df0fba..8df0fba 100644..100755 --- a/usb/Jamfile +++ b/usb/Jamfile diff --git a/usb/afiles b/usb/afiles index 4dbc3c1..4dbc3c1 100644..100755 --- a/usb/afiles +++ b/usb/afiles diff --git a/usb/binfiles.lx b/usb/binfiles.lx index 7dd8767..7dd8767 100644..100755 --- a/usb/binfiles.lx +++ b/usb/binfiles.lx diff --git a/usb/binfiles.msw b/usb/binfiles.msw index f498d92..f498d92 100644..100755 --- a/usb/binfiles.msw +++ b/usb/binfiles.msw diff --git a/usb/binfiles.osx b/usb/binfiles.osx index 60ed4ec..60ed4ec 100644..100755 --- a/usb/binfiles.osx +++ b/usb/binfiles.osx diff --git a/usb/driver/AUTHORS.txt b/usb/driver/AUTHORS.txt index 375ec6c..375ec6c 100644..100755 --- a/usb/driver/AUTHORS.txt +++ b/usb/driver/AUTHORS.txt diff --git a/usb/driver/COPYING_GPL.txt b/usb/driver/COPYING_GPL.txt index 94a9ed0..94a9ed0 100644..100755 --- a/usb/driver/COPYING_GPL.txt +++ b/usb/driver/COPYING_GPL.txt diff --git a/usb/driver/LICENSE.txt b/usb/driver/LICENSE.txt index d8dd99d..d8dd99d 100644..100755 --- a/usb/driver/LICENSE.txt +++ b/usb/driver/LICENSE.txt diff --git a/usb/driver/Makefile b/usb/driver/Makefile index 18937ab..18937ab 100644..100755 --- a/usb/driver/Makefile +++ b/usb/driver/Makefile diff --git a/usb/driver/README.txt b/usb/driver/README.txt index 0dc3ac0..0dc3ac0 100644..100755 --- a/usb/driver/README.txt +++ b/usb/driver/README.txt diff --git a/usb/driver/abort_endpoint.c b/usb/driver/abort_endpoint.c index 3ec46e9..3ec46e9 100644..100755 --- a/usb/driver/abort_endpoint.c +++ b/usb/driver/abort_endpoint.c diff --git a/usb/driver/claim_interface.c b/usb/driver/claim_interface.c index 9ec0fe5..9ec0fe5 100644..100755 --- a/usb/driver/claim_interface.c +++ b/usb/driver/claim_interface.c diff --git a/usb/driver/clear_feature.c b/usb/driver/clear_feature.c index c3b5c24..c3b5c24 100644..100755 --- a/usb/driver/clear_feature.c +++ b/usb/driver/clear_feature.c diff --git a/usb/driver/dispatch.c b/usb/driver/dispatch.c index 8eccb21..8eccb21 100644..100755 --- a/usb/driver/dispatch.c +++ b/usb/driver/dispatch.c diff --git a/usb/driver/driver_api.h b/usb/driver/driver_api.h index 5339a81..5339a81 100644..100755 --- a/usb/driver/driver_api.h +++ b/usb/driver/driver_api.h diff --git a/usb/driver/driver_debug.c b/usb/driver/driver_debug.c index 49f1878..49f1878 100644..100755 --- a/usb/driver/driver_debug.c +++ b/usb/driver/driver_debug.c diff --git a/usb/driver/driver_debug.h b/usb/driver/driver_debug.h index a4f396f..a4f396f 100644..100755 --- a/usb/driver/driver_debug.h +++ b/usb/driver/driver_debug.h diff --git a/usb/driver/driver_registry.c b/usb/driver/driver_registry.c index 3b0c67d..3b0c67d 100644..100755 --- a/usb/driver/driver_registry.c +++ b/usb/driver/driver_registry.c diff --git a/usb/driver/get_configuration.c b/usb/driver/get_configuration.c index fa9b522..fa9b522 100644..100755 --- a/usb/driver/get_configuration.c +++ b/usb/driver/get_configuration.c diff --git a/usb/driver/get_descriptor.c b/usb/driver/get_descriptor.c index 2b5172e..2b5172e 100644..100755 --- a/usb/driver/get_descriptor.c +++ b/usb/driver/get_descriptor.c diff --git a/usb/driver/get_interface.c b/usb/driver/get_interface.c index b218281..b218281 100644..100755 --- a/usb/driver/get_interface.c +++ b/usb/driver/get_interface.c diff --git a/usb/driver/get_status.c b/usb/driver/get_status.c index 2e77f91..2e77f91 100644..100755 --- a/usb/driver/get_status.c +++ b/usb/driver/get_status.c diff --git a/usb/driver/ioctl.c b/usb/driver/ioctl.c index f059175..f059175 100644..100755 --- a/usb/driver/ioctl.c +++ b/usb/driver/ioctl.c diff --git a/usb/driver/libusb-win32-README-1.2.6.0.txt b/usb/driver/libusb-win32-README-1.2.6.0.txt index 99445f7..99445f7 100644..100755 --- a/usb/driver/libusb-win32-README-1.2.6.0.txt +++ b/usb/driver/libusb-win32-README-1.2.6.0.txt diff --git a/usb/driver/libusb_driver.c b/usb/driver/libusb_driver.c index 61ebf77..61ebf77 100644..100755 --- a/usb/driver/libusb_driver.c +++ b/usb/driver/libusb_driver.c diff --git a/usb/driver/libusb_driver.h b/usb/driver/libusb_driver.h index e0a5d3c..e0a5d3c 100644..100755 --- a/usb/driver/libusb_driver.h +++ b/usb/driver/libusb_driver.h diff --git a/usb/driver/libusb_driver_rc.rc b/usb/driver/libusb_driver_rc.rc index b0affc8..b0affc8 100644..100755 --- a/usb/driver/libusb_driver_rc.rc +++ b/usb/driver/libusb_driver_rc.rc diff --git a/usb/driver/lusb_defdi_guids.h b/usb/driver/lusb_defdi_guids.h index 99833b0..99833b0 100644..100755 --- a/usb/driver/lusb_defdi_guids.h +++ b/usb/driver/lusb_defdi_guids.h diff --git a/usb/driver/pnp.c b/usb/driver/pnp.c index b103650..b103650 100644..100755 --- a/usb/driver/pnp.c +++ b/usb/driver/pnp.c diff --git a/usb/driver/power.c b/usb/driver/power.c index d29dd9b..d29dd9b 100644..100755 --- a/usb/driver/power.c +++ b/usb/driver/power.c diff --git a/usb/driver/release_interface.c b/usb/driver/release_interface.c index bcd483c..bcd483c 100644..100755 --- a/usb/driver/release_interface.c +++ b/usb/driver/release_interface.c diff --git a/usb/driver/reset_device.c b/usb/driver/reset_device.c index a0fd97b..a0fd97b 100644..100755 --- a/usb/driver/reset_device.c +++ b/usb/driver/reset_device.c diff --git a/usb/driver/reset_endpoint.c b/usb/driver/reset_endpoint.c index 3396b93..3396b93 100644..100755 --- a/usb/driver/reset_endpoint.c +++ b/usb/driver/reset_endpoint.c diff --git a/usb/driver/set_configuration.c b/usb/driver/set_configuration.c index 9f2fac1..9f2fac1 100644..100755 --- a/usb/driver/set_configuration.c +++ b/usb/driver/set_configuration.c diff --git a/usb/driver/set_descriptor.c b/usb/driver/set_descriptor.c index 46bbad7..46bbad7 100644..100755 --- a/usb/driver/set_descriptor.c +++ b/usb/driver/set_descriptor.c diff --git a/usb/driver/set_feature.c b/usb/driver/set_feature.c index 12e7745..12e7745 100644..100755 --- a/usb/driver/set_feature.c +++ b/usb/driver/set_feature.c diff --git a/usb/driver/set_interface.c b/usb/driver/set_interface.c index 840600e..840600e 100644..100755 --- a/usb/driver/set_interface.c +++ b/usb/driver/set_interface.c diff --git a/usb/driver/transfer.c b/usb/driver/transfer.c index 0a02aa1..0a02aa1 100644..100755 --- a/usb/driver/transfer.c +++ b/usb/driver/transfer.c diff --git a/usb/driver/usbd.def b/usb/driver/usbd.def index 5c283bb..5c283bb 100644..100755 --- a/usb/driver/usbd.def +++ b/usb/driver/usbd.def diff --git a/usb/driver/usbdlib_gcc.h b/usb/driver/usbdlib_gcc.h index 5dec851..5dec851 100644..100755 --- a/usb/driver/usbdlib_gcc.h +++ b/usb/driver/usbdlib_gcc.h diff --git a/usb/driver/vendor_request.c b/usb/driver/vendor_request.c index f3a898b..f3a898b 100644..100755 --- a/usb/driver/vendor_request.c +++ b/usb/driver/vendor_request.c diff --git a/usb/install_kext.sh b/usb/install_kext.sh index 22c181a..22c181a 100644..100755 --- a/usb/install_kext.sh +++ b/usb/install_kext.sh diff --git a/xicc/Jamfile b/xicc/Jamfile index 169b471..29fcbf4 100644..100755 --- a/xicc/Jamfile +++ b/xicc/Jamfile @@ -39,6 +39,8 @@ LINKLIBS = libxicc ../spectro/libinsttypes ../gamut/libgamut ../rspl/librspl ../numlib/libnum ../numlib/libui $(TIFFLIB) $(JPEGLIB) ; +LINKFLAGS += $(GUILINKFLAGS) ; + # Not created yet #Main xicctest : xicctest.c ; @@ -145,10 +147,14 @@ if [ GLOB [ NormPaths . ] : cam16.c ] { Main cam16vecplot : cam16vecplot.c cam16.c ; } +#Main Lpttune : Lpttune.c ; + if $(BUILD_JUNK) { LINKLIBS += ../render/librender ; + Main Lpttune : Lpttune.c ; + Main illlocus : illlocus.c ; Main illlocus2 : illlocus2.c ; 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 ddd6066..ddd6066 100644..100755 --- a/xicc/bt1886.c +++ b/xicc/bt1886.c 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 a79aae1..db9c325 100644..100755 --- a/xicc/cam02.c +++ b/xicc/cam02.c @@ -197,7 +197,7 @@ double minj = 1e38, maxj = -1e38; static void cam_free(cam02 *s); static int set_view(struct _cam02 *s, ViewingCondition Ev, double Wxyz[3], double La, double Yb, double Lv, double Yf, double Yg, double Gxyz[3], - int hk, double hkscale); + int hk, double hkscale, double mtaf, double Wxyz2[3]); static int XYZ_to_cam(struct _cam02 *s, double *Jab, double *xyz); static int cam_to_XYZ(struct _cam02 *s, double *xyz, double *Jab); @@ -292,7 +292,9 @@ 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-Kohlrausch effect */ -double hkscale /* HK effect scaling factor */ +double hkscale, /* HK effect scaling factor */ +double mtaf, /* Mid tone partial adapation factor from Wxyz to Wxyz2, <= 0.0 if none */ +double Wxyz2[3] /* Mid tone Adapted White XYZ (Y range 0.0 .. 1.0) */ ) { double tt, t1, t2; double tm[3][3]; @@ -383,6 +385,24 @@ double hkscale /* HK effect scaling factor */ } s->hk = hk; s->hkscale = hkscale; + if (mtaf > 0.0 && Wxyz2 != NULL) { /* Mid tone Adaption hack enabled */ + if (mtaf > 1.0) + mtaf = 1.0; + s->mtaf = mtaf; + s->Wxyz2[0] = Wxyz2[0]/Wxyz2[1] * Wxyz[1]; /* Normalize scale */ + s->Wxyz2[2] = Wxyz2[2]/Wxyz2[1] * Wxyz[1]; + s->Wxyz2[1] = Wxyz[1]; + s->mtap = (4.0 * mtaf); /* 0.5 -> pow 4 */ + s->mtap *= s->mtaf; + s->pmta_en = 1; + } else { + s->mtaf = mtaf; + s->Wxyz2[0] = Wxyz[0]; + s->Wxyz2[1] = Wxyz[1]; + s->Wxyz2[2] = Wxyz[2]; + s->mtap = 1.0; + s->pmta_en = 0; + } /* The rgba vectors */ s->Va[0] = 1.0; @@ -432,10 +452,16 @@ double hkscale /* HK effect scaling factor */ s->rgbW[0] = 0.7328 * s->Wxyz[0] + 0.4296 * s->Wxyz[1] - 0.1624 * s->Wxyz[2]; s->rgbW[1] = -0.7036 * s->Wxyz[0] + 1.6975 * s->Wxyz[1] + 0.0061 * s->Wxyz[2]; s->rgbW[2] = 0.0000 * s->Wxyz[0] + 0.0000 * s->Wxyz[1] + 1.0000 * s->Wxyz[2]; + s->rgbW2[0] = 0.7328 * s->Wxyz2[0] + 0.4296 * s->Wxyz2[1] - 0.1624 * s->Wxyz2[2]; + s->rgbW2[1] = -0.7036 * s->Wxyz2[0] + 1.6975 * s->Wxyz2[1] + 0.0061 * s->Wxyz2[2]; + s->rgbW2[2] = 0.0000 * s->Wxyz2[0] + 0.0000 * s->Wxyz2[1] + 1.0000 * s->Wxyz2[2]; #else s->rgbW[0] = s->Wxyz[0]; s->rgbW[1] = s->Wxyz[1]; s->rgbW[2] = s->Wxyz[2]; + s->rgbW2[0] = s->Wxyz2[0]; + s->rgbW2[1] = s->Wxyz2[1]; + s->rgbW2[2] = s->Wxyz2[2]; #endif /* Degree of chromatic adaptation */ @@ -445,11 +471,17 @@ double hkscale /* HK effect scaling factor */ s->Drgb[0] = s->D * (s->Wxyz[1]/s->rgbW[0]) + 1.0 - s->D; s->Drgb[1] = s->D * (s->Wxyz[1]/s->rgbW[1]) + 1.0 - s->D; s->Drgb[2] = s->D * (s->Wxyz[1]/s->rgbW[2]) + 1.0 - s->D; + s->Drgb2[0] = s->D * (s->Wxyz2[1]/s->rgbW2[0]) + 1.0 - s->D; + s->Drgb2[1] = s->D * (s->Wxyz2[1]/s->rgbW2[1]) + 1.0 - s->D; + s->Drgb2[2] = s->D * (s->Wxyz2[1]/s->rgbW2[2]) + 1.0 - s->D; - /* Chromaticaly transformed white value */ + /* Chromaticaly transformed sharpened white value */ s->rgbcW[0] = s->Drgb[0] * s->rgbW[0]; s->rgbcW[1] = s->Drgb[1] * s->rgbW[1]; s->rgbcW[2] = s->Drgb[2] * s->rgbW[2]; + s->rgbcW2[0] = s->Drgb2[0] * s->rgbW2[0]; + s->rgbcW2[1] = s->Drgb2[1] * s->rgbW2[1]; + s->rgbcW2[2] = s->Drgb2[2] * s->rgbW2[2]; #ifndef DISABLE_HPE /* Transform from spectrally sharpened, to Hunt-Pointer_Estevez cone space */ @@ -462,10 +494,22 @@ double hkscale /* HK effect scaling factor */ s->rgbpW[2] = -0.0096276087384294 * s->rgbcW[0] - 0.0056980312161134 * s->rgbcW[1] + 1.0153256399545427 * s->rgbcW[2]; + s->rgbpW2[0] = 0.7409744840453773 * s->rgbcW2[0] + + 0.2180245944753982 * s->rgbcW2[1] + + 0.0410009214792244 * s->rgbcW2[2]; + s->rgbpW2[1] = 0.2853532916858801 * s->rgbcW2[0] + + 0.6242015741188157 * s->rgbcW2[1] + + 0.0904451341953042 * s->rgbcW2[2]; + s->rgbpW2[2] = -0.0096276087384294 * s->rgbcW2[0] + - 0.0056980312161134 * s->rgbcW2[1] + + 1.0153256399545427 * s->rgbcW2[2]; #else s->rgbpW[0] = s->rgbcW[0]; s->rgbpW[1] = s->rgbcW[1]; s->rgbpW[2] = s->rgbcW[2]; + s->rgbpW2[0] = s->rgbcW2[0]; + s->rgbpW2[1] = s->rgbcW2[1]; + s->rgbpW2[2] = s->rgbcW2[2]; #endif /* DISABLE_HPE */ #ifndef DISABLE_SCR @@ -479,6 +523,7 @@ double hkscale /* HK effect scaling factor */ s->cc[1][0] = 0.0; s->cc[1][1] = 1.0; s->cc[1][2] = 0.0; s->cc[2][0] = 0.0; s->cc[2][1] = 0.0; s->cc[2][2] = 1.0; #endif + icmCpy3x3(s->cc2, s->cc); /* Chromaticaly transformed sample value */ icmSetUnity3x3(tm); @@ -487,6 +532,11 @@ double hkscale /* HK effect scaling factor */ tm[2][2] = s->Drgb[2]; icmMul3x3(s->cc, tm); + tm[0][0] = s->Drgb2[0]; + tm[1][1] = s->Drgb2[1]; + tm[2][2] = s->Drgb2[2]; + icmMul3x3(s->cc2, tm); + #ifndef DISABLE_HPE /* Transform from spectrally sharpened, to Hunt-Pointer_Estevez cone space */ tm[0][0] = 0.7409744840453773; @@ -499,10 +549,12 @@ double hkscale /* HK effect scaling factor */ tm[2][1] = -0.0056980312161134; tm[2][2] = 1.0153256399545427; icmMul3x3(s->cc, tm); + icmMul3x3(s->cc2, tm); #endif /* DISABLE_HPE */ /* Create inverse combined cone and chromatic transform matrix: */ icmInverse3x3(s->icc, s->cc); /* Hmm. we assume it cannot fail */ + icmInverse3x3(s->icc2, s->cc2); #ifdef ENABLE_COMPR /* Compression ranges */ @@ -594,6 +646,11 @@ double hkscale /* HK effect scaling factor */ printf("Base exponential nonlinearity z = %f\n", s->z); printf("Post adapted cone response white rgbaW = %f %f %f\n", s->rgbaW[0], s->rgbaW[1], s->rgbaW[2]); printf("Achromatic response of white Aw = %f\n", s->Aw); + if (s->pmta_en) { + printf("Mid tone partial adapation factor = %f\n", s->mtaf); + printf("Mid tone Adapted White Wxyz2 = %f %f %f\n", s->Wxyz2[0], s->Wxyz2[1], s->Wxyz2[2]); + printf("Mid tone partial adapation power = %f\n", s->mtap); + } printf("\n"); #endif return 0; @@ -644,6 +701,23 @@ double XYZ[3] /* all in one step. */ icmMulBy3x3(rgbp, s->cc, xyz); + /* Partial mid-tone adapation hack. */ + /* Blend between two adapation states along Y */ + if (s->pmta_en) { + double rgbp2[3], t; + +//printf("\nIn xyz %f %f %f\n",xyz[0], xyz[1], xyz[2]); + icmMulBy3x3(rgbp2, s->cc2, xyz); + t = xyz[1]/s->Wxyz[1]; + if (t < 0.0) + t = 0.0; + else if (t > 1.0) + t = 1.0; + t = pow(t, s->mtap); +//printf("Blend %f from %f %f %f and %f %f %f\n",t, rgbp2[0], rgbp2[1], rgbp2[2], rgbp[0], rgbp[1], rgbp[2]); + icmBlend3(rgbp, rgbp2, rgbp, t); + } + TRACE(("rgbp = %f %f %f\n", rgbp[0], rgbp[1], rgbp[2])) #ifdef ENABLE_COMPR @@ -1299,7 +1373,52 @@ double Jab[3] /* Chromaticaly transformed sample value */ /* Spectrally sharpened cone responses */ /* XYZ values */ - icmMulBy3x3(xyz, s->icc, rgbp); + if (!s->pmta_en) { + icmMulBy3x3(xyz, s->icc, rgbp); + + /* Partial mid-tone adapation hack. */ + } else { + double xyz1[3], xyz2[3], t; + int i; + + /* Aprox bwd transform to compute starting value */ + icmMulBy3x3(xyz1, s->icc, rgbp); + icmMulBy3x3(xyz2, s->icc2, rgbp); + t = 0.5 * (xyz1[1] + xyz2[1])/s->Wxyz[1]; + if (t < 0.0) + t = 0.0; + else if (t > 1.0) + t = 1.0; + t = pow(t, s->mtap); + icmBlend3(xyz, xyz2, xyz1, t); + + /* Simple Newton itteration to more accurately invert */ + for (i = 0; i < 5; i++) { + double rgbp0[3], rgbp1[3], rgbp2[3]; + double rgbd[3], xyzd0[3], xyzd1[3], xyzd2[3]; + + /* Fwd transform */ + icmMulBy3x3(rgbp1, s->cc, xyz); + icmMulBy3x3(rgbp2, s->cc2, xyz); + t = xyz[1]/s->Wxyz[1]; + if (t < 0.0) + t = 0.0; + else if (t > 1.0) + t = 1.0; + t = pow(t, s->mtap); + icmBlend3(rgbp0, rgbp2, rgbp1, t); + + icmSub3(rgbd, rgbp, rgbp0); /* Error to input value */ + + /* Bwd transform of error */ + icmMulBy3x3(xyzd1, s->icc, rgbd); + icmMulBy3x3(xyzd2, s->icc2, rgbd); + icmBlend3(xyzd0, xyzd2, xyzd1, t); + + /* Adjust solution for error */ + icmAdd3(xyz, xyz, xyzd0); + } + } TRACE(("XYZ = %f %f %f\n",xyz[0], xyz[1], xyz[2])) diff --git a/xicc/cam02.h b/xicc/cam02.h index 9550bd5..bf9d9c9 100644..100755 --- a/xicc/cam02.h +++ b/xicc/cam02.h @@ -143,7 +143,10 @@ struct _cam02 { double Gxyz[3], /* The Glare white coordinates (ie. the Ambient color) */ /* If <= 0 will Wxyz will be used. */ int hk, /* Flag, NZ to use Helmholtz-Kohlrausch effect */ - double hkscale /* HK effect scaling factor */ + double hkscale, /* HK effect scaling factor */ + + double mtaf, /* Mid tone partial adapation factor from Wxyz to Wxyz2, <= 0.0 if none */ + double Wxyz2[3] /* Mid tone Adapted White XYZ (Y range 0.0 .. 1.0) */ ); /* Conversions. Return nz on error */ @@ -161,6 +164,10 @@ struct _cam02 { double Yg; /* Glare as a fraction of the adapting/surround (Y range 0.0 .. 1.0) */ double Gxyz[3]; /* The Glare white coordinates (typically the Ambient color) */ + /* Partial mid-tone adapation hack parameters */ + double Wxyz2[3];/* Mid tone Adapted White XYZ (Y range 0.0 .. 1.0) */ + double mtaf; /* Mid tone blend factor between Wxyz and Wxyz2 */ + /* Internal parameters */ double C; /* Surround Impact */ double Nc; /* Chromatic Induction */ @@ -194,6 +201,16 @@ struct _cam02 { double nluxslope; /* Non-linearity slope at upper crossover to linear */ double lA; /* JLIMIT Limited A */ + /* Partial mid-tone adapation hack pre-computed values */ + int pmta_en; /* NZ if enabled */ + double mtap; /* Mid tone blend rate (power) between Wxyz and Wxyz2 */ + double rgbW2[3]; /* Mid etone sharpened cone response white values */ + double Drgb2[3]; /* Mid tone chromatic transformation value */ + double rgbcW2[3]; /* Mid tone chromatically transformed white value */ + double rgbpW2[3]; /* Mid tone hunt-Pointer-Estevez cone response space white */ + double cc2[3][3]; /* Mide tone forward cone and chromatic transform */ + double icc2[3][3]; /* Mide tone reverse cone and chromatic transform */ + /* Option flags, code not always enabled */ int hk; /* Use Helmholtz-Kohlrausch effect */ int hkscale; /* [1.0] Scale HK effect up/down from default */ diff --git a/xicc/cam02plot.c b/xicc/cam02plot.c index 16b5aa5..57b7835 100644..100755 --- a/xicc/cam02plot.c +++ b/xicc/cam02plot.c @@ -578,7 +578,9 @@ main(int argc, char *argv[]) { 0.00, /* Glare as a fraction of the ambient (Y range 0.0 .. 1.0) */ white[4], /* The Glare color coordinates (typically the Ambient color) */ use_hk, /* use Helmholtz-Kohlraush flag */ - 1.0 /* HK scaling factor */ + 1.0, /* HK scaling factor */ + 0.0, /* No mid-tone hack */ + NULL ); /* Setup cam to convert from Jab */ @@ -597,7 +599,9 @@ main(int argc, char *argv[]) { 0.00, /* Glare as a fraction of the ambient (Y range 0.0 .. 1.0) */ white[4], /* The Glare color coordinates (typically the Ambient color) */ use_hk, /* use Helmholtz-Kohlraush flag */ - 1.0 /* HK scaling factor */ + 1.0, /* HK scaling factor */ + 0.0, /* No mid-tone hack */ + NULL ); /* Figure out the size of the raster */ diff --git a/xicc/cam02ref.h b/xicc/cam02ref.h index 28c3fd3..d890c31 100644..100755 --- a/xicc/cam02ref.h +++ b/xicc/cam02ref.h @@ -45,7 +45,10 @@ struct _cam02ref { double Yf, /* Flare as a fraction of the reference white (range 0.0 .. 1.0) */ double Yg, /* Glare as a fraction of the adapting/surround (range 0.0 .. 1.0) */ double Gxyz[3], /* The Glare white coordinates (typically the Ambient color) */ - int hk /* Flag, NZ to use Helmholtz-Kohlraush effect */ + int hk, /* Flag, NZ to use Helmholtz-Kohlraush effect */ + double hkscale, /* HK effect scaling factor */ + double mtaf, /* Mid tone partial adapation factor from Wxyz to Wxyz2, <= 0.0 if none */ + double Wxyz2[3] /* Mid tone Adapted White XYZ (Y range 0.0 .. 1.0) */ ); /* Conversions */ @@ -125,7 +128,7 @@ double Lv /* Luminence of white in the Viewing/Scene/Image field (cd/m^2) */ static void cam02ref_free(cam02ref *s); static int cam02ref_set_view(cam02ref *s, ViewingCondition Ev, double Wxyz[3], double Yb, double La, double Lv, double Yf, double Yg, double Gxyz[3], - int hk, double hkscale); + int hk, double hkscale, double mtaf, double Wxyz2[3]); static int cam02ref_XYZ_to_cam(cam02ref *s, double *Jab, double *xyz); static int cam02ref_cam_to_XYZ(cam02ref *s, double XYZ[3], double Jab[3]); @@ -164,7 +167,9 @@ double Yf, /* Flare as a fraction of the reference white (Y range 0.0 .. 1.0) * double Yg, /* Glare as a fraction of the adapting/surround (Y range 0.0 .. 1.0) */ double Gxyz[3], /* The Glare white coordinates (typically the Ambient color) */ int hk, /* Flag, NZ to use Helmholtz-Kohlraush effect */ -double hkscale /* HK effect scaling factor */ +double hkscale, /* HK effect scaling factor */ +double mtaf, /* Mid tone partial adapation factor from Wxyz to Wxyz2, <= 0.0 if none */ +double Wxyz2[3] /* Mid tone Adapted White XYZ (Y range 0.0 .. 1.0) */ ) { double tt; diff --git a/xicc/cam02test.c b/xicc/cam02test.c index fb7d98e..2b57b05 100644..100755 --- a/xicc/cam02test.c +++ b/xicc/cam02test.c @@ -407,7 +407,10 @@ main(void) { tFlair[c], /* Flare as a fraction of the reference white (Y range 0.0 .. 1.0) */ 0.00, /* Glare as a fraction of the ambient (Y range 0.0 .. 1.0) */ twhite[c], /* The Flare color coordinates (typically the Ambient color) */ - USE_HK /* use Helmholtz-Kohlraush flag */ + USE_HK, /* use Helmholtz-Kohlraush flag */ + 1.0, + 0.0, + NULL ); cam->set_view( cam, @@ -419,7 +422,10 @@ main(void) { tFlair[c], /* Flare as a fraction of the reference white (Y range 0.0 .. 1.0) */ 0.00, /* Glare as a fraction of the ambient (Y range 0.0 .. 1.0) */ twhite[c], /* The Flare color coordinates (typically the Ambient color) */ - USE_HK /* use Helmholtz-Kohlraush flag */ + USE_HK, /* use Helmholtz-Kohlraush flag */ + 1.0, + 0.0, + NULL ); camr->nldlimit = cam->nldlimit; camr->jlimit = cam->jlimit; @@ -563,7 +569,9 @@ main(void) { 0.00, /* Glare as a fraction of the ambient (Y range 0.0 .. 1.0) */ sp_white[c],/* The Glare color coordinates (typically the Ambient color) */ USE_HK, /* use Helmholtz-Kohlraush flag */ - 1.0 /* Normal Helmholtz-Kohlraush scale */ + 1.0, /* Normal Helmholtz-Kohlraush scale */ + 0.0, /* No mid-tone hack */ + NULL ); cam->set_view( @@ -577,7 +585,9 @@ main(void) { 0.00, /* Glare as a fraction of the ambient (Y range 0.0 .. 1.0) */ sp_white[c],/* The Glare color coordinates (typically the Ambient color) */ USE_HK, /* use Helmholtz-Kohlraush flag */ - 1.0 /* Normal Helmholtz-Kohlraush scale */ + 1.0, /* Normal Helmholtz-Kohlraush scale */ + 0.0, /* No mid-tone hack */ + NULL ); camr->nldlimit = cam->nldlimit; @@ -719,7 +729,9 @@ main(void) { 0.00, /* Glare as a fraction of the ambient (Y range 0.0 .. 1.0) */ white[c], /* The Glare color coordinates (typically the Ambient color) */ USE_HK, /* use Helmholtz-Kohlraush flag */ - 1.0 /* Normal Helmholtz-Kohlraush scale */ + 1.0, /* Normal Helmholtz-Kohlraush scale */ + 0.0, /* No mid-tone hack */ + NULL ); cam->set_view( @@ -733,7 +745,9 @@ main(void) { 0.00, /* Glare as a fraction of the ambient (Y range 0.0 .. 1.0) */ white[c], /* The Glare color coordinates (typically the Ambient color) */ USE_HK, /* use Helmholtz-Kohlraush flag */ - 1.0 /* Normal Helmholtz-Kohlraush scale */ + 1.0, /* Normal Helmholtz-Kohlraush scale */ + 0.0, /* No mid-tone hack */ + NULL ); /* Make reference return error where it's going to disagree with implementation */ @@ -955,8 +969,10 @@ main(void) { 0.0, /* Glare as a fraction of the ambient (Y range 0.0 .. 1.0) */ white[c], /* The Glare color coordinates (typically the Ambient color) */ USE_HK, /* use Helmholtz-Kohlraush flag */ - 1.0 /* Normal Helmholtz-Kohlraush scale */ - ); + 1.0, /* Normal Helmholtz-Kohlraush scale */ + 0.0, /* No mid-tone hack */ + NULL + ); #ifdef INVTEST1 /* Test case */ @@ -1138,8 +1154,10 @@ main(void) { 0.0, /* Glare as a fraction of the ambient (Y range 0.0 .. 1.0) */ white[c], /* The Glare color coordinates (typically the Ambient color) */ USE_HK, /* use Helmholtz-Kohlraush flag */ - 1.0 /* Normal Helmholtz-Kohlraush scale */ - ); + 1.0, /* Normal Helmholtz-Kohlraush scale */ + 0.0, /* No mid-tone hack */ + NULL + ); #ifdef TESTINV1 /* Double sample test case */ 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 7206f31..7206f31 100644..100755 --- a/xicc/ccmx.c +++ b/xicc/ccmx.c diff --git a/xicc/ccmx.h b/xicc/ccmx.h index 03d29d1..03d29d1 100644..100755 --- a/xicc/ccmx.h +++ b/xicc/ccmx.h diff --git a/xicc/ccss.c b/xicc/ccss.c index aae278e..aae278e 100644..100755 --- a/xicc/ccss.c +++ b/xicc/ccss.c diff --git a/xicc/ccss.h b/xicc/ccss.h index dbcfbc1..dbcfbc1 100644..100755 --- a/xicc/ccss.h +++ b/xicc/ccss.h diff --git a/xicc/ccttest.c b/xicc/ccttest.c index 1b859b5..f7f4363 100644..100755 --- a/xicc/ccttest.c +++ b/xicc/ccttest.c @@ -20,6 +20,7 @@ #include <stdio.h> #include <math.h> +#include "cgats.h" #include "xspect.h" #include "numlib.h" #include "plot.h" @@ -49,8 +50,8 @@ static int do_spec(char *name, xspect *sp) { printf("\n"); - /* Compute XYZ of illuminant */ - if (icx_ill_sp2XYZ(xyz, icxOT_CIE_1931_2, NULL, icxIT_custom, 0, sp) != 0) + /* Compute normalise XYZ of illuminant */ + if (icx_ill_sp2XYZ(xyz, icxOT_CIE_1931_2, NULL, icxIT_custom, 0, sp, 0) != 0) error ("icx_sp_temp2XYZ returned error"); icmXYZ2Yxy(Yxy, xyz); diff --git a/xicc/cgatsplot.c b/xicc/cgatsplot.c index ccaa28a..bb598fc 100644..100755 --- a/xicc/cgatsplot.c +++ b/xicc/cgatsplot.c @@ -33,7 +33,8 @@ void usage(void) { fprintf(stderr,"Author: Graeme W. Gill\n"); fprintf(stderr,"usage: cgatssplot [-v] infile\n"); fprintf(stderr," -v verbose\n"); - fprintf(stderr," -0 .. -9 Choose channel to plot against\n"); + fprintf(stderr," -x plot XYZ"); + fprintf(stderr," -0 .. -9 Choose channel to plot against (dflt: index)\n"); exit(1); } @@ -51,21 +52,22 @@ main( ) { int fa,nfa; /* argument we're looking at */ int verb = 0; - int chan = 0; /* Chosen channel to plot against */ + int chan = -1; /* Chosen channel to plot against, -1 for index */ char in_name[100]; char *buf, *outc; int ti; cgats *cgf = NULL; /* cgats file data */ int isLab = 0; /* cgats output is Lab, else XYZ */ + int wantLab = 1; /* cgats output is Lab, else XYZ */ char *xyzfname[3] = { "XYZ_X", "XYZ_Y", "XYZ_Z" }; char *labfname[3] = { "LAB_L", "LAB_A", "LAB_B" }; int npat; /* Number of patches */ inkmask nmask; /* Device inkmask */ int nchan; /* Number of input chanels */ char *bident; /* Base ident */ - int chix[ICX_MXINKS]; /* Device chanel indexes */ - int pcsix[3]; /* Device chanel indexes */ + int chix[ICX_MXINKS]; /* Device chanel indexes */ + int pcsix[3]; /* Device chanel indexes */ pval *pat; /* patch values */ int i, j; @@ -92,10 +94,14 @@ main( } /* Verbosity */ - if (argv[fa][1] == 'v' || argv[fa][1] == 'V') { + if (argv[fa][1] == 'v') { verb = 1; } + else if (argv[fa][1] == 'x') { + wantLab = 0; + } + else if (argv[fa][1] >= '0' && argv[fa][1] <= '9') { chan = argv[fa][1] - '0'; } @@ -196,18 +202,30 @@ main( pat[i].v[1] /= 100.0; pat[i].v[2] /= 100.0; } - if (!isLab) { /* Convert test patch result XYZ to PCS (D50 Lab) */ + if (wantLab && !isLab) { /* Convert test patch result XYZ to PCS (D50 Lab) */ icmXYZ2Lab(&icmD50, pat[i].v, pat[i].v); + } else if (!wantLab && isLab) { + icmLab2XYZ(&icmD50, pat[i].v, pat[i].v); + } + if (!wantLab) { + pat[i].v[0] *= 100.0; /* Normalise XYZ to range 0.0 - 100.0 */ + pat[i].v[1] *= 100.0; + pat[i].v[2] *= 100.0; } for (j = 0; j < nchan; j++) { pat[i].d[j] = *((double *)cgf->t[0].fdata[i][chix[j]]); } } + isLab = wantLab; +#ifdef NEVER /* Sort by the selected channel */ + if (chan >= 0 && chan < nchan) { #define HEAP_COMPARE(A,B) (A.d[chan] < B.d[chan]) - HEAPSORT(pval, pat, npat); + HEAPSORT(pval, pat, npat); #undef HEAP_COMPARE + } +#endif /* Create the plot */ { @@ -226,13 +244,22 @@ main( if ((y2 = (double *)malloc(sizeof(double) * npat)) == NULL) error("Malloc failed - y2[]"); +printf("~1 chan = %d\n",chan); for (i = 0; i < npat; i++) { - xx[i] = pat[i].d[chan]; - y0[i] = pat[i].v[0]; - y1[i] = 50 + pat[i].v[1]/2.0; - y2[i] = 50 + pat[i].v[2]/2.0; - -// printf("~1 %d: xx = %f, y = %f %f %f\n",i,xx[i],y0[i],y1[i],y2[i]); + if (chan >= 0 && chan < nchan) + xx[i] = pat[i].d[chan]; + else + xx[i] = (double)i; + if (isLab) { + y0[i] = pat[i].v[0]; + y1[i] = 50.0 + pat[i].v[1]/2.0; + y2[i] = 50.0 + pat[i].v[2]/2.0; + } else { + y0[i] = pat[i].v[0]; + y1[i] = pat[i].v[1]; + y2[i] = pat[i].v[2]; + } + printf("~1 %d: xx = %f, y = %f %f %f\n",i,xx[i],y0[i],y1[i],y2[i]); } do_plot6(xx,y0,y1,NULL,NULL,y2,NULL,npat); 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 98c7835..98c7835 100644..100755 --- a/xicc/extractttag.c +++ b/xicc/extractttag.c diff --git a/xicc/fakeCMY.c b/xicc/fakeCMY.c index 0863cfb..0863cfb 100644..100755 --- a/xicc/fakeCMY.c +++ b/xicc/fakeCMY.c diff --git a/xicc/fbview.c b/xicc/fbview.c index 482ba5f..482ba5f 100644..100755 --- a/xicc/fbview.c +++ b/xicc/fbview.c diff --git a/xicc/iccgamut.c b/xicc/iccgamut.c index ecbab7f..a7f11fe 100644..100755 --- a/xicc/iccgamut.c +++ b/xicc/iccgamut.c @@ -88,6 +88,10 @@ void usage(char *diag) { 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," h:hkscale Helmholtz-Kohlrausch effect scale factor (default 1.0)\n"); + fprintf(stderr," m:mtaf Mid-tone partial adaptation factor (default 0.0)\n"); + fprintf(stderr," m:X:Y:Z Mid-tone Adaptation white as XYZ (default D50)\n"); + fprintf(stderr," m:x:y Mid-tone Adaptation white as x, y\n"); fprintf(stderr," -x pcent Expand/compress gamut cylindrically by percent\n"); fprintf(stderr," -s Create special cube surface topology plot\n"); fprintf(stderr,"\n"); @@ -126,6 +130,9 @@ main(int argc, char *argv[]) { double vc_g = -1.0; /* Glare % overide */ double vc_gXYZ[3] = {-1.0, -1.0, -1.0}; /* Glare color override in XYZ */ double vc_gxy[2] = {-1.0, -1.0}; /* Glare color override in x,y */ + double vc_hkscale = -1.0; /* HK scaling factor */ + double vc_mtaf = -1.0; /* Mid tone partial adapation factor from Wxyz to Wxyz2 */ + double vc_Wxyz2[3] = {-1.0, -1.0, -1.0}; /* Adapted white override in XYZ */ double expand = 1.0; /* Expand gamut cylindrically */ icxLuBase *luo; @@ -362,6 +369,20 @@ main(int argc, char *argv[]) { vc_g = x; } else usage("Unrecognised parameters after -cg"); + } else if (na[0] == 'h' || na[0] == 'H') { + if (na[1] != ':') + usage("Unrecognised parameters after -ch"); + vc_hkscale = atof(na+2); + } else if (na[0] == 'm' || na[0] == 'M') { + double x, y, z; + if (sscanf(na+1,":%lf:%lf:%lf",&x,&y,&z) == 3) { + vc_Wxyz2[0] = x; vc_Wxyz2[1] = y; vc_Wxyz2[2] = z; + } else if (sscanf(na+1,":%lf:%lf",&x,&y) == 2) { + vc_Wxyz2[0] = x; vc_Wxyz2[1] = y; vc_Wxyz2[2] = -1; + } else if (sscanf(na+1,":%lf",&x) == 1) { + vc_mtaf = x; + } else + usage("Unrecognised parameters after -cm"); } else usage("Unrecognised parameters after -c"); } @@ -467,6 +488,23 @@ main(int argc, char *argv[]) { vc.Gxyz[0] = x/y * vc.Gxyz[1]; vc.Gxyz[2] = z/y * vc.Gxyz[1]; } + if (vc_hkscale >= 0.0) + vc.hkscale = vc_hkscale; + if (vc_mtaf >= 0.0) + vc.mtaf = vc_mtaf; + if (vc_Wxyz2[0] >= 0.0 && vc_Wxyz2[1] > 0.0 && vc_Wxyz2[2] >= 0.0) { + /* Normalise XYZ */ + vc.Wxyz2[0] = vc_Wxyz2[0]/vc_Wxyz2[1] * vc.Wxyz2[1]; + vc.Wxyz2[2] = vc_Wxyz2[2]/vc_Wxyz2[1] * vc.Wxyz2[1]; + } + if (vc_Wxyz2[0] >= 0.0 && vc_Wxyz2[1] >= 0.0 && vc_Wxyz2[2] < 0.0) { + /* Convert Yxy to XYZ */ + double x = vc_Wxyz2[0]; + double y = vc_Wxyz2[1]; /* If Y == 1.0, then X+Y+Z = 1/y */ + double z = 1.0 - x - y; + vc.Wxyz2[0] = x/y * vc.Wxyz2[1]; + vc.Wxyz2[2] = z/y * vc.Wxyz2[1]; + } fl |= ICX_CLIP_NEAREST; /* Don't setup rev uncessarily */ 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 09fe18c..ecc67b0 100644..100755 --- a/xicc/mpplu.c +++ b/xicc/mpplu.c @@ -40,7 +40,7 @@ void usage(void) { fprintf(stderr," -i illum Choose illuminant for print/transparency spectral data:\n"); fprintf(stderr," A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp\n"); fprintf(stderr," -o observ Choose CIE Observer for spectral data:\n"); - fprintf(stderr," 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2\n"); + fprintf(stderr," 1931_2 (def), 1964_10, 2012_2, 2012_10, S&B 1955_2, shaw, J&V 1978_2 or file.cmf\n"); fprintf(stderr," -u Use Fluorescent Whitening Agent compensation\n"); fprintf(stderr," -g Create gamut output\n"); fprintf(stderr," -w Create gamut %s as well\n",vrml_format()); @@ -86,7 +86,8 @@ main(int argc, char *argv[]) { int fwacomp = 0; /* FWA compensation */ icxIllumeType illum = icxIT_default; /* Spectral defaults */ xspect cust_illum; /* Custom illumination spectrum */ - icxObserverType observ = icxOT_default; + icxObserverType obType = icxOT_default; + xspect custObserver[3]; /* If obType = icxOT_custom */ char buf[200]; double in[MAX_CHAN], out[MAX_CHAN]; int rv = 0; @@ -237,21 +238,30 @@ main(int argc, char *argv[]) { if (na == NULL) usage(); if (strcmp(na, "1931_2") == 0) { /* Classic 2 degree */ spec = 1; - observ = icxOT_CIE_1931_2; + obType = icxOT_CIE_1931_2; } else if (strcmp(na, "1964_10") == 0) { /* Classic 10 degree */ spec = 1; - observ = icxOT_CIE_1964_10; + obType = icxOT_CIE_1964_10; + } else if (strcmp(na, "2012_2") == 0) { /* Latest 2 degree */ + spec = 1; + obType = icxOT_CIE_2012_2; + } else if (strcmp(na, "2012_10") == 0) { /* Latest 10 degree */ + spec = 1; + obType = icxOT_CIE_2012_10; } else if (strcmp(na, "1955_2") == 0) { /* Stiles and Burch 1955 2 degree */ spec = 1; - observ = icxOT_Stiles_Burch_2; + obType = icxOT_Stiles_Burch_2; } else if (strcmp(na, "1978_2") == 0) { /* Judd and Voss 1978 2 degree */ spec = 1; - observ = icxOT_Judd_Voss_2; + obType = icxOT_Judd_Voss_2; } else if (strcmp(na, "shaw") == 0) { /* Shaw and Fairchilds 1997 2 degree */ spec = 1; - observ = icxOT_Shaw_Fairchild_2; - } else - usage(); + obType = icxOT_Shaw_Fairchild_2; + } else { /* Assume it's a filename */ + obType = icxOT_custom; + if (read_cmf(custObserver, na) != 0) + usage(); + } } /* Fluerescent Whitner compensation */ @@ -330,7 +340,7 @@ main(int argc, char *argv[]) { } /* Select CIE return value details */ - if ((rv = mppo->set_ilob(mppo, illum, &cust_illum, observ, NULL, pcss, fwacomp)) != 0) { + if ((rv = mppo->set_ilob(mppo, illum, &cust_illum, obType, custObserver, pcss, fwacomp)) != 0) { if (rv == 1) error("Spectral profile needed for custom illuminant, observer or FWA"); error("Error setting illuminant, observer, or FWA"); diff --git a/xicc/revfix.c b/xicc/revfix.c index ee9662a..ee9662a 100644..100755 --- a/xicc/revfix.c +++ b/xicc/revfix.c diff --git a/xicc/specplot.c b/xicc/specplot.c index 9e43856..de819ed 100644..100755 --- a/xicc/specplot.c +++ b/xicc/specplot.c @@ -21,6 +21,7 @@ #include <stdio.h> #include <math.h> +#include "cgats.h" #include "xspect.h" #include "numlib.h" #include "plot.h" @@ -112,10 +113,17 @@ static int do_spec( || mt == inst_mrt_emission_flash || mt == inst_mrt_ambient_flash) { - /* Compute XYZ of illuminant */ - if (icx_ill_sp2XYZ(xyz, icxOT_CIE_1931_2, NULL, icxIT_custom, 0, &tsp) != 0) + /* Compute absolute XYZ of illuminant */ + if (icx_ill_sp2XYZ(xyz, icxOT_CIE_1931_2, NULL, icxIT_custom, 0, &tsp, 1) != 0) warning("icx_ill_sp2XYZ returned error"); + printf("Abs. Y = %f\n", xyz[1]); + + /* Normalise to Y = 1 */ + xyz[0] /= xyz[1]; + xyz[2] /= xyz[1]; + xyz[1] /= xyz[1]; + icmXYZ2Yxy(Yxy, xyz); icmXYZ2Lab(&icmD50, Lab, xyz); diff --git a/xicc/specsubsamp.c b/xicc/specsubsamp.c index f4ac1e4..1d6bbde 100644..100755 --- a/xicc/specsubsamp.c +++ b/xicc/specsubsamp.c @@ -19,6 +19,7 @@ #include <stdio.h> #include <math.h> +#include "cgats.h" #include "xspect.h" #include "numlib.h" #include "ui.h" @@ -30,7 +31,7 @@ void usage(void) { fprintf(stderr," -i illum Choose illuminant for print/transparency spectral data:\n"); fprintf(stderr," A, C, D50, D50M2, D65, F5, F8, F10 or file.sp\n"); fprintf(stderr," -o observ Choose CIE Observer for spectral data:\n"); - fprintf(stderr," 1931_2, 1964_10, S&B 1955_2, shaw, J&V 1978_2\n"); + fprintf(stderr," 1931_2, 1964_10, 2012_2, 2012_10, S&B 1955_2, shaw, J&V 1978_2 or file.cmf\n"); fprintf(stderr," -w st,en,sp Output start, end and spacing nm\n"); fprintf(stderr," -5 Commenf output wavelegths every 5\n"); exit(1); @@ -45,7 +46,8 @@ main( int verb = 0; icxIllumeType illum = icxIT_D50; /* Spectral defaults */ xspect cust_illum; /* Custom illumination spectrum */ - icxObserverType observ = icxOT_CIE_1931_2; + icxObserverType obType = icxOT_CIE_1931_2; + xspect custObserver[3]; /* If obType = icxOT_custom */ int obs = 0; /* If nz output observer */ double wl_short = 380.0, wl_long = 730.0, wl_width = 10.0; int wl_n = 0; @@ -112,21 +114,31 @@ main( if (na == NULL) usage(); if (strcmp(na, "1931_2") == 0) { /* Classic 2 degree */ obs = 1; - observ = icxOT_CIE_1931_2; + obType = icxOT_CIE_1931_2; } else if (strcmp(na, "1964_10") == 0) { /* Classic 10 degree */ obs = 1; - observ = icxOT_CIE_1964_10; + obType = icxOT_CIE_1964_10; + } else if (strcmp(na, "2012_2") == 0) { /* Latest 2 degree */ + obs = 1; + obType = icxOT_CIE_2012_2; + } else if (strcmp(na, "2012_10") == 0) { /* Latest 10 degree */ + obs = 1; + obType = icxOT_CIE_2012_10; } else if (strcmp(na, "1955_2") == 0) { /* Stiles and Burch 1955 2 degree */ obs = 1; - observ = icxOT_Stiles_Burch_2; + obType = icxOT_Stiles_Burch_2; } else if (strcmp(na, "1978_2") == 0) { /* Judd and Voss 1978 2 degree */ obs = 1; - observ = icxOT_Judd_Voss_2; + obType = icxOT_Judd_Voss_2; } else if (strcmp(na, "shaw") == 0) { /* Shaw and Fairchilds 1997 2 degree */ obs = 1; - observ = icxOT_Shaw_Fairchild_2; - } else - usage(); + obType = icxOT_Shaw_Fairchild_2; + } else { /* Assume it's a filename */ + obs = 1; + obType = icxOT_custom; + if (read_cmf(custObserver, na) != 0) + usage(); + } } else if (argv[fa][1] == 'w' || argv[fa][1] == 'W') { @@ -163,8 +175,14 @@ main( int i, j, k; xspect *sp[3]; - if (standardObserver(sp, observ) != 0) - error ("standardObserver returned error"); + if (obType == icxOT_custom) { + sp[0] = &custObserver[0]; + sp[1] = &custObserver[1]; + sp[2] = &custObserver[2]; + } else { + if (standardObserver(sp, obType) != 0) + error ("standardObserver returned error"); + } printf("/* %f - %f, %f spacing, %d samples */\n",wl_short,wl_long,wl_width,wl_n); printf("{\n"); for (k = 0; k < 3; k++) { diff --git a/xicc/spectest.c b/xicc/spectest.c index bed19e0..0bcc716 100644..100755 --- a/xicc/spectest.c +++ b/xicc/spectest.c @@ -29,6 +29,7 @@ #include <stdio.h> #include <math.h> +#include "cgats.h" #include "xspect.h" #include "numlib.h" #ifdef DOPLOT diff --git a/xicc/spectest2.c b/xicc/spectest2.c index cec6359..a1c338d 100644..100755 --- a/xicc/spectest2.c +++ b/xicc/spectest2.c @@ -25,6 +25,7 @@ #include <stdio.h> #include <math.h> +#include "cgats.h" #include "xspect.h" #include "insttypes.h" //#include "inst.h" diff --git a/xicc/tiffgamut.c b/xicc/tiffgamut.c index 38b6b6c..5014994 100644..100755 --- a/xicc/tiffgamut.c +++ b/xicc/tiffgamut.c @@ -98,6 +98,10 @@ void usage(void) { 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," h:hkscale Helmholtz-Kohlrausch effect scale factor (default 1.0)\n"); + fprintf(stderr," m:mtaf Mid-tone partial adaptation factor (default 0.0)\n"); + fprintf(stderr," m:X:Y:Z Mid-tone Adaptation white as XYZ (default D50)\n"); + fprintf(stderr," m:x:y Mid-tone Adaptation white as x, y\n"); fprintf(stderr," -x pcent Expand/compress gamut cylindrically by percent\n"); fprintf(stderr," -O outputfile Override the default output filename.\n"); exit(1); @@ -355,6 +359,9 @@ main(int argc, char *argv[]) { double vc_g = -1.0; /* Glare % overide */ double vc_gXYZ[3] = {-1.0, -1.0, -1.0}; /* Glare color override in XYZ */ double vc_gxy[2] = {-1.0, -1.0}; /* Glare color override in x,y */ + double vc_hkscale = -1.0; /* HK scaling factor */ + double vc_mtaf = -1.0; /* Mid tone partial adapation factor from Wxyz to Wxyz2 */ + double vc_Wxyz2[3] = {-1.0, -1.0, -1.0}; /* Adapted white override in XYZ */ double expand = 1.0; /* Expand gamut cylindrically by ratio */ icxLuBase *luo = NULL; /* Generic lookup object */ icColorSpaceSignature ins = icSigLabData, outs; /* Type of input and output spaces */ @@ -550,6 +557,20 @@ main(int argc, char *argv[]) { vc_g = x; } else usage(); + } else if (na[0] == 'h' || na[0] == 'H') { + if (na[1] != ':') + usage(); + vc_hkscale = atof(na+2); + } else if (na[0] == 'm' || na[0] == 'M') { + double x, y, z; + if (sscanf(na+1,":%lf:%lf:%lf",&x,&y,&z) == 3) { + vc_Wxyz2[0] = x; vc_Wxyz2[1] = y; vc_Wxyz2[2] = z; + } else if (sscanf(na+1,":%lf:%lf",&x,&y) == 2) { + vc_Wxyz2[0] = x; vc_Wxyz2[1] = y; vc_Wxyz2[2] = -1; + } else if (sscanf(na+1,":%lf",&x) == 1) { + vc_mtaf = x; + } else + usage(); } else usage(); } @@ -708,6 +729,23 @@ main(int argc, char *argv[]) { vc.Gxyz[0] = x/y * vc.Gxyz[1]; vc.Gxyz[2] = z/y * vc.Gxyz[1]; } + if (vc_hkscale >= 0.0) + vc.hkscale = vc_hkscale; + if (vc_mtaf >= 0.0) + vc.mtaf = vc_mtaf; + if (vc_Wxyz2[0] >= 0.0 && vc_Wxyz2[1] > 0.0 && vc_Wxyz2[2] >= 0.0) { + /* Normalise XYZ */ + vc.Wxyz2[0] = vc_Wxyz2[0]/vc_Wxyz2[1] * vc.Wxyz2[1]; + vc.Wxyz2[2] = vc_Wxyz2[2]/vc_Wxyz2[1] * vc.Wxyz2[1]; + } + if (vc_Wxyz2[0] >= 0.0 && vc_Wxyz2[1] >= 0.0 && vc_Wxyz2[2] < 0.0) { + /* Convert Yxy to XYZ */ + double x = vc_Wxyz2[0]; + double y = vc_Wxyz2[1]; /* If Y == 1.0, then X+Y+Z = 1/y */ + double z = 1.0 - x - y; + vc.Wxyz2[0] = x/y * vc.Wxyz2[1]; + vc.Wxyz2[2] = z/y * vc.Wxyz2[1]; + } /* Get a expanded color conversion object */ if ((luo = xicco->get_luobj(xicco, ICX_CLIP_NEAREST @@ -768,12 +806,29 @@ main(int argc, char *argv[]) { vc.Gxyz[0] = x/y * vc.Gxyz[1]; vc.Gxyz[2] = z/y * vc.Gxyz[1]; } + if (vc_hkscale >= 0.0) + vc.hkscale = vc_hkscale; + if (vc_mtaf >= 0.0) + vc.mtaf = vc_mtaf; + if (vc_Wxyz2[0] >= 0.0 && vc_Wxyz2[1] > 0.0 && vc_Wxyz2[2] >= 0.0) { + /* Normalise XYZ */ + vc.Wxyz2[0] = vc_Wxyz2[0]/vc_Wxyz2[1] * vc.Wxyz2[1]; + vc.Wxyz2[2] = vc_Wxyz2[2]/vc_Wxyz2[1] * vc.Wxyz2[1]; + } + if (vc_Wxyz2[0] >= 0.0 && vc_Wxyz2[1] >= 0.0 && vc_Wxyz2[2] < 0.0) { + /* Convert Yxy to XYZ */ + double x = vc_Wxyz2[0]; + double y = vc_Wxyz2[1]; /* If Y == 1.0, then X+Y+Z = 1/y */ + double z = 1.0 - x - y; + vc.Wxyz2[0] = x/y * vc.Wxyz2[1]; + vc.Wxyz2[2] = z/y * vc.Wxyz2[1]; + } if ((cam = new_icxcam(cam_default)) == NULL) error("new_icxcam failed"); cam->set_view(cam, vc.Ev, vc.Wxyz, vc.La, vc.Yb, vc.Lv, vc.Yf, vc.Yg, vc.Gxyz, - XICC_USE_HK, vc.hkscale); + XICC_USE_HK, vc.hkscale, vc.mtaf, vc.Wxyz2); } /* Establish the PCS range if we are filtering */ diff --git a/xicc/tiffgmts.c b/xicc/tiffgmts.c index 592c2dd..592c2dd 100644..100755 --- a/xicc/tiffgmts.c +++ b/xicc/tiffgmts.c 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 4a5b37e..4a5b37e 100644..100755 --- a/xicc/xcal.c +++ b/xicc/xcal.c diff --git a/xicc/xcal.h b/xicc/xcal.h index c70b884..c70b884 100644..100755 --- a/xicc/xcal.h +++ b/xicc/xcal.h diff --git a/xicc/xcam.c b/xicc/xcam.c index 0b46a24..39543f6 100644..100755 --- a/xicc/xcam.c +++ b/xicc/xcam.c @@ -24,7 +24,7 @@ static void icx_cam_free(icxcam *s); static int icx_set_view(icxcam *s, ViewingCondition Ev, double Wxyz[3], double La, double Yb, double Lv, double Yf, double Yg, double Gxyz[3], - int hk, double hkscale); + int hk, double hkscale, double mtaf, double Wxyz2[3]); static int icx_XYZ_to_cam(struct _icxcam *s, double Jab[3], double XYZ[3]); static int icx_cam_to_XYZ(struct _icxcam *s, double XYZ[3], double Jab[3]); static void settrace(struct _icxcam *s, int tracev); @@ -129,7 +129,9 @@ double Yf, /* Flare as a fraction of the reference white (Y range 0.0 .. 1.0) * double Yg, /* Glare as a fraction of the adapting/surround (Y range 0.0 .. 1.0) */ double Gxyz[3], /* The Glare white coordinates (typically the Ambient color) */ int hk, /* Flag, NZ to use Helmholtz-Kohlraush effect */ -double hkscale /* HK effect scaling factor */ +double hkscale, /* HK effect scaling factor */ +double mtaf, /* Mid tone partial adapation factor from Wxyz to Wxyz2, <= 0.0 if none */ +double Wxyz2[3] /* Mid tone Adapted White XYZ (Y range 0.0 .. 1.0) */ ) { s->Wxyz[0] = Wxyz[0]; s->Wxyz[1] = Wxyz[1]; @@ -142,7 +144,7 @@ double hkscale /* HK effect scaling factor */ } case cam_CIECAM02: { cam02 *pp = (cam02 *)s->p; - return pp->set_view(pp, Ev, Wxyz, La, Yb, Lv, Yf, Yg, Gxyz, hk, hkscale); + return pp->set_view(pp, Ev, Wxyz, La, Yb, Lv, Yf, Yg, Gxyz, hk, hkscale, mtaf, Wxyz2); } default: break; diff --git a/xicc/xcam.h b/xicc/xcam.h index de4f5b4..972b02c 100644..100755 --- a/xicc/xcam.h +++ b/xicc/xcam.h @@ -52,7 +52,10 @@ struct _icxcam { double Yg, /* Glare as a fraction of the adapting/surround (range 0.0 .. 1.0) */ double Gxyz[3], /* The Glare white coordinates (typically the Ambient color) */ int hk, /* Flag, NZ to use Helmholtz-Kohlraush effect */ - double hkscale /* HK effect scaling factor */ + double hkscale, /* HK effect scaling factor */ + + double mtaf, /* Mid tone partial adapation factor from Wxyz to Wxyz2, <= 0.0 if none */ + double Wxyz2[3] /* Mid tone Adapted White XYZ (Y range 0.0 .. 1.0) */ ); /* Conversions */ diff --git a/xicc/xcolorants.c b/xicc/xcolorants.c index f243718..f243718 100644..100755 --- a/xicc/xcolorants.c +++ b/xicc/xcolorants.c diff --git a/xicc/xcolorants.h b/xicc/xcolorants.h index 804fea5..804fea5 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 05b4317..05b4317 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 3d7c665..3d7c665 100644..100755 --- a/xicc/xfbview.c +++ b/xicc/xfbview.c diff --git a/xicc/xfit.c b/xicc/xfit.c index 91afa64..b5a8694 100644..100755 --- a/xicc/xfit.c +++ b/xicc/xfit.c @@ -1834,6 +1834,7 @@ static int xfit_fit( } else { icmSetUnity3x3(p->fromAbs); icmSetUnity3x3(p->toAbs); + icmCpy3(p->wp, icmD50_ary3); /* Default to forced absolute */ } /* Setup input position/shape curves to be linear initially */ diff --git a/xicc/xfit.h b/xicc/xfit.h index 14b4ecc..7e50c94 100644..100755 --- a/xicc/xfit.h +++ b/xicc/xfit.h @@ -55,6 +55,7 @@ typedef enum { #define XFIT_OUT_WP_REL 0x0010 /* Extract the white point and make output relative */ #define XFIT_OUT_WP_REL_US 0x0030 /* Same as above but scale to avoid clipping above WP */ #define XFIT_OUT_WP_REL_C 0x0050 /* Same as above but clip any cLUT values over D50 */ + #define XFIT_CLIP_WP 0x0080 /* Clip white point to have Y <= 1.0 (conflict with above) */ #define XFIT_OUT_LAB 0x0100 /* Output space is LAB else XYZ for reading WP */ diff --git a/xicc/xicc.c b/xicc/xicc.c index 9e35ffc..eef469d 100644..100755 --- a/xicc/xicc.c +++ b/xicc/xicc.c @@ -836,7 +836,7 @@ double *kblk /* K only black */ //printf("~1 white %f %f %f, black %f %f %f, kblack %f %f %f\n",white[0],white[1],white[2],black[0],black[1],black[2],kblack[0],kblack[1],kblack[2]); /* Convert to possibl xicc override PCS */ - switch (p->pcs) { + switch ((int)p->pcs) { case icSigXYZData: break; /* Don't have to do anyting */ case icSigLabData: @@ -1676,6 +1676,14 @@ double *wp /* Provide XYZ white point if xicc is NULL */ /* Default HK scaling factor = none */ vc->hkscale = 1.0; + + /* Default Mid tone partial adapation factor = none */ + vc->mtaf = 0.0; + + /* Default Mid tone partial adapation white point = D50 */ + vc->Wxyz2[0] = icmD50.X; + vc->Wxyz2[1] = icmD50.Y; + vc->Wxyz2[2] = icmD50.Z; } /* @@ -1733,10 +1741,10 @@ double *wp /* Provide XYZ white point if xicc is NULL */ vc->Yg = 0.01 * XICC_DEFAULT_GLARE; /* 5% glare */ } } - else if (no == 2 + else if (no == 0 || (as != NULL && stricmp(as,"pc") == 0)) { - no = 2; + no = 0; if (vc != NULL) { vc->desc = " pc - Critical print evaluation environment (ISO-3664 P1)"; vc->Ev = vc_average; /* Average viewing conditions */ @@ -1747,10 +1755,10 @@ double *wp /* Provide XYZ white point if xicc is NULL */ vc->Yg = 0.01 * XICC_DEFAULT_GLARE; /* 5% glare */ } } - else if (no == 0 + else if (no == 1 || (as != NULL && stricmp(as,"pp") == 0)) { - no = 0; + no = 1; if (vc != NULL) { vc->desc = " pp - Practical Reflection Print (ISO-3664 P2)"; vc->Ev = vc_none; /* Use explicit La/Lv */ @@ -1761,10 +1769,10 @@ double *wp /* Provide XYZ white point if xicc is NULL */ vc->Yg = 0.01 * XICC_DEFAULT_GLARE; /* 5% glare */ } } - else if (no == 1 + else if (no == 2 || (as != NULL && stricmp(as,"pe") == 0)) { - no = 1; + no = 2; if (vc != NULL) { vc->desc = " pe - Print evaluation environment (CIE 116-1995)"; vc->Ev = vc_none; /* Use explicit La/Lv */ @@ -1775,6 +1783,21 @@ double *wp /* Provide XYZ white point if xicc is NULL */ vc->Yg = 0.01 * XICC_DEFAULT_GLARE; /* 5% glare */ } } + else if (no == 3 + || (as != NULL && stricmp(as,"pm") == 0)) { + + no = 3; + if (vc != NULL) { + vc->desc = " pm - Print evaluation with partial Mid-tone adapation"; + vc->Ev = vc_none; /* Use explicit La/Lv */ + vc->La = 30.0; /* 0.2 * Lv ? */ + 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 * XICC_DEFAULT_GLARE; /* 5% glare */ + vc->mtaf = 0.7; /* Mid-tone partial adapation to D50 */ + } + } else if (no == 4 || (as != NULL && stricmp(as,"mb") == 0)) { @@ -1789,10 +1812,10 @@ double *wp /* Provide XYZ white point if xicc is NULL */ vc->Yg = 0.01 * XICC_DEFAULT_GLARE; /* 5% glare */ } } - else if (no == 3 + else if (no == 5 || (as != NULL && stricmp(as,"mt") == 0)) { - no = 3; + no = 5; if (vc != NULL) { vc->desc = " mt - Monitor in typical work environment"; vc->Ev = vc_none; /* Use explicit La/Lv */ @@ -1803,10 +1826,10 @@ double *wp /* Provide XYZ white point if xicc is NULL */ vc->Yg = 0.01 * XICC_DEFAULT_GLARE; /* 5% glare */ } } - else if (no == 5 + else if (no == 6 || (as != NULL && stricmp(as,"md") == 0)) { - no = 5; + no = 6; if (vc != NULL) { vc->desc = " md - Monitor in darkened work environment"; vc->Ev = vc_none; /* Use explicit La/Lv */ @@ -1817,10 +1840,10 @@ double *wp /* Provide XYZ white point if xicc is NULL */ vc->Yg = 0.01 * XICC_DEFAULT_GLARE; /* 5% glare */ } } - else if (no == 6 + else if (no == 7 || (as != NULL && stricmp(as,"jm") == 0)) { - no = 6; + no = 7; if (vc != NULL) { vc->desc = " jm - Projector in dim environment"; vc->Ev = vc_none; /* Use explicit La/Lv */ @@ -1831,10 +1854,10 @@ double *wp /* Provide XYZ white point if xicc is NULL */ vc->Yg = 0.01 * XICC_DEFAULT_GLARE; /* 5% glare */ } } - else if (no == 7 + else if (no == 8 || (as != NULL && stricmp(as,"jd") == 0)) { - no = 7; + no = 8; if (vc != NULL) { vc->desc = " jd - Projector in dark environment"; vc->Ev = vc_none; /* Use explicit La/Lv */ @@ -1845,10 +1868,10 @@ double *wp /* Provide XYZ white point if xicc is NULL */ vc->Yg = 0.01 * XICC_DEFAULT_GLARE; /* 5% glare */ } } - else if (no == 8 + else if (no == 9 || (as != NULL && stricmp(as,"tv") == 0)) { - no = 8; + no = 9; if (vc != NULL) { vc->desc = " tv - Television/Film Studio"; vc->Ev = vc_none; /* Compute from La/Lv */ @@ -1859,10 +1882,10 @@ double *wp /* Provide XYZ white point if xicc is NULL */ vc->Yg = 0.01 * XICC_DEFAULT_GLARE; /* 5% glare */ } } - else if (no == 9 + else if (no == 10 || (as != NULL && stricmp(as,"pcd") == 0)) { - no = 9; + no = 10; if (vc != NULL) { vc->desc = "pcd - Photo CD - original scene outdoors"; vc->Ev = vc_average; /* Average viewing conditions */ @@ -1872,10 +1895,10 @@ double *wp /* Provide XYZ white point if xicc is NULL */ vc->Yg = 0.0; /* 0% glare - assumed to be compensated ? */ } } - else if (no == 10 + else if (no == 11 || (as != NULL && stricmp(as,"ob") == 0)) { - no = 10; + no = 11; if (vc != NULL) { vc->desc = " ob - Original scene - Bright Outdoors"; vc->Ev = vc_average; /* Average viewing conditions */ @@ -1885,10 +1908,10 @@ double *wp /* Provide XYZ white point if xicc is NULL */ vc->Yg = 0.0; /* 0% glare - assumed to be compensated ? */ } } - else if (no == 11 + else if (no == 12 || (as != NULL && stricmp(as,"cx") == 0)) { - no = 11; + no = 12; if (vc != NULL) { vc->desc = " cx - Cut Sheet Transparencies on a viewing box"; vc->Ev = vc_cut_sheet; /* Cut sheet viewing conditions */ @@ -1931,6 +1954,9 @@ icxViewCond *vc printf(" Glare to adapting/surround ratio = %f\n",vc->Yg); printf(" Flare color = %f %f %f\n",vc->Gxyz[0], vc->Gxyz[1], vc->Gxyz[2]); printf(" HK scaling = %f\n",vc->hkscale); + printf(" Mid tone partial adapation factor = %f\n",vc->mtaf); + if (vc->mtaf > 0.0) + printf(" Mid tone adapted white = %f %f %f\n",vc->Wxyz2[0], vc->Wxyz2[1], vc->Wxyz2[2]); } diff --git a/xicc/xicc.h b/xicc/xicc.h index e4db20d..ba566e6 100644..100755 --- a/xicc/xicc.h +++ b/xicc/xicc.h @@ -191,6 +191,8 @@ typedef struct { double Gxyz[3]; /* The Glare white coordinates (ie the Ambient color) */ /* will be taken from Wxyz if Gxyz <= 0.0 */ double hkscale; /* [1.0] HK scaling factor */ + double mtaf; /* [0.0] Mid tone partial adapation factor from Wxyz to Wxyz2 0.0 .. 1.0 */ + double Wxyz2[3]; /* Mid tone Adapted White XYZ (Y range 0.0 .. 1.0) */ char *desc; /* Possible description of this VC */ } icxViewCond; @@ -282,17 +284,18 @@ struct _xicc { #define ICX_SET_WHITE 0x00010000 /* find, set and make relative to the white point */ #define ICX_SET_WHITE_US 0x00030000 /* find, set and make relative to the white point hue, */ /* but not scale to W L value, to avoid input clipping */ -#define ICX_SET_WHITE_C 0x00050000 /* find, set and make relative to the white point hue, */ +#define ICX_SET_WHITE_ABS 0x00050000 /* Set dummy D50 white point to force absolute intent. */ +#define ICX_SET_WHITE_C 0x00090000 /* find, set and make relative to the white point hue, */ /* and clip any cLUT values over D50 to D50 */ -#define ICX_SET_BLACK 0x00080000 /* find and set the black point */ -#define ICX_WRITE_WBL 0x00100000 /* Matrix: write White, Black & Luminance tags */ -#define ICX_CLIP_WB 0x00200000 /* Clip white and black to be < 1 and > 0 respectively */ -#define ICX_CLIP_PRIMS 0x00400000 /* Clip matrix primaries to be > 0 */ -#define ICX_NO_IN_SHP_LUTS 0x00800000 /* Lut/Mtx: Don't create input (Device) shaper curves. */ -#define ICX_NO_IN_POS_LUTS 0x01000000 /* LuLut: Don't create input (Device) postion curves. */ -#define ICX_NO_OUT_LUTS 0x02000000 /* LuLut: Don't create output (PCS) curves. */ -//#define ICX_2PASSSMTH 0x04000000 /* If LuLut: Use Gaussian smoothing */ -//#define ICX_EXTRA_FIT 0x08000000 /* If LuLut: Counteract scat data point errors. */ +#define ICX_SET_BLACK 0x00100000 /* find and set the black point */ +#define ICX_WRITE_WBL 0x00200000 /* Matrix: write White, Black & Luminance tags */ +#define ICX_CLIP_WB 0x00400000 /* Clip white and black to be < 1 and > 0 respectively */ +#define ICX_CLIP_PRIMS 0x00800000 /* Clip matrix primaries to be > 0 */ +#define ICX_NO_IN_SHP_LUTS 0x01000000 /* Lut/Mtx: Don't create input (Device) shaper curves. */ +#define ICX_NO_IN_POS_LUTS 0x02000000 /* LuLut: Don't create input (Device) postion curves. */ +#define ICX_NO_OUT_LUTS 0x04000000 /* LuLut: Don't create output (PCS) curves. */ +//#define ICX_2PASSSMTH 0x08000000 /* If LuLut: Use Gaussian smoothing */ +//#define ICX_EXTRA_FIT 0x10000000 /* If LuLut: Counteract scat data point errors. */ /* And ICX_VERBOSE Turn on verboseness during creation */ struct _icxLuBase * (*set_luobj) (struct _xicc *p, icmLookupFunc func, /* Functionality to set */ diff --git a/xicc/xicclu.c b/xicc/xicclu.c index 20c7d8b..6bbb62a 100644..100755 --- a/xicc/xicclu.c +++ b/xicc/xicclu.c @@ -38,11 +38,20 @@ #include "plot.h" #include "ui.h" -#undef SPTEST /* Test rspl gamut surface code */ +#undef SPTEST /* [und] Test (flawed) rspl gamut surface code */ #define USE_NEARCLIP /* [def] Our usual expectation */ -#define USE_FASTNNSETP /* [def] Make it more responsive */ -#define XRES 128 /* Plotting resolution */ +#define USE_FASTNNSETP /* [def] Make it more responsive, but not same alg. */ + /* NOTE camclip & merglut are runtime options! */ +#define XRES 128 /* [128] Plotting resolution */ + +#ifndef USE_NEARCLIP +# pragma message("!!!!!!!!!!!! USE_NEARCLIP turned off !!!!!!!!!") +#endif + +#ifndef USE_FASTNNSETP +# pragma message("!!!!!!!!!!!! USE_FASTNNSETP turned off !!!!!!!!!") +#endif void usage(char *diag) { int i; @@ -55,7 +64,7 @@ void usage(char *diag) { fprintf(stderr," -g Plot slice instead of looking colors up. (Default white to black)\n"); fprintf(stderr," -G s:L:a:b Override plot slice start with Lab or Jab co-ordinate \n"); fprintf(stderr," -G e:L:a:b Override plot slice end with Lab or Jab co-ordinate \n"); - fprintf(stderr," -V Use 'vcgt' calibration tag from profile\n"); + fprintf(stderr," -V Lookup or plot the 'vcgt' calibration tag from profile\n"); fprintf(stderr," -f function f = forward, b = backwards, g = gamut, p = preview\n"); fprintf(stderr," if = inverted forward, ib = inverted backwards\n"); fprintf(stderr," -i intent a = absolute, r = relative colorimetric\n"); @@ -121,6 +130,10 @@ void usage(char *diag) { 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," h:hkscale Helmholtz-Kohlrausch effect scale factor (default 1.0)\n"); + fprintf(stderr," m:mtaf Mid-tone partial adaptation factor (default 0.0)\n"); + fprintf(stderr," m:X:Y:Z Mid-tone Adaptation white as XYZ (default D50)\n"); + fprintf(stderr," m:x:y Mid-tone Adaptation white as x, y\n"); fprintf(stderr,"\n"); fprintf(stderr," The colors to be translated should be fed into standard in,\n"); fprintf(stderr," one input color per line, white space separated.\n"); @@ -153,10 +166,6 @@ void spioutf(void *cbntx, double *out, double *in) { #endif /* SPTEST */ -#ifndef USE_FASTNNSETP -#pragma message("!!!!!!!!!!!! USE_FASTNNSETP turned off !!!!!!!!!") -#endif - int main(int argc, char *argv[]) { int fa, nfa, mfa; /* argument we're looking at */ @@ -185,6 +194,9 @@ main(int argc, char *argv[]) { double vc_g = -1.0; /* Glare % overide */ double vc_gXYZ[3] = {-1.0, -1.0, -1.0}; /* Glare color override in XYZ */ double vc_gxy[2] = {-1.0, -1.0}; /* Glare color override in x,y */ + double vc_hkscale = -1.0; /* HK scaling factor */ + double vc_mtaf = -1.0; /* Mid tone partial adapation factor from Wxyz to Wxyz2 */ + double vc_Wxyz2[3] = {-1.0, -1.0, -1.0}; /* Adapted white override in XYZ */ int verb = 1; int actual = 0; int slocwarn = 0; @@ -678,6 +690,20 @@ main(int argc, char *argv[]) { vc_g = x; } else usage("Unrecognised parameters after -cg"); + } else if (na[0] == 'h' || na[0] == 'H') { + if (na[1] != ':') + usage("Unrecognised parameters after -ch"); + vc_hkscale = atof(na+2); + } else if (na[0] == 'm' || na[0] == 'M') { + double x, y, z; + if (sscanf(na+1,":%lf:%lf:%lf",&x,&y,&z) == 3) { + vc_Wxyz2[0] = x; vc_Wxyz2[1] = y; vc_Wxyz2[2] = z; + } else if (sscanf(na+1,":%lf:%lf",&x,&y) == 2) { + vc_Wxyz2[0] = x; vc_Wxyz2[1] = y; vc_Wxyz2[2] = -1; + } else if (sscanf(na+1,":%lf",&x) == 1) { + vc_mtaf = x; + } else + usage("Unrecognised parameters after -cm"); } else usage("Unrecognised parameters after -c"); } @@ -876,6 +902,23 @@ main(int argc, char *argv[]) { vc.Gxyz[0] = x/y * vc.Gxyz[1]; vc.Gxyz[2] = z/y * vc.Gxyz[1]; } + if (vc_hkscale >= 0.0) + vc.hkscale = vc_hkscale; + if (vc_mtaf >= 0.0) + vc.mtaf = vc_mtaf; + if (vc_Wxyz2[0] >= 0.0 && vc_Wxyz2[1] > 0.0 && vc_Wxyz2[2] >= 0.0) { + /* Normalise XYZ */ + vc.Wxyz2[0] = vc_Wxyz2[0]/vc_Wxyz2[1] * vc.Wxyz2[1]; + vc.Wxyz2[2] = vc_Wxyz2[2]/vc_Wxyz2[1] * vc.Wxyz2[1]; + } + if (vc_Wxyz2[0] >= 0.0 && vc_Wxyz2[1] >= 0.0 && vc_Wxyz2[2] < 0.0) { + /* Convert Yxy to XYZ */ + double x = vc_Wxyz2[0]; + double y = vc_Wxyz2[1]; /* If Y == 1.0, then X+Y+Z = 1/y */ + double z = 1.0 - x - y; + vc.Wxyz2[0] = x/y * vc.Wxyz2[1]; + vc.Wxyz2[2] = z/y * vc.Wxyz2[1]; + } //xicc_dump_viewcond(&vc); /* Get a expanded color conversion object */ diff --git a/xicc/xlut.c b/xicc/xlut.c index a18956c..444d084 100644..100755 --- a/xicc/xlut.c +++ b/xicc/xlut.c @@ -160,15 +160,16 @@ #undef DISABLE_KCURVE_FILTER /* [Undef] don't filter the Kcurve */ #undef REPORT_LOCUS_SEGMENTS /* [Undef[ Examine how many segments there are in aux inversion */ -#undef FASTREVSETUP_NON_CAM /* [Undef] Use fast setup on innerm non-CAM lookup, if we're */ +#undef FASTREVSETUP_NON_CAM /* [Undef] Use fast setup on inner non-CAM lookup, if we're */ /* going to use CAM clip for nn lookup */ -#define XYZ_EXTRA_SMOOTH 20.0 /* Extra smoothing factor for XYZ profiles */ +#define XYZ_EXTRA_SMOOTH 20.0 /* [20] Extra smoothing factor for XYZ profiles */ /* !!! Note this is mainly due to smoothing being */ /* scaled by data range in rspl code !!! */ -#define SHP_SMOOTH 1.0 /* Input shaper curve smoothing */ -#define OUT_SMOOTH1 1.0 /* Output shaper curve smoothing for L*, X,Y,Z */ -#define OUT_SMOOTH2 1.0 /* Output shaper curve smoothing for a*, b* */ + /* - have fix but all rspl use then needs re-tuning! */ +#define SHP_SMOOTH 1.0 /* [1.0] Input shaper curve smoothing */ +#define OUT_SMOOTH1 1.0 /* [1.0] Output shaper curve smoothing for L*, X,Y,Z */ +#define OUT_SMOOTH2 1.0 /* [1.0] Output shaper curve smoothing for a*, b* */ #define CAMCLIPTRANS 1.0 /* [1.0] Cam clipping transition region Delta E */ /* Should this be smaller ? */ @@ -2190,7 +2191,7 @@ icxLuLut *p /* Object being initialised */ p->clip.LabLike = 0; p->clip.fdi = p->clutTable->fdi; - switch(clutos) { + switch((int)clutos) { case icxSigJabData: case icSigLabData: { @@ -2343,7 +2344,8 @@ fprintf(stderr,"~1 Internal optimised 4D separations not yet implemented!\n"); xicc_enum_viewcond(xicp, &p->vc, -1, NULL, 0, NULL); /* Use a default */ p->cam = new_icxcam(cam_default); p->cam->set_view(p->cam, p->vc.Ev, p->vc.Wxyz, p->vc.La, p->vc.Yb, p->vc.Lv, - p->vc.Yf, p->vc.Yg, p->vc.Gxyz, XICC_USE_HK, p->vc.hkscale); + p->vc.Yf, p->vc.Yg, p->vc.Gxyz, XICC_USE_HK, p->vc.hkscale, + p->vc.mtaf, p->vc.Wxyz2); } else { p->cam = NULL; } @@ -2449,6 +2451,8 @@ fprintf(stderr,"~1 Internal optimised 4D separations not yet implemented!\n"); gres[i] = p->lut->clutPoints; #ifdef FASTREVSETUP_NON_CAM + # pragma message("!!!!!!!!!!!! FASTREVSETUP_NON_CAM is on !!!!!!!!!") + /* Don't fill in nnrev array if we aren't going to use it */ if (p->camclip && p->nearclip) xflags = RSPL_FASTREVSETUP; @@ -2486,6 +2490,8 @@ fprintf(stderr,"~1 Internal optimised 4D separations not yet implemented!\n"); /* Set the Nearest Neighbor clipping Weighting */ p->clutTable->rev_set_lchw(p->clutTable, lchw); } +#else +# pragma message("!!!!!!!!!!!! USELCHWEIGHT is off !!!!!!!!!") #endif /* USELCHWEIGHT */ /* clut clipping is setup separately */ @@ -3117,7 +3123,7 @@ int quality /* Quality metric, 0..3 */ for (e = 0; e < p->inputChan; e++) dgwhite[e] = dwhite[e]; - /* If this is actuall an input device, lookup wp & bp */ + /* If this is actualy an input device, lookup wp & bp */ /* and override dwhite & dblack */ if (h->deviceClass == icSigInputClass) { double wpy = -1e60, bpy = 1e60; @@ -3371,12 +3377,16 @@ int quality /* Quality metric, 0..3 */ if (flags & ICX_SET_WHITE) { - xfflags |= XFIT_OUT_WP_REL; - if ((flags & ICX_SET_WHITE_C) == ICX_SET_WHITE_C) { - xfflags |= XFIT_OUT_WP_REL_C; + if ((flags & ICX_SET_WHITE_ABS) != ICX_SET_WHITE_ABS) { + + xfflags |= XFIT_OUT_WP_REL; + + if ((flags & ICX_SET_WHITE_C) == ICX_SET_WHITE_C) + xfflags |= XFIT_OUT_WP_REL_C; + + else if ((flags & ICX_SET_WHITE_US) == ICX_SET_WHITE_US) + xfflags |= XFIT_OUT_WP_REL_US; } - else if ((flags & ICX_SET_WHITE_US) == ICX_SET_WHITE_US) - xfflags |= XFIT_OUT_WP_REL_US; if (p->pcs != icSigXYZData) xfflags |= XFIT_OUT_LAB; @@ -3956,7 +3966,8 @@ int quality /* Quality metric, 0..3 */ xicc_enum_viewcond(xicp, &p->vc, -1, NULL, 0, NULL); /* Use a default */ p->cam = new_icxcam(cam_default); p->cam->set_view(p->cam, p->vc.Ev, p->vc.Wxyz, p->vc.La, p->vc.Yb, p->vc.Lv, - p->vc.Yf, p->vc.Yg, p->vc.Gxyz, XICC_USE_HK, p->vc.hkscale); + p->vc.Yf, p->vc.Yg, p->vc.Gxyz, XICC_USE_HK, p->vc.hkscale, + p->vc.mtaf, p->vc.Wxyz2); if (flags & ICX_VERBOSE) printf("Done A to B table creation\n"); @@ -4257,7 +4268,7 @@ double detail /* gamut detail level, 0.0 = def */ /* Get an appropriate device to PCS conversion for the fwd conversion */ /* we use after bwd conversion in lutbwdgam_func() */ - switch (intent) { + switch ((int)intent) { /* If it is relative */ case icmDefaultIntent: /* Shouldn't happen */ case icPerceptual: 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 c18ef1c..a7d1a62 100644..100755 --- a/xicc/xmatrix.c +++ b/xicc/xmatrix.c @@ -317,7 +317,8 @@ int dir /* 0 = fwd, 1 = bwd */ xicc_enum_viewcond(xicp, &p->vc, -1, NULL, 0, NULL); /* Use a default */ p->cam = new_icxcam(cam_default); p->cam->set_view(p->cam, p->vc.Ev, p->vc.Wxyz, p->vc.La, p->vc.Yb, p->vc.Lv, - p->vc.Yf, p->vc.Yg, p->vc.Gxyz, XICC_USE_HK, p->vc.hkscale); + p->vc.Yf, p->vc.Yg, p->vc.Gxyz, XICC_USE_HK, p->vc.hkscale, + p->vc.mtaf, p->vc.Wxyz2); } else { p->cam = NULL; } @@ -1339,7 +1340,7 @@ double smooth /* Curve smoothing, nominally 1.0 */ /* ------------------------------- */ /* Choose a white and black point */ - if (flags & (ICX_SET_WHITE | ICX_SET_BLACK)) { + if (flags & (ICX_SET_WHITE | ICX_SET_BLACK)) { if (flags & ICX_VERBOSE) printf("Find white & black points\n"); @@ -1518,6 +1519,14 @@ double smooth /* Curve smoothing, nominally 1.0 */ } else { icmSetUnity3x3(fromAbs); icmSetUnity3x3(toAbs); + icmCpy3(wp, icmD50_ary3); + } + + /* Force do nothing/Absolute white point */ + if ((flags & ICX_SET_WHITE_ABS) == ICX_SET_WHITE_ABS) { + icmSetUnity3x3(fromAbs); + icmSetUnity3x3(toAbs); + icmCpy3(wp, icmD50_ary3); } /* Create copy of input points with output converted to white relative */ @@ -1599,7 +1608,8 @@ printf(" set black %d w = %f\n", nodp,rpoints[nodp].w); /* but we need to adjust the device to relative conversion */ /* to make device white map exactly to D50, without touching */ /* the overall absolute behaviour. */ - if (p->flags & ICX_SET_WHITE) { + if ((p->flags & ICX_SET_WHITE) != 0 + && (p->flags & ICX_SET_WHITE_ABS) != ICX_SET_WHITE_ABS) { double aw[3]; /* aprox rel. white */ icmXYZNumber _wp; /* Uncorrected dw maps to _wp */ double cmat[3][3]; /* Model correction matrix */ diff --git a/xicc/xmono.c b/xicc/xmono.c index d1f091b..fbd2f0e 100644..100755 --- a/xicc/xmono.c +++ b/xicc/xmono.c @@ -264,7 +264,7 @@ int dir /* 0 = fwd, 1 = bwd */ p->vc = *vc; /* Copy the structure */ p->cam = new_icxcam(cam_default); p->cam->set_view(p->cam, vc->Ev, vc->Wxyz, vc->La, vc->Yb, vc->Lv, vc->Yf, vc->Yg, vc->Gxyz, - XICC_USE_HK, vc->hkscale); + XICC_USE_HK, vc->hkscale, vc->mtaf, vc->Wxyz2); } else p->cam = NULL; diff --git a/xicc/xspect.c b/xicc/xspect.c index 9df298e..b77f322 100644..100755 --- a/xicc/xspect.c +++ b/xicc/xspect.c @@ -23,12 +23,6 @@ /* * TTBD: * - * Should add some more modern standard CMFs - see <http://www.cvrl.org/> - * - * [Does this make any sense though ? That is what's happening - * for a standard A illuminant instrument emitting D50 XYZ values, - * but doesn't represent actually viewing under a (say) M2 illuminant. - * But is M0 actual A illuminant, or notional D50 measured by an A illuminant ?] */ #include <stdlib.h> @@ -1372,6 +1366,588 @@ static xspect ob_CIE_1964_10[3] = { } }; +/* CIE (2012) 2-deg XYZ, TC 1-36 proposed 2-deg XYZ */ +/* CMFs transformed from the CIE (2006) 2-deg LMS cone fundamentals */ +/* <http://www.cvrl.org/ciexyzpr.htm> */ +/* <http://www.cvrl.org/database/text/cienewxyz/cie2012xyz2.htm> */ +static xspect ob_CIE_2012_2[3] = { + { + 441, 390.0, 830.0, /* 471 bands from 360 to 830 nm in 1nm steps */ + 1.0, /* Scale factor */ + { + 3.769647E-03, 4.532416E-03, 5.446553E-03, 6.538868E-03, 7.839699E-03, + 9.382967E-03, 1.120608E-02, 1.334965E-02, 1.585690E-02, 1.877286E-02, + 2.214302E-02, 2.601285E-02, 3.043036E-02, 3.544325E-02, 4.109640E-02, + 4.742986E-02, 5.447394E-02, 6.223612E-02, 7.070048E-02, 7.982513E-02, + 8.953803E-02, 9.974848E-02, 1.104019E-01, 1.214566E-01, 1.328741E-01, + 1.446214E-01, 1.566468E-01, 1.687901E-01, 1.808328E-01, 1.925216E-01, + 2.035729E-01, 2.137531E-01, 2.231348E-01, 2.319245E-01, 2.403892E-01, + 2.488523E-01, 2.575896E-01, 2.664991E-01, 2.753532E-01, 2.838921E-01, + 2.918246E-01, 2.989200E-01, 3.052993E-01, 3.112031E-01, 3.169047E-01, + 3.227087E-01, 3.288194E-01, 3.349242E-01, 3.405452E-01, 3.451688E-01, + 3.482554E-01, 3.494153E-01, 3.489075E-01, 3.471746E-01, 3.446705E-01, + 3.418483E-01, 3.390240E-01, 3.359926E-01, 3.324276E-01, 3.280157E-01, + 3.224637E-01, 3.156225E-01, 3.078201E-01, 2.994771E-01, 2.909776E-01, + 2.826646E-01, 2.747962E-01, 2.674312E-01, 2.605847E-01, 2.542749E-01, + 2.485254E-01, 2.433039E-01, 2.383414E-01, 2.333253E-01, 2.279619E-01, + 2.219781E-01, 2.151735E-01, 2.075619E-01, 1.992183E-01, 1.902290E-01, + 1.806905E-01, 1.707154E-01, 1.604471E-01, 1.500244E-01, 1.395705E-01, + 1.291920E-01, 1.189859E-01, 1.090615E-01, 9.951424E-02, 9.041850E-02, + 8.182895E-02, 7.376817E-02, 6.619477E-02, 5.906380E-02, 5.234242E-02, + 4.600865E-02, 4.006154E-02, 3.454373E-02, 2.949091E-02, 2.492140E-02, + 2.083981E-02, 1.723591E-02, 1.407924E-02, 1.134516E-02, 9.019658E-03, + 7.097731E-03, 5.571145E-03, 4.394566E-03, 3.516303E-03, 2.887638E-03, + 2.461588E-03, 2.206348E-03, 2.149559E-03, 2.337091E-03, 2.818931E-03, + 3.649178E-03, 4.891359E-03, 6.629364E-03, 8.942902E-03, 1.190224E-02, + 1.556989E-02, 1.997668E-02, 2.504698E-02, 3.067530E-02, 3.674999E-02, + 4.315171E-02, 4.978584E-02, 5.668554E-02, 6.391651E-02, 7.154352E-02, + 7.962917E-02, 8.821473E-02, 9.726978E-02, 1.067504E-01, 1.166192E-01, + 1.268468E-01, 1.374060E-01, 1.482471E-01, 1.593076E-01, 1.705181E-01, + 1.818026E-01, 1.931090E-01, 2.045085E-01, 2.161166E-01, 2.280650E-01, + 2.405015E-01, 2.535441E-01, 2.671300E-01, 2.811351E-01, 2.954164E-01, + 3.098117E-01, 3.241678E-01, 3.384319E-01, 3.525786E-01, 3.665839E-01, + 3.804244E-01, 3.940988E-01, 4.076972E-01, 4.213484E-01, 4.352003E-01, + 4.494206E-01, 4.641616E-01, 4.794395E-01, 4.952180E-01, 5.114395E-01, + 5.280233E-01, 5.448696E-01, 5.618898E-01, 5.790137E-01, 5.961882E-01, + 6.133784E-01, 6.305897E-01, 6.479223E-01, 6.654866E-01, 6.833782E-01, + 7.016774E-01, 7.204110E-01, 7.394495E-01, 7.586285E-01, 7.777885E-01, + 7.967750E-01, 8.154530E-01, 8.337389E-01, 8.515493E-01, 8.687862E-01, + 8.853376E-01, 9.011588E-01, 9.165278E-01, 9.318245E-01, 9.474524E-01, + 9.638388E-01, 9.812596E-01, 9.992953E-01, 1.017343E+00, 1.034790E+00, + 1.051011E+00, 1.065522E+00, 1.078421E+00, 1.089944E+00, 1.100320E+00, + 1.109767E+00, 1.118438E+00, 1.126266E+00, 1.133138E+00, 1.138952E+00, + 1.143620E+00, 1.147095E+00, 1.149464E+00, 1.150838E+00, 1.151326E+00, + 1.151033E+00, 1.150002E+00, 1.148061E+00, 1.144998E+00, 1.140622E+00, + 1.134757E+00, 1.127298E+00, 1.118342E+00, 1.108033E+00, 1.096515E+00, + 1.083928E+00, 1.070387E+00, 1.055934E+00, 1.040592E+00, 1.024385E+00, + 1.007344E+00, 9.895268E-01, 9.711213E-01, 9.523257E-01, 9.333248E-01, + 9.142877E-01, 8.952798E-01, 8.760157E-01, 8.561607E-01, 8.354235E-01, + 8.135565E-01, 7.904565E-01, 7.664364E-01, 7.418777E-01, 7.171219E-01, + 6.924717E-01, 6.681600E-01, 6.442697E-01, 6.208450E-01, 5.979243E-01, + 5.755410E-01, 5.537296E-01, 5.325412E-01, 5.120218E-01, 4.922070E-01, + 4.731224E-01, 4.547417E-01, 4.368719E-01, 4.193121E-01, 4.018980E-01, + 3.844986E-01, 3.670592E-01, 3.497167E-01, 3.326305E-01, 3.159341E-01, + 2.997374E-01, 2.841189E-01, 2.691053E-01, 2.547077E-01, 2.409319E-01, + 2.277792E-01, 2.152431E-01, 2.033010E-01, 1.919276E-01, 1.810987E-01, + 1.707914E-01, 1.609842E-01, 1.516577E-01, 1.427936E-01, 1.343737E-01, + 1.263808E-01, 1.187979E-01, 1.116088E-01, 1.047975E-01, 9.834835E-02, + 9.224597E-02, 8.647506E-02, 8.101986E-02, 7.586514E-02, 7.099633E-02, + 6.639960E-02, 6.206225E-02, 5.797409E-02, 5.412533E-02, 5.050600E-02, + 4.710606E-02, 4.391411E-02, 4.091411E-02, 3.809067E-02, 3.543034E-02, + 3.292138E-02, 3.055672E-02, 2.834146E-02, 2.628033E-02, 2.437465E-02, + 2.262306E-02, 2.101935E-02, 1.954647E-02, 1.818727E-02, 1.692727E-02, + 1.575417E-02, 1.465854E-02, 1.363571E-02, 1.268205E-02, 1.179394E-02, + 1.096778E-02, 1.019964E-02, 9.484317E-03, 8.816851E-03, 8.192921E-03, + 7.608750E-03, 7.061391E-03, 6.549509E-03, 6.071970E-03, 5.627476E-03, + 5.214608E-03, 4.831848E-03, 4.477579E-03, 4.150166E-03, 3.847988E-03, + 3.569452E-03, 3.312857E-03, 3.076022E-03, 2.856894E-03, 2.653681E-03, + 2.464821E-03, 2.289060E-03, 2.125694E-03, 1.974121E-03, 1.833723E-03, + 1.703876E-03, 1.583904E-03, 1.472939E-03, 1.370151E-03, 1.274803E-03, + 1.186238E-03, 1.103871E-03, 1.027194E-03, 9.557493E-04, 8.891262E-04, + 8.269535E-04, 7.689351E-04, 7.149425E-04, 6.648590E-04, 6.185421E-04, + 5.758303E-04, 5.365046E-04, 5.001842E-04, 4.665005E-04, 4.351386E-04, + 4.058303E-04, 3.783733E-04, 3.526892E-04, 3.287199E-04, 3.063998E-04, + 2.856577E-04, 2.664108E-04, 2.485462E-04, 2.319529E-04, 2.165300E-04, + 2.021853E-04, 1.888338E-04, 1.763935E-04, 1.647895E-04, 1.539542E-04, + 1.438270E-04, 1.343572E-04, 1.255141E-04, 1.172706E-04, 1.095983E-04, + 1.024685E-04, 9.584715E-05, 8.968316E-05, 8.392734E-05, 7.853708E-05, + 7.347551E-05, 6.871576E-05, 6.425257E-05, 6.008292E-05, 5.620098E-05, + 5.259870E-05, 4.926279E-05, 4.616623E-05, 4.328212E-05, 4.058715E-05, + 3.806114E-05, 3.568818E-05, 3.346023E-05, 3.137090E-05, 2.941371E-05, + 2.758222E-05, 2.586951E-05, 2.426701E-05, 2.276639E-05, 2.136009E-05, + 2.004122E-05, 1.880380E-05, 1.764358E-05, 1.655671E-05, 1.553939E-05, + 1.458792E-05, 1.369853E-05, 1.286705E-05, 1.208947E-05, 1.136207E-05, + 1.068141E-05, 1.004411E-05, 9.446399E-06, 8.884754E-06, 8.356050E-06, + 7.857521E-06, 7.386996E-06, 6.943576E-06, 6.526548E-06, 6.135087E-06, + 5.768284E-06, 5.425069E-06, 5.103974E-06, 4.803525E-06, 4.522350E-06, + 4.259166E-06, 4.012715E-06, 3.781597E-06, 3.564496E-06, 3.360236E-06, + 3.167765E-06, 2.986206E-06, 2.814999E-06, 2.653663E-06, 2.501725E-06, + 2.358723E-06, 2.224206E-06, 2.097737E-06, 1.978894E-06, 1.867268E-06, + 1.762465E-06 + } + }, + { + 441, 390.0, 830.0, /* 471 bands from 360 to 830 nm in 1nm steps */ + 1.0, /* Scale factor */ + { + 4.146161E-04, 5.028333E-04, 6.084991E-04, 7.344436E-04, 8.837389E-04, + 1.059646E-03, 1.265532E-03, 1.504753E-03, 1.780493E-03, 2.095572E-03, + 2.452194E-03, 2.852216E-03, 3.299115E-03, 3.797466E-03, 4.352768E-03, + 4.971717E-03, 5.661014E-03, 6.421615E-03, 7.250312E-03, 8.140173E-03, + 9.079860E-03, 1.005608E-02, 1.106456E-02, 1.210522E-02, 1.318014E-02, + 1.429377E-02, 1.545004E-02, 1.664093E-02, 1.785302E-02, 1.907018E-02, + 2.027369E-02, 2.144805E-02, 2.260041E-02, 2.374789E-02, 2.491247E-02, + 2.612106E-02, 2.739923E-02, 2.874993E-02, 3.016909E-02, 3.165145E-02, + 3.319038E-02, 3.477912E-02, 3.641495E-02, 3.809569E-02, 3.981843E-02, + 4.157940E-02, 4.337098E-02, 4.517180E-02, 4.695420E-02, 4.868718E-02, + 5.033657E-02, 5.187611E-02, 5.332218E-02, 5.470603E-02, 5.606335E-02, + 5.743393E-02, 5.885107E-02, 6.030809E-02, 6.178644E-02, 6.326570E-02, + 6.472352E-02, 6.614749E-02, 6.757256E-02, 6.904928E-02, 7.063280E-02, + 7.238339E-02, 7.435960E-02, 7.659383E-02, 7.911436E-02, 8.195345E-02, + 8.514816E-02, 8.872657E-02, 9.266008E-02, 9.689723E-02, 1.013746E-01, + 1.060145E-01, 1.107377E-01, 1.155111E-01, 1.203122E-01, 1.251161E-01, + 1.298957E-01, 1.346299E-01, 1.393309E-01, 1.440235E-01, 1.487372E-01, + 1.535066E-01, 1.583644E-01, 1.633199E-01, 1.683761E-01, 1.735365E-01, + 1.788048E-01, 1.841819E-01, 1.896559E-01, 1.952101E-01, 2.008259E-01, + 2.064828E-01, 2.121826E-01, 2.180279E-01, 2.241586E-01, 2.307302E-01, + 2.379160E-01, 2.458706E-01, 2.546023E-01, 2.640760E-01, 2.742490E-01, + 2.850680E-01, 2.964837E-01, 3.085010E-01, 3.211393E-01, 3.344175E-01, + 3.483536E-01, 3.629601E-01, 3.782275E-01, 3.941359E-01, 4.106582E-01, + 4.277595E-01, 4.453993E-01, 4.635396E-01, 4.821376E-01, 5.011430E-01, + 5.204972E-01, 5.401387E-01, 5.600208E-01, 5.800972E-01, 6.003172E-01, + 6.206256E-01, 6.409398E-01, 6.610772E-01, 6.808134E-01, 6.999044E-01, + 7.180890E-01, 7.351593E-01, 7.511821E-01, 7.663143E-01, 7.807352E-01, + 7.946448E-01, 8.082074E-01, 8.213817E-01, 8.340701E-01, 8.461711E-01, + 8.575799E-01, 8.682408E-01, 8.783061E-01, 8.879907E-01, 8.975211E-01, + 9.071347E-01, 9.169947E-01, 9.269295E-01, 9.366731E-01, 9.459482E-01, + 9.544675E-01, 9.619834E-01, 9.684390E-01, 9.738289E-01, 9.781519E-01, + 9.814106E-01, 9.836669E-01, 9.852081E-01, 9.863813E-01, 9.875357E-01, + 9.890228E-01, 9.910811E-01, 9.934913E-01, 9.959172E-01, 9.980205E-01, + 9.994608E-01, 9.999930E-01, 9.997557E-01, 9.989839E-01, 9.979123E-01, + 9.967737E-01, 9.957356E-01, 9.947115E-01, 9.935534E-01, 9.921156E-01, + 9.902549E-01, 9.878596E-01, 9.849324E-01, 9.815036E-01, 9.776035E-01, + 9.732611E-01, 9.684764E-01, 9.631369E-01, 9.571062E-01, 9.502540E-01, + 9.424569E-01, 9.336897E-01, 9.242893E-01, 9.146707E-01, 9.052333E-01, + 8.963613E-01, 8.883069E-01, 8.808462E-01, 8.736445E-01, 8.663755E-01, + 8.587203E-01, 8.504295E-01, 8.415047E-01, 8.320109E-01, 8.220154E-01, + 8.115868E-01, 8.007874E-01, 7.896515E-01, 7.782053E-01, 7.664733E-01, + 7.544785E-01, 7.422473E-01, 7.298229E-01, 7.172525E-01, 7.045818E-01, + 6.918553E-01, 6.791009E-01, 6.662846E-01, 6.533595E-01, 6.402807E-01, + 6.270066E-01, 6.135148E-01, 5.998494E-01, 5.860682E-01, 5.722261E-01, + 5.583746E-01, 5.445535E-01, 5.307673E-01, 5.170130E-01, 5.032889E-01, + 4.895950E-01, 4.759442E-01, 4.623958E-01, 4.490154E-01, 4.358622E-01, + 4.229897E-01, 4.104152E-01, 3.980356E-01, 3.857300E-01, 3.733907E-01, + 3.609245E-01, 3.482860E-01, 3.355702E-01, 3.228963E-01, 3.103704E-01, + 2.980865E-01, 2.861160E-01, 2.744822E-01, 2.631953E-01, 2.522628E-01, + 2.416902E-01, 2.314809E-01, 2.216378E-01, 2.121622E-01, 2.030542E-01, + 1.943124E-01, 1.859227E-01, 1.778274E-01, 1.699654E-01, 1.622841E-01, + 1.547397E-01, 1.473081E-01, 1.400169E-01, 1.329013E-01, 1.259913E-01, + 1.193120E-01, 1.128820E-01, 1.067113E-01, 1.008052E-01, 9.516653E-02, + 8.979594E-02, 8.469044E-02, 7.984009E-02, 7.523372E-02, 7.086061E-02, + 6.671045E-02, 6.277360E-02, 5.904179E-02, 5.550703E-02, 5.216139E-02, + 4.899699E-02, 4.600578E-02, 4.317885E-02, 4.050755E-02, 3.798376E-02, + 3.559982E-02, 3.334856E-02, 3.122332E-02, 2.921780E-02, 2.732601E-02, + 2.554223E-02, 2.386121E-02, 2.227859E-02, 2.079020E-02, 1.939185E-02, + 1.807939E-02, 1.684817E-02, 1.569188E-02, 1.460446E-02, 1.358062E-02, + 1.261573E-02, 1.170696E-02, 1.085608E-02, 1.006476E-02, 9.333376E-03, + 8.661284E-03, 8.046048E-03, 7.481130E-03, 6.959987E-03, 6.477070E-03, + 6.027677E-03, 5.608169E-03, 5.216691E-03, 4.851785E-03, 4.512008E-03, + 4.195941E-03, 3.902057E-03, 3.628371E-03, 3.373005E-03, 3.134315E-03, + 2.910864E-03, 2.701528E-03, 2.505796E-03, 2.323231E-03, 2.153333E-03, + 1.995557E-03, 1.849316E-03, 1.713976E-03, 1.588899E-03, 1.473453E-03, + 1.367022E-03, 1.268954E-03, 1.178421E-03, 1.094644E-03, 1.016943E-03, + 9.447269E-04, 8.775171E-04, 8.150438E-04, 7.570755E-04, 7.033755E-04, + 6.537050E-04, 6.078048E-04, 5.653435E-04, 5.260046E-04, 4.895061E-04, + 4.555970E-04, 4.240548E-04, 3.946860E-04, 3.673178E-04, 3.417941E-04, + 3.179738E-04, 2.957441E-04, 2.750558E-04, 2.558640E-04, 2.381142E-04, + 2.217445E-04, 2.066711E-04, 1.927474E-04, 1.798315E-04, 1.678023E-04, + 1.565566E-04, 1.460168E-04, 1.361535E-04, 1.269451E-04, 1.183671E-04, + 1.103928E-04, 1.029908E-04, 9.611836E-05, 8.973323E-05, 8.379694E-05, + 7.827442E-05, 7.313312E-05, 6.834142E-05, 6.387035E-05, 5.969389E-05, + 5.578862E-05, 5.213509E-05, 4.872179E-05, 4.553845E-05, 4.257443E-05, + 3.981884E-05, 3.725877E-05, 3.487467E-05, 3.264765E-05, 3.056140E-05, + 2.860175E-05, 2.675841E-05, 2.502943E-05, 2.341373E-05, 2.190914E-05, + 2.051259E-05, 1.921902E-05, 1.801796E-05, 1.689899E-05, 1.585309E-05, + 1.487243E-05, 1.395085E-05, 1.308528E-05, 1.227327E-05, 1.151233E-05, + 1.080001E-05, 1.013364E-05, 9.509919E-06, 8.925630E-06, 8.377852E-06, + 7.863920E-06, 7.381539E-06, 6.929096E-06, 6.505136E-06, 6.108221E-06, + 5.736935E-06, 5.389831E-06, 5.065269E-06, 4.761667E-06, 4.477561E-06, + 4.211597E-06, 3.962457E-06, 3.728674E-06, 3.508881E-06, 3.301868E-06, + 3.106561E-06, 2.922119E-06, 2.748208E-06, 2.584560E-06, 2.430867E-06, + 2.286786E-06, 2.151905E-06, 2.025656E-06, 1.907464E-06, 1.796794E-06, + 1.693147E-06, 1.596032E-06, 1.504903E-06, 1.419245E-06, 1.338600E-06, + 1.262556E-06, 1.190771E-06, 1.123031E-06, 1.059151E-06, 9.989507E-07, + 9.422514E-07, 8.888804E-07, 8.386690E-07, 7.914539E-07, 7.470770E-07, + 7.053860E-07 + } + }, + { + 441, 390.0, 830.0, /* 471 bands from 360 to 830 nm in 1nm steps */ + 1.0, /* Scale factor */ + { + 1.847260E-02, 2.221101E-02, 2.669819E-02, 3.206937E-02, 3.847832E-02, + 4.609784E-02, 5.511953E-02, 6.575257E-02, 7.822113E-02, 9.276013E-02, + 1.096090E-01, 1.290077E-01, 1.512047E-01, 1.764441E-01, 2.049517E-01, + 2.369246E-01, 2.725123E-01, 3.117820E-01, 3.547064E-01, 4.011473E-01, + 4.508369E-01, 5.034164E-01, 5.586361E-01, 6.162734E-01, 6.760982E-01, + 7.378822E-01, 8.013019E-01, 8.655573E-01, 9.295791E-01, 9.921293E-01, + 1.051821E+00, 1.107509E+00, 1.159527E+00, 1.208869E+00, 1.256834E+00, + 1.305008E+00, 1.354758E+00, 1.405594E+00, 1.456414E+00, 1.505960E+00, + 1.552826E+00, 1.595902E+00, 1.635768E+00, 1.673573E+00, 1.710604E+00, + 1.748280E+00, 1.787504E+00, 1.826609E+00, 1.863108E+00, 1.894332E+00, + 1.917479E+00, 1.930529E+00, 1.934819E+00, 1.932650E+00, 1.926395E+00, + 1.918437E+00, 1.910430E+00, 1.901224E+00, 1.889000E+00, 1.871996E+00, + 1.848545E+00, 1.817792E+00, 1.781627E+00, 1.742514E+00, 1.702749E+00, + 1.664439E+00, 1.629207E+00, 1.597360E+00, 1.568896E+00, 1.543823E+00, + 1.522157E+00, 1.503611E+00, 1.486673E+00, 1.469595E+00, 1.450709E+00, + 1.428440E+00, 1.401587E+00, 1.370094E+00, 1.334220E+00, 1.294275E+00, + 1.250610E+00, 1.203696E+00, 1.154316E+00, 1.103284E+00, 1.051347E+00, + 9.991789E-01, 9.473958E-01, 8.966222E-01, 8.473981E-01, 8.001576E-01, + 7.552379E-01, 7.127879E-01, 6.725198E-01, 6.340976E-01, 5.972433E-01, + 5.617313E-01, 5.274921E-01, 4.948809E-01, 4.642586E-01, 4.358841E-01, + 4.099313E-01, 3.864261E-01, 3.650566E-01, 3.454812E-01, 3.274095E-01, + 3.105939E-01, 2.948102E-01, 2.798194E-01, 2.654100E-01, 2.514084E-01, + 2.376753E-01, 2.241211E-01, 2.107484E-01, 1.975839E-01, 1.846574E-01, + 1.720018E-01, 1.596918E-01, 1.479415E-01, 1.369428E-01, 1.268279E-01, + 1.176796E-01, 1.094970E-01, 1.020943E-01, 9.527993E-02, 8.890075E-02, + 8.283548E-02, 7.700982E-02, 7.144001E-02, 6.615436E-02, 6.117199E-02, + 5.650407E-02, 5.215121E-02, 4.809566E-02, 4.431720E-02, 4.079734E-02, + 3.751912E-02, 3.446846E-02, 3.163764E-02, 2.901901E-02, 2.660364E-02, + 2.438164E-02, 2.234097E-02, 2.046415E-02, 1.873456E-02, 1.713788E-02, + 1.566174E-02, 1.429644E-02, 1.303702E-02, 1.187897E-02, 1.081725E-02, + 9.846470E-03, 8.960687E-03, 8.152811E-03, 7.416025E-03, 6.744115E-03, + 6.131421E-03, 5.572778E-03, 5.063463E-03, 4.599169E-03, 4.175971E-03, + 3.790291E-03, 3.438952E-03, 3.119341E-03, 2.829038E-03, 2.565722E-03, + 2.327186E-03, 2.111280E-03, 1.915766E-03, 1.738589E-03, 1.577920E-03, + 1.432128E-03, 1.299781E-03, 1.179667E-03, 1.070694E-03, 9.718623E-04, + 8.822531E-04, 8.010231E-04, 7.273884E-04, 6.606347E-04, 6.001146E-04, + 5.452416E-04, 4.954847E-04, 4.503642E-04, 4.094455E-04, 3.723345E-04, + 3.386739E-04, 3.081396E-04, 2.804370E-04, 2.552996E-04, 2.324859E-04, + 2.117772E-04, 1.929758E-04, 1.759024E-04, 1.603947E-04, 1.463059E-04, + 1.335031E-04, 1.218660E-04, 1.112857E-04, 1.016634E-04, 9.291003E-05, + 8.494468E-05, 7.769425E-05, 7.109247E-05, 6.507936E-05, 5.960061E-05, + 5.460706E-05, 5.005417E-05, 4.590157E-05, 4.211268E-05, 3.865437E-05, + 3.549661E-05, 3.261220E-05, 2.997643E-05, 2.756693E-05, 2.536339E-05, + 2.334738E-05, 2.150221E-05, 1.981268E-05, 1.826500E-05, 1.684667E-05, + 1.554631E-05, 1.435360E-05, 1.325915E-05, 1.225443E-05, 1.133169E-05, + 1.048387E-05, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00 + } + } +}; + +/* CIE (2012) 10-deg XYZ, TC 1-36 proposed 10-deg XYZ */ +/* CMFs transformed from the CIE (2006) 2-deg LMS cone fundamentals */ +static xspect ob_CIE_2012_10[3] = { + { + 441, 390.0, 830.0, /* 471 bands from 360 to 830 nm in 1nm steps */ + 1.0, /* Scale factor */ + { + 2.952420E-03, 3.577275E-03, 4.332146E-03, 5.241609E-03, 6.333902E-03, + 7.641137E-03, 9.199401E-03, 1.104869E-02, 1.323262E-02, 1.579791E-02, + 1.879338E-02, 2.226949E-02, 2.627978E-02, 3.087862E-02, 3.611890E-02, + 4.204986E-02, 4.871256E-02, 5.612868E-02, 6.429866E-02, 7.319818E-02, + 8.277331E-02, 9.295327E-02, 1.037137E-01, 1.150520E-01, 1.269771E-01, + 1.395127E-01, 1.526661E-01, 1.663054E-01, 1.802197E-01, 1.941448E-01, + 2.077647E-01, 2.207911E-01, 2.332355E-01, 2.452462E-01, 2.570397E-01, + 2.688989E-01, 2.810677E-01, 2.933967E-01, 3.055933E-01, 3.173165E-01, + 3.281798E-01, 3.378678E-01, 3.465097E-01, 3.543953E-01, 3.618655E-01, + 3.693084E-01, 3.770107E-01, 3.846850E-01, 3.918591E-01, 3.980192E-01, + 4.026189E-01, 4.052637E-01, 4.062482E-01, 4.060660E-01, 4.052283E-01, + 4.042529E-01, 4.034808E-01, 4.025362E-01, 4.008675E-01, 3.979327E-01, + 3.932139E-01, 3.864108E-01, 3.779513E-01, 3.684176E-01, 3.583473E-01, + 3.482214E-01, 3.383830E-01, 3.288309E-01, 3.194977E-01, 3.103345E-01, + 3.013112E-01, 2.923754E-01, 2.833273E-01, 2.739463E-01, 2.640352E-01, + 2.534221E-01, 2.420135E-01, 2.299346E-01, 2.173617E-01, 2.044672E-01, + 1.914176E-01, 1.783672E-01, 1.654407E-01, 1.527391E-01, 1.403439E-01, + 1.283167E-01, 1.167124E-01, 1.056121E-01, 9.508569E-02, 8.518206E-02, + 7.593120E-02, 6.733159E-02, 5.932018E-02, 5.184106E-02, 4.486119E-02, + 3.836770E-02, 3.237296E-02, 2.692095E-02, 2.204070E-02, 1.773951E-02, + 1.400745E-02, 1.082291E-02, 8.168996E-03, 6.044623E-03, 4.462638E-03, + 3.446810E-03, 3.009513E-03, 3.090744E-03, 3.611221E-03, 4.491435E-03, + 5.652072E-03, 7.035322E-03, 8.669631E-03, 1.060755E-02, 1.290468E-02, + 1.561956E-02, 1.881640E-02, 2.256923E-02, 2.694456E-02, 3.199910E-02, + 3.778185E-02, 4.430635E-02, 5.146516E-02, 5.912224E-02, 6.714220E-02, + 7.538941E-02, 8.376697E-02, 9.233581E-02, 1.011940E-01, 1.104362E-01, + 1.201511E-01, 1.303960E-01, 1.411310E-01, 1.522944E-01, 1.638288E-01, + 1.756832E-01, 1.878114E-01, 2.001621E-01, 2.126822E-01, 2.253199E-01, + 2.380254E-01, 2.507787E-01, 2.636778E-01, 2.768607E-01, 2.904792E-01, + 3.046991E-01, 3.196485E-01, 3.352447E-01, 3.513290E-01, 3.677148E-01, + 3.841856E-01, 4.005312E-01, 4.166669E-01, 4.325420E-01, 4.481063E-01, + 4.633109E-01, 4.781440E-01, 4.927483E-01, 5.073315E-01, 5.221315E-01, + 5.374170E-01, 5.534217E-01, 5.701242E-01, 5.874093E-01, 6.051269E-01, + 6.230892E-01, 6.410999E-01, 6.590659E-01, 6.769436E-01, 6.947143E-01, + 7.123849E-01, 7.299978E-01, 7.476478E-01, 7.654250E-01, 7.834009E-01, + 8.016277E-01, 8.201041E-01, 8.386843E-01, 8.571936E-01, 8.754652E-01, + 8.933408E-01, 9.106772E-01, 9.273554E-01, 9.432502E-01, 9.582244E-01, + 9.721304E-01, 9.849237E-01, 9.970067E-01, 1.008907E+00, 1.021163E+00, + 1.034327E+00, 1.048753E+00, 1.063937E+00, 1.079166E+00, 1.093723E+00, + 1.106886E+00, 1.118106E+00, 1.127493E+00, 1.135317E+00, 1.141838E+00, + 1.147304E+00, 1.151897E+00, 1.155582E+00, 1.158284E+00, 1.159934E+00, + 1.160477E+00, 1.159890E+00, 1.158259E+00, 1.155692E+00, 1.152293E+00, + 1.148163E+00, 1.143345E+00, 1.137685E+00, 1.130993E+00, 1.123097E+00, + 1.113846E+00, 1.103152E+00, 1.091121E+00, 1.077902E+00, 1.063644E+00, + 1.048485E+00, 1.032546E+00, 1.015870E+00, 9.984859E-01, 9.804227E-01, + 9.617111E-01, 9.424119E-01, 9.227049E-01, 9.027804E-01, 8.828123E-01, + 8.629581E-01, 8.432731E-01, 8.234742E-01, 8.032342E-01, 7.822715E-01, + 7.603498E-01, 7.373739E-01, 7.136470E-01, 6.895336E-01, 6.653567E-01, + 6.413984E-01, 6.178723E-01, 5.948484E-01, 5.723600E-01, 5.504353E-01, + 5.290979E-01, 5.083728E-01, 4.883006E-01, 4.689171E-01, 4.502486E-01, + 4.323126E-01, 4.150790E-01, 3.983657E-01, 3.819846E-01, 3.657821E-01, + 3.496358E-01, 3.334937E-01, 3.174776E-01, 3.017298E-01, 2.863684E-01, + 2.714900E-01, 2.571632E-01, 2.434102E-01, 2.302389E-01, 2.176527E-01, + 2.056507E-01, 1.942251E-01, 1.833530E-01, 1.730097E-01, 1.631716E-01, + 1.538163E-01, 1.449230E-01, 1.364729E-01, 1.284483E-01, 1.208320E-01, + 1.136072E-01, 1.067579E-01, 1.002685E-01, 9.412394E-02, 8.830929E-02, + 8.281010E-02, 7.761208E-02, 7.270064E-02, 6.806167E-02, 6.368176E-02, + 5.954815E-02, 5.564917E-02, 5.197543E-02, 4.851788E-02, 4.526737E-02, + 4.221473E-02, 3.934954E-02, 3.665730E-02, 3.412407E-02, 3.173768E-02, + 2.948752E-02, 2.736717E-02, 2.538113E-02, 2.353356E-02, 2.182558E-02, + 2.025590E-02, 1.881892E-02, 1.749930E-02, 1.628167E-02, 1.515301E-02, + 1.410230E-02, 1.312106E-02, 1.220509E-02, 1.135114E-02, 1.055593E-02, + 9.816228E-03, 9.128517E-03, 8.488116E-03, 7.890589E-03, 7.332061E-03, + 6.809147E-03, 6.319204E-03, 5.861036E-03, 5.433624E-03, 5.035802E-03, + 4.666298E-03, 4.323750E-03, 4.006709E-03, 3.713708E-03, 3.443294E-03, + 3.194041E-03, 2.964424E-03, 2.752492E-03, 2.556406E-03, 2.374564E-03, + 2.205568E-03, 2.048294E-03, 1.902113E-03, 1.766485E-03, 1.640857E-03, + 1.524672E-03, 1.417322E-03, 1.318031E-03, 1.226059E-03, 1.140743E-03, + 1.061495E-03, 9.877949E-04, 9.191847E-04, 8.552568E-04, 7.956433E-04, + 7.400120E-04, 6.880980E-04, 6.397864E-04, 5.949726E-04, 5.535291E-04, + 5.153113E-04, 4.801234E-04, 4.476245E-04, 4.174846E-04, 3.894221E-04, + 3.631969E-04, 3.386279E-04, 3.156452E-04, 2.941966E-04, 2.742235E-04, + 2.556624E-04, 2.384390E-04, 2.224525E-04, 2.076036E-04, 1.938018E-04, + 1.809649E-04, 1.690167E-04, 1.578839E-04, 1.474993E-04, 1.378026E-04, + 1.287394E-04, 1.202644E-04, 1.123502E-04, 1.049725E-04, 9.810596E-05, + 9.172477E-05, 8.579861E-05, 8.028174E-05, 7.513013E-05, 7.030565E-05, + 6.577532E-05, 6.151508E-05, 5.752025E-05, 5.378813E-05, 5.031350E-05, + 4.708916E-05, 4.410322E-05, 4.133150E-05, 3.874992E-05, 3.633762E-05, + 3.407653E-05, 3.195242E-05, 2.995808E-05, 2.808781E-05, 2.633581E-05, + 2.469630E-05, 2.316311E-05, 2.172855E-05, 2.038519E-05, 1.912625E-05, + 1.794555E-05, 1.683776E-05, 1.579907E-05, 1.482604E-05, 1.391527E-05, + 1.306345E-05, 1.226720E-05, 1.152279E-05, 1.082663E-05, 1.017540E-05, + 9.565993E-06, 8.995405E-06, 8.460253E-06, 7.957382E-06, 7.483997E-06, + 7.037621E-06, 6.616311E-06, 6.219265E-06, 5.845844E-06, 5.495311E-06, + 5.166853E-06, 4.859511E-06, 4.571973E-06, 4.302920E-06, 4.051121E-06, + 3.815429E-06, 3.594719E-06, 3.387736E-06, 3.193301E-06, 3.010363E-06, + 2.837980E-06, 2.675365E-06, 2.522020E-06, 2.377511E-06, 2.241417E-06, + 2.113325E-06, 1.992830E-06, 1.879542E-06, 1.773083E-06, 1.673086E-06, + 1.579199E-06 + } + }, + { + 441, 390.0, 830.0, /* 471 bands from 360 to 830 nm in 1nm steps */ + 1.0, /* Scale factor */ + { + 4.076779E-04, 4.977769E-04, 6.064754E-04, 7.370040E-04, 8.929388E-04, + 1.078166E-03, 1.296816E-03, 1.553159E-03, 1.851463E-03, 2.195795E-03, + 2.589775E-03, 3.036799E-03, 3.541926E-03, 4.111422E-03, 4.752618E-03, + 5.474207E-03, 6.285034E-03, 7.188068E-03, 8.181786E-03, 9.260417E-03, + 1.041303E-02, 1.162642E-02, 1.289884E-02, 1.423442E-02, 1.564080E-02, + 1.712968E-02, 1.871265E-02, 2.038394E-02, 2.212935E-02, 2.392985E-02, + 2.576133E-02, 2.760156E-02, 2.945513E-02, 3.133884E-02, 3.327575E-02, + 3.529554E-02, 3.742705E-02, 3.967137E-02, 4.201998E-02, 4.446166E-02, + 4.698226E-02, 4.956742E-02, 5.221219E-02, 5.491387E-02, 5.766919E-02, + 6.047429E-02, 6.332195E-02, 6.619271E-02, 6.906185E-02, 7.190190E-02, + 7.468288E-02, 7.738452E-02, 8.003601E-02, 8.268524E-02, 8.538745E-02, + 8.820537E-02, 9.118925E-02, 9.431041E-02, 9.751346E-02, 1.007349E-01, + 1.039030E-01, 1.069639E-01, 1.099676E-01, 1.129992E-01, 1.161541E-01, + 1.195389E-01, 1.232503E-01, 1.273047E-01, 1.316964E-01, 1.364178E-01, + 1.414586E-01, 1.468003E-01, 1.524002E-01, 1.582021E-01, 1.641400E-01, + 1.701373E-01, 1.761233E-01, 1.820896E-01, 1.880463E-01, 1.940065E-01, + 1.999859E-01, 2.060054E-01, 2.120981E-01, 2.183041E-01, 2.246686E-01, + 2.312426E-01, 2.380741E-01, 2.451798E-01, 2.525682E-01, 2.602479E-01, + 2.682271E-01, 2.765005E-01, 2.850035E-01, 2.936475E-01, 3.023319E-01, + 3.109438E-01, 3.194105E-01, 3.278683E-01, 3.365263E-01, 3.456176E-01, + 3.554018E-01, 3.660893E-01, 3.775857E-01, 3.896960E-01, 4.021947E-01, + 4.148227E-01, 4.273539E-01, 4.398206E-01, 4.523360E-01, 4.650298E-01, + 4.780482E-01, 4.915173E-01, 5.054224E-01, 5.197057E-01, 5.343012E-01, + 5.491344E-01, 5.641302E-01, 5.792416E-01, 5.944264E-01, 6.096388E-01, + 6.248296E-01, 6.399656E-01, 6.550943E-01, 6.702903E-01, 6.856375E-01, + 7.012292E-01, 7.171103E-01, 7.330917E-01, 7.489041E-01, 7.642530E-01, + 7.788199E-01, 7.923410E-01, 8.048510E-01, 8.164747E-01, 8.273520E-01, + 8.376358E-01, 8.474653E-01, 8.568868E-01, 8.659242E-01, 8.746041E-01, + 8.829552E-01, 8.910274E-01, 8.989495E-01, 9.068753E-01, 9.149652E-01, + 9.233858E-01, 9.322325E-01, 9.412862E-01, 9.502378E-01, 9.587647E-01, + 9.665325E-01, 9.732504E-01, 9.788415E-01, 9.832867E-01, 9.865720E-01, + 9.886887E-01, 9.897056E-01, 9.899849E-01, 9.899624E-01, 9.900731E-01, + 9.907500E-01, 9.922826E-01, 9.943837E-01, 9.966221E-01, 9.985649E-01, + 9.997775E-01, 9.999440E-01, 9.992200E-01, 9.978793E-01, 9.961934E-01, + 9.944304E-01, 9.927831E-01, 9.911578E-01, 9.893925E-01, 9.873288E-01, + 9.848127E-01, 9.817253E-01, 9.780714E-01, 9.738860E-01, 9.692028E-01, + 9.640545E-01, 9.584409E-01, 9.522379E-01, 9.452968E-01, 9.374773E-01, + 9.286495E-01, 9.187953E-01, 9.083014E-01, 8.976352E-01, 8.872401E-01, + 8.775360E-01, 8.687920E-01, 8.607474E-01, 8.530233E-01, 8.452535E-01, + 8.370838E-01, 8.282409E-01, 8.187320E-01, 8.086352E-01, 7.980296E-01, + 7.869950E-01, 7.756040E-01, 7.638996E-01, 7.519157E-01, 7.396832E-01, + 7.272309E-01, 7.145878E-01, 7.017926E-01, 6.888866E-01, 6.759103E-01, + 6.629035E-01, 6.498911E-01, 6.368410E-01, 6.237092E-01, 6.104541E-01, + 5.970375E-01, 5.834395E-01, 5.697044E-01, 5.558892E-01, 5.420475E-01, + 5.282296E-01, 5.144746E-01, 5.007881E-01, 4.871687E-01, 4.736160E-01, + 4.601308E-01, 4.467260E-01, 4.334589E-01, 4.203919E-01, 4.075810E-01, + 3.950755E-01, 3.828894E-01, 3.709190E-01, 3.590447E-01, 3.471615E-01, + 3.351794E-01, 3.230562E-01, 3.108859E-01, 2.987840E-01, 2.868527E-01, + 2.751807E-01, 2.638343E-01, 2.528330E-01, 2.421835E-01, 2.318904E-01, + 2.219564E-01, 2.123826E-01, 2.031698E-01, 1.943179E-01, 1.858250E-01, + 1.776882E-01, 1.698926E-01, 1.623822E-01, 1.550986E-01, 1.479918E-01, + 1.410203E-01, 1.341614E-01, 1.274401E-01, 1.208887E-01, 1.145345E-01, + 1.083996E-01, 1.025007E-01, 9.684588E-02, 9.143944E-02, 8.628318E-02, + 8.137687E-02, 7.671708E-02, 7.229404E-02, 6.809696E-02, 6.411549E-02, + 6.033976E-02, 5.676054E-02, 5.336992E-02, 5.016027E-02, 4.712405E-02, + 4.425383E-02, 4.154205E-02, 3.898042E-02, 3.656091E-02, 3.427597E-02, + 3.211852E-02, 3.008192E-02, 2.816001E-02, 2.634698E-02, 2.463731E-02, + 2.302574E-02, 2.150743E-02, 2.007838E-02, 1.873474E-02, 1.747269E-02, + 1.628841E-02, 1.517767E-02, 1.413473E-02, 1.315408E-02, 1.223092E-02, + 1.136106E-02, 1.054190E-02, 9.775050E-03, 9.061962E-03, 8.402962E-03, + 7.797457E-03, 7.243230E-03, 6.734381E-03, 6.265001E-03, 5.830085E-03, + 5.425391E-03, 5.047634E-03, 4.695140E-03, 4.366592E-03, 4.060685E-03, + 3.776140E-03, 3.511578E-03, 3.265211E-03, 3.035344E-03, 2.820496E-03, + 2.619372E-03, 2.430960E-03, 2.254796E-03, 2.090489E-03, 1.937586E-03, + 1.795595E-03, 1.663989E-03, 1.542195E-03, 1.429639E-03, 1.325752E-03, + 1.229980E-03, 1.141734E-03, 1.060269E-03, 9.848854E-04, 9.149703E-04, + 8.499903E-04, 7.895158E-04, 7.333038E-04, 6.811458E-04, 6.328287E-04, + 5.881375E-04, 5.468389E-04, 5.086349E-04, 4.732403E-04, 4.404016E-04, + 4.098928E-04, 3.815137E-04, 3.550902E-04, 3.304668E-04, 3.075030E-04, + 2.860718E-04, 2.660718E-04, 2.474586E-04, 2.301919E-04, 2.142225E-04, + 1.994949E-04, 1.859336E-04, 1.734067E-04, 1.617865E-04, 1.509641E-04, + 1.408466E-04, 1.313642E-04, 1.224905E-04, 1.142060E-04, 1.064886E-04, + 9.931439E-05, 9.265512E-05, 8.647225E-05, 8.072780E-05, 7.538716E-05, + 7.041878E-05, 6.579338E-05, 6.148250E-05, 5.746008E-05, 5.370272E-05, + 5.018934E-05, 4.690245E-05, 4.383167E-05, 4.096780E-05, 3.830123E-05, + 3.582218E-05, 3.351903E-05, 3.137419E-05, 2.937068E-05, 2.749380E-05, + 2.573083E-05, 2.407249E-05, 2.251704E-05, 2.106350E-05, 1.970991E-05, + 1.845353E-05, 1.728979E-05, 1.620928E-05, 1.520262E-05, 1.426169E-05, + 1.337946E-05, 1.255038E-05, 1.177169E-05, 1.104118E-05, 1.035662E-05, + 9.715798E-06, 9.116316E-06, 8.555201E-06, 8.029561E-06, 7.536768E-06, + 7.074424E-06, 6.640464E-06, 6.233437E-06, 5.852035E-06, 5.494963E-06, + 5.160948E-06, 4.848687E-06, 4.556705E-06, 4.283580E-06, 4.027993E-06, + 3.788729E-06, 3.564599E-06, 3.354285E-06, 3.156557E-06, 2.970326E-06, + 2.794625E-06, 2.628701E-06, 2.472248E-06, 2.325030E-06, 2.186768E-06, + 2.057152E-06, 1.935813E-06, 1.822239E-06, 1.715914E-06, 1.616355E-06, + 1.523114E-06, 1.435750E-06, 1.353771E-06, 1.276714E-06, 1.204166E-06, + 1.135758E-06, 1.071181E-06, 1.010243E-06, 9.527779E-07, 8.986224E-07, + 8.476168E-07, 7.996052E-07, 7.544361E-07, 7.119624E-07, 6.720421E-07, + 6.345380E-07 + } + }, + { + 441, 390.0, 830.0, /* 471 bands from 360 to 830 nm in 1nm steps */ + 1.0, /* Scale factor */ + { + 1.318752E-02, 1.597879E-02, 1.935758E-02, 2.343758E-02, 2.835021E-02, + 3.424588E-02, 4.129467E-02, 4.968641E-02, 5.962964E-02, 7.134926E-02, + 8.508254E-02, 1.010753E-01, 1.195838E-01, 1.408647E-01, 1.651644E-01, + 1.927065E-01, 2.236782E-01, 2.582109E-01, 2.963632E-01, 3.381018E-01, + 3.832822E-01, 4.316884E-01, 4.832440E-01, 5.379345E-01, 5.957740E-01, + 6.568187E-01, 7.210459E-01, 7.878635E-01, 8.563391E-01, 9.253017E-01, + 9.933444E-01, 1.059178E+00, 1.122832E+00, 1.184947E+00, 1.246476E+00, + 1.308674E+00, 1.372628E+00, 1.437661E+00, 1.502449E+00, 1.565456E+00, + 1.624940E+00, 1.679488E+00, 1.729668E+00, 1.776755E+00, 1.822228E+00, + 1.867751E+00, 1.914504E+00, 1.961055E+00, 2.005136E+00, 2.044296E+00, + 2.075946E+00, 2.098231E+00, 2.112591E+00, 2.121427E+00, 2.127239E+00, + 2.132574E+00, 2.139093E+00, 2.144815E+00, 2.146832E+00, 2.142250E+00, + 2.128264E+00, 2.103205E+00, 2.069388E+00, 2.030030E+00, 1.988178E+00, + 1.946651E+00, 1.907521E+00, 1.870689E+00, 1.835578E+00, 1.801657E+00, + 1.768440E+00, 1.735338E+00, 1.701254E+00, 1.665053E+00, 1.625712E+00, + 1.582342E+00, 1.534439E+00, 1.482544E+00, 1.427438E+00, 1.369876E+00, + 1.310576E+00, 1.250226E+00, 1.189511E+00, 1.129050E+00, 1.069379E+00, + 1.010952E+00, 9.541809E-01, 8.995253E-01, 8.473720E-01, 7.980093E-01, + 7.516389E-01, 7.082645E-01, 6.673867E-01, 6.284798E-01, 5.911174E-01, + 5.549619E-01, 5.198843E-01, 4.862772E-01, 4.545497E-01, 4.249955E-01, + 3.978114E-01, 3.730218E-01, 3.502618E-01, 3.291407E-01, 3.093356E-01, + 2.905816E-01, 2.726773E-01, 2.555143E-01, 2.390188E-01, 2.231335E-01, + 2.078158E-01, 1.930407E-01, 1.788089E-01, 1.651287E-01, 1.520103E-01, + 1.394643E-01, 1.275353E-01, 1.163771E-01, 1.061161E-01, 9.682266E-02, + 8.852389E-02, 8.118263E-02, 7.463132E-02, 6.870644E-02, 6.327834E-02, + 5.824484E-02, 5.353812E-02, 4.914863E-02, 4.507511E-02, 4.131175E-02, + 3.784916E-02, 3.467234E-02, 3.175471E-02, 2.907029E-02, 2.659651E-02, + 2.431375E-02, 2.220677E-02, 2.026852E-02, 1.849246E-02, 1.687084E-02, + 1.539505E-02, 1.405450E-02, 1.283354E-02, 1.171754E-02, 1.069415E-02, + 9.753000E-03, 8.886096E-03, 8.089323E-03, 7.359131E-03, 6.691736E-03, + 6.083223E-03, 5.529423E-03, 5.025504E-03, 4.566879E-03, 4.149405E-03, + 3.769336E-03, 3.423302E-03, 3.108313E-03, 2.821650E-03, 2.560830E-03, + 2.323578E-03, 2.107847E-03, 1.911867E-03, 1.734006E-03, 1.572736E-03, + 1.426627E-03, 1.294325E-03, 1.174475E-03, 1.065842E-03, 9.673215E-04, + 8.779264E-04, 7.967847E-04, 7.231502E-04, 6.563501E-04, 5.957678E-04, + 5.408385E-04, 4.910441E-04, 4.459046E-04, 4.049826E-04, 3.678818E-04, + 3.342429E-04, 3.037407E-04, 2.760809E-04, 2.509970E-04, 2.282474E-04, + 2.076129E-04, 1.888948E-04, 1.719127E-04, 1.565030E-04, 1.425177E-04, + 1.298230E-04, 1.182974E-04, 1.078310E-04, 9.832455E-05, 8.968787E-05, + 8.183954E-05, 7.470582E-05, 6.821991E-05, 6.232132E-05, 5.695534E-05, + 5.207245E-05, 4.762781E-05, 4.358082E-05, 3.989468E-05, 3.653612E-05, + 3.347499E-05, 3.068400E-05, 2.813839E-05, 2.581574E-05, 2.369574E-05, + 2.175998E-05, 1.999179E-05, 1.837603E-05, 1.689896E-05, 1.554815E-05, + 1.431231E-05, 1.318119E-05, 1.214548E-05, 1.119673E-05, 1.032727E-05, + 9.530130E-06, 8.798979E-06, 8.128065E-06, 7.512160E-06, 6.946506E-06, + 6.426776E-06, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, 0.000000E+00, + 0.000000E+00 + } + } +}; + #ifndef SALONEINSTLIB /* Standard CIE 1964 10 degree observer, */ /* adjusted for compatibility with 2 degree observer. */ @@ -1959,898 +2535,6 @@ static xspect ob_EBU_2012[3] = { } }; -#ifdef NEVER - -CIE TC 1-36 proposed -2-deg XYZ CMFs transformed from the CIE (2006) 2-deg LMS cone fundamentals - -390 3.769647E-03 4.146161E-04 1.847260E-02 -391 4.532416E-03 5.028333E-04 2.221101E-02 -392 5.446553E-03 6.084991E-04 2.669819E-02 -393 6.538868E-03 7.344436E-04 3.206937E-02 -394 7.839699E-03 8.837389E-04 3.847832E-02 -395 9.382967E-03 1.059646E-03 4.609784E-02 -396 1.120608E-02 1.265532E-03 5.511953E-02 -397 1.334965E-02 1.504753E-03 6.575257E-02 -398 1.585690E-02 1.780493E-03 7.822113E-02 -399 1.877286E-02 2.095572E-03 9.276013E-02 -400 2.214302E-02 2.452194E-03 1.096090E-01 -401 2.601285E-02 2.852216E-03 1.290077E-01 -402 3.043036E-02 3.299115E-03 1.512047E-01 -403 3.544325E-02 3.797466E-03 1.764441E-01 -404 4.109640E-02 4.352768E-03 2.049517E-01 -405 4.742986E-02 4.971717E-03 2.369246E-01 -406 5.447394E-02 5.661014E-03 2.725123E-01 -407 6.223612E-02 6.421615E-03 3.117820E-01 -408 7.070048E-02 7.250312E-03 3.547064E-01 -409 7.982513E-02 8.140173E-03 4.011473E-01 -410 8.953803E-02 9.079860E-03 4.508369E-01 -411 9.974848E-02 1.005608E-02 5.034164E-01 -412 1.104019E-01 1.106456E-02 5.586361E-01 -413 1.214566E-01 1.210522E-02 6.162734E-01 -414 1.328741E-01 1.318014E-02 6.760982E-01 -415 1.446214E-01 1.429377E-02 7.378822E-01 -416 1.566468E-01 1.545004E-02 8.013019E-01 -417 1.687901E-01 1.664093E-02 8.655573E-01 -418 1.808328E-01 1.785302E-02 9.295791E-01 -419 1.925216E-01 1.907018E-02 9.921293E-01 -420 2.035729E-01 2.027369E-02 1.051821E+00 -421 2.137531E-01 2.144805E-02 1.107509E+00 -422 2.231348E-01 2.260041E-02 1.159527E+00 -423 2.319245E-01 2.374789E-02 1.208869E+00 -424 2.403892E-01 2.491247E-02 1.256834E+00 -425 2.488523E-01 2.612106E-02 1.305008E+00 -426 2.575896E-01 2.739923E-02 1.354758E+00 -427 2.664991E-01 2.874993E-02 1.405594E+00 -428 2.753532E-01 3.016909E-02 1.456414E+00 -429 2.838921E-01 3.165145E-02 1.505960E+00 -430 2.918246E-01 3.319038E-02 1.552826E+00 -431 2.989200E-01 3.477912E-02 1.595902E+00 -432 3.052993E-01 3.641495E-02 1.635768E+00 -433 3.112031E-01 3.809569E-02 1.673573E+00 -434 3.169047E-01 3.981843E-02 1.710604E+00 -435 3.227087E-01 4.157940E-02 1.748280E+00 -436 3.288194E-01 4.337098E-02 1.787504E+00 -437 3.349242E-01 4.517180E-02 1.826609E+00 -438 3.405452E-01 4.695420E-02 1.863108E+00 -439 3.451688E-01 4.868718E-02 1.894332E+00 -440 3.482554E-01 5.033657E-02 1.917479E+00 -441 3.494153E-01 5.187611E-02 1.930529E+00 -442 3.489075E-01 5.332218E-02 1.934819E+00 -443 3.471746E-01 5.470603E-02 1.932650E+00 -444 3.446705E-01 5.606335E-02 1.926395E+00 -445 3.418483E-01 5.743393E-02 1.918437E+00 -446 3.390240E-01 5.885107E-02 1.910430E+00 -447 3.359926E-01 6.030809E-02 1.901224E+00 -448 3.324276E-01 6.178644E-02 1.889000E+00 -449 3.280157E-01 6.326570E-02 1.871996E+00 -450 3.224637E-01 6.472352E-02 1.848545E+00 -451 3.156225E-01 6.614749E-02 1.817792E+00 -452 3.078201E-01 6.757256E-02 1.781627E+00 -453 2.994771E-01 6.904928E-02 1.742514E+00 -454 2.909776E-01 7.063280E-02 1.702749E+00 -455 2.826646E-01 7.238339E-02 1.664439E+00 -456 2.747962E-01 7.435960E-02 1.629207E+00 -457 2.674312E-01 7.659383E-02 1.597360E+00 -458 2.605847E-01 7.911436E-02 1.568896E+00 -459 2.542749E-01 8.195345E-02 1.543823E+00 -460 2.485254E-01 8.514816E-02 1.522157E+00 -461 2.433039E-01 8.872657E-02 1.503611E+00 -462 2.383414E-01 9.266008E-02 1.486673E+00 -463 2.333253E-01 9.689723E-02 1.469595E+00 -464 2.279619E-01 1.013746E-01 1.450709E+00 -465 2.219781E-01 1.060145E-01 1.428440E+00 -466 2.151735E-01 1.107377E-01 1.401587E+00 -467 2.075619E-01 1.155111E-01 1.370094E+00 -468 1.992183E-01 1.203122E-01 1.334220E+00 -469 1.902290E-01 1.251161E-01 1.294275E+00 -470 1.806905E-01 1.298957E-01 1.250610E+00 -471 1.707154E-01 1.346299E-01 1.203696E+00 -472 1.604471E-01 1.393309E-01 1.154316E+00 -473 1.500244E-01 1.440235E-01 1.103284E+00 -474 1.395705E-01 1.487372E-01 1.051347E+00 -475 1.291920E-01 1.535066E-01 9.991789E-01 -476 1.189859E-01 1.583644E-01 9.473958E-01 -477 1.090615E-01 1.633199E-01 8.966222E-01 -478 9.951424E-02 1.683761E-01 8.473981E-01 -479 9.041850E-02 1.735365E-01 8.001576E-01 -480 8.182895E-02 1.788048E-01 7.552379E-01 -481 7.376817E-02 1.841819E-01 7.127879E-01 -482 6.619477E-02 1.896559E-01 6.725198E-01 -483 5.906380E-02 1.952101E-01 6.340976E-01 -484 5.234242E-02 2.008259E-01 5.972433E-01 -485 4.600865E-02 2.064828E-01 5.617313E-01 -486 4.006154E-02 2.121826E-01 5.274921E-01 -487 3.454373E-02 2.180279E-01 4.948809E-01 -488 2.949091E-02 2.241586E-01 4.642586E-01 -489 2.492140E-02 2.307302E-01 4.358841E-01 -490 2.083981E-02 2.379160E-01 4.099313E-01 -491 1.723591E-02 2.458706E-01 3.864261E-01 -492 1.407924E-02 2.546023E-01 3.650566E-01 -493 1.134516E-02 2.640760E-01 3.454812E-01 -494 9.019658E-03 2.742490E-01 3.274095E-01 -495 7.097731E-03 2.850680E-01 3.105939E-01 -496 5.571145E-03 2.964837E-01 2.948102E-01 -497 4.394566E-03 3.085010E-01 2.798194E-01 -498 3.516303E-03 3.211393E-01 2.654100E-01 -499 2.887638E-03 3.344175E-01 2.514084E-01 -500 2.461588E-03 3.483536E-01 2.376753E-01 -501 2.206348E-03 3.629601E-01 2.241211E-01 -502 2.149559E-03 3.782275E-01 2.107484E-01 -503 2.337091E-03 3.941359E-01 1.975839E-01 -504 2.818931E-03 4.106582E-01 1.846574E-01 -505 3.649178E-03 4.277595E-01 1.720018E-01 -506 4.891359E-03 4.453993E-01 1.596918E-01 -507 6.629364E-03 4.635396E-01 1.479415E-01 -508 8.942902E-03 4.821376E-01 1.369428E-01 -509 1.190224E-02 5.011430E-01 1.268279E-01 -510 1.556989E-02 5.204972E-01 1.176796E-01 -511 1.997668E-02 5.401387E-01 1.094970E-01 -512 2.504698E-02 5.600208E-01 1.020943E-01 -513 3.067530E-02 5.800972E-01 9.527993E-02 -514 3.674999E-02 6.003172E-01 8.890075E-02 -515 4.315171E-02 6.206256E-01 8.283548E-02 -516 4.978584E-02 6.409398E-01 7.700982E-02 -517 5.668554E-02 6.610772E-01 7.144001E-02 -518 6.391651E-02 6.808134E-01 6.615436E-02 -519 7.154352E-02 6.999044E-01 6.117199E-02 -520 7.962917E-02 7.180890E-01 5.650407E-02 -521 8.821473E-02 7.351593E-01 5.215121E-02 -522 9.726978E-02 7.511821E-01 4.809566E-02 -523 1.067504E-01 7.663143E-01 4.431720E-02 -524 1.166192E-01 7.807352E-01 4.079734E-02 -525 1.268468E-01 7.946448E-01 3.751912E-02 -526 1.374060E-01 8.082074E-01 3.446846E-02 -527 1.482471E-01 8.213817E-01 3.163764E-02 -528 1.593076E-01 8.340701E-01 2.901901E-02 -529 1.705181E-01 8.461711E-01 2.660364E-02 -530 1.818026E-01 8.575799E-01 2.438164E-02 -531 1.931090E-01 8.682408E-01 2.234097E-02 -532 2.045085E-01 8.783061E-01 2.046415E-02 -533 2.161166E-01 8.879907E-01 1.873456E-02 -534 2.280650E-01 8.975211E-01 1.713788E-02 -535 2.405015E-01 9.071347E-01 1.566174E-02 -536 2.535441E-01 9.169947E-01 1.429644E-02 -537 2.671300E-01 9.269295E-01 1.303702E-02 -538 2.811351E-01 9.366731E-01 1.187897E-02 -539 2.954164E-01 9.459482E-01 1.081725E-02 -540 3.098117E-01 9.544675E-01 9.846470E-03 -541 3.241678E-01 9.619834E-01 8.960687E-03 -542 3.384319E-01 9.684390E-01 8.152811E-03 -543 3.525786E-01 9.738289E-01 7.416025E-03 -544 3.665839E-01 9.781519E-01 6.744115E-03 -545 3.804244E-01 9.814106E-01 6.131421E-03 -546 3.940988E-01 9.836669E-01 5.572778E-03 -547 4.076972E-01 9.852081E-01 5.063463E-03 -548 4.213484E-01 9.863813E-01 4.599169E-03 -549 4.352003E-01 9.875357E-01 4.175971E-03 -550 4.494206E-01 9.890228E-01 3.790291E-03 -551 4.641616E-01 9.910811E-01 3.438952E-03 -552 4.794395E-01 9.934913E-01 3.119341E-03 -553 4.952180E-01 9.959172E-01 2.829038E-03 -554 5.114395E-01 9.980205E-01 2.565722E-03 -555 5.280233E-01 9.994608E-01 2.327186E-03 -556 5.448696E-01 9.999930E-01 2.111280E-03 -557 5.618898E-01 9.997557E-01 1.915766E-03 -558 5.790137E-01 9.989839E-01 1.738589E-03 -559 5.961882E-01 9.979123E-01 1.577920E-03 -560 6.133784E-01 9.967737E-01 1.432128E-03 -561 6.305897E-01 9.957356E-01 1.299781E-03 -562 6.479223E-01 9.947115E-01 1.179667E-03 -563 6.654866E-01 9.935534E-01 1.070694E-03 -564 6.833782E-01 9.921156E-01 9.718623E-04 -565 7.016774E-01 9.902549E-01 8.822531E-04 -566 7.204110E-01 9.878596E-01 8.010231E-04 -567 7.394495E-01 9.849324E-01 7.273884E-04 -568 7.586285E-01 9.815036E-01 6.606347E-04 -569 7.777885E-01 9.776035E-01 6.001146E-04 -570 7.967750E-01 9.732611E-01 5.452416E-04 -571 8.154530E-01 9.684764E-01 4.954847E-04 -572 8.337389E-01 9.631369E-01 4.503642E-04 -573 8.515493E-01 9.571062E-01 4.094455E-04 -574 8.687862E-01 9.502540E-01 3.723345E-04 -575 8.853376E-01 9.424569E-01 3.386739E-04 -576 9.011588E-01 9.336897E-01 3.081396E-04 -577 9.165278E-01 9.242893E-01 2.804370E-04 -578 9.318245E-01 9.146707E-01 2.552996E-04 -579 9.474524E-01 9.052333E-01 2.324859E-04 -580 9.638388E-01 8.963613E-01 2.117772E-04 -581 9.812596E-01 8.883069E-01 1.929758E-04 -582 9.992953E-01 8.808462E-01 1.759024E-04 -583 1.017343E+00 8.736445E-01 1.603947E-04 -584 1.034790E+00 8.663755E-01 1.463059E-04 -585 1.051011E+00 8.587203E-01 1.335031E-04 -586 1.065522E+00 8.504295E-01 1.218660E-04 -587 1.078421E+00 8.415047E-01 1.112857E-04 -588 1.089944E+00 8.320109E-01 1.016634E-04 -589 1.100320E+00 8.220154E-01 9.291003E-05 -590 1.109767E+00 8.115868E-01 8.494468E-05 -591 1.118438E+00 8.007874E-01 7.769425E-05 -592 1.126266E+00 7.896515E-01 7.109247E-05 -593 1.133138E+00 7.782053E-01 6.507936E-05 -594 1.138952E+00 7.664733E-01 5.960061E-05 -595 1.143620E+00 7.544785E-01 5.460706E-05 -596 1.147095E+00 7.422473E-01 5.005417E-05 -597 1.149464E+00 7.298229E-01 4.590157E-05 -598 1.150838E+00 7.172525E-01 4.211268E-05 -599 1.151326E+00 7.045818E-01 3.865437E-05 -600 1.151033E+00 6.918553E-01 3.549661E-05 -601 1.150002E+00 6.791009E-01 3.261220E-05 -602 1.148061E+00 6.662846E-01 2.997643E-05 -603 1.144998E+00 6.533595E-01 2.756693E-05 -604 1.140622E+00 6.402807E-01 2.536339E-05 -605 1.134757E+00 6.270066E-01 2.334738E-05 -606 1.127298E+00 6.135148E-01 2.150221E-05 -607 1.118342E+00 5.998494E-01 1.981268E-05 -608 1.108033E+00 5.860682E-01 1.826500E-05 -609 1.096515E+00 5.722261E-01 1.684667E-05 -610 1.083928E+00 5.583746E-01 1.554631E-05 -611 1.070387E+00 5.445535E-01 1.435360E-05 -612 1.055934E+00 5.307673E-01 1.325915E-05 -613 1.040592E+00 5.170130E-01 1.225443E-05 -614 1.024385E+00 5.032889E-01 1.133169E-05 -615 1.007344E+00 4.895950E-01 1.048387E-05 -616 9.895268E-01 4.759442E-01 0.000000E+00 -617 9.711213E-01 4.623958E-01 0.000000E+00 -618 9.523257E-01 4.490154E-01 0.000000E+00 -619 9.333248E-01 4.358622E-01 0.000000E+00 -620 9.142877E-01 4.229897E-01 0.000000E+00 -621 8.952798E-01 4.104152E-01 0.000000E+00 -622 8.760157E-01 3.980356E-01 0.000000E+00 -623 8.561607E-01 3.857300E-01 0.000000E+00 -624 8.354235E-01 3.733907E-01 0.000000E+00 -625 8.135565E-01 3.609245E-01 0.000000E+00 -626 7.904565E-01 3.482860E-01 0.000000E+00 -627 7.664364E-01 3.355702E-01 0.000000E+00 -628 7.418777E-01 3.228963E-01 0.000000E+00 -629 7.171219E-01 3.103704E-01 0.000000E+00 -630 6.924717E-01 2.980865E-01 0.000000E+00 -631 6.681600E-01 2.861160E-01 0.000000E+00 -632 6.442697E-01 2.744822E-01 0.000000E+00 -633 6.208450E-01 2.631953E-01 0.000000E+00 -634 5.979243E-01 2.522628E-01 0.000000E+00 -635 5.755410E-01 2.416902E-01 0.000000E+00 -636 5.537296E-01 2.314809E-01 0.000000E+00 -637 5.325412E-01 2.216378E-01 0.000000E+00 -638 5.120218E-01 2.121622E-01 0.000000E+00 -639 4.922070E-01 2.030542E-01 0.000000E+00 -640 4.731224E-01 1.943124E-01 0.000000E+00 -641 4.547417E-01 1.859227E-01 0.000000E+00 -642 4.368719E-01 1.778274E-01 0.000000E+00 -643 4.193121E-01 1.699654E-01 0.000000E+00 -644 4.018980E-01 1.622841E-01 0.000000E+00 -645 3.844986E-01 1.547397E-01 0.000000E+00 -646 3.670592E-01 1.473081E-01 0.000000E+00 -647 3.497167E-01 1.400169E-01 0.000000E+00 -648 3.326305E-01 1.329013E-01 0.000000E+00 -649 3.159341E-01 1.259913E-01 0.000000E+00 -650 2.997374E-01 1.193120E-01 0.000000E+00 -651 2.841189E-01 1.128820E-01 0.000000E+00 -652 2.691053E-01 1.067113E-01 0.000000E+00 -653 2.547077E-01 1.008052E-01 0.000000E+00 -654 2.409319E-01 9.516653E-02 0.000000E+00 -655 2.277792E-01 8.979594E-02 0.000000E+00 -656 2.152431E-01 8.469044E-02 0.000000E+00 -657 2.033010E-01 7.984009E-02 0.000000E+00 -658 1.919276E-01 7.523372E-02 0.000000E+00 -659 1.810987E-01 7.086061E-02 0.000000E+00 -660 1.707914E-01 6.671045E-02 0.000000E+00 -661 1.609842E-01 6.277360E-02 0.000000E+00 -662 1.516577E-01 5.904179E-02 0.000000E+00 -663 1.427936E-01 5.550703E-02 0.000000E+00 -664 1.343737E-01 5.216139E-02 0.000000E+00 -665 1.263808E-01 4.899699E-02 0.000000E+00 -666 1.187979E-01 4.600578E-02 0.000000E+00 -667 1.116088E-01 4.317885E-02 0.000000E+00 -668 1.047975E-01 4.050755E-02 0.000000E+00 -669 9.834835E-02 3.798376E-02 0.000000E+00 -670 9.224597E-02 3.559982E-02 0.000000E+00 -671 8.647506E-02 3.334856E-02 0.000000E+00 -672 8.101986E-02 3.122332E-02 0.000000E+00 -673 7.586514E-02 2.921780E-02 0.000000E+00 -674 7.099633E-02 2.732601E-02 0.000000E+00 -675 6.639960E-02 2.554223E-02 0.000000E+00 -676 6.206225E-02 2.386121E-02 0.000000E+00 -677 5.797409E-02 2.227859E-02 0.000000E+00 -678 5.412533E-02 2.079020E-02 0.000000E+00 -679 5.050600E-02 1.939185E-02 0.000000E+00 -680 4.710606E-02 1.807939E-02 0.000000E+00 -681 4.391411E-02 1.684817E-02 0.000000E+00 -682 4.091411E-02 1.569188E-02 0.000000E+00 -683 3.809067E-02 1.460446E-02 0.000000E+00 -684 3.543034E-02 1.358062E-02 0.000000E+00 -685 3.292138E-02 1.261573E-02 0.000000E+00 -686 3.055672E-02 1.170696E-02 0.000000E+00 -687 2.834146E-02 1.085608E-02 0.000000E+00 -688 2.628033E-02 1.006476E-02 0.000000E+00 -689 2.437465E-02 9.333376E-03 0.000000E+00 -690 2.262306E-02 8.661284E-03 0.000000E+00 -691 2.101935E-02 8.046048E-03 0.000000E+00 -692 1.954647E-02 7.481130E-03 0.000000E+00 -693 1.818727E-02 6.959987E-03 0.000000E+00 -694 1.692727E-02 6.477070E-03 0.000000E+00 -695 1.575417E-02 6.027677E-03 0.000000E+00 -696 1.465854E-02 5.608169E-03 0.000000E+00 -697 1.363571E-02 5.216691E-03 0.000000E+00 -698 1.268205E-02 4.851785E-03 0.000000E+00 -699 1.179394E-02 4.512008E-03 0.000000E+00 -700 1.096778E-02 4.195941E-03 0.000000E+00 -701 1.019964E-02 3.902057E-03 0.000000E+00 -702 9.484317E-03 3.628371E-03 0.000000E+00 -703 8.816851E-03 3.373005E-03 0.000000E+00 -704 8.192921E-03 3.134315E-03 0.000000E+00 -705 7.608750E-03 2.910864E-03 0.000000E+00 -706 7.061391E-03 2.701528E-03 0.000000E+00 -707 6.549509E-03 2.505796E-03 0.000000E+00 -708 6.071970E-03 2.323231E-03 0.000000E+00 -709 5.627476E-03 2.153333E-03 0.000000E+00 -710 5.214608E-03 1.995557E-03 0.000000E+00 -711 4.831848E-03 1.849316E-03 0.000000E+00 -712 4.477579E-03 1.713976E-03 0.000000E+00 -713 4.150166E-03 1.588899E-03 0.000000E+00 -714 3.847988E-03 1.473453E-03 0.000000E+00 -715 3.569452E-03 1.367022E-03 0.000000E+00 -716 3.312857E-03 1.268954E-03 0.000000E+00 -717 3.076022E-03 1.178421E-03 0.000000E+00 -718 2.856894E-03 1.094644E-03 0.000000E+00 -719 2.653681E-03 1.016943E-03 0.000000E+00 -720 2.464821E-03 9.447269E-04 0.000000E+00 -721 2.289060E-03 8.775171E-04 0.000000E+00 -722 2.125694E-03 8.150438E-04 0.000000E+00 -723 1.974121E-03 7.570755E-04 0.000000E+00 -724 1.833723E-03 7.033755E-04 0.000000E+00 -725 1.703876E-03 6.537050E-04 0.000000E+00 -726 1.583904E-03 6.078048E-04 0.000000E+00 -727 1.472939E-03 5.653435E-04 0.000000E+00 -728 1.370151E-03 5.260046E-04 0.000000E+00 -729 1.274803E-03 4.895061E-04 0.000000E+00 -730 1.186238E-03 4.555970E-04 0.000000E+00 -731 1.103871E-03 4.240548E-04 0.000000E+00 -732 1.027194E-03 3.946860E-04 0.000000E+00 -733 9.557493E-04 3.673178E-04 0.000000E+00 -734 8.891262E-04 3.417941E-04 0.000000E+00 -735 8.269535E-04 3.179738E-04 0.000000E+00 -736 7.689351E-04 2.957441E-04 0.000000E+00 -737 7.149425E-04 2.750558E-04 0.000000E+00 -738 6.648590E-04 2.558640E-04 0.000000E+00 -739 6.185421E-04 2.381142E-04 0.000000E+00 -740 5.758303E-04 2.217445E-04 0.000000E+00 -741 5.365046E-04 2.066711E-04 0.000000E+00 -742 5.001842E-04 1.927474E-04 0.000000E+00 -743 4.665005E-04 1.798315E-04 0.000000E+00 -744 4.351386E-04 1.678023E-04 0.000000E+00 -745 4.058303E-04 1.565566E-04 0.000000E+00 -746 3.783733E-04 1.460168E-04 0.000000E+00 -747 3.526892E-04 1.361535E-04 0.000000E+00 -748 3.287199E-04 1.269451E-04 0.000000E+00 -749 3.063998E-04 1.183671E-04 0.000000E+00 -750 2.856577E-04 1.103928E-04 0.000000E+00 -751 2.664108E-04 1.029908E-04 0.000000E+00 -752 2.485462E-04 9.611836E-05 0.000000E+00 -753 2.319529E-04 8.973323E-05 0.000000E+00 -754 2.165300E-04 8.379694E-05 0.000000E+00 -755 2.021853E-04 7.827442E-05 0.000000E+00 -756 1.888338E-04 7.313312E-05 0.000000E+00 -757 1.763935E-04 6.834142E-05 0.000000E+00 -758 1.647895E-04 6.387035E-05 0.000000E+00 -759 1.539542E-04 5.969389E-05 0.000000E+00 -760 1.438270E-04 5.578862E-05 0.000000E+00 -761 1.343572E-04 5.213509E-05 0.000000E+00 -762 1.255141E-04 4.872179E-05 0.000000E+00 -763 1.172706E-04 4.553845E-05 0.000000E+00 -764 1.095983E-04 4.257443E-05 0.000000E+00 -765 1.024685E-04 3.981884E-05 0.000000E+00 -766 9.584715E-05 3.725877E-05 0.000000E+00 -767 8.968316E-05 3.487467E-05 0.000000E+00 -768 8.392734E-05 3.264765E-05 0.000000E+00 -769 7.853708E-05 3.056140E-05 0.000000E+00 -770 7.347551E-05 2.860175E-05 0.000000E+00 -771 6.871576E-05 2.675841E-05 0.000000E+00 -772 6.425257E-05 2.502943E-05 0.000000E+00 -773 6.008292E-05 2.341373E-05 0.000000E+00 -774 5.620098E-05 2.190914E-05 0.000000E+00 -775 5.259870E-05 2.051259E-05 0.000000E+00 -776 4.926279E-05 1.921902E-05 0.000000E+00 -777 4.616623E-05 1.801796E-05 0.000000E+00 -778 4.328212E-05 1.689899E-05 0.000000E+00 -779 4.058715E-05 1.585309E-05 0.000000E+00 -780 3.806114E-05 1.487243E-05 0.000000E+00 -781 3.568818E-05 1.395085E-05 0.000000E+00 -782 3.346023E-05 1.308528E-05 0.000000E+00 -783 3.137090E-05 1.227327E-05 0.000000E+00 -784 2.941371E-05 1.151233E-05 0.000000E+00 -785 2.758222E-05 1.080001E-05 0.000000E+00 -786 2.586951E-05 1.013364E-05 0.000000E+00 -787 2.426701E-05 9.509919E-06 0.000000E+00 -788 2.276639E-05 8.925630E-06 0.000000E+00 -789 2.136009E-05 8.377852E-06 0.000000E+00 -790 2.004122E-05 7.863920E-06 0.000000E+00 -791 1.880380E-05 7.381539E-06 0.000000E+00 -792 1.764358E-05 6.929096E-06 0.000000E+00 -793 1.655671E-05 6.505136E-06 0.000000E+00 -794 1.553939E-05 6.108221E-06 0.000000E+00 -795 1.458792E-05 5.736935E-06 0.000000E+00 -796 1.369853E-05 5.389831E-06 0.000000E+00 -797 1.286705E-05 5.065269E-06 0.000000E+00 -798 1.208947E-05 4.761667E-06 0.000000E+00 -799 1.136207E-05 4.477561E-06 0.000000E+00 -800 1.068141E-05 4.211597E-06 0.000000E+00 -801 1.004411E-05 3.962457E-06 0.000000E+00 -802 9.446399E-06 3.728674E-06 0.000000E+00 -803 8.884754E-06 3.508881E-06 0.000000E+00 -804 8.356050E-06 3.301868E-06 0.000000E+00 -805 7.857521E-06 3.106561E-06 0.000000E+00 -806 7.386996E-06 2.922119E-06 0.000000E+00 -807 6.943576E-06 2.748208E-06 0.000000E+00 -808 6.526548E-06 2.584560E-06 0.000000E+00 -809 6.135087E-06 2.430867E-06 0.000000E+00 -810 5.768284E-06 2.286786E-06 0.000000E+00 -811 5.425069E-06 2.151905E-06 0.000000E+00 -812 5.103974E-06 2.025656E-06 0.000000E+00 -813 4.803525E-06 1.907464E-06 0.000000E+00 -814 4.522350E-06 1.796794E-06 0.000000E+00 -815 4.259166E-06 1.693147E-06 0.000000E+00 -816 4.012715E-06 1.596032E-06 0.000000E+00 -817 3.781597E-06 1.504903E-06 0.000000E+00 -818 3.564496E-06 1.419245E-06 0.000000E+00 -819 3.360236E-06 1.338600E-06 0.000000E+00 -820 3.167765E-06 1.262556E-06 0.000000E+00 -821 2.986206E-06 1.190771E-06 0.000000E+00 -822 2.814999E-06 1.123031E-06 0.000000E+00 -823 2.653663E-06 1.059151E-06 0.000000E+00 -824 2.501725E-06 9.989507E-07 0.000000E+00 -825 2.358723E-06 9.422514E-07 0.000000E+00 -826 2.224206E-06 8.888804E-07 0.000000E+00 -827 2.097737E-06 8.386690E-07 0.000000E+00 -828 1.978894E-06 7.914539E-07 0.000000E+00 -829 1.867268E-06 7.470770E-07 0.000000E+00 -830 1.762465E-06 7.053860E-07 0.000000E+00 - -CIE TC 1-36 proposed -10-deg XYZ CMFs transformed from the CIE (2006) 2-deg LMS cone fundamentals - -390 2.952420E-03 4.076779E-04 1.318752E-02 -391 3.577275E-03 4.977769E-04 1.597879E-02 -392 4.332146E-03 6.064754E-04 1.935758E-02 -393 5.241609E-03 7.370040E-04 2.343758E-02 -394 6.333902E-03 8.929388E-04 2.835021E-02 -395 7.641137E-03 1.078166E-03 3.424588E-02 -396 9.199401E-03 1.296816E-03 4.129467E-02 -397 1.104869E-02 1.553159E-03 4.968641E-02 -398 1.323262E-02 1.851463E-03 5.962964E-02 -399 1.579791E-02 2.195795E-03 7.134926E-02 -400 1.879338E-02 2.589775E-03 8.508254E-02 -401 2.226949E-02 3.036799E-03 1.010753E-01 -402 2.627978E-02 3.541926E-03 1.195838E-01 -403 3.087862E-02 4.111422E-03 1.408647E-01 -404 3.611890E-02 4.752618E-03 1.651644E-01 -405 4.204986E-02 5.474207E-03 1.927065E-01 -406 4.871256E-02 6.285034E-03 2.236782E-01 -407 5.612868E-02 7.188068E-03 2.582109E-01 -408 6.429866E-02 8.181786E-03 2.963632E-01 -409 7.319818E-02 9.260417E-03 3.381018E-01 -410 8.277331E-02 1.041303E-02 3.832822E-01 -411 9.295327E-02 1.162642E-02 4.316884E-01 -412 1.037137E-01 1.289884E-02 4.832440E-01 -413 1.150520E-01 1.423442E-02 5.379345E-01 -414 1.269771E-01 1.564080E-02 5.957740E-01 -415 1.395127E-01 1.712968E-02 6.568187E-01 -416 1.526661E-01 1.871265E-02 7.210459E-01 -417 1.663054E-01 2.038394E-02 7.878635E-01 -418 1.802197E-01 2.212935E-02 8.563391E-01 -419 1.941448E-01 2.392985E-02 9.253017E-01 -420 2.077647E-01 2.576133E-02 9.933444E-01 -421 2.207911E-01 2.760156E-02 1.059178E+00 -422 2.332355E-01 2.945513E-02 1.122832E+00 -423 2.452462E-01 3.133884E-02 1.184947E+00 -424 2.570397E-01 3.327575E-02 1.246476E+00 -425 2.688989E-01 3.529554E-02 1.308674E+00 -426 2.810677E-01 3.742705E-02 1.372628E+00 -427 2.933967E-01 3.967137E-02 1.437661E+00 -428 3.055933E-01 4.201998E-02 1.502449E+00 -429 3.173165E-01 4.446166E-02 1.565456E+00 -430 3.281798E-01 4.698226E-02 1.624940E+00 -431 3.378678E-01 4.956742E-02 1.679488E+00 -432 3.465097E-01 5.221219E-02 1.729668E+00 -433 3.543953E-01 5.491387E-02 1.776755E+00 -434 3.618655E-01 5.766919E-02 1.822228E+00 -435 3.693084E-01 6.047429E-02 1.867751E+00 -436 3.770107E-01 6.332195E-02 1.914504E+00 -437 3.846850E-01 6.619271E-02 1.961055E+00 -438 3.918591E-01 6.906185E-02 2.005136E+00 -439 3.980192E-01 7.190190E-02 2.044296E+00 -440 4.026189E-01 7.468288E-02 2.075946E+00 -441 4.052637E-01 7.738452E-02 2.098231E+00 -442 4.062482E-01 8.003601E-02 2.112591E+00 -443 4.060660E-01 8.268524E-02 2.121427E+00 -444 4.052283E-01 8.538745E-02 2.127239E+00 -445 4.042529E-01 8.820537E-02 2.132574E+00 -446 4.034808E-01 9.118925E-02 2.139093E+00 -447 4.025362E-01 9.431041E-02 2.144815E+00 -448 4.008675E-01 9.751346E-02 2.146832E+00 -449 3.979327E-01 1.007349E-01 2.142250E+00 -450 3.932139E-01 1.039030E-01 2.128264E+00 -451 3.864108E-01 1.069639E-01 2.103205E+00 -452 3.779513E-01 1.099676E-01 2.069388E+00 -453 3.684176E-01 1.129992E-01 2.030030E+00 -454 3.583473E-01 1.161541E-01 1.988178E+00 -455 3.482214E-01 1.195389E-01 1.946651E+00 -456 3.383830E-01 1.232503E-01 1.907521E+00 -457 3.288309E-01 1.273047E-01 1.870689E+00 -458 3.194977E-01 1.316964E-01 1.835578E+00 -459 3.103345E-01 1.364178E-01 1.801657E+00 -460 3.013112E-01 1.414586E-01 1.768440E+00 -461 2.923754E-01 1.468003E-01 1.735338E+00 -462 2.833273E-01 1.524002E-01 1.701254E+00 -463 2.739463E-01 1.582021E-01 1.665053E+00 -464 2.640352E-01 1.641400E-01 1.625712E+00 -465 2.534221E-01 1.701373E-01 1.582342E+00 -466 2.420135E-01 1.761233E-01 1.534439E+00 -467 2.299346E-01 1.820896E-01 1.482544E+00 -468 2.173617E-01 1.880463E-01 1.427438E+00 -469 2.044672E-01 1.940065E-01 1.369876E+00 -470 1.914176E-01 1.999859E-01 1.310576E+00 -471 1.783672E-01 2.060054E-01 1.250226E+00 -472 1.654407E-01 2.120981E-01 1.189511E+00 -473 1.527391E-01 2.183041E-01 1.129050E+00 -474 1.403439E-01 2.246686E-01 1.069379E+00 -475 1.283167E-01 2.312426E-01 1.010952E+00 -476 1.167124E-01 2.380741E-01 9.541809E-01 -477 1.056121E-01 2.451798E-01 8.995253E-01 -478 9.508569E-02 2.525682E-01 8.473720E-01 -479 8.518206E-02 2.602479E-01 7.980093E-01 -480 7.593120E-02 2.682271E-01 7.516389E-01 -481 6.733159E-02 2.765005E-01 7.082645E-01 -482 5.932018E-02 2.850035E-01 6.673867E-01 -483 5.184106E-02 2.936475E-01 6.284798E-01 -484 4.486119E-02 3.023319E-01 5.911174E-01 -485 3.836770E-02 3.109438E-01 5.549619E-01 -486 3.237296E-02 3.194105E-01 5.198843E-01 -487 2.692095E-02 3.278683E-01 4.862772E-01 -488 2.204070E-02 3.365263E-01 4.545497E-01 -489 1.773951E-02 3.456176E-01 4.249955E-01 -490 1.400745E-02 3.554018E-01 3.978114E-01 -491 1.082291E-02 3.660893E-01 3.730218E-01 -492 8.168996E-03 3.775857E-01 3.502618E-01 -493 6.044623E-03 3.896960E-01 3.291407E-01 -494 4.462638E-03 4.021947E-01 3.093356E-01 -495 3.446810E-03 4.148227E-01 2.905816E-01 -496 3.009513E-03 4.273539E-01 2.726773E-01 -497 3.090744E-03 4.398206E-01 2.555143E-01 -498 3.611221E-03 4.523360E-01 2.390188E-01 -499 4.491435E-03 4.650298E-01 2.231335E-01 -500 5.652072E-03 4.780482E-01 2.078158E-01 -501 7.035322E-03 4.915173E-01 1.930407E-01 -502 8.669631E-03 5.054224E-01 1.788089E-01 -503 1.060755E-02 5.197057E-01 1.651287E-01 -504 1.290468E-02 5.343012E-01 1.520103E-01 -505 1.561956E-02 5.491344E-01 1.394643E-01 -506 1.881640E-02 5.641302E-01 1.275353E-01 -507 2.256923E-02 5.792416E-01 1.163771E-01 -508 2.694456E-02 5.944264E-01 1.061161E-01 -509 3.199910E-02 6.096388E-01 9.682266E-02 -510 3.778185E-02 6.248296E-01 8.852389E-02 -511 4.430635E-02 6.399656E-01 8.118263E-02 -512 5.146516E-02 6.550943E-01 7.463132E-02 -513 5.912224E-02 6.702903E-01 6.870644E-02 -514 6.714220E-02 6.856375E-01 6.327834E-02 -515 7.538941E-02 7.012292E-01 5.824484E-02 -516 8.376697E-02 7.171103E-01 5.353812E-02 -517 9.233581E-02 7.330917E-01 4.914863E-02 -518 1.011940E-01 7.489041E-01 4.507511E-02 -519 1.104362E-01 7.642530E-01 4.131175E-02 -520 1.201511E-01 7.788199E-01 3.784916E-02 -521 1.303960E-01 7.923410E-01 3.467234E-02 -522 1.411310E-01 8.048510E-01 3.175471E-02 -523 1.522944E-01 8.164747E-01 2.907029E-02 -524 1.638288E-01 8.273520E-01 2.659651E-02 -525 1.756832E-01 8.376358E-01 2.431375E-02 -526 1.878114E-01 8.474653E-01 2.220677E-02 -527 2.001621E-01 8.568868E-01 2.026852E-02 -528 2.126822E-01 8.659242E-01 1.849246E-02 -529 2.253199E-01 8.746041E-01 1.687084E-02 -530 2.380254E-01 8.829552E-01 1.539505E-02 -531 2.507787E-01 8.910274E-01 1.405450E-02 -532 2.636778E-01 8.989495E-01 1.283354E-02 -533 2.768607E-01 9.068753E-01 1.171754E-02 -534 2.904792E-01 9.149652E-01 1.069415E-02 -535 3.046991E-01 9.233858E-01 9.753000E-03 -536 3.196485E-01 9.322325E-01 8.886096E-03 -537 3.352447E-01 9.412862E-01 8.089323E-03 -538 3.513290E-01 9.502378E-01 7.359131E-03 -539 3.677148E-01 9.587647E-01 6.691736E-03 -540 3.841856E-01 9.665325E-01 6.083223E-03 -541 4.005312E-01 9.732504E-01 5.529423E-03 -542 4.166669E-01 9.788415E-01 5.025504E-03 -543 4.325420E-01 9.832867E-01 4.566879E-03 -544 4.481063E-01 9.865720E-01 4.149405E-03 -545 4.633109E-01 9.886887E-01 3.769336E-03 -546 4.781440E-01 9.897056E-01 3.423302E-03 -547 4.927483E-01 9.899849E-01 3.108313E-03 -548 5.073315E-01 9.899624E-01 2.821650E-03 -549 5.221315E-01 9.900731E-01 2.560830E-03 -550 5.374170E-01 9.907500E-01 2.323578E-03 -551 5.534217E-01 9.922826E-01 2.107847E-03 -552 5.701242E-01 9.943837E-01 1.911867E-03 -553 5.874093E-01 9.966221E-01 1.734006E-03 -554 6.051269E-01 9.985649E-01 1.572736E-03 -555 6.230892E-01 9.997775E-01 1.426627E-03 -556 6.410999E-01 9.999440E-01 1.294325E-03 -557 6.590659E-01 9.992200E-01 1.174475E-03 -558 6.769436E-01 9.978793E-01 1.065842E-03 -559 6.947143E-01 9.961934E-01 9.673215E-04 -560 7.123849E-01 9.944304E-01 8.779264E-04 -561 7.299978E-01 9.927831E-01 7.967847E-04 -562 7.476478E-01 9.911578E-01 7.231502E-04 -563 7.654250E-01 9.893925E-01 6.563501E-04 -564 7.834009E-01 9.873288E-01 5.957678E-04 -565 8.016277E-01 9.848127E-01 5.408385E-04 -566 8.201041E-01 9.817253E-01 4.910441E-04 -567 8.386843E-01 9.780714E-01 4.459046E-04 -568 8.571936E-01 9.738860E-01 4.049826E-04 -569 8.754652E-01 9.692028E-01 3.678818E-04 -570 8.933408E-01 9.640545E-01 3.342429E-04 -571 9.106772E-01 9.584409E-01 3.037407E-04 -572 9.273554E-01 9.522379E-01 2.760809E-04 -573 9.432502E-01 9.452968E-01 2.509970E-04 -574 9.582244E-01 9.374773E-01 2.282474E-04 -575 9.721304E-01 9.286495E-01 2.076129E-04 -576 9.849237E-01 9.187953E-01 1.888948E-04 -577 9.970067E-01 9.083014E-01 1.719127E-04 -578 1.008907E+00 8.976352E-01 1.565030E-04 -579 1.021163E+00 8.872401E-01 1.425177E-04 -580 1.034327E+00 8.775360E-01 1.298230E-04 -581 1.048753E+00 8.687920E-01 1.182974E-04 -582 1.063937E+00 8.607474E-01 1.078310E-04 -583 1.079166E+00 8.530233E-01 9.832455E-05 -584 1.093723E+00 8.452535E-01 8.968787E-05 -585 1.106886E+00 8.370838E-01 8.183954E-05 -586 1.118106E+00 8.282409E-01 7.470582E-05 -587 1.127493E+00 8.187320E-01 6.821991E-05 -588 1.135317E+00 8.086352E-01 6.232132E-05 -589 1.141838E+00 7.980296E-01 5.695534E-05 -590 1.147304E+00 7.869950E-01 5.207245E-05 -591 1.151897E+00 7.756040E-01 4.762781E-05 -592 1.155582E+00 7.638996E-01 4.358082E-05 -593 1.158284E+00 7.519157E-01 3.989468E-05 -594 1.159934E+00 7.396832E-01 3.653612E-05 -595 1.160477E+00 7.272309E-01 3.347499E-05 -596 1.159890E+00 7.145878E-01 3.068400E-05 -597 1.158259E+00 7.017926E-01 2.813839E-05 -598 1.155692E+00 6.888866E-01 2.581574E-05 -599 1.152293E+00 6.759103E-01 2.369574E-05 -600 1.148163E+00 6.629035E-01 2.175998E-05 -601 1.143345E+00 6.498911E-01 1.999179E-05 -602 1.137685E+00 6.368410E-01 1.837603E-05 -603 1.130993E+00 6.237092E-01 1.689896E-05 -604 1.123097E+00 6.104541E-01 1.554815E-05 -605 1.113846E+00 5.970375E-01 1.431231E-05 -606 1.103152E+00 5.834395E-01 1.318119E-05 -607 1.091121E+00 5.697044E-01 1.214548E-05 -608 1.077902E+00 5.558892E-01 1.119673E-05 -609 1.063644E+00 5.420475E-01 1.032727E-05 -610 1.048485E+00 5.282296E-01 9.530130E-06 -611 1.032546E+00 5.144746E-01 8.798979E-06 -612 1.015870E+00 5.007881E-01 8.128065E-06 -613 9.984859E-01 4.871687E-01 7.512160E-06 -614 9.804227E-01 4.736160E-01 6.946506E-06 -615 9.617111E-01 4.601308E-01 6.426776E-06 -616 9.424119E-01 4.467260E-01 0.000000E+00 -617 9.227049E-01 4.334589E-01 0.000000E+00 -618 9.027804E-01 4.203919E-01 0.000000E+00 -619 8.828123E-01 4.075810E-01 0.000000E+00 -620 8.629581E-01 3.950755E-01 0.000000E+00 -621 8.432731E-01 3.828894E-01 0.000000E+00 -622 8.234742E-01 3.709190E-01 0.000000E+00 -623 8.032342E-01 3.590447E-01 0.000000E+00 -624 7.822715E-01 3.471615E-01 0.000000E+00 -625 7.603498E-01 3.351794E-01 0.000000E+00 -626 7.373739E-01 3.230562E-01 0.000000E+00 -627 7.136470E-01 3.108859E-01 0.000000E+00 -628 6.895336E-01 2.987840E-01 0.000000E+00 -629 6.653567E-01 2.868527E-01 0.000000E+00 -630 6.413984E-01 2.751807E-01 0.000000E+00 -631 6.178723E-01 2.638343E-01 0.000000E+00 -632 5.948484E-01 2.528330E-01 0.000000E+00 -633 5.723600E-01 2.421835E-01 0.000000E+00 -634 5.504353E-01 2.318904E-01 0.000000E+00 -635 5.290979E-01 2.219564E-01 0.000000E+00 -636 5.083728E-01 2.123826E-01 0.000000E+00 -637 4.883006E-01 2.031698E-01 0.000000E+00 -638 4.689171E-01 1.943179E-01 0.000000E+00 -639 4.502486E-01 1.858250E-01 0.000000E+00 -640 4.323126E-01 1.776882E-01 0.000000E+00 -641 4.150790E-01 1.698926E-01 0.000000E+00 -642 3.983657E-01 1.623822E-01 0.000000E+00 -643 3.819846E-01 1.550986E-01 0.000000E+00 -644 3.657821E-01 1.479918E-01 0.000000E+00 -645 3.496358E-01 1.410203E-01 0.000000E+00 -646 3.334937E-01 1.341614E-01 0.000000E+00 -647 3.174776E-01 1.274401E-01 0.000000E+00 -648 3.017298E-01 1.208887E-01 0.000000E+00 -649 2.863684E-01 1.145345E-01 0.000000E+00 -650 2.714900E-01 1.083996E-01 0.000000E+00 -651 2.571632E-01 1.025007E-01 0.000000E+00 -652 2.434102E-01 9.684588E-02 0.000000E+00 -653 2.302389E-01 9.143944E-02 0.000000E+00 -654 2.176527E-01 8.628318E-02 0.000000E+00 -655 2.056507E-01 8.137687E-02 0.000000E+00 -656 1.942251E-01 7.671708E-02 0.000000E+00 -657 1.833530E-01 7.229404E-02 0.000000E+00 -658 1.730097E-01 6.809696E-02 0.000000E+00 -659 1.631716E-01 6.411549E-02 0.000000E+00 -660 1.538163E-01 6.033976E-02 0.000000E+00 -661 1.449230E-01 5.676054E-02 0.000000E+00 -662 1.364729E-01 5.336992E-02 0.000000E+00 -663 1.284483E-01 5.016027E-02 0.000000E+00 -664 1.208320E-01 4.712405E-02 0.000000E+00 -665 1.136072E-01 4.425383E-02 0.000000E+00 -666 1.067579E-01 4.154205E-02 0.000000E+00 -667 1.002685E-01 3.898042E-02 0.000000E+00 -668 9.412394E-02 3.656091E-02 0.000000E+00 -669 8.830929E-02 3.427597E-02 0.000000E+00 -670 8.281010E-02 3.211852E-02 0.000000E+00 -671 7.761208E-02 3.008192E-02 0.000000E+00 -672 7.270064E-02 2.816001E-02 0.000000E+00 -673 6.806167E-02 2.634698E-02 0.000000E+00 -674 6.368176E-02 2.463731E-02 0.000000E+00 -675 5.954815E-02 2.302574E-02 0.000000E+00 -676 5.564917E-02 2.150743E-02 0.000000E+00 -677 5.197543E-02 2.007838E-02 0.000000E+00 -678 4.851788E-02 1.873474E-02 0.000000E+00 -679 4.526737E-02 1.747269E-02 0.000000E+00 -680 4.221473E-02 1.628841E-02 0.000000E+00 -681 3.934954E-02 1.517767E-02 0.000000E+00 -682 3.665730E-02 1.413473E-02 0.000000E+00 -683 3.412407E-02 1.315408E-02 0.000000E+00 -684 3.173768E-02 1.223092E-02 0.000000E+00 -685 2.948752E-02 1.136106E-02 0.000000E+00 -686 2.736717E-02 1.054190E-02 0.000000E+00 -687 2.538113E-02 9.775050E-03 0.000000E+00 -688 2.353356E-02 9.061962E-03 0.000000E+00 -689 2.182558E-02 8.402962E-03 0.000000E+00 -690 2.025590E-02 7.797457E-03 0.000000E+00 -691 1.881892E-02 7.243230E-03 0.000000E+00 -692 1.749930E-02 6.734381E-03 0.000000E+00 -693 1.628167E-02 6.265001E-03 0.000000E+00 -694 1.515301E-02 5.830085E-03 0.000000E+00 -695 1.410230E-02 5.425391E-03 0.000000E+00 -696 1.312106E-02 5.047634E-03 0.000000E+00 -697 1.220509E-02 4.695140E-03 0.000000E+00 -698 1.135114E-02 4.366592E-03 0.000000E+00 -699 1.055593E-02 4.060685E-03 0.000000E+00 -700 9.816228E-03 3.776140E-03 0.000000E+00 -701 9.128517E-03 3.511578E-03 0.000000E+00 -702 8.488116E-03 3.265211E-03 0.000000E+00 -703 7.890589E-03 3.035344E-03 0.000000E+00 -704 7.332061E-03 2.820496E-03 0.000000E+00 -705 6.809147E-03 2.619372E-03 0.000000E+00 -706 6.319204E-03 2.430960E-03 0.000000E+00 -707 5.861036E-03 2.254796E-03 0.000000E+00 -708 5.433624E-03 2.090489E-03 0.000000E+00 -709 5.035802E-03 1.937586E-03 0.000000E+00 -710 4.666298E-03 1.795595E-03 0.000000E+00 -711 4.323750E-03 1.663989E-03 0.000000E+00 -712 4.006709E-03 1.542195E-03 0.000000E+00 -713 3.713708E-03 1.429639E-03 0.000000E+00 -714 3.443294E-03 1.325752E-03 0.000000E+00 -715 3.194041E-03 1.229980E-03 0.000000E+00 -716 2.964424E-03 1.141734E-03 0.000000E+00 -717 2.752492E-03 1.060269E-03 0.000000E+00 -718 2.556406E-03 9.848854E-04 0.000000E+00 -719 2.374564E-03 9.149703E-04 0.000000E+00 -720 2.205568E-03 8.499903E-04 0.000000E+00 -721 2.048294E-03 7.895158E-04 0.000000E+00 -722 1.902113E-03 7.333038E-04 0.000000E+00 -723 1.766485E-03 6.811458E-04 0.000000E+00 -724 1.640857E-03 6.328287E-04 0.000000E+00 -725 1.524672E-03 5.881375E-04 0.000000E+00 -726 1.417322E-03 5.468389E-04 0.000000E+00 -727 1.318031E-03 5.086349E-04 0.000000E+00 -728 1.226059E-03 4.732403E-04 0.000000E+00 -729 1.140743E-03 4.404016E-04 0.000000E+00 -730 1.061495E-03 4.098928E-04 0.000000E+00 -731 9.877949E-04 3.815137E-04 0.000000E+00 -732 9.191847E-04 3.550902E-04 0.000000E+00 -733 8.552568E-04 3.304668E-04 0.000000E+00 -734 7.956433E-04 3.075030E-04 0.000000E+00 -735 7.400120E-04 2.860718E-04 0.000000E+00 -736 6.880980E-04 2.660718E-04 0.000000E+00 -737 6.397864E-04 2.474586E-04 0.000000E+00 -738 5.949726E-04 2.301919E-04 0.000000E+00 -739 5.535291E-04 2.142225E-04 0.000000E+00 -740 5.153113E-04 1.994949E-04 0.000000E+00 -741 4.801234E-04 1.859336E-04 0.000000E+00 -742 4.476245E-04 1.734067E-04 0.000000E+00 -743 4.174846E-04 1.617865E-04 0.000000E+00 -744 3.894221E-04 1.509641E-04 0.000000E+00 -745 3.631969E-04 1.408466E-04 0.000000E+00 -746 3.386279E-04 1.313642E-04 0.000000E+00 -747 3.156452E-04 1.224905E-04 0.000000E+00 -748 2.941966E-04 1.142060E-04 0.000000E+00 -749 2.742235E-04 1.064886E-04 0.000000E+00 -750 2.556624E-04 9.931439E-05 0.000000E+00 -751 2.384390E-04 9.265512E-05 0.000000E+00 -752 2.224525E-04 8.647225E-05 0.000000E+00 -753 2.076036E-04 8.072780E-05 0.000000E+00 -754 1.938018E-04 7.538716E-05 0.000000E+00 -755 1.809649E-04 7.041878E-05 0.000000E+00 -756 1.690167E-04 6.579338E-05 0.000000E+00 -757 1.578839E-04 6.148250E-05 0.000000E+00 -758 1.474993E-04 5.746008E-05 0.000000E+00 -759 1.378026E-04 5.370272E-05 0.000000E+00 -760 1.287394E-04 5.018934E-05 0.000000E+00 -761 1.202644E-04 4.690245E-05 0.000000E+00 -762 1.123502E-04 4.383167E-05 0.000000E+00 -763 1.049725E-04 4.096780E-05 0.000000E+00 -764 9.810596E-05 3.830123E-05 0.000000E+00 -765 9.172477E-05 3.582218E-05 0.000000E+00 -766 8.579861E-05 3.351903E-05 0.000000E+00 -767 8.028174E-05 3.137419E-05 0.000000E+00 -768 7.513013E-05 2.937068E-05 0.000000E+00 -769 7.030565E-05 2.749380E-05 0.000000E+00 -770 6.577532E-05 2.573083E-05 0.000000E+00 -771 6.151508E-05 2.407249E-05 0.000000E+00 -772 5.752025E-05 2.251704E-05 0.000000E+00 -773 5.378813E-05 2.106350E-05 0.000000E+00 -774 5.031350E-05 1.970991E-05 0.000000E+00 -775 4.708916E-05 1.845353E-05 0.000000E+00 -776 4.410322E-05 1.728979E-05 0.000000E+00 -777 4.133150E-05 1.620928E-05 0.000000E+00 -778 3.874992E-05 1.520262E-05 0.000000E+00 -779 3.633762E-05 1.426169E-05 0.000000E+00 -780 3.407653E-05 1.337946E-05 0.000000E+00 -781 3.195242E-05 1.255038E-05 0.000000E+00 -782 2.995808E-05 1.177169E-05 0.000000E+00 -783 2.808781E-05 1.104118E-05 0.000000E+00 -784 2.633581E-05 1.035662E-05 0.000000E+00 -785 2.469630E-05 9.715798E-06 0.000000E+00 -786 2.316311E-05 9.116316E-06 0.000000E+00 -787 2.172855E-05 8.555201E-06 0.000000E+00 -788 2.038519E-05 8.029561E-06 0.000000E+00 -789 1.912625E-05 7.536768E-06 0.000000E+00 -790 1.794555E-05 7.074424E-06 0.000000E+00 -791 1.683776E-05 6.640464E-06 0.000000E+00 -792 1.579907E-05 6.233437E-06 0.000000E+00 -793 1.482604E-05 5.852035E-06 0.000000E+00 -794 1.391527E-05 5.494963E-06 0.000000E+00 -795 1.306345E-05 5.160948E-06 0.000000E+00 -796 1.226720E-05 4.848687E-06 0.000000E+00 -797 1.152279E-05 4.556705E-06 0.000000E+00 -798 1.082663E-05 4.283580E-06 0.000000E+00 -799 1.017540E-05 4.027993E-06 0.000000E+00 -800 9.565993E-06 3.788729E-06 0.000000E+00 -801 8.995405E-06 3.564599E-06 0.000000E+00 -802 8.460253E-06 3.354285E-06 0.000000E+00 -803 7.957382E-06 3.156557E-06 0.000000E+00 -804 7.483997E-06 2.970326E-06 0.000000E+00 -805 7.037621E-06 2.794625E-06 0.000000E+00 -806 6.616311E-06 2.628701E-06 0.000000E+00 -807 6.219265E-06 2.472248E-06 0.000000E+00 -808 5.845844E-06 2.325030E-06 0.000000E+00 -809 5.495311E-06 2.186768E-06 0.000000E+00 -810 5.166853E-06 2.057152E-06 0.000000E+00 -811 4.859511E-06 1.935813E-06 0.000000E+00 -812 4.571973E-06 1.822239E-06 0.000000E+00 -813 4.302920E-06 1.715914E-06 0.000000E+00 -814 4.051121E-06 1.616355E-06 0.000000E+00 -815 3.815429E-06 1.523114E-06 0.000000E+00 -816 3.594719E-06 1.435750E-06 0.000000E+00 -817 3.387736E-06 1.353771E-06 0.000000E+00 -818 3.193301E-06 1.276714E-06 0.000000E+00 -819 3.010363E-06 1.204166E-06 0.000000E+00 -820 2.837980E-06 1.135758E-06 0.000000E+00 -821 2.675365E-06 1.071181E-06 0.000000E+00 -822 2.522020E-06 1.010243E-06 0.000000E+00 -823 2.377511E-06 9.527779E-07 0.000000E+00 -824 2.241417E-06 8.986224E-07 0.000000E+00 -825 2.113325E-06 8.476168E-07 0.000000E+00 -826 1.992830E-06 7.996052E-07 0.000000E+00 -827 1.879542E-06 7.544361E-07 0.000000E+00 -828 1.773083E-06 7.119624E-07 0.000000E+00 -829 1.673086E-06 6.720421E-07 0.000000E+00 -830 1.579199E-06 6.345380E-07 0.000000E+00 -#endif /* NEVER */ #endif /* !SALONEINSTLIB */ /* Return pointers to three xpsects with a standard observer weighting curves */ @@ -2875,6 +2559,16 @@ icxObserverType obType /* Type of observer */ sp[1] = &ob_CIE_1964_10[1]; sp[2] = &ob_CIE_1964_10[2]; return 0; + case icxOT_CIE_2012_2: + sp[0] = &ob_CIE_2012_2[0]; + sp[1] = &ob_CIE_2012_2[1]; + sp[2] = &ob_CIE_2012_2[2]; + return 0; + case icxOT_CIE_2012_10: + sp[0] = &ob_CIE_2012_10[0]; + sp[1] = &ob_CIE_2012_10[1]; + sp[2] = &ob_CIE_2012_10[2]; + return 0; #ifndef SALONEINSTLIB case icxOT_Stiles_Burch_2: sp[0] = &ob_Stiles_Burch_2[0]; @@ -2919,6 +2613,10 @@ char *standardObserverDescription(icxObserverType obType) { return "CIE 1931 2 degree observer"; case icxOT_CIE_1964_10: return "CIE 1964 10 degree observer"; + case icxOT_CIE_2012_2: + return "CIE 2012 2 degree observer"; + case icxOT_CIE_2012_10: + return "CIE 2012 10 degree observer"; #ifndef SALONEINSTLIB case icxOT_Stiles_Burch_2: return "Stiles & Burch 1955 2 degree observer (aligned)"; @@ -3847,7 +3545,9 @@ char *meas_type2str(inst_meas_type mt) { /* save a set of spectrum to a CGATS file */ /* type 0 = SPECT, 1 = CMF */ /* Return NZ on error */ -int write_nxspect(char *fname, inst_meas_type mt, xspect *sp, int nspec, int type) { + +/* Part 1 */ +int write_nxspect_1(cgats **pocg, inst_meas_type mt, xspect *sp, int nspec, int type) { char buf[100]; time_t clk = time(0); struct tm *tsp = localtime(&clk); @@ -3893,53 +3593,77 @@ int write_nxspect(char *fname, inst_meas_type mt, xspect *sp, int nspec, int typ ocg->add_kword(ocg, 0, "MEAS_TYPE",tag, NULL); } - sprintf(buf,"%d", sp->spec_n); - ocg->add_kword(ocg, 0, "SPECTRAL_BANDS",buf, NULL); + if (sp != NULL) { + sprintf(buf,"%d", sp->spec_n); + ocg->add_kword(ocg, 0, "SPECTRAL_BANDS",buf, NULL); - sprintf(buf,"%d", sp->spec_n); - ocg->add_kword(ocg, 0, "SPECTRAL_BANDS",buf, NULL); - sprintf(buf,"%f", sp->spec_wl_short); - ocg->add_kword(ocg, 0, "SPECTRAL_START_NM",buf, NULL); - sprintf(buf,"%f", sp->spec_wl_long); - ocg->add_kword(ocg, 0, "SPECTRAL_END_NM",buf, NULL); - sprintf(buf,"%f", sp->norm); - ocg->add_kword(ocg, 0, "SPECTRAL_NORM",buf, NULL); + sprintf(buf,"%d", sp->spec_n); + ocg->add_kword(ocg, 0, "SPECTRAL_BANDS",buf, NULL); + sprintf(buf,"%f", sp->spec_wl_short); + ocg->add_kword(ocg, 0, "SPECTRAL_START_NM",buf, NULL); + sprintf(buf,"%f", sp->spec_wl_long); + ocg->add_kword(ocg, 0, "SPECTRAL_END_NM",buf, NULL); + sprintf(buf,"%f", sp->norm); + ocg->add_kword(ocg, 0, "SPECTRAL_NORM",buf, NULL); - /* Should we adda A COORD field for "CMF" and an INDEX field for "SPECT" ? */ + /* Should we adda A COORD field for "CMF" and an INDEX field for "SPECT" ? */ - /* Generate fields for spectral values */ - for (i = 0; i < sp->spec_n; i++) { - int nm; + /* Generate fields for spectral values */ + for (i = 0; i < sp->spec_n; i++) { + int nm; - /* Compute nearest integer wavelength */ - nm = (int)(XSPECT_XWL(sp, i) + 0.5); - sprintf(buf,"SPEC_%03d",nm); - ocg->add_field(ocg, 0, buf, r_t); - } + /* Compute nearest integer wavelength */ + nm = (int)(XSPECT_XWL(sp, i) + 0.5); + sprintf(buf,"SPEC_%03d",nm); + ocg->add_field(ocg, 0, buf, r_t); + } - if ((setel = (cgats_set_elem *)malloc(sizeof(cgats_set_elem) * sp->spec_n)) == NULL) { - ocg->del(ocg); - return 1; - } + if ((setel = (cgats_set_elem *)malloc(sizeof(cgats_set_elem) * sp->spec_n)) == NULL) { + ocg->del(ocg); + return 1; + } - for (j = 0; j < nspec; j++) { - for (i = 0; i < sp[j].spec_n; i++) { - setel[i].d = sp[j].spec[i]; + for (j = 0; j < nspec; j++) { + for (i = 0; i < sp[j].spec_n; i++) { + setel[i].d = sp[j].spec[i]; + } + ocg->add_setarr(ocg, 0, setel); } - ocg->add_setarr(ocg, 0, setel); - } + + free(setel); + } /* end save spectra */ + + *pocg = ocg; + + return 0; +} + +/* Part 2 */ +int write_nxspect_2(cgats *ocg, char *fname) { if (ocg->write_name(ocg, fname)) { DBGF((DBGA,"CGATS file write error : %s\n",ocg->err)); return 1; } - free(setel); - ocg->del(ocg); /* Clean up */ + ocg->del(ocg); /* Write & Clean up */ return 0; } +/* save a set of spectrum to a CGATS file */ +/* type 0 = SPECT, 1 = CMF */ +/* Return NZ on error */ +int write_nxspect(char *fname, inst_meas_type mt, xspect *sp, int nspec, int type) { + cgats *ocg; + int rv; + + if ((rv = write_nxspect_1(&ocg, mt, sp, nspec, type)) != 0) + return rv; + + return write_nxspect_2(ocg, fname); +} + /* Restore a set of spectrum from a CGATS file. */ /* Up to nspec will be restored starting at offset off. */ /* The number restored from the file will be written to *nret */ @@ -3947,7 +3671,9 @@ int write_nxspect(char *fname, inst_meas_type mt, xspect *sp, int nspec, int typ /* (Note that not all ccss information is read. Use ccss->read_ccss() for this. */ /* Return NZ on error */ /* (Would be nice to return an error message!) */ -int read_nxspect(xspect *sp, inst_meas_type *mt, char *fname, + +/* Part 1 */ +int read_nxspect_1(cgats **picg, xspect *sp, inst_meas_type *mt, char *fname, int *nret, int off, int nspec, int type) { cgats *icg; /* input cgats structure */ char buf[100]; @@ -4004,71 +3730,96 @@ int read_nxspect(xspect *sp, inst_meas_type *mt, char *fname, *mt = inst_mrt_none; } - if ((ii = icg->find_kword(icg, 0, "SPECTRAL_BANDS")) < 0) { - DBG ("Input file doesn't contain keyword SPECTRAL_BANDS\n"); - icg->del(icg); - return 1; - } - proto.spec_n = atoi(icg->t[0].kdata[ii]); - if ((ii = icg->find_kword(icg, 0, "SPECTRAL_START_NM")) < 0) { - DBG("Input file doesn't contain keyword SPECTRAL_START_NM\n"); - icg->del(icg); - return 1; - } - proto.spec_wl_short = atof(icg->t[0].kdata[ii]); - if ((ii = icg->find_kword(icg, 0, "SPECTRAL_END_NM")) < 0) { - DBG("Input file doesn't contain keyword SPECTRAL_END_NM\n"); - icg->del(icg); - return 1; - } - proto.spec_wl_long = atof(icg->t[0].kdata[ii]); - - if ((ii = icg->find_kword(icg, 0, "SPECTRAL_NORM")) < 0) { - DBG("Input file doesn't contain keyword SPECTRAL_NORM - assuming 1.0\n"); - proto.norm = 1.0; - } else { - proto.norm = atof(icg->t[0].kdata[ii]); - } - - /* Find the fields for spectral values */ - for (i = 0; i < proto.spec_n; i++) { - int nm, fi; - - /* Compute nearest integer wavelength */ - nm = (int)(XSPECT_XWL(&proto, i) + 0.5); - sprintf(buf,"SPEC_%03d",nm); - - if ((fi = icg->find_field(icg, 0, buf)) < 0) { - DBGF((DBGA,"Input file doesn't contain field %s\n",buf)); + if (sp != NULL) { + if ((ii = icg->find_kword(icg, 0, "SPECTRAL_BANDS")) < 0) { + DBG ("Input file doesn't contain keyword SPECTRAL_BANDS\n"); icg->del(icg); return 1; } - - if (icg->t[0].ftype[fi] != r_t) { - DBGF((DBGA,"Field %s in specrum is wrong type - should be a float\n",buf)); + proto.spec_n = atoi(icg->t[0].kdata[ii]); + if ((ii = icg->find_kword(icg, 0, "SPECTRAL_START_NM")) < 0) { + DBG("Input file doesn't contain keyword SPECTRAL_START_NM\n"); icg->del(icg); return 1; } - sflds[i] = fi; - } - - /* Read all the spectra */ - for (j = off; j < (off + nspec) && j < icg->t[0].nsets; j++) { + proto.spec_wl_short = atof(icg->t[0].kdata[ii]); + if ((ii = icg->find_kword(icg, 0, "SPECTRAL_END_NM")) < 0) { + DBG("Input file doesn't contain keyword SPECTRAL_END_NM\n"); + icg->del(icg); + return 1; + } + proto.spec_wl_long = atof(icg->t[0].kdata[ii]); - XSPECT_COPY_INFO(&sp[j-off], &proto); + if ((ii = icg->find_kword(icg, 0, "SPECTRAL_NORM")) < 0) { + DBG("Input file doesn't contain keyword SPECTRAL_NORM - assuming 1.0\n"); + proto.norm = 1.0; + } else { + proto.norm = atof(icg->t[0].kdata[ii]); + } + /* Find the fields for spectral values */ for (i = 0; i < proto.spec_n; i++) { - sp[j-off].spec[i] = *((double *)icg->t[0].fdata[j][sflds[i]]); + int nm, fi; + + /* Compute nearest integer wavelength */ + nm = (int)(XSPECT_XWL(&proto, i) + 0.5); + sprintf(buf,"SPEC_%03d",nm); + + if ((fi = icg->find_field(icg, 0, buf)) < 0) { + DBGF((DBGA,"Input file doesn't contain field %s\n",buf)); + icg->del(icg); + return 1; + } + + if (icg->t[0].ftype[fi] != r_t) { + DBGF((DBGA,"Field %s in specrum is wrong type - should be a float\n",buf)); + icg->del(icg); + return 1; + } + sflds[i] = fi; } + + /* Read all the spectra */ + for (j = off; j < (off + nspec) && j < icg->t[0].nsets; j++) { + + XSPECT_COPY_INFO(&sp[j-off], &proto); + + for (i = 0; i < proto.spec_n; i++) { + sp[j-off].spec[i] = *((double *)icg->t[0].fdata[j][sflds[i]]); + } + } + if (nret != NULL) + *nret = j - off; + + /* If there are no spevctra to save */ + } else { + if (nret != NULL) + *nret = 0; } - if (nret != NULL) - *nret = j - off; + + *picg = icg; + + return 0; +} + +int read_nxspect_2(cgats *icg) { icg->del(icg); return 0; } +int read_nxspect(xspect *sp, inst_meas_type *mt, char *fname, + int *nret, int off, int nspec, int type) { + cgats *icg; + int rv; + + if ((rv = read_nxspect_1(&icg, sp, mt, fname, nret, off, nspec, type)) != 0) + return rv; + + return read_nxspect_2(icg); +} + /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* save a spectrum to a CGATS file */ @@ -4077,6 +3828,14 @@ int write_xspect(char *fname, inst_meas_type mt, xspect *sp) { return write_nxspect(fname, mt, sp, 1, 0); } +int write_xspect_1(cgats **ocgp, inst_meas_type mt, xspect *sp) { + return write_nxspect_1(ocgp, mt, sp, 1, 0); +} + +int write_xspect_2(cgats *ocg, char *fname) { + return write_nxspect_2(ocg, fname); +} + /* restore a spectrum from a CGATS file */ /* Return NZ on error */ /* (Would be nice to return an error message!) */ @@ -4093,6 +3852,23 @@ int read_xspect(xspect *sp, inst_meas_type *mt, char *fname) { return 0; } +int read_xspect_1(cgats **picg, xspect *sp, inst_meas_type *mt, char *fname) { + int rv, nret; + + if ((rv = read_nxspect_1(picg, sp, mt, fname, &nret, 0, 1, 1)) != 0) + return rv; + if (nret != 1) { + DBG("Didn't read one spectra\n"); + return 1; + } + + return 0; +} + +int read_xspect_2(cgats *icg) { + return read_nxspect_2(icg); +} + /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* save a set of 3 spectrum to a CGATS CMF file */ /* Return NZ on error */ @@ -4290,6 +4066,69 @@ static int getval_raw_xspec3_lin(xspect *sp, double *rv, double wl) { return rc; } +/* Get a raw 3rd order polinomial interpolated spectrum value x 3 */ +/* Return NZ if value is valid, Z and xtrapolated value */ +/* if outside the range */ +/* NOTE: Returned value isn't normalised by sp->norm */ +static int getval_raw_xspec3_poly3(xspect *sp, double *rv, double xw) { + int i, rc = 1; + double spcing, f; + double x[4], k[4]; + + if (xw < sp[0].spec_wl_short) { + xw = sp[0].spec_wl_short; + rc = 0; + } + + if (xw > sp[0].spec_wl_long) { + xw = sp[0].spec_wl_long; + rc = 0; + } + + /* Compute fraction 0.0 - 1.0 out of known spectrum. */ + /* Place it so that the target wavelength lands in middle section */ + /* of Lagrange basis points. */ + spcing = (sp[0].spec_wl_long - sp[0].spec_wl_short)/(sp[0].spec_n-1.0); + f = (xw - sp[0].spec_wl_short) / (sp[0].spec_wl_long - sp[0].spec_wl_short); + f *= (sp[0].spec_n - 1.0); + i = (int)floor(f); /* Base grid coordinate */ + + if (i < 1) /* Limit to valid Lagrange basis index range, */ + i = 1; /* and extrapolate from that at ends. */ + else if (i > (sp[0].spec_n - 3)) + i = (sp[0].spec_n - 3); + + /* Setup the surrounding values */ + x[0] = sp[0].spec_wl_short + (i-1) * spcing; + x[1] = sp[0].spec_wl_short + i * spcing; + x[2] = sp[0].spec_wl_short + (i+1) * spcing; + x[3] = sp[0].spec_wl_short + (i+2) * spcing; + + /* Setup weightings */ + k[0] = (xw-x[1]) * (xw-x[2]) * (xw-x[3])/((x[0]-x[1]) * (x[0]-x[2]) * (x[0]-x[3])); + k[1] = (xw-x[0]) * (xw-x[2]) * (xw-x[3])/((x[1]-x[0]) * (x[1]-x[2]) * (x[1]-x[3])); + k[2] = (xw-x[0]) * (xw-x[1]) * (xw-x[3])/((x[2]-x[0]) * (x[2]-x[1]) * (x[2]-x[3])); + k[3] = (xw-x[0]) * (xw-x[1]) * (xw-x[2])/((x[3]-x[0]) * (x[3]-x[1]) * (x[3]-x[2])); + + /* Compute interpolated value using Lagrange: */ + rv[0] = k[0] * sp[0].spec[i-1] + + k[1] * sp[0].spec[i] + + k[2] * sp[0].spec[i+1] + + k[3] * sp[0].spec[i+2]; + + rv[1] = k[0] * sp[1].spec[i-1] + + k[1] * sp[1].spec[i] + + k[2] * sp[1].spec[i+1] + + k[3] * sp[1].spec[i+2]; + + rv[2] = k[0] * sp[2].spec[i-1] + + k[1] * sp[2].spec[i] + + k[2] * sp[2].spec[i+1] + + k[3] * sp[2].spec[i+2]; + + return rc; +} + #ifdef NEVER /* Nearest neighbor resampler, for testing */ /* Get a raw nearest-neighbor interpolated spectrum value. */ /* Return NZ if value is valid, Z and last valid value */ @@ -4342,6 +4181,9 @@ static int getval_raw_xspec_nn(xspect *sp, double *rv, double wl) { static int getval_raw_xspec(xspect *sp, double *rv, double wl) { double spcg = (sp->spec_wl_long - sp->spec_wl_short)/(sp->spec_n-1.0); + /* Hmm. Should we use poly3 for all spot resampling ? */ + /* - or is it better to use linear on the assumption */ + /* that the fwhm is rarely better than 5nm ? */ if (spcg < 5.01) { return getval_raw_xspec_lin(sp, rv, wl); } else { @@ -4387,6 +4229,15 @@ void xspect_denorm(xspect *sp) { sp->norm = 1.0; } +/* Scale the spectral values (don't alter norm) */ +void xspect_scale(xspect *sp, double scale) { + int i; + + for (i = 0; i < sp->spec_n; i++) { + sp->spec[i] *= scale; + } +} + #ifndef SALONEINSTLIB /* Convert from one xspect type to another (targ type) */ @@ -4420,6 +4271,25 @@ void xspect2xspect(xspect *dst, xspect *targ, xspect *src) { } /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ +/* Dump a spectra to stdout */ +void xspect_dump(xspect *sp) { + int i; + + printf("\t%d, %f, %f\n",sp->spec_n,sp->spec_wl_short,sp->spec_wl_long); + printf("\t%f\n",sp->norm); + + for (i = 0; i < sp->spec_n; i++) { + if ((i % 5) == 0) + printf("\t\t"); + printf("%f%s ", sp->spec[i],(i < sp->spec_n-1) ? "," : ""); + if ((i % 5) == 4 || i == (sp->spec_n-1)) + printf("\n"); + } + printf("\n"); +} + +/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ + /* Plot up to 3 spectra */ void xspect_plot_w(xspect *sp1, xspect *sp2, xspect *sp3, int wait) { static double xx[XSPECT_MAX_BANDS]; @@ -4483,7 +4353,7 @@ void xspect_plot(xspect *sp1, xspect *sp2, xspect *sp3) { xspect_plot_w(sp1, sp2, sp3, 1); } -/* Plot up to 10 spectra */ +/* Plot up to 10 spectra in an array */ void xspect_plot10(xspect *sp, int n) { double xx[XSPECT_MAX_BANDS]; double *yp[10]; @@ -4525,6 +4395,60 @@ void xspect_plot10(xspect *sp, int n) { yp[5], yp[6], yp[7], yp[8], yp[9], j, 0); } +/* Plot up to 10 spectra pointed to by an array */ +void xspect_plot10p_w(xspect *sp[10], int n, int wait) { + double xx[XSPECT_MAX_BANDS]; + double *yp[10]; + double yy[10][XSPECT_MAX_BANDS]; + double wl, wlshort, wllong; + int i, j; + + for (i = 0; i < 10; i++) + yp[i] = NULL; + + if (sp == NULL) + return; + + wlshort = 1e6; + wllong = -1e6; + + for (i = 0; i < n; i++) { + if (sp[i] == NULL) + continue; + if (sp[i]->spec_wl_short < wlshort) + wlshort = sp[i]->spec_wl_short; + if (sp[i]->spec_wl_long > wllong) + wllong = sp[i]->spec_wl_long; + } + + if (wlshort > wllong) + return; + + wlshort = floor(wlshort + 0.5); + wllong = floor(wllong + 0.5); + + /* Compute at 1nm intervals over the whole range covered */ + for (j = 0, wl = wlshort; j < XSPECT_MAX_BANDS && wl < wllong; j++, wl += 1.0) { +#if defined(__APPLE__) && defined(__POWERPC__) + gcc_bug_fix(j); +#endif + xx[j] = wl; + for (i = 0; i < n; i++) { + if (sp[i] == NULL) + continue; + yp[i] = yy[i]; + yy[i][j] = value_xspect(sp[i], wl); + } + } + do_plot10pw(xx, yp[0], yp[1], yp[2], yp[3], yp[4], + yp[5], yp[6], yp[7], yp[8], yp[9], j, NULL, NULL, 0, wait); +} + +/* Plot up to 10 spectra pointed to by an array * wait for a key */ +void xspect_plot10p(xspect *sp[10], int n) { + xspect_plot10p_w(sp, n, 1); +} + /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* Given an emission spectrum, set the UV output to the given level. */ @@ -4655,6 +4579,7 @@ xspect *in /* Colorant reflectance to be applied */ } /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ +static void xsp2cie_photo2rad(xsp2cie *p, double *rout, double *pout, xspect *sout, xspect *in); static void xsp2cie_fwa_convert(xsp2cie *p, double *out, xspect *in); static void xsp2cie_fwa_sconvert(xsp2cie *p, xspect *sout, double *out, xspect *in); static int xsp2cie_fwa_extract(xsp2cie *p, xspect *out, xspect *in); @@ -5336,6 +5261,7 @@ xspect *in /* Spectrum to be converted */ if (p->isemis) { scale = 0.683002; /* Convert from mW/m^2 to Lumens/m^2 */ /* (== 683 Luments/Watt/m^2) */ + scale *= p->spec_bw; /* Scale for integration interval */ } else { scale = 1.0/scale; } @@ -5425,8 +5351,10 @@ xspect *in /* Spectrum to be converted */ } /* If Lab is target, convert to D50 Lab */ - if (p->doLab) { + if (p->doLab == 1) { icmXYZ2Lab(&icmD50, wout, wout); + } else if (p->doLab == 2) { + icmXYZ2Lpt(&icmD50, wout, wout); } if (out != NULL) { @@ -5669,6 +5597,90 @@ xspect *in /* Colorant reflectance to be applied */ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ #endif /* !SALONEINSTLIB */ +/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ + +/* Convert spectrum from photometric to radiometric. */ +/* Note that the input spectrum normalisation value is used. */ +/* Emissive spectral values are assumed to be in mW/nm, and sampled */ +/* rather than integrated if they are not at 1nm spacing. */ +static void xsp2cie_photo2rad( +xsp2cie *p, /* this */ +double *routp, /* Return total lumens */ +double *poutp, /* Return total mW */ +xspect *sout, /* Return input spectrum converted to lm/nm */ +xspect *in /* Spectrum to be converted */ +) { + double rscale = 0.0; + double rout, pout; + double ww; + + /* Compute the Y value (normalised to 1.0) */ + /* Integrate at 1nm intervals over the observer range (as */ + /* per CIE recommendations). Lower resolution spectra are */ + /* upsampled using linear/3rd order polinomial interpolated */ + /* (also as per CIE recommendations), and consistent (?) with the */ + /* assumption of a triangular spectral response made in the */ + /* ANSI CGATS.5-1993 spec. If illumninant or material spectra */ + /* values are truncated at the extremes, then the last valid values */ + /* are used, also consistent with CIE and ANSI CGATS recommendations. */ + rout = 0.0; + pout = 0.0; + for (ww = p->spec_wl_short; ww <= p->spec_wl_long; ww += p->spec_bw) { + double I = 1.0, O, S; + if (!p->isemis) + getval_xspec(&p->illuminant, &I, ww); + getval_xspec(&p->observer[1], &O, ww); + getval_xspec(in, &S, ww); + rscale += I * O; /* Integrate Y illuminant * observer values */ + rout += I * O * S; + pout += S; + } + + if (p->isemis) { + // Hmm. Should we really make rscale += O for this case and then + // rscale = 0.683002/rscale ?? + rscale = 0.683002; /* Convert from mW/m^2 to Lumens/m^2 */ + /* (== 683 Luments/Watt/m^2) */ + } else { + rscale *= p->spec_bw; /* Scale for integration interval */ + rscale = 1.0/rscale; + } + /* Scale for illuminant/observer normalisation of Y */ + rout *= rscale; +#ifdef CLAMP_XYZ + if (p->clamp && rout < 0.0) + rout = 0.0; /* Just to be sure we don't get silly values */ +#endif /* CLAMP_XYZ */ + if (routp != NULL) + *routp = rout; + + pout *= p->spec_bw; /* Scale for integration interval */ + if (poutp != NULL) + *poutp = pout; + + /* Compute phometric output spectrum. For reflective/transmissive, this is */ + /* the illuminant times the reflectivity/transmissitivity times Y weighting, */ + /* for emisive this is the spectrum times the Y weighting */ + if (sout != NULL) { + int i; + + *sout = *in; /* Structure copy */ + + for (i = 0; i < in->spec_n; i++) { + double I = 1.0, O, S; + + ww = XSPECT_XWL(in, i); + + if (!p->isemis) + getval_xspec(&p->illuminant, &I, ww); + getval_xspec(&p->observer[1], &O, ww); + getval_xspec(in, &S, ww); + sout->spec[i] = rscale * I * O * S; + } + } +} + +/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* Override the integration wavelength range and step size */ static void xsp2cie_set_int_steps( xsp2cie *p, /* this */ @@ -5723,6 +5735,7 @@ xspect *in /* Spectrum to be converted */ // scale = 0.683002/scale ?? scale = 0.683002; /* Convert from mW/m^2 to Lumens/m^2 */ /* (== 683 Luments/Watt/m^2) */ + scale *= p->spec_bw; /* Scale for integration interval */ } else { scale = 1.0/scale; } @@ -5735,8 +5748,10 @@ xspect *in /* Spectrum to be converted */ } /* If Lab is target, convert to D50 Lab */ - if (p->doLab) { + if (p->doLab == 1) { icmXYZ2Lab(&icmD50, out, out); + } else if (p->doLab == 2) { + icmXYZ2Lpt(&icmD50, out, out); } if (sout != NULL) { @@ -5756,8 +5771,10 @@ void xsp2cie_get_cie_il(xsp2cie *p, double *xyz) { standardIlluminant(&sp, icxIT_E, 0.0); p->convert(p, xyz, &sp); - if (p->doLab) + if (p->doLab == 1) icmLab2XYZ(&icmD50, xyz, xyz); + else if (p->doLab == 2) + icmLpt2XYZ(&icmD50, xyz, xyz); } void xsp2cie_del( @@ -5774,6 +5791,7 @@ xspect *custIllum, /* Custom illuminant if ilType == icxIT_custom */ icxObserverType obType, /* Observer */ xspect custObserver[3], /* Custom observer if obType == icxOT_custom */ icColorSpaceSignature rcs, /* Return color space, icSigXYZData or D50 icSigLabData */ + /* or D50 icmSigLptData */ /* ** Must be icSigXYZData if SALONEINSTLIB ** */ icxClamping clamp /* NZ to clamp XYZ/Lab to be +ve */ ) { @@ -5855,6 +5873,16 @@ icxClamping clamp /* NZ to clamp XYZ/Lab to be +ve */ p->observer[1] = ob_CIE_1964_10[1]; p->observer[2] = ob_CIE_1964_10[2]; break; + case icxOT_CIE_2012_2: + p->observer[0] = ob_CIE_2012_2[0]; + p->observer[1] = ob_CIE_2012_2[1]; + p->observer[2] = ob_CIE_2012_2[2]; + break; + case icxOT_CIE_2012_10: + p->observer[0] = ob_CIE_2012_10[0]; + p->observer[1] = ob_CIE_2012_10[1]; + p->observer[2] = ob_CIE_2012_10[2]; + break; #ifndef SALONEINSTLIB case icxOT_Stiles_Burch_2: p->observer[0] = ob_Stiles_Burch_2[0]; @@ -5893,6 +5921,8 @@ icxClamping clamp /* NZ to clamp XYZ/Lab to be +ve */ #ifndef SALONEINSTLIB else if (rcs == icSigLabData) p->doLab = 1; + else if (rcs == icmSigLptData) + p->doLab = 2; #endif /* !SALONEINSTLIB */ else { DBGF((DBGA,"new_xsp2cie() unrecognised CIE type 0x%x",rcs)); @@ -5907,6 +5937,7 @@ icxClamping clamp /* NZ to clamp XYZ/Lab to be +ve */ p->spec_wl_long = p->observer[1].spec_wl_long; p->set_int_steps = xsp2cie_set_int_steps; + p->photo2rad = xsp2cie_photo2rad; p->convert = xsp2cie_convert; p->sconvert = xsp2cie_sconvert; p->get_cie_il = xsp2cie_get_cie_il; @@ -5969,8 +6000,8 @@ int icx_spectrum_locus(double xyz[3], double wl, icxObserverType obType) { } /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ -/* Pre-calculated spectral locuses of Daylight and Plankian at 5 Mired intervals, */ -/* used by the fast but slightly less accurate CCT support icx_XYZ2ill_ct2() */ +/* Pre-calculated spectral locuses of Daylight and Plankian at 4 Mired intervals, */ +/* used by the fast but almost as accurate CCT support icx_XYZ2ill_ct2() */ /* Created using illlocus.c */ /* These aren't actually spectrum, they are XYZ values */ @@ -5978,1776 +6009,984 @@ int icx_spectrum_locus(double xyz[3], double wl, icxObserverType obType) { static xspect illoc_Plankian_CIE_1931_2[3] = { { - 481, 40.000000, 1000.000000, + 241, 40.000000, 1000.000000, 1.0, { - 1.001190, 1.000021, 0.998861, 0.997711, 0.996571, - 0.995444, 0.994330, 0.993229, 0.992143, 0.991072, - 0.990017, 0.988980, 0.987961, 0.986960, 0.985979, - 0.985018, 0.984078, 0.983159, 0.982263, 0.981390, - 0.980540, 0.979714, 0.978913, 0.978137, 0.977387, - 0.976663, 0.975965, 0.975295, 0.974652, 0.974036, - 0.973449, 0.972890, 0.972359, 0.971858, 0.971385, - 0.970942, 0.970529, 0.970145, 0.969791, 0.969468, - 0.969174, 0.968910, 0.968677, 0.968474, 0.968301, - 0.968159, 0.968047, 0.967965, 0.967914, 0.967893, - 0.967902, 0.967941, 0.968010, 0.968109, 0.968238, - 0.968396, 0.968584, 0.968802, 0.969049, 0.969325, - 0.969629, 0.969963, 0.970325, 0.970715, 0.971134, - 0.971581, 0.972055, 0.972558, 0.973087, 0.973644, - 0.974227, 0.974838, 0.975475, 0.976138, 0.976827, - 0.977542, 0.978282, 0.979048, 0.979839, 0.980655, - 0.981495, 0.982360, 0.983249, 0.984162, 0.985098, - 0.986058, 0.987041, 0.988047, 0.989076, 0.990127, - 0.991200, 0.992295, 0.993412, 0.994551, 0.995711, - 0.996891, 0.998093, 0.999315, 1.000557, 1.001820, - 1.003102, 1.004404, 1.005726, 1.007066, 1.008426, - 1.009804, 1.011201, 1.012616, 1.014050, 1.015501, - 1.016970, 1.018456, 1.019960, 1.021480, 1.023018, - 1.024572, 1.026143, 1.027729, 1.029332, 1.030951, - 1.032586, 1.034236, 1.035901, 1.037581, 1.039276, - 1.040986, 1.042711, 1.044450, 1.046203, 1.047970, - 1.049751, 1.051546, 1.053354, 1.055175, 1.057010, - 1.058857, 1.060718, 1.062591, 1.064477, 1.066375, - 1.068285, 1.070207, 1.072141, 1.074087, 1.076045, - 1.078013, 1.079994, 1.081985, 1.083987, 1.086000, - 1.088024, 1.090059, 1.092103, 1.094159, 1.096224, - 1.098299, 1.100384, 1.102479, 1.104584, 1.106698, - 1.108822, 1.110954, 1.113096, 1.115247, 1.117407, - 1.119575, 1.121752, 1.123938, 1.126132, 1.128334, - 1.130544, 1.132763, 1.134989, 1.137223, 1.139465, - 1.141715, 1.143972, 1.146236, 1.148508, 1.150786, - 1.153072, 1.155365, 1.157665, 1.159971, 1.162284, - 1.164604, 1.166930, 1.169263, 1.171601, 1.173946, - 1.176297, 1.178654, 1.181017, 1.183386, 1.185760, - 1.188140, 1.190526, 1.192917, 1.195313, 1.197715, - 1.200122, 1.202534, 1.204951, 1.207372, 1.209799, - 1.212231, 1.214667, 1.217107, 1.219553, 1.222002, - 1.224456, 1.226915, 1.229377, 1.231844, 1.234315, - 1.236790, 1.239268, 1.241751, 1.244237, 1.246727, - 1.249221, 1.251718, 1.254219, 1.256723, 1.259230, - 1.261741, 1.264255, 1.266772, 1.269292, 1.271816, - 1.274342, 1.276871, 1.279403, 1.281938, 1.284475, - 1.287015, 1.289558, 1.292103, 1.294651, 1.297201, - 1.299753, 1.302308, 1.304865, 1.307424, 1.309985, - 1.312548, 1.315113, 1.317681, 1.320250, 1.322821, - 1.325393, 1.327968, 1.330544, 1.333122, 1.335701, - 1.338282, 1.340865, 1.343448, 1.346034, 1.348620, - 1.351208, 1.353797, 1.356387, 1.358979, 1.361571, - 1.364165, 1.366759, 1.369355, 1.371951, 1.374548, - 1.377146, 1.379745, 1.382345, 1.384945, 1.387546, - 1.390147, 1.392749, 1.395352, 1.397955, 1.400559, - 1.403162, 1.405767, 1.408371, 1.410976, 1.413581, - 1.416186, 1.418792, 1.421397, 1.424003, 1.426609, - 1.429214, 1.431820, 1.434425, 1.437031, 1.439636, - 1.442241, 1.444846, 1.447451, 1.450055, 1.452659, - 1.455263, 1.457866, 1.460469, 1.463072, 1.465674, - 1.468275, 1.470876, 1.473477, 1.476077, 1.478676, - 1.481274, 1.483872, 1.486469, 1.489065, 1.491661, - 1.494255, 1.496849, 1.499442, 1.502034, 1.504625, - 1.507215, 1.509804, 1.512392, 1.514979, 1.517565, - 1.520150, 1.522734, 1.525316, 1.527898, 1.530478, - 1.533057, 1.535634, 1.538211, 1.540786, 1.543359, - 1.545932, 1.548503, 1.551072, 1.553640, 1.556207, - 1.558772, 1.561335, 1.563897, 1.566458, 1.569017, - 1.571574, 1.574130, 1.576684, 1.579236, 1.581787, - 1.584336, 1.586883, 1.589429, 1.591972, 1.594514, - 1.597054, 1.599593, 1.602129, 1.604664, 1.607196, - 1.609727, 1.612256, 1.614782, 1.617307, 1.619830, - 1.622351, 1.624869, 1.627386, 1.629901, 1.632413, - 1.634924, 1.637432, 1.639938, 1.642442, 1.644944, - 1.647444, 1.649941, 1.652436, 1.654929, 1.657420, - 1.659908, 1.662394, 1.664878, 1.667359, 1.669838, - 1.672315, 1.674790, 1.677261, 1.679731, 1.682198, - 1.684663, 1.687125, 1.689585, 1.692042, 1.694497, - 1.696949, 1.699399, 1.701846, 1.704291, 1.706733, - 1.709173, 1.711610, 1.714044, 1.716476, 1.718905, - 1.721331, 1.723755, 1.726176, 1.728594, 1.731010, - 1.733423, 1.735833, 1.738241, 1.740646, 1.743048, - 1.745447, 1.747844, 1.750238, 1.752629, 1.755017, - 1.757402, 1.759785, 1.762164, 1.764541, 1.766915, - 1.769286, 1.771654, 1.774019, 1.776382, 1.778741, - 1.781098, 1.783451, 1.785802, 1.788150, 1.790494, - 1.792836, 1.795175, 1.797511, 1.799843, 1.802173, - 1.804500, 1.806824, 1.809144, 1.811462, 1.813777, - 1.816088, 1.818397, 1.820702, 1.823004, 1.825303, - 1.827600, 1.829893, 1.832182, 1.834469, 1.836753, - 1.839033, 1.841311, 1.843585, 1.845856, 1.848124, - 1.850388, 1.852650, 1.854908, 1.857163, 1.859415, - 1.861664, 1.863909, 1.866152, 1.868391, 1.870627, - 1.872859, 1.875088, 1.877315, 1.879537, 1.881757, - 1.883973, 1.886186, 1.888396, 1.890603, 1.892806, - 1.895006 + 1.00118965, 0.99886057, 0.99657136, 0.99432958, 0.99214254, + 0.99001729, 0.98796054, 0.98597866, 0.98407763, 0.98226302, + 0.98054000, 0.97891328, 0.97738715, 0.97596548, 0.97465168, + 0.97344875, 0.97235928, 0.97138544, 0.97052903, 0.96979149, + 0.96917390, 0.96867704, 0.96830134, 0.96804699, 0.96791391, + 0.96790175, 0.96800998, 0.96823785, 0.96858444, 0.96904866, + 0.96962928, 0.97032494, 0.97113419, 0.97205545, 0.97308709, + 0.97422739, 0.97547459, 0.97682685, 0.97828232, 0.97983913, + 0.98149534, 0.98324906, 0.98509833, 0.98704124, 0.98907584, + 0.99120022, 0.99341246, 0.99571067, 0.99809295, 1.00055746, + 1.00310234, 1.00572579, 1.00842601, 1.01120123, 1.01404972, + 1.01696978, 1.01995971, 1.02301786, 1.02614263, 1.02933240, + 1.03258563, 1.03590077, 1.03927633, 1.04271082, 1.04620282, + 1.04975089, 1.05335365, 1.05700975, 1.06071784, 1.06447663, + 1.06828483, 1.07214120, 1.07604450, 1.07999354, 1.08398714, + 1.08802415, 1.09210343, 1.09622388, 1.10038442, 1.10458398, + 1.10882154, 1.11309606, 1.11740656, 1.12175205, 1.12613157, + 1.13054420, 1.13498900, 1.13946509, 1.14397156, 1.14850757, + 1.15307227, 1.15766481, 1.16228439, 1.16693021, 1.17160149, + 1.17629745, 1.18101735, 1.18576045, 1.19052602, 1.19531335, + 1.20012176, 1.20495056, 1.20979907, 1.21466664, 1.21955264, + 1.22445642, 1.22937737, 1.23431487, 1.23926835, 1.24423720, + 1.24922086, 1.25421876, 1.25923035, 1.26425509, 1.26929245, + 1.27434190, 1.27940293, 1.28447504, 1.28955774, 1.29465054, + 1.29975296, 1.30486454, 1.30998483, 1.31511336, 1.32024971, + 1.32539343, 1.33054410, 1.33570130, 1.34086463, 1.34603367, + 1.35120804, 1.35638735, 1.36157121, 1.36675924, 1.37195109, + 1.37714639, 1.38234479, 1.38754593, 1.39274948, 1.39795510, + 1.40316246, 1.40837123, 1.41358110, 1.41879175, 1.42400288, + 1.42921418, 1.43442537, 1.43963614, 1.44484621, 1.45005530, + 1.45526314, 1.46046945, 1.46567396, 1.47087643, 1.47607658, + 1.48127417, 1.48646895, 1.49166067, 1.49684910, 1.50203400, + 1.50721514, 1.51239229, 1.51756524, 1.52273375, 1.52789762, + 1.53305664, 1.53821060, 1.54335929, 1.54850252, 1.55364008, + 1.55877179, 1.56389746, 1.56901689, 1.57412991, 1.57923634, + 1.58433601, 1.58942872, 1.59451433, 1.59959266, 1.60466355, + 1.60972683, 1.61478235, 1.61982995, 1.62486949, 1.62990081, + 1.63492376, 1.63993821, 1.64494400, 1.64994101, 1.65492909, + 1.65990811, 1.66487795, 1.66983847, 1.67478954, 1.67973105, + 1.68466287, 1.68958488, 1.69449697, 1.69939902, 1.70429092, + 1.70917256, 1.71404384, 1.71890464, 1.72375486, 1.72859441, + 1.73342318, 1.73824108, 1.74304800, 1.74784386, 1.75262857, + 1.75740204, 1.76216417, 1.76691489, 1.77165410, 1.77638173, + 1.78109770, 1.78580193, 1.79049434, 1.79517486, 1.79984341, + 1.80449992, 1.80914432, 1.81377655, 1.81839653, 1.82300421, + 1.82759951, 1.83218238, 1.83675275, 1.84131057, 1.84585578, + 1.85038832, 1.85490813, 1.85941517, 1.86390939, 1.86839072, + 1.87285913, 1.87731457, 1.88175698, 1.88618633, 1.89060256, + 1.89500565 } }, { - 481, 40.000000, 1000.000000, + 241, 40.000000, 1000.000000, 1.0, { - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000 + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000 } }, { - 481, 40.000000, 1000.000000, + 241, 40.000000, 1000.000000, 1.0, { - 1.963589, 1.948210, 1.932763, 1.917253, 1.901688, - 1.886072, 1.870411, 1.854712, 1.838981, 1.823223, - 1.807443, 1.791649, 1.775844, 1.760035, 1.744226, - 1.728424, 1.712632, 1.696857, 1.681103, 1.665375, - 1.649677, 1.634014, 1.618391, 1.602811, 1.587278, - 1.571797, 1.556372, 1.541005, 1.525701, 1.510463, - 1.495294, 1.480197, 1.465176, 1.450233, 1.435370, - 1.420591, 1.405897, 1.391292, 1.376777, 1.362354, - 1.348026, 1.333793, 1.319659, 1.305623, 1.291689, - 1.277856, 1.264128, 1.250503, 1.236985, 1.223573, - 1.210269, 1.197073, 1.183986, 1.171008, 1.158141, - 1.145385, 1.132739, 1.120205, 1.107783, 1.095472, - 1.083273, 1.071187, 1.059212, 1.047349, 1.035599, - 1.023960, 1.012432, 1.001016, 0.989711, 0.978517, - 0.967433, 0.956459, 0.945595, 0.934840, 0.924194, - 0.913655, 0.903225, 0.892901, 0.882684, 0.872572, - 0.862566, 0.852664, 0.842867, 0.833172, 0.823580, - 0.814090, 0.804701, 0.795412, 0.786223, 0.777133, - 0.768140, 0.759245, 0.750447, 0.741744, 0.733136, - 0.724623, 0.716202, 0.707875, 0.699638, 0.691493, - 0.683438, 0.675472, 0.667595, 0.659805, 0.652102, - 0.644486, 0.636954, 0.629507, 0.622143, 0.614862, - 0.607663, 0.600545, 0.593508, 0.586550, 0.579671, - 0.572870, 0.566146, 0.559498, 0.552926, 0.546429, - 0.540006, 0.533656, 0.527379, 0.521173, 0.515039, - 0.508975, 0.502980, 0.497055, 0.491197, 0.485407, - 0.479683, 0.474025, 0.468433, 0.462905, 0.457441, - 0.452040, 0.446701, 0.441424, 0.436208, 0.431053, - 0.425958, 0.420921, 0.415943, 0.411023, 0.406160, - 0.401354, 0.396604, 0.391908, 0.387268, 0.382682, - 0.378149, 0.373669, 0.369241, 0.364865, 0.360540, - 0.356266, 0.352042, 0.347867, 0.343741, 0.339663, - 0.335634, 0.331651, 0.327715, 0.323825, 0.319981, - 0.316182, 0.312428, 0.308718, 0.305051, 0.301428, - 0.297847, 0.294308, 0.290811, 0.287356, 0.283941, - 0.280566, 0.277231, 0.273935, 0.270678, 0.267460, - 0.264279, 0.261137, 0.258031, 0.254962, 0.251929, - 0.248932, 0.245971, 0.243045, 0.240153, 0.237295, - 0.234472, 0.231682, 0.228924, 0.226200, 0.223508, - 0.220848, 0.218219, 0.215621, 0.213055, 0.210519, - 0.208013, 0.205536, 0.203089, 0.200672, 0.198282, - 0.195922, 0.193589, 0.191284, 0.189007, 0.186756, - 0.184533, 0.182336, 0.180165, 0.178020, 0.175900, - 0.173806, 0.171737, 0.169692, 0.167672, 0.165676, - 0.163703, 0.161754, 0.159829, 0.157926, 0.156046, - 0.154189, 0.152353, 0.150540, 0.148748, 0.146978, - 0.145229, 0.143501, 0.141793, 0.140106, 0.138439, - 0.136792, 0.135164, 0.133556, 0.131968, 0.130398, - 0.128847, 0.127315, 0.125801, 0.124305, 0.122827, - 0.121366, 0.119924, 0.118498, 0.117090, 0.115698, - 0.114323, 0.112965, 0.111623, 0.110297, 0.108987, - 0.107692, 0.106413, 0.105150, 0.103901, 0.102668, - 0.101449, 0.100245, 0.099055, 0.097880, 0.096719, - 0.095571, 0.094438, 0.093318, 0.092212, 0.091118, - 0.090038, 0.088971, 0.087917, 0.086875, 0.085846, - 0.084829, 0.083825, 0.082832, 0.081852, 0.080883, - 0.079926, 0.078980, 0.078046, 0.077123, 0.076211, - 0.075310, 0.074419, 0.073540, 0.072671, 0.071812, - 0.070964, 0.070126, 0.069298, 0.068480, 0.067672, - 0.066874, 0.066085, 0.065306, 0.064536, 0.063775, - 0.063023, 0.062281, 0.061547, 0.060822, 0.060106, - 0.059399, 0.058700, 0.058009, 0.057327, 0.056653, - 0.055987, 0.055329, 0.054679, 0.054036, 0.053402, - 0.052775, 0.052156, 0.051544, 0.050939, 0.050342, - 0.049752, 0.049169, 0.048593, 0.048023, 0.047461, - 0.046906, 0.046357, 0.045814, 0.045279, 0.044749, - 0.044226, 0.043710, 0.043199, 0.042695, 0.042197, - 0.041704, 0.041218, 0.040737, 0.040262, 0.039793, - 0.039330, 0.038872, 0.038420, 0.037973, 0.037531, - 0.037095, 0.036664, 0.036238, 0.035817, 0.035401, - 0.034990, 0.034584, 0.034183, 0.033787, 0.033396, - 0.033009, 0.032627, 0.032249, 0.031876, 0.031508, - 0.031144, 0.030784, 0.030428, 0.030077, 0.029730, - 0.029387, 0.029049, 0.028714, 0.028383, 0.028056, - 0.027734, 0.027415, 0.027100, 0.026788, 0.026480, - 0.026177, 0.025876, 0.025579, 0.025286, 0.024996, - 0.024710, 0.024427, 0.024148, 0.023872, 0.023599, - 0.023329, 0.023063, 0.022800, 0.022540, 0.022283, - 0.022029, 0.021778, 0.021530, 0.021285, 0.021043, - 0.020804, 0.020568, 0.020334, 0.020104, 0.019876, - 0.019651, 0.019428, 0.019208, 0.018991, 0.018776, - 0.018564, 0.018354, 0.018147, 0.017942, 0.017740, - 0.017540, 0.017343, 0.017148, 0.016955, 0.016764, - 0.016576, 0.016390, 0.016206, 0.016024, 0.015845, - 0.015668, 0.015492, 0.015319, 0.015148, 0.014979, - 0.014811, 0.014646, 0.014483, 0.014322, 0.014162, - 0.014005, 0.013849, 0.013695, 0.013543, 0.013393, - 0.013245, 0.013098, 0.012953, 0.012810, 0.012668, - 0.012528, 0.012390, 0.012253, 0.012118, 0.011985, - 0.011853, 0.011723, 0.011594, 0.011467, 0.011341, - 0.011217, 0.011094, 0.010972, 0.010852, 0.010734, - 0.010617, 0.010501, 0.010386, 0.010273, 0.010161, - 0.010051, 0.009942, 0.009834, 0.009727, 0.009621, - 0.009517, 0.009414, 0.009312, 0.009212, 0.009112, - 0.009014, 0.008917, 0.008821, 0.008726, 0.008632, - 0.008540, 0.008448, 0.008357, 0.008268, 0.008180, - 0.008092 + 1.96358909, 1.93276284, 1.90168755, 1.87041114, 1.83898096, + 1.80744344, 1.77584388, 1.74422613, 1.71263247, 1.68110337, + 1.64967734, 1.61839087, 1.58727830, 1.55637174, 1.52570109, + 1.49529401, 1.46517591, 1.43537002, 1.40589738, 1.37677696, + 1.34802570, 1.31965859, 1.29168878, 1.26412763, 1.23698487, + 1.21026863, 1.18398560, 1.15814109, 1.13273915, 1.10778264, + 1.08327336, 1.05921210, 1.03559876, 1.01243241, 0.98971136, + 0.96743328, 0.94559520, 0.92419362, 0.90322457, 0.88268364, + 0.86256605, 0.84286669, 0.82358017, 0.80470085, 0.78622290, + 0.76814028, 0.75044686, 0.73313633, 0.71620235, 0.69963847, + 0.68343821, 0.66759505, 0.65210248, 0.63695397, 0.62214300, + 0.60766310, 0.59350782, 0.57967077, 0.56614559, 0.55292599, + 0.54000577, 0.52737878, 0.51503895, 0.50298029, 0.49119689, + 0.47968295, 0.46843272, 0.45744058, 0.44670098, 0.43620847, + 0.42595769, 0.41594337, 0.40616035, 0.39660354, 0.38726798, + 0.37814878, 0.36924113, 0.36054035, 0.35204182, 0.34374103, + 0.33563356, 0.32771505, 0.31998128, 0.31242806, 0.30505134, + 0.29784711, 0.29081146, 0.28394058, 0.27723072, 0.27067820, + 0.26427945, 0.25803094, 0.25192925, 0.24597102, 0.24015294, + 0.23447181, 0.22892448, 0.22350786, 0.21821895, 0.21305480, + 0.20801253, 0.20308932, 0.19828242, 0.19358913, 0.18900681, + 0.18453290, 0.18016487, 0.17590026, 0.17173667, 0.16767174, + 0.16370317, 0.15982871, 0.15604617, 0.15235340, 0.14874829, + 0.14522880, 0.14179291, 0.13843868, 0.13516418, 0.13196755, + 0.12884694, 0.12580058, 0.12282672, 0.11992366, 0.11708971, + 0.11432327, 0.11162272, 0.10898652, 0.10641315, 0.10390113, + 0.10144899, 0.09905534, 0.09671877, 0.09443794, 0.09221154, + 0.09003826, 0.08791685, 0.08584608, 0.08382474, 0.08185167, + 0.07992571, 0.07804574, 0.07621067, 0.07441943, 0.07267098, + 0.07096429, 0.06929838, 0.06767227, 0.06608501, 0.06453567, + 0.06302335, 0.06154717, 0.06010625, 0.05869977, 0.05732689, + 0.05598681, 0.05467875, 0.05340194, 0.05215564, 0.05093910, + 0.04975163, 0.04859252, 0.04746109, 0.04635668, 0.04527865, + 0.04422635, 0.04319918, 0.04219652, 0.04121780, 0.04026243, + 0.03932986, 0.03841953, 0.03753092, 0.03666350, 0.03581676, + 0.03499021, 0.03418336, 0.03339574, 0.03262688, 0.03187633, + 0.03114365, 0.03042842, 0.02973021, 0.02904861, 0.02838323, + 0.02773367, 0.02709955, 0.02648050, 0.02587616, 0.02528617, + 0.02471019, 0.02414789, 0.02359892, 0.02306298, 0.02253974, + 0.02202890, 0.02153017, 0.02104324, 0.02056785, 0.02010370, + 0.01965053, 0.01920807, 0.01877607, 0.01835427, 0.01794244, + 0.01754032, 0.01714768, 0.01676431, 0.01638996, 0.01602443, + 0.01566751, 0.01531898, 0.01497865, 0.01464632, 0.01432179, + 0.01400488, 0.01369541, 0.01339319, 0.01309805, 0.01280983, + 0.01252835, 0.01225345, 0.01198498, 0.01172278, 0.01146670, + 0.01121659, 0.01097231, 0.01073372, 0.01050069, 0.01027308, + 0.01005075, 0.00983359, 0.00962147, 0.00941427, 0.00921188, + 0.00901416, 0.00882103, 0.00863235, 0.00844804, 0.00826797, + 0.00809206 } } }; static xspect illoc_Daylight_CIE_1931_2[3] = { { - 181, 40.000000, 400.000000, + 91, 40.000000, 400.000000, 1.0, { - 0.980513, 0.979463, 0.978420, 0.977383, 0.976353, - 0.975333, 0.974322, 0.973321, 0.972332, 0.971354, - 0.970390, 0.969439, 0.968503, 0.967582, 0.966676, - 0.965787, 0.964916, 0.964062, 0.963227, 0.962412, - 0.961616, 0.960840, 0.960086, 0.959353, 0.958642, - 0.957953, 0.957288, 0.956646, 0.956029, 0.955436, - 0.954867, 0.954325, 0.953808, 0.953317, 0.952852, - 0.952415, 0.952005, 0.951622, 0.951268, 0.950941, - 0.950643, 0.950374, 0.950135, 0.949924, 0.949743, - 0.949592, 0.949471, 0.949381, 0.949321, 0.949292, - 0.949293, 0.949326, 0.949391, 0.949486, 0.949613, - 0.949771, 0.949961, 0.950182, 0.950435, 0.950720, - 0.951037, 0.951386, 0.951766, 0.952178, 0.952622, - 0.953098, 0.953606, 0.954145, 0.954716, 0.955318, - 0.955951, 0.956616, 0.957312, 0.958039, 0.958797, - 0.959585, 0.960405, 0.961254, 0.962134, 0.963043, - 0.963982, 0.964951, 0.965949, 0.966977, 0.968033, - 0.969117, 0.970230, 0.971371, 0.972540, 0.973736, - 0.974959, 0.976209, 0.977486, 0.978788, 0.980117, - 0.981471, 0.982850, 0.984254, 0.985682, 0.987134, - 0.988610, 0.990109, 0.991631, 0.993175, 0.994740, - 0.996328, 0.997936, 0.999565, 1.001214, 1.002882, - 1.004570, 1.006276, 1.008000, 1.009741, 1.011500, - 1.013275, 1.015066, 1.016872, 1.018693, 1.020528, - 1.022376, 1.024238, 1.026112, 1.027997, 1.029894, - 1.031800, 1.033717, 1.035642, 1.037576, 1.039518, - 1.041466, 1.043421, 1.045381, 1.047345, 1.049314, - 1.051286, 1.053260, 1.055236, 1.057212, 1.059189, - 1.061165, 1.063139, 1.065110, 1.067079, 1.069042, - 1.071001, 1.072954, 1.074900, 1.076838, 1.078767, - 1.080687, 1.082596, 1.084493, 1.086378, 1.088250, - 1.090107, 1.091949, 1.093774, 1.095582, 1.097372, - 1.099142, 1.100892, 1.102620, 1.104327, 1.106009, - 1.107668, 1.109300, 1.110907, 1.112485, 1.114036, - 1.115556, 1.117047, 1.118505, 1.119931, 1.121323, - 1.122681, 1.124003, 1.125288, 1.126535, 1.127744, - 1.128913 + 0.98051318, 0.97841966, 0.97635345, 0.97432184, 0.97233180, + 0.97039000, 0.96850277, 0.96667617, 0.96491589, 0.96322734, + 0.96161563, 0.96008555, 0.95864160, 0.95728801, 0.95602873, + 0.95486746, 0.95380762, 0.95285244, 0.95200487, 0.95126769, + 0.95064345, 0.95013453, 0.94974312, 0.94947125, 0.94932079, + 0.94929347, 0.94939071, 0.94961278, 0.94996076, 0.95043539, + 0.95103711, 0.95176612, 0.95262240, 0.95360571, 0.95471557, + 0.95595133, 0.95731214, 0.95879695, 0.96040455, 0.96213356, + 0.96398242, 0.96594941, 0.96803268, 0.97023018, 0.97253976, + 0.97495908, 0.97748567, 0.98011689, 0.98285000, 0.98568205, + 0.98860998, 0.99163057, 0.99474044, 0.99793606, 1.00121376, + 1.00456967, 1.00799980, 1.01149997, 1.01506584, 1.01869291, + 1.02237650, 1.02611175, 1.02989363, 1.03371694, 1.03757629, + 1.04146611, 1.04538066, 1.04931399, 1.05326001, 1.05721242, + 1.06116475, 1.06511036, 1.06904244, 1.07295400, 1.07683790, + 1.08068685, 1.08449339, 1.08824994, 1.09194881, 1.09558214, + 1.09914202, 1.10262042, 1.10600924, 1.10930032, 1.11248548, + 1.11555649, 1.11850514, 1.12132325, 1.12400265, 1.12653529, + 1.12891318 } }, { - 181, 40.000000, 400.000000, + 91, 40.000000, 400.000000, 1.0, { - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000 + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000 } }, { - 181, 40.000000, 400.000000, + 91, 40.000000, 400.000000, 1.0, { - 1.943602, 1.928150, 1.912613, 1.897001, 1.881321, - 1.865580, 1.849784, 1.833942, 1.818059, 1.802142, - 1.786198, 1.770233, 1.754253, 1.738263, 1.722270, - 1.706279, 1.690295, 1.674323, 1.658369, 1.642436, - 1.626531, 1.610657, 1.594819, 1.579020, 1.563266, - 1.547559, 1.531903, 1.516302, 1.500760, 1.485279, - 1.469863, 1.454514, 1.439236, 1.424031, 1.408902, - 1.393851, 1.378881, 1.363993, 1.349191, 1.334475, - 1.319847, 1.305310, 1.290866, 1.276515, 1.262259, - 1.248099, 1.234037, 1.220075, 1.206212, 1.192450, - 1.178790, 1.165233, 1.151811, 1.138526, 1.125350, - 1.112284, 1.099330, 1.086490, 1.073764, 1.061153, - 1.048660, 1.036283, 1.024025, 1.011886, 0.999866, - 0.987966, 0.976187, 0.964529, 0.952992, 0.941577, - 0.930283, 0.919111, 0.908061, 0.897132, 0.886325, - 0.875640, 0.865075, 0.854632, 0.844310, 0.834108, - 0.824027, 0.814065, 0.804222, 0.794499, 0.784893, - 0.775406, 0.766036, 0.756782, 0.747645, 0.738623, - 0.729716, 0.720923, 0.712244, 0.703678, 0.695223, - 0.686881, 0.678648, 0.670526, 0.662513, 0.654608, - 0.646811, 0.639121, 0.631537, 0.624058, 0.616683, - 0.609412, 0.602244, 0.595178, 0.588213, 0.581349, - 0.574584, 0.567919, 0.561351, 0.554880, 0.548506, - 0.542227, 0.536043, 0.529953, 0.523956, 0.518051, - 0.512238, 0.506516, 0.500884, 0.495341, 0.489887, - 0.484521, 0.479241, 0.474048, 0.468940, 0.463917, - 0.458978, 0.454122, 0.449349, 0.444657, 0.440047, - 0.435518, 0.431068, 0.426697, 0.422405, 0.418191, - 0.414054, 0.409993, 0.406009, 0.402099, 0.398265, - 0.394504, 0.390817, 0.387203, 0.383662, 0.380192, - 0.376793, 0.373466, 0.370208, 0.367020, 0.363902, - 0.360852, 0.357870, 0.354957, 0.352110, 0.349331, - 0.346618, 0.343971, 0.341389, 0.338873, 0.336422, - 0.334036, 0.331714, 0.329455, 0.327260, 0.325129, - 0.323060, 0.321055, 0.319111, 0.317230, 0.315412, - 0.313654, 0.311959, 0.310325, 0.308753, 0.307241, - 0.305791 + 1.94360231, 1.91261334, 1.88132109, 1.84978432, 1.81805903, + 1.78619845, 1.75425296, 1.72227012, 1.69029469, 1.65836864, + 1.62653120, 1.59481893, 1.56326577, 1.53190313, 1.50075998, + 1.46986292, 1.43923629, 1.40890227, 1.37888097, 1.34919053, + 1.31984725, 1.29086564, 1.26225857, 1.23403734, 1.20621178, + 1.17879034, 1.15181073, 1.12534969, 1.09933037, 1.07376387, + 1.04865950, 1.02402484, 0.99986591, 0.97618733, 0.95299239, + 0.93028318, 0.90806074, 0.88632509, 0.86507541, 0.84431004, + 0.82402663, 0.80422220, 0.78489319, 0.76603555, 0.74764478, + 0.72971602, 0.71224406, 0.69522340, 0.67864834, 0.66251293, + 0.64681108, 0.63153657, 0.61668308, 0.60224419, 0.58821348, + 0.57458445, 0.56135062, 0.54850552, 0.53604270, 0.52395576, + 0.51223835, 0.50088419, 0.48988709, 0.47924093, 0.46893970, + 0.45897750, 0.44934854, 0.44004715, 0.43106779, 0.42240505, + 0.41405367, 0.40600852, 0.39826465, 0.39081724, 0.38366164, + 0.37679336, 0.37020811, 0.36390176, 0.35787036, 0.35211017, + 0.34661764, 0.34138942, 0.33642238, 0.33171362, 0.32726047, + 0.32306048, 0.31911149, 0.31541156, 0.31195906, 0.30875263, + 0.30579122 } } }; static xspect illoc_OPlankian_CIE_1931_2[3] = { { - 481, 40.000000, 1000.000000, + 241, 40.000000, 1000.000000, 1.0, { - 1.001252, 1.000085, 0.998928, 0.997780, 0.996643, - 0.995518, 0.994406, 0.993307, 0.992222, 0.991153, - 0.990100, 0.989064, 0.988046, 0.987046, 0.986066, - 0.985106, 0.984166, 0.983248, 0.982352, 0.981479, - 0.980629, 0.979803, 0.979001, 0.978224, 0.977473, - 0.976748, 0.976049, 0.975377, 0.974732, 0.974114, - 0.973525, 0.972963, 0.972430, 0.971926, 0.971451, - 0.971005, 0.970588, 0.970201, 0.969844, 0.969516, - 0.969218, 0.968951, 0.968713, 0.968506, 0.968328, - 0.968181, 0.968064, 0.967978, 0.967921, 0.967894, - 0.967898, 0.967931, 0.967995, 0.968088, 0.968210, - 0.968363, 0.968544, 0.968755, 0.968995, 0.969265, - 0.969562, 0.969889, 0.970244, 0.970627, 0.971039, - 0.971478, 0.971945, 0.972440, 0.972962, 0.973510, - 0.974086, 0.974689, 0.975317, 0.975972, 0.976653, - 0.977360, 0.978092, 0.978850, 0.979632, 0.980439, - 0.981271, 0.982127, 0.983007, 0.983911, 0.984839, - 0.985790, 0.986764, 0.987761, 0.988780, 0.989822, - 0.990886, 0.991972, 0.993080, 0.994209, 0.995359, - 0.996531, 0.997723, 0.998935, 1.000168, 1.001421, - 1.002694, 1.003986, 1.005298, 1.006629, 1.007979, - 1.009347, 1.010734, 1.012140, 1.013563, 1.015004, - 1.016463, 1.017940, 1.019434, 1.020944, 1.022472, - 1.024016, 1.025577, 1.027153, 1.028746, 1.030355, - 1.031979, 1.033619, 1.035274, 1.036945, 1.038630, - 1.040330, 1.042044, 1.043773, 1.045516, 1.047273, - 1.049044, 1.050828, 1.052626, 1.054437, 1.056262, - 1.058099, 1.059950, 1.061813, 1.063688, 1.065576, - 1.067476, 1.069388, 1.071312, 1.073248, 1.075195, - 1.077154, 1.079124, 1.081105, 1.083097, 1.085100, - 1.087114, 1.089138, 1.091173, 1.093218, 1.095274, - 1.097339, 1.099414, 1.101499, 1.103593, 1.105697, - 1.107811, 1.109934, 1.112065, 1.114206, 1.116356, - 1.118514, 1.120682, 1.122857, 1.125041, 1.127233, - 1.129434, 1.131643, 1.133859, 1.136083, 1.138315, - 1.140555, 1.142802, 1.145057, 1.147319, 1.149588, - 1.151864, 1.154147, 1.156437, 1.158734, 1.161037, - 1.163347, 1.165664, 1.167987, 1.170316, 1.172651, - 1.174993, 1.177340, 1.179694, 1.182053, 1.184418, - 1.186788, 1.189164, 1.191546, 1.193933, 1.196325, - 1.198723, 1.201125, 1.203533, 1.205945, 1.208363, - 1.210785, 1.213212, 1.215644, 1.218080, 1.220520, - 1.222965, 1.225414, 1.227868, 1.230326, 1.232787, - 1.235253, 1.237723, 1.240197, 1.242674, 1.245155, - 1.247640, 1.250128, 1.252620, 1.255115, 1.257614, - 1.260116, 1.262621, 1.265130, 1.267641, 1.270156, - 1.272674, 1.275194, 1.277717, 1.280244, 1.282773, - 1.285304, 1.287838, 1.290375, 1.292914, 1.295456, - 1.298000, 1.300546, 1.303095, 1.305646, 1.308199, - 1.310754, 1.313311, 1.315870, 1.318431, 1.320994, - 1.323559, 1.326125, 1.328693, 1.331263, 1.333835, - 1.336408, 1.338982, 1.341558, 1.344135, 1.346714, - 1.349294, 1.351876, 1.354458, 1.357042, 1.359627, - 1.362212, 1.364799, 1.367387, 1.369976, 1.372566, - 1.375156, 1.377748, 1.380340, 1.382933, 1.385526, - 1.388120, 1.390715, 1.393311, 1.395906, 1.398503, - 1.401099, 1.403696, 1.406294, 1.408892, 1.411490, - 1.414088, 1.416686, 1.419285, 1.421883, 1.424482, - 1.427081, 1.429680, 1.432278, 1.434877, 1.437476, - 1.440074, 1.442672, 1.445270, 1.447868, 1.450465, - 1.453063, 1.455659, 1.458256, 1.460852, 1.463447, - 1.466042, 1.468637, 1.471231, 1.473824, 1.476417, - 1.479009, 1.481601, 1.484192, 1.486782, 1.489371, - 1.491960, 1.494547, 1.497134, 1.499720, 1.502305, - 1.504889, 1.507473, 1.510055, 1.512636, 1.515216, - 1.517795, 1.520373, 1.522950, 1.525525, 1.528100, - 1.530673, 1.533245, 1.535816, 1.538385, 1.540953, - 1.543520, 1.546085, 1.548649, 1.551212, 1.553773, - 1.556333, 1.558891, 1.561448, 1.564003, 1.566557, - 1.569109, 1.571660, 1.574208, 1.576756, 1.579301, - 1.581845, 1.584387, 1.586928, 1.589467, 1.592004, - 1.594539, 1.597072, 1.599604, 1.602133, 1.604661, - 1.607187, 1.609711, 1.612233, 1.614753, 1.617271, - 1.619788, 1.622302, 1.624814, 1.627324, 1.629832, - 1.632338, 1.634842, 1.637344, 1.639843, 1.642341, - 1.644836, 1.647329, 1.649820, 1.652309, 1.654795, - 1.657279, 1.659761, 1.662241, 1.664718, 1.667193, - 1.669666, 1.672136, 1.674604, 1.677070, 1.679533, - 1.681994, 1.684452, 1.686908, 1.689362, 1.691813, - 1.694261, 1.696707, 1.699151, 1.701592, 1.704030, - 1.706466, 1.708900, 1.711331, 1.713759, 1.716184, - 1.718607, 1.721028, 1.723445, 1.725860, 1.728273, - 1.730683, 1.733090, 1.735494, 1.737896, 1.740294, - 1.742691, 1.745084, 1.747475, 1.749862, 1.752248, - 1.754630, 1.757009, 1.759386, 1.761760, 1.764131, - 1.766499, 1.768864, 1.771227, 1.773586, 1.775943, - 1.778297, 1.780648, 1.782995, 1.785340, 1.787683, - 1.790022, 1.792358, 1.794691, 1.797021, 1.799349, - 1.801673, 1.803994, 1.806312, 1.808627, 1.810940, - 1.813249, 1.815555, 1.817858, 1.820158, 1.822455, - 1.824749, 1.827040, 1.829327, 1.831612, 1.833893, - 1.836172, 1.838447, 1.840719, 1.842988, 1.845254, - 1.847517, 1.849776, 1.852033, 1.854286, 1.856536, - 1.858783, 1.861027, 1.863267, 1.865504, 1.867738, - 1.869969, 1.872197, 1.874421, 1.876643, 1.878860, - 1.881075, 1.883287, 1.885495, 1.887700, 1.889901, - 1.892100 + 1.00125164, 0.99892771, 0.99664323, 0.99440568, 0.99222235, + 0.99010022, 0.98804598, 0.98606595, 0.98416609, 0.98235194, + 0.98062864, 0.97900090, 0.97747300, 0.97604880, 0.97473170, + 0.97352471, 0.97243041, 0.97145101, 0.97058830, 0.96984375, + 0.96921844, 0.96871317, 0.96832840, 0.96806433, 0.96792091, + 0.96789782, 0.96799453, 0.96821034, 0.96854433, 0.96899544, + 0.96956248, 0.97024410, 0.97103887, 0.97194524, 0.97296159, + 0.97408624, 0.97531742, 0.97665334, 0.97809216, 0.97963201, + 0.98127100, 0.98300723, 0.98483877, 0.98676371, 0.98878014, + 0.99088614, 0.99307981, 0.99535927, 0.99772265, 1.00016810, + 1.00269378, 1.00529790, 1.00797867, 1.01073434, 1.01356317, + 1.01646347, 1.01943357, 1.02247182, 1.02557660, 1.02874634, + 1.03197947, 1.03527448, 1.03862985, 1.04204414, 1.04551589, + 1.04904369, 1.05262617, 1.05626197, 1.05994977, 1.06368825, + 1.06747615, 1.07131223, 1.07519525, 1.07912402, 1.08309737, + 1.08711415, 1.09117323, 1.09527352, 1.09941392, 1.10359339, + 1.10781089, 1.11206541, 1.11635594, 1.12068151, 1.12504118, + 1.12943400, 1.13385905, 1.13831545, 1.14280230, 1.14731875, + 1.15186395, 1.15643707, 1.16103730, 1.16566385, 1.17031592, + 1.17499276, 1.17969362, 1.18441775, 1.18916445, 1.19393299, + 1.19872269, 1.20353287, 1.20836285, 1.21321199, 1.21807964, + 1.22296517, 1.22786796, 1.23278742, 1.23772293, 1.24267392, + 1.24763982, 1.25262006, 1.25761409, 1.26262138, 1.26764138, + 1.27267359, 1.27771748, 1.28277256, 1.28783833, 1.29291431, + 1.29800003, 1.30309502, 1.30819882, 1.31331098, 1.31843106, + 1.32355863, 1.32869327, 1.33383455, 1.33898207, 1.34413542, + 1.34929421, 1.35445805, 1.35962657, 1.36479938, 1.36997612, + 1.37515643, 1.38033995, 1.38552634, 1.39071525, 1.39590635, + 1.40109931, 1.40629380, 1.41148951, 1.41668612, 1.42188333, + 1.42708084, 1.43227834, 1.43747555, 1.44267219, 1.44786797, + 1.45306261, 1.45825585, 1.46344741, 1.46863705, 1.47382449, + 1.47900950, 1.48419181, 1.48937119, 1.49454740, 1.49972020, + 1.50488936, 1.51005466, 1.51521587, 1.52037278, 1.52552516, + 1.53067281, 1.53581552, 1.54095309, 1.54608531, 1.55121199, + 1.55633294, 1.56144796, 1.56655688, 1.57165950, 1.57675566, + 1.58184516, 1.58692784, 1.59200353, 1.59707206, 1.60213327, + 1.60718700, 1.61223308, 1.61727137, 1.62230170, 1.62732394, + 1.63233793, 1.63734353, 1.64234060, 1.64732900, 1.65230859, + 1.65727924, 1.66224082, 1.66719320, 1.67213625, 1.67706985, + 1.68199388, 1.68690821, 1.69181274, 1.69670735, 1.70159192, + 1.70646634, 1.71133051, 1.71618432, 1.72102767, 1.72586045, + 1.73068257, 1.73549392, 1.74029442, 1.74508397, 1.74986247, + 1.75462984, 1.75938599, 1.76413083, 1.76886428, 1.77358625, + 1.77829667, 1.78299546, 1.78768254, 1.79235783, 1.79702126, + 1.80167276, 1.80631225, 1.81093968, 1.81555497, 1.82015805, + 1.82474887, 1.82932735, 1.83389344, 1.83844709, 1.84298822, + 1.84751679, 1.85203273, 1.85653600, 1.86102655, 1.86550431, + 1.86996925, 1.87442131, 1.87886046, 1.88328663, 1.88769979, + 1.89209989 } }, { - 481, 40.000000, 1000.000000, + 241, 40.000000, 1000.000000, 1.0, { - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000 + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000 } }, { - 481, 40.000000, 1000.000000, + 241, 40.000000, 1000.000000, 1.0, { - 1.964399, 1.949065, 1.933662, 1.918197, 1.902676, - 1.887104, 1.871488, 1.855833, 1.840145, 1.824431, - 1.808694, 1.792942, 1.777180, 1.761413, 1.745646, - 1.729884, 1.714133, 1.698398, 1.682683, 1.666994, - 1.651334, 1.635709, 1.620122, 1.604578, 1.589081, - 1.573634, 1.558243, 1.542909, 1.527638, 1.512431, - 1.497293, 1.482226, 1.467234, 1.452320, 1.437485, - 1.422732, 1.408065, 1.393485, 1.378994, 1.364595, - 1.350290, 1.336080, 1.321966, 1.307952, 1.294037, - 1.280224, 1.266513, 1.252907, 1.239405, 1.226009, - 1.212720, 1.199539, 1.186466, 1.173502, 1.160647, - 1.147903, 1.135268, 1.122745, 1.110333, 1.098031, - 1.085841, 1.073763, 1.061796, 1.049940, 1.038196, - 1.026563, 1.015041, 1.003630, 0.992329, 0.981138, - 0.970058, 0.959087, 0.948225, 0.937472, 0.926827, - 0.916289, 0.905859, 0.895535, 0.885318, 0.875206, - 0.865199, 0.855295, 0.845496, 0.835799, 0.826205, - 0.816712, 0.807319, 0.798027, 0.788834, 0.779739, - 0.770743, 0.761843, 0.753039, 0.744331, 0.735718, - 0.727199, 0.718772, 0.710438, 0.702195, 0.694043, - 0.685981, 0.678008, 0.670124, 0.662326, 0.654616, - 0.646991, 0.639451, 0.631995, 0.624623, 0.617333, - 0.610126, 0.602999, 0.595952, 0.588985, 0.582096, - 0.575286, 0.568552, 0.561895, 0.555313, 0.548805, - 0.542372, 0.536012, 0.529725, 0.523509, 0.517364, - 0.511289, 0.505284, 0.499347, 0.493478, 0.487677, - 0.481943, 0.476274, 0.470670, 0.465131, 0.459655, - 0.454243, 0.448893, 0.443605, 0.438378, 0.433211, - 0.428104, 0.423056, 0.418066, 0.413134, 0.408260, - 0.403442, 0.398679, 0.393972, 0.389320, 0.384722, - 0.380177, 0.375686, 0.371246, 0.366858, 0.362522, - 0.358235, 0.353999, 0.349812, 0.345675, 0.341585, - 0.337543, 0.333549, 0.329601, 0.325700, 0.321844, - 0.318033, 0.314267, 0.310545, 0.306866, 0.303231, - 0.299639, 0.296088, 0.292580, 0.289112, 0.285685, - 0.282299, 0.278952, 0.275645, 0.272376, 0.269147, - 0.265955, 0.262800, 0.259683, 0.256603, 0.253559, - 0.250551, 0.247578, 0.244640, 0.241737, 0.238869, - 0.236034, 0.233232, 0.230464, 0.227729, 0.225026, - 0.222354, 0.219715, 0.217106, 0.214529, 0.211982, - 0.209465, 0.206978, 0.204520, 0.202092, 0.199692, - 0.197321, 0.194978, 0.192663, 0.190375, 0.188114, - 0.185880, 0.183673, 0.181492, 0.179337, 0.177207, - 0.175103, 0.173024, 0.170969, 0.168939, 0.166933, - 0.164951, 0.162992, 0.161057, 0.159145, 0.157255, - 0.155388, 0.153543, 0.151720, 0.149919, 0.148140, - 0.146381, 0.144644, 0.142927, 0.141231, 0.139555, - 0.137899, 0.136262, 0.134646, 0.133048, 0.131470, - 0.129910, 0.128369, 0.126846, 0.125342, 0.123855, - 0.122387, 0.120935, 0.119502, 0.118085, 0.116685, - 0.115302, 0.113935, 0.112585, 0.111251, 0.109933, - 0.108631, 0.107344, 0.106072, 0.104816, 0.103575, - 0.102349, 0.101137, 0.099940, 0.098757, 0.097588, - 0.096434, 0.095293, 0.094166, 0.093052, 0.091952, - 0.090864, 0.089790, 0.088729, 0.087680, 0.086644, - 0.085620, 0.084609, 0.083610, 0.082622, 0.081647, - 0.080683, 0.079731, 0.078790, 0.077860, 0.076942, - 0.076035, 0.075138, 0.074252, 0.073377, 0.072512, - 0.071658, 0.070814, 0.069980, 0.069156, 0.068342, - 0.067537, 0.066743, 0.065958, 0.065182, 0.064415, - 0.063658, 0.062910, 0.062171, 0.061440, 0.060718, - 0.060006, 0.059301, 0.058605, 0.057917, 0.057238, - 0.056567, 0.055904, 0.055248, 0.054601, 0.053961, - 0.053329, 0.052705, 0.052088, 0.051478, 0.050876, - 0.050281, 0.049693, 0.049113, 0.048539, 0.047972, - 0.047411, 0.046858, 0.046311, 0.045771, 0.045237, - 0.044710, 0.044188, 0.043674, 0.043165, 0.042662, - 0.042166, 0.041675, 0.041190, 0.040711, 0.040238, - 0.039770, 0.039308, 0.038852, 0.038401, 0.037955, - 0.037515, 0.037080, 0.036650, 0.036226, 0.035806, - 0.035392, 0.034982, 0.034577, 0.034177, 0.033782, - 0.033392, 0.033006, 0.032625, 0.032249, 0.031877, - 0.031509, 0.031146, 0.030787, 0.030432, 0.030082, - 0.029736, 0.029394, 0.029056, 0.028722, 0.028392, - 0.028066, 0.027744, 0.027426, 0.027111, 0.026801, - 0.026494, 0.026190, 0.025891, 0.025594, 0.025302, - 0.025013, 0.024727, 0.024445, 0.024166, 0.023890, - 0.023618, 0.023349, 0.023083, 0.022820, 0.022560, - 0.022304, 0.022050, 0.021800, 0.021553, 0.021308, - 0.021066, 0.020828, 0.020592, 0.020359, 0.020128, - 0.019901, 0.019676, 0.019453, 0.019234, 0.019017, - 0.018802, 0.018590, 0.018381, 0.018174, 0.017970, - 0.017767, 0.017568, 0.017371, 0.017176, 0.016983, - 0.016793, 0.016604, 0.016418, 0.016235, 0.016053, - 0.015874, 0.015697, 0.015521, 0.015348, 0.015177, - 0.015008, 0.014841, 0.014676, 0.014513, 0.014352, - 0.014192, 0.014035, 0.013879, 0.013725, 0.013574, - 0.013423, 0.013275, 0.013128, 0.012983, 0.012840, - 0.012699, 0.012559, 0.012420, 0.012284, 0.012149, - 0.012015, 0.011883, 0.011753, 0.011624, 0.011497, - 0.011371, 0.011247, 0.011124, 0.011002, 0.010882, - 0.010764, 0.010647, 0.010531, 0.010416, 0.010303, - 0.010191, 0.010081, 0.009971, 0.009863, 0.009756, - 0.009651, 0.009547, 0.009444, 0.009342, 0.009241, - 0.009142, 0.009043, 0.008946, 0.008850, 0.008755, - 0.008661, 0.008568, 0.008477, 0.008386, 0.008296, - 0.008208 + 1.96439943, 1.93366215, 1.90267576, 1.87148781, 1.84014529, + 1.80869432, 1.77717987, 1.74564552, 1.71413328, 1.68268338, + 1.65133414, 1.62012186, 1.58908072, 1.55824272, 1.52763764, + 1.49729306, 1.46723434, 1.43748466, 1.40806505, 1.37899449, + 1.35028991, 1.32196635, 1.29403698, 1.26651323, 1.23940489, + 1.21272015, 1.18646578, 1.16064717, 1.13526846, 1.11033259, + 1.08584145, 1.06179593, 1.03819603, 1.01504089, 0.99232893, + 0.97005791, 0.94822494, 0.92682663, 0.90585907, 0.88531796, + 0.86519858, 0.84549592, 0.82620466, 0.80731924, 0.78883389, + 0.77074266, 0.75303945, 0.73571806, 0.71877218, 0.70219544, + 0.68598141, 0.67012363, 0.65461562, 0.63945092, 0.62462307, + 0.61012562, 0.59595218, 0.58209638, 0.56855193, 0.55531258, + 0.54237214, 0.52972451, 0.51736364, 0.50528359, 0.49347848, + 0.48194252, 0.47067002, 0.45965535, 0.44889301, 0.43837756, + 0.42810367, 0.41806609, 0.40825969, 0.39867939, 0.38932025, + 0.38017739, 0.37124604, 0.36252151, 0.35399921, 0.34567465, + 0.33754341, 0.32960116, 0.32184367, 0.31426679, 0.30686645, + 0.29963868, 0.29257957, 0.28568531, 0.27895217, 0.27237648, + 0.26595467, 0.25968323, 0.25355874, 0.24757783, 0.24173724, + 0.23603373, 0.23046418, 0.22502551, 0.21971471, 0.21452884, + 0.20946502, 0.20452044, 0.19969236, 0.19497807, 0.19037495, + 0.18588043, 0.18149199, 0.17720716, 0.17302356, 0.16893881, + 0.16495064, 0.16105678, 0.15725505, 0.15354329, 0.14991942, + 0.14638137, 0.14292714, 0.13955477, 0.13626235, 0.13304801, + 0.12990992, 0.12684628, 0.12385536, 0.12093544, 0.11808486, + 0.11530199, 0.11258524, 0.10993304, 0.10734389, 0.10481629, + 0.10234879, 0.09993997, 0.09758846, 0.09529289, 0.09305195, + 0.09086434, 0.08872880, 0.08664410, 0.08460904, 0.08262243, + 0.08068314, 0.07879003, 0.07694202, 0.07513804, 0.07337703, + 0.07165797, 0.06997988, 0.06834177, 0.06674270, 0.06518173, + 0.06365796, 0.06217050, 0.06071849, 0.05930109, 0.05791746, + 0.05656681, 0.05524834, 0.05396129, 0.05270491, 0.05147846, + 0.05028124, 0.04911253, 0.04797167, 0.04685798, 0.04577082, + 0.04470955, 0.04367355, 0.04266222, 0.04167497, 0.04071121, + 0.03977039, 0.03885196, 0.03795538, 0.03708013, 0.03622569, + 0.03539158, 0.03457729, 0.03378236, 0.03300632, 0.03224871, + 0.03150911, 0.03078706, 0.03008216, 0.02939399, 0.02872215, + 0.02806625, 0.02742590, 0.02680073, 0.02619038, 0.02559449, + 0.02501271, 0.02444471, 0.02389015, 0.02334872, 0.02282009, + 0.02230396, 0.02180003, 0.02130800, 0.02082759, 0.02035853, + 0.01990053, 0.01945333, 0.01901668, 0.01859032, 0.01817400, + 0.01776748, 0.01737052, 0.01698291, 0.01660440, 0.01623479, + 0.01587386, 0.01552140, 0.01517721, 0.01484110, 0.01451285, + 0.01419230, 0.01387925, 0.01357352, 0.01327494, 0.01298333, + 0.01269854, 0.01242039, 0.01214873, 0.01188339, 0.01162424, + 0.01137112, 0.01112389, 0.01088241, 0.01064653, 0.01041613, + 0.01019107, 0.00997123, 0.00975647, 0.00954669, 0.00934176, + 0.00914157, 0.00894599, 0.00875493, 0.00856827, 0.00838592, + 0.00820775 } } }; static xspect illoc_ODaylight_CIE_1931_2[3] = { { - 181, 40.000000, 400.000000, + 91, 40.000000, 400.000000, 1.0, { - 0.980733, 0.979686, 0.978644, 0.977610, 0.976584, - 0.975566, 0.974557, 0.973559, 0.972572, 0.971597, - 0.970635, 0.969687, 0.968753, 0.967834, 0.966931, - 0.966045, 0.965176, 0.964324, 0.963492, 0.962678, - 0.961884, 0.961111, 0.960358, 0.959627, 0.958918, - 0.958232, 0.957568, 0.956929, 0.956313, 0.955721, - 0.955155, 0.954614, 0.954098, 0.953609, 0.953146, - 0.952710, 0.952302, 0.951920, 0.951567, 0.951242, - 0.950945, 0.950677, 0.950439, 0.950229, 0.950049, - 0.949899, 0.949779, 0.949690, 0.949630, 0.949602, - 0.949604, 0.949638, 0.949703, 0.949799, 0.949926, - 0.950085, 0.950275, 0.950497, 0.950750, 0.951035, - 0.951352, 0.951701, 0.952081, 0.952493, 0.952937, - 0.953413, 0.953920, 0.954459, 0.955030, 0.955632, - 0.956265, 0.956929, 0.957625, 0.958351, 0.959108, - 0.959896, 0.960715, 0.961563, 0.962442, 0.963351, - 0.964289, 0.965257, 0.966254, 0.967281, 0.968336, - 0.969419, 0.970531, 0.971670, 0.972838, 0.974033, - 0.975254, 0.976503, 0.977778, 0.979079, 0.980406, - 0.981759, 0.983136, 0.984538, 0.985965, 0.987415, - 0.988889, 0.990386, 0.991906, 0.993448, 0.995012, - 0.996597, 0.998203, 0.999830, 1.001477, 1.003143, - 1.004828, 1.006532, 1.008254, 1.009993, 1.011749, - 1.013522, 1.015310, 1.017114, 1.018932, 1.020765, - 1.022611, 1.024470, 1.026341, 1.028223, 1.030117, - 1.032021, 1.033935, 1.035858, 1.037789, 1.039727, - 1.041673, 1.043625, 1.045582, 1.047543, 1.049509, - 1.051478, 1.053449, 1.055422, 1.057396, 1.059369, - 1.061342, 1.063313, 1.065282, 1.067247, 1.069208, - 1.071163, 1.073113, 1.075056, 1.076991, 1.078917, - 1.080834, 1.082740, 1.084634, 1.086516, 1.088385, - 1.090239, 1.092078, 1.093900, 1.095705, 1.097492, - 1.099259, 1.101006, 1.102732, 1.104435, 1.106115, - 1.107771, 1.109401, 1.111004, 1.112581, 1.114128, - 1.115647, 1.117134, 1.118590, 1.120014, 1.121404, - 1.122759, 1.124078, 1.125361, 1.126607, 1.127813, - 1.128981 + 0.98073262, 0.97864445, 0.97658353, 0.97455712, 0.97257220, + 0.97063541, 0.96875308, 0.96693124, 0.96517559, 0.96349152, + 0.96188413, 0.96035821, 0.95891825, 0.95756847, 0.95631283, + 0.95515500, 0.95409842, 0.95314629, 0.95230159, 0.95156707, + 0.95094529, 0.95043862, 0.95004926, 0.94977923, 0.94963039, + 0.94960449, 0.94970294, 0.94992599, 0.95027476, 0.95074995, + 0.95135202, 0.95208117, 0.95293738, 0.95392040, 0.95502977, + 0.95626483, 0.95762472, 0.95910842, 0.96071470, 0.96244218, + 0.96428931, 0.96625438, 0.96833552, 0.97053071, 0.97283778, + 0.97525439, 0.97777809, 0.98040625, 0.98313609, 0.98596471, + 0.98888903, 0.99190584, 0.99501176, 0.99820327, 1.00147669, + 1.00482817, 1.00825371, 1.01174915, 1.01531016, 1.01893222, + 1.02261067, 1.02634067, 1.03011718, 1.03393500, 1.03778877, + 1.04167291, 1.04558168, 1.04950918, 1.05344929, 1.05739573, + 1.06134205, 1.06528161, 1.06920761, 1.07311309, 1.07699090, + 1.08083377, 1.08463427, 1.08838482, 1.09207772, 1.09570517, + 1.09925925, 1.10273195, 1.10611518, 1.10940081, 1.11258066, + 1.11564653, 1.11859023, 1.12140357, 1.12407842, 1.12660674, + 1.12898057 } }, { - 181, 40.000000, 400.000000, + 91, 40.000000, 400.000000, 1.0, { - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000 + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000 } }, { - 181, 40.000000, 400.000000, + 91, 40.000000, 400.000000, 1.0, { - 1.945100, 1.929640, 1.914098, 1.898479, 1.882791, - 1.867042, 1.851240, 1.835389, 1.819499, 1.803574, - 1.787622, 1.771648, 1.755660, 1.739661, 1.723659, - 1.707659, 1.691666, 1.675685, 1.659721, 1.643779, - 1.627864, 1.611981, 1.596132, 1.580324, 1.564559, - 1.548842, 1.533176, 1.517564, 1.502011, 1.486520, - 1.471093, 1.455733, 1.440444, 1.425228, 1.410088, - 1.395026, 1.380044, 1.365145, 1.350331, 1.335604, - 1.320965, 1.306416, 1.291960, 1.277597, 1.263330, - 1.249158, 1.235085, 1.221110, 1.207236, 1.193462, - 1.179790, 1.166222, 1.152787, 1.139490, 1.126302, - 1.113225, 1.100260, 1.087407, 1.074669, 1.062047, - 1.049542, 1.037153, 1.024884, 1.012733, 1.000701, - 0.988790, 0.977000, 0.965330, 0.953782, 0.942355, - 0.931050, 0.919867, 0.908805, 0.897866, 0.887048, - 0.876351, 0.865776, 0.855322, 0.844989, 0.834777, - 0.824684, 0.814712, 0.804859, 0.795125, 0.785509, - 0.776012, 0.766631, 0.757368, 0.748221, 0.739189, - 0.730272, 0.721470, 0.712781, 0.704205, 0.695742, - 0.687390, 0.679148, 0.671017, 0.662995, 0.655081, - 0.647275, 0.639576, 0.631984, 0.624496, 0.617113, - 0.609834, 0.602658, 0.595584, 0.588611, 0.581739, - 0.574967, 0.568293, 0.561718, 0.555239, 0.548858, - 0.542572, 0.536381, 0.530283, 0.524280, 0.518368, - 0.512549, 0.506820, 0.501181, 0.495632, 0.490171, - 0.484799, 0.479513, 0.474313, 0.469200, 0.464171, - 0.459226, 0.454364, 0.449586, 0.444889, 0.440273, - 0.435739, 0.431284, 0.426908, 0.422611, 0.418392, - 0.414250, 0.410184, 0.406195, 0.402281, 0.398442, - 0.394677, 0.390986, 0.387368, 0.383822, 0.380348, - 0.376946, 0.373614, 0.370353, 0.367162, 0.364039, - 0.360986, 0.358001, 0.355084, 0.352234, 0.349451, - 0.346735, 0.344085, 0.341501, 0.338982, 0.336528, - 0.334139, 0.331814, 0.329553, 0.327356, 0.325222, - 0.323151, 0.321143, 0.319198, 0.317315, 0.315494, - 0.313734, 0.312037, 0.310401, 0.308827, 0.307314, - 0.305862 + 1.94509985, 1.91409750, 1.88279115, 1.85123956, 1.81949876, + 1.78762198, 1.75565965, 1.72365933, 1.69166581, 1.65972109, + 1.62786443, 1.59613242, 1.56455902, 1.53317568, 1.50201140, + 1.47109282, 1.44044431, 1.41008807, 1.38004426, 1.35033106, + 1.32096478, 1.29195997, 1.26332953, 1.23508479, 1.20723562, + 1.17979049, 1.15278717, 1.12630248, 1.10025953, 1.07466947, + 1.04954162, 1.02488359, 1.00070144, 0.97699981, 0.95378200, + 0.93105015, 0.90880530, 0.88704751, 0.86577595, 0.84498900, + 0.82468432, 0.80485893, 0.78550931, 0.76663139, 0.74822070, + 0.73027239, 0.71278125, 0.69574179, 0.67914831, 0.66299488, + 0.64727541, 0.63198367, 0.61711335, 0.60265805, 0.58861132, + 0.57496669, 0.56171766, 0.54885776, 0.53638055, 0.52427962, + 0.51254863, 0.50118129, 0.49017140, 0.47951285, 0.46919963, + 0.45922581, 0.44958562, 0.44027338, 0.43128355, 0.42261070, + 0.41424959, 0.40619507, 0.39844218, 0.39098611, 0.38382219, + 0.37694595, 0.37035307, 0.36403942, 0.35800105, 0.35223421, + 0.34673535, 0.34150112, 0.33652838, 0.33181422, 0.32735598, + 0.32315120, 0.31919770, 0.31549357, 0.31203715, 0.30882709, + 0.30586232 } } }; static xspect illoc_Plankian_CIE_1964_10[3] = { { - 481, 40.000000, 1000.000000, + 241, 40.000000, 1000.000000, 1.0, { - 0.981980, 0.981153, 0.980335, 0.979528, 0.978732, - 0.977948, 0.977178, 0.976421, 0.975679, 0.974952, - 0.974241, 0.973547, 0.972870, 0.972212, 0.971572, - 0.970952, 0.970352, 0.969772, 0.969214, 0.968677, - 0.968163, 0.967671, 0.967202, 0.966758, 0.966337, - 0.965941, 0.965570, 0.965224, 0.964903, 0.964609, - 0.964340, 0.964098, 0.963883, 0.963694, 0.963532, - 0.963398, 0.963291, 0.963212, 0.963160, 0.963136, - 0.963140, 0.963172, 0.963231, 0.963319, 0.963434, - 0.963578, 0.963749, 0.963948, 0.964175, 0.964430, - 0.964713, 0.965023, 0.965361, 0.965726, 0.966119, - 0.966539, 0.966986, 0.967460, 0.967960, 0.968487, - 0.969041, 0.969621, 0.970227, 0.970859, 0.971517, - 0.972201, 0.972910, 0.973644, 0.974402, 0.975186, - 0.975994, 0.976827, 0.977683, 0.978564, 0.979468, - 0.980396, 0.981347, 0.982320, 0.983317, 0.984336, - 0.985378, 0.986441, 0.987526, 0.988633, 0.989762, - 0.990911, 0.992081, 0.993272, 0.994484, 0.995715, - 0.996967, 0.998238, 0.999529, 1.000840, 1.002169, - 1.003517, 1.004884, 1.006269, 1.007672, 1.009094, - 1.010533, 1.011989, 1.013463, 1.014954, 1.016462, - 1.017986, 1.019527, 1.021084, 1.022657, 1.024246, - 1.025851, 1.027470, 1.029106, 1.030756, 1.032421, - 1.034101, 1.035795, 1.037503, 1.039225, 1.040961, - 1.042711, 1.044475, 1.046251, 1.048041, 1.049844, - 1.051659, 1.053487, 1.055327, 1.057180, 1.059045, - 1.060921, 1.062809, 1.064709, 1.066621, 1.068543, - 1.070476, 1.072421, 1.074376, 1.076342, 1.078318, - 1.080304, 1.082300, 1.084307, 1.086323, 1.088349, - 1.090384, 1.092429, 1.094483, 1.096546, 1.098618, - 1.100699, 1.102789, 1.104887, 1.106993, 1.109108, - 1.111231, 1.113362, 1.115500, 1.117647, 1.119801, - 1.121962, 1.124131, 1.126307, 1.128491, 1.130681, - 1.132878, 1.135082, 1.137292, 1.139509, 1.141733, - 1.143962, 1.146198, 1.148440, 1.150688, 1.152942, - 1.155202, 1.157467, 1.159737, 1.162013, 1.164295, - 1.166582, 1.168873, 1.171170, 1.173472, 1.175778, - 1.178090, 1.180405, 1.182726, 1.185051, 1.187380, - 1.189713, 1.192051, 1.194392, 1.196738, 1.199088, - 1.201441, 1.203798, 1.206159, 1.208523, 1.210891, - 1.213262, 1.215636, 1.218014, 1.220394, 1.222778, - 1.225165, 1.227554, 1.229947, 1.232342, 1.234740, - 1.237140, 1.239543, 1.241949, 1.244357, 1.246767, - 1.249179, 1.251594, 1.254010, 1.256429, 1.258849, - 1.261272, 1.263696, 1.266122, 1.268550, 1.270979, - 1.273410, 1.275843, 1.278276, 1.280712, 1.283148, - 1.285586, 1.288025, 1.290465, 1.292906, 1.295348, - 1.297792, 1.300236, 1.302681, 1.305126, 1.307573, - 1.310020, 1.312468, 1.314916, 1.317365, 1.319814, - 1.322264, 1.324714, 1.327165, 1.329615, 1.332066, - 1.334517, 1.336969, 1.339420, 1.341871, 1.344323, - 1.346774, 1.349225, 1.351676, 1.354127, 1.356578, - 1.359028, 1.361478, 1.363927, 1.366377, 1.368825, - 1.371274, 1.373721, 1.376168, 1.378615, 1.381061, - 1.383506, 1.385950, 1.388394, 1.390837, 1.393279, - 1.395720, 1.398160, 1.400599, 1.403038, 1.405475, - 1.407911, 1.410346, 1.412780, 1.415213, 1.417644, - 1.420075, 1.422504, 1.424931, 1.427358, 1.429783, - 1.432207, 1.434629, 1.437050, 1.439469, 1.441887, - 1.444304, 1.446718, 1.449131, 1.451543, 1.453953, - 1.456361, 1.458768, 1.461173, 1.463576, 1.465977, - 1.468376, 1.470774, 1.473170, 1.475564, 1.477956, - 1.480346, 1.482734, 1.485120, 1.487504, 1.489886, - 1.492266, 1.494644, 1.497020, 1.499393, 1.501765, - 1.504134, 1.506501, 1.508867, 1.511229, 1.513590, - 1.515948, 1.518304, 1.520658, 1.523009, 1.525358, - 1.527705, 1.530049, 1.532391, 1.534730, 1.537067, - 1.539402, 1.541734, 1.544064, 1.546391, 1.548715, - 1.551037, 1.553357, 1.555674, 1.557988, 1.560300, - 1.562609, 1.564915, 1.567219, 1.569520, 1.571818, - 1.574114, 1.576407, 1.578698, 1.580985, 1.583270, - 1.585552, 1.587831, 1.590108, 1.592381, 1.594652, - 1.596920, 1.599185, 1.601448, 1.603707, 1.605964, - 1.608217, 1.610468, 1.612716, 1.614961, 1.617203, - 1.619442, 1.621678, 1.623911, 1.626141, 1.628368, - 1.630592, 1.632813, 1.635031, 1.637247, 1.639459, - 1.641668, 1.643873, 1.646076, 1.648276, 1.650473, - 1.652666, 1.654857, 1.657044, 1.659228, 1.661409, - 1.663587, 1.665762, 1.667934, 1.670103, 1.672268, - 1.674430, 1.676589, 1.678745, 1.680897, 1.683047, - 1.685193, 1.687336, 1.689476, 1.691612, 1.693746, - 1.695876, 1.698003, 1.700126, 1.702246, 1.704363, - 1.706477, 1.708588, 1.710695, 1.712799, 1.714899, - 1.716997, 1.719091, 1.721182, 1.723269, 1.725353, - 1.727434, 1.729511, 1.731586, 1.733656, 1.735724, - 1.737788, 1.739849, 1.741906, 1.743960, 1.746011, - 1.748058, 1.750102, 1.752143, 1.754180, 1.756214, - 1.758245, 1.760272, 1.762296, 1.764316, 1.766333, - 1.768347, 1.770357, 1.772364, 1.774367, 1.776367, - 1.778364, 1.780357, 1.782347, 1.784334, 1.786317, - 1.788296, 1.790272, 1.792245, 1.794214, 1.796180, - 1.798143, 1.800102, 1.802058, 1.804010, 1.805959, - 1.807904, 1.809846, 1.811785, 1.813720, 1.815652, - 1.817580, 1.819505, 1.821426, 1.823344, 1.825259, - 1.827170, 1.829078, 1.830982, 1.832883, 1.834780, - 1.836674, 1.838565, 1.840452, 1.842335, 1.844216, - 1.846092 + 0.98198010, 0.98033482, 0.97873185, 0.97717770, 0.97567871, + 0.97424096, 0.97287024, 0.97157205, 0.97035156, 0.96921356, + 0.96816250, 0.96720244, 0.96633706, 0.96556966, 0.96490314, + 0.96434005, 0.96388256, 0.96353249, 0.96329132, 0.96316020, + 0.96313999, 0.96323124, 0.96343424, 0.96374902, 0.96417539, + 0.96471294, 0.96536106, 0.96611895, 0.96698569, 0.96796017, + 0.96904118, 0.97022738, 0.97151736, 0.97290957, 0.97440245, + 0.97599432, 0.97768349, 0.97946820, 0.98134667, 0.98331707, + 0.98537759, 0.98752638, 0.98976157, 0.99208132, 0.99448377, + 0.99696708, 0.99952940, 1.00216890, 1.00488379, 1.00767225, + 1.01053253, 1.01346286, 1.01646152, 1.01952680, 1.02265702, + 1.02585053, 1.02910569, 1.03242090, 1.03579459, 1.03922521, + 1.04271124, 1.04625119, 1.04984359, 1.05348700, 1.05718000, + 1.06092123, 1.06470931, 1.06854291, 1.07242074, 1.07634150, + 1.08030395, 1.08430686, 1.08834901, 1.09242924, 1.09654637, + 1.10069929, 1.10488686, 1.10910802, 1.11336169, 1.11764682, + 1.12196239, 1.12630740, 1.13068087, 1.13508183, 1.13950934, + 1.14396248, 1.14844034, 1.15294204, 1.15746670, 1.16201349, + 1.16658156, 1.17117010, 1.17577831, 1.18040541, 1.18505064, + 1.18971324, 1.19439248, 1.19908763, 1.20379800, 1.20852290, + 1.21326165, 1.21801358, 1.22277805, 1.22755442, 1.23234208, + 1.23714042, 1.24194884, 1.24676675, 1.25159359, 1.25642880, + 1.26127183, 1.26612215, 1.27097923, 1.27584256, 1.28071163, + 1.28558597, 1.29046507, 1.29534848, 1.30023574, 1.30512639, + 1.31001999, 1.31491611, 1.31981433, 1.32471423, 1.32961542, + 1.33451749, 1.33942006, 1.34432275, 1.34922519, 1.35412702, + 1.35902788, 1.36392743, 1.36882533, 1.37372125, 1.37861486, + 1.38350585, 1.38839391, 1.39327873, 1.39816003, 1.40303750, + 1.40791087, 1.41277987, 1.41764421, 1.42250364, 1.42735791, + 1.43220675, 1.43704992, 1.44188718, 1.44671830, 1.45154305, + 1.45636121, 1.46117254, 1.46597685, 1.47077392, 1.47556355, + 1.48034554, 1.48511970, 1.48988583, 1.49464376, 1.49939330, + 1.50413427, 1.50886651, 1.51358985, 1.51830412, 1.52300916, + 1.52770483, 1.53239097, 1.53706742, 1.54173406, 1.54639073, + 1.55103731, 1.55567365, 1.56029964, 1.56491514, 1.56952003, + 1.57411419, 1.57869751, 1.58326987, 1.58783116, 1.59238129, + 1.59692013, 1.60144760, 1.60596359, 1.61046801, 1.61496077, + 1.61944177, 1.62391094, 1.62836818, 1.63281341, 1.63724655, + 1.64166754, 1.64607628, 1.65047271, 1.65485677, 1.65922837, + 1.66358746, 1.66793398, 1.67226786, 1.67658903, 1.68089746, + 1.68519307, 1.68947583, 1.69374566, 1.69800254, 1.70224640, + 1.70647721, 1.71069492, 1.71489949, 1.71909087, 1.72326904, + 1.72743394, 1.73158555, 1.73572384, 1.73984877, 1.74396030, + 1.74805842, 1.75214309, 1.75621429, 1.76027199, 1.76431617, + 1.76834680, 1.77236387, 1.77636736, 1.78035724, 1.78433351, + 1.78829614, 1.79224512, 1.79618045, 1.80010209, 1.80401005, + 1.80790432, 1.81178488, 1.81565173, 1.81950486, 1.82334427, + 1.82716994, 1.83098189, 1.83478010, 1.83856457, 1.84233531, + 1.84609231 } }, { - 481, 40.000000, 1000.000000, + 241, 40.000000, 1000.000000, 1.0, { - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000 + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000 } }, { - 481, 40.000000, 1000.000000, + 241, 40.000000, 1000.000000, 1.0, { - 1.923654, 1.909157, 1.894584, 1.879941, 1.865235, - 1.850470, 1.835651, 1.820786, 1.805878, 1.790933, - 1.775958, 1.760956, 1.745934, 1.730896, 1.715848, - 1.700795, 1.685741, 1.670691, 1.655651, 1.640624, - 1.625615, 1.610629, 1.595669, 1.580741, 1.565847, - 1.550992, 1.536180, 1.521413, 1.506697, 1.492034, - 1.477427, 1.462880, 1.448395, 1.433975, 1.419624, - 1.405344, 1.391137, 1.377005, 1.362952, 1.348979, - 1.335088, 1.321281, 1.307560, 1.293927, 1.280383, - 1.266930, 1.253569, 1.240302, 1.227130, 1.214053, - 1.201074, 1.188192, 1.175410, 1.162727, 1.150144, - 1.137662, 1.125282, 1.113004, 1.100828, 1.088756, - 1.076786, 1.064920, 1.053158, 1.041499, 1.029944, - 1.018493, 1.007146, 0.995903, 0.984764, 0.973728, - 0.962796, 0.951967, 0.941240, 0.930617, 0.920096, - 0.909677, 0.899359, 0.889143, 0.879028, 0.869013, - 0.859098, 0.849282, 0.839565, 0.829947, 0.820426, - 0.811003, 0.801676, 0.792445, 0.783310, 0.774269, - 0.765323, 0.756470, 0.747710, 0.739042, 0.730466, - 0.721980, 0.713585, 0.705279, 0.697062, 0.688933, - 0.680891, 0.672936, 0.665067, 0.657283, 0.649583, - 0.641968, 0.634435, 0.626984, 0.619616, 0.612328, - 0.605120, 0.597991, 0.590942, 0.583970, 0.577075, - 0.570257, 0.563515, 0.556848, 0.550255, 0.543736, - 0.537290, 0.530916, 0.524614, 0.518382, 0.512221, - 0.506129, 0.500106, 0.494151, 0.488264, 0.482443, - 0.476688, 0.470999, 0.465374, 0.459814, 0.454317, - 0.448883, 0.443510, 0.438200, 0.432950, 0.427760, - 0.422630, 0.417559, 0.412547, 0.407592, 0.402694, - 0.397852, 0.393067, 0.388337, 0.383662, 0.379041, - 0.374473, 0.369959, 0.365497, 0.361086, 0.356728, - 0.352420, 0.348162, 0.343953, 0.339794, 0.335684, - 0.331622, 0.327607, 0.323639, 0.319718, 0.315842, - 0.312013, 0.308228, 0.304487, 0.300791, 0.297138, - 0.293529, 0.289961, 0.286436, 0.282953, 0.279511, - 0.276109, 0.272748, 0.269426, 0.266144, 0.262900, - 0.259696, 0.256529, 0.253400, 0.250308, 0.247252, - 0.244234, 0.241251, 0.238303, 0.235391, 0.232513, - 0.229670, 0.226861, 0.224085, 0.221343, 0.218633, - 0.215956, 0.213311, 0.210697, 0.208115, 0.205564, - 0.203043, 0.200553, 0.198092, 0.195661, 0.193260, - 0.190887, 0.188543, 0.186227, 0.183939, 0.181678, - 0.179445, 0.177238, 0.175059, 0.172905, 0.170778, - 0.168676, 0.166600, 0.164549, 0.162523, 0.160521, - 0.158544, 0.156590, 0.154660, 0.152754, 0.150871, - 0.149010, 0.147172, 0.145357, 0.143563, 0.141792, - 0.140042, 0.138313, 0.136605, 0.134918, 0.133252, - 0.131606, 0.129980, 0.128373, 0.126787, 0.125220, - 0.123672, 0.122142, 0.120632, 0.119140, 0.117666, - 0.116210, 0.114772, 0.113352, 0.111949, 0.110563, - 0.109194, 0.107842, 0.106507, 0.105188, 0.103885, - 0.102598, 0.101327, 0.100071, 0.098831, 0.097606, - 0.096397, 0.095202, 0.094021, 0.092856, 0.091704, - 0.090567, 0.089444, 0.088335, 0.087239, 0.086157, - 0.085088, 0.084032, 0.082989, 0.081960, 0.080942, - 0.079938, 0.078946, 0.077966, 0.076998, 0.076042, - 0.075098, 0.074166, 0.073245, 0.072335, 0.071437, - 0.070550, 0.069674, 0.068808, 0.067954, 0.067110, - 0.066276, 0.065453, 0.064640, 0.063837, 0.063044, - 0.062260, 0.061487, 0.060723, 0.059969, 0.059223, - 0.058488, 0.057761, 0.057043, 0.056334, 0.055634, - 0.054943, 0.054260, 0.053586, 0.052920, 0.052263, - 0.051613, 0.050972, 0.050338, 0.049713, 0.049095, - 0.048485, 0.047883, 0.047288, 0.046700, 0.046120, - 0.045547, 0.044981, 0.044422, 0.043870, 0.043325, - 0.042787, 0.042255, 0.041730, 0.041212, 0.040700, - 0.040194, 0.039695, 0.039202, 0.038715, 0.038234, - 0.037760, 0.037291, 0.036828, 0.036370, 0.035919, - 0.035473, 0.035032, 0.034597, 0.034168, 0.033744, - 0.033325, 0.032911, 0.032503, 0.032099, 0.031701, - 0.031308, 0.030919, 0.030536, 0.030157, 0.029783, - 0.029413, 0.029048, 0.028688, 0.028332, 0.027981, - 0.027634, 0.027291, 0.026953, 0.026619, 0.026289, - 0.025963, 0.025642, 0.025324, 0.025010, 0.024700, - 0.024394, 0.024092, 0.023794, 0.023499, 0.023208, - 0.022921, 0.022637, 0.022357, 0.022080, 0.021807, - 0.021537, 0.021270, 0.021007, 0.020747, 0.020491, - 0.020237, 0.019987, 0.019740, 0.019496, 0.019255, - 0.019017, 0.018782, 0.018550, 0.018321, 0.018094, - 0.017871, 0.017650, 0.017432, 0.017217, 0.017004, - 0.016795, 0.016587, 0.016383, 0.016181, 0.015981, - 0.015784, 0.015589, 0.015397, 0.015207, 0.015020, - 0.014835, 0.014652, 0.014471, 0.014293, 0.014117, - 0.013943, 0.013771, 0.013602, 0.013434, 0.013269, - 0.013106, 0.012944, 0.012785, 0.012628, 0.012473, - 0.012319, 0.012168, 0.012018, 0.011871, 0.011725, - 0.011581, 0.011438, 0.011298, 0.011159, 0.011022, - 0.010887, 0.010753, 0.010621, 0.010491, 0.010363, - 0.010235, 0.010110, 0.009986, 0.009864, 0.009743, - 0.009623, 0.009506, 0.009389, 0.009274, 0.009161, - 0.009048, 0.008938, 0.008828, 0.008720, 0.008614, - 0.008508, 0.008404, 0.008302, 0.008200, 0.008100, - 0.008001, 0.007903, 0.007807, 0.007712, 0.007617, - 0.007524, 0.007433, 0.007342, 0.007252, 0.007164, - 0.007077, 0.006990, 0.006905, 0.006821, 0.006738, - 0.006656, 0.006575, 0.006495, 0.006416, 0.006338, - 0.006261 + 1.92365392, 1.89458387, 1.86523481, 1.83565136, 1.80587776, + 1.77595769, 1.74593393, 1.71584817, 1.68574077, 1.65565062, + 1.62561492, 1.59566912, 1.56584681, 1.53617959, 1.50669711, + 1.47742699, 1.44839480, 1.41962414, 1.39113660, 1.36295183, + 1.33508762, 1.30755992, 1.28038293, 1.25356920, 1.22712967, + 1.20107381, 1.17540964, 1.15014388, 1.12528201, 1.10082833, + 1.07678611, 1.05315760, 1.02994416, 1.00714631, 0.98476381, + 0.96279573, 0.94124048, 0.92009596, 0.89935950, 0.87902799, + 0.85909793, 0.83956543, 0.82042628, 0.80167600, 0.78330985, + 0.76532288, 0.74770996, 0.73046580, 0.71358499, 0.69706199, + 0.68089118, 0.66506690, 0.64958339, 0.63443491, 0.61961565, + 0.60511982, 0.59094162, 0.57707529, 0.56351504, 0.55025517, + 0.53728997, 0.52461379, 0.51222105, 0.50010619, 0.48826372, + 0.47668823, 0.46537435, 0.45431680, 0.44351035, 0.43294986, + 0.42263025, 0.41254652, 0.40269376, 0.39306712, 0.38366183, + 0.37447321, 0.36549665, 0.35672762, 0.34816166, 0.33979441, + 0.33162156, 0.32363891, 0.31584231, 0.30822770, 0.30079109, + 0.29352858, 0.28643631, 0.27951054, 0.27274758, 0.26614379, + 0.25969564, 0.25339966, 0.24725242, 0.24125060, 0.23539093, + 0.22967019, 0.22408525, 0.21863304, 0.21331053, 0.20811479, + 0.20304292, 0.19809210, 0.19325955, 0.18854258, 0.18393851, + 0.17944477, 0.17505879, 0.17077811, 0.16660028, 0.16252292, + 0.15854371, 0.15466036, 0.15087063, 0.14717236, 0.14356341, + 0.14004168, 0.13660515, 0.13325180, 0.12997969, 0.12678690, + 0.12367158, 0.12063190, 0.11766606, 0.11477234, 0.11194901, + 0.10919441, 0.10650692, 0.10388494, 0.10132691, 0.09883130, + 0.09639665, 0.09402148, 0.09170437, 0.08944395, 0.08723885, + 0.08508775, 0.08298936, 0.08094240, 0.07894564, 0.07699788, + 0.07509794, 0.07324465, 0.07143691, 0.06967360, 0.06795366, + 0.06627603, 0.06463969, 0.06304365, 0.06148691, 0.05996854, + 0.05848760, 0.05704317, 0.05563438, 0.05426035, 0.05292023, + 0.05161321, 0.05033846, 0.04909521, 0.04788269, 0.04670014, + 0.04554683, 0.04442204, 0.04332508, 0.04225526, 0.04121192, + 0.04019441, 0.03920210, 0.03823436, 0.03729059, 0.03637020, + 0.03547262, 0.03459728, 0.03374364, 0.03291117, 0.03209933, + 0.03130762, 0.03053555, 0.02978263, 0.02904838, 0.02833235, + 0.02763408, 0.02695314, 0.02628909, 0.02564153, 0.02501003, + 0.02439420, 0.02379366, 0.02320802, 0.02263692, 0.02207999, + 0.02153688, 0.02100725, 0.02049077, 0.01998711, 0.01949594, + 0.01901697, 0.01854988, 0.01809438, 0.01765019, 0.01721701, + 0.01679458, 0.01638264, 0.01598091, 0.01558914, 0.01520710, + 0.01483452, 0.01447119, 0.01411686, 0.01377132, 0.01343434, + 0.01310571, 0.01278523, 0.01247268, 0.01216788, 0.01187063, + 0.01158074, 0.01129803, 0.01102231, 0.01075342, 0.01049118, + 0.01023543, 0.00998601, 0.00974275, 0.00950551, 0.00927413, + 0.00904847, 0.00882838, 0.00861373, 0.00840439, 0.00820021, + 0.00800107, 0.00780684, 0.00761740, 0.00743264, 0.00725243, + 0.00707667, 0.00690523, 0.00673802, 0.00657492, 0.00641584, + 0.00626068 } } }; static xspect illoc_Daylight_CIE_1964_10[3] = { { - 181, 40.000000, 400.000000, + 91, 40.000000, 400.000000, 1.0, { - 0.954594, 0.954039, 0.953491, 0.952950, 0.952416, - 0.951891, 0.951374, 0.950867, 0.950370, 0.949884, - 0.949409, 0.948945, 0.948494, 0.948056, 0.947632, - 0.947221, 0.946825, 0.946444, 0.946078, 0.945729, - 0.945395, 0.945079, 0.944780, 0.944498, 0.944235, - 0.943990, 0.943765, 0.943558, 0.943372, 0.943205, - 0.943059, 0.942934, 0.942830, 0.942748, 0.942687, - 0.942649, 0.942633, 0.942639, 0.942669, 0.942722, - 0.942799, 0.942900, 0.943024, 0.943174, 0.943347, - 0.943546, 0.943770, 0.944019, 0.944293, 0.944594, - 0.944920, 0.945273, 0.945651, 0.946054, 0.946484, - 0.946940, 0.947423, 0.947932, 0.948468, 0.949031, - 0.949620, 0.950237, 0.950880, 0.951550, 0.952247, - 0.952971, 0.953722, 0.954499, 0.955304, 0.956135, - 0.956992, 0.957876, 0.958787, 0.959724, 0.960688, - 0.961677, 0.962693, 0.963735, 0.964802, 0.965895, - 0.967013, 0.968157, 0.969326, 0.970520, 0.971739, - 0.972982, 0.974249, 0.975541, 0.976856, 0.978195, - 0.979557, 0.980943, 0.982351, 0.983782, 0.985235, - 0.986710, 0.988207, 0.989725, 0.991264, 0.992823, - 0.994403, 0.996003, 0.997623, 0.999262, 1.000920, - 1.002596, 1.004290, 1.006002, 1.007731, 1.009477, - 1.011239, 1.013018, 1.014811, 1.016620, 1.018443, - 1.020280, 1.022130, 1.023993, 1.025869, 1.027757, - 1.029655, 1.031565, 1.033485, 1.035414, 1.037353, - 1.039299, 1.041254, 1.043215, 1.045183, 1.047157, - 1.049136, 1.051120, 1.053107, 1.055098, 1.057090, - 1.059085, 1.061080, 1.063076, 1.065071, 1.067064, - 1.069055, 1.071044, 1.073028, 1.075009, 1.076983, - 1.078952, 1.080913, 1.082866, 1.084811, 1.086746, - 1.088670, 1.090583, 1.092484, 1.094371, 1.096244, - 1.098102, 1.099944, 1.101768, 1.103575, 1.105363, - 1.107131, 1.108878, 1.110603, 1.112305, 1.113984, - 1.115638, 1.117266, 1.118867, 1.120440, 1.121985, - 1.123500, 1.124984, 1.126436, 1.127856, 1.129241, - 1.130592, 1.131908, 1.133186, 1.134427, 1.135629, - 1.136792 + 0.95459407, 0.95349111, 0.95241608, 0.95137406, 0.95036997, + 0.94940854, 0.94849436, 0.94763182, 0.94682514, 0.94607835, + 0.94539532, 0.94477973, 0.94423508, 0.94376472, 0.94337182, + 0.94305939, 0.94283028, 0.94268721, 0.94263273, 0.94266926, + 0.94279911, 0.94302445, 0.94334731, 0.94376966, 0.94429331, + 0.94492003, 0.94565055, 0.94648366, 0.94742252, 0.94846786, + 0.94962022, 0.95087992, 0.95224710, 0.95372172, 0.95530356, + 0.95699225, 0.95878723, 0.96068779, 0.96269306, 0.96480202, + 0.96701349, 0.96932617, 0.97173857, 0.97424908, 0.97685594, + 0.97955724, 0.98235094, 0.98523482, 0.98820655, 0.99126363, + 0.99440342, 0.99762310, 1.00091974, 1.00429021, 1.00773125, + 1.01123943, 1.01481114, 1.01844261, 1.02212992, 1.02586895, + 1.02965540, 1.03348482, 1.03735256, 1.04125378, 1.04518348, + 1.04913645, 1.05310731, 1.05709048, 1.06108022, 1.06507057, + 1.06905542, 1.07302845, 1.07698319, 1.08091298, 1.08481100, + 1.08867027, 1.09248366, 1.09624388, 1.09994352, 1.10357505, + 1.10713082, 1.11060309, 1.11398402, 1.11726572, 1.12044027, + 1.12349969, 1.12643600, 1.12924125, 1.13190751, 1.13442693, + 1.13679173 } }, { - 181, 40.000000, 400.000000, + 91, 40.000000, 400.000000, 1.0, { - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000 + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000 } }, { - 181, 40.000000, 400.000000, + 91, 40.000000, 400.000000, 1.0, { - 1.879446, 1.865348, 1.851156, 1.836877, 1.822518, - 1.808084, 1.793581, 1.779017, 1.764398, 1.749728, - 1.735014, 1.720261, 1.705476, 1.690662, 1.675827, - 1.660974, 1.646108, 1.631236, 1.616360, 1.601486, - 1.586618, 1.571761, 1.556919, 1.542095, 1.527294, - 1.512519, 1.497775, 1.483064, 1.468390, 1.453756, - 1.439166, 1.424623, 1.410129, 1.395688, 1.381302, - 1.366973, 1.352705, 1.338499, 1.324359, 1.310286, - 1.296282, 1.282349, 1.268490, 1.254705, 1.240998, - 1.227369, 1.213820, 1.200353, 1.186968, 1.173668, - 1.160454, 1.147326, 1.134316, 1.121427, 1.108633, - 1.095933, 1.083332, 1.070830, 1.058428, 1.046129, - 1.033933, 1.021842, 1.009857, 0.997979, 0.986209, - 0.974548, 0.962996, 0.951555, 0.940225, 0.929007, - 0.917901, 0.906907, 0.896026, 0.885259, 0.874605, - 0.864065, 0.853639, 0.843326, 0.833128, 0.823044, - 0.813073, 0.803217, 0.793474, 0.783845, 0.774329, - 0.764926, 0.755636, 0.746458, 0.737392, 0.728439, - 0.719596, 0.710865, 0.702244, 0.693733, 0.685332, - 0.677040, 0.668856, 0.660780, 0.652812, 0.644950, - 0.637194, 0.629545, 0.622000, 0.614559, 0.607222, - 0.599989, 0.592857, 0.585828, 0.578899, 0.572071, - 0.565342, 0.558713, 0.552181, 0.545747, 0.539410, - 0.533170, 0.527024, 0.520973, 0.515017, 0.509153, - 0.503382, 0.497703, 0.492115, 0.486617, 0.481209, - 0.475890, 0.470659, 0.465515, 0.460458, 0.455487, - 0.450602, 0.445801, 0.441084, 0.436451, 0.431899, - 0.427430, 0.423042, 0.418734, 0.414506, 0.410357, - 0.406287, 0.402294, 0.398378, 0.394539, 0.390776, - 0.387087, 0.383474, 0.379934, 0.376467, 0.373074, - 0.369752, 0.366502, 0.363322, 0.360213, 0.357174, - 0.354204, 0.351303, 0.348469, 0.345704, 0.343005, - 0.340373, 0.337807, 0.335306, 0.332871, 0.330501, - 0.328194, 0.325951, 0.323772, 0.321656, 0.319602, - 0.317611, 0.315681, 0.313813, 0.312005, 0.310259, - 0.308574, 0.306948, 0.305383, 0.303877, 0.302431, - 0.301045 + 1.87944579, 1.85115635, 1.82251764, 1.79358144, 1.76439755, + 1.73501373, 1.70547561, 1.67582672, 1.64610843, 1.61635996, + 1.58661842, 1.55691876, 1.52729388, 1.49777462, 1.46838982, + 1.43916636, 1.41012925, 1.38130165, 1.35270497, 1.32435893, + 1.29628160, 1.26848951, 1.24099772, 1.21381984, 1.18696819, + 1.16045377, 1.13431602, 1.10863254, 1.08333193, 1.05842802, + 1.03393283, 1.00985677, 0.98620872, 0.96299611, 0.94022508, + 0.91790055, 0.89602628, 0.87460505, 0.85363865, 0.83312802, + 0.81307330, 0.79347392, 0.77432863, 0.75563561, 0.73739249, + 0.71959642, 0.70224412, 0.68533193, 0.66885584, 0.65281154, + 0.63719444, 0.62199974, 0.60722242, 0.59285729, 0.57889903, + 0.56534217, 0.55218116, 0.53941036, 0.52702408, 0.51501656, + 0.50338204, 0.49211473, 0.48120883, 0.47065858, 0.46045822, + 0.45060201, 0.44108429, 0.43189942, 0.42304184, 0.41450605, + 0.40628664, 0.39837826, 0.39077568, 0.38347377, 0.37646749, + 0.36975195, 0.36332236, 0.35717408, 0.35130261, 0.34570361, + 0.34037291, 0.33530649, 0.33050055, 0.32595147, 0.32165585, + 0.31761051, 0.31381252, 0.31025919, 0.30694811, 0.30387717, + 0.30104455 } } }; static xspect illoc_OPlankian_CIE_1964_10[3] = { { - 481, 40.000000, 1000.000000, + 241, 40.000000, 1000.000000, 1.0, { - 0.982024, 0.981198, 0.980382, 0.979576, 0.978782, - 0.978000, 0.977230, 0.976474, 0.975733, 0.975007, - 0.974297, 0.973603, 0.972927, 0.972268, 0.971629, - 0.971008, 0.970408, 0.969828, 0.969269, 0.968731, - 0.968216, 0.967723, 0.967253, 0.966807, 0.966385, - 0.965987, 0.965613, 0.965265, 0.964942, 0.964645, - 0.964374, 0.964129, 0.963911, 0.963719, 0.963554, - 0.963416, 0.963305, 0.963222, 0.963166, 0.963138, - 0.963138, 0.963165, 0.963220, 0.963302, 0.963413, - 0.963551, 0.963717, 0.963911, 0.964133, 0.964382, - 0.964659, 0.964963, 0.965295, 0.965654, 0.966040, - 0.966453, 0.966894, 0.967361, 0.967855, 0.968375, - 0.968922, 0.969495, 0.970094, 0.970719, 0.971369, - 0.972045, 0.972746, 0.973473, 0.974224, 0.975000, - 0.975800, 0.976625, 0.977473, 0.978346, 0.979242, - 0.980161, 0.981103, 0.982069, 0.983057, 0.984068, - 0.985100, 0.986155, 0.987232, 0.988330, 0.989450, - 0.990590, 0.991752, 0.992934, 0.994136, 0.995359, - 0.996601, 0.997864, 0.999146, 1.000447, 1.001767, - 1.003106, 1.004463, 1.005839, 1.007233, 1.008645, - 1.010075, 1.011522, 1.012986, 1.014468, 1.015966, - 1.017481, 1.019012, 1.020560, 1.022123, 1.023703, - 1.025298, 1.026908, 1.028534, 1.030175, 1.031830, - 1.033500, 1.035184, 1.036883, 1.038596, 1.040322, - 1.042063, 1.043816, 1.045583, 1.047363, 1.049156, - 1.050962, 1.052781, 1.054611, 1.056454, 1.058309, - 1.060176, 1.062055, 1.063945, 1.065847, 1.067760, - 1.069684, 1.071618, 1.073564, 1.075520, 1.077487, - 1.079463, 1.081450, 1.083447, 1.085454, 1.087470, - 1.089496, 1.091532, 1.093576, 1.095630, 1.097692, - 1.099764, 1.101844, 1.103933, 1.106030, 1.108135, - 1.110249, 1.112370, 1.114500, 1.116637, 1.118782, - 1.120934, 1.123094, 1.125260, 1.127435, 1.129616, - 1.131804, 1.133998, 1.136200, 1.138408, 1.140622, - 1.142843, 1.145070, 1.147303, 1.149542, 1.151787, - 1.154037, 1.156293, 1.158555, 1.160823, 1.163095, - 1.165373, 1.167656, 1.169944, 1.172237, 1.174535, - 1.176838, 1.179145, 1.181457, 1.183773, 1.186094, - 1.188419, 1.190748, 1.193081, 1.195418, 1.197759, - 1.200104, 1.202453, 1.204805, 1.207161, 1.209521, - 1.211884, 1.214250, 1.216619, 1.218992, 1.221367, - 1.223746, 1.226128, 1.228512, 1.230899, 1.233289, - 1.235682, 1.238077, 1.240475, 1.242875, 1.245277, - 1.247682, 1.250088, 1.252497, 1.254908, 1.257321, - 1.259736, 1.262153, 1.264571, 1.266992, 1.269414, - 1.271837, 1.274262, 1.276689, 1.279116, 1.281546, - 1.283976, 1.286408, 1.288841, 1.291275, 1.293710, - 1.296146, 1.298583, 1.301021, 1.303460, 1.305899, - 1.308340, 1.310780, 1.313222, 1.315664, 1.318106, - 1.320549, 1.322993, 1.325437, 1.327881, 1.330325, - 1.332770, 1.335214, 1.337659, 1.340104, 1.342549, - 1.344994, 1.347438, 1.349883, 1.352328, 1.354772, - 1.357216, 1.359660, 1.362103, 1.364546, 1.366989, - 1.369431, 1.371872, 1.374314, 1.376754, 1.379194, - 1.381633, 1.384072, 1.386509, 1.388946, 1.391383, - 1.393818, 1.396252, 1.398686, 1.401119, 1.403550, - 1.405981, 1.408410, 1.410839, 1.413266, 1.415692, - 1.418117, 1.420541, 1.422963, 1.425384, 1.427804, - 1.430222, 1.432640, 1.435055, 1.437469, 1.439882, - 1.442293, 1.444703, 1.447111, 1.449518, 1.451923, - 1.454326, 1.456728, 1.459128, 1.461526, 1.463922, - 1.466317, 1.468710, 1.471101, 1.473490, 1.475877, - 1.478263, 1.480646, 1.483028, 1.485407, 1.487785, - 1.490160, 1.492534, 1.494905, 1.497274, 1.499642, - 1.502007, 1.504370, 1.506730, 1.509089, 1.511445, - 1.513799, 1.516151, 1.518501, 1.520848, 1.523193, - 1.525536, 1.527876, 1.530214, 1.532549, 1.534883, - 1.537213, 1.539541, 1.541867, 1.544191, 1.546511, - 1.548830, 1.551145, 1.553459, 1.555769, 1.558077, - 1.560383, 1.562686, 1.564986, 1.567284, 1.569579, - 1.571871, 1.574160, 1.576447, 1.578732, 1.581013, - 1.583292, 1.585568, 1.587841, 1.590111, 1.592379, - 1.594644, 1.596906, 1.599165, 1.601422, 1.603675, - 1.605926, 1.608173, 1.610418, 1.612660, 1.614899, - 1.617135, 1.619369, 1.621599, 1.623826, 1.626051, - 1.628272, 1.630490, 1.632706, 1.634918, 1.637127, - 1.639334, 1.641537, 1.643737, 1.645935, 1.648129, - 1.650320, 1.652508, 1.654693, 1.656875, 1.659053, - 1.661229, 1.663401, 1.665571, 1.667737, 1.669900, - 1.672060, 1.674217, 1.676370, 1.678521, 1.680668, - 1.682812, 1.684953, 1.687091, 1.689225, 1.691357, - 1.693485, 1.695609, 1.697731, 1.699849, 1.701965, - 1.704076, 1.706185, 1.708290, 1.710393, 1.712491, - 1.714587, 1.716679, 1.718768, 1.720854, 1.722936, - 1.725016, 1.727091, 1.729164, 1.731233, 1.733299, - 1.735362, 1.737421, 1.739477, 1.741530, 1.743579, - 1.745625, 1.747667, 1.749707, 1.751743, 1.753775, - 1.755804, 1.757830, 1.759853, 1.761872, 1.763888, - 1.765900, 1.767909, 1.769915, 1.771917, 1.773916, - 1.775911, 1.777904, 1.779892, 1.781878, 1.783860, - 1.785838, 1.787814, 1.789785, 1.791754, 1.793719, - 1.795680, 1.797639, 1.799593, 1.801545, 1.803493, - 1.805437, 1.807379, 1.809316, 1.811251, 1.813182, - 1.815109, 1.817034, 1.818954, 1.820872, 1.822786, - 1.824696, 1.826603, 1.828507, 1.830407, 1.832304, - 1.834197, 1.836087, 1.837974, 1.839857, 1.841737, - 1.843613 + 0.98202407, 0.98038206, 0.97878193, 0.97723018, 0.97573308, + 0.97429668, 0.97292673, 0.97162871, 0.97040775, 0.96926863, + 0.96821578, 0.96725324, 0.96638469, 0.96561342, 0.96494234, + 0.96437399, 0.96391056, 0.96355386, 0.96330539, 0.96316633, + 0.96313753, 0.96321957, 0.96341276, 0.96371714, 0.96413255, + 0.96465860, 0.96529470, 0.96604008, 0.96689382, 0.96785485, + 0.96892198, 0.97009390, 0.97136919, 0.97274637, 0.97422385, + 0.97580000, 0.97747314, 0.97924153, 0.98110340, 0.98305696, + 0.98510039, 0.98723187, 0.98944955, 0.99175159, 0.99413615, + 0.99660141, 0.99914552, 1.00176668, 1.00446309, 1.00723297, + 1.01007456, 1.01298610, 1.01596589, 1.01901222, 1.02212343, + 1.02529786, 1.02853391, 1.03182996, 1.03518446, 1.03859586, + 1.04206265, 1.04558335, 1.04915649, 1.05278065, 1.05645441, + 1.06017639, 1.06394526, 1.06775967, 1.07161833, 1.07551997, + 1.07946333, 1.08344718, 1.08747034, 1.09153161, 1.09562985, + 1.09976393, 1.10393274, 1.10813519, 1.11237022, 1.11663679, + 1.12093388, 1.12526049, 1.12961564, 1.13399836, 1.13840773, + 1.14284281, 1.14730271, 1.15178654, 1.15629344, 1.16082256, + 1.16537307, 1.16994415, 1.17453501, 1.17914487, 1.18377296, + 1.18841853, 1.19308086, 1.19775923, 1.20245292, 1.20716125, + 1.21188356, 1.21661917, 1.22136744, 1.22612774, 1.23089944, + 1.23568195, 1.24047466, 1.24527700, 1.25008839, 1.25490828, + 1.25973611, 1.26457136, 1.26941351, 1.27426203, 1.27911643, + 1.28397622, 1.28884092, 1.29371005, 1.29858315, 1.30345979, + 1.30833950, 1.31322188, 1.31810648, 1.32299290, 1.32788074, + 1.33276959, 1.33765908, 1.34254882, 1.34743845, 1.35232759, + 1.35721591, 1.36210305, 1.36698866, 1.37187243, 1.37675403, + 1.38163314, 1.38650945, 1.39138265, 1.39625246, 1.40111858, + 1.40598073, 1.41083863, 1.41569202, 1.42054062, 1.42538418, + 1.43022245, 1.43505518, 1.43988214, 1.44470308, 1.44951777, + 1.45432600, 1.45912753, 1.46392217, 1.46870969, 1.47348990, + 1.47826260, 1.48302758, 1.48778467, 1.49253368, 1.49727442, + 1.50200671, 1.50673040, 1.51144530, 1.51615126, 1.52084812, + 1.52553571, 1.53021390, 1.53488252, 1.53954144, 1.54419052, + 1.54882961, 1.55345859, 1.55807733, 1.56268569, 1.56728356, + 1.57187082, 1.57644735, 1.58101303, 1.58556776, 1.59011142, + 1.59464392, 1.59916515, 1.60367502, 1.60817342, 1.61266027, + 1.61713547, 1.62159894, 1.62605059, 1.63049034, 1.63491811, + 1.63933381, 1.64373739, 1.64812875, 1.65250784, 1.65687458, + 1.66122891, 1.66557076, 1.66990007, 1.67421678, 1.67852084, + 1.68281219, 1.68709077, 1.69135653, 1.69560942, 1.69984940, + 1.70407642, 1.70829043, 1.71249139, 1.71667926, 1.72085401, + 1.72501558, 1.72916395, 1.73329909, 1.73742096, 1.74152952, + 1.74562475, 1.74970663, 1.75377511, 1.75783019, 1.76187183, + 1.76590000, 1.76991470, 1.77391590, 1.77790358, 1.78187773, + 1.78583832, 1.78978534, 1.79371878, 1.79763862, 1.80154486, + 1.80543748, 1.80931648, 1.81318184, 1.81703356, 1.82087163, + 1.82469604, 1.82850680, 1.83230390, 1.83608733, 1.83985710, + 1.84361321 } }, { - 481, 40.000000, 1000.000000, + 241, 40.000000, 1000.000000, 1.0, { - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000 + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000 } }, { - 481, 40.000000, 1000.000000, + 241, 40.000000, 1000.000000, 1.0, { - 1.924417, 1.909963, 1.895433, 1.880833, 1.866169, - 1.851446, 1.836670, 1.821847, 1.806982, 1.792079, - 1.777145, 1.762185, 1.747204, 1.732207, 1.717200, - 1.702186, 1.687172, 1.672162, 1.657160, 1.642171, - 1.627200, 1.612250, 1.597327, 1.582434, 1.567576, - 1.552755, 1.537977, 1.523244, 1.508560, 1.493928, - 1.479353, 1.464836, 1.450380, 1.435990, 1.421667, - 1.407414, 1.393233, 1.379128, 1.365099, 1.351151, - 1.337283, 1.323499, 1.309801, 1.296189, 1.282666, - 1.269233, 1.255891, 1.242643, 1.229488, 1.216429, - 1.203466, 1.190600, 1.177833, 1.165164, 1.152595, - 1.140127, 1.127759, 1.115493, 1.103328, 1.091266, - 1.079307, 1.067450, 1.055696, 1.044046, 1.032499, - 1.021055, 1.009714, 0.998477, 0.987344, 0.976313, - 0.965385, 0.954560, 0.943837, 0.933217, 0.922698, - 0.912282, 0.901966, 0.891751, 0.881636, 0.871622, - 0.861707, 0.851891, 0.842173, 0.832554, 0.823032, - 0.813606, 0.804277, 0.795044, 0.785906, 0.776862, - 0.767912, 0.759056, 0.750292, 0.741619, 0.733038, - 0.724548, 0.716148, 0.707836, 0.699613, 0.691478, - 0.683430, 0.675469, 0.667593, 0.659802, 0.652096, - 0.644473, 0.636932, 0.629474, 0.622098, 0.614802, - 0.607586, 0.600449, 0.593390, 0.586410, 0.579507, - 0.572679, 0.565928, 0.559252, 0.552649, 0.546121, - 0.539665, 0.533281, 0.526969, 0.520728, 0.514556, - 0.508454, 0.502421, 0.496455, 0.490557, 0.484726, - 0.478960, 0.473260, 0.467625, 0.462053, 0.456545, - 0.451100, 0.445716, 0.440394, 0.435133, 0.429932, - 0.424791, 0.419708, 0.414684, 0.409718, 0.404808, - 0.399955, 0.395158, 0.390417, 0.385730, 0.381097, - 0.376517, 0.371991, 0.367517, 0.363095, 0.358724, - 0.354404, 0.350135, 0.345915, 0.341744, 0.337621, - 0.333547, 0.329520, 0.325540, 0.321607, 0.317720, - 0.313878, 0.310081, 0.306329, 0.302621, 0.298956, - 0.295335, 0.291756, 0.288219, 0.284723, 0.281269, - 0.277856, 0.274483, 0.271149, 0.267855, 0.264600, - 0.261384, 0.258205, 0.255064, 0.251961, 0.248894, - 0.245864, 0.242869, 0.239910, 0.236986, 0.234097, - 0.231243, 0.228422, 0.225635, 0.222881, 0.220161, - 0.217472, 0.214816, 0.212191, 0.209598, 0.207035, - 0.204504, 0.202002, 0.199531, 0.197089, 0.194677, - 0.192293, 0.189938, 0.187612, 0.185313, 0.183042, - 0.180798, 0.178581, 0.176391, 0.174227, 0.172090, - 0.169978, 0.167891, 0.165830, 0.163794, 0.161782, - 0.159794, 0.157831, 0.155891, 0.153975, 0.152082, - 0.150211, 0.148364, 0.146539, 0.144736, 0.142954, - 0.141195, 0.139457, 0.137739, 0.136043, 0.134367, - 0.132712, 0.131077, 0.129462, 0.127866, 0.126290, - 0.124733, 0.123194, 0.121675, 0.120174, 0.118692, - 0.117227, 0.115781, 0.114352, 0.112940, 0.111546, - 0.110169, 0.108808, 0.107465, 0.106137, 0.104826, - 0.103531, 0.102252, 0.100988, 0.099740, 0.098508, - 0.097290, 0.096087, 0.094899, 0.093726, 0.092567, - 0.091422, 0.090291, 0.089174, 0.088071, 0.086981, - 0.085905, 0.084842, 0.083792, 0.082755, 0.081731, - 0.080719, 0.079720, 0.078733, 0.077759, 0.076796, - 0.075845, 0.074906, 0.073978, 0.073062, 0.072157, - 0.071264, 0.070381, 0.069509, 0.068648, 0.067798, - 0.066958, 0.066128, 0.065309, 0.064500, 0.063701, - 0.062911, 0.062132, 0.061362, 0.060602, 0.059851, - 0.059109, 0.058376, 0.057653, 0.056938, 0.056233, - 0.055536, 0.054848, 0.054168, 0.053497, 0.052834, - 0.052179, 0.051532, 0.050893, 0.050263, 0.049640, - 0.049025, 0.048417, 0.047817, 0.047224, 0.046639, - 0.046061, 0.045490, 0.044927, 0.044370, 0.043820, - 0.043277, 0.042741, 0.042211, 0.041688, 0.041172, - 0.040662, 0.040158, 0.039660, 0.039169, 0.038684, - 0.038205, 0.037731, 0.037264, 0.036802, 0.036347, - 0.035897, 0.035452, 0.035013, 0.034579, 0.034151, - 0.033728, 0.033311, 0.032899, 0.032491, 0.032089, - 0.031692, 0.031300, 0.030912, 0.030530, 0.030152, - 0.029779, 0.029411, 0.029047, 0.028688, 0.028333, - 0.027982, 0.027636, 0.027295, 0.026957, 0.026624, - 0.026295, 0.025970, 0.025649, 0.025332, 0.025019, - 0.024709, 0.024404, 0.024103, 0.023805, 0.023511, - 0.023221, 0.022934, 0.022651, 0.022371, 0.022095, - 0.021822, 0.021553, 0.021287, 0.021024, 0.020765, - 0.020509, 0.020256, 0.020006, 0.019759, 0.019515, - 0.019275, 0.019037, 0.018803, 0.018571, 0.018342, - 0.018116, 0.017893, 0.017672, 0.017455, 0.017240, - 0.017028, 0.016818, 0.016611, 0.016406, 0.016205, - 0.016005, 0.015808, 0.015614, 0.015422, 0.015232, - 0.015045, 0.014860, 0.014677, 0.014497, 0.014319, - 0.014143, 0.013969, 0.013798, 0.013628, 0.013461, - 0.013296, 0.013132, 0.012971, 0.012812, 0.012655, - 0.012500, 0.012346, 0.012195, 0.012046, 0.011898, - 0.011752, 0.011608, 0.011466, 0.011325, 0.011187, - 0.011050, 0.010915, 0.010781, 0.010649, 0.010519, - 0.010390, 0.010263, 0.010137, 0.010013, 0.009891, - 0.009770, 0.009651, 0.009533, 0.009416, 0.009301, - 0.009188, 0.009076, 0.008965, 0.008856, 0.008747, - 0.008641, 0.008535, 0.008431, 0.008328, 0.008227, - 0.008127, 0.008028, 0.007930, 0.007833, 0.007738, - 0.007644, 0.007551, 0.007459, 0.007368, 0.007278, - 0.007190, 0.007102, 0.007016, 0.006931, 0.006847, - 0.006763, 0.006681, 0.006600, 0.006520, 0.006441, - 0.006363 + 1.92441750, 1.89543256, 1.86616881, 1.83667048, 1.80698152, + 1.77714526, 1.74720420, 1.71719974, 1.68717198, 1.65715957, + 1.62719951, 1.59732707, 1.56757565, 1.53797675, 1.50855987, + 1.47935255, 1.45038029, 1.42166663, 1.39323313, 1.36509943, + 1.33728330, 1.30980071, 1.28266590, 1.25589143, 1.22948831, + 1.20346605, 1.17783273, 1.15259513, 1.12775881, 1.10332816, + 1.07930650, 1.05569618, 1.03249864, 1.00971448, 0.98734353, + 0.96538496, 0.94383727, 0.92269841, 0.90196582, 0.88163647, + 0.86170691, 0.84217335, 0.82303165, 0.80427739, 0.78590590, + 0.76791232, 0.75029156, 0.73303841, 0.71614750, 0.69961336, + 0.68343044, 0.66759311, 0.65209569, 0.63693245, 0.62209767, + 0.60758558, 0.59339045, 0.57950652, 0.56592809, 0.55264946, + 0.53966498, 0.52696904, 0.51455607, 0.50242056, 0.49055706, + 0.47896018, 0.46762458, 0.45654500, 0.44571625, 0.43513321, + 0.42479083, 0.41468413, 0.40480822, 0.39515827, 0.38572955, + 0.37651737, 0.36751716, 0.35872439, 0.35013464, 0.34174355, + 0.33354684, 0.32554031, 0.31771984, 0.31008137, 0.30262093, + 0.29533462, 0.28821862, 0.28126917, 0.27448260, 0.26785530, + 0.26138373, 0.25506442, 0.24889398, 0.24286908, 0.23698645, + 0.23124289, 0.22563528, 0.22016053, 0.21481566, 0.20959771, + 0.20450380, 0.19953111, 0.19467687, 0.18993839, 0.18531300, + 0.18079812, 0.17639121, 0.17208978, 0.16789141, 0.16379371, + 0.15979436, 0.15589108, 0.15208164, 0.14836387, 0.14473562, + 0.14119481, 0.13773941, 0.13436742, 0.13107688, 0.12786589, + 0.12473258, 0.12167513, 0.11869175, 0.11578069, 0.11294026, + 0.11016877, 0.10746461, 0.10482618, 0.10225192, 0.09974031, + 0.09728986, 0.09489911, 0.09256665, 0.09029108, 0.08807106, + 0.08590524, 0.08379234, 0.08173108, 0.07972024, 0.07775860, + 0.07584498, 0.07397823, 0.07215722, 0.07038085, 0.06864804, + 0.06695775, 0.06530894, 0.06370062, 0.06213181, 0.06060154, + 0.05910890, 0.05765296, 0.05623284, 0.05484766, 0.05349658, + 0.05217877, 0.05089341, 0.04963973, 0.04841695, 0.04722431, + 0.04606108, 0.04492654, 0.04381999, 0.04274075, 0.04168814, + 0.04066153, 0.03966026, 0.03868373, 0.03773132, 0.03680244, + 0.03589652, 0.03501299, 0.03415130, 0.03331091, 0.03249130, + 0.03169197, 0.03091240, 0.03015212, 0.02941065, 0.02868752, + 0.02798228, 0.02729450, 0.02662374, 0.02596958, 0.02533161, + 0.02470943, 0.02410265, 0.02351089, 0.02293378, 0.02237095, + 0.02182206, 0.02128675, 0.02076470, 0.02025557, 0.01975904, + 0.01927480, 0.01880255, 0.01834199, 0.01789282, 0.01745477, + 0.01702756, 0.01661093, 0.01620460, 0.01580832, 0.01542185, + 0.01504493, 0.01467734, 0.01431884, 0.01396921, 0.01362822, + 0.01329565, 0.01297131, 0.01265498, 0.01234647, 0.01204558, + 0.01175213, 0.01146592, 0.01118678, 0.01091453, 0.01064900, + 0.01039002, 0.01013743, 0.00989108, 0.00965080, 0.00941644, + 0.00918786, 0.00896491, 0.00874746, 0.00853537, 0.00832849, + 0.00812672, 0.00792990, 0.00773794, 0.00755069, 0.00736805, + 0.00718990, 0.00701613, 0.00684662, 0.00668129, 0.00652001, + 0.00636269 } } }; static xspect illoc_ODaylight_CIE_1964_10[3] = { { - 181, 40.000000, 400.000000, + 91, 40.000000, 400.000000, 1.0, { - 0.954689, 0.954137, 0.953592, 0.953054, 0.952523, - 0.952001, 0.951488, 0.950984, 0.950490, 0.950007, - 0.949535, 0.949074, 0.948627, 0.948192, 0.947770, - 0.947363, 0.946970, 0.946591, 0.946229, 0.945882, - 0.945551, 0.945238, 0.944942, 0.944663, 0.944402, - 0.944161, 0.943938, 0.943734, 0.943550, 0.943386, - 0.943243, 0.943120, 0.943019, 0.942939, 0.942880, - 0.942844, 0.942831, 0.942840, 0.942872, 0.942927, - 0.943006, 0.943109, 0.943235, 0.943387, 0.943562, - 0.943763, 0.943988, 0.944239, 0.944516, 0.944818, - 0.945146, 0.945500, 0.945880, 0.946285, 0.946716, - 0.947174, 0.947658, 0.948168, 0.948706, 0.949270, - 0.949861, 0.950478, 0.951123, 0.951794, 0.952492, - 0.953217, 0.953969, 0.954747, 0.955552, 0.956384, - 0.957242, 0.958127, 0.959039, 0.959976, 0.960940, - 0.961930, 0.962946, 0.963988, 0.965056, 0.966149, - 0.967268, 0.968412, 0.969581, 0.970775, 0.971994, - 0.973237, 0.974504, 0.975796, 0.977111, 0.978450, - 0.979812, 0.981197, 0.982605, 0.984035, 0.985488, - 0.986963, 0.988459, 0.989976, 0.991515, 0.993074, - 0.994653, 0.996252, 0.997871, 0.999509, 1.001166, - 1.002842, 1.004535, 1.006246, 1.007974, 1.009719, - 1.011480, 1.013257, 1.015050, 1.016857, 1.018679, - 1.020514, 1.022363, 1.024225, 1.026100, 1.027986, - 1.029883, 1.031791, 1.033710, 1.035637, 1.037574, - 1.039519, 1.041472, 1.043432, 1.045399, 1.047371, - 1.049348, 1.051330, 1.053315, 1.055304, 1.057295, - 1.059288, 1.061281, 1.063275, 1.065268, 1.067259, - 1.069249, 1.071235, 1.073218, 1.075196, 1.077168, - 1.079135, 1.081094, 1.083046, 1.084988, 1.086921, - 1.088844, 1.090754, 1.092653, 1.094538, 1.096409, - 1.098265, 1.100105, 1.101927, 1.103732, 1.105518, - 1.107284, 1.109029, 1.110752, 1.112453, 1.114129, - 1.115781, 1.117407, 1.119007, 1.120578, 1.122121, - 1.123634, 1.125116, 1.126567, 1.127985, 1.129369, - 1.130718, 1.132032, 1.133309, 1.134548, 1.135749, - 1.136910 + 0.95468887, 0.95359221, 0.95252348, 0.95148774, 0.95048990, + 0.94953468, 0.94862665, 0.94777020, 0.94696951, 0.94622863, + 0.94555141, 0.94494151, 0.94440243, 0.94393752, 0.94354992, + 0.94324265, 0.94301856, 0.94288035, 0.94283058, 0.94287165, + 0.94300587, 0.94323541, 0.94356230, 0.94398848, 0.94451581, + 0.94514600, 0.94587982, 0.94671601, 0.94765777, 0.94870582, + 0.94986069, 0.95112270, 0.95249199, 0.95396853, 0.95555209, + 0.95724230, 0.95903861, 0.96094029, 0.96294649, 0.96505618, + 0.96726820, 0.96958122, 0.97199377, 0.97450424, 0.97711088, + 0.97981177, 0.98260486, 0.98548797, 0.98845874, 0.99151468, + 0.99465315, 0.99787136, 1.00116634, 1.00453500, 1.00797406, + 1.01148010, 1.01504952, 1.01867856, 1.02236329, 1.02609959, + 1.02988319, 1.03370963, 1.03757425, 1.04147225, 1.04539861, + 1.04934814, 1.05331546, 1.05729500, 1.06128103, 1.06526759, + 1.06924858, 1.07321771, 1.07716849, 1.08109429, 1.08498828, + 1.08884351, 1.09265285, 1.09640903, 1.10010464, 1.10373217, + 1.10728398, 1.11075233, 1.11412941, 1.11740735, 1.12057822, + 1.12363406, 1.12656691, 1.12936883, 1.13203190, 1.13454829, + 1.13691023 } }, { - 181, 40.000000, 400.000000, + 91, 40.000000, 400.000000, 1.0, { - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, - 1.000000 + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, + 1.00000000 } }, { - 181, 40.000000, 400.000000, + 91, 40.000000, 400.000000, 1.0, { - 1.880550, 1.866451, 1.852259, 1.837979, 1.823618, - 1.809182, 1.794679, 1.780113, 1.765491, 1.750820, - 1.736104, 1.721349, 1.706561, 1.691745, 1.676907, - 1.662051, 1.647182, 1.632306, 1.617427, 1.602550, - 1.587679, 1.572818, 1.557971, 1.543143, 1.528338, - 1.513559, 1.498810, 1.484094, 1.469415, 1.454777, - 1.440182, 1.425633, 1.411134, 1.396687, 1.382295, - 1.367961, 1.353687, 1.339475, 1.325329, 1.311249, - 1.297239, 1.283299, 1.269433, 1.255642, 1.241928, - 1.228292, 1.214736, 1.201262, 1.187870, 1.174563, - 1.161341, 1.148206, 1.135188, 1.122292, 1.109489, - 1.096782, 1.084173, 1.071663, 1.059253, 1.046946, - 1.034742, 1.022643, 1.010649, 0.998763, 0.986985, - 0.975315, 0.963755, 0.952306, 0.940967, 0.929740, - 0.918626, 0.907623, 0.896734, 0.885958, 0.875296, - 0.864747, 0.854312, 0.843991, 0.833784, 0.823691, - 0.813712, 0.803847, 0.794095, 0.784457, 0.774933, - 0.765521, 0.756222, 0.747036, 0.737962, 0.729000, - 0.720149, 0.711409, 0.702779, 0.694260, 0.685850, - 0.677549, 0.669357, 0.661272, 0.653296, 0.645425, - 0.637662, 0.630004, 0.622450, 0.615002, 0.607657, - 0.600415, 0.593275, 0.586237, 0.579301, 0.572464, - 0.565728, 0.559090, 0.552551, 0.546109, 0.539764, - 0.533516, 0.527363, 0.521304, 0.515340, 0.509469, - 0.503690, 0.498004, 0.492408, 0.486903, 0.481488, - 0.476161, 0.470923, 0.465772, 0.460709, 0.455731, - 0.450839, 0.446031, 0.441307, 0.436667, 0.432109, - 0.427633, 0.423238, 0.418924, 0.414689, 0.410534, - 0.406457, 0.402459, 0.398537, 0.394691, 0.390922, - 0.387228, 0.383608, 0.380063, 0.376591, 0.373191, - 0.369864, 0.366608, 0.363424, 0.360309, 0.357265, - 0.354290, 0.351383, 0.348545, 0.345774, 0.343071, - 0.340434, 0.337863, 0.335359, 0.332919, 0.330544, - 0.328233, 0.325986, 0.323803, 0.321683, 0.319625, - 0.317629, 0.315696, 0.313824, 0.312014, 0.310264, - 0.308575, 0.306946, 0.305378, 0.303869, 0.302420, - 0.301031 + 1.88054971, 1.85225862, 1.82361769, 1.79467867, 1.76549137, + 1.73610350, 1.70656073, 1.67690655, 1.64718235, 1.61742735, + 1.58767865, 1.55797122, 1.52833797, 1.49880974, 1.46941539, + 1.44018182, 1.41113405, 1.38229526, 1.35368687, 1.32532862, + 1.29723861, 1.26943338, 1.24192801, 1.21473614, 1.18787010, + 1.16134092, 1.13518806, 1.10948921, 1.08417293, 1.05925307, + 1.03474170, 1.01064924, 0.98698458, 0.96375520, 0.94096725, + 0.91862567, 0.89673425, 0.87529579, 0.85431209, 0.83378412, + 0.81371204, 0.79409528, 0.77493263, 0.75622227, 0.73796185, + 0.72014854, 0.70277908, 0.68584981, 0.66935673, 0.65329554, + 0.63766168, 0.62245035, 0.60765654, 0.59327508, 0.57930063, + 0.56572776, 0.55255092, 0.53976448, 0.52736274, 0.51533997, + 0.50369040, 0.49240826, 0.48148775, 0.47092312, 0.46070861, + 0.45083850, 0.44130712, 0.43210885, 0.42323813, 0.41468947, + 0.40645745, 0.39853674, 0.39092213, 0.38360847, 0.37659074, + 0.36986406, 0.36342364, 0.35726484, 0.35138319, 0.34577433, + 0.34043411, 0.33535852, 0.33054377, 0.32598623, 0.32168253, + 0.31762949, 0.31382417, 0.31026392, 0.30694632, 0.30386928, + 0.30103097 } } }; @@ -7772,7 +7011,8 @@ static double cct2_func(void *fdata, double tp[]) { /* Get XYZ for given temp in Mired. */ /* Will clip to limits of locus */ - getval_raw_xspec3_lin(x->iloc, xyz, tp[0]); +// getval_raw_xspec3_lin(x->iloc, xyz, tp[0]); + getval_raw_xspec3_poly3(x->iloc, xyz, tp[0]); xyz[0] /= xyz[1]; xyz[2] /= xyz[1]; @@ -7853,7 +7093,8 @@ int viscct /* nz to use visual CIEDE2000, 0 to use CCT CIE 1960 UCS. */ if(txyz != NULL) { /* Return the closest value on the locus */ - getval_raw_xspec3_lin(x.iloc, txyz, cp[0]); +// getval_raw_xspec3_lin(x.iloc, txyz, cp[0]); + getval_raw_xspec3_poly3(x.iloc, txyz, cp[0]); txyz[0] /= txyz[1]; txyz[2] /= txyz[1]; txyz[1] /= txyz[1]; @@ -7968,7 +7209,8 @@ double Yin /* Input Y value */ /* Get XYZ for given temp in Mired. */ /* Will clip to limits of locus */ - getval_raw_xspec3_lin(iloc, xyz, tin); +// getval_raw_xspec3_lin(iloc, xyz, tin); + getval_raw_xspec3_poly3(iloc, xyz, tin); /* Scale by Yin */ xyz[0] *= Yin/xyz[1]; @@ -8370,14 +7612,11 @@ static xslpoly splo_CIE_1931_2_xy = { 0, icxOT_CIE_1931_2, 0, 0 }; static xslpoly splo_CIE_1931_2_uv = { 0, icxOT_CIE_1931_2, 1, 0 }; static xslpoly splo_CIE_1964_10_xy = { 0, icxOT_CIE_1964_10, 0, 0 }; static xslpoly splo_CIE_1964_10_uv = { 0, icxOT_CIE_1964_10, 1, 0 }; -static xslpoly splo_Stiles_Burch_2_xy = { 0, icxOT_Stiles_Burch_2, 0, 0 }; -static xslpoly splo_Stiles_Burch_2_uv = { 0, icxOT_Stiles_Burch_2, 1, 0 }; -static xslpoly splo_Judd_Voss_2_xy = { 0, icxOT_Judd_Voss_2, 0, 0 }; -static xslpoly splo_Judd_Voss_2_uv = { 0, icxOT_Judd_Voss_2, 1, 0 }; -static xslpoly splo_CIE_1964_10c_xy = { 0, icxOT_CIE_1964_10c, 0, 0 }; -static xslpoly splo_CIE_1964_10c_uv = { 0, icxOT_CIE_1964_10c, 1, 0 }; -static xslpoly splo_Shaw_Fairchild_2_xy = { 0, icxOT_Shaw_Fairchild_2, 0, 0 }; -static xslpoly splo_Shaw_Fairchild_2_uv = { 0, icxOT_Shaw_Fairchild_2, 1, 0 }; + +static xslpoly splo_CIE_2012_2_xy = { 0, icxOT_CIE_2012_2, 0, 0 }; +static xslpoly splo_CIE_2012_2_uv = { 0, icxOT_CIE_2012_2, 1, 0 }; +static xslpoly splo_CIE_2012_10_xy = { 0, icxOT_CIE_2012_10, 0, 0 }; +static xslpoly splo_CIE_2012_10_uv = { 0, icxOT_CIE_2012_10, 1, 0 }; /* Illuminant locus */ static xslpoly illo_D_CIE_1931_2_xy = { 1, icxOT_CIE_1931_2, 0, 0 }; @@ -8389,6 +7628,15 @@ static xslpoly illo_P_CIE_1931_2_uv = { 2, icxOT_CIE_1931_2, 1, 0 }; static xslpoly illo_P_CIE_1964_10_xy = { 2, icxOT_CIE_1964_10, 0, 0 }; static xslpoly illo_P_CIE_1964_10_uv = { 2, icxOT_CIE_1964_10, 1, 0 }; +static xslpoly illo_D_CIE_2012_2_xy = { 1, icxOT_CIE_2012_2, 0, 0 }; +static xslpoly illo_D_CIE_2012_2_uv = { 1, icxOT_CIE_2012_2, 1, 0 }; +static xslpoly illo_D_CIE_2012_10_xy = { 1, icxOT_CIE_2012_10, 0, 0 }; +static xslpoly illo_D_CIE_2012_10_uv = { 1, icxOT_CIE_2012_10, 1, 0 }; +static xslpoly illo_P_CIE_2012_2_xy = { 2, icxOT_CIE_2012_2, 0, 0 }; +static xslpoly illo_P_CIE_2012_2_uv = { 2, icxOT_CIE_2012_2, 1, 0 }; +static xslpoly illo_P_CIE_2012_10_xy = { 2, icxOT_CIE_2012_10, 0, 0 }; +static xslpoly illo_P_CIE_2012_10_uv = { 2, icxOT_CIE_2012_10, 1, 0 }; + /* Return a pointer to the (static) chromaticity locus poligon */ /* return NULL on failure. */ xslpoly *chrom_locus_poligon( @@ -8437,6 +7685,40 @@ int uv /* 0 = xy, 1 = u'v' space */ rv = &illo_P_CIE_1964_10_uv; } break; + case icxOT_CIE_2012_2: + if (uv == 0) { + if (loty == icxLT_spectral) + rv = &splo_CIE_2012_2_xy; + else if (loty == icxLT_daylight) + rv = &illo_D_CIE_2012_2_xy; + else if (loty == icxLT_plankian) + rv = &illo_P_CIE_2012_2_xy; + } else { + if (loty == icxLT_spectral) + rv = &splo_CIE_2012_2_uv; + else if (loty == icxLT_daylight) + rv = &illo_D_CIE_2012_2_uv; + else if (loty == icxLT_plankian) + rv = &illo_P_CIE_2012_2_uv; + } + break; + case icxOT_CIE_2012_10: + if (uv == 0) { + if (loty == icxLT_spectral) + rv = &splo_CIE_2012_10_xy; + else if (loty == icxLT_daylight) + rv = &illo_D_CIE_2012_10_xy; + else if (loty == icxLT_plankian) + rv = &illo_P_CIE_2012_10_xy; + } else { + if (loty == icxLT_spectral) + rv = &splo_CIE_2012_10_uv; + else if (loty == icxLT_daylight) + rv = &illo_D_CIE_2012_10_uv; + else if (loty == icxLT_plankian) + rv = &illo_P_CIE_2012_10_uv; + } + break; default: rv = NULL; } @@ -8914,7 +8196,9 @@ icxObserverType obType, /* Observer */ xspect custObserver[3], /* Optional custom observer */ icxIllumeType ilType, /* Type of illuminant, icxIT_[O]Dtemp or icxIT_[O]Ptemp */ double ct, /* Input temperature in degrees K */ -xspect *custIllum /* Optional custom illuminant */ +xspect *custIllum, /* Optional custom illuminant */ +int abs /* If nz return absolute value in cd/m^2 or Lux */ + /* else return Y = 1 normalised value */ ) { xspect sp; /* Xspect to fill in */ xsp2cie *conv; /* Means of converting spectrum to XYZ */ @@ -8931,10 +8215,12 @@ xspect *custIllum /* Optional custom illuminant */ conv->del(conv); - /* Normalise */ - xyz[0] /= xyz[1]; - xyz[2] /= xyz[1]; - xyz[1] /= xyz[1]; + if (!abs) { + /* Normalise */ + xyz[0] /= xyz[1]; + xyz[2] /= xyz[1]; + xyz[1] /= xyz[1]; + } return 0; } @@ -9233,8 +8519,8 @@ xspect *sample /* Illuminant sample to compute CRI of */ /* Compute the XYZ of the reference white */ tocie->convert(tocie, wt, &wts); -//DBGF((DBGA,"XYZ white = %f %f %f\n",wt[0],wt[1],wt[2])); -//DBGF((DBGA,"XYZ sampl = %f %f %f\n",sa[0],sa[1],sa[2])); +DBGF((DBGA,"XYZ white = %f %f %f\n",wt[0],wt[1],wt[2])); +DBGF((DBGA,"XYZ sampl = %f %f %f\n",sa[0],sa[1],sa[2])); /* Normalize the spectra so as to create a normalized white */ wts.norm *= wt[1]; @@ -9244,8 +8530,8 @@ xspect *sample /* Illuminant sample to compute CRI of */ tocie->convert(tocie, sa, sample); tocie->del(tocie); -//DBGF((DBGA,"norm XYZ white = %f %f %f\n",wt[0],wt[1],wt[2])); -//DBGF((DBGA,"norm XYZ sampl = %f %f %f\n",sa[0],sa[1],sa[2])); +DBGF((DBGA,"norm XYZ white = %f %f %f\n",wt[0],wt[1],wt[2])); +DBGF((DBGA,"norm XYZ sampl = %f %f %f\n",sa[0],sa[1],sa[2])); /* Convert to perceptual CIE 1960 UCS */ icmAry2XYZ(wtn, wt); /* Use reference white as UCS white */ @@ -9257,13 +8543,13 @@ xspect *sample /* Illuminant sample to compute CRI of */ c_ad = wt_Ycd[1]/sa_Ycd[1]; /* Chromatic adaptation scaling factors */ d_ad = wt_Ycd[2]/sa_Ycd[2]; -//DBGF((DBGA,"UCS white = %f %f %f\n",wt[0],wt[1],wt[2])); -//DBGF((DBGA,"UCS sampl = %f %f %f\n",sa[0],sa[1],sa[2])); +DBGF((DBGA,"UCS white = %f %f %f\n",wt[0],wt[1],wt[2])); +DBGF((DBGA,"UCS sampl = %f %f %f\n",sa[0],sa[1],sa[2])); dc = sqrt((wt[1] - sa[1]) * (wt[1] - sa[1]) + (wt[2] - sa[2]) * (wt[2] - sa[2])); -//DBGF((DBGA,"dc = %f\n",dc)); -//if (dc > 0.0054) DBGF((DBGA,"CRI is invalid\n")); +DBGF((DBGA,"dc = %f\n",dc)); +if (dc > 0.0054) DBGF((DBGA,"CRI is invalid\n")); /* If dc > 0.0054 we should abort computing the CRI, */ /* but this means we fail on lots of real world lighting. */ @@ -9496,8 +8782,8 @@ xspect *sample /* Illuminant sample to compute TLCI of */ /* Compute the XYZ of the reference white */ tocie->convert(tocie, wt, &wts); -//DBGF((DBGA,"XYZ white = %f %f %f\n",wt[0],wt[1],wt[2])); -//DBGF((DBGA,"XYZ sampl = %f %f %f\n",sa[0],sa[1],sa[2])); +DBGF((DBGA,"XYZ white = %f %f %f\n",wt[0],wt[1],wt[2])); +DBGF((DBGA,"XYZ sampl = %f %f %f\n",sa[0],sa[1],sa[2])); /* Normalize the spectra so as to create a normalized white */ wts.norm *= wt[1]; @@ -9508,20 +8794,20 @@ xspect *sample /* Illuminant sample to compute TLCI of */ tocie->del(tocie); tocie = NULL; -//DBGF((DBGA,"norm XYZ white = %f %f %f\n",wt[0],wt[1],wt[2])); -//DBGF((DBGA,"norm XYZ sampl = %f %f %f\n",sa[0],sa[1],sa[2])); +DBGF((DBGA,"norm XYZ white = %f %f %f\n",wt[0],wt[1],wt[2])); +DBGF((DBGA,"norm XYZ sampl = %f %f %f\n",sa[0],sa[1],sa[2])); /* Convert to perceptual CIE 1960 UCS */ icmXYZ21960UCS(wt, wt); /* 1960 UCS Yuv reference white */ icmXYZ21960UCS(sa, sa); /* 1960 UCS Yuv sample white */ -//DBGF((DBGA,"UCS white = %f %f %f\n",wt[0],wt[1],wt[2])); -//DBGF((DBGA,"UCS sampl = %f %f %f\n",sa[0],sa[1],sa[2])); +DBGF((DBGA,"UCS white = %f %f %f\n",wt[0],wt[1],wt[2])); +DBGF((DBGA,"UCS sampl = %f %f %f\n",sa[0],sa[1],sa[2])); dc = sqrt((wt[1] - sa[1]) * (wt[1] - sa[1]) + (wt[2] - sa[2]) * (wt[2] - sa[2])); -//DBGF((DBGA,"dc = %f (normalized dist %f)\n",dc,dc/0.0054)); -//if (dc > 0.0054) DBGF((DBGA,"TLCI is invalid\n")); +DBGF((DBGA,"dc = %f (normalized dist %f)\n",dc,dc/0.0054)); +if (dc > 0.0054) DBGF((DBGA,"TLCI is invalid\n")); /* If dc > 0.0054 we should abort computing the TLCI, */ /* but this means we fail on lots of real world lighting. */ @@ -9624,6 +8910,8 @@ xspect *sample /* Illuminant sample to compute TLCI of */ return tlci; } +#undef ANDROID // ~~~~9999 + /* - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* Compute Australian Radiation Protection and Nuclear Safety Agency (ARPANSA) */ /* Exposure to Ultraviolet Radiation exposure limits from a spectrum in mw/m-2/nm. */ diff --git a/xicc/xspect.h b/xicc/xspect.h index 3dd99a5..b42a961 100644..100755 --- a/xicc/xspect.h +++ b/xicc/xspect.h @@ -71,6 +71,13 @@ typedef struct { /* Some helpful macro's: */ +/* Set the spectrums parameters */ +#define XSPECT_SET_INFO(PDST, N, SHORT, LONG, NORM) \ + (PDST)->spec_n = (N), \ + (PDST)->spec_wl_short = (SHORT), \ + (PDST)->spec_wl_long = (LONG), \ + (PDST)->norm = (NORM) + /* Copy everything except the spectral values */ #define XSPECT_COPY_INFO(PDST, PSRC) \ (PDST)->spec_n = (PSRC)->spec_n, \ @@ -102,13 +109,32 @@ typedef struct { #define XSPECT_XIX(PXSP, WL) \ ((int)floor(XSPECT_XDIX(PXSP, WL) + 0.5)) +/* Given the address of an xspect, compute the wavelegth interval */ +#define XSPECT_WLI(PXSP) \ +((((PXSP)->spec_wl_long) - ((PXSP)->spec_wl_short))/(((PXSP)->spec_n)-1.0)) + #ifndef SALONEINSTLIB /* Single spectrum utility functions. Return NZ if error */ int write_xspect(char *fname, inst_meas_type mt, xspect *s); int read_xspect(xspect *sp, inst_meas_type *mt, char *fname); +/* Two step write & read spectrum, to be able to write & read extra kewords values */ + +/* Prepare to write spectrum, and return cgats */ +int write_xspect_1(cgats **ocgp, inst_meas_type mt, xspect *s); + +/* Complete writing spectrum */ +int write_xspect_2(cgats *ocg, char *fname); + +/* Read spectrum and return cgats as well */ +int read_xspect_1(cgats **picg, xspect *sp, inst_meas_type *mt, char *fname); + +/* Complete reading spectrum */ +int read_xspect_2(cgats *icg); + /* CMF utility functions. Return NZ if error */ +/* (See cmf/pcmf.h for write/read pcmf) */ int write_cmf(char *fname, xspect cmf[3]); int read_cmf(xspect cmf[3], char *fname); @@ -121,6 +147,13 @@ int write_nxspect(char *fname, inst_meas_type mt, xspect *sp, int nspec, int typ int read_nxspect(xspect *sp, inst_meas_type *mt, char *fname, int *nret, int off, int nspec, int type); +/* Two step write & read n spectrum, to be able to write & read extra kewords values */ +int write_nxspect_1(cgats **pocg, inst_meas_type mt, xspect *sp, int nspec, int type); +int write_nxspect_2(cgats *ocg, char *fname); +int read_nxspect_1(cgats **picg, xspect *sp, inst_meas_type *mt, char *fname, + int *nret, int off, int nspec, int type); +int read_nxspect_2(cgats *icg); + #endif /* !SALONEINSTLIB*/ /* Get interpolated value at wavelenth (not normalised) */ @@ -129,19 +162,31 @@ double value_xspect(xspect *sp, double wl); /* De-normalize and set normalisation factor to 1.0 */ void xspect_denorm(xspect *sp); +/* Scale the spectral values (don't alter norm) */ +void xspect_scale(xspect *sp, double scale); + #ifndef SALONEINSTLIB /* Convert from one xspect type to another */ void xspect2xspect(xspect *dst, xspect *targ, xspect *src); +/* Dump a spectra to stdout */ +void xspect_dump(xspect *sp); + /* Plot up to 3 spectra */ void xspect_plot_w(xspect *sp1, xspect *sp2, xspect *sp3, int wait); /* Plot up to 3 spectra & wait for key */ void xspect_plot(xspect *sp1, xspect *sp2, xspect *sp3); -/* Plot up to 10 spectra */ +/* Plot up to 10 spectra in an array */ void xspect_plot10(xspect *sp, int n); +/* Plot up to 10 spectra pointed to by an array & wait for key */ +void xspect_plot10p(xspect *sp[10], int n); + +/* Plot up to 10 spectra pointed to by an array */ +void xspect_plot10p_w(xspect *sp[10], int n, int wait); + #endif /* !SALONEINSTLIB*/ /* ------------------------------------------------------------------------------ */ @@ -194,12 +239,14 @@ typedef enum { icxOT_custom = 2, /* Custom observer type weighting */ icxOT_CIE_1931_2 = 3, /* Standard CIE 1931 2 degree */ icxOT_CIE_1964_10 = 4, /* Standard CIE 1964 10 degree */ + icxOT_CIE_2012_2 = 5, /* Proposed Standard CIE 2012 2 degree */ + icxOT_CIE_2012_10 = 6, /* Proposed Standard CIE 2012 10 degree */ #ifndef SALONEINSTLIB - icxOT_Stiles_Burch_2 = 5, /* Stiles & Burch 1955 2 degree */ - icxOT_Judd_Voss_2 = 6, /* Judd & Voss 1978 2 degree */ - icxOT_CIE_1964_10c = 7, /* Standard CIE 1964 10 degree, 2 degree compatible */ - icxOT_Shaw_Fairchild_2 = 8, /* Shaw & Fairchild 1997 2 degree */ - icxOT_EBU_2012 = 9 /* EBU standard camera curves 2012 */ + icxOT_Stiles_Burch_2 = 7, /* Stiles & Burch 1955 2 degree */ + icxOT_Judd_Voss_2 = 8, /* Judd & Voss 1978 2 degree */ + icxOT_CIE_1964_10c = 9, /* Standard CIE 1964 10 degree, 2 degree compatible */ + icxOT_Shaw_Fairchild_2 = 10, /* Shaw & Fairchild 1997 2 degree */ + icxOT_EBU_2012 = 11 /* EBU standard camera curves 2012 */ #endif /* !SALONEINSTLIB*/ } icxObserverType; @@ -223,7 +270,7 @@ struct _xsp2cie { xspect illuminant; /* Lookup conversion/observer illuminant */ int isemis; /* nz if we are doing an emission conversion */ xspect observer[3]; - int doLab; /* Return D50 Lab result */ + int doLab; /* 1 == Return D50 Lab result, 2 == D50 Lpt */ icxClamping clamp; /* Clamp XYZ and Lab to be +ve */ /* Integration range and steps - set to observer range and 1nm by default. */ @@ -256,6 +303,17 @@ struct _xsp2cie { double longwl /* Ending nm */ ); + /* Convert spectrum from photometric to radiometric. */ + /* Note that the input spectrum normalisation value is used. */ + /* Emissive spectral values are assumed to be in mW/nm, and sampled */ + /* rather than integrated if they are not at 1nm spacing. */ + void (*photo2rad)(struct _xsp2cie *p, /* this */ + double *rout, /* Return total lumens */ + double *pout, /* Return total mW */ + xspect *sout, /* Return input spectrum converted to lm/nm */ + xspect *in /* Spectrum to be converted */ + ); + /* Convert (and possibly fwa correct) reflectance spectrum */ /* Note that the input spectrum normalisation value is used. */ /* Note that the returned XYZ is 0..1 range for reflectanc. */ @@ -344,6 +402,7 @@ xsp2cie *new_xsp2cie( icxObserverType obType, /* Observer */ xspect custObserver[3], /* Custom observer if obType == icxOT_custom */ icColorSpaceSignature rcs, /* Return color space, icSigXYZData or D50 icSigLabData */ + /* or D50 icmSigLptData */ /* ** Must be icSigXYZData if SALONEINSTLIB ** */ icxClamping clamp /* NZ to clamp XYZ/Lab to be +ve */ ); @@ -445,7 +504,10 @@ icxObserverType obType, /* Observer */ xspect custObserver[3], /* Optional custom observer */ icxIllumeType ilType, /* Type of illuminant */ double temp, /* Input temperature in degrees K */ -xspect *custIllum); /* Optional custom illuminant */ +xspect *custIllum, /* Optional custom illuminant */ +int abs /* If nz return absolute value in cd/m^2 or Lux */ + /* else return Y = 1 normalised value */ +); /* Given a choice of temperature dependent illuminant (icxIT_[O]Dtemp or icxIT_[O]Ptemp), */ /* return the closest correlated color temperature to the given spectrum or XYZ. */ 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 diff --git a/xml/ANNOUNCEMENT b/xml/ANNOUNCEMENT index 64cfd0d..64cfd0d 100644..100755 --- a/xml/ANNOUNCEMENT +++ b/xml/ANNOUNCEMENT diff --git a/xml/CHANGES b/xml/CHANGES index 37a9614..37a9614 100644..100755 --- a/xml/CHANGES +++ b/xml/CHANGES diff --git a/xml/COPYING b/xml/COPYING index 4d0aa78..4d0aa78 100644..100755 --- a/xml/COPYING +++ b/xml/COPYING diff --git a/xml/Makefile.in b/xml/Makefile.in index cc5c34d..cc5c34d 100644..100755 --- a/xml/Makefile.in +++ b/xml/Makefile.in diff --git a/xml/README b/xml/README index 506554d..506554d 100644..100755 --- a/xml/README +++ b/xml/README diff --git a/xml/afiles b/xml/afiles index 9814c39..9814c39 100644..100755 --- a/xml/afiles +++ b/xml/afiles diff --git a/xml/config.h.in b/xml/config.h.in index 8bae4bf..8bae4bf 100644..100755 --- a/xml/config.h.in +++ b/xml/config.h.in diff --git a/xml/configure b/xml/configure index 821fb83..821fb83 100644..100755 --- a/xml/configure +++ b/xml/configure diff --git a/xml/configure.in b/xml/configure.in index 45e813a..45e813a 100644..100755 --- a/xml/configure.in +++ b/xml/configure.in diff --git a/xml/doc/Mini-XML.pdf b/xml/doc/Mini-XML.pdf Binary files differindex f1718a6..f1718a6 100644..100755 --- a/xml/doc/Mini-XML.pdf +++ b/xml/doc/Mini-XML.pdf diff --git a/xml/install-sh b/xml/install-sh index 398a88e..398a88e 100644..100755 --- a/xml/install-sh +++ b/xml/install-sh diff --git a/xml/mxml-attr.c b/xml/mxml-attr.c index 53f8076..53f8076 100644..100755 --- a/xml/mxml-attr.c +++ b/xml/mxml-attr.c diff --git a/xml/mxml-config.h b/xml/mxml-config.h index 072eab9..072eab9 100644..100755 --- a/xml/mxml-config.h +++ b/xml/mxml-config.h diff --git a/xml/mxml-entity.c b/xml/mxml-entity.c index c5c9f61..c5c9f61 100644..100755 --- a/xml/mxml-entity.c +++ b/xml/mxml-entity.c diff --git a/xml/mxml-file.c b/xml/mxml-file.c index c41ec96..c41ec96 100644..100755 --- a/xml/mxml-file.c +++ b/xml/mxml-file.c diff --git a/xml/mxml-get.c b/xml/mxml-get.c index c8260c3..c8260c3 100644..100755 --- a/xml/mxml-get.c +++ b/xml/mxml-get.c diff --git a/xml/mxml-index.c b/xml/mxml-index.c index 3bf17da..3bf17da 100644..100755 --- a/xml/mxml-index.c +++ b/xml/mxml-index.c diff --git a/xml/mxml-node.c b/xml/mxml-node.c index bebda10..bebda10 100644..100755 --- a/xml/mxml-node.c +++ b/xml/mxml-node.c diff --git a/xml/mxml-private.c b/xml/mxml-private.c index 72f3e23..72f3e23 100644..100755 --- a/xml/mxml-private.c +++ b/xml/mxml-private.c diff --git a/xml/mxml-private.h b/xml/mxml-private.h index 02e76d2..02e76d2 100644..100755 --- a/xml/mxml-private.h +++ b/xml/mxml-private.h diff --git a/xml/mxml-search.c b/xml/mxml-search.c index 2a02bd7..2a02bd7 100644..100755 --- a/xml/mxml-search.c +++ b/xml/mxml-search.c diff --git a/xml/mxml-set.c b/xml/mxml-set.c index 3251cc1..3251cc1 100644..100755 --- a/xml/mxml-set.c +++ b/xml/mxml-set.c diff --git a/xml/mxml-string.c b/xml/mxml-string.c index caead17..caead17 100644..100755 --- a/xml/mxml-string.c +++ b/xml/mxml-string.c diff --git a/xml/mxml.h b/xml/mxml.h index 08784e7..08784e7 100644..100755 --- a/xml/mxml.h +++ b/xml/mxml.h diff --git a/xml/mxml.list.in b/xml/mxml.list.in index fbe6878..fbe6878 100644..100755 --- a/xml/mxml.list.in +++ b/xml/mxml.list.in diff --git a/xml/mxml.pc.in b/xml/mxml.pc.in index 9d48b60..9d48b60 100644..100755 --- a/xml/mxml.pc.in +++ b/xml/mxml.pc.in diff --git a/xml/mxml.spec b/xml/mxml.spec index ca08061..ca08061 100644..100755 --- a/xml/mxml.spec +++ b/xml/mxml.spec diff --git a/xml/mxml.xml b/xml/mxml.xml index bf6b520..bf6b520 100644..100755 --- a/xml/mxml.xml +++ b/xml/mxml.xml diff --git a/xml/mxmldoc.c b/xml/mxmldoc.c index 4b26f7e..4b26f7e 100644..100755 --- a/xml/mxmldoc.c +++ b/xml/mxmldoc.c diff --git a/xml/test.xml b/xml/test.xml index 044304e..044304e 100644..100755 --- a/xml/test.xml +++ b/xml/test.xml diff --git a/xml/testmxml.c b/xml/testmxml.c index 35186cf..35186cf 100644..100755 --- a/xml/testmxml.c +++ b/xml/testmxml.c diff --git a/yajl/COPYING b/yajl/COPYING index 30be349..30be349 100644..100755 --- a/yajl/COPYING +++ b/yajl/COPYING diff --git a/yajl/ChangeLog b/yajl/ChangeLog index c256386..c256386 100644..100755 --- a/yajl/ChangeLog +++ b/yajl/ChangeLog diff --git a/yajl/Jamfile b/yajl/Jamfile index d5456a1..d5456a1 100644..100755 --- a/yajl/Jamfile +++ b/yajl/Jamfile diff --git a/yajl/README b/yajl/README index ad61759..ad61759 100644..100755 --- a/yajl/README +++ b/yajl/README diff --git a/yajl/TODO b/yajl/TODO index 56c3dc0..56c3dc0 100644..100755 --- a/yajl/TODO +++ b/yajl/TODO diff --git a/yajl/afiles b/yajl/afiles index 00a884b..00a884b 100644..100755 --- a/yajl/afiles +++ b/yajl/afiles diff --git a/yajl/json_verify.c b/yajl/json_verify.c index 0cdcadb..0cdcadb 100644..100755 --- a/yajl/json_verify.c +++ b/yajl/json_verify.c diff --git a/yajl/yajl.c b/yajl/yajl.c index 4f7d5e5..4f7d5e5 100644..100755 --- a/yajl/yajl.c +++ b/yajl/yajl.c diff --git a/yajl/yajl.h b/yajl/yajl.h index 544d119..544d119 100644..100755 --- a/yajl/yajl.h +++ b/yajl/yajl.h diff --git a/yajl/yajl_alloc.c b/yajl/yajl_alloc.c index 96ad1d3..96ad1d3 100644..100755 --- a/yajl/yajl_alloc.c +++ b/yajl/yajl_alloc.c diff --git a/yajl/yajl_alloc.h b/yajl/yajl_alloc.h index 496338f..496338f 100644..100755 --- a/yajl/yajl_alloc.h +++ b/yajl/yajl_alloc.h diff --git a/yajl/yajl_buf.c b/yajl/yajl_buf.c index 1aeafde..1aeafde 100644..100755 --- a/yajl/yajl_buf.c +++ b/yajl/yajl_buf.c diff --git a/yajl/yajl_buf.h b/yajl/yajl_buf.h index 5528799..5528799 100644..100755 --- a/yajl/yajl_buf.h +++ b/yajl/yajl_buf.h diff --git a/yajl/yajl_bytestack.h b/yajl/yajl_bytestack.h index ff9bcca..ff9bcca 100644..100755 --- a/yajl/yajl_bytestack.h +++ b/yajl/yajl_bytestack.h diff --git a/yajl/yajl_common.h b/yajl/yajl_common.h index 3558c7d..3558c7d 100644..100755 --- a/yajl/yajl_common.h +++ b/yajl/yajl_common.h diff --git a/yajl/yajl_encode.c b/yajl/yajl_encode.c index fd08258..fd08258 100644..100755 --- a/yajl/yajl_encode.c +++ b/yajl/yajl_encode.c diff --git a/yajl/yajl_encode.h b/yajl/yajl_encode.h index b743c8a..b743c8a 100644..100755 --- a/yajl/yajl_encode.h +++ b/yajl/yajl_encode.h diff --git a/yajl/yajl_gen.c b/yajl/yajl_gen.c index 450b898..450b898 100644..100755 --- a/yajl/yajl_gen.c +++ b/yajl/yajl_gen.c diff --git a/yajl/yajl_gen.h b/yajl/yajl_gen.h index 47f723d..710ff03 100644..100755 --- a/yajl/yajl_gen.h +++ b/yajl/yajl_gen.h @@ -137,6 +137,10 @@ extern "C" { YAJL_API yajl_gen_status yajl_gen_map_close(yajl_gen hand); YAJL_API yajl_gen_status yajl_gen_array_open(yajl_gen hand); YAJL_API yajl_gen_status yajl_gen_array_close(yajl_gen hand); + YAJL_API yajl_gen_status yajl_gen_c_comment(yajl_gen g, const unsigned char * str, + unsigned int len, int dlytoeol); + YAJL_API yajl_gen_status yajl_gen_cpp_comment(yajl_gen g, const unsigned char * str, + unsigned int len); /** access the null terminated generator buffer. If incrementally * outputing JSON, one should call yajl_gen_clear to clear the diff --git a/yajl/yajl_lex.c b/yajl/yajl_lex.c index 8560a12..8560a12 100644..100755 --- a/yajl/yajl_lex.c +++ b/yajl/yajl_lex.c diff --git a/yajl/yajl_lex.h b/yajl/yajl_lex.h index 61a0047..61a0047 100644..100755 --- a/yajl/yajl_lex.h +++ b/yajl/yajl_lex.h diff --git a/yajl/yajl_parse.h b/yajl/yajl_parse.h index a3600fe..a3600fe 100644..100755 --- a/yajl/yajl_parse.h +++ b/yajl/yajl_parse.h diff --git a/yajl/yajl_parser.c b/yajl/yajl_parser.c index 07ce279..07ce279 100644..100755 --- a/yajl/yajl_parser.c +++ b/yajl/yajl_parser.c diff --git a/yajl/yajl_parser.h b/yajl/yajl_parser.h index 5d87ed7..5d87ed7 100644..100755 --- a/yajl/yajl_parser.h +++ b/yajl/yajl_parser.h diff --git a/yajl/yajl_test.c b/yajl/yajl_test.c index 991dd4d..991dd4d 100644..100755 --- a/yajl/yajl_test.c +++ b/yajl/yajl_test.c diff --git a/yajl/yajl_tree.c b/yajl/yajl_tree.c index 8e4aca3..8e4aca3 100644..100755 --- a/yajl/yajl_tree.c +++ b/yajl/yajl_tree.c diff --git a/yajl/yajl_tree.h b/yajl/yajl_tree.h index d5cc286..d5cc286 100644..100755 --- a/yajl/yajl_tree.h +++ b/yajl/yajl_tree.h diff --git a/yajl/yajl_version.c b/yajl/yajl_version.c index cc7651e..cc7651e 100644..100755 --- a/yajl/yajl_version.c +++ b/yajl/yajl_version.c diff --git a/yajl/yajl_version.h b/yajl/yajl_version.h index f7354d0..f7354d0 100644..100755 --- a/yajl/yajl_version.h +++ b/yajl/yajl_version.h diff --git a/ziparch.sh b/ziparch.sh index 0cecba5..0cecba5 100644..100755 --- a/ziparch.sh +++ b/ziparch.sh |