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

Comparing ray/src/util/glareval.c (file contents):
Revision 1.13 by greg, Thu Apr 18 15:18:25 1991 UTC vs.
Revision 1.15 by greg, Mon Apr 22 15:41:01 1991 UTC

# Line 49 | Line 49 | static SCAN    *hashtab[HSIZE];        /* scanline hash table */
49  
50   static long     ncall = 0L;     /* number of calls to getpictscan */
51   static long     nread = 0L;     /* number of scanlines read */
52 + static long     nrecl = 0L;     /* number of scanlines reclaimed */
53  
54   static int      wrongformat = 0;
55  
# Line 77 | Line 78 | int    y;
78                          if (sl->y == y) {               /* reclaim */
79                                  sl->next = hashtab[hi];
80                                  hashtab[hi] = sl;
81 < #ifdef DEBUG
81 <                                if (verbose)
82 <                                        fprintf(stderr,
83 <                                                "%s: scanline %d reclaimed\n",
84 <                                                        progname, y);
85 < #endif
81 >                                nrecl++;
82                          }
83                          return(sl);
84                  }
# Line 146 | Line 142 | pict_stats()                   /* print out picture read statistics */
142   {
143          static long     lastcall = 0L;  /* ncall at last report */
144          static long     lastread = 0L;  /* nread at last report */
145 +        static long     lastrecl = 0L;  /* nrecl at last report */
146  
147          if (ncall == lastcall)
148                  return;
149 <        fprintf(stderr, "%s: %ld scanlines read in %ld calls\n",
150 <                        progname, nread-lastread, ncall-lastcall);
149 >        fprintf(stderr, "%s: %ld scanlines read (%ld reclaimed) in %ld calls\n",
150 >                progname, nread-lastread, nrecl-lastrecl, ncall-lastcall);
151          lastcall = ncall;
152          lastread = nread;
153 +        lastrecl = nrecl;
154   }
155   #endif
156  
# Line 179 | Line 177 | FVECT  vd;
177  
178  
179   double
180 < getviewpix(vh, vv, se)          /* compute single view pixel */
180 > getviewpix(vh, vv)              /* compute single view pixel */
181   int     vh, vv;
184 SPANERR *se;
182   {
183          FVECT   dir;
184          float   rt_buf[6];
185          double  res;
186  
187 <        if (compdir(dir, vh, vv, se) < 0)
187 >        if (compdir(dir, vh, vv) < 0)
188                  return(-1.0);
189          npixinvw++;
190          if ((res = pict_val(dir)) >= 0.0)
# Line 214 | Line 211 | float  *vb;
211          float   rt_buf[6*MAXPIX];       /* rtrace send/receive buffer */
212          register int    n;              /* number of pixels in buffer */
213          short   buf_vh[MAXPIX];         /* pixel positions */
217        SPANERR sperr;
214          FVECT   dir;
215          register int    vh;
216  
# Line 223 | Line 219 | float  *vb;
219                  fprintf(stderr, "%s: computing view span at %d...\n",
220                                  progname, vv);
221   #endif
226        setspanerr(&sperr, vv);
222          n = 0;
223          for (vh = -hsize; vh <= hsize; vh++) {
224 <                if (compdir(dir, vh, vv, &sperr) < 0) { /* not in view */
224 >                if (compdir(dir, vh, vv) < 0) {         /* not in view */
225                          vb[vh+hsize] = -1.0;
226                          continue;
227                  }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines