libcamera: formats: Add R10_CSI2P format

This new formats corresponds to the V4L2 V4L2_PIX_FMT_Y10P format, and is a
CSI2-packed version of the DRM_FORMAT_R10 format.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Naushir Patuck 2021-11-01 09:15:02 +00:00 committed by Kieran Bingham
parent 264a673d28
commit 9e3470ad3e
2 changed files with 17 additions and 0 deletions

View file

@ -510,6 +510,19 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
.pixelsPerGroup = 1,
.planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }},
} },
{ formats::R10_CSI2P, {
.name = "R10_CSI2P",
.format = formats::R10,
.v4l2Formats = {
.single = V4L2PixelFormat(V4L2_PIX_FMT_Y10P),
.multi = V4L2PixelFormat(),
},
.bitsPerPixel = 10,
.colourEncoding = PixelFormatInfo::ColourEncodingYUV,
.packed = true,
.pixelsPerGroup = 4,
.planes = {{ { 5, 1 }, { 0, 0 }, { 0, 0 } }},
} },
/* Bayer formats. */
{ formats::SBGGR8, {

View file

@ -109,6 +109,10 @@ formats:
- SBGGR16:
fourcc: DRM_FORMAT_SBGGR16
- R10_CSI2P:
fourcc: DRM_FORMAT_R10
mod: MIPI_FORMAT_MOD_CSI2_PACKED
- SRGGB10_CSI2P:
fourcc: DRM_FORMAT_SRGGB10
mod: MIPI_FORMAT_MOD_CSI2_PACKED