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
+80
View File
@@ -719,6 +719,86 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
.pixelsPerGroup = 2,
.planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }},
} },
{ formats::SBGGR14, {
.name = "SBGGR14",
.format = formats::SBGGR14,
.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SBGGR14), },
.bitsPerPixel = 14,
.colourEncoding = PixelFormatInfo::ColourEncodingRAW,
.packed = false,
.pixelsPerGroup = 2,
.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},
} },
{ formats::SGBRG14, {
.name = "SGBRG14",
.format = formats::SGBRG14,
.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SGBRG14), },
.bitsPerPixel = 14,
.colourEncoding = PixelFormatInfo::ColourEncodingRAW,
.packed = false,
.pixelsPerGroup = 2,
.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},
} },
{ formats::SGRBG14, {
.name = "SGRBG14",
.format = formats::SGRBG14,
.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SGRBG14), },
.bitsPerPixel = 14,
.colourEncoding = PixelFormatInfo::ColourEncodingRAW,
.packed = false,
.pixelsPerGroup = 2,
.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},
} },
{ formats::SRGGB14, {
.name = "SRGGB14",
.format = formats::SRGGB14,
.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SRGGB14), },
.bitsPerPixel = 14,
.colourEncoding = PixelFormatInfo::ColourEncodingRAW,
.packed = false,
.pixelsPerGroup = 2,
.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},
} },
{ formats::SBGGR14_CSI2P, {
.name = "SBGGR14_CSI2P",
.format = formats::SBGGR14_CSI2P,
.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SBGGR14P), },
.bitsPerPixel = 14,
.colourEncoding = PixelFormatInfo::ColourEncodingRAW,
.packed = true,
.pixelsPerGroup = 4,
.planes = {{ { 7, 1 }, { 0, 0 }, { 0, 0 } }},
} },
{ formats::SGBRG14_CSI2P, {
.name = "SGBRG14_CSI2P",
.format = formats::SGBRG14_CSI2P,
.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SGBRG14P), },
.bitsPerPixel = 14,
.colourEncoding = PixelFormatInfo::ColourEncodingRAW,
.packed = true,
.pixelsPerGroup = 4,
.planes = {{ { 7, 1 }, { 0, 0 }, { 0, 0 } }},
} },
{ formats::SGRBG14_CSI2P, {
.name = "SGRBG14_CSI2P",
.format = formats::SGRBG14_CSI2P,
.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SGRBG14P), },
.bitsPerPixel = 14,
.colourEncoding = PixelFormatInfo::ColourEncodingRAW,
.packed = true,
.pixelsPerGroup = 4,
.planes = {{ { 7, 1 }, { 0, 0 }, { 0, 0 } }},
} },
{ formats::SRGGB14_CSI2P, {
.name = "SRGGB14_CSI2P",
.format = formats::SRGGB14_CSI2P,
.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SRGGB14P), },
.bitsPerPixel = 14,
.colourEncoding = PixelFormatInfo::ColourEncodingRAW,
.packed = true,
.pixelsPerGroup = 4,
.planes = {{ { 7, 1 }, { 0, 0 }, { 0, 0 } }},
} },
{ formats::SBGGR16, {
.name = "SBGGR16",
.format = formats::SBGGR16,