4 ms·
At high framerate, there isn't much time to do any type of fancy compression. 660fps means you have 1.5 milliseconds to process the image. The bandwidth will ro
by zaarn 7y ago
At high framerate, there isn't much time to do any type of fancy compression. 660fps means you have 1.5 milliseconds to process the image. The bandwidth will roughly max out between 50 Megabytes/s or 432Mbit/s. LPDDR2 (on the RPi3) can do 800 Transfers are second, at a maxmium transfer size of 4kb, maxing out almost all of your memory bandwidth already.
So you literally do not have the memory bandwidth to do compression while also capturing a good 640x64x32/660 Video.
If you have an RPi4, you get LPDDR4, the memory bandwidth now allows for compression, IF the CPU can handle that throughput (which it likely can't since the RPi4 chokes on such large bandwidths easily).
- rasz 7y agoRam speed is not the issue, camera interface is limited to 120MB/s, ram bandwidth is >2GB/s on pee3, 4GB/s on pee4.
- zaarn 7y agoIf you want to compress the frames, RAM bandwidth will be an issue.
- rasz 7y agoCompressing 640x64@660 takes exactly the same amount of work as compressing 1280x720@30. You could even use hardware h.264 encoder as long as you can debayer raw 10bit in software fast enough (or convince Broadcom employee 6by9 to make internal Videocore firmware debayering resolution agnostic, its already fast enough keeping up with twice the amount of data when using camera in 1920x1080@25 mode). But you dont even need fancy compression, at those framerates things change really slowly so simple delta encoding on raw data will do wonders.
- zaarn 7y agoCompressing 660fps in real time is a much different task than 30 frames per second, notably because your latency budget is a lot lower. At 30fps you have 33ms to load the frame, compress it and send it off to the destination, at 660fps you have 1.5ms for the same task, which does not necessarily get exponentially faster with lowered resolution.
- novaRom 7y agoYou do not need any special heavy compression. Just deltas between consecutive frames should result in 1:100 or more compression rate at such high frame rate. This is assuming you can keep both pivot and current frames in processor's SRAM.
- rasz 7y agoYou have exactly as much time as at 30fps at 22x higher resolution. You dont need to constantly reuse the same 52KB buffer. Data comes at a steady snail 35MB/s pace. Pee 3 should even be able to save it on USB2 HDD in real time with no compression.
- HermannSW 7y agoReally? USB2 is 300Mbps for PI3 ethernet over USB2, is it faster with hdd? I ask because snail 35MB/s is 280Mbps.
- rasz 7y agoreplied here https://news.ycombinator.com/item?id=20658147 https://news.ycombinator.com/item?id=20658147 last time I tried USB 2.0 hdd on pee3 did 35MB/s on the dot