summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/static_libs/rg_etc/rg_etc1.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/static_libs/rg_etc/rg_etc1.h b/src/static_libs/rg_etc/rg_etc1.h
index 8de77add5e..8a96cc52e3 100644
--- a/src/static_libs/rg_etc/rg_etc1.h
+++ b/src/static_libs/rg_etc/rg_etc1.h
@@ -24,17 +24,18 @@ typedef struct
24{ 24{
25 rg_etc1_quality m_quality; 25 rg_etc1_quality m_quality;
26 bool m_dithering; 26 bool m_dithering;
27}rg_etc1_pack_params; 27} rg_etc1_pack_params;
28 28
29// Important: pack_etc1_block_init() must be called before calling pack_etc1_block(). 29// pack_etc1_block_init() should be called before calling pack_etc1_block(),
30// Otherwise rg_etc1_pack_block() will call rg_etc1_pack_block_init() for you.
30void rg_etc1_pack_block_init(); 31void rg_etc1_pack_block_init();
31 32
32// Packs a 4x4 block of 32bpp RGBA pixels to an 8-byte ETC1 block. 33// Packs a 4x4 block of 32bpp BGRA pixels to an 8-byte ETC1 block.
33// 32-bit RGBA pixels must always be arranged as (R,G,B,A) (R first, A last) in memory, independent of platform endianness. A should always be 255. 34// 32-bit BGRA pixels must always be arranged as (B,G,R,A) (B first, A last) in memory, independent of platform endianness. A should always be 255.
34// Returns squared error of result. 35// Returns squared error of result.
35// This function is thread safe, and does not dynamically allocate any memory. 36// This function is thread safe, and does not dynamically allocate any memory.
36// pack_etc1_block() does not currently support "perceptual" colorspace metrics - it primarily optimizes for RGB RMSE. 37// pack_etc1_block() does not currently support "perceptual" colorspace metrics - it primarily optimizes for RGB RMSE.
37unsigned int rg_etc1_pack_block(void* pETC1_block, const unsigned int* pSrc_pixels_rgba, rg_etc1_pack_params *pack_params); 38unsigned int rg_etc1_pack_block(void* pETC1_block, const unsigned int* pSrc_pixels_BGRA, rg_etc1_pack_params *pack_params);
38 39
39// ETC2 support: RGB8_ETC2 40// ETC2 support: RGB8_ETC2
40void rg_etc2_rgb8_decode_block(const uint8_t *etc_block, uint32_t *bgra); 41void rg_etc2_rgb8_decode_block(const uint8_t *etc_block, uint32_t *bgra);