| 1 |
< |
/* Copyright (c) 1992 Regents of the University of California */ |
| 1 |
> |
/* Copyright (c) 1993 Regents of the University of California */ |
| 2 |
|
|
| 3 |
|
#ifndef lint |
| 4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
| 32 |
|
/* maximum propagated error during dithering */ |
| 33 |
|
#define MAXERR 20 |
| 34 |
|
/* define CLOSEST to get closest colors */ |
| 35 |
< |
#define CLOSEST 1 |
| 35 |
> |
#ifndef CLOSEST |
| 36 |
> |
#ifdef SPEED |
| 37 |
> |
#if SPEED > 8 |
| 38 |
> |
#define CLOSEST 1 /* this step takes a little longer */ |
| 39 |
> |
#endif |
| 40 |
> |
#endif |
| 41 |
> |
#endif |
| 42 |
|
|
| 43 |
|
|
| 44 |
|
new_histo() /* clear our histogram */ |
| 341 |
|
register BYTE col[3]; |
| 342 |
|
int r, g, b; |
| 343 |
|
{ |
| 344 |
< |
register unsigned tmp; |
| 344 |
> |
register int tmp; |
| 345 |
|
register unsigned sum; |
| 346 |
|
|
| 347 |
|
tmp = col[RED]*NRED/256 - r; |