| 29 |
|
#define MAXPREHIST 1024 /* maximum precomputed histogram */ |
| 30 |
|
|
| 31 |
|
#define LMIN 1e-7 /* minimum visible world luminance */ |
| 32 |
< |
#define LMAX 1e5 /* maximum visible world luminance */ |
| 32 |
> |
#define LMAX 1e7 /* maximum visible world luminance */ |
| 33 |
|
|
| 34 |
|
#define Bl(Lw) log(Lw) /* brightness function */ |
| 35 |
|
#define Bl1(Lw) (1.0/(Lw)) /* first derivative of Bl(Lw) */ |
| 58 |
|
|
| 59 |
|
extern char *infn; /* input file name */ |
| 60 |
|
extern FILE *infp; /* input stream */ |
| 61 |
– |
extern double rgblum(), cielum(); /* luminance functions */ |
| 61 |
|
extern double (*lumf)(); /* input luminance function */ |
| 62 |
|
extern double inpexp; /* input exposure value */ |
| 63 |
|
|
| 98 |
|
extern char *mbcalfile; /* macbethcal mapping file */ |
| 99 |
|
extern char *cwarpfile; /* color warp mapping file */ |
| 100 |
|
|
| 102 |
– |
extern double hacuity(); /* human acuity func. (cycles/deg.) */ |
| 103 |
– |
extern double htcontrs(); /* human contrast sens. func. */ |
| 104 |
– |
extern double clampf(); /* histogram clamping function */ |
| 105 |
– |
extern double crfactor(); /* contrast reduction factor */ |
| 101 |
|
|
| 102 |
< |
extern COLOR *firstscan(); /* first processed scanline */ |
| 103 |
< |
extern COLOR *nextscan(); /* next processed scanline */ |
| 102 |
> |
|
| 103 |
> |
/* defined in pcond.c */ |
| 104 |
> |
extern void syserror(char *s); |
| 105 |
> |
|
| 106 |
> |
/* defined in pcond2.c */ |
| 107 |
> |
extern double rgblum(COLOR clr, int scotopic); /* compute (scotopic) luminance of RGB color */ |
| 108 |
> |
extern double cielum(COLOR xyz, int scotopic); /* compute (scotopic) luminance of CIE color */ |
| 109 |
> |
extern COLOR *nextscan(void); /* next processed scanline */ |
| 110 |
> |
extern COLOR *firstscan(void); /* first processed scanline */ |
| 111 |
> |
|
| 112 |
> |
/* defined in pcond3.c */ |
| 113 |
> |
extern void getfixations(FILE *fp); /* load fixation history list */ |
| 114 |
> |
extern void gethisto(FILE *fp); /* load precomputed luminance histogram */ |
| 115 |
> |
extern void comphist(void); /* create foveal sampling histogram */ |
| 116 |
> |
extern double htcontrs(double La); /* human contrast sens. func. */ |
| 117 |
> |
extern double clampf(double La); /* histogram clamping function */ |
| 118 |
> |
extern double crfactor(double La); /* contrast reduction factor */ |
| 119 |
> |
extern int mkbrmap(void); /* make dynamic range map */ |
| 120 |
> |
extern void putmapping(FILE *fp); /* put out mapping function */ |
| 121 |
> |
extern void scotscan(COLOR *scan, int xres); /* apply scotopic color sensitivity loss */ |
| 122 |
> |
extern void mapscan(COLOR *scan, int xres); /* apply tone mapping operator to scanline */ |
| 123 |
> |
|
| 124 |
> |
/* defined in pcond4.c */ |
| 125 |
> |
extern void compveil(void); /* compute veiling image */ |
| 126 |
> |
#if ADJ_VEIL |
| 127 |
> |
extern void adjveil(void); /* adjust veil image */ |
| 128 |
> |
#endif |
| 129 |
> |
extern void acuscan(COLOR *scln, int y); /* get acuity-sampled scanline */ |
| 130 |
> |
extern void addveil(COLOR *sl, int y); /* add veil to scanline */ |
| 131 |
> |
extern void initacuity(void); /* initialize variable acuity sampling */ |
| 132 |
> |
extern double hacuity(double La); /* human acuity func. (cycles/deg.) */ |
| 133 |
|
|
| 134 |
|
#ifdef __cplusplus |
| 135 |
|
} |