ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/pcond.h
(Generate patch)

Comparing ray/src/px/pcond.h (file contents):
Revision 3.4 by greg, Thu Jan 9 13:56:26 1997 UTC vs.
Revision 3.10 by greg, Sat Feb 22 02:07:27 2003 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1996 Regents of the University of California */
2 <
3 < /* SCCSid "$SunId$ LBL" */
4 <
1 > /* RCSid: $Id$ */
2   /*
3   * Header file for picture file conditioning.
4   */
# Line 12 | Line 9
9  
10   #include "view.h"
11  
15 #include "resolu.h"
12  
13 + #ifndef ADJ_VEIL
14 + #define ADJ_VEIL        0               /* adjust veil to preserve contrast? */
15 + #endif
16  
17   #define SWNORM          2.26            /* scotopic/photopic ratio for white */
18   #define WHTSEFFICACY    (SWNORM*WHTEFFICACY)
# Line 21 | Line 20
20   #define BotMesopic      5.62e-3         /* top of scotopic range */
21   #define TopMesopic      5.62            /* bottom of photopic range */
22  
23 < #define FOVDIA          (1.0*PI/180.)   /* foveal diameter (radians) */
23 > #define FOVDIA          (1.0*PI/180.0)  /* foveal diameter (radians) */
24  
25   #define HISTRES         100             /* histogram resolution */
26 + #define MAXPREHIST      1024            /* maximum precomputed histogram */
27  
28 < #define LMIN            1e-4            /* minimum visible world luminance */
28 > #define LMIN            1e-7            /* minimum visible world luminance */
29   #define LMAX            1e5             /* maximum visible world luminance */
30  
31   #define Bl(Lw)          log(Lw)         /* brightness function */
# Line 39 | Line 39
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_PREHIST      0100
44 > #define DO_LINEAR       0200
45  
46   #define DO_HUMAN        (DO_ACUITY|DO_VEIL|DO_HSENS|DO_COLOR)
47  
48   extern int      what2do;                /* desired adjustments */
49  
50   extern double   ldmax;                  /* maximum output luminance */
51 < extern double   ldmin;                  /* minimum output luminance */
52 < extern double   Bldmin, Bldmax;         /* Bl(ldmin) and Bl(ldmax) */
51 > extern double   lddyn;                  /* display dynamic range */
52 > extern double   Bldmin, Bldmax;         /* Bl(ldmax/lddyn) and Bl(ldmax) */
53  
54   extern char     *progname;              /* global argv[0] */
55  
# Line 60 | Line 62 | extern double  inpexp;                 /* input exposure value */
62   #define plum(clr)       ((*lumf)(clr,0)/inpexp)
63   #define slum(clr)       ((*lumf)(clr,1)/inpexp)
64  
65 + #define ldmin           (ldmax/lddyn)
66 +
67   extern COLOR    *fovimg;                /* foveal (1 degree) averaged image */
68 < extern short    fvxr, fvyr;             /* foveal image resolution */
68 > extern int      fvxr, fvyr;             /* foveal image resolution */
69 > extern float    *crfimg;                /* contrast reduction factors */
70  
71   #define fovscan(y)      (fovimg+(y)*fvxr)
72 + #define crfscan(y)      (crfimg+(y)*fvxr)
73  
74 < extern float    bwhist[HISTRES];        /* luminance histogram */
74 > extern double   fixfrac;                /* histogram share due to fixations */
75 > extern short    (*fixlst)[2];           /* fixation history list */
76 > extern int      nfixations;             /* number of fixation points */
77 >
78 > extern double   bwhist[HISTRES];        /* luminance histogram */
79   extern double   histot;                 /* total count of histogram */
80   extern double   bwmin, bwmax;           /* histogram limits */
81   extern double   bwavg;                  /* mean brightness */
# Line 84 | Line 94 | extern double  pixaspect;              /* pixel aspect ratio */
94   extern RESOLU   inpres;                 /* input picture resolution */
95  
96   extern char     *mbcalfile;             /* macbethcal mapping file */
97 + extern char     *cwarpfile;             /* color warp mapping file */
98  
99   extern double   hacuity();              /* human acuity func. (cycles/deg.) */
100   extern double   htcontrs();             /* human contrast sens. func. */
101 + extern double   clampf();               /* histogram clamping function */
102 + extern double   crfactor();             /* contrast reduction factor */
103  
104   extern COLOR    *firstscan();           /* first processed scanline */
105   extern COLOR    *nextscan();            /* next processed scanline */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines