benilla-re systems structs docs

BlpLevelByteSize

function · image · primitive

Address
0x5a8140 · 184 bytes, up to 0x5a81f7
Signature
int __thiscall (void *this, uint32_t fmt, uint32_t level, uint32_t *size, uint32_t *pitch)
Meaning
Returns the decoded bytes and row bytes of a level
Confidence
verified, proof one
Finding
image/mips#level-byte-size-and-pitch
Test
image::image_compute_mip_byte_size

Finding: Level byte size and pitch in image: mip geometry

0x5a8140(fmt, level, &size, &pitch) is the decoded size of a level for the formats the decoders write: with wl, hl the dimensions shifted by the level and floored at 1 and area = wl · hl, format 2 gives 4 · area with pitch 4 · wl, formats 3 to 5 give 2 · area with pitch 2 · wl, format 9 gives 2 · area + max(1, area >> 2) with pitch 2 · wl, and any other format gives 0 and returns 0.

The derivation is in the doc.

Callers 4

Callees 0

None by a direct call or jump.

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