slow memcpy

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
569件の閲覧回数
OlivierG
Contributor III

HI

i tried this code

https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/imx-processors/173737/1/v4lcap.c

unfortunately the call to memcpy from
buffers[buf.index].start[0]
is very slow about 10 ms with an image size 640*480

i thing it is due to the VB2_MEMORY_MMAP mode

i tried with V4L2_MEMORY_DMABUF but ioctl failed

Is the slow memcpy due to the memory mode ?
Is there a working exemple with V4L2_MEMORY_DMABUF and V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE ?

 

Greeting

 

Olivier

0 件の賞賛
返信
1 解決策
546件の閲覧回数
OlivierG
Contributor III

Hi 

i use this code to use DMA instead of MMAP

https://github.com/emfend/dmabuf-v4l2-demo

I also verified that this patch is applied

https://github.com/torvalds/linux/commit/de27891f675ed1e46e8821d2e05e036e5f97586b

It works, memcpy time is less than 1 ms

Olivier

 

 

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
547件の閲覧回数
OlivierG
Contributor III

Hi 

i use this code to use DMA instead of MMAP

https://github.com/emfend/dmabuf-v4l2-demo

I also verified that this patch is applied

https://github.com/torvalds/linux/commit/de27891f675ed1e46e8821d2e05e036e5f97586b

It works, memcpy time is less than 1 ms

Olivier

 

 

0 件の賞賛
返信