6 ms·
What exactly is Vulkan video? I don't seem to get why it's special. My mpv already plays AV1 encoded videos via Vulkan on my Ryzen 2400G APU.
by txtsd 4y ago
What exactly is Vulkan video? I don't seem to get why it's special.
My mpv already plays AV1 encoded videos via Vulkan on my Ryzen 2400G APU.
- shmerl 4y agompv uses Vulkan for some filters, but access to hardware accelerated video decoding in it happens through VA-API currently. See: https://www.khronos.org/blog/an-introduction-to-vulkan-video https://www.khronos.org/blog/an-introduction-to-vulkan-video
- txtsd 4y agoThanks!
- nicolaslem 4y agoAlso I suspect AV1 decoding on a Ryzen 2400G is done purely in software since the first series to support AV1 hardware decoding is Ryzen 6000.
- shmerl 4y agoYes, good point. On AMD AV1 decoder was only added in RDNA 2 GPUs.
- galad87 4y agoAn (overengineered?) API to access HW to decode and encode video.
- adrian_b 4y agoI have looked right now into the mpv Github repository. Not even the latest mpv version appears to support any kind of Vulkan video decoding. Your mpv probably uses Vulkan as a graphics backend (--vo=gpu --gpu-api=vulkan), but VA-API for video decoding (--hwdec=vaapi). The Vulkan video decoding/encoding API has just been standardized a few weeks ago, but without the AV1 functions, which will be added in a revision of the standard, later this year.
- txtsd 4y agoYou're right. Thanks for clearing it up.
- pjmlp 4y agoYet another way for Khronos to try to make a living out of C based API standards, from the members that pay into the party.
- Veliladon 4y agoSo when you decode using hardware acceleration the library you're using usually handles writing the output to the backing store which lets you get performant hardware accelerate video inside a compositor. The problem when you're trying to use it as a texture inside Vulkan is that, best case scenario, the library then has to copy the data out to system memory, then provides a pointer to that buffer to your Vk app, then you have to copy it back into texture memory. Worst case scenario the library falls back to CPU decoding because of the final destination of the frame being system memory. Vulkan video is going to allow that video decoding to render straight to a Vulkan texture in texture memory bypassing the copy out and copy back in. It'll be far more performant than having to copy it twice across the PCIe bus taking up valuable system memory bandwidth to the CPU doing literally nothing.