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

Comparing ray/src/px/neuclrtab.c (file contents):
Revision 2.13 by greg, Sat Sep 8 19:17:52 2007 UTC vs.
Revision 2.14 by greg, Fri May 20 02:06:39 2011 UTC

# Line 24 | Line 24 | static const char      RCSid[] = "$Id$";
24   #define neu_dith_colrs  dith_colrs
25   #endif
26                                  /* our color table (global) */
27 < extern BYTE     clrtab[256][3];
27 > extern uby8     clrtab[256][3];
28   static int      clrtabsiz;
29  
30   #ifndef DEFSMPFAC
# Line 36 | Line 36 | int    samplefac = DEFSMPFAC;  /* sampling factor */
36                  /* Samples array starts off holding spacing between adjacent
37                   * samples, and ends up holding actual BGR sample values.
38                   */
39 < static BYTE     *thesamples;
39 > static uby8     *thesamples;
40   static int      nsamples;
41 < static BYTE     *cursamp;
41 > static uby8     *cursamp;
42   static long     skipcount;
43  
44   #define MAXSKIP         (1<<24-1)
# Line 71 | Line 71 | neu_init(              /* initialize our sample array */
71          nsamples = npixels/samplefac;
72          if (nsamples < 600)
73                  return(-1);
74 <        thesamples = (BYTE *)malloc(nsamples*3);
74 >        thesamples = (uby8 *)malloc(nsamples*3);
75          if (thesamples == NULL)
76                  return(-1);
77          cursamp = thesamples;
# Line 100 | Line 100 | neu_init(              /* initialize our sample array */
100  
101   extern void
102   neu_pixel(                      /* add pixel to our samples */
103 <        register BYTE   col[]
103 >        register uby8   col[]
104   )
105   {
106          if (!skipcount--) {
# Line 148 | Line 148 | neu_clrtab(            /* make new color table using ncolors */
148                                  /* we're done with our samples */
149          free((void *)thesamples);
150                                  /* reset dithering function */
151 <        neu_dith_colrs((BYTE *)NULL, (COLR *)NULL, 0);
151 >        neu_dith_colrs((uby8 *)NULL, (COLR *)NULL, 0);
152                                  /* return new color table size */
153          return(clrtabsiz);
154   }
# Line 156 | Line 156 | neu_clrtab(            /* make new color table using ncolors */
156  
157   extern int
158   neu_map_pixel(          /* get pixel for color */
159 <        register BYTE   col[]
159 >        register uby8   col[]
160   )
161   {
162          return(inxsearch(col[BLU],col[GRN],col[RED]));
# Line 165 | Line 165 | neu_map_pixel(         /* get pixel for color */
165  
166   extern void
167   neu_map_colrs(  /* convert a scanline to color index values */
168 <        register BYTE   *bs,
168 >        register uby8   *bs,
169          register COLR   *cs,
170          register int    n
171   )
# Line 179 | Line 179 | neu_map_colrs( /* convert a scanline to color index va
179  
180   extern void
181   neu_dith_colrs( /* convert scanline to dithered index values */
182 <        register BYTE   *bs,
182 >        register uby8   *bs,
183          register COLR   *cs,
184          int     n
185   )

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines