How can I efficiently store CSI/IPU captured video to disk

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

How can I efficiently store CSI/IPU captured video to disk

Jump to solution
1,455 Views
oferlivny
Contributor I

Hi

I'm using iMX6Q Sabre Lite board running linux 3.0.35, and a CSI camera to capture 5MP video using the IPU/V4L2 interface.

The video arrives at about 12fps, which for YUV pixel format means about 120MB are copied to the memory via DMA each second.

I'm attempting to save all the frames to an SSD HD, which benchmarks show is capable of handling about 150MB/s.

However it seems that the RAM, which benchmarks show is capable of 900MB/s of read-write transactions, is not fast enough to handle all this, and is currently the bottleneck I'm trying to solve.

I understand that the IPU is using DMA to transfer the frames, and that disk writes are using DMA as well, and that since the DMA buffers are not shared, the frames are copied between them when I issue a write() function.

I also understand that there's some sort of caching going on, which means there's more memory copying going on.

How can I make this procedure more efficient?

Is it possible to use the same DMA buffer for both capturing and saving to eliminate memory copying?

Is there a recommended way to configure the DMA/mmap/HD mounting?

Thanks!

Labels (4)
0 Kudos
Reply
1 Solution
975 Views
karina_valencia
NXP Apps Support
NXP Apps Support
How can I efficiently store CSI/IPU captured video to disk

Chun-Yi ChengEmployee

The below is IPU internal structure

ipu.bmp

As you know, the DMA buffer is not shared.

If you whould like to write the frame data from IPU into disk, the only way is to access RAM, not IDMAC.

View solution in original post

0 Kudos
Reply
1 Reply
976 Views
karina_valencia
NXP Apps Support
NXP Apps Support
How can I efficiently store CSI/IPU captured video to disk

Chun-Yi ChengEmployee

The below is IPU internal structure

ipu.bmp

As you know, the DMA buffer is not shared.

If you whould like to write the frame data from IPU into disk, the only way is to access RAM, not IDMAC.

0 Kudos
Reply