diff --git a/lib/operators.c b/lib/operators.c index 9decadf..1ffdd1a 100644 --- a/lib/operators.c +++ b/lib/operators.c @@ -15,6 +15,10 @@ 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 idx, nbiter; @@ -57,6 +61,9 @@ if (3 != a->type || 3 != b->type || 3 != d->type) { nbiter = a->width * a->height; +/* maybe we can speedup this loop for + * avoiding the cache strashing ? + */ for (idx=0; idxR[idx] = fabs(a->R[idx] - b->R[idx]); d->G[idx] = fabs(a->G[idx] - b->G[idx]); diff --git a/v4l2/rgb2fimg.c b/v4l2/rgb2fimg.c index f9a7237..ad1edba 100644 --- a/v4l2/rgb2fimg.c +++ b/v4l2/rgb2fimg.c @@ -41,6 +41,8 @@ for (y=0; y