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

Comparing ray/src/px/pcond2.c (file contents):
Revision 3.2 by greg, Fri Oct 4 16:10:41 1996 UTC vs.
Revision 3.5 by greg, Tue Jan 28 16:31:16 1997 UTC

# Line 20 | Line 20 | double inpexp = 1.0;                   /* input exposure value */
20  
21   char    *mbcalfile = NULL;              /* macbethcal mapping file */
22  
23 < static struct mbc       mbcond;         /* macbethcal conditioning struct */
23 > static struct mbc {
24 >        float   xa[3][6], ya[3][6];
25 >        COLORMAT        cmat;
26 > }       mbcond;                         /* macbethcal conditioning struct */
27  
28   static COLOR    *scanbuf;               /* scanline processing buffer */
29   static int      nread;                  /* number of scanlines processed */
# Line 57 | Line 60 | COLOR *
60   nextscan()                              /* read and condition next scanline */
61   {
62          if (nread >= numscans(&inpres)) {
63 < #ifdef DEBUG
64 <                fputs("done\n", stderr);
62 < #endif
63 <                return(NULL);
63 >                free((char *)scanbuf);
64 >                return(scanbuf = NULL);
65          }
66          if (what2do&DO_ACUITY)
67                  acuscan(scanbuf, nread);
# Line 96 | Line 97 | firstscan()                            /* return first processed scanline */
97                          comprgb2rgbmat(mbcond.cmat, inprims, outprims);
98                  else
99                          compxyz2rgbmat(mbcond.cmat, outprims);
100 <        if (what2do&DO_ACUITY) {
100 < #ifdef DEBUG
101 <                fprintf(stderr, "%s: initializing acuity sampling...",
102 <                                progname);
103 < #endif
100 >        if (what2do&DO_ACUITY)
101                  initacuity();
105 #ifdef DEBUG
106                fprintf(stderr, "done\n");
107 #endif
108        }
102          scanbuf = (COLOR *)malloc(scanlen(&inpres)*sizeof(COLOR));
103          if (scanbuf == NULL)
104                  syserror("malloc");
105          nread = 0;
113 #ifdef DEBUG
114        fprintf(stderr, "%s: processing image...", progname);
115 #endif
106          return(nextscan());
107   }
108  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines