Help with gstreamer-vaapi + rockchip vpu vaapi driver

Víctor Jáquez vjaquez at igalia.com
Tue Oct 16 10:40:33 UTC 2018


On Mon, 15 Oct 2018 at 20:46, Ezequiel Garcia wrote:
> On Mon, 15 Oct 2018 at 18:57, Nicolas Dufresne <nicolas at ndufresne.ca> wrote:
> > > > Is dmabuf supported bye the v4l2 vaapi driver??
> > > >
> > >
> > > Yes, it does.
> > >
> > > However, I found a few things that seemed off:
> > >
> > > 1. On this particular platform, the library requires
> > > PRIME_2 buffer type for AcquireBufferHandle.
> > > It's done only if the pixel format is tiled,
> > > but I have relaxed the requirement, since it
> > > doesn't seem needed to acquire the buffer.
> > >
> > > See:
> > > https://github.com/bootlin/libva-v4l2-request/blob/master/src/buffer.c#L212
> > >
> > > 2. Also, since there is no GetImage implementation
> > > I have enabled GST_VAAPI_ENABLE_DIRECT_RENDERING=1,
> > > so DeriveImage is used.
> > >
> > > Although there are some artifacts, see image attached,
> > > and also there's a SIGSEGV somewhere in v4l library.
> > >
> > > However, I think this will prevent proper zero-copy to work,
> > > since DeriveImage is effectively memcpying
> > > the surface into an image.
> > >
> > > Does gst-vaapi support zero-copy VAAPI to DRM ?
> >
> > Not at the moment. There is no VAAPI DRM backend, and the dmabuf
> > exportation need to be ported to PRIME_2 in order to expose the
> > modifiers. Whenever there is no modifiers, normal DMABuf will be used
> > and then kmssink could work.

We need to implement in gstreamer-vaapi the new API to export dmabufs, without
the need to use derived images, which also expose, if I understand correctly,
the modifiers required by drm.

> Maybe this is something we can kickoff during next hackfest.
> It doesn't sound like we are too far away, and with cedrus
> driver about to be merged, it'd be interesting to have this
> pieces in place.

Might be one task, yes, though right now I'm more focused in gstreamer-rs ;)

vmjl



More information about the gstreamer-devel mailing list