forked from tTh/FloatImg
minors twicks
This commit is contained in:
parent
87f3fb95bd
commit
cc9619fdbe
|
@ -55,11 +55,10 @@ return 0;
|
||||||
int fimg_desaturate(FloatImg *src, FloatImg *dst, int k)
|
int fimg_desaturate(FloatImg *src, FloatImg *dst, int k)
|
||||||
{
|
{
|
||||||
int foo, nbb;
|
int foo, nbb;
|
||||||
float fval;
|
|
||||||
|
|
||||||
/* we must check the validity of our parameters */
|
/* we must check the validity of our parameters */
|
||||||
if (FIMG_TYPE_RGB != src->type || FIMG_TYPE_RGB != dst->type) {
|
if (FIMG_TYPE_RGB != src->type || FIMG_TYPE_RGB != dst->type) {
|
||||||
fprintf(stderr, "%s : bad image type\n", __func__, src->type, src);
|
fprintf(stderr, "%s : bad image type\n", __func__);
|
||||||
return -18;
|
return -18;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* OPERATORS
|
* OPERATORS
|
||||||
*
|
*
|
||||||
*
|
* operations entre des images.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -67,6 +67,8 @@ for (idx=0; idx<nbpixels; idx++) {
|
||||||
b->R[idx] += a->R[idx];
|
b->R[idx] += a->R[idx];
|
||||||
b->G[idx] += a->G[idx];
|
b->G[idx] += a->G[idx];
|
||||||
b->B[idx] += a->B[idx];
|
b->B[idx] += a->B[idx];
|
||||||
|
/* are we cache-friendly here ?
|
||||||
|
* we need an accurate benchmarking... */
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue