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

Comparing ray/src/px/pcond4.c (file contents):
Revision 3.17 by schorsch, Sun Mar 28 20:33:14 2004 UTC vs.
Revision 3.18 by greg, Mon Nov 8 15:50:59 2004 UTC

# Line 298 | Line 298 | typedef struct {
298  
299   SCANBAR *rootbar;               /* root scan bar (lowest resolution) */
300  
301 < float   *inpacuD;               /* input acuity data (cycles/degree) */
301 > float   *inpacuD = NULL;        /* input acuity data (cycles/degree) */
302  
303   #define tsampr(x,y)     inpacuD[(y)*fvxr+(x)]
304  
# Line 364 | Line 364 | acuscan(               /* get acuity-sampled scanline */
364          double  dx, dy;
365          int     ix, iy;
366          register int    x;
367 +        
368 +        if (inpacuD == NULL)
369 +                return;
370                                          /* compute foveal y position */
371          iy = dy = (y+.5)/numscans(&inpres)*fvyr - .5;
372          while (iy >= fvyr-1) iy--;
# Line 488 | Line 491 | sballoc(               /* allocate scanbar */
491   }
492  
493  
494 < extern void
494 > extern int
495   initacuity(void)                        /* initialize variable acuity sampling */
496   {
497          FVECT   diffx, diffy, cp;
498          double  omega, maxsr;
499          register int    x, y, i;
500 +        
501 +        if (fvxr < 3 || fvyr < 3)
502 +                return(0);              /* too small to work with */
503  
504          compraydir();                   /* compute ray directions */
505  
# Line 530 | Line 536 | initacuity(void)                       /* initialize variable acuity sampl
536          }
537                                          /* initialize with next power of two */
538          rootbar = sballoc((int)(log(maxsr)/log(2.))+1, 2, scanlen(&inpres));
539 +        return(1);
540   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines