Skip to content

Add immutable native YCD animation samplers - #298

Merged
Hancapo merged 2 commits into
mainfrom
feat/ycd-compiled-animation-sampler
Sep 8, 2026
Merged

Hancapo merged 2 commits into
mainfrom
feat/ycd-compiled-animation-sampler

Conversation

@Hancapo

@Hancapo Hancapo commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add YcdAnimation.compile() and the public immutable YcdAnimationSampler, retaining the existing typed evaluate_tracks call shape.
  • Copy decoded channel cycles into owned native buffers, evaluate under a released GIL, and construct only final Vector4/Quaternion values.
  • Preserve integer/fractional behavior, track filtering, missing keys, cyclic channels, physical block overlap, and cached quaternion reconstruction after scalar interpolation.
  • Keep editable model behavior unchanged. Compiled samplers intentionally do not observe later edits; recompile explicitly. No global frame/plan cache or source object retention.
  • Share decoded channel extraction with precision validation rather than introducing another binary decoder.

Validation

  • Synthetic differential tests cover both editions, opcode 7/8 layouts, out-of-range seeks, empty/default/indirect channels, missing keys, source edits, concurrent evaluations and final-only typed construction.
  • Uninstrumented 196-track test: mutable evaluation 1.719 ms/frame, compiled evaluation 0.120 ms/frame; approximately 14x faster. Copied sample storage: 947776 bytes. This is library-only timing, not a viewer FPS prediction.

The following PR will expose clip-level snapshots and add external corpus coverage. No consumer application, installed package, game executable or assets are changed.

@Hancapo
Hancapo merged commit f070f19 into main Sep 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant