Patch Detail
Show a patch.
GET /api/patches/13726/?format=api
{ "id": 13726, "url": "https://patchwork.libcamera.org/api/patches/13726/?format=api", "web_url": "https://patchwork.libcamera.org/patch/13726/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/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": "<20210907154517.11140-1-laurent.pinchart@ideasonboard.com>", "date": "2021-09-07T15:45:17", "name": "[libcamera-devel,v3.1,05/30] libcamera: formats: Move plane info structure to PixelFormatInfo", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "420d798dfb6d99853d934d8ee39421944c08f75b", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/13726/mbox/", "series": [ { "id": 2491, "url": "https://patchwork.libcamera.org/api/series/2491/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2491", "date": "2021-09-07T15:44:41", "name": null, "version": 1, "mbox": "https://patchwork.libcamera.org/series/2491/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/13726/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/13726/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 D6C4FBE175\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 7 Sep 2021 15:45:40 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A576F60251;\n\tTue, 7 Sep 2021 17:45:40 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 33EB860251\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 7 Sep 2021 17:45:39 +0200 (CEST)", "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D26E124F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 7 Sep 2021 17:45:38 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"QmCTIL2/\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1631029539;\n\tbh=Lsfo+IBj6wF6c+BtwxgXBPUqK82cqzQqBH9sGc8LXnM=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=QmCTIL2/mNWuLMAjft2dlxETuhRfI1u6+TyNPLe4PXbUeYNPL8SVNpxYRfmjPXfFu\n\t9j1YnKJLnV1dDnDZbMAKtQgIyVi8RNRH1htRcekeP4kEM8lCiVT0DydeZ8/HAONAPm\n\tyQbGBqOsASB+2a+Laa3JzeY03bLRsLkx1UQB+y/8=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 7 Sep 2021 18:45:17 +0300", "Message-Id": "<20210907154517.11140-1-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.32.0", "In-Reply-To": "<20210906225636.14683-5-laurent.pinchart@ideasonboard.com>", "References": "<20210906225636.14683-5-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v3.1 05/30] libcamera: formats: Move plane\n\tinfo structure to PixelFormatInfo", "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": "Move the PixelFormatPlaneInfo structure within the PixelFormatInfo class\ndefinition and rename it to Plane, to align the naming scheme with other\nparts of libcamera, such as FrameBuffer::Plane or FrameMetadata::Plane.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\nReviewed-by: Hirokazu Honda <hiroh@chromium.org>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n---\nChanges since v3:\n\n- Use \\struct instead of \\class\n- Move the comment block to the right place\n---\n include/libcamera/internal/formats.h | 13 +++++-----\n src/libcamera/formats.cpp | 38 ++++++++++++++--------------\n 2 files changed, 25 insertions(+), 26 deletions(-)", "diff": "diff --git a/include/libcamera/internal/formats.h b/include/libcamera/internal/formats.h\nindex 51a8a6b8b0ae..a07de6bc6020 100644\n--- a/include/libcamera/internal/formats.h\n+++ b/include/libcamera/internal/formats.h\n@@ -19,12 +19,6 @@\n \n namespace libcamera {\n \n-struct PixelFormatPlaneInfo\n-{\n-\tunsigned int bytesPerGroup;\n-\tunsigned int verticalSubSampling;\n-};\n-\n class PixelFormatInfo\n {\n public:\n@@ -34,6 +28,11 @@ public:\n \t\tColourEncodingRAW,\n \t};\n \n+\tstruct Plane {\n+\t\tunsigned int bytesPerGroup;\n+\t\tunsigned int verticalSubSampling;\n+\t};\n+\n \tbool isValid() const { return format.isValid(); }\n \n \tstatic const PixelFormatInfo &info(const PixelFormat &format);\n@@ -58,7 +57,7 @@ public:\n \n \tunsigned int pixelsPerGroup;\n \n-\tstd::array<PixelFormatPlaneInfo, 3> planes;\n+\tstd::array<Plane, 3> planes;\n };\n \n } /* namespace libcamera */\ndiff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp\nindex 603d88619fe0..1e5c8a0c36dc 100644\n--- a/src/libcamera/formats.cpp\n+++ b/src/libcamera/formats.cpp\n@@ -23,22 +23,6 @@ namespace libcamera {\n \n LOG_DEFINE_CATEGORY(Formats)\n \n-/**\n- * \\class PixelFormatPlaneInfo\n- * \\brief Information about a single plane of a pixel format\n- *\n- * \\var PixelFormatPlaneInfo::bytesPerGroup\n- * \\brief The number of bytes that a pixel group consumes\n- *\n- * \\sa PixelFormatInfo::pixelsPerGroup\n- *\n- * \\var PixelFormatPlaneInfo::verticalSubSampling\n- * \\brief Vertical subsampling multiplier\n- *\n- * This value is the ratio between the number of rows of pixels in the frame\n- * to the number of rows of pixels in the plane.\n- */\n-\n /**\n * \\class PixelFormatInfo\n * \\brief Information about pixel formats\n@@ -87,7 +71,7 @@ LOG_DEFINE_CATEGORY(Formats)\n *\n * A pixel group is defined as the minimum number of pixels (including padding)\n * necessary in a row when the image has only one column of effective pixels.\n- * pixelsPerGroup refers to this value. PixelFormatPlaneInfo::bytesPerGroup,\n+ * pixelsPerGroup refers to this value. PixelFormatInfo::Plane::bytesPerGroup,\n * then, refers to the number of bytes that a pixel group consumes. This\n * definition of a pixel group allows simple calculation of stride, as\n * ceil(width / pixelsPerGroup) * bytesPerGroup. These values are determined\n@@ -122,7 +106,7 @@ LOG_DEFINE_CATEGORY(Formats)\n * \\var PixelFormatInfo::planes\n * \\brief Information about pixels for each plane\n *\n- * \\sa PixelFormatPlaneInfo\n+ * \\sa PixelFormatInfo::Plane\n */\n \n /**\n@@ -139,6 +123,22 @@ LOG_DEFINE_CATEGORY(Formats)\n * \\brief RAW colour encoding\n */\n \n+/**\n+ * \\struct PixelFormatInfo::Plane\n+ * \\brief Information about a single plane of a pixel format\n+ *\n+ * \\var PixelFormatInfo::Plane::bytesPerGroup\n+ * \\brief The number of bytes that a pixel group consumes\n+ *\n+ * \\sa PixelFormatInfo::pixelsPerGroup\n+ *\n+ * \\var PixelFormatInfo::Plane::verticalSubSampling\n+ * \\brief Vertical subsampling multiplier\n+ *\n+ * This value is the ratio between the number of rows of pixels in the frame\n+ * to the number of rows of pixels in the plane.\n+ */\n+\n namespace {\n \n const PixelFormatInfo pixelFormatInfoInvalid{};\n@@ -869,7 +869,7 @@ unsigned int PixelFormatInfo::numPlanes() const\n {\n \tunsigned int count = 0;\n \n-\tfor (const PixelFormatPlaneInfo &p : planes) {\n+\tfor (const Plane &p : planes) {\n \t\tif (p.bytesPerGroup == 0)\n \t\t\tbreak;\n \n", "prefixes": [ "libcamera-devel", "v3.1", "05/30" ] }