Jump to content

Hardware video acceleration

From postmarketOS Wiki
Revision as of 01:15, 17 July 2023 by Okias (talk | contribs) (add NXP (Librem 5 for example))
Note This page is a stub. Please contribute what you know!

Hardware video acceleration makes it possible for the video decoder/encoder to decode/encode video, thus offloading the CPU and saving power.

Supported codecs

Decode

Hardware Description H.263 H.264 H.264 MVC H.265 VP8 VP9 MPEG-2 MPEG-4 VC1 VC1RCV Xvid
Venus Qualcomm Snapdragon SoCs Y Y - Y Y Y Y Y Y - Y
Hantro Rockchip SoCs / NXP i.MX8 SoCs - Y - - Y - Y - - - -
rkvdec1 Rockchip SoCs (rk32xx - rk33xx) - Y - N - Y - - - - -
rkvdec2 Rockchip SoCs (rk356x) - N - N - N - - - - -
MFC v5 Exynos 4, S5PV210 Y Y - - - - Y Y Y Y -
MFC v6+ Exynos 5250 (v6), 5420 (v7), 3250 (v7), 5800 (v8) Y Y Y Y Y Y Y Y Y Y -
mtk-vpu MediaTek SoCs - Y - Y Y - - - - -
VDE Nvidia Tegra T20/T30/T114. T124 is not supported. - P N - N - N N N - -

Encode

Hardware Description H.263 H.264 H.264 MVC H.265 VP8 VP9 MPEG-2 MPEG-4 VC1 VC1RCV Xvid
Venus Qualcomm Snapdragon SoCs Y Y Y Y Y - - Y - - -
Hantro Rockchip SoCs - N - - N - - - - - -
rkvenc2 Rockchip SoCs (rk356x) - - - N - N - - - - -
MFC v5 Exynos 4, S5PV210 Y Y - - - - - Y - - -
MFC v6+ Exynos 5250 (v6), 5420 (v7), 3250 (v7), 5800 (v8) Y Y Y Y Y - - Y - - -
mtk-vpu MediaTek SoCs - Y - Y Y - - - - -
VDE Nvidia Tegra T20/T30/T114/T124. - N N - N - - - - - -

Status legend

Code Meaning
Y Fully implemented
P Partially implemented
N Broken / unsupported in mainline
Untested / unknown
- Unsupported by hardware

APIs

v4l2-request

TODO

v4l2m2m

TODO

libvdpau

TODO

VA-API

TODO

Usage

Applications

Web browsers

Chromium has related code, but it is enabled only for Chrome OS builds.

There is some work in progress for v4l2m2m in firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1833354

Clapper

https://flathub.org/apps/com.github.rafostar.Clapper can use v4l2-request api

mpv

mpv should be able to do video decoding with v4l2m2m with --hwdec=v4l2m2m-copy, but it has been broken for a long time https://github.com/mpv-player/mpv/issues/10701

Testing

TODO: Add potential good examples and validate. Potential candidates: