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.34 by greg, Thu Mar 26 15:40:32 2015 UTC vs.
Revision 2.36 by greg, Sat Mar 5 17:18:02 2022 UTC

# Line 55 | Line 55 | typedef float  COLORMAT[3][3]; /* color coordinate con
55  
56   #define  multcolor(c1,c2)       ((c1)[0]*=(c2)[0],(c1)[1]*=(c2)[1],(c1)[2]*=(c2)[2])
57  
58 < #ifdef  NTSC
58 > #if defined(NTSC_RGB)
59   #define  CIE_x_r                0.670           /* standard NTSC primaries */
60   #define  CIE_y_r                0.330
61   #define  CIE_x_g                0.210
62   #define  CIE_y_g                0.710
63   #define  CIE_x_b                0.140
64   #define  CIE_y_b                0.080
65 < #define  CIE_x_w                (1./3.)         /* use true white */
65 > #define  CIE_x_w                (1./3.)         /* use EE white */
66   #define  CIE_y_w                (1./3.)
67 + #elif defined(SHARP_RGB)
68 + #define  CIE_x_r                0.6898          /* "sharp" RGB primaries */
69 + #define  CIE_y_r                0.3206
70 + #define  CIE_x_g                0.0736
71 + #define  CIE_y_g                0.9003
72 + #define  CIE_x_b                0.1166
73 + #define  CIE_y_b                0.0374
74 + #define  CIE_x_w                (1./3.)         /* use EE white */
75 + #define  CIE_y_w                (1./3.)
76   #else
77   #define  CIE_x_r                0.640           /* nominal CRT primaries */
78   #define  CIE_y_r                0.330
# Line 71 | Line 80 | typedef float  COLORMAT[3][3]; /* color coordinate con
80   #define  CIE_y_g                0.600
81   #define  CIE_x_b                0.150
82   #define  CIE_y_b                0.060
83 < #define  CIE_x_w                (1./3.)         /* use true white */
83 > #define  CIE_x_w                (1./3.)         /* use EE white */
84   #define  CIE_y_w                (1./3.)
85   #endif
86  
# Line 98 | Line 107 | typedef float  COLORMAT[3][3]; /* color coordinate con
107   #define CIE_gf          (CIE_y_g*CIE_C_gD/CIE_D)
108   #define CIE_bf          (CIE_y_b*CIE_C_bD/CIE_D)
109  
110 < /* As of 9-94, CIE_rf=.265074126, CIE_gf=.670114631 and CIE_bf=.064811243 */
110 > /* Default CIE_rf=.265074126, CIE_gf=.670114631 and CIE_bf=.064811243 */
111  
112   /***** The following definitions are valid for RGB colors only... *****/
113  
# Line 200 | Line 209 | extern COLOR  cblack, cwhite;  /* black (0,0,0) and whi
209   #define  cpcolormat(md,ms)      memcpy((void *)md,(void *)ms,sizeof(COLORMAT))
210  
211                                          /* defined in color.c */
212 < extern char     *tempbuffer(unsigned int len);
212 > extern void     *tempbuffer(unsigned int len);
213   extern int      fwritecolrs(COLR *scanline, int len, FILE *fp);
214   extern int      freadcolrs(COLR *scanline, int len, FILE *fp);
215   extern int      fwritescan(COLOR *scanline, int len, FILE *fp);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines