useless comments
This commit is contained in:
parent
3712ef9efe
commit
29fff3c578
@ -15,6 +15,10 @@
|
|||||||
extern int verbosity; /* must be declared around main() */
|
extern int verbosity; /* must be declared around main() */
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
|
/*
|
||||||
|
* A + B -> D
|
||||||
|
* why is this func so slow ?
|
||||||
|
*/
|
||||||
int fimg_add(FloatImg *a, FloatImg *b, FloatImg *d)
|
int fimg_add(FloatImg *a, FloatImg *b, FloatImg *d)
|
||||||
{
|
{
|
||||||
int idx, nbiter;
|
int idx, nbiter;
|
||||||
@ -57,6 +61,9 @@ if (3 != a->type || 3 != b->type || 3 != d->type) {
|
|||||||
|
|
||||||
nbiter = a->width * a->height;
|
nbiter = a->width * a->height;
|
||||||
|
|
||||||
|
/* maybe we can speedup this loop for
|
||||||
|
* avoiding the cache strashing ?
|
||||||
|
*/
|
||||||
for (idx=0; idx<nbiter; idx++) {
|
for (idx=0; idx<nbiter; idx++) {
|
||||||
d->R[idx] = fabs(a->R[idx] - b->R[idx]);
|
d->R[idx] = fabs(a->R[idx] - b->R[idx]);
|
||||||
d->G[idx] = fabs(a->G[idx] - b->G[idx]);
|
d->G[idx] = fabs(a->G[idx] - b->G[idx]);
|
||||||
|
@ -41,6 +41,8 @@ for (y=0; y<h; y++) {
|
|||||||
r = (float)*src++;
|
r = (float)*src++;
|
||||||
g = (float)*src++;
|
g = (float)*src++;
|
||||||
b = (float)*src++;
|
b = (float)*src++;
|
||||||
|
|
||||||
|
/* may be, here, we can speed up the job */
|
||||||
fimg_add_rgb(d, xx, yy, r, g, b);
|
fimg_add_rgb(d, xx, yy, r, g, b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user