[libcamera-devel] [PATCH 03/11] libcamera/formats: Add IPU3_Y10 format

Daniel Scally dan.scally at ideasonboard.com
Sun Mar 19 00:40:06 CET 2023


Add entries to libcamera's pixelFormatInfo map describing the IPU3_Y10
format which is exposed by the CIO2 device when connected to certain
camera sensors, such as the OmniVision 7251 IR Camera.

Signed-off-by: Daniel Scally <dan.scally at ideasonboard.com>
---
 src/libcamera/formats.cpp  | 10 ++++++++++
 src/libcamera/formats.yaml |  3 +++
 2 files changed, 13 insertions(+)

diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp
index f5769c48..eda657c5 100644
--- a/src/libcamera/formats.cpp
+++ b/src/libcamera/formats.cpp
@@ -517,6 +517,16 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
 		.pixelsPerGroup = 4,
 		.planes = {{ { 5, 1 }, { 0, 0 }, { 0, 0 } }},
 	} },
+	{ formats::Y10_IPU3, {
+		.name = "Y10_IPU3",
+		.format = formats::Y10_IPU3,
+		.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_IPU3_Y10), },
+		.bitsPerPixel = 10,
+		.colourEncoding = PixelFormatInfo::ColourEncodingRAW,
+		.packed = true,
+		.pixelsPerGroup = 25,
+		.planes = {{ { 32, 1 }, { 0, 0 }, { 0, 0 } }},
+	} },
 
 	/* Bayer formats. */
 	{ formats::SBGGR8, {
diff --git a/src/libcamera/formats.yaml b/src/libcamera/formats.yaml
index e586cde1..36d3016d 100644
--- a/src/libcamera/formats.yaml
+++ b/src/libcamera/formats.yaml
@@ -161,4 +161,7 @@ formats:
   - SBGGR10_IPU3:
       fourcc: DRM_FORMAT_SBGGR10
       mod: IPU3_FORMAT_MOD_PACKED
+  - Y10_IPU3:
+      fourcc: DRM_FORMAT_Y10
+      mod: IPU3_FORMAT_MOD_PACKED
 ...
-- 
2.34.1



More information about the libcamera-devel mailing list