| 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 |
|
|
| 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--; |
| 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 |
|
|
| 536 |
|
} |
| 537 |
|
/* initialize with next power of two */ |
| 538 |
|
rootbar = sballoc((int)(log(maxsr)/log(2.))+1, 2, scanlen(&inpres)); |
| 539 |
+ |
return(1); |
| 540 |
|
} |