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

Comparing ray/src/common/color.h (file contents):
Revision 1.7 by greg, Fri Dec 14 12:48:30 1990 UTC vs.
Revision 1.14 by greg, Thu Oct 24 12:15:07 1991 UTC

# Line 48 | Line 48 | typedef float  COLOR[3];       /* red, green, blue */
48   #define  normbright(c)          (int)((67L*(c)[RED]+168L*(c)[GRN]+21L*(c)[BLU])/256)
49   #endif
50  
51 +                                /* luminous efficacies over visible spectrum */
52 + #define  MAXEFFICACY            683.            /* defined maximum at 550 nm */
53 + #define  WHTEFFICACY            179.            /* uniform white light */
54 + #define  D65EFFICACY            203.            /* standard illuminant D65 */
55 + #define  INCEFFICACY            160.            /* illuminant A (incand.) */
56 + #define  SUNEFFICACY            208.            /* illuminant B (solar dir.) */
57 + #define  SKYEFFICACY            D65EFFICACY     /* skylight */
58 + #define  DAYEFFICACY            D65EFFICACY     /* combined sky and solar */
59 +
60 + #define  luminance(col)         (WHTEFFICACY * bright(col))
61 +
62   #define  intens(col)            ( (col)[0] > (col)[1] \
63                                  ? (col)[0] > (col)[2] ? (col)[0] : (col)[2] \
64                                  : (col)[1] > (col)[2] ? (col)[1] : (col)[2] )
# Line 66 | Line 77 | typedef float  COLOR[3];       /* red, green, blue */
77   #define  YDECR                  2
78   #define  YMAJOR                 4
79  
80 +                                /* picture format identifier */
81 + #define  COLRFMT                "32-bit_rle_rgbe"
82 +
83                                  /* macros for exposures */
84   #define  EXPOSSTR               "EXPOSURE="
85 < #define  EXPOSSTRL              9
86 < #define  isexpos(hl)            (!strncmp(hl,EXPOSSTR,EXPOSSTRL))
87 < #define  exposval(hl)           atof((hl)+EXPOSSTRL)
85 > #define  LEXPOSSTR              9
86 > #define  isexpos(hl)            (!strncmp(hl,EXPOSSTR,LEXPOSSTR))
87 > #define  exposval(hl)           atof((hl)+LEXPOSSTR)
88   #define  fputexpos(ex,fp)       fprintf(fp,"%s%e\n",EXPOSSTR,ex)
89  
90                                  /* macros for pixel aspect ratios */
91   #define  ASPECTSTR              "PIXASPECT="
92 < #define  ASPECTSTRL             10
93 < #define  isaspect(hl)           (!strncmp(hl,ASPECTSTR,ASPECTSTRL))
94 < #define  aspectval(hl)          atof((hl)+ASPECTSTRL)
92 > #define  LASPECTSTR             10
93 > #define  isaspect(hl)           (!strncmp(hl,ASPECTSTR,LASPECTSTR))
94 > #define  aspectval(hl)          atof((hl)+LASPECTSTR)
95   #define  fputaspect(pa,fp)      fprintf(fp,"%s%f\n",ASPECTSTR,pa)
96 +
97 +                                /* macros for color correction */
98 + #define  COLCORSTR              "COLORCORR="
99 + #define  LCOLCORSTR             10
100 + #define  iscolcor(hl)           (!strncmp(hl,COLCORSTR,LCOLCORSTR))
101 + #define  colcorval(cc,hl)       sscanf(hl+LCOLCORSTR,"%f %f %f", \
102 +                                        &(cc)[RED],&(cc)[GRN],&(cc)[BLU])
103 + #define  fputcolcor(cc,fp)      fprintf(fp,"%s %f %f %f\n",COLCORSTR, \
104 +                                        (cc)[RED],(cc)[GRN],(cc)[BLU])
105  
106   extern double  ldexp(), atof();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines