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.13 by greg, Thu Oct 24 10:29:03 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  D65EFFICACY            203.            /* luminous efficacy of D65 */
52 + #define  luminance(col)         (D65EFFICACY * bright(col))
53 +
54   #define  intens(col)            ( (col)[0] > (col)[1] \
55                                  ? (col)[0] > (col)[2] ? (col)[0] : (col)[2] \
56                                  : (col)[1] > (col)[2] ? (col)[1] : (col)[2] )
# Line 66 | Line 69 | typedef float  COLOR[3];       /* red, green, blue */
69   #define  YDECR                  2
70   #define  YMAJOR                 4
71  
72 +                                /* picture format identifier */
73 + #define  COLRFMT                "32-bit_rle_rgbe"
74 +
75                                  /* macros for exposures */
76   #define  EXPOSSTR               "EXPOSURE="
77 < #define  EXPOSSTRL              9
78 < #define  isexpos(hl)            (!strncmp(hl,EXPOSSTR,EXPOSSTRL))
79 < #define  exposval(hl)           atof((hl)+EXPOSSTRL)
77 > #define  LEXPOSSTR              9
78 > #define  isexpos(hl)            (!strncmp(hl,EXPOSSTR,LEXPOSSTR))
79 > #define  exposval(hl)           atof((hl)+LEXPOSSTR)
80   #define  fputexpos(ex,fp)       fprintf(fp,"%s%e\n",EXPOSSTR,ex)
81  
82                                  /* macros for pixel aspect ratios */
83   #define  ASPECTSTR              "PIXASPECT="
84 < #define  ASPECTSTRL             10
85 < #define  isaspect(hl)           (!strncmp(hl,ASPECTSTR,ASPECTSTRL))
86 < #define  aspectval(hl)          atof((hl)+ASPECTSTRL)
84 > #define  LASPECTSTR             10
85 > #define  isaspect(hl)           (!strncmp(hl,ASPECTSTR,LASPECTSTR))
86 > #define  aspectval(hl)          atof((hl)+LASPECTSTR)
87   #define  fputaspect(pa,fp)      fprintf(fp,"%s%f\n",ASPECTSTR,pa)
88 +
89 +                                /* macros for color correction */
90 + #define  COLCORSTR              "COLORCORR="
91 + #define  LCOLCORSTR             10
92 + #define  iscolcor(hl)           (!strncmp(hl,COLCORSTR,LCOLCORSTR))
93 + #define  colcorval(cc,hl)       sscanf(hl+LCOLCORSTR,"%f %f %f", \
94 +                                        &(cc)[RED],&(cc)[GRN],&(cc)[BLU])
95 + #define  fputcolcor(cc,fp)      fprintf(fp,"%s %f %f %f\n",COLCORSTR, \
96 +                                        (cc)[RED],(cc)[GRN],(cc)[BLU])
97  
98   extern double  ldexp(), atof();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines