v4l2 mem2mem compose support?

Nicolas Dufresne nicolas at ndufresne.ca
Sat Feb 16 02:42:35 UTC 2019


Le ven. 15 févr. 2019 19 h 16, Tim Harvey <tharvey at gateworks.com> a écrit :

> Greetings,
>
> What is needed to be able to take advantage of hardware video
> composing capabilities and make them available in something like
> GStreamer?
>

Veolab wrote one already for the IMX.6 hardware (mainline kernel), it
worked for them, but it's missing some polishing prior to go upstream.
Would be nice since it  could work with other drivers too, rockchip and
Samsung Exynos have similar IP with partial drivers. And I'm sure a lot of
HW exist.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/308

I worked with them for the design, they added a new helper to make it easy
to handle the internal m2m nodes which seems like a good idea, and we could
simplify some more code with it. The design is to cascade the blitters, so
you can compose as many layers as you want. It's base on aggregator class.


> Philipp's mem2mem driver [1] exposes the IMX IC and GStreamer's
> v4l2convert element uses this nicely for hardware accelerated
> scaling/csc/flip/rotate but what I'm looking for is something that
> extends that concept and allows for composing frames from multiple
> video capture devices into a single memory buffer which could then be
> encoded as a single stream.
>
> This was made possible by Carlo's gstreamer-imx [2] GStreamer plugins
> paired with the Freescale kernel that had some non-mainlined API's to
> the IMX IPU and GPU. We have used this to take for example 8x analog
> capture inputs, compose them into a single frame then H264 encode and
> stream it. The gstreamer-imx elements used fairly compatible
> properties as the GstCompositorPad element to provide a destination
> rect within the compose output buffer as well as rotation/flip, alpha
> blending and the ability to specify background fill.
>
> Is it possible that some of this capability might be available today
> with the opengl GStreamer elements?
>

You could do it in GLES2, but it's not very fast compared to the 2D
blitter. Depending on the variant, the GPU might not be able to reuse its
own output, which kills the performance with how the GST GL elements are
designed.


> Best Regards,
>
> Tim
>
> [1] https://patchwork.kernel.org/patch/10768463/
> [2] https://github.com/Freescale/gstreamer-imx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190215/08a9b879/attachment.html>


More information about the gstreamer-devel mailing list