| 32 |
|
|
| 33 |
|
/* special pointer values */ |
| 34 |
|
#define TM_XYZPRIM (RGBPRIMP)NULL /* indicate XYZ primaries (Note 1) */ |
| 35 |
< |
#define TM_NOCHROM (BYTE *)NULL /* indicate no chrominance */ |
| 36 |
< |
#define TM_NOCHROMP (BYTE **)NULL /* indicate no chrominances */ |
| 35 |
> |
#define TM_NOCHROM (uby8 *)NULL /* indicate no chrominance */ |
| 36 |
> |
#define TM_NOCHROMP (uby8 **)NULL /* indicate no chrominances */ |
| 37 |
|
#define TM_GETFILE (FILE *)NULL /* indicate file must be opened */ |
| 38 |
|
|
| 39 |
|
|
| 51 |
|
|
| 52 |
|
/**** Conversion Constants and Table Sizes ****/ |
| 53 |
|
|
| 54 |
< |
#define TM_BRTSCALE 128 /* brightness scale factor (integer) */ |
| 54 |
> |
#define TM_BRTSCALE 256 /* brightness scale factor (integer) */ |
| 55 |
|
|
| 56 |
|
#define TM_NOBRT (-1<<15) /* bogus brightness value */ |
| 57 |
|
#define TM_NOLUM (1e-17) /* ridiculously small luminance */ |
| 215 |
|
*/ |
| 216 |
|
|
| 217 |
|
extern int |
| 218 |
< |
tmMapPixels(TMstruct *tms, BYTE *ps, TMbright *ls, BYTE *cs, int len); |
| 218 |
> |
tmMapPixels(TMstruct *tms, uby8 *ps, TMbright *ls, uby8 *cs, int len); |
| 219 |
|
/* |
| 220 |
|
Apply tone mapping function to pixel values. |
| 221 |
|
|
| 260 |
|
*/ |
| 261 |
|
|
| 262 |
|
extern int |
| 263 |
< |
tmCvColors(TMstruct *tms, TMbright *ls, BYTE *cs, COLOR *scan, int len); |
| 263 |
> |
tmCvColors(TMstruct *tms, TMbright *ls, uby8 *cs, COLOR *scan, int len); |
| 264 |
|
/* |
| 265 |
|
Convert RGB/XYZ float scanline to encoded luminance and chrominance. |
| 266 |
|
|
| 274 |
|
*/ |
| 275 |
|
|
| 276 |
|
extern int |
| 277 |
< |
tmCvColrs(TMstruct *tms, TMbright *ls, BYTE *cs, COLR *scan, int len); |
| 277 |
> |
tmCvColrs(TMstruct *tms, TMbright *ls, uby8 *cs, COLR *scan, int len); |
| 278 |
|
/* |
| 279 |
|
Convert RGBE/XYZE scanline to encoded luminance and chrominance. |
| 280 |
|
|
| 288 |
|
*/ |
| 289 |
|
|
| 290 |
|
extern int |
| 291 |
< |
tmLoadPicture(TMstruct *tms, TMbright **lpp, BYTE **cpp, int *xp, int *yp, |
| 291 |
> |
tmLoadPicture(TMstruct *tms, TMbright **lpp, uby8 **cpp, int *xp, int *yp, |
| 292 |
|
char *fname, FILE *fp); |
| 293 |
|
/* |
| 294 |
|
Load Radiance picture and convert to tone mapping representation. |
| 307 |
|
*/ |
| 308 |
|
|
| 309 |
|
extern int |
| 310 |
< |
tmMapPicture(BYTE **psp, int *xp, int *yp, int flags, |
| 310 |
> |
tmMapPicture(uby8 **psp, int *xp, int *yp, int flags, |
| 311 |
|
RGBPRIMP monpri, double gamval, double Lddyn, double Ldmax, |
| 312 |
|
char *fname, FILE *fp); |
| 313 |
|
/* |
| 332 |
|
*/ |
| 333 |
|
|
| 334 |
|
extern int |
| 335 |
< |
tmCvRGB48(TMstruct *tms, TMbright *ls, BYTE *cs, uint16 (*scan)[3], |
| 335 |
> |
tmCvRGB48(TMstruct *tms, TMbright *ls, uby8 *cs, uint16 (*scan)[3], |
| 336 |
|
int len, double gv); |
| 337 |
|
/* |
| 338 |
|
Convert 48-bit RGB scanline to encoded luminance and chrominance. |