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 2.11 by greg, Fri Nov 10 17:04:19 1995 UTC vs.
Revision 2.17 by gwlarson, Wed Oct 21 17:48:06 1998 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1991 Regents of the University of California */
1 > /* Copyright (c) 1998 Silicon Graphics, Inc. */
2  
3 < /* SCCSid "$SunId$ LBL" */
3 > /* SCCSid "$SunId$ SGI" */
4  
5   /*
6   *  color.h - header for routines using pixel color values.
7   *
8 < *     12/31/85
8 > *  Must be included after X11 headers, since they declare a BYTE type.
9   *
10   *  Two color representations are used, one for calculation and
11   *  another for storage.  Calculation is done with three floats
# Line 23 | Line 23
23   #define  COLXS          128     /* excess used for exponent */
24   #define  WHT            3       /* used for RGBPRIMS type */
25  
26 < typedef unsigned char  BYTE;    /* 8-bit unsigned integer */
26 > #undef  BYTE
27 > #define  BYTE   unsigned char   /* 8-bit unsigned integer */
28  
29   typedef BYTE  COLR[4];          /* red, green, blue (or X,Y,Z), exponent */
30  
# Line 69 | Line 70 | typedef float  COLORMAT[3][3]; /* color coordinate con
70   #define  CIE_y_w                0.3333
71   #endif
72  
73 < #define  STDPRIMS       {CIE_x_r,CIE_y_r,CIE_x_g,CIE_y_g, \
74 <                                CIE_x_b,CIE_y_b,CIE_x_w,CIE_y_w}
73 > #define  STDPRIMS       {{CIE_x_r,CIE_y_r},{CIE_x_g,CIE_y_g}, \
74 >                                {CIE_x_b,CIE_y_b},{CIE_x_w,CIE_y_w}}
75  
76   #define CIE_D           (       CIE_x_r*(CIE_y_g - CIE_y_b) + \
77                                  CIE_x_g*(CIE_y_b - CIE_y_r) + \
# Line 187 | Line 188 | extern double  atof(), ldexp(), frexp();
188   extern RGBPRIMS  stdprims;              /* standard primary chromaticities */
189   extern COLORMAT  rgb2xyzmat;            /* RGB to XYZ conversion matrix */
190   extern COLORMAT  xyz2rgbmat;            /* XYZ to RGB conversion matrix */
191 + extern COLOR  cblack, cwhite;           /* black (0,0,0) and white (1,1,1) */
192  
193 < #define  cie_rgb(rgb,xyz)       colortrans(rgb,xyz2rgbmat,xyz)
193 > #define  CGAMUT_LOWER           01
194 > #define  CGAMUT_UPPER           02
195 > #define  CGAMUT                 (CGAMUT_LOWER|CGAMUT_UPPER)
196 >
197   #define  rgb_cie(xyz,rgb)       colortrans(xyz,rgb2xyzmat,rgb)
198  
199   #ifdef BSD
200   #define  cpcolormat(md,ms)      bcopy((char *)ms,(char *)md,sizeof(COLORMAT))
201   #else
202 < #define  cpcolormat(md,ms)      (void)memcpy((char *)md,(char *)ms,sizeof(COLORMAT))
202 > #define  cpcolormat(md,ms)      memcpy((char *)md,(char *)ms,sizeof(COLORMAT))
203   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines