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.10 by greg, Fri Apr 5 14:41:55 1991 UTC vs.
Revision 1.12 by greg, Fri Apr 12 10:28:34 1991 UTC

# Line 20 | Line 20 | static char SCCSid[] = "$SunId$ LBL";
20   #define vfork           fork
21   #endif
22  
23 < #define MAXSBUF         1023980 /* maximum total size of scanline buffer */
23 > #define MAXSBUF         524268  /* maximum total size of scanline buffer */
24   #define HSIZE           317     /* size of scanline hash table */
25   #define NRETIRE         16      /* number of scanlines to retire at once */
26  
# Line 75 | Line 75 | int    y;
75                          if (sl->y == y) {               /* reclaim */
76                                  sl->next = hashtab[hi];
77                                  hashtab[hi] = sl;
78 + #ifdef DEBUG
79 +                                if (verbose)
80 +                                        fprintf(stderr,
81 +                                                "%s: scanline %d reclaimed\n",
82 +                                                        progname, y);
83 + #endif
84                          }
85                          return(sl);
86                  }
# Line 171 | Line 177 | FVECT  vd;
177  
178  
179   double
180 < getviewpix(vh, vv)              /* compute single view pixel */
180 > getviewpix(vh, vv, se)          /* compute single view pixel */
181   int     vh, vv;
182 + SPANERR *se;
183   {
184          FVECT   dir;
185          float   rt_buf[6];
186          double  res;
187  
188 <        if (compdir(dir, vh, vv) < 0)
188 >        if (compdir(dir, vh, vv, se) < 0)
189                  return(-1.0);
190          npixinvw++;
191          if ((res = pict_val(dir)) >= 0.0)
# Line 205 | Line 212 | float  *vb;
212          float   rt_buf[6*MAXPIX];       /* rtrace send/receive buffer */
213          register int    n;              /* number of pixels in buffer */
214          short   buf_vh[MAXPIX];         /* pixel positions */
215 +        SPANERR sperr;
216          FVECT   dir;
217          register int    vh;
218  
# Line 213 | Line 221 | float  *vb;
221                  fprintf(stderr, "%s: computing view span at %d...\n",
222                                  progname, vv);
223   #endif
224 +        setspanerr(&sperr, vv);
225          n = 0;
226          for (vh = -hsize; vh <= hsize; vh++) {
227 <                if (compdir(dir, vh, vv) < 0) { /* off viewable region */
227 >                if (compdir(dir, vh, vv, &sperr) < 0) { /* not in view */
228                          vb[vh+hsize] = -1.0;
229                          continue;
230                  }
# Line 289 | Line 298 | char   *s;
298   open_pict(fn)                   /* open picture file */
299   char    *fn;
300   {
292        register int    i;
293
301          if ((pictfp = fopen(fn, "r")) == NULL) {
302                  fprintf("%s: cannot open\n", fn);
303                  exit(1);
# Line 307 | Line 314 | char   *fn;
314  
315   close_pict()                    /* done with picture */
316   {
310        register int    i;
311
317          if (pictfp == NULL)
318                  return;
319          fclose(pictfp);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines