Browse Source

tracking a bug...

master
tonton Th 3 years ago
parent
commit
b1ae9f31ed
  1. 2
      floatimg.h
  2. 2
      lib/fimg-compare.c
  3. 13
      lib/interpolate.c
  4. 1
      tools/fimgops.c

2
floatimg.h

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
* floatimg.h
*/
#define FIMG_VERSION 91
#define FIMG_VERSION 92
/*
* in memory descriptor

2
lib/fimg-compare.c

@ -15,7 +15,7 @@ extern int verbosity; /* must be declared around main() */ @@ -15,7 +15,7 @@ extern int verbosity; /* must be declared around main() */
/* ---------------------------------------------------------------- */
int fimg_images_compatible(FloatImg *a, FloatImg *b)
{
#if DEBUG_LEVEL
#if DEBUG_LEVEL > 1
fprintf(stderr, ">>> %s ( %p %p )\n", __func__, a, b);
#endif

13
lib/interpolate.c

@ -41,23 +41,28 @@ int fimg_interpolate(FloatImg *s1, FloatImg *s2, FloatImg *d, float coef) @@ -41,23 +41,28 @@ int fimg_interpolate(FloatImg *s1, FloatImg *s2, FloatImg *d, float coef)
{
int foo;
#if DEBUG_LEVEL
fprintf(stderr, ">>> %s ( %p %p %p %f )\n", __func__,
s1, s2, d, coef);
#endif
foo = fimg_images_compatible(s1, s2);
if (foo) {
fprintf(stderr, "compat -> %d\n", foo);
fprintf(stderr, "compat s1 s2 -> %d\n", foo);
return foo;
}
foo = fimg_images_compatible(s1, d);
if (foo) {
fprintf(stderr, "compat -> %d\n", foo);
fprintf(stderr, "compat s1 d -> %d\n", foo);
return foo;
}
switch (s1->type) {
case FIMG_TYPE_GRAY:
gray_interpolate(s1, s2, d, coef); break;
gray_interpolate (s1, s2, d, coef); break;
case FIMG_TYPE_RGB:
rgb_interpolate(s1, s2, d, coef); break;
rgb_interpolate (s1, s2, d, coef); break;
default:
fprintf(stderr, "%s, %d is a bad type\n", __func__, s1->type);
return -18;

1
tools/fimgops.c

@ -95,6 +95,7 @@ switch (action) { @@ -95,6 +95,7 @@ switch (action) {
case OP_MAXI:
foo = fimg_minimum(A, B, D); break;
default:
fprintf(stderr, "fscking action #%d\n", action);
foo = -99; break;
}

Loading…
Cancel
Save