a better singlepass

This commit is contained in:
2021-01-14 14:15:42 +01:00
parent 8a1b164ea7
commit 6a53282cd9
5 changed files with 16 additions and 7 deletions

View File

@@ -29,6 +29,7 @@ FloatImg image = { 0 };
int idx, foo;
glob_t globbuf;
char *fname;
double elapsed;
#if DEBUG_LEVEL
fprintf(stderr, ">>> %s ( '%s' '%s' %d )\n", __func__,
@@ -37,6 +38,8 @@ fprintf(stderr, ">>> %s ( '%s' '%s' %d )\n", __func__,
// filterstack_list(fchain, "Run the single pass");
(void)fimg_timer_set(0);
foo = single_init(0, destdir, fchain);
if (foo) {
fprintf(stderr, "erreur %d single_init\n", foo);
@@ -96,16 +99,21 @@ for (idx=0; idx<globbuf.gl_pathc; idx++) {
}
fprintf(stderr, "\n");
single_print_state("end of run :)", 0);
fimg_destroy(&image);
single_print_state("end of run :)", 0);
return -1;
elapsed = fimg_timer_get(0);
fprintf(stderr, " %d frames, elapsed %.3f s, %.3f fps\n",
globbuf.gl_pathc, elapsed,
(double)globbuf.gl_pathc/elapsed);
return 0;
}
/* ----------------------------------------------------------- */
static void help(void)
{
puts("--- Single pass serial filter ---\nusage:");
puts("------ Single pass serial filter ------\nusage:");
puts("\t-F\tdefine:the:filter:chain");
puts("\t-g\tinput glob pattern");