[libcamera-devel] [PATCH] qcam: format_converter: Support R8 Greyscale
Niklas Söderlund
niklas.soderlund at ragnatech.se
Sat Sep 12 15:59:54 CEST 2020
Hi Kieran,
On 2020-09-11 14:28:24 +0100, Kieran Bingham wrote:
> 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>
Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> ---
> 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
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
--
Regards,
Niklas Söderlund
More information about the libcamera-devel
mailing list