commit whitout testing :)

This commit is contained in:
tth 2021-02-22 14:44:02 +01:00
parent 568811eb90
commit 3fce2b19c5
2 changed files with 32 additions and 7 deletions

View File

@ -120,10 +120,6 @@ int insert_picture(FloatImg *src)
FloatImg *dst; FloatImg *dst;
int nbre; int nbre;
/*
* this is the where we can insert the 'input filter'
*/
dst = &g_fifo.slots[g_fifo.next]; dst = &g_fifo.slots[g_fifo.next];
nbre = dst->width * dst->height * sizeof(float); nbre = dst->width * dst->height * sizeof(float);

View File

@ -43,20 +43,49 @@ int insert_blank(FloatImg *image, int nbre, int pproc,
float fval, char *outd) float fval, char *outd)
{ {
int idx, foo; int idx, foo;
int preloaded = 0;
FloatImg blank;
char *fname;
#if DEBUG_LEVEL
fprintf(stderr, ">>> %s ( %p %d %d %f '%s' )\n", __func__,
image, nbre, pproc, fval, outd);
#endif
if (NULL != (fname=getenv("BLANK_FIMG"))) {
fprintf(stderr,"try to load %s\n", fname);
fimg_clone(image, &blank, 1);
foo = fimg_load_from_dump(fname, &blank);
if (foo) {
fprintf(stderr, "epic fail %d on %s\n", foo, fname);
exit(1);
}
if (verbosity) fimg_describe(&blank, "Blank pic");
preloaded = 1;
}
fimg_clear(image); fimg_clear(image);
for (idx=0; idx<nbre; idx++) { for (idx=0; idx<nbre; idx++) {
fimg_vdeg_a(image, fval); if (preloaded) {
// brotche_rand48_b(image, drand48()*0.10, 1e5); fimg_copy_data(&blank, image);
}
else {
fimg_hdeg_a(image, fval);
}
if ((foo=traite_une_image(image, pproc, 1, outd))) { if ((foo=traite_une_image(image, pproc, 1, outd))) {
fprintf(stderr, "%s : err %d from 'traite_une_image'\n", fprintf(stderr, "%s : err %d from 'traite_une_image'\n",
__func__, foo); __func__, foo);
break; break;
} }
printf("\t%c\r", "ABCDEF"[idx%6]); fflush(stdout); printf("\t%c\r", "ABCDEFGH"[idx%8]); fflush(stdout);
} }
puts(""); puts("");
if (preloaded) {
fimg_destroy(&blank);
}
return 0; return 0;
} }
/* -------------------------------------------------------------- */ /* -------------------------------------------------------------- */