Browse Source

input and output filterchain on interpolator

master
tonton th 2 years ago
parent
commit
79a09dd7bc
  1. 2
      Fonderie/crapulator.c
  2. 4
      Fonderie/filterstack.c
  3. 2
      Fonderie/filterstack.h
  4. 19
      Fonderie/interpolator.c

2
Fonderie/crapulator.c

@ -178,7 +178,7 @@ switch (idFx) { @@ -178,7 +178,7 @@ switch (idFx) {
image->height/20);
break;
case 16:
retval = bouger_les_pixels(image, 6);
retval = bouger_les_pixels(image, 8);
break;
case 17:
retval = mirror_split(image, 0);

4
Fonderie/filterstack.c

@ -20,10 +20,10 @@ extern int verbosity; @@ -20,10 +20,10 @@ extern int verbosity;
static FilterStack f_stacks[NUMBER_OF_STACK];
/* -------------------------------------------------------------- */
int filterstack_init(int numid, int nbre)
int filterstack_init(int numid, int notused)
{
#if DEBUG_LEVEL
fprintf(stderr, ">>> %s ( %d %d )\n", __func__, numid, nbre);
fprintf(stderr, ">>> %s ( %d %d )\n", __func__, numid, notused);
#endif
if (numid < 0 || numid > NUMBER_OF_STACK) {

2
Fonderie/filterstack.h

@ -16,7 +16,7 @@ typedef struct { @@ -16,7 +16,7 @@ typedef struct {
FilterSlot slots[FILTER_BY_STACK];
} FilterStack;
int filterstack_init(int numid, int nbre);
int filterstack_init(int numid, int notused);
int filterstack_add(int numid, int code, int ival, float fval);

19
Fonderie/interpolator.c

@ -243,15 +243,17 @@ int opt; @@ -243,15 +243,17 @@ int opt;
int inFx = 0;
int outFx = 0;
int sort = 0;
char *filterchain = "0";
char *InFchain = "0";
char *OutFchain = "0";
fprintf(stderr, "*** %s : compiled by tTh, %s %s\n", __FILE__,
__DATE__, __TIME__);
fimg_print_version(2);
while ((opt = getopt(argc, argv, "F:hS:vw:x:")) != -1) {
while ((opt = getopt(argc, argv, "E:F:hS:vw:x:")) != -1) {
switch(opt) {
case 'F': filterchain = optarg; break;
case 'E': InFchain = optarg; break;
case 'F': OutFchain = optarg; break;
case 'h': help(); break;
case 'S': sort = atoi(optarg); break;
case 'v': verbosity++; break;
@ -269,9 +271,14 @@ if (3 != (argc-optind)) { @@ -269,9 +271,14 @@ if (3 != (argc-optind)) {
exit(1);
}
foo = parse_filter_chain(0, filterchain);
foo = parse_filter_chain(0, InFchain);
if (foo) {
fprintf(stderr, "err %d parsing '%s'\n", foo, filterchain);
fprintf(stderr, "err %d parsing '%s'\n", foo, InFchain);
exit(1);
}
foo = parse_filter_chain(1, OutFchain);
if (foo) {
fprintf(stderr, "err %d parsing '%s'\n", foo, OutFchain);
exit(1);
}
@ -281,7 +288,7 @@ nbrsteps = atoi(argv[optind+2]); @@ -281,7 +288,7 @@ nbrsteps = atoi(argv[optind+2]);
foo = interpolator(argv[optind], argv[optind+1], nbrsteps,
inFx, outFx, sort);
fprintf(stderr, "interpolator give a %d score\n", foo);
fprintf(stderr, "interpolator give us a %d score\n", foo);
return 0;
}

Loading…
Cancel
Save