Skip to content

7.40.0: TrueHD Atmos from the channel presentation, DTS:X standard presentation only (#731, #744) - #836

Merged
superuser404notfound merged 10 commits into
mainfrom
feat/731-energy-map
Oct 18, 2026
Merged

superuser404notfound merged 10 commits into
mainfrom
feat/731-energy-map

Conversation

@superuser404notfound

Copy link
Copy Markdown
Owner

Summary

  • TrueHD Atmos (TrueHD Atmos with heights on Apple TV: our object-to-APAC rendering, offered as a reference #731): every output is a share of the stream's own 7.1 (or 5.1) channel presentation, split per frequency bin between floor and heights by where the objects' energy lies (BedSplitter). No object signal reaches an output. Objects are decoded without matrix interpolation (LibTrueHD 3.0.0, the interpolating decode is not in its default binary) and taken as points, without size, snap, zones, screen anchoring, elevation switch or metadata ramps. The exact render it is measured against lives behind the measurement-only TrueHDReferenceRender trait.
  • DTS:X (DTS:X to APAC to Atmos output #744): LibDTSX 3.0.0 removes the four heights with the standard's constant fold (-3 dB into the speaker under each) instead of reading the metadata, and refuses presentations with objects. The engine renders DTS:X only into 7.1.4 and 9.1.6, where every channel plays one to one, and accepts only the twelve standard channels.
  • Release prep for 7.40.0: both libraries pinned to 3.0.0, version sweep, changelog folded.

Measurements

  • TrueHD against the previous exact render through Apple's APAC decode: 72 windows of six films, 0.35 % of the energy on another speaker (median of windows with heights), Dolby's Unfold demo 3.3 %, heights within about a dB. Listening test on an Apple TV passed.
  • DTS:X: every frame of 12 DTS:X tracks (8.76 million frames) states exactly the standard fold; the LibDTSX output is bit-identical to the metadata path and to SpatialAudioBridge's render.

Tests

swift test: default configuration 4614 swift-testing tests plus XCTest green; with TrueHDObjectAudio,DTSXObjectAudio 4682 plus XCTest green.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS

Vincent Herbst and others added 10 commits October 18, 2026 10:19
… split by object energy (#731)

The TrueHD path no longer mixes object signals into the layout. The
decoder discards the matrix interpolation values and carries the
stream's channel-based presentation (Dolby's 7.1 or 5.1 rendering of
the same mix) alongside each block; BedSplitter divides every bed
channel per STFT bin between the floor speakers it covers and the
heights, by where the objects' energy lies, bounded by the bed and
balanced per band towards a direct render. Elements are plain point
sources. A 5.1 bed covers a 7.1 layout's sides and rears.

The splitter's 2048-frame latency is drained before the encoder
restarts elsewhere and at end of input, so no audio is lost there.
AETHER_TRUEHD_REFERENCE_RENDER=1 keeps the exact decode and mix for
measurements.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
The bed bound now compares an element with its bed channels per band
instead of per bin: in a single bin Dolby's mix can hold less than one
element where several cancel, and the per-bin bound cut legitimate
height content there. The balance only raises an output towards the
direct-render estimate and never lowers it, since the elements'
energies add up to less than a mix of them wherever they carry the
same signal. Against the exact render on nine height-heavy windows of
five films the heights went from -0.61 to -0.20 dB, the median
misplaced energy from 0.54 to 0.38 %; on Unfold from 4.6 to 3.0 %,
worst second 9.9 to 6.8 %.

The LFE delay line was one hop longer than the split outputs' latency.

Bridge tests run with and without the stream's bed; BedSplitterTests
pin the split, the 5.1 bed on a 7.1 layout and the timeline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
…731)

Never lowering let a split that over-allocates stand: on 72 windows of
six films two scenes came out 1.5 dB loud in heights and surrounds
(worst second 9.0 % misplaced). Lowering by a third of the gap in dB
keeps the heights within about a dB of the exact render while those
scenes drop to 5.3 and 5.7 %; Unfold stays at 3.3 % median, its
second 9 left rear at 15.1 % against the reference's 14.5 %.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
…a without ramps (#731)

A block that arrives without the channel presentation before the
splitter exists played through the renderer's mix; it is now silence,
since a decoder that splits its bed plays nothing but the bed.
Metadata updates are taken as they stand rather than ramped towards:
the split's weights are smoothed over about 200 ms anyway, and on the
measured windows nothing moved by more than 0.1 point.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
…731)

The exact decode and the size, snap, zone, screen and elevation mapping
for TrueHD are now built only with the TrueHDReferenceRender trait. A
shipped TrueHDObjectAudio build contains the bed split alone, and a
decoder that is asked for the exact path without the trait traps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
…or 9.1.6

With LibDTSX 3.0 the heights are removed from the 7.1 bed by the
standard's own constant fold rather than the gains the stream's metadata
states, and presentations with objects are refused, so they keep the
channel bridge and play as 7.1. DTS:X is now rendered only into the
layouts that carry its bed and four heights one to one (7.1.4, 9.1.6);
any other layout keeps the channel bridge with a log line saying so.
The decoder accepts the twelve standard channels and nothing else, so
no DTS:X channel is ever panned.

Docs, changelog and tests follow; the object tests are gone and the
alternate sample's verdict is now a refusal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
…ion, DTS:X standard presentation only

LibTrueHD 3.0.0 (bed companion, interpolation out of the default build)
and LibDTSX 3.0.0 (standard presentation, constant height fold). Version
sweep, changelog folded, README notes the pbxproj traits form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
…lakes fixed

The FIFO's backpressure applied only while a segment had bytes left over.
When a segment's last chunk was taken just under the ceiling, the next
request went out at once with the buffer already over it, which is what
made testFullBufferLetsTheCurrentSegmentFinishAndHoldsTheNextRequest
flaky on CI (large loopback chunks). The producer now waits for room
between segments either way; a new test builds the case deterministically
(fails 3/3 before, passes 3/3 after).

ItemSwapStillTests' fixture writer counted a starved test task as a
stalled AVAssetWriter: both tracks were ready, but the loop had not run
for the 20 s on a loaded runner. A stall now also needs 1000 idle polls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
@superuser404notfound
superuser404notfound merged commit c188533 into main Oct 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant