From 3437067e9bd923ee4dce857d83d7bce0f791537d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Fri, 24 Jul 2020 10:37:42 +0200 Subject: libcamera: Add support for 16-bit Bayer formats MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add support for 16-bit Bayer formats. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- src/libcamera/formats.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'src/libcamera/formats.cpp') diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp index 11774b0c..cd63c15c 100644 --- a/src/libcamera/formats.cpp +++ b/src/libcamera/formats.cpp @@ -563,6 +563,46 @@ const std::map pixelFormatInfo{ .pixelsPerGroup = 2, .planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }}, } }, + { formats::SBGGR16, { + .name = "SBGGR16", + .format = formats::SBGGR16, + .v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SBGGR16), + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .packed = false, + .pixelsPerGroup = 2, + .planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }}, + } }, + { formats::SGBRG16, { + .name = "SGBRG16", + .format = formats::SGBRG16, + .v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SGBRG16), + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .packed = false, + .pixelsPerGroup = 2, + .planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }}, + } }, + { formats::SGRBG16, { + .name = "SGRBG16", + .format = formats::SGRBG16, + .v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SGRBG16), + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .packed = false, + .pixelsPerGroup = 2, + .planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }}, + } }, + { formats::SRGGB16, { + .name = "SRGGB16", + .format = formats::SRGGB16, + .v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SRGGB16), + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .packed = false, + .pixelsPerGroup = 2, + .planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }}, + } }, { formats::SBGGR10_IPU3, { .name = "SBGGR10_IPU3", .format = formats::SBGGR10_IPU3, -- cgit v1.2.1