on imx8mini board, v4l2 map memory is slow when memcpy

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

on imx8mini board, v4l2 map memory is slow when memcpy

952 Views
rayLei
Contributor I

Question:

I memcpy 1Mbyte from v4l2 map memory,it need  14ms on imx8mini board. I try use V4L2_MEMORY_USERPTR,but it return failed when VIDIOC_QBUF.And it doesn't support PXP. I try some method from mxc_v4l2_test\test - imx-test - i.MX Driver Test Application Software (codeaurora.org)

kernel version:

linux 4.14.98 kernel, it use mx6s_capture.c。

please provide a method to me. thanks.

Labels (1)
0 Kudos
3 Replies

938 Views
joanxie
NXP TechSupport
NXP TechSupport

where did you get the data? from camera? if yes, you can use zero copy pipeline in the gstreamer, the commands like:

"$ 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"

0 Kudos

930 Views
rayLei
Contributor I

I got the data(yuv format) from camera. don't use h264enc.
How to use zero copy pipeline in the gstreamer? please  provide code example.

thanks.

0 Kudos

918 Views
joanxie
NXP TechSupport
NXP TechSupport

you don't use encoder? just capture the video from camera and output to the display without encoder? you can change the pipeline as you need, this is just example, you can refer to the linux user guide and change the pipeline, just don't forget add io-mode=dmabuf

0 Kudos