66 |
|
#endif |
67 |
|
|
68 |
|
extern char *tmErrorMessage[]; /* error messages */ |
69 |
– |
extern int tmLastError; /* last error incurred by library */ |
70 |
– |
extern char *tmLastFunction; /* error-generating function name */ |
69 |
|
|
70 |
|
typedef short TMbright; /* encoded luminance type */ |
71 |
|
|
78 |
|
int cdiv[3]; /* computed color divisors */ |
79 |
|
RGBPRIMP inppri; /* current input primaries */ |
80 |
|
double inpsf; /* current input scalefactor */ |
81 |
+ |
MEM_PTR inpdat; /* current input client data */ |
82 |
|
COLORMAT cmat; /* color conversion matrix */ |
83 |
|
TMbright hbrmin, hbrmax; /* histogram brightness limits */ |
84 |
|
int *histo; /* input histogram */ |
85 |
|
TMbright mbrmin, mbrmax; /* mapped brightness limits */ |
86 |
|
unsigned short *lumap; /* computed luminance map */ |
87 |
|
MEM_PTR pd[TM_MAXPKG]; /* pointers to private data */ |
88 |
+ |
int lastError; /* last error incurred */ |
89 |
+ |
const char *lastFunc; /* error-generating function name */ |
90 |
|
} TMstruct; |
91 |
|
|
92 |
|
/* conversion package functions */ |
132 |
|
*/ |
133 |
|
|
134 |
|
extern int |
135 |
< |
tmSetSpace(TMstruct *tms, RGBPRIMP pri, double sf); |
135 |
> |
tmSetSpace(TMstruct *tms, RGBPRIMP pri, double sf, MEM_PTR dat); |
136 |
|
/* |
137 |
|
Set color primaries and scale factor for incoming scanlines. |
138 |
|
|
139 |
|
tms - tone mapping structure pointer. |
140 |
|
pri - RGB color input primaries (Note 1). |
141 |
|
sf - scale factor to get to luminance in cd/m^2. |
142 |
+ |
dat - application-specific data (NULL if not needed) |
143 |
|
|
144 |
|
returns - 0 on success, TM_E_* code on failure. |
145 |
|
*/ |
177 |
|
tms - tone mapping structure pointer. |
178 |
|
expmult - the fixed exposure multiplier to use. |
179 |
|
gamval - display gamma response (0. for default). |
180 |
+ |
|
181 |
|
returns - 0 on success, TM_E_* on error. |
182 |
|
*/ |
183 |
|
|
217 |
|
Duplicate the given tone mapping into a new struct. |
218 |
|
|
219 |
|
orig - tone mapping structure to duplicate. |
220 |
+ |
|
221 |
|
returns - pointer to new struct, or NULL on error. |
222 |
|
*/ |
223 |
|
|