Show a patch.

GET /api/1.1/patches/10098/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 10098,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/10098/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/10098/",
    "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": "<20201019125156.26751-5-david.plowman@raspberrypi.com>",
    "date": "2020-10-19T12:51:55",
    "name": "[libcamera-devel,v4,4/5] libcamera: Add geometry helper functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "641a9ef29f4fc8cd8856a94e332e2c7c1a0f89ea",
    "submitter": {
        "id": 42,
        "url": "https://patchwork.libcamera.org/api/1.1/people/42/?format=api",
        "name": "David Plowman",
        "email": "david.plowman@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/10098/mbox/",
    "series": [
        {
            "id": 1384,
            "url": "https://patchwork.libcamera.org/api/1.1/series/1384/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1384",
            "date": "2020-10-19T12:51:51",
            "name": "Digital zoom",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/1384/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/10098/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/10098/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 B1AA4BDB1F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 19 Oct 2020 12:52:11 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7DB2D610C4;\n\tMon, 19 Oct 2020 14:52:11 +0200 (CEST)",
            "from mail-wm1-x330.google.com (mail-wm1-x330.google.com\n\t[IPv6:2a00:1450:4864:20::330])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D2C54613AD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 19 Oct 2020 14:52:08 +0200 (CEST)",
            "by mail-wm1-x330.google.com with SMTP id k18so12708412wmj.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 19 Oct 2020 05:52:08 -0700 (PDT)",
            "from pi4-davidp.pitowers.org\n\t([2a00:1098:3142:14:1ce1:9965:4328:89c4])\n\tby smtp.gmail.com with ESMTPSA id\n\tq6sm16634335wma.0.2020.10.19.05.52.07\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 19 Oct 2020 05:52:07 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"cQDY6znX\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=FlJbCPowPNQgdLxZw1xW4nGcr1UMbOQEpUkrtChTo/Y=;\n\tb=cQDY6znXifRUJfx8/gn21swSQSrs4eJmxuNiZUcoHTIcz5dlTM78pG6PtPh2aBGexK\n\tTe8j8+Zc4N95myGbICIAZ54L3MEF+iDNKTmAS0ibTn93dwNnMBIHzh3LBvtVN+Q2oCNy\n\tXuzVcFWUNWp4H+pEtD1DqPg2UDomhwgNr7Xji98F9Csh/+JOxy/IQxl9Qwrfjau2TI/h\n\tPNXmlv2UowWWdrWBfncMrSJvw+7Lkdqgz23bYBUdTlak6aIfy0olj25gV8DDkCF9fhtD\n\t1QTgFMK7nMPRiNh4PakCDjdKL073btKudyhJsxGNhY8pFPBGDjY3vunxuQKUAkU5QOVB\n\tsSFA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=FlJbCPowPNQgdLxZw1xW4nGcr1UMbOQEpUkrtChTo/Y=;\n\tb=PQoya/HWZ5n1dXSRw8eiv2EI1DHaaDQ4t3nRMSwKVMWQJvtMYIi1fAdbp0eopqsw58\n\t0mNSRZQclOhc42N1SmSCxMY2VzP6PCTzRJEPqR/sATNLDbp8qMPJMT9W4WIQ6qpawAmx\n\tRJj1T0yTHGXUaMGxoedkJKSRMDB/60k0xNlPmSr0X6BNcth7wN5EFCZ+mZak/BpnQ47E\n\tOTVbQYU8KBwY5Ios7lvekge1yrmoFFWiRGNvAcANBu89OYNAuPfE7I5gPZo8Q37tyoRO\n\t8fAN4a0bhFBc/BQH2iIh/6ybERQetdJiEK1XApk71odLUyMXa9/QvCsud9oT6O1PRJx4\n\tnEoQ==",
        "X-Gm-Message-State": "AOAM530/es67v83i9sl8OWF7Q0nNiIF0gWvmO1rScLvdW0z1PIm8iMUt\n\te4WCIOOWdopzpnXpzfBoSQcIWVn/Jq/FYQ==",
        "X-Google-Smtp-Source": "ABdhPJwN22WS7uqT48E/38ccVfOMnkv41Qmow706CosCE5vDEwmXCBFP+pjRSb6W+l7j6zmDNDqrLQ==",
        "X-Received": "by 2002:a1c:791a:: with SMTP id\n\tl26mr18363116wme.163.1603111928059; \n\tMon, 19 Oct 2020 05:52:08 -0700 (PDT)",
        "From": "David Plowman <david.plowman@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 19 Oct 2020 13:51:55 +0100",
        "Message-Id": "<20201019125156.26751-5-david.plowman@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20201019125156.26751-1-david.plowman@raspberrypi.com>",
        "References": "<20201019125156.26751-1-david.plowman@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v4 4/5] libcamera: Add geometry helper\n\tfunctions",
        "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>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "These functions are aimed at making it easier to calculate cropping\nrectangles, particularly in order to implement digital zoom.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n include/libcamera/geometry.h |  53 +++++++\n src/libcamera/geometry.cpp   | 296 +++++++++++++++++++++++++++++++++++\n 2 files changed, 349 insertions(+)",
    "diff": "diff --git a/include/libcamera/geometry.h b/include/libcamera/geometry.h\nindex 02fb63c0..5935cc63 100644\n--- a/include/libcamera/geometry.h\n+++ b/include/libcamera/geometry.h\n@@ -13,6 +13,25 @@\n \n namespace libcamera {\n \n+class Point\n+{\n+public:\n+\tconstexpr Point()\n+\t\t: x(0), y(0)\n+\t{\n+\t}\n+\n+\tconstexpr Point(int xpos, int ypos)\n+\t\t: x(xpos), y(ypos)\n+\t{\n+\t}\n+\n+\tint x;\n+\tint y;\n+};\n+\n+class Rectangle;\n+\n class Size\n {\n public:\n@@ -32,6 +51,8 @@ public:\n \tbool isNull() const { return !width && !height; }\n \tconst std::string toString() const;\n \n+\tPoint center() const;\n+\n \tSize &alignDownTo(unsigned int hAlignment, unsigned int vAlignment)\n \t{\n \t\twidth = width / hAlignment * hAlignment;\n@@ -93,8 +114,19 @@ public:\n \t\t\tstd::max(height, expand.height)\n \t\t};\n \t}\n+\n+\tSize boundedToAspectRatio(const Size &ratio) const;\n+\tSize expandedToAspectRatio(const Size &ratio) const;\n+\n+\tRectangle centeredTo(const Point &center) const;\n };\n \n+Size operator*(const Size &size, float factor);\n+Size operator/(const Size &size, float factor);\n+\n+Size &operator*=(Size &size, float factor);\n+Size &operator/=(Size &size, float factor);\n+\n bool operator==(const Size &lhs, const Size &rhs);\n bool operator<(const Size &lhs, const Size &rhs);\n \n@@ -176,6 +208,11 @@ public:\n \t{\n \t}\n \n+\tconstexpr explicit Rectangle(const Size &size)\n+\t\t: x(0), y(0), width(size.width), height(size.height)\n+\t{\n+\t}\n+\n \tint x;\n \tint y;\n \tunsigned int width;\n@@ -183,6 +220,22 @@ public:\n \n \tbool isNull() const { return !width && !height; }\n \tconst std::string toString() const;\n+\n+\tPoint center() const;\n+\n+\tSize size() const;\n+\n+\tRectangle &translateBy(int dx, int dy);\n+\n+\tRectangle &rescaleTo(const Size &from, const Size &to);\n+\n+\tRectangle translatedBy(int dx, int dy) const;\n+\n+\tRectangle rescaledTo(const Size &from, const Size &to) const;\n+\n+\tRectangle boundedTo(const Rectangle &bound) const;\n+\n+\tRectangle clampedTo(const Rectangle &boundary) const;\n };\n \n bool operator==(const Rectangle &lhs, const Rectangle &rhs);\ndiff --git a/src/libcamera/geometry.cpp b/src/libcamera/geometry.cpp\nindex b12e1a62..75741c1e 100644\n--- a/src/libcamera/geometry.cpp\n+++ b/src/libcamera/geometry.cpp\n@@ -17,6 +17,36 @@\n \n namespace libcamera {\n \n+/**\n+ * \\struct Point\n+ * \\brief Describe a point in two-dimensional space\n+ *\n+ * The Point structure defines a point in two-dimensional space with integer\n+ * precision. The coordinates of a Point may be negative as well as positive.\n+ */\n+\n+/**\n+ * \\fn Point::Point()\n+ * \\brief Construct a Point with x and y set to 0\n+ */\n+\n+/**\n+ * \\fn Point::Point(int x, int y)\n+ * \\brief Construct a Point at given \\a x and \\a y values\n+ * \\param[in] xpos The x-coordinate\n+ * \\param[in] ypos The y-coordinate\n+ */\n+\n+/**\n+ * \\var Point::x\n+ * \\brief The x-coordinate of the Point\n+ */\n+\n+/**\n+ * \\var Point::y\n+ * \\brief The y-coordinate of the Point\n+ */\n+\n /**\n  * \\struct Size\n  * \\brief Describe a two-dimensional size\n@@ -61,6 +91,15 @@ const std::string Size::toString() const\n \treturn std::to_string(width) + \"x\" + std::to_string(height);\n }\n \n+/**\n+ * \\brief Retrieve the center point of this size\n+ * \\return The center Point\n+ */\n+Point Size::center() const\n+{\n+\treturn { static_cast<int>(width / 2), static_cast<int>(height / 2) };\n+}\n+\n /**\n  * \\fn Size::alignDownTo(unsigned int hAlignment, unsigned int vAlignment)\n  * \\brief Align the size down horizontally and vertically in place\n@@ -143,6 +182,101 @@ const std::string Size::toString() const\n  * height of this size and the \\a expand size\n  */\n \n+/**\n+ * \\brief Bound the size down to match the aspect ratio given by \\a ratio\n+ * \\param[in] ratio The size whose aspect ratio must be matched\n+ * \\return A Size whose width and height are equal to the width and height\n+ * of this Size aligned down to the aspect ratio of \\a ratio\n+ */\n+Size Size::boundedToAspectRatio(const Size &ratio) const\n+{\n+\tuint64_t ratio1 = static_cast<uint64_t>(width) *\n+\t\t\t  static_cast<uint64_t>(ratio.height);\n+\tuint64_t ratio2 = static_cast<uint64_t>(ratio.width) *\n+\t\t\t  static_cast<uint64_t>(height);\n+\n+\tif (ratio1 > ratio2)\n+\t\treturn { static_cast<unsigned int>(ratio2 / ratio.height), height };\n+\telse\n+\t\treturn { width, static_cast<unsigned int>(ratio1 / ratio.width) };\n+}\n+\n+/**\n+ * \\brief Expand the size to match the aspect ratio given by \\a ratio\n+ * \\param[in] ratio The size whose aspect ratio must be matched\n+ * \\return A Size whose width and height are equal to the width and height\n+ * of this Size expanded up to the aspect ratio of \\a ratio\n+ */\n+Size Size::expandedToAspectRatio(const Size &ratio) const\n+{\n+\tuint64_t ratio1 = static_cast<uint64_t>(width) *\n+\t\t\t  static_cast<uint64_t>(ratio.height);\n+\tuint64_t ratio2 = static_cast<uint64_t>(ratio.width) *\n+\t\t\t  static_cast<uint64_t>(height);\n+\n+\tif (ratio1 < ratio2)\n+\t\treturn { static_cast<unsigned int>(ratio2 / ratio.height), height };\n+\telse\n+\t\treturn { width, static_cast<unsigned int>(ratio1 / ratio.width) };\n+}\n+\n+/**\n+ * \\brief Center a rectangle of this size at a given Point\n+ * \\param[in] center The center point the Rectangle is to have\n+ *\n+ * A Rectangle of this object's size is positioned so that its center\n+ * is at the given Point.\n+ *\n+ * \\return A Rectangle of this size, centered at the given Point.\n+ */\n+Rectangle Size::centeredTo(const Point &center) const\n+{\n+\tint x = center.x - width / 2;\n+\tint y = center.y - height / 2;\n+\n+\treturn { x, y, width, height };\n+}\n+\n+/**\n+ * \\brief Scale size up by the given factor\n+ * \\return The scaled Size\n+ */\n+Size operator*(const Size &size, float factor)\n+{\n+\treturn Size(size.width * factor, size.height * factor);\n+}\n+\n+/**\n+ * \\brief Scale size down by the given factor\n+ * \\return The scaled Size\n+ */\n+Size operator/(const Size &size, float factor)\n+{\n+\treturn Size(size.width / factor, size.height / factor);\n+}\n+\n+/**\n+ * \\brief Scale size up by the given factor in place\n+ * \\return The scaled Size\n+ */\n+Size &operator*=(Size &size, float factor)\n+{\n+\tsize.width *= factor;\n+\tsize.height *= factor;\n+\treturn size;\n+}\n+\n+/**\n+ * \\brief Scale size down by the given factor in place\n+ * \\return The scaled Size\n+ */\n+Size &operator/=(Size &size, float factor)\n+{\n+\tsize.width /= factor;\n+\tsize.height /= factor;\n+\treturn size;\n+}\n+\n /**\n  * \\brief Compare sizes for equality\n  * \\return True if the two sizes are equal, false otherwise\n@@ -365,6 +499,13 @@ bool operator==(const SizeRange &lhs, const SizeRange &rhs)\n  * \\param[in] height The height\n  */\n \n+/**\n+ * \\fn Rectangle::Rectangle(const Size &size)\n+ * \\brief Construct a Rectangle of \\a size with its top left corner located\n+ * at (0,0).\n+ * \\param[in] size The desired Rectangle size\n+ */\n+\n /**\n  * \\var Rectangle::x\n  * \\brief The horizontal coordinate of the rectangle's top-left corner\n@@ -404,6 +545,161 @@ const std::string Rectangle::toString() const\n \treturn ss.str();\n }\n \n+/**\n+ * \\brief Retrieve the center point of this rectangle\n+ * \\return The center Point\n+ */\n+Point Rectangle::center() const\n+{\n+\treturn { x + static_cast<int>(width / 2), y + static_cast<int>(height / 2) };\n+}\n+\n+/**\n+ * \\brief Retrieve the size of this rectangle\n+ * \\return The Rectangle size\n+ */\n+Size Rectangle::size() const\n+{\n+\treturn Size(width, height);\n+}\n+\n+/**\n+ * \\brief Translate this Rectangle by the given amounts in place\n+ * \\param[in] dx The amount to translate the Rectangle in the x direction\n+ * \\param[in] dy The amount to translate the Rectangle in the y direction\n+ *\n+ * The Rectangle is translated by the given amounts \\a dx and \\a dy.\n+ *\n+ * \\return A reference to this object\n+ */\n+Rectangle &Rectangle::translateBy(int dx, int dy)\n+{\n+\tx += dx;\n+\ty += dy;\n+\n+\treturn *this;\n+}\n+\n+/**\n+ * \\brief Rescale this Rectangle in place from one coordinate frame to another\n+ * \\param[in] from The current coordinate frame of the Rectangle\n+ * \\param[in] to The new coordinate frame for the Rectangle\n+ *\n+ * The Rectangle can be regarded as being embedded within a coordinate frame\n+ * given by \\a from. It is rescaled so as to occupy the equivalent part of the\n+ * new coordinate frame given by \\a to.\n+ *\n+ * This is purely a scaling operation, and the Rectangle does not need to lie\n+ * inside the coordinate frames.\n+ *\n+ * \\return A reference to this object\n+ */\n+Rectangle &Rectangle::rescaleTo(const Size &from, const Size &to)\n+{\n+\tx = static_cast<int64_t>(x) * to.width / from.width;\n+\ty = static_cast<int64_t>(y) * to.height / from.height;\n+\twidth = static_cast<uint64_t>(width) * to.width / from.width;\n+\theight = static_cast<uint64_t>(height) * to.height / from.height;\n+\n+\treturn *this;\n+}\n+\n+/**\n+ * \\brief Translate a Rectangle by the given amounts\n+ * \\param[in] dx The amount to translate the Rectangle in the x direction\n+ * \\param[in] dy The amount to translate the Rectangle in the y direction\n+ *\n+ * The Rectangle is translated by the given amounts \\a dx and \\a dy.\n+ *\n+ * \\return The translated Rectangle\n+ */\n+Rectangle Rectangle::translatedBy(int dx, int dy) const\n+{\n+\treturn { x + dx, y + dy, width, height };\n+}\n+\n+/**\n+ * \\brief Rescale a Rectangle from one coordinate frame to another\n+ * \\param[in] from The coordinate frame of the given Rectangle\n+ * \\param[in] to The new coordinate frame for the new Rectangle\n+ *\n+ * The Rectangle can be regarded as being embedded within a coordinate frame\n+ * given by \\a from. A new Rectangle, rescaled so as to occupy the equivalent\n+ * part of the new coordinate frame given by \\a to, is created and returned.\n+ *\n+ * This is purely a scaling operation, and the Rectangle does not need to lie\n+ * inside the coordinate frames.\n+ *\n+ * \\return The rescaled Rectangle\n+ */\n+Rectangle Rectangle::rescaledTo(const Size &from, const Size &to) const\n+{\n+\tint scaledX = static_cast<int64_t>(x) * to.width / from.width;\n+\tint scaledY = static_cast<int64_t>(y) * to.height / from.height;\n+\tunsigned int scaledWidth = static_cast<uint64_t>(width) * to.width / from.width;\n+\tunsigned int scaledHeight = static_cast<uint64_t>(height) * to.height / from.height;\n+\n+\treturn { scaledX, scaledY, scaledWidth, scaledHeight };\n+}\n+\n+/**\n+ * \\brief Calculate the intersection of this Rectangle with another\n+ * \\param[in] bound The Rectangle that is intersected with this Rectangle\n+ *\n+ * This method calculates the standard intersection of two Rectangles. If the\n+ * Rectangles do not overlap in either the x or y direction, then the size\n+ * of that dimension in the result (its width or height) is set to zero. Even\n+ * when one dimension is set to zero, note that the other dimension may still\n+ * have a positive value if there was some overlap.\n+ *\n+ * \\return A Rectangle that is the intersection of the input Rectangles\n+ */\n+Rectangle Rectangle::boundedTo(const Rectangle &bound) const\n+{\n+\tint topLeftX = std::max(x, bound.x);\n+\tint topLeftY = std::max(y, bound.y);\n+\tint bottomRightX = std::min<int>(x + width, bound.x + bound.width);\n+\tint bottomRightY = std::min<int>(y + height, bound.y + bound.height);\n+\n+\tint newWidth = bottomRightX - topLeftX;\n+\tint newHeight = bottomRightY - topLeftY;\n+\n+\treturn { topLeftX, topLeftY,\n+\t\t static_cast<unsigned int>(std::max(newWidth, 0)),\n+\t\t static_cast<unsigned int>(std::max(newHeight, 0)) };\n+}\n+\n+/**\n+ * \\brief Clamp a Rectangle so as not to exceed another Rectangle\n+ * \\param[in] boundary The limit that the returned Rectangle will not exceed\n+ *\n+ * The Rectangle is modified so that it does not exceeed the given \\a boundary.\n+ * This process involves translating the Rectangle if any of its edges\n+ * lie beyond \\a boundary, so that those edges then lie along the boundary\n+ * instead.\n+ *\n+ * If either width or height are larger than \\a boundary, then the returned\n+ * Rectangle is clipped to be no larger. But other than this, the\n+ * Rectangle is not clipped or reduced in size, merely translated.\n+ *\n+ * We note that this is not a conventional Rectangle intersection function\n+ * \\sa Rectangle::boundedTo\n+ *\n+ * \\return A Rectangle that does not extend beyond a boundary Rectangle\n+ */\n+Rectangle Rectangle::clampedTo(const Rectangle &boundary) const\n+{\n+\t/* We can't be bigger than the boundary rectangle. */\n+\tRectangle result = boundedTo(Rectangle{ x, y, boundary.size() });\n+\n+\tresult.x = std::clamp<int>(result.x, boundary.x,\n+\t\t\t\t   boundary.x + boundary.width - result.width);\n+\tresult.y = std::clamp<int>(result.y, boundary.y,\n+\t\t\t\t   boundary.y + boundary.height - result.height);\n+\n+\treturn result;\n+}\n+\n /**\n  * \\brief Compare rectangles for equality\n  * \\return True if the two rectangles are equal, false otherwise\n",
    "prefixes": [
        "libcamera-devel",
        "v4",
        "4/5"
    ]
}