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.1 by greg, Fri Oct 5 00:59:38 2012 UTC vs.
Revision 2.2 by greg, Fri Oct 5 02:07:10 2012 UTC

# Line 384 | Line 384 | main(int argc, char *argv[])
384          SET_DEFAULT_BINARY();
385          if (argc != 5)
386                  goto userr;
387 <                                /* get frame range */
388 <        switch (sscanf(argv[1], "%lf,%lf", &fstart, &fend)) {
387 >                                /* get frame range & sampling */
388 >        switch (sscanf(argv[1], "%lf,%lf/%d", &fstart, &fend, &nsamps)) {
389          case 1:
390 +                nsamps = 0;
391                  fend = fstart;
392                  break;
393          case 2:
394 +                nsamps = 0;
395 +                /* fall through */
396 +        case 3:
397                  if (fend < fstart)
398                          goto userr;
399                  break;
# Line 398 | Line 402 | main(int argc, char *argv[])
402          }
403          if (fstart < 1)
404                  goto userr;
405 <        hdrspec = argv[2];
406 <        zbfspec = argv[3];
403 <        mvospec = argv[4];
404 <        nsamps = (fend - fstart)*12.;
405 >        if (nsamps <= 0)
406 >                nsamps = (fend - fstart)*17.;
407          if (nsamps) {
408 +                if (nsamps > 100) nsamps = 100;
409                  fstep = (fend - fstart)/nsamps;
410          } else {
411                  fstep = 1.;
412                  fstart -= .5;
413                  nsamps = 1;
414          }
415 +        hdrspec = argv[2];
416 +        zbfspec = argv[3];
417 +        mvospec = argv[4];
418                                  /* load and filter each subframe */
419          for (fcur = fstart + .5*fstep; fcur <= fend; fcur += fstep)
420                  addframe(fcur);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines