OSDN Git Service

add the compiler benchmark
[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         REFINE_LOOP
24 };
25
26 typedef enum
27 {
28         RGB,
29         YUV,
30         SRGB,
31         SRGB_MIXED,
32         LAB,
33         AVG,
34         WAVG,
35         NORMALMAP
36 } ColorDistMode;
37
38 typedef void (*s2tc_encode_block_func_t) (unsigned char *out, const unsigned char *rgba, int iw, int w, int h, int nrandom);
39 s2tc_encode_block_func_t s2tc_encode_block_func(DxtMode dxt, ColorDistMode cd, int nrandom, RefinementMode refine);
40
41 #ifdef __cplusplus
42 }
43 #endif
44
45 #endif