[libcamera-devel] [PATCH v2 0/5] qcam: viewfinder_gl: add RAW8, RAW10P and RAW12P formats

Andrey Konovalov andrey.konovalov at linaro.org
Thu May 27 12:55:06 CEST 2021


This patchset adds support for both 10-bit, and 12-bit raw Bayer packed
and 8-bit raw Bayer formats. GL_RED texture is used to store the image data.
Not only this allows to use the same shader code in 10-bit and 12-bit cases.
But it also turned out that sampling from GL_RED texture is easier (less
"patterns") than from GL_RGB - even though we loose the "auto-skipping the LS
bytes of pixel values" feature in the 12-bit case.

Changes in v2 vs v1 [1]:
* bayer_8.frag: fixed a bug of using F1 value instead of E1, and E1 value
  instead of F1. This error is present in the pixel shader listing in [2],
  and seems to have got into at least one project [3] from there.

[1] https://patchwork.libcamera.org/cover/11387/
[2] https://casual-effects.com/research/McGuire2009Bayer/index.html
[3] https://github.com/motmot/libcamiface/blob/master/demo/demosaic.frg




More information about the libcamera-devel mailing list