ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/colortab.c
(Generate patch)

Comparing ray/src/rt/colortab.c (file contents):
Revision 1.15 by greg, Wed Nov 7 17:16:58 1990 UTC vs.
Revision 2.3 by greg, Mon Mar 8 12:37:21 1993 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1989 Regents of the University of California */
1 > /* Copyright (c) 1992 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 33 | Line 33 | static char SCCSid[] = "$SunId$ LBL";
33                                  (int)(colval(c,p)*256.) : 255 ]
34                                  /* color partition tree */
35   #define CNODE           short
36 < #define set_branch(p,c) ((c)<<2|(p))
36 > #define set_branch(p,c) ((c)<<2|(p))
37   #define set_pval(pv)    ((pv)<<2|3)
38   #define is_branch(cn)   (((cn)&3)!=3)
39   #define is_pval(cn)     (((cn)&3)==3)
# Line 53 | Line 53 | static BYTE    clrmap[3][256];
53                                  /* histogram of colors used */
54   static unsigned short   histo[NRED][NGRN][NBLU];
55                                  /* initial color cube boundary */
56 < static int      CLRCUBE[3][2] = {0,NRED,0,NGRN,0,NBLU};
56 > static int      CLRCUBE[3][2] = {{0,NRED},{0,NGRN},{0,NBLU}};
57  
58 + static int      split(), cut();
59  
60 +
61   int
62   new_ctab(ncolors)               /* start new color table with max ncolors */
63   int     ncolors;
# Line 128 | Line 130 | int    (*set_pixel)();
130                          (g-clrtab[h].ent[GRN])*(g-clrtab[h].ent[GRN]) +
131                          (b-clrtab[h].ent[BLU])*(b-clrtab[h].ent[BLU]) > MAXDST2) {
132                  clrtab[h].ent[RED] = r;
133 <                clrtab[h].ent[GRN] = g; /* reassign pixel */
133 >                clrtab[h].ent[GRN] = g; /* reassign pixel */
134                  clrtab[h].ent[BLU] = b;
135   #ifdef DEBUG
136                  sprintf(errmsg, "pixel %d = (%d,%d,%d) (%d refs)\n",
# Line 142 | Line 144 | int    (*set_pixel)();
144  
145  
146   make_gmap(gam)                  /* make gamma correction map */
147 < double  gam;
147 > double  gam;
148   {
147        extern double   pow();
149          register int    i;
150          
151          for (i = 0; i < 256; i++)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines