Hardware video acceleration
Appearance
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:
- https://developer.qualcomm.com/qualcomm-robotics-rb5-kit/software-reference-manual/camera-and-video/video-decode
- https://wiki.postmarketos.org/wiki/Qualcomm_Snapdragon_450/625/626/632_(MSM8953)#Video_Encoder_.2F_Decoder_.28Venus.29
gst-launch-1.0 videotestsrc ! videoconvert ! v4l2vp8enc ! queue ! v4l2vp8dec ! xvimagesink
(from https://wiki.postmarketos.org/wiki/Xiaomi_Mi_Note_2_(xiaomi-scorpio)#Mainline)- for v4l2m2m
ffplay -vcodec h264_v4l2m2m file.mp4