Read the OAMD trim element into speaker rendering and ADM
ci / ubuntu-latest (push) Failing after 16s
ci / macos-latest (push) Canceled after 0s
ci / windows-latest (push) Canceled after 0s
ci / release (push) Canceled after 0s

The OAMD parser reads the trim element: warp mode, global trim mode, the
nine per-configuration records (centre, surround and height level, the two
front-back balances) and the per-object bypass flags. OamdUpdate carries
it, so the file task and the streaming step see the same state; a payload
without the element keeps the previous controls, and an absent element
starts at warp 0 with automatic trim.

Speaker rendering reads the controls from OAMD only; neither the CLI nor
the frontends offer an override. Eligible layouts leave the floor Y alone
at warp 0 and use clamp(2Y, 0, 1) at warp 1, the height layer is never
scaled, and warp 2/3 is reported as unsupported where the speaker
consumes it. Floor, height and trim evaluation keep separate coordinates:
floor Y is balance(warp(Y)), while height Y and trim Y are balance(Y). An
explicit configuration contributes a position-dependent scalar for each
object, applied before accumulation instead of to the output channels
after the mix; automatic, disabled and explicit are mutually exclusive, and
a bypassed object keeps its warp but loses balance and trim. Automatic
still uses the layout position compensation, disabled uses unity, and
layouts without trim semantics stay disabled. LFE passes through, and ADM
source positions and binaural rendering are unchanged.

The controls travel in ejoc_speaker_controls, a C struct a future decoder
can fill without knowing the layout; the layout table now carries the
surround and height channel counts and the seven layouts that have trim
semantics. The internal ABI goes to version 3 for the new process
parameter.

The ADM writer mirrors the element into both carriers. AXML gains
DolbyAtmosMasterFile with DolbyMasterContentInfo, DolbyTrimModeSetup (one
record per configuration, zero values for a disabled one) and
DolbyWarpMode. dbmd segment 10 carries the nine 15-byte records (automatic
flag, three float32 levels and two sign-magnitude balances), and segment 9
writes the warp code into the low three bits of at[152] while keeping the
other packed fields. The task scans the first 64 audio frames for the
element, as the reference does, so a duration-limited render still writes
it.

The bilingual mathematical notes describe the configuration index, the
balance map, the three coordinates and the evaluation order; the READMEs
state that the controls come from OAMD and that warp 2/3 is refused. ctest
covers the element parse, configuration selection, warp 0/1 with the Q15
clamp, the height coordinate, explicit trim and balance, per-object
bypass, LFE passthrough, the step's metadata updates and the exact
dbmd/AXML bytes. Speaker output over the same objects16 stream is
byte-identical to the reference for the seven trimmed layouts and the
wider ones, and both ADM carriers of a rendered BWF are byte-identical to
the reference writer.

The product version goes to 1.2.0; the public ABI stays at 5.
This commit is contained in:
TheM14 committed 2026-11-03 01:34:15 +08:00
1 parent 20f2e77664
commit 58e3403642
21 files changed
+1597 -48

No files matched your search

+1
View File
@@ -123,6 +123,7 @@ set(JOC_INTERNAL_SOURCES
src/oamd/oamd_parser.cpp
src/speaker/speaker_layout_lookup.cpp
src/speaker/speaker_step.cpp
src/speaker/speaker_trim.cpp
src/stream/stream.cpp
src/task/task.cpp
src/telemetry/event_bus.cpp