summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarti Maria <info@littlecms.com>2012-05-19 17:07:51 +0200
committerMarti Maria <info@littlecms.com>2012-05-19 17:07:51 +0200
commit9fc6a31f69d199fe57593927890ef0cb227d5e37 (patch)
tree91571ef58c54c7a7cc6922591f7cd4d3d6b1789a /include
parentb6153c3b5b35db07243625933203566eb0b243fd (diff)
downloadlcms2-9fc6a31f69d199fe57593927890ef0cb227d5e37.tar.gz
Sync with development sources, See Change Log
Diffstat (limited to 'include')
-rw-r--r--include/lcms2.h23
-rw-r--r--include/lcms2_plugin.h66
2 files changed, 84 insertions, 5 deletions
diff --git a/include/lcms2.h b/include/lcms2.h
index 11965eb..f44c598 100644
--- a/include/lcms2.h
+++ b/include/lcms2.h
@@ -23,7 +23,7 @@
//
//---------------------------------------------------------------------------------
//
-// Version 2.3
+// Version 2.4
//
#ifndef _lcms2_H
@@ -69,7 +69,7 @@ extern "C" {
#endif
// Version/release
-#define LCMS_VERSION 2030
+#define LCMS_VERSION 2040
// I will give the chance of redefining basic types for compilers that are not fully C99 compliant
#ifndef CMS_BASIC_TYPES_ALREADY_DEFINED
@@ -722,14 +722,17 @@ typedef void* cmsHTRANSFORM;
#define TYPE_RGBA_16_SE (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|ENDIAN16_SH(1))
#define TYPE_ARGB_8 (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|SWAPFIRST_SH(1))
+#define TYPE_ARGB_8_PLANAR (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|SWAPFIRST_SH(1)|PLANAR_SH(1))
#define TYPE_ARGB_16 (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|SWAPFIRST_SH(1))
#define TYPE_ABGR_8 (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|DOSWAP_SH(1))
+#define TYPE_ABGR_8_PLANAR (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|DOSWAP_SH(1)|PLANAR_SH(1))
#define TYPE_ABGR_16 (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1))
#define TYPE_ABGR_16_PLANAR (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|PLANAR_SH(1))
#define TYPE_ABGR_16_SE (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1))
#define TYPE_BGRA_8 (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|DOSWAP_SH(1)|SWAPFIRST_SH(1))
+#define TYPE_BGRA_8_PLANAR (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|DOSWAP_SH(1)|SWAPFIRST_SH(1)|PLANAR_SH(1))
#define TYPE_BGRA_16 (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|SWAPFIRST_SH(1))
#define TYPE_BGRA_16_SE (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|ENDIAN16_SH(1)|SWAPFIRST_SH(1))
@@ -1098,6 +1101,10 @@ CMSAPI cmsBool CMSEXPORT cmsIsToneCurveDescending(const cmsToneCurve*
CMSAPI cmsInt32Number CMSEXPORT cmsGetToneCurveParametricType(const cmsToneCurve* t);
CMSAPI cmsFloat64Number CMSEXPORT cmsEstimateGamma(const cmsToneCurve* t, cmsFloat64Number Precision);
+// Tone curve tabular estimation
+CMSAPI cmsUInt32Number CMSEXPORT cmsGetToneCurveEstimatedTableEntries(const cmsToneCurve* t);
+CMSAPI const cmsUInt16Number* CMSEXPORT cmsGetToneCurveEstimatedTable(const cmsToneCurve* t);
+
// Implements pipelines of multi-processing elements -------------------------------------------------------------
@@ -1110,6 +1117,7 @@ CMSAPI cmsPipeline* CMSEXPORT cmsPipelineAlloc(cmsContext ContextID, cmsUIn
CMSAPI void CMSEXPORT cmsPipelineFree(cmsPipeline* lut);
CMSAPI cmsPipeline* CMSEXPORT cmsPipelineDup(const cmsPipeline* Orig);
+CMSAPI cmsContext CMSEXPORT cmsGetPipelineContextID(const cmsPipeline* lut);
CMSAPI cmsUInt32Number CMSEXPORT cmsPipelineInputChannels(const cmsPipeline* lut);
CMSAPI cmsUInt32Number CMSEXPORT cmsPipelineOutputChannels(const cmsPipeline* lut);
@@ -1170,10 +1178,9 @@ typedef cmsInt32Number (* cmsSAMPLERFLOAT)(register const cmsFloat32Number In[],
#define SAMPLER_INSPECT 0x01000000
// For CLUT only
-CMSAPI cmsBool CMSEXPORT cmsStageSampleCLut16bit(cmsStage* mpe, cmsSAMPLER16 Sampler, void* Cargo, cmsUInt32Number dwFlags);
+CMSAPI cmsBool CMSEXPORT cmsStageSampleCLut16bit(cmsStage* mpe, cmsSAMPLER16 Sampler, void* Cargo, cmsUInt32Number dwFlags);
CMSAPI cmsBool CMSEXPORT cmsStageSampleCLutFloat(cmsStage* mpe, cmsSAMPLERFLOAT Sampler, void* Cargo, cmsUInt32Number dwFlags);
-
// Slicers
CMSAPI cmsBool CMSEXPORT cmsSliceSpace16(cmsUInt32Number nInputs, const cmsUInt32Number clutPoints[],
cmsSAMPLER16 Sampler, void * Cargo);
@@ -1283,6 +1290,7 @@ CMSAPI cmsNAMEDCOLORLIST* CMSEXPORT cmsGetNamedColorList(cmsHTRANSFORM xform);
// Profile sequence descriptor. Some fields come from profile sequence descriptor tag, others
// come from Profile Sequence Identifier Tag
typedef struct {
+
cmsSignature deviceMfg;
cmsSignature deviceModel;
cmsUInt64Number attributes;
@@ -1634,6 +1642,13 @@ CMSAPI void CMSEXPORT cmsDoTransform(cmsHTRANSFORM Transform,
void * OutputBuffer,
cmsUInt32Number Size);
+CMSAPI void CMSEXPORT cmsDoTransformStride(cmsHTRANSFORM Transform,
+ const void * InputBuffer,
+ void * OutputBuffer,
+ cmsUInt32Number Size,
+ cmsUInt32Number Stride);
+
+
CMSAPI void CMSEXPORT cmsSetAlarmCodes(cmsUInt16Number NewAlarm[cmsMAXCHANNELS]);
CMSAPI void CMSEXPORT cmsGetAlarmCodes(cmsUInt16Number NewAlarm[cmsMAXCHANNELS]);
diff --git a/include/lcms2_plugin.h b/include/lcms2_plugin.h
index 34e9af2..c2fa5bf 100644
--- a/include/lcms2_plugin.h
+++ b/include/lcms2_plugin.h
@@ -181,7 +181,6 @@ CMSAPI cmsS15Fixed16Number CMSEXPORT _cmsDoubleTo15Fixed16(cmsFloat64Number v);
CMSAPI void CMSEXPORT _cmsEncodeDateTimeNumber(cmsDateTimeNumber *Dest, const struct tm *Source);
CMSAPI void CMSEXPORT _cmsDecodeDateTimeNumber(const cmsDateTimeNumber *Source, struct tm *Dest);
-
//----------------------------------------------------------------------------------------------------------
// Plug-in foundation
@@ -196,6 +195,7 @@ CMSAPI void CMSEXPORT _cmsDecodeDateTimeNumber(const cmsDateTimeN
#define cmsPluginRenderingIntentSig 0x696E7448 // 'intH'
#define cmsPluginMultiProcessElementSig 0x6D706548 // 'mpeH'
#define cmsPluginOptimizationSig 0x6F707448 // 'optH'
+#define cmsPluginTransformSig 0x7A666D48 // 'xfmH'
typedef struct _cmsPluginBaseStruct {
@@ -486,6 +486,39 @@ typedef struct {
} cmsPluginMultiProcessElement;
+
+// Data kept in "Element" member of cmsStage
+
+// Curves
+typedef struct {
+ cmsUInt32Number nCurves;
+ cmsToneCurve** TheCurves;
+
+} _cmsStageToneCurvesData;
+
+// Matrix
+typedef struct {
+ cmsFloat64Number* Double; // floating point for the matrix
+ cmsFloat64Number* Offset; // The offset
+
+} _cmsStageMatrixData;
+
+// CLUT
+typedef struct {
+
+ union { // Can have only one of both representations at same time
+ cmsUInt16Number* T; // Points to the table 16 bits table
+ cmsFloat32Number* TFloat; // Points to the cmsFloat32Number table
+
+ } Tab;
+
+ cmsInterpParams* Params;
+ cmsUInt32Number nEntries;
+ cmsBool HasFloatValues;
+
+} _cmsStageCLutData;
+
+
//----------------------------------------------------------------------------------------------------------
// Optimization. Using this plug-in, additional optimization strategies may be implemented.
// The function should return TRUE if any optimization is done on the LUT, this terminates
@@ -524,6 +557,37 @@ typedef struct {
} cmsPluginOptimization;
//----------------------------------------------------------------------------------------------------------
+// Full xform
+typedef void (* _cmsTransformFn)(struct _cmstransform_struct *CMMcargo,
+ const void* InputBuffer,
+ void* OutputBuffer,
+ cmsUInt32Number Size,
+ cmsUInt32Number Stride);
+
+typedef cmsBool (* _cmsTranformFactory)(_cmsTransformFn* xform,
+ void** UserData,
+ _cmsOPTfreeDataFn* FreeUserData,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags);
+
+
+// Retrieve user data as specified by the factory
+CMSAPI void * CMSEXPORT _cmsGetTransformUserData(struct _cmstransform_struct *CMMcargo);
+
+
+// FIXME: Those are hacks that should be solved somehow.
+void* _cmsOPTgetTransformPipelinePrivateData(struct _cmstransform_struct *CMMcargo);
+
+typedef struct {
+ cmsPluginBase base;
+
+ // Transform entry point
+ _cmsTranformFactory Factory;
+
+} cmsPluginTransform;
+
#ifndef CMS_USE_CPP_API
# ifdef __cplusplus