1 |
< |
/* Copyright (c) 1996 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1997 Regents of the University of California */ |
2 |
|
|
3 |
|
/* SCCSid "$SunId$ LBL" */ |
4 |
|
|
18 |
|
#define SWNORM 2.26 /* scotopic/photopic ratio for white */ |
19 |
|
#define WHTSEFFICACY (SWNORM*WHTEFFICACY) |
20 |
|
|
21 |
+ |
#define BotMesopic 5.62e-3 /* top of scotopic range */ |
22 |
+ |
#define TopMesopic 5.62 /* bottom of photopic range */ |
23 |
+ |
|
24 |
|
#define FOVDIA (1.0*PI/180.) /* foveal diameter (radians) */ |
25 |
|
|
26 |
|
#define HISTRES 100 /* histogram resolution */ |
34 |
|
#define Lb1(Bw) exp(Bw) /* first derivative of Lb(Bw) */ |
35 |
|
|
36 |
|
/* Flags of what to do */ |
37 |
< |
#define DO_ACUITY 01 |
37 |
> |
#define DO_ACUITY 01 |
38 |
|
#define DO_VEIL 02 |
39 |
|
#define DO_HSENS 04 |
40 |
|
#define DO_COLOR 010 |
41 |
|
#define DO_CWEIGHT 020 |
42 |
< |
#define DO_LINEAR 040 |
42 |
> |
#define DO_FIXHIST 040 |
43 |
> |
#define DO_LINEAR 0100 |
44 |
|
|
45 |
|
#define DO_HUMAN (DO_ACUITY|DO_VEIL|DO_HSENS|DO_COLOR) |
46 |
|
|
66 |
|
|
67 |
|
#define fovscan(y) (fovimg+(y)*fvxr) |
68 |
|
|
69 |
< |
extern int bwhist[HISTRES]; /* luminance histogram */ |
70 |
< |
extern long histot; /* total count of histogram */ |
69 |
> |
extern double fixfrac; /* histogram share due to fixations */ |
70 |
> |
extern short (*fixlst)[2]; /* fixation history list */ |
71 |
> |
extern int nfixations; /* number of fixation points */ |
72 |
> |
|
73 |
> |
extern float bwhist[HISTRES]; /* luminance histogram */ |
74 |
> |
extern double histot; /* total count of histogram */ |
75 |
|
extern double bwmin, bwmax; /* histogram limits */ |
76 |
|
extern double bwavg; /* mean brightness */ |
77 |
|
|
78 |
< |
#define lwhc(L) bwhc(Bl(L)) |
71 |
< |
#define bwhc(B) bwhist[(int)(HISTRES*((B)-bwmin)/(bwmax-bwmin))] |
78 |
> |
#define bwhi(B) (int)(HISTRES*((B)-bwmin)/(bwmax-bwmin)) |
79 |
|
|
80 |
|
extern RGBPRIMP inprims; /* input primaries */ |
81 |
|
extern COLORMAT inrgb2xyz; /* convert input RGB to XYZ */ |
89 |
|
extern RESOLU inpres; /* input picture resolution */ |
90 |
|
|
91 |
|
extern char *mbcalfile; /* macbethcal mapping file */ |
92 |
< |
|
86 |
< |
struct mbc { /* data structure for macbethcal conditioning */ |
87 |
< |
float xa[3][6], ya[3][6]; |
88 |
< |
COLORMAT cmat; |
89 |
< |
}; |
92 |
> |
extern char *cwarpfile; /* color warp mapping file */ |
93 |
|
|
94 |
|
extern double hacuity(); /* human acuity func. (cycles/deg.) */ |
95 |
|
extern double htcontrs(); /* human contrast sens. func. */ |