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

Comparing ray/src/px/biq.c (file contents):
Revision 1.2 by greg, Thu Feb 2 14:10:31 1989 UTC vs.
Revision 2.1 by greg, Tue Nov 12 16:04:14 1991 UTC

# Line 10 | Line 10 | static char SCCSid[] = "$SunId$ LBL";
10   *      9/19/88
11   */
12  
13 + #include "standard.h"
14   #include "ciq.h"
15  
16  
# Line 31 | Line 32 | colormap cm;           /* quantization colormap */
32  
33      draw_grey(ocm);
34  
35 <    bcopy(color,cm,sizeof color);
35 >    bcopy((char *)color,(char *)cm,sizeof color);
36   }
37  
38   /*----------------------------------------------------------------------*/
# Line 41 | Line 42 | colormap ocm;
42   {
43      register rgbpixel *linin;
44      register pixel *linout;
45 +    rgbpixel intmp;
46 +    int outtmp;
47      int y;
48      register int x;
49  
# Line 50 | Line 53 | colormap ocm;
53      for (y = 0; y < ymax; y++) {
54          picreadline3(y, linin);
55          for (x = 0; x < xmax; x++) {
56 <                linin[x].r = ocm[0][linin[x].r];
57 <                linin[x].g = ocm[1][linin[x].g];
58 <                linin[x].b = ocm[2][linin[x].b];
59 <                linout[x] = rgb_bright(&linin[x]);
60 <                linout[x] = (linout[x]*n+n/2)/256;
56 >                intmp.r = ocm[0][linin[x].r];
57 >                intmp.g = ocm[1][linin[x].g];
58 >                intmp.b = ocm[2][linin[x].b];
59 >                outtmp = rgb_bright(&intmp);
60 >                linout[x] = (outtmp*n+n/2)/256;
61          }
62          picwriteline(y, linout);
63      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines