[libcamera-devel] [PATCH] qcam: format_converter: Support R8 Greyscale
Kieran Bingham
kieran.bingham at ideasonboard.com
Fri Sep 11 15:28:24 CEST 2020
Support Greyscale images in the format converter by expanding the R8
component to each of the output RGB components.
Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
---
This enables viewing of my IR camera with Qcam.
src/qcam/format_converter.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/qcam/format_converter.cpp b/src/qcam/format_converter.cpp
index 4b9722d4ecf7..b63d077e41cc 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;
--
2.25.1
More information about the libcamera-devel
mailing list