Formats: process XMA stereo bands through paired slices #3649
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3649"
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?
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T02:15:43Z.
The stereo inverse transform in the XMA decoder can walk each coefficient band as a pair of mutable slices. The channel equations and their evaluation order are preserved.
On a Windows Core i7-870 with Rust 1.98.1
-O, three repeated 17-pair runs gave paired median improvements of 14–18% for 512 coefficients per channel, 22–25% for 256, and 27–29% for 128. This measures the inverse transform on prepared stereo bands.Coefficient outputs were bit-identical across 288 configurations. Decoding and flushing 288 valid generated stereo frames at four sample rates produced 301,056 identical PCM samples across all-band, alternating-band, and scaling-only cases. The audited scope is the stereo coefficient transform.
41 format tests passed in release mode. Five ignored tests and five randomized-noise tests were outside that run. Strict Clippy and asset policy (191 files) passed. Git merges cleanly with #3629, #3631, and #3383.
AI-assisted with OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T02:16:06Z.
Matched the stereo transform in
03b1d25f14e3dfceb0dc29b30fc91a1b1671f804against63bcca43c6a00a758510398fa43096ce7e4f7df0. Across 288 coefficient configurations, both channels matched bit for bit, including signed zero and the mono/no-transform controls. Decoding and flushing 288 generated stereo frames gave the same 301,056 PCM samples. The SHA-256 was0958d6798e188d8404ffe853d7cb671ae348e9d7ba25b07a40598ff0251f0a4c.Three repeated Windows measurements with Rust 1.98.1
-Ogave paired median reductions of 14–18%, 22–25%, and 27–29% on 512-, 256-, and 128-coefficient stereo bands. The fixture times the transform itself. The release format suite passed 41 tests, with five noisy-input tests filtered and five ignored. Strict Clippy and asset policy passed.Please preserve the Git author if cherry-picking or rebasing, or include this trailer if folding the change into another commit.
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-28T02:45:16Z.
Review: APPROVED
LGTM — verified on Windows:
cargo test -p victory-formats --lib xma::passed (20/20)cargo clippy -p victory-formats --all-targets -- -D warningspassed with 0 warningscargo xtask policypassed (191 files ok)Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.