bug in upscaling count computation, workaround
This commit is contained in:
parent
b0fe0091d4
commit
9f5d5e2763
@ -305,6 +305,7 @@ t_final = fimg_timer_get(0);
|
|||||||
fprintf(stderr, "pid %d : elapsed %g s -> %.2f fps\n", getpid(),
|
fprintf(stderr, "pid %d : elapsed %g s -> %.2f fps\n", getpid(),
|
||||||
t_final, (double)nbre_capt / t_final);
|
t_final, (double)nbre_capt / t_final);
|
||||||
|
|
||||||
|
|
||||||
#if SAVE_AS_CUMUL
|
#if SAVE_AS_CUMUL
|
||||||
if (to_gray) {
|
if (to_gray) {
|
||||||
if (verbosity) fputs("converting to gray\n", stderr);
|
if (verbosity) fputs("converting to gray\n", stderr);
|
||||||
@ -313,6 +314,11 @@ if (to_gray) {
|
|||||||
|
|
||||||
// save cumul to file
|
// save cumul to file
|
||||||
if (verbosity) fprintf(stderr, "saving to '%s'\n", outfile);
|
if (verbosity) fprintf(stderr, "saving to '%s'\n", outfile);
|
||||||
|
|
||||||
|
if (upscaling) { /* nasty workaround */
|
||||||
|
cumul.count /= 4;
|
||||||
|
}
|
||||||
|
|
||||||
foo = fimg_save_as_pnm(&cumul, outfile, 1);
|
foo = fimg_save_as_pnm(&cumul, outfile, 1);
|
||||||
|
|
||||||
// free buffers
|
// free buffers
|
||||||
|
@ -45,7 +45,9 @@ for (y=0; y<h; y++) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
modz++;
|
modz++; /* next displacment index */
|
||||||
|
|
||||||
|
d->count++; /* one more frame in the accumulator */
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user