47 |
|
#define CIE_y_g 0.710 |
48 |
|
#define CIE_x_b 0.140 |
49 |
|
#define CIE_y_b 0.080 |
50 |
< |
#define CIE_x_w 0.333 /* use true white */ |
51 |
< |
#define CIE_y_w 0.333 |
50 |
> |
#define CIE_x_w 0.3333 /* use true white */ |
51 |
> |
#define CIE_y_w 0.3333 |
52 |
|
#else |
53 |
|
#define CIE_x_r 0.640 /* nominal CRT primaries */ |
54 |
|
#define CIE_y_r 0.330 |
56 |
|
#define CIE_y_g 0.600 |
57 |
|
#define CIE_x_b 0.150 |
58 |
|
#define CIE_y_b 0.060 |
59 |
< |
#define CIE_x_w 0.333 /* use true white */ |
60 |
< |
#define CIE_y_w 0.333 |
59 |
> |
#define CIE_x_w 0.3333 /* use true white */ |
60 |
> |
#define CIE_y_w 0.3333 |
61 |
|
#endif |
62 |
|
|
63 |
|
#define CIE_D ( CIE_x_r*(CIE_y_g - CIE_y_b) + \ |
79 |
|
#define CIE_rf (CIE_y_r*CIE_C_rD/CIE_D) |
80 |
|
#define CIE_gf (CIE_y_g*CIE_C_gD/CIE_D) |
81 |
|
#define CIE_bf (CIE_y_b*CIE_C_bD/CIE_D) |
82 |
+ |
|
83 |
+ |
/* As of 9-94, CIE_rf=.265074126, CIE_gf=.670114631 and CIE_bf=.064811243 */ |
84 |
|
|
85 |
|
#define bright(col) (CIE_rf*(col)[RED]+CIE_gf*(col)[GRN]+CIE_bf*(col)[BLU]) |
86 |
|
#define normbright(c) ( ( (long)(CIE_rf*256.+.5)*(c)[RED] + \ |