<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le sam. 6 avr. 2019 06 h 10, horai <<a href="mailto:ivo.hora@seznam.cz">ivo.hora@seznam.cz</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Nicolas Dufresne-5 wrote<br>
> Le jeudi 28 mars 2019 à 10:57 -0500, horai a écrit :<br>
> <br>
> <br>
> omxh264dec zero-copy solution is not supported by the Mesa VC4 driver,<br>
> only the brcm GLES driver supports this. I know they are working on a<br>
> V4L2 driver that speaks mmal in the kernel, with DMABuf plumbed through<br>
> mmal in order to allow using standard DMABuf import path into GL. That<br>
> being said, patches where submitted to cluttersink (which is not part<br>
> of GStreamer project), but was never merged due to lack of proper<br>
> support in CoGL/Clutter. Clutter is basically left without maintenance<br>
> these days.<br>
> <br>
> The right solution is what is coming next, but I have no idea when this<br>
> will happen, or if there is a way to pick dev version here and there to<br>
> make it work.<br>
<br>
Dear sir,<br>
<br>
Would be so kind and help me understand that matter clearly?<br>
I had the impression that omxh264dec zero-copy solution is related to<br>
decoding part only and I thought that this process is not dependent on the<br>
display backend. From your words I understand that the zero-copy slow down<br>
problem of MESA VC4 is present in X11 as well as in Wayland, moreover I<br>
think that Wayland does not work without VC4 at all.So, I understand that if<br>
my application would be using a sink utilizing VC4 (in my case clutter stage<br>
in GTK panel), I would definitely face the zero-copy problem. But this is<br>
not dependent on X11 or Wayland.<br>
Based upon my experience,when I started using VC4 openGL driver in X11, I<br>
experienced huge performance boost in my application (gstreamer + GTK +<br>
clutter), therefore I blamed clutter as the bottleneck in my application and<br>
I somehow presumed that clutter switched from utilizing OpenGL ES 2.0 to<br>
OpenGL driver internally and increased performance.<br>
I do not fully understand the structure of VC4, I understand VC4 as a driver<br>
of Broadcom videocore GPU driver exposing the hardware to software via<br>
OpenGL ES 1.0/2.0 API as well as OpenGL 2.1 API (on a hardware level it is<br>
OpenGL ES 2.0 hardware renderer and the OpenGL is just a software emulation<br>
layer for OpenGL 2.1 specification functions which are missing in OpenGL ES<br>
2.0, this could be achieved only because of the fact that OpenGL ES 2.0 was<br>
derived from OpenGL 2.1 therefore they are very much close to each other)<br>
and due to the fact that Clutter supports OpenGL as well as OpenGL ES(either<br>
1.0/2.0) Clutter can choose between OpenGL and OpenGL ES, because the<br>
libclutter library could be compiled with OpenGL (and I assume that Raspbian<br>
has binary library compiled with both flags enabled during configuration<br>
process) as well as OpenGL ES support. Therefore I presumed that when<br>
starting using VC4, Clutter layer in my application stopped using OpenGL ES<br>
and switched to OpenGL and that increased the performance or maybe my<br>
understanding of the matter could be completely wrong and VC4 could be<br>
simply much more optimized than original Broadcom OpenGL ES 2.0 binary<br>
driver and therefore Clutter could be internally using OpenGL ES 2.0 (no<br>
OpenGL) but VC4 is much faster then original Broadcom Open GL ES 2.0 binary<br>
driver but lacks zero-copy solution which has no relation to Clutter it<br>
relates to omx codec encoding/decoding video speaking in gtreamer words for<br>
omxh264dec element.<br>
In short despite the fact I am not using zero-copy solution because of VC4<br>
usage I gained performance boost in video rendering (displaying) via Clutter<br>
layer when using VC4. <br>
My problem was, why do I then experince such a slow rendering when using<br>
Wayland with Clutter?<br>
Please, would you be so kind and bring some more light to my understanding<br>
of the matter as I presumed that omxh264dec has no relation to VC4 OpenGL ES<br>
2.0, I assumed that is does only video decoding (for example h264) on GPU,<br>
but I understand that for decoding it also needs to use some part of VC4<br>
driver because GPU driver is responsible for video processing as well as for<br>
video or image displaying but I assumed that encoding and displaying use<br>
totally different VC4 APIs.<br>
I do not know what is being used from VC4 for video encoding/decoding but I<br>
assumed that for displaying (in my case clutter stage embedded into GTK<br>
panel on top of Wayland or X11 utilizing VC4) OpenGL2.1 or OpenGLES 2.0 API<br>
is used specifically talking about RPI 3B+ and Broadcom BCM2837 GPU)<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I've just stumbled across this thread, and it seems that v4l2 mem2mem codec has landed already, and GStreamer 1.14 has been ship for this purpose. Basically means you should stop using OMX and try v4l2h264dec element instead.</div><div dir="auto"><br></div><div dir="auto"><a href="https://www.raspberrypi.org/forums/viewtopic.php?t=234778">https://www.raspberrypi.org/forums/viewtopic.php?t=234778</a><br></div><div dir="auto"><br></div><div dir="auto">Cluttersink does not support dmabuf, so it will still require a bit of copies, but with that driver you save a dma copy from vcore. I hope it will compensate. You could also try your luck with adding glupload in front, but I'm not sure what is the state of the legacy gluploadmeta that this would use.</div><div dir="auto"><br></div><div dir="auto">When you moved to X11/Clutter what you did was to turn software color conversion into GPU accelerated conversion and that certainly give a boost. When you then move to using a compositor (over X11 or Wayland) you start rendering each window twice, once offscreen and finally composed to screen. This requires more GPU but I would also suspect more memory (see kernel parameter gpu_mem). Try increasing that amount of memory, something like 128M, and see if that helps.</div><div dir="auto"><br></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>
<br>
<br>
--<br>
Sent from: <a href="http://gstreamer-devel.966125.n4.nabble.com/" rel="noreferrer noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a></blockquote></div></div></div>