add PVRTC support

This commit is contained in:
Ishotihadus
2019-12-13 03:15:35 +09:00
parent b92b00fc4a
commit e683b3c91a
4 changed files with 325 additions and 140 deletions
+22
View File
@@ -3,6 +3,28 @@
#include <stdint.h>
typedef struct {
uint8_t r;
uint8_t g;
uint8_t b;
uint8_t a;
} PVRTCTexelColor;
typedef struct {
int r;
int g;
int b;
int a;
} PVRTCTexelColorInt;
typedef struct {
PVRTCTexelColor a;
PVRTCTexelColor b;
int8_t weight[32];
uint32_t punch_through_flag;
} PVRTCTexelInfo;
int decode_pvrtc_4bpp(const uint8_t*, const int, const int, uint32_t*);
int decode_pvrtc_2bpp(const uint8_t*, const int, const int, uint32_t*);
#endif /* end of include guard: PVRTC_H */