on imx8mini board, v4l2 map memory is slow when memcpy

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

on imx8mini board, v4l2 map memory is slow when memcpy

963 次查看
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.

标签 (1)
0 项奖励
3 回复数

949 次查看
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 项奖励

941 次查看
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 项奖励

929 次查看
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 项奖励