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

Comparing ray/src/px/pmblur2.c (file contents):
Revision 2.3 by greg, Fri Oct 5 15:25:12 2012 UTC vs.
Revision 2.5 by greg, Sat Oct 13 05:18:18 2012 UTC

# Line 207 | Line 207 | neigh_zmin(const float *zb, int n)
207   }
208  
209  
210 < /* Fill in missing pixels from immediate neighbors */
210 > /* Expand foreground pixels to mitigate aliasing/fill errors */
211   static void
212   fill_missing(void)
213   {
214          int     n, m;
215  
216          for (n = imres.xr*imres.yr; n--; )
217 <                if (zbuf[n] >= .9*FHUGE &&
218 <                                zbuf[m = neigh_zmin(zbuf,n)] < .9*FHUGE)
217 >                if (zbuf[n] > 1.25*zbuf[m = neigh_zmin(zbuf,n)])
218                          copycolor(imbuf[n], imbuf[m]);
219   }
220  
# Line 399 | Line 398 | main(int argc, char *argv[])
398                                  /* get frame range & sampling */
399          switch (sscanf(argv[1], "%lf,%lf/%d", &fstart, &fend, &nsamps)) {
400          case 1:
402                nsamps = 0;
401                  fend = fstart;
402 +                nsamps = 0;
403                  break;
404          case 2:
405                  nsamps = 0;
# Line 408 | Line 407 | main(int argc, char *argv[])
407          case 3:
408                  if (fend < fstart)
409                          goto userr;
410 +                if (fend <= fstart+FTINY)
411 +                        nsamps = 0;
412                  break;
413          default:
414                  goto userr;
# Line 438 | Line 439 | main(int argc, char *argv[])
439          write_average(stdout);
440          return(fflush(stdout) == EOF);
441   userr:
442 <        fprintf(stderr, "Usage: %s f0,f1 HDRspec ZBUFspec MVOspec\n", progname);
442 >        fprintf(stderr, "Usage: %s f0,f1[/n] HDRspec ZBUFspec MVOspec\n", progname);
443          return(1);
444   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines