Formats: combine XMA pre-rotation and the first FFT stage #3765

Open
andrewpozdnakov7-jpg wants to merge 1 commit from upstream-pr/3765 into main
andrewpozdnakov7-jpg commented 2026-11-28 17:16:40 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T17:16:40Z.


Compute the cached pre-rotation weights in bit-reversed order. The two points of each first-stage butterfly then arrive together. Apply that butterfly as soon as the pair is pre-rotated and leave the remaining stages to the existing FFT loop. The first stage uses the same butterfly arithmetic and weights.

In optimized Windows comparisons, 524,160 transform samples matched bit for bit across powers of two from 2 to 4096. The cases include an impulse, signed zero and subnormals. Across 20 alternating pairs, median per-pair transform time fell by 11–16% for the decoder's 128, 256 and 512 sample sizes.

A separate benchmark decoded 288 generated stereo frames at 24, 32, 44.1 and 48 kHz, with three stereo transform patterns and a final flush. All 301,056 PCM samples matched main exactly. The full decoder's median per-pair throughput was 1.034–1.070 times main across the twelve cases.

All 46 active release formats tests passed, including the untabled reference and the overlap reconstruction checks. Strict Clippy and the asset policy passed.

Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding the change into another commit.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5542694992 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3765). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T17:16:40Z. --- Compute the cached pre-rotation weights in bit-reversed order. The two points of each first-stage butterfly then arrive together. Apply that butterfly as soon as the pair is pre-rotated and leave the remaining stages to the existing FFT loop. The first stage uses the same butterfly arithmetic and weights. In optimized Windows comparisons, 524,160 transform samples matched bit for bit across powers of two from 2 to 4096. The cases include an impulse, signed zero and subnormals. Across 20 alternating pairs, median per-pair transform time fell by 11–16% for the decoder's 128, 256 and 512 sample sizes. A separate benchmark decoded 288 generated stereo frames at 24, 32, 44.1 and 48 kHz, with three stereo transform patterns and a final flush. All 301,056 PCM samples matched main exactly. The full decoder's median per-pair throughput was 1.034–1.070 times main across the twelve cases. All 46 active release formats tests passed, including the untabled reference and the overlap reconstruction checks. Strict Clippy and the asset policy passed. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the change into another commit. AI-assisted with OpenAI Codex.
andrewpozdnakov7-jpg commented 2026-11-28 17:20:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T17:20:13Z.


Windows CI passed on 7bc3255, including both Clippy configurations and the workspace tests. The generated stereo fixtures produced the same 301,056 PCM samples as main. Full-decoder throughput was 1.034–1.070 times main across the twelve cases.

The next step is maintainer review. Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding the change into another commit.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7242936919 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3765#issuecomment-7242936919). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T17:20:13Z. --- [Windows CI](https://github.com/Marvisak/VIctory/actions/runs/46169611244/job/141054814446) passed on `7bc3255`, including both Clippy configurations and the workspace tests. The generated stereo fixtures produced the same 301,056 PCM samples as main. Full-decoder throughput was 1.034–1.070 times main across the twelve cases. The next step is maintainer review. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the change into another commit. AI-assisted with OpenAI Codex.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3765:upstream-pr/3765'
git switch 'upstream-pr/3765'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/3765'
git switch 'upstream-pr/3765'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3765'
git switch 'upstream-pr/3765'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3765'
git switch 'main'
git merge --squash 'upstream-pr/3765'
git switch 'main'
git merge --ff-only 'upstream-pr/3765'
git switch 'main'
git merge 'upstream-pr/3765'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!3765
No description provided.