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

Andrey Konovalov andrey.konovalov at linaro.org
Tue Jun 22 15:46:43 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 v5 vs v4 [1]:
* 8-bit raw Bayer format is back, but it is now split into several patches
  (4/9 to 8/9) to make it easier to see the particular changes done to
  the original shader code.
  With the first 8 of the total 9 patches applied I am seeing some
  artifacts (note the horizontal colour lines which change when the viewfinder
  window height is changed) [2].
  Patch 9/9 fixes that, but the root cause of the issue isn't currently known.
  That's why 9/9 comes as RFC, and the series can be merged without it.
* s/tex_raw/tex_y in the shaders to match the uniform name used in the cpp
  code.

[1] https://patchwork.libcamera.org/cover/12629/
[2] https://people.linaro.org/~andrey.konovalov/cam-56/20210622.imx219-RAW8-artifacts.viewfinder_gl-add-RAW1xP-and-RAW8-support-v4.1-raw8.0.mp4




More information about the libcamera-devel mailing list