This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Gstreamer Performance - Avoid Framecopy between v4l2 capture source and encoder (DM3730)

I'm using TI's gstreamer plugins to encode H.264 video from a CMOS imager.  A slow, unaccelerated frame copy is dominating frame time.  On 720p video, the frame copy is 75ms (13.3fps). 

The framecopy happens in gsttiprepencbuf.c, in the function gst_tiprepencbuf_copy_input().

MY imager/VPFE/VPBE setup commands are as follows:

media-ctl -v -r -l '"mt9p031":0->"OMAP3 ISP CCDC":0[1], "OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1], "OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1], "OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]'

media-ctl -v -f '"mt9p031":0 [SGRBG8 1298x970 (664,541)/1298x970], "OMAP3 ISP CCDC":2 [SGRBG10 1298x970], "OMAP3 ISP preview":1 [UYVY 1298x970], "OMAP3 ISP resizer":1 [UYVY 1280x720]'

My gstreamer pipeline:

gst-launch -v v4l2src device=/dev/video6 num-buffers=100 always-copy=false queue-size=4 ! 'video/x-raw-yuv,format=(fourcc)UYVY,width=1280,height=720,framerate=24/1' ! TIPrepEncBuf numOutputBufs=4 contiguousInputFrame=false ! queue ! TIVidenc1 engineName=codecServer codecName=h264enc bitRate=2000000 rateControlPreset=3 encodingPreset = 1 contiguousInputFrame=true ! dmaiperf print-arm-load=true engine-name=codecServer ! mpegtsmux name=mux !  udpsink host=192.168.143.241 port=5000

I would like to be able to change the TIPrepEncBuf property "contiguousInputFrame" to true, which allows for a very fast frame copy (~0.1ms), but the frame isn't contiguous.  Is there a way to feed TI's cmem style buffers into the v4l2 capture, within the gstreamer framework?  I think there may be a way to do a zero-copy gstreamer to dmai buffer conversion, but that also would require a contiguous input frame.

Thanks.