summaryrefslogtreecommitdiff
path: root/src/libcamera/formats.cpp
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2021-11-01 09:15:02 +0000
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-11-02 12:08:44 +0000
commit9e3470ad3e4f03364c8160917117d62fde5a7d88 (patch)
treea8635fa7d4708cb9b0bc4fa44f0ae565d9a67ee4 /src/libcamera/formats.cpp
parent264a673d287c3dafac590ac8f5ac9472d51fa04b (diff)
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>
Diffstat (limited to 'src/libcamera/formats.cpp')
-rw-r--r--src/libcamera/formats.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp
index d4781dfb..afcaabc5 100644
--- a/src/libcamera/formats.cpp
+++ b/src/libcamera/formats.cpp
@@ -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, {