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