[libcamera-devel] demo code: demosaic a raw Bayer image with compute shader

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Jul 13 00:05:51 CEST 2021


Hi Andrey,

On Mon, Jul 12, 2021 at 10:34:08AM +0300, Andrey Konovalov wrote:
> Greetings,
> 
> This is a pretty early code [1] (a lot of stuff is hardcoded etc), but
> it looks like sharing it now still makes sense.
> 
> The main motivation to use compute shaders vs OpenCL is the
> availability of open source implementation right now (for adreno 6xx+
> atm).
> 
> This is a command line application which converts a raw Bayer image
> (fixed format and resolution) into an RGB one. Some more details are
> in the README.txt on the github.
> 
> My next step planned is to add the DPC (defect pixel correction) step
> before debayering.

That's neat !! :-) Thank you.

CC'ing Paul.

I'll try to review this but it will likely need to wait for next week
I'm afraid, even though I'm really tempted to learn about compute
shaders already :-)

> Tested on the RB3 board [2] (adreno 630 GPU) with the freedreno driver
> and the recent media_tree kernel.
> 
> Inspired by [3].
>
> [1] https://github.com/andrey-konovalov/debayer-ssbo-demo
> [2] https://www.96boards.org/product/rb3-platform/
> [3] https://blogs.igalia.com/elima/2016/10/06/example-run-an-opengl-es-compute-shader-on-a-drm-render-node/

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list