s_bppCases
global · image
- Address
0x5a49d8· 32 bytes, up to0x5a49f7- Type
const void *[8]- Meaning
- Holds the case addresses of the bits per pixel switch of 0x5a49b0
- Confidence
- verified, proof one
- Finding
- image/mips#level-sizes
Finding: Level sizes in image: mip geometry
0x5a49b0(fmt) returns bits per pixel: 4 for format 0, 8 for 1, 6 and 7, 32 for 2, 16 for 3 to 5
and 0 for anything above 7. 0x5a4a00(level, w, h, fmt) returns a level's bytes: each dimension is
max(1, dim >> level); formats 0, 1 and 7 raise a dimension of 4 or less to 4; format 9 returns
wl · hl · 2 + max(1, wl · hl >> 2); otherwise bpp · wl · hl >> 3.
The derivation is in the doc.