< prev index next >

src/java.desktop/share/native/liblcms/lcms2_internal.h

Print this page

        

*** 25,38 **** // This file is available under and governed by the GNU General Public // License version 2 only, as published by the Free Software Foundation. // However, the following notice accompanied the original version of this // file: // ! // // Little Color Management System ! // Copyright (c) 1998-2017 Marti Maria Saguer // // 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, --- 25,38 ---- // This file is available under and governed by the GNU General Public // License version 2 only, as published by the Free Software Foundation. // However, the following notice accompanied the original version of this // file: // ! //--------------------------------------------------------------------------------- // // Little Color Management System ! // Copyright (c) 1998-2020 Marti Maria Saguer // // 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,
*** 74,84 **** #ifndef M_LOG10E # define M_LOG10E 0.434294481903251827651 #endif // BorlandC 5.5, VC2003 are broken on that ! #if defined(__BORLANDC__) || (_MSC_VER < 1400) // 1400 == VC++ 8.0 #define sinf(x) (float)sin((float)x) #define sqrtf(x) (float)sqrt((float)x) #endif --- 74,84 ---- #ifndef M_LOG10E # define M_LOG10E 0.434294481903251827651 #endif // BorlandC 5.5, VC2003 are broken on that ! #if defined(__BORLANDC__) || (defined(_MSC_VER) && (_MSC_VER < 1400)) // 1400 == VC++ 8.0 #define sinf(x) (float)sin((float)x) #define sqrtf(x) (float)sqrt((float)x) #endif
*** 115,124 **** --- 115,131 ---- # define cmsINLINE __inline #else # define cmsINLINE static inline #endif + // Allow signed overflow, we know this is harmless in this particular context + #if defined(__clang__) + # define CMS_NO_SANITIZE __attribute__((no_sanitize("signed-integer-overflow"))) + #else + # define CMS_NO_SANITIZE + #endif + // Other replacement functions #ifdef _MSC_VER # ifndef snprintf # define snprintf _snprintf # endif
*** 126,141 **** # define vsnprintf _vsnprintf # endif /// Properly define some macros to accommodate /// older MSVC versions. ! # if _MSC_VER <= 1700 #include <float.h> #define isnan _isnan #define isinf(x) (!_finite((x))) # endif #endif // A fast way to convert from/to 16 <-> 8 bits #define FROM_8_TO_16(rgb) (cmsUInt16Number) ((((cmsUInt16Number) (rgb)) << 8)|(rgb)) #define FROM_16_TO_8(rgb) (cmsUInt8Number) ((((cmsUInt32Number)(rgb) * 65281U + 8388608U) >> 24) & 0xFFU) --- 133,155 ---- # define vsnprintf _vsnprintf # endif /// Properly define some macros to accommodate /// older MSVC versions. ! # if defined(_MSC_VER) && _MSC_VER <= 1700 #include <float.h> #define isnan _isnan #define isinf(x) (!_finite((x))) # endif + #if !defined(_MSC_VER) && (defined(__STDC_VERSION__) && __STDC_VERSION__ < 199901L) + #if !defined(isinf) + #define isinf(x) (!finite((x))) + #endif + #endif + + #endif // A fast way to convert from/to 16 <-> 8 bits #define FROM_8_TO_16(rgb) (cmsUInt16Number) ((((cmsUInt16Number) (rgb)) << 8)|(rgb)) #define FROM_16_TO_8(rgb) (cmsUInt8Number) ((((cmsUInt32Number)(rgb) * 65281U + 8388608U) >> 24) & 0xFFU)
*** 962,971 **** --- 976,988 ---- cmsBool _cmsReadMediaWhitePoint(cmsCIEXYZ* Dest, cmsHPROFILE hProfile); cmsBool _cmsReadCHAD(cmsMAT3* Dest, cmsHPROFILE hProfile); // Profile linker -------------------------------------------------------------------------------------------------- + // Link several profiles to obtain a single LUT modelling the whole color transform. Intents, Black point + // compensation and Adaptation parameters may vary across profiles. BPC and Adaptation refers to the PCS + // after the profile. I.e, BPC[0] refers to connexion between profile(0) and profile(1) cmsPipeline* _cmsLinkProfiles(cmsContext ContextID, cmsUInt32Number nProfiles, cmsUInt32Number TheIntents[], cmsHPROFILE hProfiles[], cmsBool BPC[],
< prev index next >