Repository navigation
HEVC: strip HDR10+ wherever it sits in an SEI NAL - #822
Merged
Merged
Conversation
is_hdr10plus_sei read only the first message of an SEI NAL, so an HDR10+ message behind another one reached webOS's decoder, which stalls on it. Walk every message, with sizes counted after emulation-prevention bytes are removed. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: Tiago Pereira <[email protected]>
…ring its NAL An HEVC SEI NAL holding HDR10+ (payloadType 4, T.35 B5 00 3C) alongside mastering display (137) or content light level (144) used to be dropped whole, taking the static metadata the pipeline builds the panel's HDR envelope from with it. strip_hdr10plus_sei now rebuilds the NAL from the remaining messages (emulation prevention re-inserted) and drops it only when nothing else is left; an SEI that does not parse cleanly keeps the old whole-NAL rule. Fixes the truncated-SEI test, which asserted nothing. Co-Authored-By: Claude Opus 5.5 <[email protected]>
GLinnik21
added a commit
to RichiL10/plx-native
that referenced
this pull request
Oct 18, 2026
Resolve packet_to_annexb against plxnative#822: the Dolby Vision P7 enhancement-layer drop and RPU rewrite run first, then strip_hdr10plus_sei. Co-Authored-By: Claude Opus 5.5 <[email protected]>
RichiL10
added a commit
to RichiL10/plx-native
that referenced
this pull request
Oct 18, 2026
Brings in the upstream commits since 84759b9: - plxnative#822 HEVC: strip HDR10+ wherever it sits in an SEI NAL - plxnative#817 Direct play: recover a plain-http body that ends early, goes silent or cannot be crossed - plxnative#825 Dolby Vision P7 -> 8.1 (the fork's own b0856d6, squashed upstream with the author's resolution against plxnative#822) - plxnative#835 Hungarian UI language, plxnative#836 ARM binary size budget re-baseline, plxnative#666 webOS 1-3 opt-in interface resolution Conflict in rust-modules/media/src/ff.rs only: - the DV definitions and packet_to_annexb are taken from upstream, which is the author's own resolution of plxnative#825 against plxnative#822 (EL drop and RPU rewrite first, then strip_hdr10plus_sei); packet_to_annexb is now identical to upstream main - the fork keeps its video-copy remux fallback that arms the P7 conversion from the route's frozen source facts when PMS's Matroska remux omits the DOVI configuration record (remux_dv)
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.
Before:
is_hdr10plus_seiread only the first message of an HEVC SEI NAL. An SEI NAL can carry several messages, so when an HDR10+ (ST 2094-40, T.35B5 00 3C) message sat behind another one, such as a mastering-display message, the NAL was kept and the HDR10+ metadata reached webOS's decoder, which stalls on it.After: every message in the NAL is walked, and the NAL is dropped if any of them is HDR10+. Message sizes are read after emulation-prevention bytes (
00 00 03) are removed, so a size that spans one no longer lands short of the next message. Static HDR10 metadata (payloadType 137/144) in a NAL of its own is still kept; one that shares a NAL with HDR10+ goes with it, since the NAL is dropped whole.How:
is_hdr10plus_seinow unescapes the SEI RBSP (sei_rbsp) and loops overpayloadType/payloadSizepairs until the0x80trailing byte, with bounds-checked slices throughout (listed inci/list-caps.ini). Four tests inff_packet_framing_tests.rscover HDR10+ alone and behind another message, static metadata and non-HDR10+ T.35 payloads being kept, a size that spans an emulation-prevention byte, and every truncation of a NAL returning without a panic.Verification on this branch (upstream
mainat 1c89b03 plus this commit):make check: passed, every suiteokwith 0 failedcargo +nightly check --lib --no-default-features: clean