Skip to content

Commit

Permalink
Final changes for 2.13
Browse files Browse the repository at this point in the history
- typos
- changelog
- readme.1st
  • Loading branch information
mm2 committed Jan 6, 2022
1 parent 058c821 commit a98c03c
Show file tree
Hide file tree
Showing 26 changed files with 64 additions and 45 deletions.
23 changes: 21 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@

-----------------------
2.13 Featured release
-----------------------
Added support for premultiplied alpha
tifficc can now handle alpha channels, both unassociated and premultiplied
Better documentation
CGATS parser can now deal with very long strings
Added Projects for Visual Studio 2020
Travis CI discontinued, GitHub actions used instead
Added a very preliminar meson build script (thanks to xclaesse)
Added ARM64 target to visual studo 2019 (thanks to gaborkertesz-linaro)
Added thread safe code to get time
Added automatic linear space detection
Added cmsGetStageContextID function
configure now accepts --without-fastfloat to turn plugin off
autogen.sh has now a --distclean toggle to get rid of all autotools generated files
Checked to work on STM32 Cortex-A, Cortex-M families
Bug & typos fixing (thanks to many reporters and contributors)

-----------------------
2.12 Maintenance release
-----------------------
Expand All @@ -13,7 +32,7 @@ Fix matlab MEX compilation
plugin: cleanup and better SSE detection
plugin: add lab to any on float
plugin: it can now be compiled as C++
recover PDF documentation, but try to keep it under a resonable size.
recover PDF documentation, but try to keep it under a reasonable size.
Prevent a rare but possible out-of-bounds read in postscript generator
Remove unused variables

Expand All @@ -30,7 +49,7 @@ Fixed LUT16 write matrix on multichannel V2 profiles
-----------------------
Added a compilation toggle to remove "register" keyword in API.
Previously commercial, fast_float plug-in is now released as open source under GPL3 license.
MD5 functions are now accesible through plug-in API.
MD5 functions are now accessible through plug-in API.
Added support for Visual Studio 2019
Bug fixing.

Expand Down
2 changes: 1 addition & 1 deletion README.1ST
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ About Little CMS
Little CMS intends to be an OPEN SOURCE small-footprint color management engine, with special focus on accuracy and performance. It uses the International Color Consortium standard (ICC), which is the modern standard when regarding to color management. The ICC specification is widely used and is referred to in many International and other de-facto standards. It was approved as an International Standard, ISO 15076-1, in 2005.

Conformance
Little CMS 2.12 is a FULL IMPLEMENTATION of ICC specification 4.3, it fully supports all kind of V2 and V4 profiles, including abstract, devicelink and named color profiles. Check the tutorial for a exhaustive list of features.
Little CMS is a FULL IMPLEMENTATION of ICC specification 4.3, it fully supports all kind of V2 and V4 profiles, including abstract, devicelink and named color profiles. Check the tutorial for a exhaustive list of features.


A bit of story
Expand Down
2 changes: 1 addition & 1 deletion include/lcms2.h
Original file line number Diff line number Diff line change
Expand Up @@ -1924,7 +1924,7 @@ CMSAPI cmsBool CMSEXPORT cmsDetectDestinationBlackPoint(cmsCIEXYZ* Blac
// Estimate total area coverage
CMSAPI cmsFloat64Number CMSEXPORT cmsDetectTAC(cmsHPROFILE hProfile);

// Estimate gamma space, alwasys positive. Returns -1 on error.
// Estimate gamma space, always positive. Returns -1 on error.
CMSAPI cmsFloat64Number CMSEXPORT cmsDetectRGBProfileGamma(cmsHPROFILE hProfile, cmsFloat64Number thereshold);

// Poor man's gamut mapping
Expand Down
2 changes: 1 addition & 1 deletion include/lcms2_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
//---------------------------------------------------------------------------------
//
// This is the plug-in header file. Normal LittleCMS clients should not use it.
// It is provided for plug-in writters that may want to access the support
// It is provided for plug-in writers that may want to access the support
// functions to do low level operations. All plug-in related structures
// are defined here. Including this file forces to include the standard API too.

Expand Down
2 changes: 1 addition & 1 deletion plugins/fast_float/src/fast_16_tethra.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ cmsBool Optimize16BitRGBTransform(_cmsTransform2Fn* TransformFn,
// For empty transforms, do nothing
if (*Lut == NULL) return FALSE;

// This is a loosy optimization! does not apply in floating-point cases
// This is a lossy optimization! does not apply in floating-point cases
if (T_FLOAT(*InputFormat) || T_FLOAT(*OutputFormat)) return FALSE;

// Only on 16-bit
Expand Down
2 changes: 1 addition & 1 deletion plugins/fast_float/src/fast_8_curves.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ cmsBool Optimize8ByJoiningCurves(_cmsTransform2Fn* TransformFn,
Curves8Data* Data;
cmsUInt32Number nChans;

// This is a loosy optimization! does not apply in floating-point cases
// This is a lossy optimization! does not apply in floating-point cases
if (T_FLOAT(*InputFormat) || T_FLOAT(*OutputFormat)) return FALSE;

// Only on 8-bit
Expand Down
2 changes: 1 addition & 1 deletion plugins/fast_float/src/fast_8_tethra.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ cmsBool Optimize8BitRGBTransform(_cmsTransform2Fn* TransformFn,
// For empty transforms, do nothing
if (*Lut == NULL) return FALSE;

// This is a loosy optimization! does not apply in floating-point cases
// This is a lossy optimization! does not apply in floating-point cases
if (T_FLOAT(*InputFormat) || T_FLOAT(*OutputFormat)) return FALSE;

// Only on 8-bit
Expand Down
6 changes: 3 additions & 3 deletions plugins/fast_float/src/fast_float_15bits.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ cmsUInt8Number* Pack15bitsPlanar(CMSREGISTER struct _cmstransform_struct* CMMcar



// Generic falltrough
// Generic fallthrough
static
cmsUInt8Number* Unroll15bitsChunky(CMSREGISTER struct _cmstransform_struct* CMMcargo,
CMSREGISTER cmsUInt16Number Values[],
Expand Down Expand Up @@ -468,7 +468,7 @@ cmsUInt8Number* PackNBytesSwapDither(CMSREGISTER struct _cmstransform_struct* C

// The factory for 15 bits. This function returns a pointer to specialized function
// that would deal with the asked format. It return a pointer to NULL if the format
// is not supported. This is tha basis of formatter plug-in for 15 bit formats.
// is not supported. This is the basis of formatter plug-in for 15 bit formats.
CMSCHECKPOINT cmsFormatter CMSEXPORT Formatter_15Bit_Factory(cmsUInt32Number Type,
cmsFormatterDirection Dir,
cmsUInt32Number dwFlags)
Expand Down Expand Up @@ -517,7 +517,7 @@ CMSCHECKPOINT cmsFormatter CMSEXPORT Formatter_15Bit_Factory(cmsUInt32Number Typ
Result.Fmt16 = (Dir == cmsFormatterInput) ? Unroll15bitsPlanar : Pack15bitsPlanar;
break;

// Falltrough for remaining (corner) cases
// Fallthrough for remaining (corner) cases
case TYPE_GRAY_15_REV:
case TYPE_GRAY_15_SE:
case TYPE_GRAYA_15:
Expand Down
2 changes: 1 addition & 1 deletion plugins/fast_float/src/fast_float_cmyk.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ cmsBool OptimizeCLUTCMYKTransform(_cmsTransform2Fn* TransformFn,
// For empty transforms, do nothing
if (*Lut == NULL) return FALSE;

// This is a loosy optimization! does not apply in floating-point cases
// This is a lossy optimization! does not apply in floating-point cases
if (!T_FLOAT(*InputFormat) || !T_FLOAT(*OutputFormat)) return FALSE;

// Only on 8-bit
Expand Down
2 changes: 1 addition & 1 deletion plugins/fast_float/src/fast_float_curves.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ cmsBool KCurveIsLinear(CurvesFloatData* data)
}


// Create linearization tables with a reasonable number of entries. Precission is about 32 bits.
// Create linearization tables with a reasonable number of entries. Precision is about 32 bits.
static
CurvesFloatData* ComputeCompositeCurves(cmsUInt32Number nChan, cmsPipeline* Src)
{
Expand Down
2 changes: 1 addition & 1 deletion plugins/fast_float/src/fast_float_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#define REQUIRED_LCMS_VERSION 2120

// Unused parameter warning supression
// Unused parameter warning suppression
#define UNUSED_PARAMETER(x) ((void)x)

// For testbed
Expand Down
4 changes: 2 additions & 2 deletions plugins/fast_float/testbed/fast_float_testbed.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ typedef struct { cmsFloat32Number L, a, b; } Scanline_LabFloat;
#define FROM_15_TO_8(x15) (cmsUInt8Number) (((cmsUInt64Number) x15 * 0xFF + 0x4000) >> 15)


// Floating point acuracy for tests
// Floating point accuracy for tests
#define EPSILON_FLOAT_TESTS 0.005

// A flushed printf
Expand Down Expand Up @@ -83,7 +83,7 @@ void Fail(const char* frm, ...)
vsprintf(ReasonToFailBuffer, frm, args);
FatalErrorQuit(0, 0, ReasonToFailBuffer);

// unreacheable va_end(args);
// unreachable va_end(args);
}


Expand Down
2 changes: 1 addition & 1 deletion src/cmscgats.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ static PROPERTY PredefinedProperties[] = {

{"MATERIAL", WRITE_STRINGIFY}, // Identifies the material on which the target was produced using a code
// uniquely identifying th e material. This is intend ed to be used for IT8.7
// physical targets only (i.e . IT8.7/1 a nd IT8.7/2).
// physical targets only (i.e . IT8.7/1 and IT8.7/2).

{"INSTRUMENTATION", WRITE_STRINGIFY}, // Used to report the specific instrumentation used (manufacturer and
// model number) to generate the data reported. This data will often
Expand Down
4 changes: 2 additions & 2 deletions src/cmserr.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ long int CMSEXPORT cmsfilelength(FILE* f)

// User may override this behaviour by using a memory plug-in, which basically replaces
// the default memory management functions. In this case, no check is performed and it
// is up to the plug-in writter to keep in the safe side. There are only three functions
// is up to the plug-in writer to keep in the safe side. There are only three functions
// required to be implemented: malloc, realloc and free, although the user may want to
// replace the optional mallocZero, calloc and dup as well.

Expand Down Expand Up @@ -308,7 +308,7 @@ void* CMSEXPORT _cmsDupMem(cmsContext ContextID, const void* Org, cmsUInt32Numbe

// Sub allocation takes care of many pointers of small size. The memory allocated in
// this way have be freed at once. Next function allocates a single chunk for linked list
// I prefer this method over realloc due to the big inpact on xput realloc may have if
// I prefer this method over realloc due to the big impact on xput realloc may have if
// memory is being swapped to disk. This approach is safer (although that may not be true on all platforms)
static
_cmsSubAllocator_chunk* _cmsCreateSubAllocChunk(cmsContext ContextID, cmsUInt32Number Initial)
Expand Down
2 changes: 1 addition & 1 deletion src/cmsgamma.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ _cmsParametricCurvesCollection *GetParametricCurveByType(cmsContext ContextID, i
}

// Low level allocate, which takes care of memory details. nEntries may be zero, and in this case
// no optimation curve is computed. nSegments may also be zero in the inverse case, where only the
// no optimization curve is computed. nSegments may also be zero in the inverse case, where only the
// optimization curve is given. Both features simultaneously is an error
static
cmsToneCurve* AllocateToneCurveStruct(cmsContext ContextID, cmsUInt32Number nEntries,
Expand Down
2 changes: 1 addition & 1 deletion src/cmsgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ cmsBool CMSEXPORT cmsDesaturateLab(cmsCIELab* Lab,
// Actually, doing that "well" is quite hard, since every component may behave completely different.
// Since the true point of this function is to detect suitable optimizations, I am imposing some requirements
// that simplifies things: only RGB, and only profiles that can got in both directions.
// The algorith obtains Y from a syntetical gray R=G=B. Then least squares fitting is used to estimate gamma.
// The algorithm obtains Y from a syntetical gray R=G=B. Then least squares fitting is used to estimate gamma.
// For gamma close to 1.0, RGB is linear. On profiles not supported, -1 is returned.

cmsFloat64Number CMSEXPORT cmsDetectRGBProfileGamma(cmsHPROFILE hProfile, cmsFloat64Number thereshold)
Expand Down
2 changes: 1 addition & 1 deletion src/cmsio0.c
Original file line number Diff line number Diff line change
Expand Up @@ -1616,7 +1616,7 @@ void* CMSEXPORT cmsReadTag(cmsHPROFILE hProfile, cmsTagSignature sig)
return Icc -> TagPtrs[n];


// Return error and unlock tha data
// Return error and unlock the data
Error:
_cmsUnlockMutex(Icc->ContextID, Icc ->UsrMutex);
return NULL;
Expand Down
6 changes: 3 additions & 3 deletions src/cmsio1.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ cmsPipeline* BuildRGBInputMatrixShaper(cmsHPROFILE hProfile)



// Read the DToAX tag, adjusting the encoding of Lab or XYZ if neded
// Read the DToAX tag, adjusting the encoding of Lab or XYZ if needed
static
cmsPipeline* _cmsReadFloatInputTag(cmsHPROFILE hProfile, cmsTagSignature tagFloat)
{
Expand Down Expand Up @@ -536,7 +536,7 @@ void ChangeInterpolationToTrilinear(cmsPipeline* Lut)
}


// Read the DToAX tag, adjusting the encoding of Lab or XYZ if neded
// Read the DToAX tag, adjusting the encoding of Lab or XYZ if needed
static
cmsPipeline* _cmsReadFloatOutputTag(cmsHPROFILE hProfile, cmsTagSignature tagFloat)
{
Expand Down Expand Up @@ -661,7 +661,7 @@ cmsPipeline* CMSEXPORT _cmsReadOutputLUT(cmsHPROFILE hProfile, cmsUInt32Number I

// ---------------------------------------------------------------------------------------------------------------

// Read the AToD0 tag, adjusting the encoding of Lab or XYZ if neded
// Read the AToD0 tag, adjusting the encoding of Lab or XYZ if needed
static
cmsPipeline* _cmsReadFloatDevicelinkTag(cmsHPROFILE hProfile, cmsTagSignature tagFloat)
{
Expand Down
4 changes: 2 additions & 2 deletions src/cmsnamed.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ void strFrom16(char str[3], cmsUInt16Number n)
}

// Add an ASCII entry. Do not add any \0 termination (ICC1v43_2010-12.pdf page 61)
// In the case the user explicitely sets an empty string, we force a \0
// In the case the user explicitly sets an empty string, we force a \0
cmsBool CMSEXPORT cmsMLUsetASCII(cmsMLU* mlu, const char LanguageCode[3], const char CountryCode[3], const char* ASCIIString)
{
cmsUInt32Number i, len = (cmsUInt32Number) strlen(ASCIIString);
Expand Down Expand Up @@ -641,7 +641,7 @@ cmsUInt32Number CMSEXPORT cmsNamedColorCount(const cmsNAMEDCOLORLIST* NamedColor
return NamedColorList ->nColors;
}

// Info aboout a given color
// Info about a given color
cmsBool CMSEXPORT cmsNamedColorInfo(const cmsNAMEDCOLORLIST* NamedColorList, cmsUInt32Number nColor,
char* Name,
char* Prefix,
Expand Down
8 changes: 4 additions & 4 deletions src/cmstypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ void Type_ParametricCurve_Free(struct _cms_typehandler_struct* self, void* Ptr)
//
// All the dateTimeNumber values in a profile shall be in Coordinated Universal Time
// (UTC, also known as GMT or ZULU Time). Profile writers are required to convert local
// time to UTC when setting these values. Programmes that display these values may show
// time to UTC when setting these values. Programs that display these values may show
// the dateTimeNumber as UTC, show the equivalent local time (at current locale), or
// display both UTC and local versions of the dateTimeNumber.

Expand Down Expand Up @@ -1793,7 +1793,7 @@ cmsUInt32Number uipow(cmsUInt32Number n, cmsUInt32Number a, cmsUInt32Number b)


// That will create a MPE LUT with Matrix, pre tables, CLUT and post tables.
// 8 bit lut may be scaled easely to v4 PCS, but we need also to properly adjust
// 8 bit lut may be scaled easily to v4 PCS, but we need also to properly adjust
// PCS on BToAxx tags and AtoB if abstract. We need to fix input direction.

static
Expand Down Expand Up @@ -4558,7 +4558,7 @@ void *Type_MPE_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsU



// This one is a liitle bit more complex, so we don't use position tables this time.
// This one is a little bit more complex, so we don't use position tables this time.
static
cmsBool Type_MPE_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems)
{
Expand Down Expand Up @@ -4990,7 +4990,7 @@ cmsBool ReadOneElem(cmsIOHANDLER* io, _cmsDICelem* e, cmsUInt32Number i, cmsUIn
if (!_cmsReadUInt32Number(io, &e->Offsets[i])) return FALSE;
if (!_cmsReadUInt32Number(io, &e ->Sizes[i])) return FALSE;

// An offset of zero has special meaning and shal be preserved
// An offset of zero has special meaning and shall be preserved
if (e ->Offsets[i] > 0)
e ->Offsets[i] += BaseOffset;
return TRUE;
Expand Down
8 changes: 4 additions & 4 deletions src/cmswtpnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,16 +264,16 @@ cmsBool _cmsAdaptMatrixToD50(cmsMAT3* r, const cmsCIExyY* SourceWhitePt)

// Build a White point, primary chromas transfer matrix from RGB to CIE XYZ
// This is just an approximation, I am not handling all the non-linear
// aspects of the RGB to XYZ process, and assumming that the gamma correction
// aspects of the RGB to XYZ process, and assuming that the gamma correction
// has transitive property in the transformation chain.
//
// the alghoritm:
// the algoritm:
//
// - First I build the absolute conversion matrix using
// primaries in XYZ. This matrix is next inverted
// - Then I eval the source white point across this matrix
// obtaining the coeficients of the transformation
// - Then, I apply these coeficients to the original matrix
// obtaining the coefficients of the transformation
// - Then, I apply these coefficients to the original matrix
//
cmsBool _cmsBuildRGB2XYZtransferMatrix(cmsMAT3* r, const cmsCIExyY* WhitePt, const cmsCIExyYTRIPLE* Primrs)
{
Expand Down
2 changes: 1 addition & 1 deletion src/cmsxform.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ void FloatXFORM(_cmsTRANSFORM* p,

accum = p->FromInputFloat(p, fIn, accum, Stride->BytesPerPlaneIn);

// Any gamut chack to do?
// Any gamut check to do?
if (p->GamutCheck != NULL) {

// Evaluate gamut marker.
Expand Down
6 changes: 3 additions & 3 deletions testbed/testcms2.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ cmsHPROFILE Create_CMYK_DeviceLink(void)
}


// Create a fake CMYK profile, without any other requeriment that being coarse CMYK.
// Create a fake CMYK profile, without any other requirement that being coarse CMYK.
// DON'T USE THIS PROFILE FOR ANYTHING, IT IS USELESS BUT FOR TESTING PURPOSES.
typedef struct {

Expand Down Expand Up @@ -8279,7 +8279,7 @@ double distance(const cmsUInt16Number* a, const cmsUInt16Number* b)

/**
* In 2.12, a report suggest that the built-in sRGB has roundtrip errors that makes color to move
* when rountripping again and again
* when roundripping again and again
*/
static
int Check_sRGB_Rountrips(void)
Expand Down Expand Up @@ -8378,7 +8378,7 @@ int CheckGammaSpaceDetection(void)

#if 0

// You need to download folowing profiles to execute this test: sRGB-elle-V4-srgbtrc.icc, sRGB-elle-V4-g10.icc
// You need to download following profiles to execute this test: sRGB-elle-V4-srgbtrc.icc, sRGB-elle-V4-g10.icc
// The include this line in the checks list: Check("KInear spaces detection", CheckLinearSpacesOptimization);
static
void uint16toFloat(cmsUInt16Number* src, cmsFloat32Number* dst)
Expand Down
6 changes: 3 additions & 3 deletions utils/delphi/lcms2dll.pas
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
//
//---------------------------------------------------------------------------------
//
// Version 2.13
// Version 2.13 - unmantained
//

UNIT lcms2dll;
Expand All @@ -45,7 +45,7 @@

CONST

LCMS2_SO = {$IFDEF DARWIN} 'liblcms2.2.dylib'; {$ELSE} 'lcms2.dll'; {$ENDIF}
LCMS2_SO = {$IFDEF DARWIN} 'liblcms2.13.dylib'; {$ELSE} 'lcms2.dll'; {$ENDIF}

TYPE

Expand Down Expand Up @@ -1449,7 +1449,7 @@
cmsFLAGS_BLACKPOINTCOMPENSATION = $2000;
cmsFLAGS_NOWHITEONWHITEFIXUP = $0004; // Don't fix scum dot
cmsFLAGS_HIGHRESPRECALC = $0400; // Use more memory to give better accuracy
cmsFLAGS_LOWRESPRECALC = $0800; // Use less memory to minimize resouces
cmsFLAGS_LOWRESPRECALC = $0800; // Use less memory to minimize resources

// For devicelink creation
cmsFLAGS_8BITS_DEVICELINK = $0008; // Create 8 bits devicelinks
Expand Down
2 changes: 1 addition & 1 deletion utils/psicc/psicc.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void Help(void)
fprintf(stderr, "-b - Black point compensation (CRD only)\n");
fprintf(stderr, "-u - Do NOT generate resource name on CRD\n");
fprintf(stderr, "-c<0,1,2> - Precision (0=LowRes, 1=Normal (default), 2=Hi-res) (CRD only)\n");
fprintf(stderr, "-n<gridpoints> - Alternate way to set precission, number of CLUT points (CRD only)\n");
fprintf(stderr, "-n<gridpoints> - Alternate way to set precision, number of CLUT points (CRD only)\n");

fprintf(stderr, "\n");
fprintf(stderr, "If no output file is specified, output goes to stdout.\n\n");
Expand Down
Loading

0 comments on commit a98c03c

Please sign in to comment.