diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2020-09-11 14:27:12 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2020-09-12 21:02:16 +0100 |
commit | 79aace58d3fc7232003174019777ab449ca11107 (patch) | |
tree | 5f12753fb2b4ee4b60a2d3b44a85d403b790a649 /src/qcam | |
parent | 6f09a619cca412f029c124cff8bbf1647d3d68cf (diff) |
qcam: format_converter: Support R8 Greyscale
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@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/qcam')
-rw-r--r-- | src/qcam/format_converter.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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; |