| 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 | { |
no outgoing calls
no test coverage detected