libcamera: formats: Add 14-bits Bayer RAW formats

Add formats definition and mappings for 14-bits Bayer RAW formats.

Add definitions for non-packed and CSI-2 packed variants.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
This commit is contained in:
Jacopo Mondi
2023-04-18 16:02:16 +02:00
parent f99b0f7f8f
commit e0a51061bc
5 changed files with 134 additions and 0 deletions
+16
View File
@@ -140,6 +140,22 @@ const std::map<BayerFormat, Formats, BayerFormatComparator> bayerToFormat{
{ formats::SGRBG12_CSI2P, V4L2PixelFormat(V4L2_PIX_FMT_SGRBG12P) } },
{ { BayerFormat::RGGB, 12, BayerFormat::Packing::CSI2 },
{ formats::SRGGB12_CSI2P, V4L2PixelFormat(V4L2_PIX_FMT_SRGGB12P) } },
{ { BayerFormat::BGGR, 14, BayerFormat::Packing::None },
{ formats::SBGGR14, V4L2PixelFormat(V4L2_PIX_FMT_SBGGR14) } },
{ { BayerFormat::GBRG, 14, BayerFormat::Packing::None },
{ formats::SGBRG14, V4L2PixelFormat(V4L2_PIX_FMT_SGBRG14) } },
{ { BayerFormat::GRBG, 14, BayerFormat::Packing::None },
{ formats::SGRBG14, V4L2PixelFormat(V4L2_PIX_FMT_SGRBG14) } },
{ { BayerFormat::RGGB, 14, BayerFormat::Packing::None },
{ formats::SRGGB14, V4L2PixelFormat(V4L2_PIX_FMT_SRGGB14) } },
{ { BayerFormat::BGGR, 14, BayerFormat::Packing::CSI2 },
{ formats::SBGGR14_CSI2P, V4L2PixelFormat(V4L2_PIX_FMT_SBGGR14P) } },
{ { BayerFormat::GBRG, 14, BayerFormat::Packing::CSI2 },
{ formats::SGBRG14_CSI2P, V4L2PixelFormat(V4L2_PIX_FMT_SGBRG14P) } },
{ { BayerFormat::GRBG, 14, BayerFormat::Packing::CSI2 },
{ formats::SGRBG14_CSI2P, V4L2PixelFormat(V4L2_PIX_FMT_SGRBG14P) } },
{ { BayerFormat::RGGB, 14, BayerFormat::Packing::CSI2 },
{ formats::SRGGB14_CSI2P, V4L2PixelFormat(V4L2_PIX_FMT_SRGGB14P) } },
{ { BayerFormat::BGGR, 16, BayerFormat::Packing::None },
{ formats::SBGGR16, V4L2PixelFormat(V4L2_PIX_FMT_SBGGR16) } },
{ { BayerFormat::GBRG, 16, BayerFormat::Packing::None },