| 1 |
< |
/* Copyright (c) 1997 Regents of the University of California */ |
| 1 |
> |
/* Copyright (c) 1998 Silicon Graphics, Inc. */ |
| 2 |
|
|
| 3 |
< |
/* SCCSid "$SunId$ LBL" */ |
| 3 |
> |
/* SCCSid "$SunId$ SGI" */ |
| 4 |
|
|
| 5 |
|
/* |
| 6 |
|
* Header file for tone mapping functions. |
| 7 |
+ |
* |
| 8 |
+ |
* Include after "color.h" |
| 9 |
|
*/ |
| 8 |
– |
/* required non-system header files */ |
| 9 |
– |
#include "color.h" |
| 10 |
|
|
| 11 |
|
|
| 12 |
|
/**** Argument Macros ****/ |
| 32 |
|
#define TM_NOCHROMP (BYTE **)NULL /* indicate no chrominances */ |
| 33 |
|
#define TM_GETFILE (FILE *)NULL /* indicate file must be opened */ |
| 34 |
|
|
| 35 |
+ |
|
| 36 |
|
/**** Error Return Values ****/ |
| 37 |
|
|
| 38 |
|
#define TM_E_OK 0 /* normal return status */ |
| 59 |
|
#endif |
| 60 |
|
|
| 61 |
|
extern char *tmErrorMessage[]; /* error messages */ |
| 62 |
+ |
extern int tmLastError; /* last error incurred by library */ |
| 63 |
+ |
extern char *tmLastFunction; /* error-generating function name */ |
| 64 |
|
|
| 65 |
|
typedef short TMbright; /* encoded luminance type */ |
| 66 |
|
|
| 74 |
|
RGBPRIMP inppri; /* current input primaries */ |
| 75 |
|
double inpsf; /* current input scalefactor */ |
| 76 |
|
COLORMAT cmat; /* color conversion matrix */ |
| 77 |
< |
TMbright brmin, brmax; /* input brightness limits */ |
| 77 |
> |
TMbright hbrmin, hbrmax; /* histogram brightness limits */ |
| 78 |
|
int *histo; /* input histogram */ |
| 79 |
+ |
TMbright mbrmin, mbrmax; /* mapped brightness limits */ |
| 80 |
|
unsigned short *lumap; /* computed luminance map */ |
| 81 |
|
struct tmStruct *tmprev; /* previous tone mapping */ |
| 82 |
|
MEM_PTR pd[TM_MAXPKG]; /* pointers to private data */ |
| 199 |
|
extern int |
| 200 |
|
tmComputeMapping(double gamval, double Lddyn, double Ldmax); |
| 201 |
|
/* |
| 202 |
< |
Compute tone mapping function. |
| 202 |
> |
Compute tone mapping function. This mapping will be used |
| 203 |
> |
in subsequent calls to tmMapPixels() until a new tone mapping |
| 204 |
> |
is computed. I.e., calls to tmAddHisto() have no immediate effect. |
| 205 |
|
|
| 206 |
|
gamval - display gamma response (0. for default). |
| 207 |
|
Lddyn - the display's dynamic range (0. for default). |