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.9 by greg, Mon Mar 18 09:32:49 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 + #define  luminance(col)         (683.0 * bright(col))
52 +
53   #define  intens(col)            ( (col)[0] > (col)[1] \
54                                  ? (col)[0] > (col)[2] ? (col)[0] : (col)[2] \
55                                  : (col)[1] > (col)[2] ? (col)[1] : (col)[2] )
# Line 79 | Line 81 | typedef float  COLOR[3];       /* red, green, blue */
81   #define  isaspect(hl)           (!strncmp(hl,ASPECTSTR,ASPECTSTRL))
82   #define  aspectval(hl)          atof((hl)+ASPECTSTRL)
83   #define  fputaspect(pa,fp)      fprintf(fp,"%s%f\n",ASPECTSTR,pa)
84 +
85 +                                /* macros for color correction */
86 + #define  COLCORSTR              "COLORCORR="
87 + #define  COLCORSTRL             10
88 + #define  iscolcor(hl)           (!strncmp(hl,COLCORSTR,COLCORSTRL))
89 + #define  colcorval(cc,hl)       sscanf(hl+COLCORSTRL,"%f %f %f", \
90 +                                        &(cc)[RED],&(cc)[GRN],&(cc)[BLU])
91 + #define  fputcolcor(cc,fp)      fprintf(fp,"%s %f %f %f\n",COLCORSTR, \
92 +                                        (cc)[RED],(cc)[GRN],(cc)[BLU])
93  
94   extern double  ldexp(), atof();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines