imx8mp, DMA memory copy for gstreamer userspace

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx8mp, DMA memory copy for gstreamer userspace

853 Views
chris_liuv
Contributor III

Hi,

Currently my video data is from 2 image sensor, line interleaved, and I have constructed a gstreamer plugin to deinterleave it using memcpy method, that costs cpu usage a lot, so I want to use DMA copy instead.

Is there exist a DMA memory copy for userspace usage?

Thanks.

0 Kudos
1 Reply

829 Views
joanxie
NXP TechSupport
NXP TechSupport

one can try the dmabuf to save cpu performance,

The dmabuf uses buffers of a hardware DMA in order to perform a zero-copy pipeline, as shown below:
$ gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=300 io-mode=dmabuf ! \
'video/x-raw,format=(string)NV12,width=1920,height=1080,framerate=(fraction)30/1' ! \
queue ! v4l2h264enc output-io-mode=dmabuf-import ! avimux ! filesink location=test.avi


In this pipeline, the RAW format is stored by the io-mode property and then used further on the
H.264 format encode process.

0 Kudos