i.MX8 chromium hardware accelerated video decoding

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

i.MX8 chromium hardware accelerated video decoding

i.MX8 chromium hardware accelerated video decoding

i.MX8 VPU hardware decoder support below video codec:

H.265 HEVC Main Profile 4Kp60 Level 5.1

H.264 AVC Constrained Baseline, Main and High profile

H.264 MVC

WMV9 / VC-1 Simple, Main and Advanced Profile

MPEG 1 and 2 Main Profile at High Level

AVS Jizhun Profile (JP)

MJPEG4.2 ASP, H.263, Sorenson Spark

Divx 3.11, with Global Motion Compensation (GMC)

ON2/Google VP6/VP8

RealVideo 8/9/10

JPEG and MJPEG A/B Baseline

 

i.MX8 VPU Linux driver is implemented based on V4L2 standard.

Chromium beside software video decoding, it also support hardware video decoder(VideoDecodeAccelerator),  there are some kind of VideoDecodeAccelerator, one of them is V4L2VDA.

Please note V4L2VDA is using V4l2 api, so it is possible that change V4L2VDA to enable Chromium hardware video playback on i.MX8.

 

This doc share patch to add chromium video decode accelerate by using i.MX8QM/i.MX8QXP VPU.

It will support chromium H.264, H.265, VP8 hardware video decode.

H.264 and H.265 need use mp4 container.

VP8 use webm container.

 

HW: i.MX8QM/i.MX8QXP MEK board, 1080P HDMI display, mouse, keyboard

SW: i.MX8 5.10.72_2.2.2 yocto bsp release(which included chromium 91.0), and patch in this doc

 

Patch description:

imx8-5.10.72-vpudrv-update.diff, update i.MX8  5.10.72_2.2.2 kernel vpu driver to https://source.codeaurora.org/external/imx/linux-imx/commit/drivers/mxc/vpu_malone?h=lf-5.15.y&id=fa...

chromium-ozone-wayland_91.0.4472.114.bb.diff, change meta-browser/meta-chromium/recipes-browser/chromium/chromium-ozone-wayland_91.0.4472.114.bb for adding some compile flags, etc.

5.10.72-merge.patch, this patch change chromium source code to add video decode accelerate by using i.MX8 VPU.

 

Build steps:

1>Download i.MX8 5.10.72_2.2.2 yocto release from nxp.com

2>apply chromium-ozone-wayland_91.0.4472.114.bb.diff to change meta-browser/meta-chromium/recipes-browser/chromium/chromium-ozone-wayland_91.0.4472.114.bb

3>put 5.10.72-merge.patch to folder path_of_yocto-5.10.72-2.2.2/sources/meta-browser/meta-chromium/recipes-browser/chromium/files/

3>apply imx8-5.10.72-vpudrv-update.diff to i.MX8 5.10.72_2.2.2 kernel

4>under the yocto image build folder, add "CORE_IMAGE_EXTRA_INSTALL += "chromium-ozone-wayland" to file path_of_yocto-5.10.72-2.2.2/folder-of-bld/conf/local.conf

5>run bitbake to build rootfs image

 

Test steps:

After system boot up, put some video clip under /home/root/video

then run below cmd (do not run chromium without any parameter, as that will start chromium with some other setting, you can check /usr/lib/chromium/chromium-wrapper)

"/usr/lib/chromium/chromium-bin   --no-sandbox --ozone-platform=wayland

--enable-features=VaapiVideoDecoder  --enable-accelerated-video-decode  

--enable-clear-hevc-for-testing

--ignore-gpu-blacklist --window-size=1920,1180  /home/root/video"

then use mouse to click video clip and will start playback.

 

Reference:

https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-proces...

https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applicat...

https://www.chromium.org/audio-video/#:~:text=codec%20and%20container%20support

https://github.com/igel-oss/meta-browser-hwdecode/blob/master/recipes-chromium/chromium/files/0001-A...

 

 

 

附件
评论

How can I get this working for 5.10.52 kernel and a recent Chromium (e.g. 116+)?

And additional question: In case of most recent i.MX LF6.6.3_1.0.0 kernel, are there any patches in Chromium required? Or should Chromium 117 work then out-of-the-box?

100% 有帮助 (2/2)
版本历史
最后更新:
‎08-18-2022 02:29 AM
更新人: