benilla-re systems structs docs

MipBlockSize

function · image · primitive

Address
0x5a4b80 · 46 bytes, up to 0x5a4bad
Signature
uint32_t __fastcall (uint32_t fmt, uint32_t w, uint32_t h)
Meaning
Returns the bytes of a whole chain including its pointer table
Confidence
verified, proof one
Finding
image/mips#chain-size-and-level-count
Test
image::image_mip_block_size

Finding: Chain size and level count in image: mip geometry

0x5a4ac0(w, h) returns the number of levels: 1 plus the number of times w or h can be halved while either exceeds 1, each halving clamped to 1. That is floor(log2(max(w, h))) + 1. 0x5a4a80 sums 0x5a4a00 over the first count levels. 0x5a4b80(fmt, w, h) returns that sum for the full chain plus 4 · count.

The derivation is in the doc.

Callers 1

Callees 2

Calls and jumps by a bare address, from tables/calls.tsv.