8

WIP: vulkan: Add vulkanh264dec

 1 year ago
source link: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1361
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

WIP: vulkan: Add vulkanh264dec

Copied from https://gitlab.freedesktop.org//gstreamer/gst-plugins-bad/-/merge_requests/2397

Warning: Vulkan video is still work in progress, from specification to available drivers and applications. Do not use it for production software just yet.

This work basically consists of two new objects inside the GstVulkan code:

  • GstVulkanDeviceDecoder: a GStreamer object in GstVulkan library, inherited from GstVulkanDevice, which enables VK_KHR_video_queue and VK_KHR_video_decode_queue extensions. Its purpose is to handle codec-agnostic operations.

  • vulkanh264dec: a GStreamer element, inherited from GstH264Decoder, which tries to instantiate a GstVulkanDeviceDecoder to composite it and is in charge of handling codec-specific operations later, such as matching the parsed structures. It outputs, in the source pad, memory:VulkanImage featured frames, with NV12 color format.

So far this pipeline works without errors:

TODO:

  • fully support VK_FORMAT_G8_B8R8_2PLANE_420_UNORM format in GstVulkan. That requires thinking about how to keep backwards compatibility. Later, an implementation of the sampler to convert this format to RGB will be needed, so that decoded frames can be rendered by vulkansink.
  • the code and its abstractions will need to be cleaned up, since currently the division between codec-specific and codec-agnostic code is not strict, and it must be fixed.
  • enhance the way the Vulkan headers are handled. Since the required headers files for video extensions are beta, they are not expected to be available in the system, so temporally I had to add the those headers as part of the GstVulkan library.
  • add discoverability of drivers with H264 decoding extension

Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK