After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 797010 - vaapipostproc: implement the negotiation of memory:DMABuf in sink pad
vaapipostproc: implement the negotiation of memory:DMABuf in sink pad
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-08-22 13:02 UTC by Víctor Manuel Jáquez Leal
Modified: 2018-11-03 15:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch. Adds DMA buffer input pad type to gstvaapipostproc. (2.36 KB, patch)
2018-08-30 22:03 UTC, Ivan Fedotov
none Details | Review

Description Víctor Manuel Jáquez Leal 2018-08-22 13:02:43 UTC
In order to import tiled buffers vaapipostproc should negotiate memory:DMABUf in its sink pad

For more information see: 

https://lists.freedesktop.org/archives/gstreamer-devel/2018-August/068973.html
Comment 1 Ivan Fedotov 2018-08-30 22:03:06 UTC
Created attachment 373508 [details] [review]
Patch. Adds DMA buffer input pad type to gstvaapipostproc.

Hello. We wrote a patch that allows the vaapipostproc plugin to accept input data in the DMABuf format. Is it possible to add it to the repository in the future?
Comment 2 Nicolas Dufresne (ndufresne) 2018-08-30 23:01:34 UTC
I'd like to hold on this effort until we get a clearer view on Intel on how to address the issues cause by the implicit usage of modifiers. As it is now, these DMABuf cannot be imported anywhere else then into another VAAPI component using the same GPU. This unfortunate design decision breaks random use cases.
Comment 3 Eugen Klim 2018-08-31 06:58:16 UTC
(In reply to Nicolas Dufresne (ndufresne) from comment #2)
> I'd like to hold on this effort until we get a clearer view on Intel on how
> to address the issues cause by the implicit usage of modifiers. As it is
> now, these DMABuf cannot be imported anywhere else then into another VAAPI
> component using the same GPU. This unfortunate design decision breaks random
> use cases.

Isn't it better then nothing? Personally I need this not to send dmabuf anywhere, but to transform DMABuf into VASurface without unnecessary copying. Again, GL already *does* export DMABuf, this fix only adds the possibility of accepting DMABuf to vaapipostproc. This is unfortunate that gstreamer could not ensure that vaapi and GL are using the same device, but I do use them on the same device and I don't want to copy memory twice from and to GPU.
Comment 4 Nicolas Dufresne (ndufresne) 2018-08-31 11:56:11 UTC
Feel free to manage your own copy for you own needs. I'm just trying to do my job of making sure we have an answers for the general use cases. I can show you screenshot of what sad users will see when they hit that issue, it's not viewable.

These is problems in the DMABuf support design inside VAAPI, and we need to find a way to prevent these from breaking video playback on random people machine, or to get that fixed by the VAAPI folks. If it's not you carrying this, it will need to be someone else.

A typical user is a PC owner with NVIDIA + Intel Accelerator. It is quite possible this user will want to use Intel VAAPI, because NVDEC isn't shipped by distro, combined with their fast NVIDIA GPU. With Intel implementation of DMABuf, this does not fail, but does not render anything viewable.
Comment 5 Nicolas Dufresne (ndufresne) 2018-09-06 02:40:13 UTC
So, I had a bit of time to look around, Vaapi gained support for this by introducing VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2. We should port all DMABuf exportation usage to that. There is a new export method, which will provide the modififers. Then we can in a first place fail the export if there is a modififers and eventually expose the exported buffers with the modifiers. On the VPP side, I bet we can influence the modifiers that will be used somehow, I haven't search yet.
Comment 6 GStreamer system administrator 2018-11-03 15:55:39 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/105.