fix crash invalid input
[convexer.git] / nbvtf / librgbcx.cc
1 #include <stdint.h>
2 #include <cstring>
3 #include <math.h>
4
5 #define RGBCX_IMPLEMENTATION
6 #include "rgbcx.h"
7
8 extern "C"
9 {
10 void rgbcx__init(void)
11 {
12 rgbcx::init();
13 }
14
15 void rgbcx__encode_bc1( uint32_t level, void* pDst, const uint8_t* pPixels, int allow_3color, int use_transparent_texels_for_black )
16 {
17 rgbcx::encode_bc1( level, pDst, pPixels, allow_3color, use_transparent_texels_for_black );
18 }
19
20 void rgbcx__encode_bc3( uint32_t level, void* pDst, const uint8_t* pPixels )
21 {
22 rgbcx::encode_bc3( level, pDst, pPixels );
23 }
24 }