--- ray/src/px/pcond.h 1996/10/11 10:46:59 3.3 +++ ray/src/px/pcond.h 1998/03/12 15:47:33 3.9 @@ -1,6 +1,6 @@ -/* Copyright (c) 1996 Regents of the University of California */ +/* Copyright (c) 1998 Silicon Graphics, Inc. */ -/* SCCSid "$SunId$ LBL" */ +/* SCCSid "$SunId$ SGI" */ /* * Header file for picture file conditioning. @@ -24,8 +24,9 @@ #define FOVDIA (1.0*PI/180.) /* foveal diameter (radians) */ #define HISTRES 100 /* histogram resolution */ +#define MAXPREHIST 1024 /* maximum precomputed histogram */ -#define LMIN 1e-4 /* minimum visible world luminance */ +#define LMIN 1e-7 /* minimum visible world luminance */ #define LMAX 1e5 /* maximum visible world luminance */ #define Bl(Lw) log(Lw) /* brightness function */ @@ -39,15 +40,17 @@ #define DO_HSENS 04 #define DO_COLOR 010 #define DO_CWEIGHT 020 -#define DO_LINEAR 040 +#define DO_FIXHIST 040 +#define DO_PREHIST 0100 +#define DO_LINEAR 0200 #define DO_HUMAN (DO_ACUITY|DO_VEIL|DO_HSENS|DO_COLOR) extern int what2do; /* desired adjustments */ extern double ldmax; /* maximum output luminance */ -extern double ldmin; /* minimum output luminance */ -extern double Bldmin, Bldmax; /* Bl(ldmin) and Bl(ldmax) */ +extern double lddyn; /* display dynamic range */ +extern double Bldmin, Bldmax; /* Bl(ldmax/lddyn) and Bl(ldmax) */ extern char *progname; /* global argv[0] */ @@ -60,17 +63,23 @@ extern double inpexp; /* input exposure value */ #define plum(clr) ((*lumf)(clr,0)/inpexp) #define slum(clr) ((*lumf)(clr,1)/inpexp) +#define ldmin (ldmax/lddyn) + extern COLOR *fovimg; /* foveal (1 degree) averaged image */ extern short fvxr, fvyr; /* foveal image resolution */ #define fovscan(y) (fovimg+(y)*fvxr) -extern int bwhist[HISTRES]; /* luminance histogram */ -extern long histot; /* total count of histogram */ +extern double fixfrac; /* histogram share due to fixations */ +extern short (*fixlst)[2]; /* fixation history list */ +extern int nfixations; /* number of fixation points */ + +extern float bwhist[HISTRES]; /* luminance histogram */ +extern double histot; /* total count of histogram */ extern double bwmin, bwmax; /* histogram limits */ extern double bwavg; /* mean brightness */ -#define bwhc(B) bwhist[(int)(HISTRES*((B)-bwmin)/(bwmax-bwmin))] +#define bwhi(B) (int)(HISTRES*((B)-bwmin)/(bwmax-bwmin)) extern RGBPRIMP inprims; /* input primaries */ extern COLORMAT inrgb2xyz; /* convert input RGB to XYZ */ @@ -84,6 +93,7 @@ extern double pixaspect; /* pixel aspect ratio */ extern RESOLU inpres; /* input picture resolution */ extern char *mbcalfile; /* macbethcal mapping file */ +extern char *cwarpfile; /* color warp mapping file */ extern double hacuity(); /* human acuity func. (cycles/deg.) */ extern double htcontrs(); /* human contrast sens. func. */