Skip to content

Add some video codecs support for virgl

Huang Rui requested to merge rui/mesa:upstream-for-xen into main

Background


We are working to add some Video codecs support on Xen with QEMU, please see details on XEN mail list. But the virtio video with virgl implementation is not related with hypervisor. So here, please kindly review virgl video patches and see the corresponding Virglrenderer implementation at virgl/virglrenderer!1068 (merged) , virgl/virglrenderer!1180 (merged)

Implementation Notes


Currently, there are a small number of video formats in mesa that can be hardware accelerated decoding in VM, and these patches are aimed at adding more video formats to let them can be hardware accelerated decoding.

Those formats are added: mpeg12, vc1, jpeg, hevc10bit and vp9. Different virgl_picture_desc structures are added in virgl_video_hw.h, parameter will be bypassed into virgl_picture_desc in different fill_picture_desc function. Virtio gpu libva backend will bypass all the video parameter and command into virglrenderer, it will call the host libva to decode video and feedback the results back to the guest. Therefore, this modification should be used with the relevant modifications in virglenderer to take effect. And for qemu part, function get_drm_fd callback is added to let the guest OS can get render node.

Currently, many video decoding formats have been added, but the efficiency of decoding in the VM is not very high. This is mainly due to the inefficient video data transmission method between the host and the guest. In the future, blob memory may will be used to improve the efficiency of video decoding.

Reference


Screenshot: VirtIO_Video_Xen

Edited by Huang Rui

Merge request reports