Hi, we support single buffering, double buffering, triple buffering, and an image fifo.
These are all controlled by passing:
sensor.set_framebuffers(1) → single buffering
sensor.set_framebuffers(2) → double buffering
sensor.set_framebuffers(3) → triple buffering
sensor.set_framebuffers(N >= 4) → image fifo
Triple buffering offers the highest normal performance. Image fifo mode is really only necessary for video recording, it actually has draw backs in that images may be old when you use it.
Anyway, the H7 doesn’t have enough RAM to enable triple buffering all the time. So, the system only turns it on for smaller resolutions. Anything larger like QVGA falls back to single buffering.
The reason why performance goes way up with it is that we stop dropping half the frames from the camera. Essentially, with single buffering… if you are processing a frame and don’t have space for the next frame then you have to drop it. With triple buffering our drivers are able to store the frame in 1 of 2 buffers while the CPU is working on the third buffer. This ensures that nothing is blocking the camera capture driver from saving an image and the processor from working on an image. When the processor wants a new frame it then just grabs 1 of the 2 buffers that the camera capture driver was not using. So, the CPU always has the latest image possible.
In image fifo mode pictures are stored in a fifo. If the fifo filles up you drop frames. Also, if the fifo is very long then the CPU may be working on an image from long ago. So, you don’t want image fifo mode for real-time video processing. Just video recording to avoid dropping frames if the processor gets busy and can’t read and image for a while.