Conversation
jpietek
force-pushed
the
ffmpeg81-support
branch
from
September 16, 2026 16:07
3dab978 to
23bd4b5
Compare
jpietek
force-pushed
the
ffmpeg8
branch
2 times, most recently
from
September 16, 2026 16:09
bda4927 to
7a04557
Compare
… shutdown fixes Every source is normalised to the canvas contract (sdr, hlg, pq) on the GPU by the new tonemap_cuda filter; P010/P210 canvases with 8-bit sources promoted in the compositor; v210 sources stay 4:2:2; HEVC Main10 with HLG/PQ signalling and HDR10 static metadata on outputs; filter EOF-tail, Python shutdown and seek latch fixes; per-node GIL release. Compositor and orchestrator split into modules under src/mixer (primitives/, orchestrator/), libav/avcpp reused where the code re-implemented them; the mixer library ships as pyplumber.mixer. Show files gain working_format, color, latency_ms, v210 sources, tone-mapped renditions and HDR10 metadata; docs and examples follow. Squash of PR #33 (78 commits) onto develop after #34. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
10-bit HDR mixer: per-source SDR/HLG/PQ conversion, native 4:2:2 canvases, HDR10 outputs, and the shutdown fixes.
Stacked on #34 (FFmpeg 8.0/8.1 series); merge #34 first, then this PR (squash).
What it does
sdr,hlg,pq) on the GPU by the newtonemap_cudafilter (auto per-frame resolution, untagged files are BT.709 SDR); renditions convert back withclip/mobius/hable, a knee (tonemap_param) keeps SDR content exact inside an HDR canvas.v210sources (packed 10-bit 4:2:2) stay 4:2:2 through conversion and compositing;tonemap_cudareads and writes NV12/P010/NV16/P210 and resamples in one pass.enc_video hdr_metadata, values frompyplumber.mixer.color). Needs nv-codec-headers 13 (driver ≥ 570), both Dockerfiles updated.codex/recorder-shutdown, folded in), with the seek-flush latch cleared so seeks/speed changes keep flowing; per-node control bindings release the GIL.src/nodes/hwaccel/cuda_rect_draw.{hpp,cpp}next to a ~700-linecuda_rect_overlay.cpp. Mixer control:src/mixer/orchestrator/(MixerOrchestrator.hpp,core.cpp, one file per transition kind),src/mixer/primitives/(CamelCase component headers:TickGridoverav::Rational,Cadence,MonotonicClock,CutLatency,Snapshot,MixerState, ...; snake_case free-function modules:pixel_layout,compositor_layers,compositor_geometry), plusrouting.hpp,graph_ops,TransitionScheduler,Playout.hpp. Hand-rolled rescales, plane maths, HDR side-data sizes and colour ints replaced byav_rescale*,av_inv_q,av_image_get_linesize,av_pix_fmt_get_chroma_sub_sample, the libavutil metadata allocators andAVColorTransferCharacteristic; AGENTS.md now asks for that. Fix:source_switcherno longer queries the timeline atAV_NOPTS_VALUE. Layout table indoc/mixer.md; new CPU unit tests for pixel layout, HDR10 metadata serialisation,canvas.latency_ms, and an SDR media wipe on an HLG P210 canvas; onecpp_binaryfixture builds the standalone C++ tests.avpmixer/becomespyplumber/mixer/, so images ship one Python package; the package root imports the native module lazily so configuration, control and color helpers load without it.make_config.pyemits HDR shows (--color,--working-format,--sdr-port, colour-tagged and v210 sources);tests/sdr_patterns.pyrenders SDR pattern clips. README shows the 16-source 1080p60 HDR example.working_format,color,latency_ms,v210sources, renditioncolor/tonemap*/max_cll/max_fall;--input-color,--working-format; only semiplanar working formats; 32-source cap enforced at load;docs/config.mdopens with a complete loader-validated example, plus a shipped HDR example.Known limitations (documented in
demos/mixer/docs/config.md)32 sources per show (compositor pad mask), all sources always running, no runtime source add/remove,
--input>32 files needs homogeneous inputs, NVENC output is 4:2:0, HLG/PQ need a 10-bit canvas.Verification (all on this head or its immediate predecessors, see commits)
check_transition_recovery(plain and--prewarm), and the live 16-source HDR show (cuts, fades, media wipes on the HLG canvas, both Janus legs fresh) all green on the final head.tests/downstream/eka-recorder-smoke.sh, 0 panics; the Sep-15 baseline on the same variant panicked); sports-live-reframer legacy smoke passes (v2 variant has a pre-existing, unrelated node-factory failure, identical on Sep 15).graph_core.hpp.Follow-ups (not in this PR)
Router-first topology (per-slot conversion, runtime source add/remove, lifts the 32-source cap); reframer/recorder repos need the FFmpeg 8 migration (patch dir, avcpp pin, band-blur patch port);
Dockerfile.fedorais broken ondevelopalready (no pkg-config for FFmpeg headers).🤖 Generated with Claude Code