Compare commits

..

No commits in common. "73b8048dea6039dc8280aaea0fbc504724e3986c" and "ade40f20299abcebbb0502be09855b11cfd1d27b" have entirely different histories.

9 changed files with 12 additions and 66 deletions

View File

@ -157,7 +157,7 @@ return retval;
* processor.
*/
#define DEBUG_THIS_CRAP 100
#define DEBUG_THIS_CRAP 0
int crapulator(FloatImg *image, int idFx, float fval)
{
@ -262,13 +262,6 @@ switch (idFx) {
retval = trinitron(image, 0);
break;
case CR_sqrt:
retval = fimg_square_root(image, image, 1000.0);
break;
case CR_pow2:
retval = fimg_power_2(image, image, 1000.0);
break;
/* here are the glitches */
case CR_bsombra: /* experiment ! */
retval = des_bords_sombres_a(image, 160);
@ -298,8 +291,6 @@ switch (idFx) {
case CR_message:
fprintf(stderr, "### msg from pid %d, fval=%f ###\n",
getpid(), fval);
/* here, we can display stats ! */
fimg_describe(image, "in crapulator");
retval = 0;
break;

View File

@ -19,9 +19,7 @@
18 updown 1 1.0
19 hipass 1 1.0
20 octotree 1 1.0
21 trinitron 3 0.0
22 sqrt 1 0.0
23 pow2 1 0.0
21 trinitron 3, 0.0
24 bsombra 1 1.0
25 vsglitch 1 1.0
26 rndblks 1 1.0

View File

@ -51,11 +51,6 @@ fprintf(stderr, ">>> %s ( %p %p %d )\n", __func__,
pfifo, destination, step);
#endif
if (step<1){
fprintf(stderr, "***** %s invalid step %d\n", __func__, step);
exit(1);
}
if (NULL==destination) {
pdest = &(pfifo->total); }
else {
@ -73,11 +68,11 @@ for (idx=0; idx<pfifo->nbslots; idx += step) {
}
}
#if 0
/* XXX
fprintf(stderr, "*** %s:%s writing debugB file ***\n",
__FILE__, __func__);
fimg_dump_to_file(&g_fifo.total, "debugB.fimg", 0);
#endif
XXX */
return 0;
}
@ -101,10 +96,6 @@ if (foo) {
return foo;
}
#if 0
fimg_dump_to_file(&g_fifo.total, "outputXXX.fimg", 0);
#endif
foo = fimg_export_picture(&g_fifo.total, fname, 0);
if (foo) {
fprintf(stderr, "ERR EXPORT '%s' is %d\n", fname, foo);

View File

@ -118,7 +118,7 @@ for (idx=0; idx<f_stacks[numid].count; idx++) {
fv = f_stacks[numid].slots[idx].fval;
if (verbosity > 1)
fprintf(stderr, "stack %d idx %d : effect %2d on %p\n",
fprintf(stderr, "stack %d pass %d : effect %2d on %p\n",
numid, idx, eff, target);
foo = crapulator(target, eff, fv);

View File

@ -145,9 +145,6 @@ for (idx=0; idx<globbuf.gl_pathc; idx++) {
fprintf(stderr, "%s: input filter -> %d\n", __func__, foo);
exit(1);
}
#if 0
if (idx==42) fimg_dump_to_file(&input, "inputXXX.fimg", 0);
#endif
foo = traite_une_image(&input, outdir);
if (foo) {

View File

@ -10,7 +10,6 @@
extern int verbosity;
/* -------------------------------------------------------------- */
/* usage --> sfx.c:trinitron */
int stat_zone(FloatImg *pimg, int geom[4], float v3[3])
{
int x, y, xe, ye;
@ -44,12 +43,9 @@ return 0;
}
/* -------------------------------------------------------------- */
/*
* premier essai : moyenne de toutes les composantes
* de tous les pixels.
*
* Question: pourquoi pas le retour en double precision ?
* premier essai...
*/
int get_float_metric_avg(FloatImg *pimg, float *where)
int get_float_metric_a(FloatImg *pimg, float *where)
{
float means[4]; /* four values : R G B A */
int foo;
@ -67,8 +63,7 @@ if (foo) {
return 0;
}
/* -------------------------------------------------------------- */
/* echantillonage des pixels rouges */
int get_float_metric_iRed(FloatImg *pimg, float *where)
int get_float_metric_b(FloatImg *pimg, float *where)
{
int idx, size, nbre;
double adder;
@ -84,28 +79,6 @@ for (idx=20; idx < size; idx+=42) {
return 0;
}
/* -------------------------------------------------------------- */
int get_float_metric_LR(FloatImg *pimg, float *where)
{
int coords[4], foo;
float valL[3], valR[3];
coords[0] = 0; // X
coords[1] = 0; // Y
coords[2] = pimg->width / 2; // W
coords[3] = pimg->height; // H
foo = stat_zone(pimg, coords, valL);
coords[1] = pimg->width / 2;
foo = stat_zone(pimg, coords, valR);
*where = valL[1] - valR[1];
return 0;
}
/* -------------------------------------------------------------- */
/*
* et voici le grand dispactheur
*/
int get_float_metric_from_file(char *fname, float *where, int mode)
{
FloatImg image;
@ -124,13 +97,10 @@ if (foo) {
fval = -1.0; /* sensible default value */
switch (mode) {
case 0: case 1:
foo = get_float_metric_avg(&image, &fval);
foo = get_float_metric_a(&image, &fval);
break;
case 2:
foo = get_float_metric_iRed(&image, &fval);
break;
case 3:
foo = get_float_metric_LR(&image, &fval);
foo = get_float_metric_b(&image, &fval);
break;
default:
fprintf(stderr, "%s: method %d invalid\n",

View File

@ -61,7 +61,7 @@ int single_push_picture(FloatImg *pimg)
{
int foo;
char line[1000], buff[100];
char *extension = "png";
char *extension = ".png";
#if DEBUG_LEVEL
fprintf(stderr, ">>> %s ( %p )\n", __func__, pimg);

View File

@ -7,7 +7,6 @@ cp tools/mkfimg tools/fimg2pnm tools/fimgops \
tools/fimg2png tools/fimg2tiff tools/fimg2fits \
tools/png2fimg tools/fimgstats tools/fimgfx \
tools/cumulfimgs tools/fimg2text \
tools/fimghalfsize \
/usr/local/bin
cp v4l2/grabvidseq v4l2/video-infos \

View File

@ -60,7 +60,7 @@ for (idx=0; idx<nbre; idx++) {
d->B[idx] = maxval * sqrt(dval);
}
return 0;
return -1;
}
/* ---------------------------------------------------------------- */
int fimg_power_2(FloatImg *s, FloatImg *d, double maxval)