53 |
|
/* histogram of colors used */ |
54 |
|
static unsigned short histo[NRED][NGRN][NBLU]; |
55 |
|
/* initial color cube boundary */ |
56 |
< |
static int CLRCUBE[3][2] = {0,NRED,0,NGRN,0,NBLU}; |
56 |
> |
static int CLRCUBE[3][2] = {{0,NRED},{0,NGRN},{0,NBLU}}; |
57 |
|
|
58 |
+ |
static int split(), cut(); |
59 |
|
|
60 |
+ |
|
61 |
|
int |
62 |
|
new_ctab(ncolors) /* start new color table with max ncolors */ |
63 |
|
int ncolors; |
207 |
|
#define c0 r |
208 |
|
register int r, g, b; |
209 |
|
int pri; |
210 |
< |
int t[HMAX], med; |
210 |
> |
long t[HMAX], med; |
211 |
|
/* find dominant axis */ |
212 |
|
pri = RED; |
213 |
|
if (box[GRN][1]-box[GRN][0] > box[pri][1]-box[pri][0]) |