Skip to content

Shared 5.1/7.1 stereo downmix, 7.1 to 5.1 monitor fold and peak limiter - #3

Merged
JaumeAP merged 7 commits into
mainfrom
downmix-7-1-stereo
Oct 22, 2026
Merged

JaumeAP merged 7 commits into
mainfrom
downmix-7-1-stereo

Conversation

@JaumeAP

@JaumeAP JaumeAP commented Oct 22, 2026

Copy link
Copy Markdown
Owner

Merges the downmix work into the fork's main:

Verified locally on macOS arm64 against the upstream-equal environment: the full unit test suite passes except real_encode_with_server (fixed later in this branch), and the downmix, limiter, Butler and export tests pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_017CHMGrzt5n5oKGFSjhKnrp

JaumeAP and others added 7 commits October 21, 2026 20:34
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017CHMGrzt5n5oKGFSjhKnrp
ConfigRestorer's destructor cleared the override path shared by Config
and State, so every test after the first ConfigRestorer read the user's
real configuration from $HOME. A default facility code there leaked into
the ISDCF name tests. Restore build/test/state instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017CHMGrzt5n5oKGFSjhKnrp
… and 7.1 export

Cover what the downmix changes left untested: the 4-channel stereo map,
Config::audio_mapping(2, ...) giving the same map as the export, a default
mapping following the film's channel count and not being saved while a
user's mapping is, the limiter gain carrying over between buffers, the
Butler limiting a mapping that would clip, and the stereo mixdown export of
a 7.1 film taking the rear surrounds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017CHMGrzt5n5oKGFSjhKnrp
FFmpeg 7.1 added AVCOL_SPC_IPT_C2, AVCOL_SPC_YCGCO_RE and
AVCOL_SPC_YCGCO_RO (AVCOL_SPC_NB = 18) but still has libpostproc, so it
is built without DCPOMATIC_FFMPEG_8 and the assertion that AVCOL_SPC_NB
is 15 fails when the properties of an FFmpeg content are listed.  Always
list the three names and check AVCOL_SPC_NB <= 18, as is done for the
primaries and transfer characteristics.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017CHMGrzt5n5oKGFSjhKnrp
The test relied on EncodeServerFinder's UDP broadcast to 255.255.255.255
reaching the server on the same machine.  Where a broadcast is not
allowed (a sandbox, a machine without a network) no server was found,
every frame was encoded locally and the test failed.  Ask 127.0.0.1
directly instead, and put the configuration back afterwards (before
dropping the finder, which stays connected to Config::Changed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017CHMGrzt5n5oKGFSjhKnrp
clang 20 (Xcode 26) warns about two things that break a -Werror build:

- -Wunnecessary-virtual-specifier in ICU 74's headers (virtual methods in
  final classes); turn it off when the compiler has it.
- -Wimplicit-const-int-float-conversion where tests divide by RAND_MAX,
  which is not exactly representable as a float; make the conversion
  explicit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017CHMGrzt5n5oKGFSjhKnrp
EncodeServerFinder connected to Config::Changed with a raw this and never
disconnected, so a configuration change after EncodeServerFinder::drop()
called config_changed() on the deleted finder (seen as boost::lock_error,
"mutex lock failed ... Invalid argument").  Keep the connection in a
scoped_connection, declared last so that it goes first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017CHMGrzt5n5oKGFSjhKnrp
@JaumeAP
JaumeAP merged commit fa61a23 into main Oct 22, 2026
@JaumeAP
JaumeAP deleted the downmix-7-1-stereo branch October 22, 2026 14:46
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