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>
This commit is contained in:
Kieran Bingham
2020-09-11 14:27:12 +01:00
parent 6f09a619cc
commit 79aace58d3

View File

@@ -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;