Skip to content

h265d: HDR dynamic metadata (HDR10+/HDR Vivid) SEI is only attached to the first frame #966

Description

@DXICM

When decoding HEVC streams carrying per-frame HDR dynamic metadata SEI
(SMPTE ST 2094-40 / HDR10+ or CUVA HDR Vivid), mpp_frame_get_hdr_dynamic_meta()
only returns data for the first decoded frame; subsequent frames that carry the
same SEI report no dynamic metadata.

Evidence

  1. mpi_dec_test on an HDR Vivid HEVC stream whose SEI repeats in multiple AUs:
    with h265d_debug=8704 the hdr_meta log line only appears for poc 0, even
    though the SEI is present in later AUs as well.
  2. Comparison with software decoding (FFmpeg hevc decoder): the dynamic HDR
    side data is present on N frames (e.g. 6) while hevc_rkmpp (via FFmpeg)
    exports it on only 1 frame for the same file.
  3. Streams that repeat the SEI in every AU (e.g. typical HDR10+ UHD Blu-ray
    rips) are unaffected because frame 0 still gets the metadata and every frame
    carries it — but the parser appears to latch the SEI once instead of
    refreshing it per AU.

Expected behavior

The parser should attach the HDR dynamic metadata SEI carried by each AU to the
corresponding MppFrame (as it already does for the first AU), so per-frame
dynamic tone-mapping works.

Environment

  • MPP develop branch, v1.0.12 (8f922ed)
  • RK3576 and RK3588
  • Kernel 5.10 / 6.1 (both observed)

Suggested fix area

mpp/codec/dec/h265/h265d_sei.c (the dynamic-meta SEI callback stores into a
once-only context) / frame-export path in mpp/codec/dec/h265 where
KEY_HDR_INFO / hdr_dynamic_meta is attached to MppFrame.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions