[libcamera-devel] [PATCH][RFC 0/2] qcam: viewfinder_gl: add RAW12P format support
Andrey Konovalov
andrey.konovalov at linaro.org
Mon Nov 9 22:34:09 CET 2020
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
--
2.17.1
More information about the libcamera-devel
mailing list