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 |
|
|
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; |
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; |
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 |
|
} |