Skip to content

HEVC 10-bit decoding: drm_prime buffer exported without pixel format declared (RK3576) #958

Description

@MarusGradinaru

Description

When decoding HEVC 10-bit content using hevc_rkmpp on RK3576, the drm_prime buffer is exported without a pixel format declared in the buffer metadata. This causes MPV to fail when attempting to initialize the hardware decoding texture.

Hardware / Software

SoC: RK3576
Board: FriendlyElec NanoPi M5
OS: Debian Trixie (GNOME Wayland)
Kernel: 6.1
librockchip-mpp: 20260226-2
Mesa: 25.0.7-2 (Panfrost Mali-G52)
MPV with --hwdec=rkmpp --vo=gpu --gpu-api=opengl --gpu-context=wayland

Observed behavior

With 8-bit HEVC content, MPV reports:
[vd] Decoder format: 1920x1080 drm_prime[nv12] ...
Playback works correctly.

With 10-bit HEVC content (Main 10 profile, yuv420p10), MPV reports:
[vd] Decoder format: 1920x816 drm_prime ...
No pixel format is declared inside the drm_prime buffer metadata. MPV then fails with:
[vo/gpu] Initializing texture for hardware decoding failed.
Result: blue screen, audio only.

Expected behavior
The drm_prime buffer exported by RKMPP for 10-bit HEVC should include the pixel format in its metadata (analogous to drm_prime[nv12] for 8-bit), so that the receiving component (MPV/Mesa/Panfrost) can correctly import it as an EGL dmabuf texture.

Workaround
Using --hwdec=rkmpp-copy works, but requires CPU to copy frames from VPU memory to RAM, significantly increasing CPU load (CPU Big cores: ~50% at 1080p vs ~15% with zero-copy).

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