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

Comparing ray/src/px/pfilt.c (file contents):
Revision 2.18 by greg, Wed May 22 10:42:08 1996 UTC vs.
Revision 2.19 by greg, Wed Oct 2 16:56:16 1996 UTC

# Line 414 | Line 414 | FILE  *in;
414          scan2init();
415          yread = 0;
416          for (r = 0; r < nrows; r++) {
417 <                ycent = (long)r*yres/nrows;
417 >                ycent = (r+.5)*yres/nrows;
418                  while (yread <= ycent+yrad) {
419                          if (yread < yres) {
420                                  if (freadscan(scanin[yread%barsize],
# Line 431 | Line 431 | FILE  *in;
431                  if (obarsize > 0)
432                          scan2sync(r);
433                  for (c = 0; c < ncols; c++) {
434 <                        xcent = (long)c*xres/ncols;
434 >                        xcent = (c+.5)*xres/ncols;
435                          if (thresh > FTINY)
436                                  dothresh(xcent, ycent, c, r);
437                          else if (rad > FTINY)
# Line 540 | Line 540 | int  r;
540          register int  c;
541                                          /* average input scanlines */
542          while (nextrow <= r+orad && nextrow < nrows) {
543 <                ybot = (long)nextrow*yres/nrows;
543 >                ybot = (nextrow+.5)*yres/nrows;
544                  for (c = 0; c < ncols; c++) {
545 <                        dobox(ctmp, (int)((long)c*xres/ncols),ybot, c,nextrow);
545 >                        dobox(ctmp, (int)((c+.5)*xres/ncols),ybot, c,nextrow);
546                          greybar[nextrow%obarsize][c] = (*ourbright)(ctmp);
547                  }
548                                          /* and zero output scanline */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines