Patch Detail
Show a patch.
GET /api/patches/13439/?format=api
{ "id": 13439, "url": "https://patchwork.libcamera.org/api/patches/13439/?format=api", "web_url": "https://patchwork.libcamera.org/patch/13439/", "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": "<20210823124937.253539-5-jeanmichel.hautbois@ideasonboard.com>", "date": "2021-08-23T12:49:34", "name": "[libcamera-devel,v1,4/7] ipa: ipu3: awb: Add some documentation on the algorithm used", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "70e6b8635681460d2e378416411237878bd6cc0f", "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/13439/mbox/", "series": [ { "id": 2385, "url": "https://patchwork.libcamera.org/api/series/2385/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2385", "date": "2021-08-23T12:49:30", "name": "IPU3: AWB and AGC improvements", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2385/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/13439/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/13439/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 3F090C3242\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 Aug 2021 12:49:48 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4693B68909;\n\tMon, 23 Aug 2021 14:49:46 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 650456025B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Aug 2021 14:49:43 +0200 (CEST)", "from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:b920:776:a08c:1d1f])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 223844A3;\n\tMon, 23 Aug 2021 14:49:43 +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=\"pQdJjj3V\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1629722983;\n\tbh=pV7DKxt1Yd6rLgTQTnfWNm9pzjtDNmtZP0Bw0MOYhE8=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=pQdJjj3Vj6hp6Qwe6Ww2qfsyUHvUDhsFh+ffz5FUvZ7CZyQ9oPVHiV+tbWMH/dgMJ\n\t1aNgZRGzXPXnuL8BBbqdcEsGFSMj/s+aEyzgeI8eQ19RpxtlkCFU1BadNIJ/SjXoIV\n\t137jRvjCTfSnK6cNJ6rFVdJfLLug4eCTByZ01fRE=", "From": "Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 23 Aug 2021 14:49:34 +0200", "Message-Id": "<20210823124937.253539-5-jeanmichel.hautbois@ideasonboard.com>", "X-Mailer": "git-send-email 2.30.2", "In-Reply-To": "<20210823124937.253539-1-jeanmichel.hautbois@ideasonboard.com>", "References": "<20210823124937.253539-1-jeanmichel.hautbois@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v1 4/7] ipa: ipu3: awb: Add some\n\tdocumentation on the algorithm used", "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 AWB algorithm is based on the Grey world algorithm and uses the\nstatistics generated by the ImgU for that. Explain how it uses those,\nand reference the original algorithm at the same time.\n\nSigned-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n---\n src/ipa/ipu3/algorithms/awb.cpp | 25 +++++++++++++++++++++++++\n 1 file changed, 25 insertions(+)", "diff": "diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp\nindex 60a5fc52..8e4230b5 100644\n--- a/src/ipa/ipu3/algorithms/awb.cpp\n+++ b/src/ipa/ipu3/algorithms/awb.cpp\n@@ -17,6 +17,31 @@ namespace ipa::ipu3::algorithms {\n \n LOG_DEFINE_CATEGORY(IPU3Awb)\n \n+/**\n+ * The Grey World algorithm assumes that the scene, in average, is neutral grey.\n+ * Reference: Lam, Edmund & Fung, George. (2008). Automatic White Balancing in\n+ * Digital Photography. 10.1201/9781420054538.ch10.\n+ *\n+ * The IPU3 generates statistics from the Bayer Down Scaler output into a grid\n+ * defined in the ipu3_uapi_awb_config_s structure.\n+ *\n+ * For example, when the BDS outputs a frame of 2592x1944, the grid may be\n+ * configured to 81x30 cells each with a size of 32x64 pixels.\n+ * We then have an average of 2048 R, G and B pixels per cell.\n+ *\n+ * The AWB algorithm uses a fixed grid size of kAwbStatsSizeX x kAwbStatsSizeY.\n+ * Each of this new grid cell will be called a zone.\n+ *\n+ * Before calculating the gains, we will convert the statistics from the BDS\n+ * grid to an internal grid configuration in generateAwbStats.\n+ * As part of converting the statistics to an internal grid, the saturation\n+ * flag from the originating grid cell is used to decide if the zone contains\n+ * saturated pixels or not, making the zone relevant or not.\n+ * A saturated zone will be excluded from the calculation.\n+ *\n+ * The Grey World algorithm will then estimate the red and blue gains to apply, and\n+ * store the results in the metadata.\n+ */\n \n /**\n * \\struct IspStatsRegion\n", "prefixes": [ "libcamera-devel", "v1", "4/7" ] }