MCPcopy Create free account
hub / github.com/defold/defold / IsAstc

Function IsAstc

engine/dlib/src/dlib/image.cpp:162–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160 }
161
162 static bool IsAstc(const void* mem, uint32_t memsize)
163 {
164 DM_STATIC_ASSERT(sizeof(struct AstcHeader) == 16, Invalid_Struct_Size);
165
166 if (memsize < 16)
167 return false;
168
169 AstcHeader* header = (AstcHeader*)mem;
170 return header->m_Magic[0] == 0x13
171 && header->m_Magic[1] == 0xAB
172 && header->m_Magic[2] == 0xA1
173 && header->m_Magic[3] == 0x5C;
174 }
175
176 bool GetAstcBlockSize(const void* mem, uint32_t memsize, uint32_t* width, uint32_t* height, uint32_t* depth)
177 {

Callers 2

GetAstcBlockSizeFunction · 0.85
GetAstcDimensionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected