When it comes to the big cam, currently we can stream 1052x780 at 120 FPS, 2104x1560 at 60 FPS and 4208x3120 at either 20 FPS in 8-bit mode or 15 FPS in 10-bit mode. Once we get the camera to work with 4 MIPI lanes instead of 2 as it is right now it will be able to stream at 30 FPS in full resolution (it’s currently limited by available bandwidth on two lanes). It’s not working yet in this configuration and I don’t know why.
That’s about the raw data from the sensor. Since we don’t have a hardware ISP, we need to process it manually to get RGB image. We can use the GPU for that.
I have a shader that implements demosaicing (by taking 2x2 blocks, optionally averaging across 4x4 blocks), vignetting correction, highlight clipping, applies color calibration matrix, white balance and filmic curve, corrects lens distortion and applies slight denoising and sharpening. It is currently able to output 526x360 stream at about 35 FPS, regardless of input frame size. To reach higher resolutions and/or framerates it will have to be optimized; GPU clock could potentially be boosted too, as it can work at 1GHz (under higher voltage though), but we keep it at 800MHz.
(no autofocus here though)
To implement 3A you need to gather some statistics. Traversing through 2104x1560 raw data, with subsampling to 1/16th of pixels, to get channel averages, sharpness, center-weighted brightness and to count pixels that are too bright or too dark eats about 15% of CPU with NEON (and we have 4 cores, so max is 400%) - so it’s not a big deal.
Then there’s encoding. I can encode that 526x360 stream coming out of the GPU at 30 FPS in real time using x264 in ultrafast speed preset. The whole endeavor then eats about 150% of CPU. FWIW, recording a 30 minute video with screen off ate about 15% of battery, so it should be possible to record for above 3 hours on battery (provided that there’s enough disk space available to store the file, it gets big fast if you want acceptable quality on ultrafast preset).
The next big step will be to get it to output 1052x780 30 FPS video in real time. That would be the optimal resolution for playing it back on our 720x1440 screen. Right now my pipeline can reach 10 FPS at this resolution (17 FPS without encoding - the difference may come from GStreamer being fed with uncached buffers). We need to be careful with DRAM bandwidth utilization though, as erratum ERR050384 is quite nasty, and the big cam is connected to MIPI CSI2 which is the one that’s more affected.