diff --git a/lib/operators.c b/lib/operators.c index 1ffdd1a4..ef75e8ec 100644 --- a/lib/operators.c +++ b/lib/operators.c @@ -21,7 +21,7 @@ extern int verbosity; /* must be declared around main() */ */ int fimg_add(FloatImg *a, FloatImg *b, FloatImg *d) { -int idx, nbiter; +int idx, nbpixels; #if DEBUG_LEVEL fprintf(stderr, ">>> %s ( %p %p %p )\n", __func__, a, b, d); @@ -32,9 +32,9 @@ if (3 != a->type || 3 != b->type || 3 != d->type) { return -8; } -nbiter = a->width * a->height; +nbpixels = a->width * a->height; -for (idx=0; idxR[idx] = a->R[idx] + b->R[idx]; d->G[idx] = a->G[idx] + b->G[idx]; d->B[idx] = a->B[idx] + b->B[idx]; @@ -48,7 +48,7 @@ return 0; */ int fimg_sub(FloatImg *a, FloatImg *b, FloatImg *d) { -int idx, nbiter; +int idx, nbpixels; #if DEBUG_LEVEL fprintf(stderr, ">>> %s ( %p %p %p )\n", __func__, a, b, d); @@ -59,12 +59,12 @@ if (3 != a->type || 3 != b->type || 3 != d->type) { return -8; } -nbiter = a->width * a->height; +nbpixels = 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]); d->B[idx] = fabs(a->B[idx] - b->B[idx]); @@ -78,7 +78,7 @@ return 0; */ int fimg_mul(FloatImg *a, FloatImg *b, FloatImg *d) { -int idx, nbiter; +int idx, nbpixels; #if DEBUG_LEVEL fprintf(stderr, ">>> %s ( %p %p %p )\n", __func__, a, b, d); @@ -89,9 +89,9 @@ if (3 != a->type || 3 != b->type || 3 != d->type) { return -8; } -nbiter = a->width * a->height; +nbpixels = a->width * a->height; -for (idx=0; idxR[idx] = a->R[idx] * b->R[idx]; d->G[idx] = a->G[idx] * b->G[idx]; d->B[idx] = a->B[idx] * b->B[idx];