IMX Scaler / CSC m2m driver.

Nicolas Dufresne nicolas.dufresne at collabora.com
Thu Mar 19 07:51:21 PDT 2015



Le 03/19/2015 09:45 AM, Ian Molton a écrit :
> gst-launch-1.0 filesrc location= Downloads/big_buck_bunny_1080p_h264.mov
> ! qtdemux ! h264parse ! queue ! v4l2video3videodec ! queue !
> v4l2video0convert ! video/x-raw,width=1920,height=1080 ! ximagesink
> sync=false

You might wonder why it's only 2-3 time faster. In this pipeline, both
the decoder and the convert CAPTURE/OUTPUT will be set to MMAP. This
means there is no other option but to copy all over the place. That
converter though is problematic, because of a stride and height
alignment requirement of 1024 pixel (1024x1024 tiles), it will most
likely never be able to import from anything.

Ian, I think you could possibly try and gain some more by setting
capture-io-mode to userptr or dmabuf-import (depending on the support,
the second requires converter output-io-mode to be dmabuf). You could
also gain a little by saving one of the two copies at the OUTPUT side of
the decoder with output-io-mode=userptr. CUDA writes to a ring buffer,
so has no choice but to copy when using mmap fix sized buffer queue. At
least with userptr, you only copy once to the ring buffer. For the
visual, right now you got:

  source ! *COPY* ! v4l2videodec !
              *COPY* ! v4l2convert !
              *COPY* ! ximagesink (tones of internal copies)

What I suggest (assuming driver is capable):

  source ! v4l2videodec output-io-mode=userptr
                        capture-io-mode=dmabuf-import !
              ! v4l2convert output-io-mode=dmabuf !
              *COPY* ! ximagesink (tones of internal copies)

Your display becomes a huge bottleneck, thanks to X11. But I suppose you
could use an HW overlay somehow.

Nicolas


More information about the gstreamer-devel mailing list