Patch Detail
Show a patch.
GET /api/1.1/patches/19720/?format=api
{ "id": 19720, "url": "https://patchwork.libcamera.org/api/1.1/patches/19720/?format=api", "web_url": "https://patchwork.libcamera.org/patch/19720/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20240315001613.2033-2-laurent.pinchart@ideasonboard.com>", "date": "2024-03-15T00:16:00", "name": "[v2,01/14] libcamera: v4l2_subdevice: Rename V4L2SubdeviceFormatInfo", "commit_ref": "3777d80acc863a19e1d0847d14f4ae86905fb76b", "pull_url": null, "state": "accepted", "archived": false, "hash": "f59cd4ea5e2190aff063b3de9ff7f99547100eda", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/19720/mbox/", "series": [ { "id": 4226, "url": "https://patchwork.libcamera.org/api/1.1/series/4226/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4226", "date": "2024-03-15T00:15:59", "name": "libcamera: Prepare for new camera sensor class", "version": 2, "mbox": "https://patchwork.libcamera.org/series/4226/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/19720/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/19720/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 0D9C2BD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Mar 2024 00:16:20 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A285162C87;\n\tFri, 15 Mar 2024 01:16:19 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7430162973\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Mar 2024 01:16:17 +0100 (CET)", "from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 75174667\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Mar 2024 01:15:53 +0100 (CET)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"cEFuFG7h\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1710461753;\n\tbh=ETHXVVQLCpZSOkVJlTt0QkZn7HotTnX9JWslsfe15ic=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=cEFuFG7hQ+actwiJ1ta6v6p3ofu9wearwxSjeySGDwO7T4eT3mFHU/hnHj0s+QSCr\n\tsJARrjIU4il357X+wQGWFW0rX6c5Uqazcx8LaeW6Uow3LP0S7lXwJBoHbwo3lDUr7U\n\tj6wbctUXJh0iLRd0dJjyYA0w6c6WJ0Sxv+at29oI=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Subject": "[PATCH v2 01/14] libcamera: v4l2_subdevice: Rename\n\tV4L2SubdeviceFormatInfo", "Date": "Fri, 15 Mar 2024 02:16:00 +0200", "Message-ID": "<20240315001613.2033-2-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.43.2", "In-Reply-To": "<20240315001613.2033-1-laurent.pinchart@ideasonboard.com>", "References": "<20240315001613.2033-1-laurent.pinchart@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": "The V4L2SubdeviceFormatInfo structure contains information about a media\nbus format, not a V4L2 subdevice format. Rename it to MediaBusFormatInfo\nto clarify its purpose. Rename the formatInfoMap map accordingly.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n src/libcamera/v4l2_subdevice.cpp | 22 +++++++++++-----------\n 1 file changed, 11 insertions(+), 11 deletions(-)", "diff": "diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\nindex 9b118063e696..b6a25e25230b 100644\n--- a/src/libcamera/v4l2_subdevice.cpp\n+++ b/src/libcamera/v4l2_subdevice.cpp\n@@ -39,24 +39,24 @@ LOG_DECLARE_CATEGORY(V4L2)\n namespace {\n \n /*\n- * \\struct V4L2SubdeviceFormatInfo\n+ * \\struct MediaBusFormatInfo\n * \\brief Information about media bus formats\n * \\param bitsPerPixel Bits per pixel\n * \\param name Name of MBUS format\n * \\param colourEncoding Type of colour encoding\n */\n-struct V4L2SubdeviceFormatInfo {\n+struct MediaBusFormatInfo {\n \tunsigned int bitsPerPixel;\n \tconst char *name;\n \tPixelFormatInfo::ColourEncoding colourEncoding;\n };\n \n /*\n- * \\var formatInfoMap\n- * \\brief A map that associates V4L2SubdeviceFormatInfo struct to V4L2 media\n+ * \\var mediaBusFormatInfo\n+ * \\brief A map that associates MediaBusFormatInfo struct to V4L2 media\n * bus codes\n */\n-const std::map<uint32_t, V4L2SubdeviceFormatInfo> formatInfoMap = {\n+const std::map<uint32_t, MediaBusFormatInfo> mediaBusFormatInfo = {\n \t/* This table is sorted to match the order in linux/media-bus-format.h */\n \t{ MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE, { 16, \"RGB444_2X8_PADHI_BE\", PixelFormatInfo::ColourEncodingRGB } },\n \t{ MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE, { 16, \"RGB444_2X8_PADHI_LE\", PixelFormatInfo::ColourEncodingRGB } },\n@@ -241,8 +241,8 @@ const std::string V4L2SubdeviceFormat::toString() const\n */\n uint8_t V4L2SubdeviceFormat::bitsPerPixel() const\n {\n-\tconst auto it = formatInfoMap.find(mbus_code);\n-\tif (it == formatInfoMap.end()) {\n+\tconst auto it = mediaBusFormatInfo.find(mbus_code);\n+\tif (it == mediaBusFormatInfo.end()) {\n \t\tLOG(V4L2, Error) << \"No information available for format '\"\n \t\t\t\t << *this << \"'\";\n \t\treturn 0;\n@@ -262,9 +262,9 @@ std::ostream &operator<<(std::ostream &out, const V4L2SubdeviceFormat &f)\n {\n \tout << f.size << \"-\";\n \n-\tconst auto it = formatInfoMap.find(f.mbus_code);\n+\tconst auto it = mediaBusFormatInfo.find(f.mbus_code);\n \n-\tif (it == formatInfoMap.end())\n+\tif (it == mediaBusFormatInfo.end())\n \t\tout << utils::hex(f.mbus_code, 4);\n \telse\n \t\tout << it->second.name;\n@@ -515,8 +515,8 @@ std::optional<ColorSpace> V4L2Subdevice::toColorSpace(const v4l2_mbus_framefmt &\n \t\treturn std::nullopt;\n \n \tPixelFormatInfo::ColourEncoding colourEncoding;\n-\tauto iter = formatInfoMap.find(format.code);\n-\tif (iter != formatInfoMap.end()) {\n+\tauto iter = mediaBusFormatInfo.find(format.code);\n+\tif (iter != mediaBusFormatInfo.end()) {\n \t\tcolourEncoding = iter->second.colourEncoding;\n \t} else {\n \t\tLOG(V4L2, Warning)\n", "prefixes": [ "v2", "01/14" ] }