From 4597598b0293c6e719f187110bca4666333bda47 Mon Sep 17 00:00:00 2001 From: tth Date: Fri, 4 Feb 2022 23:39:52 +0100 Subject: [PATCH] konrad is up :) --- Fonderie/fifo.c | 4 ++-- Fonderie/interpolator.c | 2 +- Fonderie/metriques.c | 11 +++++++++++ Fonderie/single.c | 2 +- README.md | 12 ++++++++++-- floatimg.h | 2 +- funcs/decomprgb.c | 2 +- funcs/displacement.c | 4 ++++ funcs/fimg-png.c | 12 ++++++++---- funcs/killrgb.c | 2 +- funcs/sfx4.c | 2 +- funcs/t.c | 2 ++ 12 files changed, 43 insertions(+), 14 deletions(-) diff --git a/Fonderie/fifo.c b/Fonderie/fifo.c index ef12b355..a58d9000 100644 --- a/Fonderie/fifo.c +++ b/Fonderie/fifo.c @@ -26,7 +26,7 @@ extern int verbosity; static A_Fifo g_fifo; /* -------------------------------------------------------------- */ -static int big_adder(FloatImg *from, FloatImg *to) +static inline int big_adder(FloatImg *from, FloatImg *to) { int size, idx; @@ -90,7 +90,7 @@ int export_fifo(char *fname, int notused) int foo, type; #if DEBUG_LEVEL -fprintf(stderr, ">>> %s ( '%s' %d )\n", __func__, fname, step); +fprintf(stderr, ">>> %s ( '%s' %d )\n", __func__, fname, notused); #endif foo = faire_la_somme(&g_fifo, NULL, 1); diff --git a/Fonderie/interpolator.c b/Fonderie/interpolator.c index 6e83d82e..d25392a2 100644 --- a/Fonderie/interpolator.c +++ b/Fonderie/interpolator.c @@ -175,7 +175,7 @@ for (idx=0; idx %d\n", cptr, foo); continue; } - value = idx_values[idx].value; + value = idx_values[idx].value; /* WTF ? */ /* here was the input filter */ foo = filterstack_run(0, &B, 0); diff --git a/Fonderie/metriques.c b/Fonderie/metriques.c index eccc42be..c996f174 100644 --- a/Fonderie/metriques.c +++ b/Fonderie/metriques.c @@ -86,6 +86,9 @@ for (idx=20; idx < size; idx+=42) { return 0; } /* -------------------------------------------------------------- */ +/* + * LR mean left/right + */ int get_float_metric_LR(FloatImg *pimg, float *where) { int coords[4], foo; @@ -97,8 +100,16 @@ coords[2] = pimg->width / 2; // W coords[3] = pimg->height; // H foo = stat_zone(pimg, coords, valL); +if (foo) { + fprintf(stderr, "err %d stat zone in %s\n", foo, __func__); + return foo; + } coords[1] = pimg->width / 2; foo = stat_zone(pimg, coords, valR); +if (foo) { + fprintf(stderr, "err %d stat zone in %s\n", foo, __func__); + return foo; + } *where = valL[1] - valR[1]; diff --git a/Fonderie/single.c b/Fonderie/single.c index e0194168..905f1f42 100644 --- a/Fonderie/single.c +++ b/Fonderie/single.c @@ -25,7 +25,7 @@ static int nextpng, counter; static char *destination; static int chainfilter; -static int outtype; +// static int outtype; /* and the classic global var */ extern int verbosity; diff --git a/README.md b/README.md index e38f08b9..3ba844f2 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,16 @@ apt install libv4l2-dev apt install libcfitsio-dev apt install libnetpbm-dev ``` -Il est probable que j'en oublient. Ensuite, j'ai dans l'idée de construire -um met-packet à la sauce Debian pour installer facilement tout ce +Il est probable que j'en oublie. +Et ya Debian qui change des trucs, alors, ça marche plus + +``` +E: Unable to locate package libv4l2-dev +E: Unable to locate package libnetpbm-dev +``` + +Ensuite, j'ai dans l'idée de construire +um meta-packet à la sauce Debian pour installer facilement tout ce qui sert à faire fonctionner ce kluge. Ensuite, j'irais voir du coté de pkg-config. diff --git a/floatimg.h b/floatimg.h index 9450db25..7e7ea51c 100644 --- a/floatimg.h +++ b/floatimg.h @@ -4,7 +4,7 @@ * http://la.buvette.org/photos/cumul */ -#define FIMG_VERSION 166 +#define FIMG_VERSION 167 /* * in memory descriptor diff --git a/funcs/decomprgb.c b/funcs/decomprgb.c index 55f938e8..483fb867 100644 --- a/funcs/decomprgb.c +++ b/funcs/decomprgb.c @@ -36,7 +36,7 @@ return 42.0; int fimg_decomp_rgbz_color(FloatImg *psrc, FloatImg *pdst, int k) { int x, y, x2, y2; -int w2, h2, idx; +int w2, h2; float cumul, vgray; #if DEBUG_LEVEL diff --git a/funcs/displacement.c b/funcs/displacement.c index 8e47a338..e7f7a9f3 100644 --- a/funcs/displacement.c +++ b/funcs/displacement.c @@ -40,6 +40,10 @@ if (fimg_images_not_compatible(psrc, pdst)) { } foo = fimg_get_minmax_rgb(psrc, minmax); +if (foo) { + fprintf(stderr, "%s : err %d on get minmax\n", __func__, foo); + return foo; + } if (verbosity) { fimg_print_minmax(minmax, (char *)__func__); } diff --git a/funcs/fimg-png.c b/funcs/fimg-png.c index 3e9ebd32..815b0d3d 100644 --- a/funcs/fimg-png.c +++ b/funcs/fimg-png.c @@ -87,7 +87,7 @@ if (PNG_NO_ERROR != foo) { } ptr = datas; -for (idx=0; idxR[idx] = (float)*ptr++; fimg->G[idx] = (float)*ptr++; fimg->B[idx] = (float)*ptr++; @@ -132,12 +132,12 @@ if ( 3 != png.bpp ) { /* TO BE PATCHED */ } /* check if floatimg and PNG have the same size */ -if ((fimg->width != png.width) || (fimg->height != png.height)) { +if ((fimg->width != (int)png.width) || (fimg->height != (int)png.height)) { fprintf(stderr, "%s : fatal error on images sizes\n", __func__); exit(1); } -datasize = png.width * png.height * png.bpp; +datasize = png.width * png.height * png.bpp; datas = malloc(datasize); if (NULL==datas) { fprintf(stderr, "%s : fatal memory failure\n", __func__); @@ -151,7 +151,7 @@ if (PNG_NO_ERROR != foo) { } ptr = datas; -for (idx=0; idxR[idx] = (float)*ptr++; fimg->G[idx] = (float)*ptr++; fimg->B[idx] = (float)*ptr++; @@ -174,6 +174,10 @@ double maximum, fk; fprintf(stderr, ">>> %-25s ( %p '%s' 0x%x )\n", __func__, src, outname, flags); #endif +if (flags) { + fprintf(stderr, "*** in %s, flags are %08x\n", __func__, flags); + } + /* convert ou floating datas to a byte/rgb array */ /* first, alloc a buffer */ sz = src->width * src->height; diff --git a/funcs/killrgb.c b/funcs/killrgb.c index f61c2854..a2b669ec 100644 --- a/funcs/killrgb.c +++ b/funcs/killrgb.c @@ -16,7 +16,7 @@ int fimg_killrgb_v(FloatImg *src, FloatImg *dst, int k) { -int foo, line, col; +int line, col; int ir; #if DEBUG_LEVEL diff --git a/funcs/sfx4.c b/funcs/sfx4.c index c21883a5..0643146a 100644 --- a/funcs/sfx4.c +++ b/funcs/sfx4.c @@ -47,7 +47,7 @@ return 0; int fimg_split_level(FloatImg *src, FloatImg *dst, int notused) { float means[4]; -float in[3], out[3]; +float in[3]; int foo, idx, surface; #if DEBUG_LEVEL diff --git a/funcs/t.c b/funcs/t.c index 2e84efd5..70d0c26d 100644 --- a/funcs/t.c +++ b/funcs/t.c @@ -106,6 +106,8 @@ while (pcmd->name) { } fprintf(stderr, "\ncompiled on "__DATE__" at "__TIME__"\n"); +if (k) fimg_print_version(k); + exit(0); } /* --------------------------------------------------------------------- */