OSDN Git Service

externally reference all GPLv2 textures too
[android-x86/external-s2tc.git] / s2tc_compressor.h
1 #ifndef S2TC_COMPRESSOR_H
2 #define S2TC_COMPRESSOR_H
3
4 // note: this is a C header file!
5
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9
10 void rgb565_image(unsigned char *out, const unsigned char *rgba, int w, int h, int srccomps, int bgr, int alphabits);
11
12 enum DxtMode
13 {
14         DXT1,
15         DXT3,
16         DXT5
17 };
18 enum RefinementMode
19 {
20         REFINE_NEVER,
21         REFINE_ALWAYS,
22         REFINE_CHECK
23 };
24
25 typedef enum
26 {
27         RGB,
28         YUV,
29         SRGB,
30         SRGB_MIXED,
31         LAB,
32         AVG,
33         WAVG,
34         NORMALMAP
35 } ColorDistMode;
36
37 typedef void (*s2tc_encode_block_func_t) (unsigned char *out, const unsigned char *rgba, int iw, int w, int h, int nrandom);
38 s2tc_encode_block_func_t s2tc_encode_block_func(DxtMode dxt, ColorDistMode cd, int nrandom, RefinementMode refine);
39
40 #ifdef __cplusplus
41 }
42 #endif
43
44 #endif