iMX8mp - Port from Mickledore to Walnascar, how to have v4l2 cached buffers for csi2 image buffers

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

iMX8mp - Port from Mickledore to Walnascar, how to have v4l2 cached buffers for csi2 image buffers

538 Views
JesterOfHw
Contributor IV

we had a special port of USERPTR mode and g2d that gave us cached performance where we would copy from the V4L2 capture buffer into our shared memory with decent copy speed.

moving to latest version none of that works now and I'm having issues. before i try and do bad things to the kernel i want to know if there is a better way. 

How is everyone getting good performance from V4L2 buffers from camera?

My 2MP image is like ~2ms copy time with all the old cache workarounds.

But its horrible product ruining speed without it.
The new OS is making old trick nearly impossible to do now. so what are people doing to not have the camera be ultra slow now?
would love a patch or code example of how they are getting cached copy speed from source buffer containing captured image.

Tags (3)
0 Kudos
Reply
2 Replies

508 Views
joanxie
NXP TechSupport
NXP TechSupport

how about using dmabuf? the command 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
Reply

497 Views
JesterOfHw
Contributor IV

yes this will be something to try. things to note...
This is a C++ app tightly coupled to a single shot triggered camera (not constant streaming).
cache performance of the image buffer is a big deal. total image processing time is counting milliseconds here so none can be thrown away. we copy the image out of the v4l buffer into shared memory which is also cached. i have not tried the DMABUF type yet. but i will when i can rewrite our camera interface to try.

0 Kudos
Reply