Hi!
I asked for help with ISP...
Can you program GPUs and do you want to become a HERO?
#linuxphonecommunity needs your help.
[...]
and I got help. Both from humans and from language models. Quickly it
turned out Librem 5's GPU is fast enough for debayering at 24fps,
0.8MP and data can be transfered enough fast enough. Soon, it turned
GPU can use full 13MP image as a source, scaling it down to 0.2MP for
gstreamer mp4 recording.
This opens possibility to do phase-detection AF and digital
zoom. Librem 5 is not fast machine, its CPU/GPU/RAM is slower than
Thinkpad X220, for example.
Then I set out to investigate "how much of an ISP can I do" and it
turned out I did not yet find a limit.
So far I did black level, some attempt at denoise, three matrix
multiplies and gamma correction. (CPU could do black level + gamma +
one matrix multiply, almost, if I did vector instructions and a lot of
care). I don't know how much my GPU is loaded, but at the moment I
believe ISP on the GPU is the way to go.
Yes, I'm doing simpler debayer than usual, through not as simple as
explained below. I believe that's right choice when 13MP image is
available.
Code is at
https://gitlab.com/tui/tui/-/tree/master/icam?ref_type=heads . It has
some pretty rough edges. But get Librem 5, it is worth it :-).
Special thanks to @dos Sebastian Krzyszkowiak and @datenwolf.
Best regards,
Pavel