From 6a53282cd99105034360863b553b11e2bd26a63d Mon Sep 17 00:00:00 2001 From: tonton th Date: Thu, 14 Jan 2021 14:15:42 +0100 Subject: [PATCH] a better singlepass --- Fonderie/Makefile | 2 +- Fonderie/essai.sh | 4 ++-- Fonderie/filterstack.c | 1 + Fonderie/single.c | 2 +- Fonderie/singlepass.c | 14 +++++++++++--- 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Fonderie/Makefile b/Fonderie/Makefile index 0d427263..578c1793 100644 --- a/Fonderie/Makefile +++ b/Fonderie/Makefile @@ -12,7 +12,7 @@ OBJS = fonctions.o sfx.o crapulator.o glitches.o metriques.o \ DEPS = fonctions.h crapulator.h metriques.h glitches.h sfx.h \ filterstack.h crapdef.h crapstr.h single.h -all: fonderie interpolator t +all: fonderie interpolator singlepass t # --------------------------------------------------------- diff --git a/Fonderie/essai.sh b/Fonderie/essai.sh index 0bbe3e30..295465c4 100755 --- a/Fonderie/essai.sh +++ b/Fonderie/essai.sh @@ -31,8 +31,8 @@ convert -delay 200 /tmp/fstack*.png foo.gif essai_singlepass () { MP4="/home/tth/Essais/FondageDePlomb/foo.mp4" -INPUT="/home/tth/Essais/FondageDePlomb/capture/???[04]0.fimg" -FILTRE="water:water:liss3x3" +INPUT="/home/tth/Essais/FondageDePlomb/capture/??090.fimg" +FILTRE="water:liss3x3" OUTDIR="/tmp/x8/" echo '********* essai single *********' diff --git a/Fonderie/filterstack.c b/Fonderie/filterstack.c index f92322eb..a0ca3dc2 100644 --- a/Fonderie/filterstack.c +++ b/Fonderie/filterstack.c @@ -230,6 +230,7 @@ for (;;) { fprintf(stderr, "%s: err %d add\n", __func__, foo); } + continue; } } diff --git a/Fonderie/single.c b/Fonderie/single.c index fea6f480..9ebe539b 100644 --- a/Fonderie/single.c +++ b/Fonderie/single.c @@ -65,7 +65,7 @@ fprintf(stderr, ">>> %s ( %p )\n", __func__, pimg); strncpy(line, destination, 100); if ('/' != line[strlen(line)-1]) { - fprintf(stderr, "adding '/'\n"); + // fprintf(stderr, "adding '/'\n"); strcat(line, "/"); } diff --git a/Fonderie/singlepass.c b/Fonderie/singlepass.c index 5a2ebd46..c7ddbc09 100644 --- a/Fonderie/singlepass.c +++ b/Fonderie/singlepass.c @@ -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