OSDN Git Service

more fix for test.sh
[android-x86/external-s2tc.git] / s2tc_compressor.h
index 256f3b9..a3ed750 100644 (file)
@@ -7,14 +7,21 @@
 extern "C" {
 #endif
 
-void rgb565_image(unsigned char *out, const unsigned char *rgba, int w, int h, int alpharange);
+void rgb565_image(unsigned char *out, const unsigned char *rgba, int w, int h, int srccomps, int bgr, int alphabits);
 
-typedef enum
+enum DxtMode
 {
        DXT1,
        DXT3,
        DXT5
-} DxtMode;
+};
+enum RefinementMode
+{
+       REFINE_NEVER,
+       REFINE_ALWAYS,
+       REFINE_CHECK
+};
+
 typedef enum
 {
        RGB,
@@ -23,10 +30,12 @@ typedef enum
        SRGB_MIXED,
        LAB,
        AVG,
+       WAVG,
        NORMALMAP
 } ColorDistMode;
 
-void s2tc_encode_block(unsigned char *out, const unsigned char *rgba, int iw, int w, int h, DxtMode dxt, ColorDistMode cd, int nrandom);
+typedef void (*s2tc_encode_block_func_t) (unsigned char *out, const unsigned char *rgba, int iw, int w, int h, int nrandom);
+s2tc_encode_block_func_t s2tc_encode_block_func(DxtMode dxt, ColorDistMode cd, int nrandom, RefinementMode refine);
 
 #ifdef __cplusplus
 }