Identify HDR10+ before playback (AE#579) - #580
Merged
Merged
Conversation
The container declares HDR10+ nowhere. ST 2094-40 rides an in-band ITU-T T.35 SEI that no demuxer parses (only hevcdec surfaces it, post-decode, as AV_FRAME_DATA_DYNAMIC_HDR_PLUS), and the one demuxer that produces packet side data for it is matroskadec, from a BlockAdditional. So the engine only learned HDR10+ while playing, from the segment producer's per-packet scan, and a host badging a title had to wait for that mid-session upgrade or label it HDR10. probe(url:detecting:) takes a ProbeDetail option set and runs the opt-in passes it names over one open handle: .hdr10Plus scans demuxed video packets for either carriage, .atmos is the bounded JOC decode probeDetectingAtmos already ran (kept, now a spelling of detecting: .atmos). Asking for both costs one connection. The HDR10+ scan runs first and before any seek, so the common case is answered out of the packets find_stream_info already queued, with no further I/O. SourceProbe gains carriesHDR10PlusMetadata, and .hdr10 upgrades to .hdr10Plus through the same rule the session applies, in one place so the two cannot drift. Both passes are additive: a cap leaves the base answer untouched, a negative means "not seen inside the budget", never "proven absent". The signature scan moved out of HLSSegmentProducer into HDR10PlusMetadataScan, so probe and session agree by construction, and the producer picks up the Matroska side-data carriage it could not see before. Tests: two ~1 KB HEVC/PQ fixtures that differ only in the injected SEI, the positive one carrying a payload ffprobe parses as SMPTE2094-40 (generator in Scripts/make-hdr10plus-fixture.py verifies that before it emits the file). aetherctl probe --detect-hdr10plus / --detect-atmos make both passes observable. Suggested by Geordie. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015PM3xUJB6ZQyqnmGK1fp6F
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.
Closes the probe half of #579.
The container declares HDR10+ nowhere. ST 2094-40 rides an in-band ITU-T T.35 SEI that no demuxer parses (only
hevcdecsurfaces it, post-decode), and the one demuxer that produces packet side data for it ismatroskadec, from a BlockAdditional. So the engine only learned HDR10+ while playing, from the segment producer's per-packet scan, and a host badging a title had to wait for that mid-session upgrade or call it HDR10.What this adds
probe(url:options:detecting:atmosDetection:hdr10PlusDetection:)taking aProbeDetailoption set, running the opt-in passes over one open handle..hdr10Plusscans demuxed video packets for either carriage,.atmosis the bounded JOC decodeprobeDetectingAtmosalready ran, which stays as a spelling ofdetecting: .atmos. Both at once cost one connection.SourceProbe.carriesHDR10PlusMetadata, and.hdr10upgrading to.hdr10Plusthrough the same rule the session applies, in one place so the two cannot drift.find_stream_infoalready queued, with no further I/O. Bounded byHDR10PlusDetectionOptions(32 packets, 16 MiB, 2 s).HLSSegmentProducerintoHDR10PlusMetadataScan; the producer picks up the Matroska side-data carriage it could not see before.aetherctl probe --detect-hdr10plus/--detect-atmos.Additive only: a cap leaves the base probe's answer untouched, and a negative means "not seen inside the budget", never "proven absent".
Verification
-strict-concurrency=completeclean;Scripts/check-doc-links.pyclean.libavutil/hdr_dynamic_metadata.c's bit layout and the generator only emits the file onceffprobe -show_framesreportsHDR Dynamic Metadata SMPTE2094-40on it.format: hdr10bare andformat: hdr10Pluswith--detect-hdr10plus, while the SEI-less encode readsnot seen.Not in here: the
cdm4supplemental-codec question, which stays open on #579 because it needs a measurement on a real panel before it gets a route.🤖 Generated with Claude Code
https://claude.ai/code/session_015PM3xUJB6ZQyqnmGK1fp6F