debayer-gpu (git@gitlab.com:tui/debayer-gpu.git) tries to do debayering on GPU. But it seems OpenGL 2.1 is ... really not meant to do the computation. glReadPixels() can be used to get data off the GPU, but that does not have great performance. On PinePhone, you can only get RGBA out, but we really need RGB. Doing RGBA->RGB on CPU is easy, but it degrades performance further. I believe problem is that ISP produces a lot of data.
On Thinkpad X220, converting 400 images is like 12 seconds. If I do no processing in the fragment shader, it is still 10 seconds. X220 is able to process ~20Mpix/second on GPU. I don't believe Librem 5 will be significantly better.
If you believe GPU can be useful for task like debayering (mostly rearranging data with some additions and 2 matrix multiplies per pixel), let me know. 30Mpix/second on Librem 5 would be useful performance.
#linuxphone