GNOME Bugzilla – Bug 733949
vaapidecode: allow output to buffers from downstream pools (userptr)
Last modified: 2018-11-03 15:45:22 UTC
Hardware decoders will always use their native VA surface representation. However, if the downstream element supplies its own bufferpool, and that the VA driver supports userptr wrappings, then it would be possible to use VPP to transfer from that VA surface to the wrapper VA surfaced backed by userptr obtained from that downstream bufferpool. That way, we could offer HW accelerated decode and transfer to user provided memory buffers in the most common formats, including RGBA.
This is all up to vaapidecode to do right imho. If downstream proposed an buffer pool, you should pick it's allocator and set the allocation params to reflect your requirement (check your return values, it may fail). If downstream offers only an allocator, you should set your requirement on it. Note that downstream may already have requirements. Make sure you don't reduce the alignment. Find a common value. You may want to have a look at the libav gst decoder, which negotiate memory alignment (and also video alignement, which is a bit more advanced) in order to do direct rendering in XV shared memory.
-- 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/18.