Repository navigation
Let a VF reference the Atmos track of an existing DCP - #9
Merged
Merged
Conversation
JaumeAP
force-pushed
the
reference-atmos-rebased
branch
from
October 22, 2026 21:17
dc9edff to
fa1ea15
Compare
added 2 commits
October 23, 2026 17:44
DCPContent has a reference_atmos flag, like reference_video and reference_audio, with an Atmos column in the DCP referencing dialog. When it is set the VF's CPL points at the original Atmos asset, with the trim as the entry point and duration as for sound, and the Atmos frames of the original are not read again. Claude-Session: https://claude.ai/code/session_011HCUWvPpbN7e6hcwuWBJjs
atmos_reference_asset_test.cc has the tests of reference_atmos, using test/data/atmos_0.mxf and atmos_1.mxf: the VF's CPL pointing at the original Atmos asset, with and without trims; the flag in the metadata, and the content identifier not changing when it is set; when it is not available and when the film switches it off; is_vf(); the Atmos of a referenced DCP not being read; and referencing the sound and the Atmos independently of each other. Each of them fails with the part of the change it covers taken out. Claude-Session: https://claude.ai/code/session_011HCUWvPpbN7e6hcwuWBJjs
JaumeAP
force-pushed
the
reference-atmos-rebased
branch
from
October 23, 2026 15:44
810b1b2 to
9e42692
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a VF is made from a DCP that has an Atmos track, the Atmos is always written again, as a new MXF with a new ID. This adds the option to reference it instead, like video and sound: an extra tick, "Atmos", in the DCP referencing dialog. When it is on, the VF's CPL points at the original Atmos asset, with the trim as the entry point and duration as for sound, and the original's Atmos frames are not read again.
The change is in
DCPContent(areference_atmosflag, saved in the metadata asReferenceAtmos, andcan_reference_atmos()),ReelWriterandget_referenced_reel_assets()(use the originalReelAtmosAsset),DCPDecoder(does not read a referenced Atmos track),Film(switches the flag off when it can no longer be referenced) and the referencing dialog.The flag is not part of
DCPContent::identifier(). The identifier is part of the path of the encoded video, so referencing the Atmos track must not change it: that would make the video be encoded again for no reason.Tests:
test/atmos_reference_asset_test.cc(8 cases, usingtest/data/atmos_0.mxfandatmos_1.mxffrom the public test data). With the change in place the 63 tests inatmos_*,vf_*,reels_*,reel_*,dcp_*andfilm_*pass on macOS (arm64). Each new test fails with the part of the change it covers taken out:the VF's CPL pointing at the original Atmos asset, and the trim: fails without the decoder condition and without the entry-point offset;
the flag in the metadata, and the identifier staying the same when it is set. With the earlier version, which added
"a"to the identifier when the flag was set:and with this change:
when it is not available (no Atmos track, overlapping Atmos content) and when the film switches it off;
is_vf();a referenced Atmos track not being read;
sound and Atmos being referenced independently of each other, set in either order.
Not covered or not checked:
Two commits on top of
upstream/main(9fb642020): the change and its tests. A test for Atmos frames landing in the wrong reel when a reel has no Atmos was on this branch before; it now lives with its fix in #10. To build it with--warnings-are-errorson Xcode 26 I used-Wno-error=implicit-const-int-float-conversion -Wno-error=unnecessary-virtual-specifierlocally, because upstream does not build the tests there otherwise (not part of this change).🤖 Generated with Claude Code
https://claude.ai/code/session_011HCUWvPpbN7e6hcwuWBJjs