summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo.mondi@ideasonboard.com>2024-10-23 12:49:44 +0200
committerJacopo Mondi <jacopo.mondi@ideasonboard.com>2025-01-08 14:28:35 +0100
commit57d13c2c63a54f6f822d51abe7998ed15088d1d9 (patch)
tree5e876bb253b06a1f52ea1d26c37cc672d87c4a9f
parent052a9ff245fe1192cf007c9246a215c897535e78 (diff)
include: linux: videodev2: Add generic line based pixel formats
Add the definition for the generic line based pixelformats. The formats has been added in upstream Linux by commit 1d9215233958 ("media: uapi: v4l: Add generic 8-bit metadata format definitions") which got merged in Linux v6.10. The formats however are not yet available to userspace, as they have been made only available to the kernel by commit d69c8429ea80 ("media: uapi: v4l: Don't expose generic metadata formats to userspace") to let the line-based metadata support stabilize before allowing applications to use it. With the forthcoming completion of the line-based metadata upstreaming manually add the generic line based pixel format to prepare libcamera to support them. Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--include/linux/videodev2.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index d2653b2e..317d063a 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -843,6 +843,18 @@ struct v4l2_pix_format {
#define V4L2_META_FMT_MALI_C55_PARAMS v4l2_fourcc('C', '5', '5', 'P') /* ARM Mali-C55 Parameters */
#define V4L2_META_FMT_MALI_C55_3A_STATS v4l2_fourcc('C', '5', '5', 'S') /* ARM Mali-C55 3A Statistics */
+/*
+ * Line-based metadata formats. Remember to update v4l_fill_fmtdesc() when
+ * adding new ones!
+ */
+#define V4L2_META_FMT_GENERIC_8 v4l2_fourcc('M', 'E', 'T', '8') /* Generic 8-bit metadata */
+#define V4L2_META_FMT_GENERIC_CSI2_10 v4l2_fourcc('M', 'C', '1', 'A') /* 10-bit CSI-2 packed 8-bit metadata */
+#define V4L2_META_FMT_GENERIC_CSI2_12 v4l2_fourcc('M', 'C', '1', 'C') /* 12-bit CSI-2 packed 8-bit metadata */
+#define V4L2_META_FMT_GENERIC_CSI2_14 v4l2_fourcc('M', 'C', '1', 'E') /* 14-bit CSI-2 packed 8-bit metadata */
+#define V4L2_META_FMT_GENERIC_CSI2_16 v4l2_fourcc('M', 'C', '1', 'G') /* 16-bit CSI-2 packed 8-bit metadata */
+#define V4L2_META_FMT_GENERIC_CSI2_20 v4l2_fourcc('M', 'C', '1', 'K') /* 20-bit CSI-2 packed 8-bit metadata */
+#define V4L2_META_FMT_GENERIC_CSI2_24 v4l2_fourcc('M', 'C', '1', 'O') /* 24-bit CSI-2 packed 8-bit metadata */
+
/* priv field value to indicates that subsequent fields are valid. */
#define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe