Hardware video acceleration
This page could use some expansion. If you'd like to help out, feel free to edit this article! |
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 | API | H.263 | H.264 | H.264 MVC | H.265 | VP8 | VP9 | MPEG-2 | MPEG-4 | VC1 | VC1RCV | Xvid |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Venus | Qualcomm Snapdragon SoCs | v4l2m2m | Y | Y | - | Y | Y | Y | Y | Y | Y | - | Y |
Hantro | Rockchip SoCs / NXP i.MX8 SoCs | - | Y | - | - | Y | - | Y | - | - | - | - | |
rkvdec1 | Rockchip SoCs (rk32xx - rk33xx) | v4l2-request | - | Y | - | N | - | Y | - | - | - | - | - |
rkvdec2 | Rockchip SoCs (rk356x) | - | N | - | N | - | N | - | - | - | - | - | |
MFC v5 | Exynos 4, S5PV210 | v4l2m2m | N | N | - | - | - | - | N | N | N | N | - |
MFC v6+ | Exynos 5250 (v6), 5420 (v7), 3250 (v7), 5800 (v8) | v4l2m2m | Y | Y | Y | N | Y | Y | Y | Y | Y | Y | - |
mtk-vpu | MediaTek SoCs | v4l2-request | - | Y | - | - | - | - | - | - | |||
VDE | Nvidia Tegra T20/T30/T114. T124 is not supported. | - | P | N | - | N | - | N | N | N | - | - |
Encode
Hardware | Description | API | H.263 | H.264 | H.264 MVC | H.265 | VP8 | VP9 | MPEG-2 | MPEG-4 | VC1 | VC1RCV | Xvid |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Venus | Qualcomm Snapdragon SoCs | v4l2m2m | Y | Y | Y | Y | Y | - | - | Y | - | - | - |
Hantro | Rockchip SoCs | - | N | - | - | N | - | - | - | - | - | - | |
rkvenc2 | Rockchip SoCs (rk356x) | - | - | - | N | - | N | - | - | - | - | - | |
MFC v5 | Exynos 4, S5PV210 | v4l2m2m | N | N | - | - | - | - | - | N | - | - | - |
MFC v6+ | Exynos 5250 (v6), 5420 (v7), 3250 (v7), 5800 (v8) | v4l2m2m | Y | Y | Y | N | Y | - | - | Y | - | - | - |
mtk-vpu | MediaTek SoCs | v4l2-request | - | 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
Chromium
Chromium has related code, but it is enabled only for Chrome OS builds.
Firefox
v4l2m2m works for h264
Clapper
https://flathub.org/apps/com.github.rafostar.Clapper can use v4l2-request api
mpv
mpv can do video decoding with v4l2m2m with --hwdec=v4l2m2m-copy
Moonlight
Works with va-api and v4l2m2m
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
- for v4l2m2m:
mpv --hwdec=v4l2m2m-copy file.mp4
- https://github.com/fluendo/fluster - packaged in Alpine: fluster