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.1 by greg, Thu Oct 3 16:52:49 1996 UTC vs.
Revision 3.3 by greg, Fri Oct 4 18:34:57 1996 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 62 | Line 65 | nextscan()                             /* read and condition next scanline */
65   #endif
66                  return(NULL);
67          }
68 <        if (freadscan(scanbuf, scanlen(&inpres), infp) < 0) {
68 >        if (what2do&DO_ACUITY)
69 >                acuscan(scanbuf, nread);
70 >        else if (freadscan(scanbuf, scanlen(&inpres), infp) < 0) {
71                  fprintf(stderr, "%s: %s: scanline read error\n",
72                                  progname, infn);
73                  exit(1);
74          }
70        nread++;
75          if (what2do&DO_VEIL)                    /* add veiling */
76 <                addveil(scanbuf, nread-1);
76 >                addveil(scanbuf, nread);
77          if (what2do&DO_COLOR)                   /* scotopic color loss */
78                  scotscan(scanbuf, scanlen(&inpres));
79          if (what2do&DO_LINEAR)                  /* map luminances */
# Line 80 | Line 84 | nextscan()                             /* read and condition next scanline */
84                  mbscan(scanbuf, scanlen(&inpres), &mbcond);
85          else if (lumf == cielum | inprims != outprims)
86                  matscan(scanbuf, scanlen(&inpres), mbcond.cmat);
87 +        nread++;
88          return(scanbuf);
89   }
90  
# Line 94 | Line 99 | firstscan()                            /* return first processed scanline */
99                          comprgb2rgbmat(mbcond.cmat, inprims, outprims);
100                  else
101                          compxyz2rgbmat(mbcond.cmat, outprims);
102 +        if (what2do&DO_ACUITY) {
103 + #ifdef DEBUG
104 +                fprintf(stderr, "%s: initializing acuity sampling...",
105 +                                progname);
106 + #endif
107 +                initacuity();
108 + #ifdef DEBUG
109 +                fprintf(stderr, "done\n");
110 + #endif
111 +        }
112          scanbuf = (COLOR *)malloc(scanlen(&inpres)*sizeof(COLOR));
113          if (scanbuf == NULL)
114                  syserror("malloc");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines