XAudio2: honor RFC 7845 channel mapping and coupled_count on single-stream Opus #1455
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1465"
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 ivall/xcl. Originally posted by b3IKK on 2026-11-24T16:31:58Z.
opus::Decodergated both stream channel count setup and RFC 7845 channel remapping onmultistream = head.stream_count > 1 || ch > 2. For valid RFC 7845 mapping family 1 or 255 headers withstream_count == 1and 1–2 output channels (such as swapped L/R[1, 0], muted channels[0, 255], or a coupled stereo stream selecting channel 1),coupled_countandmappingwere silently ignored. Conversely, a 1-stream header withch > 2setmultistream = truefor wire packet framing even though packets hold only one stream.This separates wire framing (
multistream = head.stream_count > 1) from channel remapping (use_mapping = head.mapping_family != 0), and always builds stream decoders fromhead.stream_count/head.coupled_count.What is in it
crates/xcl/src/hle/opus.rs: adduse_mappingtoDecoder, setmultistream = head.stream_count > 1, build stream decoders unconditionally fromcoupled_count, and add unit testsingle_stream_mapping_family_honors_channel_mapping_and_silence(verified failing before the fix).Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1).\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4): 771 passed, 0 failed, 41 ignored (SKIPPED GPU tests: 2no wave64—gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask,gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware)cargo test -p xcl --lib opus: 16 passed, 0 failed (single_stream_mapping_family_honors_channel_mapping_and_silencefailed before the fix)Regression run
main:
PR:
Not tested
AI use
hle/opus.rs, wrote the fix and unit test, ran the test suite andscripts/smoke.ps1regression runs, and drafted this PR description.Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T16:56:40Z.
Full-suite run, since this PR has no test report yet. Tested exact head
d1e28a5(on its baseb7aa9f3).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 771 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.single_stream_mapping_family_honors_channel_mapping_and_silence.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 771 passed, 0 failed, 41 ignored, no skips.Not tested
AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T18:53:01Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
Imported from ivall/xcl. Originally posted by S1m0ne1997 on 2026-11-25T15:18:41Z.
Test report for
d1e28a57ce7527a82f9a40c979aa59ea10fcba60(this PR's head), for #1607.Tested
rustc 1.100.0 (0ef1bc386 2026-11-09)x86_64-pc-windows-msvc, debug.cargo build --workspace, thencargo test --workspace -- --test-threads=4at the head: 771 passed, 0 failed, 41 ignored.gpu_geometry_wave32_prefix_count_over_a_mask(no wave64),gpu_wave32_program_in_wave64_hardware(no wave64).Regression run (retail title,
scripts/smoke.ps1 -Seconds 60, release;mainbuilt from the commit in its block, this PR from its head with no changes tocrates/, both run with thescripts/smoke.ps1ofmain, which hashes the name of the game folder)main:
this PR:
Peak commit is over the 125 % rule: this PR's run peaked at 21575 MB, 132 % of
main's 16384 MB (frames: within 80 %). I can't tell from this whether the PR causes it: this branch is based onb7aa9f3, 440 commits older than themaincommit (06c9f55) its run is compared with, and each side was run once. A smoke run of the base itself, or of this PR rebased onto currentmain, would separate the two.Not tested
AI use: Claude Code with Claude Opus 5.5 ran the build, the suite and the regression run and wrote this report at my request.
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T20:42:52Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:51:26Z.
Triage (#1607) – head
d1e28a5No open or merged PR applies the channel mapping to a single-stream Opus head with mapping family 1/255. #2696 and #503 change the multistream mapping, not this case. Main's
Decoder::newstill usesmultistream = stream_count > 1 || ch > 2.Main now builds
channel_mapand the sub-packet buffers onlyif multistream. When this is rebased, theuse_mappingpath needs them too, or the single-stream mapped decode has an empty map.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.