Patch Detail
Show a patch.
GET /api/patches/14614/?format=api
{ "id": 14614, "url": "https://patchwork.libcamera.org/api/patches/14614/?format=api", "web_url": "https://patchwork.libcamera.org/patch/14614/", "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": "<20211116080956.21373-1-jeanmichel.hautbois@ideasonboard.com>", "date": "2021-11-16T08:09:56", "name": "[libcamera-devel] ipa: ipu3: agc: Remove the threshold for the histogram calculation", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "828ccf5b1bfee15cf1a05a59122d830e25311611", "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/14614/mbox/", "series": [ { "id": 2720, "url": "https://patchwork.libcamera.org/api/series/2720/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2720", "date": "2021-11-16T08:09:56", "name": "[libcamera-devel] ipa: ipu3: agc: Remove the threshold for the histogram calculation", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2720/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/14614/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/14614/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 D51A2BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 16 Nov 2021 08:10:03 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3C66B60376;\n\tTue, 16 Nov 2021 09:10:03 +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 B667A60231\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 Nov 2021 09:10:01 +0100 (CET)", "from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:c966:1d53:a935:70a0])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 638C1466;\n\tTue, 16 Nov 2021 09:10:01 +0100 (CET)" ], "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=\"KHCHxakW\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1637050201;\n\tbh=7n5C0bCFO0L5s/x9qZWf79mrDGsMWqbzZSR/DyqsPbw=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=KHCHxakWILAKErtMi5wXoRNDpDajU6KbYz7QrtO5qYk6fQ/thPwDweISx8HP6P74f\n\tNLQoRwKynnTgqwpa0IkUaROgdkDcv/CLqBBZs3Dlt3nC13SrTTrvkTKGuPUGk8VAPO\n\tzBlfCvs+PKeTLPawFB6UiTqZbV7awrEWhGm4wtV0=", "From": "Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 16 Nov 2021 09:09:56 +0100", "Message-Id": "<20211116080956.21373-1-jeanmichel.hautbois@ideasonboard.com>", "X-Mailer": "git-send-email 2.32.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] ipa: ipu3: agc: Remove the threshold for\n\tthe histogram calculation", "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": "Until f8f07f94 (ipa: ipu3: agc: Improve gain calculation, 2021-11-04)\nthe gain to apply on the exposure value was only using the histogram.\nNow that the global brightness of the frame is estimated too, we don't\nneed to remove part of the saturated pixels from the equation anymore.\n\nSigned-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n---\n src/ipa/ipu3/algorithms/agc.cpp | 24 ++++++++----------------\n 1 file changed, 8 insertions(+), 16 deletions(-)", "diff": "diff --git a/src/ipa/ipu3/algorithms/agc.cpp b/src/ipa/ipu3/algorithms/agc.cpp\nindex 4e424857..f67a79d3 100644\n--- a/src/ipa/ipu3/algorithms/agc.cpp\n+++ b/src/ipa/ipu3/algorithms/agc.cpp\n@@ -58,12 +58,6 @@ static constexpr uint32_t knumHistogramBins = 256;\n /* Target value to reach for the top 2% of the histogram */\n static constexpr double kEvGainTarget = 0.5;\n \n-/*\n- * Maximum ratio of saturated pixels in a cell for the cell to be considered\n- * non-saturated and counted by the AGC algorithm.\n- */\n-static constexpr uint32_t kMinCellsPerZoneRatio = 255 * 20 / 100;\n-\n /* Number of frames to wait before calculating stats on minimum exposure */\n static constexpr uint32_t kNumStartupFrames = 10;\n \n@@ -133,16 +127,14 @@ void Agc::measureBrightness(const ipu3_uapi_stats_3a *stats,\n \t\t\t\t\t&stats->awb_raw_buffer.meta_data[cellPosition]\n \t\t\t\t);\n \n-\t\t\tif (cell->sat_ratio <= kMinCellsPerZoneRatio) {\n-\t\t\t\tuint8_t gr = cell->Gr_avg;\n-\t\t\t\tuint8_t gb = cell->Gb_avg;\n-\t\t\t\t/*\n-\t\t\t\t * Store the average green value to estimate the\n-\t\t\t\t * brightness. Even the overexposed pixels are\n-\t\t\t\t * taken into account.\n-\t\t\t\t */\n-\t\t\t\thist[(gr + gb) / 2]++;\n-\t\t\t}\n+\t\t\tuint8_t gr = cell->Gr_avg;\n+\t\t\tuint8_t gb = cell->Gb_avg;\n+\t\t\t/*\n+\t\t\t * Store the average green value to estimate the\n+\t\t\t * brightness. Even the overexposed pixels are\n+\t\t\t * taken into account.\n+\t\t\t */\n+\t\t\thist[(gr + gb) / 2]++;\n \t\t}\n \t}\n \n", "prefixes": [ "libcamera-devel" ] }