MipLevelCount
function · image · primitive
- Address
0x5a4ac0· 43 bytes, up to0x5a4aea- Signature
uint32_t __fastcall (uint32_t w, uint32_t h)- Meaning
- Returns the number of levels down to 1 by 1
- Confidence
- verified, proof one
- Finding
- image/mips#chain-size-and-level-count
- Test
image::image_level_count
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 5
- MipAllocChain image
- MipBlockSize image
- MipFillChain image
- BlpAllocChain image
- BlpParse image
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.