chromium硬件加速播放video观察(intel630和Mali G610)
Intel? UHD Graphics 630
Intel(R) UHD Graphics 630
驱动程序版本: 27.20.100.8935
驱动程序日期: 2020/10/28
DirectX 版本: 12 (FL 12.1)
物理位置: PCI 总线 0、设备 2、功能 0
利用率 2%
专用 GPU 内存
共享 GPU 内存 0.3/7.9 GB
GPU 内存 0.3/7.9 GB
浏览器中输入chrome://gpu
可以看到
- Video Decode: Hardware accelerated
- Video Encode: Hardware accelerated
其中video decode和encode的hardware加速是开启了。并且发现intel 630集显竟然支持h265和vp9的8K视频解码硬件加速,而且还支持10bit格式。
Decoding :
Decode h264 baseline: 64x64 to 4096x4096 pixels
Decode h264 main : 64x64 to 4096x4096 pixels
Decode h264 high : 64x64 to 4096x4096 pixels
Decode vp9 profile0 : 64x64 to 8192x8192 pixels
Decode vp9 profile2 : 64x64 to 8192x8192 pixels
Decode hevc main : 64x64 to 8192x8192 pixels
Decode hevc main 10 : 64x64 to 8192x8192 pixels
Encoding :
Encode h264 baseline: 32x32 to 1920x1088 pixels, and/or 30.000 fps.
Encode h264 baseline: 32x32 to 1088x1920 pixels, and/or 30.000 fps.
Encode h264 main : 32x32 to 1920x1088 pixels, and/or 30.000 fps.
Encode h264 main : 32x32 to 1088x1920 pixels, and/or 30.000 fps.
Encode h264 high : 32x32 to 1920x1088 pixels, and/or 30.000 fps.
Encode h264 high : 32x32 to 1088x1920 pixels, and/or 30.000 fps.
然后也可以看到驱动信息
GPU0 : VENDOR= 0x8086, DEVICE=0x3e92, SUBSYS=0x08651028, LUID={0,62572}, DRIVER_VENDOR=Intel, DRIVER_VERSION=27.20.100.8935 ACTIVE
Driver D3D12 feature level : D3D 12.1
GL_RENDERER : ANGLE (Intel, Intel? UHD Graphics 630 (0x00003E92) Direct3D11 vs_5_0 ps_5_0, D3D11-27.20.100.8935)
解码
浏览器中播放视频,可以明显看到GPU的video decode使用率上升。
播放视频同时,地址栏输入chrome://media-internals/
,可以看到
FFmpegDemuxer: created video stream, config codec: h264, profile: h264 high
FFmpegDemuxer: created audio stream, config codec: aac, profile: unknown
kAudioDecoderName “FFmpegAudioDecoder” kVideoDecoderName “D3D11VideoDecoder”
从log看出,浏览器使用ffmpeg的demuxer(解复用器)来提取音视频流,然后用了D3D11VideoDocoder来做硬件加速。
Rockchip rk3588
我这里是orangepi 5 plus板子,其上的GPU是ARM Mali G610
name of display: :0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Panfrost (0xffffffff)
Device: Mali-G610 (Panfrost) (0xffffffff)
Version: 23.0.0
Accelerated: yes
Video memory: 7689MB
Unified memory: yes
Preferred profile: compat (0x2)
Max core profile version: 0.0
Max compat profile version: 3.0
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.1
OpenGL vendor string: Panfrost
OpenGL renderer string: Mali-G610 (Panfrost)
OpenGL version string: 3.0 Mesa 23.0.0-devel
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 23.0.0-devel
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
我看了mesa主线代码,截止2023.12.07日其主线上并没有支持Mali G610的驱动,然后在github上找到一个mesa-panfrost-G610的驱动,估计是这个版本。
同样,浏览器中GPU internals可以看到rk3588只支持解码硬件加速,编码不支持硬件加速。
Video Decode: Hardware accelerated
Video Encode: Software only. Hardware acceleration disabled
驱动信息
Operating system Linux 5.10.110-rockchip-rk3588 GPU0 VENDOR= 0x0000 [Panfrost], DEVICE=0x0000 [Mali-G610 (Panfrost)], DRIVER_VENDOR=Mesa, DRIVER_VERSION=23.0.0 ACTIVE GL_RENDERER Mali-G610 (Panfrost) GL_VERSION OpenGL ES 3.1 Mesa 23.0.0-devel
然后支持av1、h264、h265、vp8、vp9的8k视频硬解加速播放,不支持编码的硬件加速。
Decoding | |
---|---|
Decode av1 profile main | 48x48 to 7680x4320 pixels |
Decode av1 profile high | 48x48 to 7680x4320 pixels |
Decode av1 profile pro | 48x48 to 7680x4320 pixels |
Decode hevc main | 48x48 to 7680x4320 pixels |
Decode hevc main10 | 48x48 to 7680x4320 pixels |
Decode hevc main still-picture | 48x48 to 7680x4320 pixels |
Decode h264 baseline | 48x48 to 7680x4320 pixels |
Decode h264 main | 48x48 to 7680x4320 pixels |
Decode h264 high | 48x48 to 7680x4320 pixels |
Decode vp8 | 48x48 to 7680x4320 pixels |
Decode vp9 profile0 | 48x48 to 7680x4320 pixels |
同样,在media-internals中可以看到使用ffmpegdemuxer,但其video decoder是VDAVideoDecoder。
kAudioDecoderName “FFmpegAudioDecoder”
kVideoDecoderName “VDAVideoDecoder”
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!