4 |
|
* |
5 |
|
* Include after "color.h" |
6 |
|
*/ |
7 |
+ |
#ifndef _RAD_TONEMAP_H_ |
8 |
+ |
#define _RAD_TONEMAP_H_ |
9 |
|
|
10 |
< |
#include "copyright.h" |
10 |
> |
#include "tifftypes.h" |
11 |
|
|
12 |
|
#ifdef __cplusplus |
13 |
|
extern "C" { |
90 |
|
} *tmTop; /* current tone mapping stack */ |
91 |
|
|
92 |
|
/* conversion package functions */ |
91 |
– |
#ifdef NOPROTO |
93 |
|
struct tmPackage { |
93 |
– |
MEM_PTR (*Init)(); /* initialize private data */ |
94 |
– |
void (*NewSpace)(); /* new input color space (optional) */ |
95 |
– |
void (*Free)(); /* free private data */ |
96 |
– |
}; |
97 |
– |
#else |
98 |
– |
struct tmPackage { |
94 |
|
MEM_PTR (*Init)(struct tmStruct *tms); |
95 |
|
void (*NewSpace)(struct tmStruct *tms); |
96 |
|
void (*Free)(MEM_PTR pp); |
97 |
|
}; |
103 |
– |
#endif |
98 |
|
/* our list of conversion packages */ |
99 |
|
extern struct tmPackage *tmPkg[TM_MAXPKG]; |
100 |
|
extern int tmNumPkgs; /* number of registered packages */ |
118 |
|
|
119 |
|
/**** Library Function Calls ****/ |
120 |
|
|
127 |
– |
#ifdef NOPROTO |
121 |
|
|
129 |
– |
extern struct tmStruct *tmInit(), *tmPop(), *tmDup(); |
130 |
– |
extern int tmSetSpace(), tmPull(), tmPush(); |
131 |
– |
extern void tmClearHisto(), tmDone(); |
132 |
– |
extern int tmAddHisto(); |
133 |
– |
extern int tmFixedMapping(), tmComputeMapping(), tmMapPixels(); |
134 |
– |
extern int tmCvColors(), tmCvGrays(), tmCvColrs(); |
135 |
– |
extern int tmLoadPicture(), tmMapPicture(); |
136 |
– |
|
137 |
– |
#else |
138 |
– |
|
122 |
|
extern struct tmStruct * |
123 |
|
tmInit(int flags, RGBPRIMP monpri, double gamval); |
124 |
|
/* |
332 |
|
returns - 0 on success, TM_E_* on failure. |
333 |
|
*/ |
334 |
|
|
335 |
< |
#endif |
335 |
> |
extern int |
336 |
> |
tmCvRGB48(TMbright *ls, BYTE *cs, uint16 (*scan)[3], int len, double gv); |
337 |
> |
/* |
338 |
> |
Convert 48-bit RGB scanline to encoded luminance and chrominance. |
339 |
|
|
340 |
+ |
ls - returned encoded luminance values. |
341 |
+ |
cs - returned encoded chrominance values (Note 2). |
342 |
+ |
scan - input scanline. |
343 |
+ |
len - scanline length. |
344 |
+ |
gv - input gamma value. |
345 |
|
|
346 |
+ |
returns - 0 on success, TM_E_* on error. |
347 |
+ |
*/ |
348 |
+ |
|
349 |
+ |
extern int |
350 |
+ |
tmCvGray16(TMbright *ls, uint16 *scan, int len, double gv); |
351 |
+ |
/* |
352 |
+ |
Convert 16-bit gray scanline to encoded luminance. |
353 |
+ |
|
354 |
+ |
ls - returned encoded luminance values. |
355 |
+ |
scan - input scanline. |
356 |
+ |
len - scanline length. |
357 |
+ |
gv - input gamma value. |
358 |
+ |
|
359 |
+ |
returns - 0 on success, TM_E_* on error. |
360 |
+ |
*/ |
361 |
+ |
|
362 |
|
/**** Notes ****/ |
363 |
|
/* |
364 |
|
General: |
433 |
|
#ifdef __cplusplus |
434 |
|
} |
435 |
|
#endif |
436 |
+ |
#endif /* _RAD_TONEMAP_H_ */ |
437 |
+ |
|