Browse Source

killed a mega bug in the upscaling

master
tonton Th 3 years ago
parent
commit
5758f1c932
  1. 2
      floatimg.h
  2. 8
      lib/fimg-core.c
  3. 3
      v4l2/rgb2fimg.c

2
floatimg.h

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

8
lib/fimg-core.c

@ -197,6 +197,14 @@ return 0; @@ -197,6 +197,14 @@ return 0;
int fimg_add_rgb(FloatImg *head, int x, int y, float r, float g, float b)
{
int offset;
if (head->type != FIMG_TYPE_RGB) {
#if DEBUG_LEVEL > 1
fprintf(stderr, "%s : type %d is bad.\n", __func__, head->type);
#endif
return -1;
}
offset = x + (y * head->width);
head->R[offset] += r;
head->G[offset] += g;

3
v4l2/rgb2fimg.c

@ -41,9 +41,8 @@ for (y=0; y<h; y++) { @@ -41,9 +41,8 @@ for (y=0; y<h; y++) {
r = (float)*src++;
g = (float)*src++;
b = (float)*src++;
fimg_plot_rgb(d, xx, yy, r, g, b);
fimg_add_rgb(d, xx, yy, r, g, b);
}
}
modz++;

Loading…
Cancel
Save