Difference between revisions of "Mainline Hardware Decoding"

From PINE64
Jump to navigation Jump to search
m (add info about rkdjpeg, fix mistake in table)
m (formatting)
Line 90: Line 90:
= More Resources =
= More Resources =


[https://xnux.eu/devices/feature/cedrus-pp.html Megi's Cedrus Information]
* [https://xnux.eu/devices/feature/cedrus-pp.html Megi's Cedrus Information]


[https://briandaniels.me/2021/06/27/hardware-accelerated-video-playback-on-the-pinephone.html HW accelerated GStreamer playback on the PinePhone]
* [https://briandaniels.me/2021/06/27/hardware-accelerated-video-playback-on-the-pinephone.html HW accelerated GStreamer playback on the PinePhone]


[https://briandaniels.me/2021/07/06/hardware-accelerated-video-playback-on-the-pinephone-with-clapper.html HW accelerated Clapper video player on the PinePhone]
* [https://briandaniels.me/2021/07/06/hardware-accelerated-video-playback-on-the-pinephone-with-clapper.html HW accelerated Clapper video player on the PinePhone]


= See Also =
= See Also =
[[Mainline Hardware Encoding]]
 
* [[Mainline Hardware Encoding]]


[[Category:Quartz64]] [[Category:ROCKPro64]] [[Category:Rockchip RK3566]] [[Category:Rockchip RK3399]] [[Category:PineBook Pro]] [[Category:PinePhone Pro]] [[Category:PineNote]] [[Category:Rockchip RK3588]] [[Category:Rockchip RK3328]] [[Category:ROCK64]] [[Category:Allwinner A64]] [[Category:PinePhone]] [[Category:A64-LTS]] [[Category:SOPine]]
[[Category:Quartz64]] [[Category:ROCKPro64]] [[Category:Rockchip RK3566]] [[Category:Rockchip RK3399]] [[Category:PineBook Pro]] [[Category:PinePhone Pro]] [[Category:PineNote]] [[Category:Rockchip RK3588]] [[Category:Rockchip RK3328]] [[Category:ROCK64]] [[Category:Allwinner A64]] [[Category:PinePhone]] [[Category:A64-LTS]] [[Category:SOPine]]

Revision as of 17:35, 28 April 2022

This page is incomplete, you're welcome to improve it.

Mainline Hardware Decoding refers to video decoding done using hardware accelerators on the mainline Linux kernel (i.e. what sits in Linus' tree).

On most consumer-oriented SoCs, there is what is referred to as a VPU (Video Processing Unit). The VPU is responsible for power-efficient encoding and decoding of videos. Hardware-accelerated video decoding can be useful to get smoother video playback on your devices, lower power consumption, and lower CPU utilisation. Below is information regarding various hardware PINE64 uses and software that works with it.

Hardware

Here's a table of the current support for different hardware.

SoC
Codec
RK3328 RK3399 RK3566 RK3588
JPEG ? Yes No No
MPEG-2 Yes Yes In review No
VP-8 Yes Yes N/A N/A
H.264/AVC In review Yes No No
H.265/HEVC In review In review No No
VP-9 In review In review No No
AV1 N/A N/A N/A No

Cedrus

In 2018, Bootlin launched a crowdfunding campaign to bring a open source Allwinner VPU driver to mainline Linux, which came to be called Cedrus. The Cedrus media driver (For Allwinner SOCs such as A64) supported by mainline Linux supports H.264 and H.265 video decoding as of Linux 5.10, and with 5.11 came VP8 decoding support and a H.264 stateless video decoder interface. For more information refer to the Sunxi wiki.

Hantro

The Hantro media driver supports Rockchip and NXP SoCs including the RK3399 used in the Pinebook Pro and RockPro64. In November 2020 it was announced that Bootlin was working on encoding support for the driver.

rkvdec

rkvdec is the video decoding hardware that's developed by Rockchip presumably in house. It's what Rockchip uses for decoding 4K H.264/AVC, VP-9 and H.265/HEVC content.

RK3566, RK3568 and likely RK3588 use a second generation of rkvdec called rkvdec2. No mainline driver for this exists yet.

rkdjpeg

rkdjpeg is Rockchip's in-house hardware accelerated JPEG decoder. It can be found on the RK3566 and RK3568 as well as the RK3588.

No mainline driver exists for it so far.

Software

GStreamer

H.264 video decoding is possible when using GStreamer built from source, or an application utilizing it such as Clapper or µPlayer. µPlayer includes a indicator of when hardware acceleration is properly working and in use.

FFmpeg

Mainline FFmpeg currently lacks the necessary patches to use the v4l2-requests based API, but a fork that can utilise it exists.

More Resources

See Also