ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/ciq.h
Revision: 2.5
Committed: Sun Mar 28 20:33:13 2004 UTC (20 years ago) by schorsch
Content type: text/plain
Branch: MAIN
CVS Tags: rad3R6P1, rad3R6
Changes since 2.4: +1 -3 lines
Log Message:
Continued ANSIfication, and other fixes and clarifications.

File Contents

# Content
1 /* RCSid: $Id: ciq.h,v 2.4 2003/07/27 22:12:03 schorsch Exp $ */
2
3 #ifndef _RAD_CIQ_H_
4 #define _RAD_CIQ_H_
5
6 #include <stdio.h>
7
8 #include "pic.h"
9
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13
14 #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 #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
28 #ifdef __cplusplus
29 }
30 #endif
31 #endif /* _RAD_CIQ_H_ */
32