Compare commits

..

No commits in common. "785b521d4fd74c21389afc447007e96f40dda96e" and "6a53282cd99105034360863b553b11e2bd26a63d" have entirely different histories.

4 changed files with 20 additions and 20 deletions

View File

@ -31,8 +31,8 @@ convert -delay 200 /tmp/fstack*.png foo.gif
essai_singlepass () essai_singlepass ()
{ {
MP4="/home/tth/Essais/FondageDePlomb/foo.mp4" MP4="/home/tth/Essais/FondageDePlomb/foo.mp4"
INPUT="/home/tth/Essais/FondageDePlomb/capture/00???.fimg" INPUT="/home/tth/Essais/FondageDePlomb/capture/??090.fimg"
FILTRE="trinitron" FILTRE="water:liss3x3"
OUTDIR="/tmp/x8/" OUTDIR="/tmp/x8/"
echo '********* essai single *********' echo '********* essai single *********'

View File

@ -33,13 +33,8 @@ typedef struct {
float value; /* from metric analyse */ float value; /* from metric analyse */
} IdxValue; } IdxValue;
static int negative = 0;
static int cmp_idxvalues(const void *pa, const void *pb) static int cmp_idxvalues(const void *pa, const void *pb)
{ {
if (negative)
return ( ((IdxValue *)pa)->value < ((IdxValue *)pb)->value);
else
return ( ((IdxValue *)pa)->value > ((IdxValue *)pb)->value); return ( ((IdxValue *)pa)->value > ((IdxValue *)pb)->value);
} }
@ -128,8 +123,6 @@ IdxValue *idx_values; /* gni? */
fprintf(stderr, " interpolate from '%s' to '%s' with %d steps.\n", fprintf(stderr, " interpolate from '%s' to '%s' with %d steps.\n",
pattern, outdir, Nsteps); pattern, outdir, Nsteps);
if (negative) fprintf(stderr, "%s: negative on\n", __func__);
memset(&globbuf, 0, sizeof(glob_t)); memset(&globbuf, 0, sizeof(glob_t));
foo = glob(pattern, 0, NULL, &globbuf); foo = glob(pattern, 0, NULL, &globbuf);
fprintf(stderr, "globbing '%s' -> %d, %d files found\n", fprintf(stderr, "globbing '%s' -> %d, %d files found\n",
@ -153,6 +146,13 @@ if (FIMG_TYPE_RGB != iarray[2]) {
exit(1); /* BLAM! */ exit(1); /* BLAM! */
} }
#if 0
if (infx) fprintf(stderr, "\tin fx #%d\n", infx);
else fprintf(stderr, "\tno in fx\n");
if (outfx) fprintf(stderr, "\tout fx #%d\n", outfx);
else fprintf(stderr, "\tno out fx\n");
#endif
w = iarray[0], h = iarray[1]; w = iarray[0], h = iarray[1];
fprintf(stderr, "first image size : %dx%d\n", w, h); fprintf(stderr, "first image size : %dx%d\n", w, h);
@ -232,11 +232,12 @@ puts("usage:\n\tinterpolator [options] <inglob> <outdir> <nbsteep>");
* the options of 'fonderie' software ? * the options of 'fonderie' software ?
*/ */
puts("options:"); puts("options:");
puts("\t-S nn\t\tmysterious sort");
puts("\t-E i:bla:k\tinput filter chain"); puts("\t-E i:bla:k\tinput filter chain");
puts("\t-F name:j\toutput filter chain"); puts("\t-F name:j\toutput filter chain");
puts("\t-n\t\tmake negative");
puts("\t-S nn\t\tmysterious sort");
puts("\t-L\t\tlist available filters"); puts("\t-L\t\tlist available filters");
// OBSOLETE puts("\t-w nn\t\tinput effect");
// OBSOLETE puts("\t-x nn\t\toutput effect");
puts("\t-v\t\tincrease verbosity"); puts("\t-v\t\tincrease verbosity");
if (verbosity) { if (verbosity) {
@ -267,7 +268,7 @@ for (foo=0; foo<argc; foo++)
fprintf(stderr, "%5d %s\n", foo, argv[foo]); fprintf(stderr, "%5d %s\n", foo, argv[foo]);
#endif #endif
while ((opt = getopt(argc, argv, "E:F:hLnS:v")) != -1) { while ((opt = getopt(argc, argv, "E:F:hLS:vw:x:")) != -1) {
switch(opt) { switch(opt) {
case 'E': InFchain = optarg; break; case 'E': InFchain = optarg; break;
case 'F': OutFchain = optarg; break; case 'F': OutFchain = optarg; break;
@ -277,7 +278,8 @@ while ((opt = getopt(argc, argv, "E:F:hLnS:v")) != -1) {
exit(0); exit(0);
case 'S': sort = atoi(optarg); break; case 'S': sort = atoi(optarg); break;
case 'v': verbosity++; break; case 'v': verbosity++; break;
case 'n': negative = 1; break; // OBSOLETE case 'w': inFx = atoi(optarg); break;
// OBSOLETE case 'x': outFx = atoi(optarg); break;
} }
} }

View File

@ -48,12 +48,11 @@ return -1;
/* nouveau du premier dimanche de 2020 'nextgen' */ /* nouveau du premier dimanche de 2020 'nextgen' */
static int pixel_trinitron(FloatImg *pimg, int pos[4], float *fvals) static int pixel_trinitron(FloatImg *pimg, int pos[4], float *fvals)
{ {
int x, y, pline, off; int x, y, off;
for (y=pos[1]; y<pos[1]+pos[3]; y++) { for (y=pos[1]; y<pos[1]+pos[3]; y++) {
pline = y*pimg->width; for (x=pos[0]+1; x<pos[0]+pos[2]-1; x++) {
for (x=pos[0]+2; x<pos[0]+pos[2]-2; x++) { off = (y*pimg->width) + x;
off = pline + x;
pimg->R[off] = fvals[0]; pimg->R[off] = fvals[0];
pimg->G[off] = fvals[1]; pimg->G[off] = fvals[1];
pimg->B[off] = fvals[2]; pimg->B[off] = fvals[2];

View File

@ -104,8 +104,7 @@ fimg_destroy(&image);
single_print_state("end of run :)", 0); single_print_state("end of run :)", 0);
elapsed = fimg_timer_get(0); elapsed = fimg_timer_get(0);
fprintf(stderr, "%s: %d frames, elapsed %.3f s, %.3f fps\n", fprintf(stderr, " %d frames, elapsed %.3f s, %.3f fps\n",
__func__,
globbuf.gl_pathc, elapsed, globbuf.gl_pathc, elapsed,
(double)globbuf.gl_pathc/elapsed); (double)globbuf.gl_pathc/elapsed);