Fold the rear surrounds for warp modes 2 and 3
ci / ubuntu-latest (push) Failing after 13s
ci / macos-latest (push) Canceled after 0s
ci / windows-latest (push) Canceled after 0s
ci / release (push) Canceled after 0s

The OAMD warp field is two bits wide; modes 2 and 3 now render instead of
failing. For a 5.1, 5.1.2 or 5.1.4 target the speaker renderer pans objects
in the corresponding 7.1, 7.1.2 or 7.1.4 intermediate layout and folds the
rear pair into the target surround pair: mode 2 uses the PLIIx coefficients
(sqrt(3)/2 and 1/2), mode 3 the Standard (Lo/Ro) coefficients (1 and 0).
4.0 gains a rear pair the same way, built from the 7.1 geometry without a
centre or LFE channel. Layouts that already have both surround pairs, or
none, render directly.

The intermediate layout only changes geometry and panning. Trim
configuration selection, both balance layers and the automatic position
compensation stay with the final target layout, so 5.1.2 keeps configuration
4 and its compensation while panning on 7.1.2. Per-object bypass drops
balance and trim but keeps the fold, and LFE still passes through. The
folded object vector enters the existing gain ramp and mix unchanged; the
public API and the ADM metadata do not change.

parameters_from_oamd accepts the whole two-bit warp field and rejects
values above 3; the renderer builds the fold matrices once per layout and
keeps the 4.0 intermediate geometry internally. The bilingual notes describe
the fold and the evaluation order, and the READMEs no longer call 2/3
unsupported. ctest covers PLIIx and Lo/Ro on 5.1, 5.1.2, 5.1.4 and 4.0, the
target-layout calibration, bypass, LFE and the event path; speaker output
over the shared objects16 stream is byte-identical to the reference for all
layouts in both warp modes 2 and 3.
This commit is contained in:
TheM14 committed 2026-11-03 13:35:43 +08:00
1 parent 58e3403642
commit a2760286b0
9 files changed
+426 -41

No files matched your search

+5 -2
View File
@@ -131,8 +131,11 @@ the three trim levels and the two front-back balances. trim_bypass is indexed
by object slot (1..15); slot 0 carries the LFE and is unused.
warp_mode 0 leaves the floor Y coordinate unchanged; mode 1 maps it through
clamp(2Y, 0, 1). warp modes 2 and 3 have no speaker implementation and are
rejected by the caller that builds this structure.
clamp(2Y, 0, 1). Modes 2 and 3 render the 5.1-family and 4.0 layouts through an
expanded surround layout (7.1-family, or a rear pair added to 4.0 without a
centre or LFE) and fold the rear pair into the target surround pair: mode 2
uses the PLIIx coefficients (sqrt(3)/2 and 1/2), mode 3 the Standard (Lo/Ro)
coefficients (1 and 0). Layouts without a single surround pair render directly.
trim_mode selects where the gain comes from: automatic applies the layout
position compensation, disabled applies no trim, and explicit applies the