CLIP
CLIP(r);
CLIP(g);
CLIP(b);
CLIP(r);
CLIP(g);
CLIP(b);
fImageData[row * fOutputWidth + col][c] = CLIP(val);
= (uint16)CLIP(fimg[(row << dim) + col] + 0.5);
_Bayer(col, row) = (uint16)CLIP(avg + diff + 0.5);
xyz[0] = cbrt[CLIP((int) xyz[0])];
xyz[1] = cbrt[CLIP((int) xyz[1])];
xyz[2] = cbrt[CLIP((int) xyz[2])];
rix[0][2-c] = CLIP(val);
rix[0][c] = CLIP(val);
img[c] = CLIP((int)out[c]);
#ifdef CLIP
#define CLIP_TO_UNIX(n) CLIP(n, NMIN, NMAX)
#define CLIP_TO_BEOS(n) CLIP(n, BMAX, BMIN)