629 |
|
if (astat.tnext < astat.fnext) /* other work to do first */ |
630 |
|
return; |
631 |
|
/* filter each view */ |
632 |
< |
for (i = astat.fnext; i < astat.rnext; i++) { |
633 |
< |
if ((vp = getview(i)) == NULL) { /* get view i */ |
634 |
< |
fprintf(stderr, |
635 |
< |
"%s: unexpected error reading view for frame %d\n", |
636 |
< |
progname, i); |
637 |
< |
quit(1); |
638 |
< |
} |
639 |
< |
dofilt(i, vp, getexp(i), 0); /* filter frame */ |
640 |
< |
} |
632 |
> |
for (i = astat.fnext; i < astat.rnext; i++) |
633 |
> |
dofilt(i, 0); |
634 |
> |
|
635 |
|
bwait(0); /* wait for filter processes */ |
636 |
|
archive(); /* archive originals */ |
637 |
|
astat.fnext = i; /* update status */ |
808 |
|
frecover(frame) /* recover filtered frame */ |
809 |
|
int frame; |
810 |
|
{ |
811 |
< |
VIEW *vp; |
818 |
< |
char *ex; |
819 |
< |
|
820 |
< |
vp = getview(frame); |
821 |
< |
ex = getexp(frame); |
822 |
< |
if (dofilt(frame, vp, ex, 2) && dofilt(frame, vp, ex, 1)) |
811 |
> |
if (dofilt(frame, 2) && dofilt(frame, 1)) |
812 |
|
return(1); |
813 |
|
return(0); |
814 |
|
} |
858 |
|
|
859 |
|
|
860 |
|
int |
861 |
< |
dofilt(frame, vp, ep, rvr) /* filter frame */ |
861 |
> |
dofilt(frame, rvr) /* filter frame */ |
862 |
|
int frame; |
874 |
– |
VIEW *vp; |
875 |
– |
char *ep; |
863 |
|
int rvr; |
864 |
|
{ |
865 |
|
extern int frecover(); |
866 |
|
static int iter = 0; |
867 |
|
double blurf; |
868 |
|
int nblur = getblur(&blurf); |
869 |
+ |
VIEW *vp = getview(frame); |
870 |
+ |
char *ep = getexp(frame); |
871 |
|
char fnbefore[128], fnafter[128], *fbase; |
872 |
|
char combuf[1024], fname0[128], fname1[128]; |
873 |
|
int usepinterp, usepfilt, nora_rgbe; |
874 |
|
int frseq[2]; |
875 |
|
/* check what is needed */ |
876 |
+ |
if (vp == NULL) { |
877 |
+ |
fprintf(stderr, |
878 |
+ |
"%s: unexpected error reading view for frame %d\n", |
879 |
+ |
progname, frame); |
880 |
+ |
quit(1); |
881 |
+ |
} |
882 |
+ |
if (ep == NULL) { |
883 |
+ |
fprintf(stderr, |
884 |
+ |
"%s: unexpected error reading exposure for frame %d\n", |
885 |
+ |
progname, frame); |
886 |
+ |
quit(1); |
887 |
+ |
} |
888 |
|
usepinterp = (nblur > 1); |
889 |
|
usepfilt = pfiltalways | ep==NULL; |
890 |
|
if (ep != NULL && !strcmp(ep, "1")) |