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).
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).