benilla-re systems structs docs

FTVectorTransform

function · unassigned · primitive

Address
0x7d0340 · 84 bytes, up to 0x7d0393
Signature
void __fastcall (int32_t *vector, const int32_t *matrix)
Meaning
Multiplies a 26.6 vector by a 16.16 matrix in place with FT_MulFix
Confidence
verified, proof one
Finding
font/freetype#fixed-point-multiply
Test
font::vector_transform_difftest

Finding: Fixed-point multiply in font: the FreeType calls

FT_MulFix(a, b) returns a when a is 0 or b is 0x10000. Otherwise it multiplies the magnitudes and gives the result the sign of a ^ b. With |a| at most 0x800 and |b| at most 0x100000 the product rounds, (|a|·|b| + 0x8000) >> 16. Above either bound it truncates: ((|b| & 0xffff)·(|a| & 0xffff) >> 16) + (|b| >> 16)·(|a| & 0xffff) + (|a| >> 16)·|b|, in 32 bits. FT_Vector_Transform applies a 16.16 matrix with it.

The derivation is in the doc.

Callers 4

Callees 1

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