Skip to content

Tolerate unknown SEI and expose SEI payloads on decoded pictures - #94

Merged
mpeg5 merged 3 commits into
masterfrom
fix_unknown_sei
Aug 7, 2026
Merged

Tolerate unknown SEI and expose SEI payloads on decoded pictures#94
mpeg5 merged 3 commits into
masterfrom
fix_unknown_sei

Conversation

@kpchoi

@kpchoi kpchoi commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Two decoder fixes plus the counterpart of the xeve SEI injection API:

  • Unknown SEI payload types made the whole decode fail
    (default: xevd_assert_rv(0, XEVD_ERR_UNEXPECTED)), so any stream with a
    standard SEI such as mastering display colour volume was rejected. They are
    now parsed past, as the spec requires.
  • The SEI parser only handled one sei_message() per SEI NAL unit; it now
    loops until the trailing byte.
  • SEI payloads of an access unit (everything except the internal picture
    signature) are exposed on the output picture: when
    imgb->ndata[XEVD_IMGB_SEI_SLOT] == XEVD_SEI_MAGIC,
    imgb->pdata[XEVD_IMGB_SEI_SLOT] points to an XEVD_SEI owned by the
    library, valid until the imgb is released. The spare ndata/pdata fields are
    used, so the ABI is unchanged. Slot 3 of the input bitstream buffer is no
    longer propagated to output pictures (it is reserved for this).

The README gains a programming guide for the library including SEI reading,
plus small fixes.

Verified with a round trip against mpeg5/xeve#169: per-frame T.35 + MDCV
payloads with bframes=15 arrive frame-accurate in display order; decode
output of normal streams is unchanged; MAIN/BASE and x86/aarch64 builds pass;
AddressSanitizer run over the whole decode path is clean (including picture
buffer recycling).

kpchoi added 3 commits August 7, 2026 18:03
Signed-off-by: KP Choi <kp5.choi@samsung.com>
Signed-off-by: KP Choi <kp5.choi@samsung.com>
Signed-off-by: KP Choi <kp5.choi@samsung.com>

@mpeg5 mpeg5 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mpeg5
mpeg5 merged commit 86ce4d0 into master Aug 7, 2026
3 checks passed
@kpchoi
kpchoi deleted the fix_unknown_sei branch August 8, 2026 05:12
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.

2 participants