From 79aace58d3fc7232003174019777ab449ca11107 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Fri, 11 Sep 2020 14:27:12 +0100 Subject: qcam: format_converter: Support R8 Greyscale MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Support Greyscale images in the format converter by expanding the R8 component to each of the output RGB components. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/qcam/format_converter.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/qcam') diff --git a/src/qcam/format_converter.cpp b/src/qcam/format_converter.cpp index 4b9722d4..973966f6 100644 --- a/src/qcam/format_converter.cpp +++ b/src/qcam/format_converter.cpp @@ -68,6 +68,13 @@ int FormatConverter::configure(const libcamera::PixelFormat &format, nvSwap_ = true; break; + case libcamera::formats::R8: + formatFamily_ = RGB; + r_pos_ = 0; + g_pos_ = 0; + b_pos_ = 0; + bpp_ = 1; + break; case libcamera::formats::RGB888: formatFamily_ = RGB; r_pos_ = 2; -- cgit v1.2.1