{"id":21743,"url":"https://patchwork.libcamera.org/api/1.1/patches/21743/?format=json","web_url":"https://patchwork.libcamera.org/patch/21743/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20241023111124.124090-3-jacopo.mondi@ideasonboard.com>","date":"2024-10-23T11:11:21","name":"[2/4] include: linux: videodev2: Add generic line based pixel formats","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"7a9ecd782f5b884be8c73c9c3b29bd7e4a3c1818","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/1.1/people/143/?format=json","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/21743/mbox/","series":[{"id":4738,"url":"https://patchwork.libcamera.org/api/1.1/series/4738/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4738","date":"2024-10-23T11:11:19","name":"libcamera: Initial support for generic line based metadata","version":1,"mbox":"https://patchwork.libcamera.org/series/4738/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/21743/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/21743/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 7199CBD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 23 Oct 2024 11:11:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C61296539D;\n\tWed, 23 Oct 2024 13:11:41 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C7EF965392\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 23 Oct 2024 13:11:35 +0200 (CEST)","from ideasonboard.com (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7A0249FC;\n\tWed, 23 Oct 2024 13:09:48 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Sm2VsHZ5\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1729681788;\n\tbh=9RDNizsjn3o2mwoKS2stCXuUdQGqHVcv8Vx79zQ7o4s=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Sm2VsHZ5ri5CK7XjjWE9FIU8k6Y0uQBb7Rtc37U4sHDdC4KRVSliW6NYZ8qlxh1Wh\n\t3IIgWcy9Ql7MQvkzm6pkLDUK2e2JAI10AEN/jlfbTbl+9QiXbqf36EpX76Xi/+71Ve\n\to8vbRfI0rnaImdzfXmA8X3TCX6me94TDuNOcH+90=","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Subject":"[PATCH 2/4] include: linux: videodev2: Add generic line based pixel\n\tformats","Date":"Wed, 23 Oct 2024 13:11:21 +0200","Message-ID":"<20241023111124.124090-3-jacopo.mondi@ideasonboard.com>","X-Mailer":"git-send-email 2.47.0","In-Reply-To":"<20241023111124.124090-1-jacopo.mondi@ideasonboard.com>","References":"<20241023111124.124090-1-jacopo.mondi@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Add the definition for the generic line based pixelformats.\n\nThe formats has been added in upstream Linux by commit\n1d9215233958 (\"media: uapi: v4l: Add generic 8-bit metadata format\ndefinitions\") which got merged in Linux v6.10.\n\nThe formats however are not yet available to userspace, as they\nhave been made only available to the kernel by commit\nd69c8429ea80 (\"media: uapi: v4l: Don't expose generic metadata formats\nto userspace\") to let the line-based metadata support stabilize before\nallowing applications to use it.\n\nWith the forthcoming completion of the line-based metadata upstreaming\nmanually add the generic line based pixel format to prepare libcamera\nto support them.\n\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n include/linux/videodev2.h | 12 ++++++++++++\n 1 file changed, 12 insertions(+)","diff":"diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h\nindex 3829c0b60f52..1168f6ff40eb 100644\n--- a/include/linux/videodev2.h\n+++ b/include/linux/videodev2.h\n@@ -840,6 +840,18 @@ struct v4l2_pix_format {\n /* The metadata format identifier for FE stats buffers. */\n #define V4L2_META_FMT_RPI_FE_STATS v4l2_fourcc('R', 'P', 'F', 'S')\n \n+/*\n+ * Line-based metadata formats. Remember to update v4l_fill_fmtdesc() when\n+ * adding new ones!\n+ */\n+#define V4L2_META_FMT_GENERIC_8\t\tv4l2_fourcc('M', 'E', 'T', '8') /* Generic 8-bit metadata */\n+#define V4L2_META_FMT_GENERIC_CSI2_10\tv4l2_fourcc('M', 'C', '1', 'A') /* 10-bit CSI-2 packed 8-bit metadata */\n+#define V4L2_META_FMT_GENERIC_CSI2_12\tv4l2_fourcc('M', 'C', '1', 'C') /* 12-bit CSI-2 packed 8-bit metadata */\n+#define V4L2_META_FMT_GENERIC_CSI2_14\tv4l2_fourcc('M', 'C', '1', 'E') /* 14-bit CSI-2 packed 8-bit metadata */\n+#define V4L2_META_FMT_GENERIC_CSI2_16\tv4l2_fourcc('M', 'C', '1', 'G') /* 16-bit CSI-2 packed 8-bit metadata */\n+#define V4L2_META_FMT_GENERIC_CSI2_20\tv4l2_fourcc('M', 'C', '1', 'K') /* 20-bit CSI-2 packed 8-bit metadata */\n+#define V4L2_META_FMT_GENERIC_CSI2_24\tv4l2_fourcc('M', 'C', '1', 'O') /* 24-bit CSI-2 packed 8-bit metadata */\n+\n /* priv field value to indicates that subsequent fields are valid. */\n #define V4L2_PIX_FMT_PRIV_MAGIC\t\t0xfeedcafe\n \n","prefixes":["2/4"]}