Patch Detail
Show a patch.
GET /api/patches/13830/?format=api
{ "id": 13830, "url": "https://patchwork.libcamera.org/api/patches/13830/?format=api", "web_url": "https://patchwork.libcamera.org/patch/13830/", "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": "<20210913145810.66515-3-jeanmichel.hautbois@ideasonboard.com>", "date": "2021-09-13T14:58:01", "name": "[libcamera-devel,02/11] ipa: ipu3: Improve the documentation of BDS grid", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "5921def7922ee75f7ee3aee74f6c6be0c9bf70d3", "submitter": { "id": 75, "url": "https://patchwork.libcamera.org/api/people/75/?format=api", "name": "Jean-Michel Hautbois", "email": "jeanmichel.hautbois@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/13830/mbox/", "series": [ { "id": 2523, "url": "https://patchwork.libcamera.org/api/series/2523/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2523", "date": "2021-09-13T14:57:59", "name": "Document all the IPU3 IPA classes", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2523/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/13830/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/13830/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 63B5EBDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 13 Sep 2021 14:58:20 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 66C186919E;\n\tMon, 13 Sep 2021 16:58:17 +0200 (CEST)", "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 648AC69181\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 13 Sep 2021 16:58:14 +0200 (CEST)", "from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:edc5:688b:2ede:8b4b])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 19D4BB2B;\n\tMon, 13 Sep 2021 16:58:14 +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=\"rFtIbZxp\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1631545094;\n\tbh=ev9EYZqNEM+QpWmZ7GJvB0KehupDBJH9gQNrxZjN0dI=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=rFtIbZxpH19QT1/m71SG0xqrayMLWEdiE+ayu/t7B+SVWMdvomKx5tfxvZByJngdD\n\ta5l/23wkvttgeITOi1OoeQsdDBEAXlyIMyHj6YWAn5ChJptIl9aNXohPaFenjZxPlV\n\teovRgBU3ksBSgFyM9TgTsapgNyt+Mb5jHKNbXNxI=", "From": "Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 13 Sep 2021 16:58:01 +0200", "Message-Id": "<20210913145810.66515-3-jeanmichel.hautbois@ideasonboard.com>", "X-Mailer": "git-send-email 2.30.2", "In-Reply-To": "<20210913145810.66515-1-jeanmichel.hautbois@ideasonboard.com>", "References": "<20210913145810.66515-1-jeanmichel.hautbois@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 02/11] ipa: ipu3: Improve the\n\tdocumentation of BDS grid", "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 BDS grid has its own limitations for the log2 width and height for\neach cell of pixels. Use constexpr for those and comment it to help\nunderstanding their usage.\n\nSigned-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n---\n src/ipa/ipu3/ipu3.cpp | 16 +++++++++++++---\n 1 file changed, 13 insertions(+), 3 deletions(-)", "diff": "diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\nindex 90053069..c71f2a6c 100644\n--- a/src/ipa/ipu3/ipu3.cpp\n+++ b/src/ipa/ipu3/ipu3.cpp\n@@ -345,6 +345,8 @@ int IPAIPU3::start()\n }\n \n /**\n+ * \\brief Calculate a grid for the AWB statistics\n+ *\n * This function calculates a grid for the AWB algorithm in the IPU3 firmware.\n * Its input is the BDS output size calculated in the ImgU.\n * It is limited for now to the simplest method: find the lesser error\n@@ -364,16 +366,24 @@ void IPAIPU3::calculateBdsGrid(const Size &bdsOutputSize)\n \t/* Set the BDS output size in the IPAConfiguration structure */\n \tcontext_.configuration.grid.bdsOutputSize = bdsOutputSize;\n \n-\tfor (uint32_t widthShift = 3; widthShift <= 7; ++widthShift) {\n+\t/*\n+\t * The log2 of the width and height of each cell is limited by the ImgU\n+\t * in the interval [3, 7] according to the kernel header.\n+\t */\n+\tconstexpr uint32_t kCellMin = 3;\n+\tconstexpr uint32_t kCellMax = 7;\n+\n+\tfor (uint32_t widthShift = kCellMin; widthShift <= kCellMax; ++widthShift) {\n \t\tuint32_t width = std::min(kMaxCellWidthPerSet,\n \t\t\t\t\t bdsOutputSize.width >> widthShift);\n \t\twidth = width << widthShift;\n-\t\tfor (uint32_t heightShift = 3; heightShift <= 7; ++heightShift) {\n+\n+\t\tfor (uint32_t heightShift = kCellMin; heightShift <= kCellMax; ++heightShift) {\n \t\t\tint32_t height = std::min(kMaxCellHeightPerSet,\n \t\t\t\t\t\t bdsOutputSize.height >> heightShift);\n \t\t\theight = height << heightShift;\n \t\t\tuint32_t error = std::abs(static_cast<int>(width - bdsOutputSize.width))\n-\t\t\t\t\t\t\t+ std::abs(static_cast<int>(height - bdsOutputSize.height));\n+\t\t\t\t\t+ std::abs(static_cast<int>(height - bdsOutputSize.height));\n \n \t\t\tif (error > minError)\n \t\t\t\tcontinue;\n", "prefixes": [ "libcamera-devel", "02/11" ] }