konrad is up :)

This commit is contained in:
tth 2022-02-04 23:39:52 +01:00
parent db7b740b2c
commit 4597598b02
12 changed files with 43 additions and 14 deletions

View File

@ -26,7 +26,7 @@ extern int verbosity;
static A_Fifo g_fifo; 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; int size, idx;
@ -90,7 +90,7 @@ int export_fifo(char *fname, int notused)
int foo, type; int foo, type;
#if DEBUG_LEVEL #if DEBUG_LEVEL
fprintf(stderr, ">>> %s ( '%s' %d )\n", __func__, fname, step); fprintf(stderr, ">>> %s ( '%s' %d )\n", __func__, fname, notused);
#endif #endif
foo = faire_la_somme(&g_fifo, NULL, 1); foo = faire_la_somme(&g_fifo, NULL, 1);

View File

@ -175,7 +175,7 @@ for (idx=0; idx<globbuf.gl_pathc; idx++) {
fprintf(stderr, "load %s from dump -> %d\n", cptr, foo); fprintf(stderr, "load %s from dump -> %d\n", cptr, foo);
continue; continue;
} }
value = idx_values[idx].value; value = idx_values[idx].value; /* WTF ? */
/* here was the input filter */ /* here was the input filter */
foo = filterstack_run(0, &B, 0); foo = filterstack_run(0, &B, 0);

View File

@ -86,6 +86,9 @@ for (idx=20; idx < size; idx+=42) {
return 0; return 0;
} }
/* -------------------------------------------------------------- */ /* -------------------------------------------------------------- */
/*
* LR mean left/right
*/
int get_float_metric_LR(FloatImg *pimg, float *where) int get_float_metric_LR(FloatImg *pimg, float *where)
{ {
int coords[4], foo; int coords[4], foo;
@ -97,8 +100,16 @@ coords[2] = pimg->width / 2; // W
coords[3] = pimg->height; // H coords[3] = pimg->height; // H
foo = stat_zone(pimg, coords, valL); 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; coords[1] = pimg->width / 2;
foo = stat_zone(pimg, coords, valR); 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]; *where = valL[1] - valR[1];

View File

@ -25,7 +25,7 @@
static int nextpng, counter; static int nextpng, counter;
static char *destination; static char *destination;
static int chainfilter; static int chainfilter;
static int outtype; // static int outtype;
/* and the classic global var */ /* and the classic global var */
extern int verbosity; extern int verbosity;

View File

@ -38,8 +38,16 @@ apt install libv4l2-dev
apt install libcfitsio-dev apt install libcfitsio-dev
apt install libnetpbm-dev apt install libnetpbm-dev
``` ```
Il est probable que j'en oublient. Ensuite, j'ai dans l'idée de construire Il est probable que j'en oublie.
um met-packet à la sauce Debian pour installer facilement tout ce 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 qui sert à faire fonctionner ce kluge. Ensuite, j'irais voir du
coté de pkg-config. coté de pkg-config.

View File

@ -4,7 +4,7 @@
* http://la.buvette.org/photos/cumul * http://la.buvette.org/photos/cumul
*/ */
#define FIMG_VERSION 166 #define FIMG_VERSION 167
/* /*
* in memory descriptor * in memory descriptor

View File

@ -36,7 +36,7 @@ return 42.0;
int fimg_decomp_rgbz_color(FloatImg *psrc, FloatImg *pdst, int k) int fimg_decomp_rgbz_color(FloatImg *psrc, FloatImg *pdst, int k)
{ {
int x, y, x2, y2; int x, y, x2, y2;
int w2, h2, idx; int w2, h2;
float cumul, vgray; float cumul, vgray;
#if DEBUG_LEVEL #if DEBUG_LEVEL

View File

@ -40,6 +40,10 @@ if (fimg_images_not_compatible(psrc, pdst)) {
} }
foo = fimg_get_minmax_rgb(psrc, minmax); foo = fimg_get_minmax_rgb(psrc, minmax);
if (foo) {
fprintf(stderr, "%s : err %d on get minmax\n", __func__, foo);
return foo;
}
if (verbosity) { if (verbosity) {
fimg_print_minmax(minmax, (char *)__func__); fimg_print_minmax(minmax, (char *)__func__);
} }

View File

@ -87,7 +87,7 @@ if (PNG_NO_ERROR != foo) {
} }
ptr = datas; ptr = datas;
for (idx=0; idx<png.width * png.height; idx++) { for (idx=0; idx<(int)(png.width*png.height); idx++) {
fimg->R[idx] = (float)*ptr++; fimg->R[idx] = (float)*ptr++;
fimg->G[idx] = (float)*ptr++; fimg->G[idx] = (float)*ptr++;
fimg->B[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 */ /* 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__); fprintf(stderr, "%s : fatal error on images sizes\n", __func__);
exit(1); exit(1);
} }
datasize = png.width * png.height * png.bpp; datasize = png.width * png.height * png.bpp;
datas = malloc(datasize); datas = malloc(datasize);
if (NULL==datas) { if (NULL==datas) {
fprintf(stderr, "%s : fatal memory failure\n", __func__); fprintf(stderr, "%s : fatal memory failure\n", __func__);
@ -151,7 +151,7 @@ if (PNG_NO_ERROR != foo) {
} }
ptr = datas; ptr = datas;
for (idx=0; idx<png.width * png.height; idx++) { for (idx=0; idx<(int)(png.width*png.height); idx++) {
fimg->R[idx] = (float)*ptr++; fimg->R[idx] = (float)*ptr++;
fimg->G[idx] = (float)*ptr++; fimg->G[idx] = (float)*ptr++;
fimg->B[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); fprintf(stderr, ">>> %-25s ( %p '%s' 0x%x )\n", __func__, src, outname, flags);
#endif #endif
if (flags) {
fprintf(stderr, "*** in %s, flags are %08x\n", __func__, flags);
}
/* convert ou floating datas to a byte/rgb array */ /* convert ou floating datas to a byte/rgb array */
/* first, alloc a buffer */ /* first, alloc a buffer */
sz = src->width * src->height; sz = src->width * src->height;

View File

@ -16,7 +16,7 @@
int fimg_killrgb_v(FloatImg *src, FloatImg *dst, int k) int fimg_killrgb_v(FloatImg *src, FloatImg *dst, int k)
{ {
int foo, line, col; int line, col;
int ir; int ir;
#if DEBUG_LEVEL #if DEBUG_LEVEL

View File

@ -47,7 +47,7 @@ return 0;
int fimg_split_level(FloatImg *src, FloatImg *dst, int notused) int fimg_split_level(FloatImg *src, FloatImg *dst, int notused)
{ {
float means[4]; float means[4];
float in[3], out[3]; float in[3];
int foo, idx, surface; int foo, idx, surface;
#if DEBUG_LEVEL #if DEBUG_LEVEL

View File

@ -106,6 +106,8 @@ while (pcmd->name) {
} }
fprintf(stderr, "\ncompiled on "__DATE__" at "__TIME__"\n"); fprintf(stderr, "\ncompiled on "__DATE__" at "__TIME__"\n");
if (k) fimg_print_version(k);
exit(0); exit(0);
} }
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */