Browse Source

trinarize on stage

master
tonton th 2 years ago
parent
commit
4053baf7fd
  1. 15
      Fonderie/fonderie.c
  2. 6
      Fonderie/sfx.c

15
Fonderie/fonderie.c

@ -60,10 +60,9 @@ puts(""); @@ -60,10 +60,9 @@ puts("");
return 0;
}
/* -------------------------------------------------------------- */
#define BLANK 50
int demarre_la_machine(char *pattern, char *outdir, int szfifo,
int infx, int outfx, int step)
int infx, int outfx, int step, int blk)
{
int foo, idx, width, height;
glob_t globbuf;
@ -118,7 +117,7 @@ foo = create_fifo(szfifo, width, height, FIMG_TYPE_RGB); @@ -118,7 +117,7 @@ foo = create_fifo(szfifo, width, height, FIMG_TYPE_RGB);
fprintf(stderr, "init fifo (%d slots) --> %d\n", szfifo, foo);
/* XXX inject a few strange pics in the fifo */
insert_blank(&input, BLANK, outfx, maxvalue, outdir);
insert_blank(&input, blk, outfx, maxvalue, outdir);
for (idx=0; idx<globbuf.gl_pathc; idx++) {
cptr = globbuf.gl_pathv[idx];
@ -145,7 +144,7 @@ for (idx=0; idx<globbuf.gl_pathc; idx++) { @@ -145,7 +144,7 @@ for (idx=0; idx<globbuf.gl_pathc; idx++) {
}
fputs("\n", stderr);
insert_blank(&input, BLANK*2, outfx, maxvalue, outdir);
insert_blank(&input, blk, outfx, maxvalue, outdir);
/*
* PLEASE, FLUSH THE FIFO !
@ -186,14 +185,16 @@ char *out_dir = "p8"; @@ -186,14 +185,16 @@ char *out_dir = "p8";
int in_effect = 0;
int out_effect = 0;
int steps = 1;
int blanks = 20;
fprintf(stderr, "*** %s :\n\tcompiled by tTh, %s %s\n\tpid %d\n",
argv[0], __DATE__, __TIME__, getpid());
fimg_print_version(2);
while ((opt = getopt(argc, argv, "ghI:O:s:T:vw:x:")) != -1) {
while ((opt = getopt(argc, argv, "B:ghI:O:s:T:vw:x:")) != -1) {
switch(opt) {
case 'B': blanks = atoi(optarg);
break;
case 'g': convert_to_gray = 1;
break;
case 'h': help();
@ -221,7 +222,7 @@ if (verbosity) { @@ -221,7 +222,7 @@ if (verbosity) {
}
foo = demarre_la_machine(in_pattern, out_dir, fifosize, in_effect,
out_effect, steps);
out_effect, steps, blanks);
fprintf(stderr, "retour du big-run de la machine -> %d\n", foo);
return 0;

6
Fonderie/sfx.c

@ -80,19 +80,19 @@ for (foo=0; foo<size; foo++) { @@ -80,19 +80,19 @@ for (foo=0; foo<size; foo++) {
if (fptr[foo] < mRa || fptr[foo] > mRb)
fptr[foo] = 0.0;
else
fptr[foo] = VAL;
fptr[foo] = mm[1];
fptr = pimg->G;
if (fptr[foo] < mGa || fptr[foo] > mGb)
fptr[foo] = 0.0;
else
fptr[foo] = VAL;
fptr[foo] = mm[3];
fptr = pimg->B;
if (fptr[foo] < mBa || fptr[foo] > mBb)
fptr[foo] = 0.0;
else
fptr[foo] = VAL;
fptr[foo] = mm[5];
}

Loading…
Cancel
Save