-
Notifications
You must be signed in to change notification settings - Fork 437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Vulkan Video support #2344
base: master
Are you sure you want to change the base?
Add Vulkan Video support #2344
Conversation
This will house the video data structures.
vulkano/src/video.rs
Outdated
} | ||
|
||
#[derive(Clone, Debug)] | ||
pub struct ProfileInfo { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Vulkan struct is named VideoProfileInfo
, this one should probably match that.
I notice that quite a few of the types in the Also, am I correct that your additions here only cover video decoding, and not video encoding? Encoding is still provisional in Vulkan and subject to change, so it may be better to leave that out of this PR and add it separately, or wait until it's fully accepted into the spec. |
Hi @Rua, Yeah I will change the names to match better then. If you want to, I can leave encoding out of this completely for now. |
This adds support to QueueFamilyVideoPropertiesKHR, and in particular lets us know which codecs are supported through the contained VideoCodecOperationFlagsKHR.
This example illustrates the use of Vulkan Video in Vulkano.
@Rua How do I get these?
Is there anything I can use in order to index into |
cd80a32
to
a879d7d
Compare
Vulkano doesn't expose those, but Ash (used by Vulkano) does. What do you need it for, though? |
It is used to create the video session:
So far I am getting away by reusing the one returned in Also it's currently not possible to use https://github.com/ash-rs/ash/blob/3f5b96b3638a9ff341584e82188c3ba3aa5cb996/ash/src/vk/native.rs#L94 This macro apparently expects the path to be available in |
According to VUID-VkVideoSessionCreateInfoKHR-pStdHeaderVersion-07190, the extension name must match the one returned in the capabilities, and according to VUID-VkVideoSessionCreateInfoKHR-pStdHeaderVersion-07191, the spec version must not be greater than the one in the capabilities. |
What do you think of making Regarding those constants, I'm not really sure what they are for. They don't seem to be defined in the Vulkan spec, and they're not defined in the vk.xml file either. It looks like they are actually constants defined to the video encoding scheme itself, and not by the Vulkan standard? |
If you want me to I can split the codecs outside of the Regarding the constants in |
Are those constants something that the Vulkano user would be expected to use directly? If so, then they could be re-exported in Vulkano. |
Add support for VideoSessionParameters. These are used to deliver stream metadata to the driver.
This test data will be used in the video example. It contains a single I frame encoded with GStreamer.
We need to know whether a queue supports result status queries in order to implement vulkan video support.
This type is introduced by khr_video_queue. We need it to check on the status of a video decode/encode operation.
Hi, I am working on this. It is 100% work-in-progress still. I am testing my changes through a RTX2060 + the proprietary NVIDIA blob on Linux and comparing the results against GStreamer's vkh264dec.
Update documentation to reflect any user-facing changes - in this repository.
Make sure that the changes are covered by unit-tests.
Run
cargo fmt
on the changes.Please put changelog entries in the description of this Pull Request
if knowledge of this change could be valuable to users. No need to put the
entries to the changelog directly, they will be transferred to the changelog
file by maintainers right after the Pull Request merge.
Please remove any items from the template below that are not applicable.
Describe in common words what is the purpose of this change, related
Github Issues, and highlight important implementation aspects.
Changelog: