| 18 |
|
#define TM_F_CWEIGHT 040 /* center weighting */ |
| 19 |
|
#define TM_F_FOVEAL 0100 /* use foveal sample size */ |
| 20 |
|
#define TM_F_BW 0200 /* luminance only */ |
| 21 |
< |
#define TM_F_NOERRS 0400 /* don't report errors to stderr */ |
| 21 |
> |
#define TM_F_NOSTDERR 0400 /* don't report errors to stderr */ |
| 22 |
|
/* combined modes */ |
| 23 |
|
#define TM_F_CAMERA 0 |
| 24 |
|
#define TM_F_HUMAN (TM_F_HCONTR|TM_F_MESOPIC|TM_F_VEIL|\ |
| 78 |
|
|
| 79 |
|
#ifdef NOPROTO |
| 80 |
|
|
| 81 |
< |
extern struct tmStruct *tmInit(), *tmPop(); |
| 81 |
> |
extern struct tmStruct *tmInit(), *tmPop(), *tmDup(); |
| 82 |
|
extern void tmClearHisto(), tmDone(); |
| 83 |
|
extern int tmSetSpace(), tmCvColors(), tmCvColrs(); |
| 84 |
|
extern int tmAddHisto(), tmComputeMapping(), tmMapPixels(); |
| 183 |
|
char *fname, FILE *fp); |
| 184 |
|
/* |
| 185 |
|
Load Radiance picture and convert to tone mapping representation. |
| 186 |
+ |
Calls tmSetSpace() to calibrate input color space. |
| 187 |
|
|
| 188 |
|
lpp - returned array of encoded luminances, English ordering. |
| 189 |
|
cpp - returned array of encoded chrominances (Note 2). |
| 246 |
|
returns - 0 on success, TM_E_* if tms is invalid. |
| 247 |
|
*/ |
| 248 |
|
|
| 249 |
+ |
extern struct tmStruct * |
| 250 |
+ |
tmDup(void); |
| 251 |
+ |
/* |
| 252 |
+ |
Duplicate the current tone mapping into a new structure on the stack. |
| 253 |
+ |
|
| 254 |
+ |
returns - pointer to new top, or NULL on error. |
| 255 |
+ |
*/ |
| 256 |
+ |
|
| 257 |
|
extern void |
| 258 |
|
tmDone(struct tmStruct *tms); |
| 259 |
|
/* |
| 289 |
|
used during final mapping, setting the cs parameter to TM_NOCHROM |
| 290 |
|
on the first pass will save time.) Another memory saving option |
| 291 |
|
if third and subsequent passes are not needed is to use the |
| 292 |
< |
same array to store the mapped pixels as is used to store |
| 292 |
> |
same array to store the mapped pixels as used to store |
| 293 |
|
the encoded chroma values. This way, only two extra bytes |
| 294 |
|
for storing encoded luminances are required per pixel. This |
| 295 |
|
is the method employed by tmMapPicture(), for example. |