Share XMA scale-factor band layouts across decoders #25
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-logs
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/linkoovosh--LinkoArts-build!25
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-25"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@avt0m4t48 on GitHub · 2026-12-03 03:16 UTC · original
avt0m4t48:perf-share-xma-band-layouts→main· +97 −51 · 1 files · 1 commits · draftChange
Build the four XMA scale-factor band layouts at compile time and share them across decoders. The sample-rate boundaries and band calculations are unchanged. Coefficients, scale factors, overlap and other mutable stream state still belong to each voice.
On both x86-64 Linux and Windows MSVC, the compiled decoder shrinks from 14,304 to 11,480 bytes and each allocated HLE voice slot from 14,464 to 11,648 bytes. The four layouts occupy 11,328 bytes of read-only data.
Verification
The direct decoder replay compared every layout entry at the rate boundaries and exact PCM and errors across 6,400 synthetic calls per compiler configuration. It covered valid tiled mono and stereo streams, truncation, mutated data, consecutive calls, reset, clone and flush. The format tests also cover the rate selection boundaries.
The patch passes the staged asset check. The full-tree checker flags three pre-existing paths outside the patch. The timing replay is synthetic and Windows runtime, title audio and gameplay frame times remain unmeasured.
The replay also compared every carried sample and block length and exercised resume. With this fork's release fat LTO, the warmed constructor fell from 1,251 to 216 ns on default x86-64 Linux in 14 paired runs. Valid-frame decode was within 0.3% on both default and v3. A separate thin-LTO v3 harness measured 4.2% slower valid-frame decode. The measured benefits are constructor cost and voice storage.
The formats tests and the combined workspace's diagnostic test targets type-checked for Windows x64 MSVC. The combined check used a metadata-only mimalloc declaration on the Linux host.
The LinkoArts formats suite ran in an isolated build directory with 86 passes and 7 ignored tests.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.