<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr">Le ven. 15 févr. 2019 19 h 16, Tim Harvey <<a href="mailto:tharvey@gateworks.com">tharvey@gateworks.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Greetings,<br>
<br>
What is needed to be able to take advantage of hardware video<br>
composing capabilities and make them available in something like<br>
GStreamer?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto"><a href="https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/308">https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/308</a><br></div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Philipp's mem2mem driver [1] exposes the IMX IC and GStreamer's<br>
v4l2convert element uses this nicely for hardware accelerated<br>
scaling/csc/flip/rotate but what I'm looking for is something that<br>
extends that concept and allows for composing frames from multiple<br>
video capture devices into a single memory buffer which could then be<br>
encoded as a single stream.<br>
<br>
This was made possible by Carlo's gstreamer-imx [2] GStreamer plugins<br>
paired with the Freescale kernel that had some non-mainlined API's to<br>
the IMX IPU and GPU. We have used this to take for example 8x analog<br>
capture inputs, compose them into a single frame then H264 encode and<br>
stream it. The gstreamer-imx elements used fairly compatible<br>
properties as the GstCompositorPad element to provide a destination<br>
rect within the compose output buffer as well as rotation/flip, alpha<br>
blending and the ability to specify background fill.<br>
<br>
Is it possible that some of this capability might be available today<br>
with the opengl GStreamer elements?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Best Regards,<br>
<br>
Tim<br>
<br>
[1] <a href="https://patchwork.kernel.org/patch/10768463/" rel="noreferrer noreferrer" target="_blank">https://patchwork.kernel.org/patch/10768463/</a><br>
[2] <a href="https://github.com/Freescale/gstreamer-imx" rel="noreferrer noreferrer" target="_blank">https://github.com/Freescale/gstreamer-imx</a><br>
</blockquote></div></div></div>