[libcamera-devel,RFC,0/2] qcam: viewfinder_gl: add RAW12P format support
mbox series

Message ID 20201109213411.30987-1-andrey.konovalov@linaro.org
Headers show
Series
  • qcam: viewfinder_gl: add RAW12P format support
Related show

Message

Andrey Konovalov Nov. 9, 2020, 9:34 p.m. UTC
This patchset adds support for OpenGL accelerated conversion from 12-bit
packed raw Bayer format (debyering).

All the 4 pixel layouts are supported, but only the RGGB one was tested.

The lower 4 bits of the 12-bit colour values are discarded as the target RGBA
format has only 8 bits per colour.

viewfinder_gl not only converts the format, but also scales the image to
match the window size, and this doesn't go very well with debayering when
done as single operation - there is a chance of 1-pixel wide contrast coloured
stripes when the window size isn't of the same size as the captured frames.

Andrey Konovalov (2):
  qcam: viewfinder_gl: set the vertex shader file name in selectFormat()
  qcam: viewfinder_gl: Add shader to render packed RAW12 formats

 src/qcam/assets/shader/bayer.vert           | 28 ++++++++
 src/qcam/assets/shader/bayer_12_packed.frag | 68 ++++++++++++++++++
 src/qcam/assets/shader/shaders.qrc          |  2 +
 src/qcam/viewfinder_gl.cpp                  | 78 ++++++++++++++++++++-
 src/qcam/viewfinder_gl.h                    |  8 +++
 5 files changed, 181 insertions(+), 3 deletions(-)
 create mode 100644 src/qcam/assets/shader/bayer.vert
 create mode 100644 src/qcam/assets/shader/bayer_12_packed.frag