| 1 |
schorsch |
2.4 |
/* RCSid: $Id: ciq.h,v 2.3 2003/07/14 22:24:00 schorsch Exp $ */ |
| 2 |
schorsch |
2.3 |
|
| 3 |
|
|
#ifndef _RAD_CIQ_H_ |
| 4 |
|
|
#define _RAD_CIQ_H_ |
| 5 |
|
|
|
| 6 |
greg |
1.2 |
#include <stdio.h> |
| 7 |
schorsch |
2.3 |
|
| 8 |
greg |
1.1 |
#include "pic.h" |
| 9 |
|
|
|
| 10 |
schorsch |
2.3 |
#ifdef __cplusplus |
| 11 |
|
|
extern "C" { |
| 12 |
|
|
#endif |
| 13 |
|
|
|
| 14 |
schorsch |
2.4 |
#define red(i) (((i)>>7&0xf8)|4) /* 5 bits red, 5 bits green, 5 bits blue */ |
| 15 |
|
|
#define gre(i) (((i)>>2&0xf8)|4) |
| 16 |
|
|
#define blu(i) (((i)<<3&0xf8)|4) |
| 17 |
greg |
1.1 |
#define len 32768 |
| 18 |
|
|
|
| 19 |
|
|
extern int hist[len]; /* list of frequencies or pixelvalues for coded color */ |
| 20 |
|
|
|
| 21 |
|
|
extern colormap color; /* quantization colormap */ |
| 22 |
|
|
extern int n; /* number of colors in it */ |
| 23 |
|
|
|
| 24 |
|
|
#define linealloc(xdim) (pixel *)emalloc(sizeof(pixel)*xdim) |
| 25 |
|
|
#define line3alloc(xdim) (rgbpixel *)emalloc(sizeof(rgbpixel)*xdim) |
| 26 |
|
|
|
| 27 |
|
|
extern char *emalloc(); |
| 28 |
schorsch |
2.3 |
|
| 29 |
|
|
|
| 30 |
|
|
#ifdef __cplusplus |
| 31 |
|
|
} |
| 32 |
|
|
#endif |
| 33 |
|
|
#endif /* _RAD_CIQ_H_ */ |
| 34 |
|
|
|