~ubuntu-branches/ubuntu/saucy/digikam/saucy

« back to all changes in this revision

Viewing changes to libs/3rdparty/lprof/lcmsprf.h

  • Committer: Package Import Robot
  • Author(s): Felix Geyer, Rohan Garg, Philip Muškovac, Felix Geyer
  • Date: 2011-09-23 18:18:55 UTC
  • mfrom: (1.2.36 upstream)
  • Revision ID: package-import@ubuntu.com-20110923181855-ifs67wxkugshev9k
Tags: 2:2.1.1-0ubuntu1
[ Rohan Garg ]
* New upstream release (LP: #834190)
  - debian/control
    + Build with libqtwebkit-dev
 - debian/kipi-plugins-common
    + Install libkvkontakte required by kipi-plugins
 - debian/digikam
    + Install panoramagui

[ Philip Muškovac ]
* New upstream release
  - debian/control:
    + Add libcv-dev, libcvaux-dev, libhighgui-dev, libboost-graph1.46-dev,
      libksane-dev, libxml2-dev, libxslt-dev, libqt4-opengl-dev, libqjson-dev,
      libgpod-dev and libqca2-dev to build-deps
    + Add packages for kipi-plugins, libmediawiki, libkface, libkgeomap and
      libkvkontakte
  - debian/rules:
    + Don't build with gphoto2 since it doesn't build with it.
  - Add kubuntu_fix_test_linking.diff to fix linking of the dngconverter test
  - update install files
  - update kubuntu_01_mysqld_executable_name.diff for new cmake layout
    and rename to kubuntu_mysqld_executable_name.diff
* Fix typo in digikam-data description (LP: #804894)
* Fix Vcs links

[ Felix Geyer ]
* Move library data files to the new packages libkface-data, libkgeomap-data
  and libkvkontakte-data.
* Override version of the embedded library packages to 1.0~digikam<version>.
* Exclude the library packages from digikam-dbg to prevent file conflicts in
  the future.
* Call dh_install with --list-missing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
Little cms - profiler construction set
3
 
Copyright (C) 1998-2001 Marti Maria <marti@littlecms.com>
4
 
 
5
 
THIS SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
6
 
EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
7
 
WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
8
 
 
9
 
IN NO EVENT SHALL MARTI MARIA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
10
 
INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
11
 
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
12
 
WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
13
 
LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
14
 
OF THIS SOFTWARE.
15
 
 
16
 
This file is free software; you can redistribute it and/or modify it
17
 
under the terms of the GNU General Public License as published by
18
 
the Free Software Foundation; either version 2 of the License, or
19
 
(at your option) any later version.
20
 
 
21
 
This program is distributed in the hope that it will be useful, but
22
 
WITHOUT ANY WARRANTY; without even the implied warranty of
23
 
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
24
 
General Public License for more details.
25
 
 
26
 
You should have received a copy of the GNU General Public License
27
 
along with this program; if not, write to the Free Software
28
 
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
29
 
 
30
 
As a special exception to the GNU General Public License, if you
31
 
distribute this file as part of a program that contains a
32
 
configuration script generated by Autoconf, you may include it under
33
 
the same distribution terms that you use for the rest of that program.
34
 
*/
35
 
 
36
 
/* Version 1.09a */
37
 
 
38
 
#ifndef __cmsprf_H
39
 
 
40
 
// liblcms includes.
41
 
 
42
 
#include <lcms.h>
43
 
 
44
 
// C++ includes.
45
 
 
46
 
#include <cctype>
47
 
#include <climits>
48
 
#include <cstdarg>
49
 
 
50
 
// C Ansi includes.
51
 
 
52
 
#include <sys/stat.h>
53
 
 
54
 
#ifdef __cplusplus
55
 
extern "C"
56
 
{
57
 
#endif
58
 
 
59
 
#ifdef NON_WINDOWS
60
 
#  ifndef stricmp
61
 
#     define stricmp strcasecmp
62
 
#  endif
63
 
#endif
64
 
 
65
 
#ifndef max
66
 
#define max(a,b) ((a) > (b)?(a):(b))
67
 
#endif
68
 
 
69
 
// See B.K.O #148930: compile with lcms v.1.17
70
 
#if (LCMS_VERSION > 116)
71
 
typedef LCMSBOOL BOOL;
72
 
#endif
73
 
 
74
 
 
75
 
/* Matrix operations - arbitrary size ----------------------------------------------------- */
76
 
 
77
 
typedef struct
78
 
{
79
 
 
80
 
    int       Cols, Rows;
81
 
    double**  Values;
82
 
 
83
 
} MATN,FAR* LPMATN;
84
 
 
85
 
LPMATN      cdecl MATNalloc(int Rows, int Cols);
86
 
void        cdecl MATNfree (LPMATN mat);
87
 
LPMATN      cdecl MATNmult(LPMATN a1, LPMATN a2);
88
 
double      cdecl MATNcross(LPMATN a);
89
 
void        cdecl MATNscalar (LPMATN a, double scl, LPMATN b);
90
 
LPMATN      cdecl MATNtranspose (LPMATN a);
91
 
BOOL        cdecl MATNsolve(LPMATN a, LPMATN b);
92
 
 
93
 
 
94
 
/* IT8.7 / CGATS.17-200x handling -------------------------------------------------------- */
95
 
 
96
 
#define cmsxIT8_ROWS                    12
97
 
#define cmsxIT8_COLS                    22
98
 
#define cmsxIT8_GRAYCOLS                24
99
 
#define cmsxIT8_NORMAL_PATCHES          (cmsxIT8_ROWS*cmsxIT8_COLS + cmsxIT8_GRAYCOLS)
100
 
#define cmsxIT8_CUSTOM_PATCHES          10
101
 
#define cmsxIT8_TOTAL_PATCHES           (cmsxIT8_NORMAL_PATCHES + cmsxIT8_CUSTOM_PATCHES)
102
 
 
103
 
 
104
 
LCMSHANDLE  cdecl cmsxIT8Alloc(void);
105
 
void        cdecl cmsxIT8Free(LCMSHANDLE cmsxIT8);
106
 
LCMSHANDLE  cdecl cmsxIT8LoadFromFile(const char* cFileName);
107
 
LCMSHANDLE  cdecl cmsxIT8LoadFromMem(void *Ptr, size_t len);
108
 
BOOL        cdecl cmsxIT8SaveToFile(LCMSHANDLE cmsxIT8, const char* cFileName);
109
 
const char* cdecl cmsxIT8GetSheetType(LCMSHANDLE hIT8);
110
 
BOOL        cdecl cmsxIT8SetSheetType(LCMSHANDLE hIT8, const char* Type);
111
 
const char* cdecl cmsxIT8GetPatchName(LCMSHANDLE hIT8, int nPatch, char* buffer);
112
 
BOOL        cdecl cmsxIT8SetProperty(LCMSHANDLE hcmsxIT8, const char* cProp, const char *Str);
113
 
BOOL        cdecl cmsxIT8SetPropertyDbl(LCMSHANDLE hcmsxIT8, const char* cProp, double Val);
114
 
const char* cdecl cmsxIT8GetProperty(LCMSHANDLE hcmsxIT8, const char* cProp);
115
 
double      cdecl cmsxIT8GetPropertyDbl(LCMSHANDLE hcmsxIT8, const char* cProp);
116
 
int         cdecl cmsxIT8EnumProperties(LCMSHANDLE cmsxIT8, char ***PropertyNames);
117
 
int         cdecl cmsxIT8EnumDataFormat(LCMSHANDLE cmsxIT8, char ***SampleNames);
118
 
BOOL        cdecl cmsxIT8SetDataFormat(LCMSHANDLE cmsxIT8, int n, const char *Sample);
119
 
BOOL        cdecl cmsxIT8GetDataSetByPos(LCMSHANDLE IT8, int col, int row, char* Val, int ValBufferLen);
120
 
BOOL        cdecl cmsxIT8GetDataSet(LCMSHANDLE cmsxIT8, const char* cPatch, const char* cSample, char* Val, int ValBuffLen);
121
 
BOOL        cdecl cmsxIT8GetDataSetDbl(LCMSHANDLE cmsxIT8, const char* cPatch, const char* cSample, double* v);
122
 
BOOL        cdecl cmsxIT8SetDataSet(LCMSHANDLE cmsxIT8, const char* cPatch, const char* cSample, char *Val);
123
 
BOOL        cdecl cmsxIT8SetDataSetDbl(LCMSHANDLE cmsxIT8, const char* cPatch, const char* cSample, double Val);
124
 
const char *cdecl cmsxIT8GenericPatchName(int nPatch, char* buffer);
125
 
 
126
 
 
127
 
/* Patch collections (measurement lists) -------------------------------------------------- */
128
 
 
129
 
#define PATCH_HAS_Lab         0x00000001
130
 
#define PATCH_HAS_XYZ         0x00000002
131
 
#define PATCH_HAS_RGB         0x00000004
132
 
#define PATCH_HAS_CMY         0x00000008
133
 
#define PATCH_HAS_CMYK        0x00000010
134
 
#define PATCH_HAS_HEXACRM     0x00000020
135
 
#define PATCH_HAS_STD_Lab     0x00010000
136
 
#define PATCH_HAS_STD_XYZ     0x00020000
137
 
#define PATCH_HAS_XYZ_PROOF   0x00100000
138
 
#define PATCH_HAS_MEAN_DE     0x01000000
139
 
#define PATCH_HAS_STD_DE      0x02000000
140
 
#define PATCH_HAS_CHISQ       0x04000000
141
 
 
142
 
 
143
 
#define MAXPATCHNAMELEN       20
144
 
 
145
 
/* A patch in memory */
146
 
 
147
 
typedef struct
148
 
            {
149
 
 
150
 
                DWORD        dwFlags;   /* Is quite possible to have colorant in only */
151
 
                                        /* some patches of sheet, so mark each entry with */
152
 
                                        /* the values it has. */
153
 
 
154
 
                char Name[MAXPATCHNAMELEN];
155
 
 
156
 
                cmsCIELab Lab;          /* The tristimulus values of target */
157
 
                cmsCIEXYZ XYZ;
158
 
 
159
 
                cmsCIEXYZ XYZProof;     /* The absolute XYZ value returned by profile */
160
 
                                        /* (gamut constrained to device) */
161
 
 
162
 
                union {                 /* The possible colorants. Only one space is */
163
 
                                        /* allowed...obviously only one set of */
164
 
                                        /* device-dependent values per patch does make sense. */
165
 
                        double RGB[3];
166
 
                        double CMY[3];
167
 
                        double CMYK[4];
168
 
                        double Hexa[MAXCHANNELS];
169
 
 
170
 
                        } Colorant;
171
 
 
172
 
                double dEStd;               /* Standard deviation  */
173
 
                double ChiSq;               /* Chi-square parameter (mean of STD of colorants) */
174
 
                double dEMean;              /* Mean dE */
175
 
 
176
 
           } PATCH, FAR* LPPATCH;
177
 
 
178
 
 
179
 
 
180
 
/* A set of patches is simply an array of bools, TRUE if the patch */
181
 
/* belong to the set, false otherwise. */
182
 
 
183
 
typedef BOOL* SETOFPATCHES;
184
 
 
185
 
/* This struct holds whole Patches collection */
186
 
 
187
 
typedef struct _measurement
188
 
           {
189
 
 
190
 
           int          nPatches;
191
 
           LPPATCH      Patches;
192
 
           SETOFPATCHES Allowed;
193
 
 
194
 
           } MEASUREMENT,FAR *LPMEASUREMENT;
195
 
 
196
 
 
197
 
void         cdecl cmsxPCollFreeMeasurements(LPMEASUREMENT m);
198
 
SETOFPATCHES cdecl cmsxPCollBuildSet(LPMEASUREMENT m, BOOL lDefault);
199
 
 
200
 
BOOL         cdecl cmsxPCollBuildMeasurement(LPMEASUREMENT m, const char *ReferenceSheet,
201
 
                                             const char *MeasurementSheet, DWORD dwNeededSamplesType);
202
 
 
203
 
int          cdecl cmsxPCollCountSet(LPMEASUREMENT m, SETOFPATCHES Set);
204
 
BOOL         cdecl cmsxPCollValidatePatches(LPMEASUREMENT m, DWORD dwFlags);
205
 
 
206
 
BOOL         cdecl cmsxPCollLoadFromSheet(LPMEASUREMENT m, LCMSHANDLE hSheet);
207
 
BOOL         cdecl cmsxPCollSaveToSheet(LPMEASUREMENT m, LCMSHANDLE it8);
208
 
 
209
 
LPPATCH      cdecl cmsxPCollGetPatch(LPMEASUREMENT m, int n);
210
 
LPPATCH      cdecl cmsxPCollGetPatchByName(LPMEASUREMENT m, const char* Name, int* lpPos);
211
 
LPPATCH      cdecl cmsxPCollGetPatchByPos(LPMEASUREMENT m, int row, int col);
212
 
LPPATCH      cdecl cmsxPCollAddPatchRGB(LPMEASUREMENT m, const char *Name,
213
 
                                        double r, double g, double b,
214
 
                                        LPcmsCIEXYZ XYZ, LPcmsCIELab Lab);
215
 
 
216
 
void         cdecl cmsxPCollLinearizePatches(LPMEASUREMENT m, SETOFPATCHES Valids, LPGAMMATABLE Gamma[3]);
217
 
 
218
 
/* Extraction utilities */
219
 
 
220
 
/* Collect "need" patches of the specific kind, return the number of collected (that */
221
 
/* could be less if set of patches is exhausted) */
222
 
 
223
 
void         cdecl cmsxPCollPatchesGS(LPMEASUREMENT m, SETOFPATCHES Result);
224
 
 
225
 
int          cdecl cmsxPCollPatchesNearRGB(LPMEASUREMENT m, SETOFPATCHES Valids,
226
 
                                            double r, double g, double b, int need, SETOFPATCHES Result);
227
 
 
228
 
int          cdecl cmsxPCollPatchesNearNeutral(LPMEASUREMENT m, SETOFPATCHES Valids,
229
 
                                            int need, SETOFPATCHES Result);
230
 
 
231
 
int          cdecl cmsxPCollPatchesNearPrimary(LPMEASUREMENT m, SETOFPATCHES Valids,
232
 
                                           int nChannel, int need, SETOFPATCHES Result);
233
 
 
234
 
int          cdecl cmsxPCollPatchesInLabCube(LPMEASUREMENT m, SETOFPATCHES Valids, 
235
 
                                           double Lmin, double LMax, double a, double b, SETOFPATCHES Result);
236
 
 
237
 
int          cdecl cmsxPCollPatchesInGamutLUT(LPMEASUREMENT m, SETOFPATCHES Valids, 
238
 
                                              LPLUT Gamut, SETOFPATCHES Result);
239
 
 
240
 
/* Find important values */
241
 
 
242
 
LPPATCH      cdecl cmsxPCollFindWhite(LPMEASUREMENT m, SETOFPATCHES Valids, double* Distance);
243
 
LPPATCH      cdecl cmsxPCollFindBlack(LPMEASUREMENT m, SETOFPATCHES Valids, double* Distance);
244
 
LPPATCH      cdecl cmsxPCollFindPrimary(LPMEASUREMENT m, SETOFPATCHES Valids, int Channel, double* Distance);
245
 
 
246
 
/* Multiple linear regression stuff ---------------------------------------- */
247
 
 
248
 
 
249
 
/* A measurement of error */
250
 
 
251
 
typedef struct
252
 
    {
253
 
 
254
 
        double SSE;             /* The error sum of squares */
255
 
        double MSE;             /* The error mean sum of squares */
256
 
        double SSR;             /* The regression sum of squares */
257
 
        double MSR;             /* The regression mean sum of squares */
258
 
        double SSTO;            /* Total sum of squares */
259
 
        double F;               /* The Fisher-F value (MSR / MSE) */
260
 
        double R2;              /* Proportion of variability explained by the regression */
261
 
                                /* (root is Pearson correlation coefficient) */
262
 
 
263
 
        double R2adj;           /* The adjusted coefficient of multiple determination. */
264
 
                                /* R2-adjusted or R2adj. This is calculated as */
265
 
                                /* R2adj = 1 - (1-R2)(N-n-1)/(N-1) */
266
 
                                /* and used as multiple correlation coefficient */
267
 
                                /* (really, it should be square root) */
268
 
 
269
 
    } MLRSTATISTICS, FAR* LPMLRSTATISTICS;
270
 
 
271
 
 
272
 
int  cdecl cmsxRegressionCreateMatrix(LPMEASUREMENT m, SETOFPATCHES Allowed, int nterms,
273
 
                                       int ColorSpace,
274
 
                                       LPMATN* lpMat, LPMLRSTATISTICS Stat);
275
 
 
276
 
BOOL cdecl cmsxRegressionRGB2Lab(double r, double g, double b,
277
 
                                       LPMATN tfm, LPcmsCIELab Lab);
278
 
 
279
 
BOOL cdecl cmsxRegressionRGB2XYZ(double r, double g, double b,
280
 
                                       LPMATN tfm, LPcmsCIEXYZ XYZ);
281
 
 
282
 
BOOL cdecl cmsxRegressionInterpolatorRGB(LPMEASUREMENT m,
283
 
                                       int ColorSpace,
284
 
                                       int    RegressionTerms,
285
 
                                       BOOL   lUseLocalPatches,
286
 
                                       int    MinPatchesToCollect,
287
 
                                       double r, double g, double b,
288
 
                                       void* Res);
289
 
 
290
 
 
291
 
/* Levenberg-Marquardt ---------------------------------------------------------------------- */
292
 
 
293
 
LCMSHANDLE cdecl cmsxLevenbergMarquardtInit(LPSAMPLEDCURVE x, LPSAMPLEDCURVE y, double sig,
294
 
                                            double a[], int ma,
295
 
                                            void (*funcs)(double, double[], double*, double[], int));
296
 
 
297
 
double    cdecl cmsxLevenbergMarquardtAlamda(LCMSHANDLE hMRQ);
298
 
double    cdecl cmsxLevenbergMarquardtChiSq(LCMSHANDLE hMRQ);
299
 
BOOL      cdecl cmsxLevenbergMarquardtIterate(LCMSHANDLE hMRQ);
300
 
BOOL      cdecl cmsxLevenbergMarquardtFree(LCMSHANDLE hMRQ);
301
 
 
302
 
 
303
 
/* Convex hull geometric routines ------------------------------------------------------------ */
304
 
 
305
 
LCMSHANDLE cdecl cmsxHullInit(void);
306
 
void       cdecl cmsxHullDone(LCMSHANDLE hHull);
307
 
BOOL       cdecl cmsxHullAddPoint(LCMSHANDLE hHull, int x, int y, int z);
308
 
BOOL       cdecl cmsxHullComputeHull(LCMSHANDLE hHull);
309
 
char       cdecl cmsxHullCheckpoint(LCMSHANDLE hHull, int x, int y, int z);
310
 
BOOL       cdecl cmsxHullDumpVRML(LCMSHANDLE hHull, const char* fname);
311
 
 
312
 
 
313
 
/* Linearization ---------------------------------------------------------------------------- */
314
 
 
315
 
 
316
 
#define MEDIUM_REFLECTIVE_D50    0    /* Used for scanner targets */
317
 
#define MEDIUM_TRANSMISSIVE      1    /* Used for monitors & projectors */
318
 
 
319
 
void cdecl cmsxComputeLinearizationTables(LPMEASUREMENT m, int ColorSpace, 
320
 
                                    LPGAMMATABLE Lin[3], int nResultingPoints, int Medium);
321
 
 
322
 
void         cdecl cmsxCompleteLabOfPatches(LPMEASUREMENT m, SETOFPATCHES Valids, int Medium);
323
 
LPGAMMATABLE cdecl cmsxEstimateGamma(LPSAMPLEDCURVE X, LPSAMPLEDCURVE Y, int nResultingPoints);
324
 
 
325
 
void cdecl cmsxApplyLinearizationTable(double In[3], LPGAMMATABLE Gamma[3], double Out[3]);
326
 
void cdecl cmsxApplyLinearizationGamma(WORD In[3], LPGAMMATABLE Gamma[3], WORD Out[3]);
327
 
 
328
 
/* Support routines ---------------------------------------------------------------------- */
329
 
 
330
 
double cdecl _cmsxSaturate65535To255(double d);
331
 
double cdecl _cmsxSaturate255To65535(double d);
332
 
void   cdecl _cmsxClampXYZ100(LPcmsCIEXYZ xyz);
333
 
 
334
 
/* Matrix shaper profiler API ------------------------------------------------------------- */
335
 
 
336
 
 
337
 
BOOL cdecl cmsxComputeMatrixShaper(const char* ReferenceSheet,
338
 
                                   const char* MeasurementSheet,
339
 
                                   int Medium,
340
 
                                   LPGAMMATABLE TransferCurves[3],
341
 
                                   LPcmsCIEXYZ WhitePoint,
342
 
                                   LPcmsCIEXYZ BlackPoint,
343
 
                                   LPcmsCIExyYTRIPLE Primaries);
344
 
 
345
 
 
346
 
/* Common to all profilers ------------------------------------------------------------------- */
347
 
 
348
 
#define MAX_STR 256
349
 
 
350
 
typedef int (* cmsxGAUGER)(const char *Label, int nMin, int nMax, int Pos);
351
 
typedef int (* cmsxPRINTF)(const char *Frm, ...);
352
 
 
353
 
typedef struct
354
 
    {
355
 
 
356
 
           /* Files */
357
 
           char ReferenceSheet[MAX_PATH];
358
 
           char MeasurementSheet[MAX_PATH];
359
 
           char OutputProfileFile[MAX_PATH];
360
 
 
361
 
           /* Some infos            */
362
 
           char Description[MAX_STR];
363
 
           char Manufacturer[MAX_STR];
364
 
           char Model[MAX_STR];
365
 
           char Copyright[MAX_STR];
366
 
 
367
 
           /* Callbacks */
368
 
           cmsxGAUGER Gauger;
369
 
           cmsxPRINTF printf;
370
 
 
371
 
           /* EndPoints */
372
 
           cmsCIEXYZ WhitePoint;            /* Black point in 0.xxx notation */
373
 
           cmsCIEXYZ BlackPoint;            /* Black point in 0.xxx notation */
374
 
           cmsCIExyYTRIPLE Primaries;       /* The primaries */
375
 
           LPGAMMATABLE Gamma[3];           /* Gamma curves */
376
 
 
377
 
           /* Profile */
378
 
           cmsHPROFILE hProfile;            /* handle to profile */
379
 
 
380
 
           icProfileClassSignature DeviceClass;
381
 
           icColorSpaceSignature   ColorSpace;
382
 
 
383
 
           int PCSType;                    /* PT_XYZ or PT_Lab */
384
 
           int CLUTPoints;                 /* Final CLUT resolution */
385
 
           int ProfileVerbosityLevel;       /* 0=minimum, 1=additional, 2=Verbose, 3=Any suitable */
386
 
 
387
 
 
388
 
           /* Measurement */
389
 
           MEASUREMENT m;                /* Contains list of available patches */
390
 
           int Medium;
391
 
 
392
 
 
393
 
           /* RGB Gamut hull */
394
 
           LCMSHANDLE hRGBHull;   /* Contains bobbin of valid RGB values */
395
 
 
396
 
           /* CIECAM97s */
397
 
           BOOL lUseCIECAM97s;   /* Use CIECAM97s for chromatic adaptation? */
398
 
 
399
 
           cmsViewingConditions device;     /* Viewing condition of source */
400
 
           cmsViewingConditions PCS;        /* Viewing condition of PCS */
401
 
 
402
 
           LCMSHANDLE hDevice;              /* CIECAM97s models used for adaptation */
403
 
           LCMSHANDLE hPCS;                 /* and viewing conditions */
404
 
 
405
 
    } PROFILERCOMMONDATA,FAR* LPPROFILERCOMMONDATA;
406
 
 
407
 
 
408
 
/* Shared routines */
409
 
 
410
 
BOOL cdecl cmsxEmbedCharTarget(LPPROFILERCOMMONDATA hdr);
411
 
BOOL cdecl cmsxEmbedMatrixShaper(LPPROFILERCOMMONDATA hdr);
412
 
BOOL cdecl cmsxEmbedTextualInfo(LPPROFILERCOMMONDATA hdr);
413
 
 
414
 
int  cdecl cmsxFindOptimumNumOfTerms(LPPROFILERCOMMONDATA hdr, int nMaxTerms, BOOL* lAllOk);
415
 
void cdecl cmsxChromaticAdaptationAndNormalization(LPPROFILERCOMMONDATA hdr, LPcmsCIEXYZ xyz, BOOL lReverse);
416
 
void cdecl cmsxInitPCSViewingConditions(LPPROFILERCOMMONDATA hdr);
417
 
void cdecl cmsxComputeGamutHull(LPPROFILERCOMMONDATA hdr);
418
 
BOOL cdecl cmsxChoosePCS(LPPROFILERCOMMONDATA hdr);
419
 
 
420
 
/* Monitor profiler API ------------------------------------------------------------------- */
421
 
 
422
 
typedef struct
423
 
           {
424
 
 
425
 
           PROFILERCOMMONDATA hdr;
426
 
 
427
 
           LPGAMMATABLE         Prelinearization[3];    /* Canonic gamma */
428
 
           LPGAMMATABLE         ReverseTables[3];       /* Reverse (direct) gamma */
429
 
           LPGAMMATABLE         PreLab[3];
430
 
           LPGAMMATABLE         PreLabRev[3];
431
 
 
432
 
           MAT3                 PrimariesMatrix;
433
 
           MAT3                 PrimariesMatrixRev; 
434
 
 
435
 
           } MONITORPROFILERDATA,FAR* LPMONITORPROFILERDATA;
436
 
 
437
 
 
438
 
 
439
 
BOOL   cdecl cmsxMonitorProfilerInit(LPMONITORPROFILERDATA sys);
440
 
BOOL   cdecl cmsxMonitorProfilerDo(LPMONITORPROFILERDATA sys);
441
 
 
442
 
 
443
 
/* Scanner profiler API ------------------------------------------------------------------- */
444
 
 
445
 
 
446
 
typedef struct
447
 
           {
448
 
 
449
 
           PROFILERCOMMONDATA hdr;
450
 
 
451
 
           LPGAMMATABLE Prelinearization[3];
452
 
 
453
 
           LPMATN HiTerms;      /* Regression matrix of many terms */
454
 
           LPMATN LoTerms;      /* Low order regression matrix used for extrapolation */
455
 
 
456
 
           BOOL   lLocalConvergenceExtrapolation;
457
 
 
458
 
 
459
 
           } SCANNERPROFILERDATA,FAR* LPSCANNERPROFILERDATA;
460
 
 
461
 
 
462
 
BOOL   cdecl cmsxScannerProfilerInit(LPSCANNERPROFILERDATA sys);                                       
463
 
BOOL   cdecl cmsxScannerProfilerDo(LPSCANNERPROFILERDATA sys);
464
 
 
465
 
/* ----------------------------------------------------------- end of profilers */
466
 
 
467
 
 
468
 
#ifdef __cplusplus
469
 
}
470
 
#endif
471
 
 
472
 
#define __cmsprf_H
473
 
#endif