Expand description
Version 6 .psxanim clips: per-joint keyed tracks.
The layout is documented on [psxed_format::animation::tracks]. A clip holds
one rotation track (smallest-three quaternion keys) and one translation track
(variable-bit offsets) per joint. Every track is segments + 1 evenly spaced
keys over the clip, with at most seven distinct segment counts per clip, so a
sample maps its playback position onto every rate once and each joint then
only indexes.
Decoding is integer only: Q12 quaternion components, a 513 entry square root table for the omitted component, Q8 interpolation, one renormalising step and the usual quaternion to matrix products. The cooker calls the same functions to prove its error budget, so what it measures is what ships.
Modules§
- host
- Safe single-key helpers the cooker uses to search and verify tracks with the exact decoder.
Structs§
- RotKey
- A decoded rotation key: Q12
[x, y, z, w]and the omitted component index. - Track
Pos - Positions of one playback sample on every rate of a clip.
Constants§
- SQRT_
TABLE round(sqrt(index << 15)): the Q12 square root of a Q24 value sampled every 2^15, one entry past the top so the interpolation of an exact 2^24 (the identity rotation) has a neighbour. The omitted quaternion component is at least one half, so the argument stays far from the steep start of the curve and one linear step is exact to well under a Q12 unit.