cleanup some useless code

This commit is contained in:
Tonton Th 2021-01-03 20:34:10 +01:00
parent 8425496f3f
commit 46fad56471

View File

@ -147,10 +147,12 @@ if (FIMG_TYPE_RGB != iarray[2]) {
exit(1); /* BLAM! */ exit(1); /* BLAM! */
} }
#if 0
if (infx) fprintf(stderr, "\tin fx #%d\n", infx); if (infx) fprintf(stderr, "\tin fx #%d\n", infx);
else fprintf(stderr, "\tno in fx\n"); else fprintf(stderr, "\tno in fx\n");
if (outfx) fprintf(stderr, "\tout fx #%d\n", outfx); if (outfx) fprintf(stderr, "\tout fx #%d\n", outfx);
else fprintf(stderr, "\tno out fx\n"); 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);
@ -178,14 +180,8 @@ for (idx=0; idx<globbuf.gl_pathc; idx++) {
} }
value = idx_values[idx].value; value = idx_values[idx].value;
/* here, insert the input filter */ /* here was the input filter */
if (infx) {
foo = crapulator(&B, infx, value);
}
else {
foo = filterstack_run(0, &B, 0); foo = filterstack_run(0, &B, 0);
}
if (foo) { if (foo) {
fprintf(stderr, "%s: input fx fail %d\n", __func__, foo); fprintf(stderr, "%s: input fx fail %d\n", __func__, foo);
exit(1); exit(1);
@ -195,14 +191,6 @@ for (idx=0; idx<globbuf.gl_pathc; idx++) {
coef = (float)step / (float)Nsteps; coef = (float)step / (float)Nsteps;
fimg_interpolate(pSecond, pFirst, &Out, coef); fimg_interpolate(pSecond, pFirst, &Out, coef);
/* here we can insert the OUTPUT filter */
// foo = crapulator(&Out, outfx, value);
//if (foo) {
// fprintf(stderr, "\n%s: out fx %d failure %d\n",
// __func__, outfx, foo);
// exit(1);
// }
foo = filterstack_run(1, &Out, 0); foo = filterstack_run(1, &Out, 0);
if (foo) { if (foo) {
fprintf(stderr, "run filt stack--> %d\n", foo); fprintf(stderr, "run filt stack--> %d\n", foo);
@ -245,12 +233,17 @@ 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\tmysterious sort"); puts("\t-S nn\t\tmysterious sort");
puts("\t-F i:j\tfilter chain"); puts("\t-E i:bla:k\tinput filter chain");
puts("\t-L\tlist available filters"); puts("\t-F name:j\toutput filter chain");
puts("\t-w nn\tinput effect"); puts("\t-L\t\tlist available filters");
puts("\t-x nn\toutput effect"); puts("\t-w nn\t\tinput effect");
puts("\t-v\tincrease verbosity"); puts("\t-x nn\t\toutput effect");
puts("\t-v\t\tincrease verbosity");
if (verbosity) {
list_crapulors("available filters");
}
exit(0); exit(0);
} }
@ -291,9 +284,9 @@ while ((opt = getopt(argc, argv, "E:F:hLS:vw:x:")) != -1) {
} }
} }
//#if DEBUG_LEVEL #if DEBUG_LEVEL
fprintf(stderr, "%s: argc = %d, optind = %d\n", argv[0], argc, optind); fprintf(stderr, "%s: argc = %d, optind = %d\n", argv[0], argc, optind);
//#endif #endif
if (3 != (argc-optind)) { if (3 != (argc-optind)) {
fprintf(stderr, "args: [options] <inglob> <outdir> <nbsteep>\n"); fprintf(stderr, "args: [options] <inglob> <outdir> <nbsteep>\n");