{"id":16454,"url":"https://patchwork.libcamera.org/api/patches/16454/?format=json","web_url":"https://patchwork.libcamera.org/patch/16454/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20220630101702.45781-4-jeanmichel.hautbois@ideasonboard.com>","date":"2022-06-30T10:17:00","name":"[libcamera-devel,3/5] utils: ipu3: Display BNR configuration","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"9568d869125bcfb61e8303bc139b2f87fd8cb623","submitter":{"id":75,"url":"https://patchwork.libcamera.org/api/people/75/?format=json","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/16454/mbox/","series":[{"id":3237,"url":"https://patchwork.libcamera.org/api/series/3237/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3237","date":"2022-06-30T10:16:58","name":"[libcamera-devel,1/5] utils: ipu3: Introduce a parameters dump tool","version":1,"mbox":"https://patchwork.libcamera.org/series/3237/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/16454/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/16454/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 754CFBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 30 Jun 2022 10:17:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5C77D65652;\n\tThu, 30 Jun 2022 12:17:11 +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 5CBBF6564C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 30 Jun 2022 12:17:07 +0200 (CEST)","from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:4fb3:9c17:e136:8792])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BC9A6832;\n\tThu, 30 Jun 2022 12:17:06 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656584231;\n\tbh=Yg5sa1AqVVlgjTpOSBRX1gkku0YI3CInhPOvLn5bSIk=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=hNid5btnWkZBwsObX5fPTXoQ21HP3Nl1D89KodQswDPk09x98bGNmOjJTO4wmk2SX\n\t+wKzRkUFNhZETNSdikbLNg0hQvnr2uuHyzTxW5zWAzbYpBhyYmyUivqPiMFTiI/aPl\n\tGuOaT6kc1M2jFc5sEk9t3kSDMvEEw5lXsVgUCHr8WTJ85ToTRZiZFVFft00ufDXqh8\n\tnrJefcnlTxOQoNqzyZyd93G6dOWATlj2V8McZLihKrZ7TcDtvtypm4sSeKNYp77SlJ\n\tDmx4Pf9NLgnMRcalxfxJoUZizYYKsqPsA/Gn+7mgIeVb0/rWN+aBGYCwXQtJewAE1a\n\tTgYdLsdZmjURA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1656584226;\n\tbh=Yg5sa1AqVVlgjTpOSBRX1gkku0YI3CInhPOvLn5bSIk=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=BKxAy+utOrArZ/TeES4xrdpsow4GeoBqdwbnbN3SEmmi5tnhE3yP5TKOxIPG3zwaG\n\taABo3e7QaLty0KVf5bNrUv6DCIqQmZEF9IUR7O6Amq/56HzbitiE0x8gDCYmnYH0q1\n\tp+a/XNDOQ6OxOx2XSdiAAr6sUClnYIDXR8X8GTDU="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"BKxAy+ut\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 30 Jun 2022 12:17:00 +0200","Message-Id":"<20220630101702.45781-4-jeanmichel.hautbois@ideasonboard.com>","X-Mailer":"git-send-email 2.34.1","In-Reply-To":"<20220630101702.45781-1-jeanmichel.hautbois@ideasonboard.com>","References":"<20220630101702.45781-1-jeanmichel.hautbois@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 3/5] utils: ipu3: Display BNR configuration","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>","From":"Jean-Michel Hautbois via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Bayer Noise Reduction is a processing block which contains optical\ncorrection parameters for the ImgU. Display the configured parameters.\n\nSigned-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n---\n utils/ipu3/ipu3-dump-params.c | 25 +++++++++++++++++++++++++\n 1 file changed, 25 insertions(+)","diff":"diff --git a/utils/ipu3/ipu3-dump-params.c b/utils/ipu3/ipu3-dump-params.c\nindex 37cf2e6f..257f2205 100644\n--- a/utils/ipu3/ipu3-dump-params.c\n+++ b/utils/ipu3/ipu3-dump-params.c\n@@ -39,6 +39,27 @@ static void displayGrid(struct ipu3_uapi_grid_config *grid, const char *gridName\n \t       grid->height << grid->block_height_log2);\n }\n \n+static void displayBNR(struct ipu3_uapi_params *params)\n+{\n+\tstruct ipu3_uapi_bnr_static_config bnr = params->acc_param.bnr;\n+\tprintf(\"WB gains: (gr: %u, r: %u, gb: %u, b: %u)\\n\",\n+\t\tbnr.wb_gains.gr, bnr.wb_gains.r,\n+\t\tbnr.wb_gains.gb, bnr.wb_gains.b);\n+\tprintf(\"WB gains thresholds: (gr: %u, r: %u, gb: %u, b: %u)\\n\",\n+\t\tbnr.wb_gains_thr.gr, bnr.wb_gains_thr.r,\n+\t\tbnr.wb_gains_thr.gb, bnr.wb_gains_thr.b);\n+\tprintf(\"Optical window center: (%d, %d) column size is %u\\n\",\n+\t\tbnr.opt_center.x_reset, bnr.opt_center.y_reset, bnr.column_size);\n+\tprintf(\"Noise model coefficients that controls noise threshold:\\n\");\n+\tprintf(\"Free coefficient (cf): %u, Gain coefficient(cg): %u\\n\",\n+\t\tbnr.thr_coeffs.cf, bnr.thr_coeffs.cg);\n+\tprintf(\"Intensity coefficient(ci): %u, Normalization shift value for r^2 calculation(r_nf): %u\\n\",\n+\t\tbnr.thr_coeffs.ci, bnr.thr_coeffs.r_nf);\n+\tprintf(\"Lens shading gain approximations: (gr: %u, r: %u, gb: %u, b: %u)\\n\",\n+\t\tbnr.thr_ctrl_shd.gr, bnr.thr_ctrl_shd.r,\n+\t\tbnr.thr_ctrl_shd.gb, bnr.thr_ctrl_shd.b);\n+}\n+\n int main(int argc, char *argv[])\n {\n \tint in_fd;\n@@ -64,6 +85,10 @@ start:\n \n \tprintf(\"Read parameters buffer of size %d\\n\", ret);\n \n+\tif (params.use.acc_bnr) {\n+\t\tprintf(\"\\n**** Bayer noise reduction parameters ****\\n\");\n+\t\tdisplayBNR(&params);\n+\t}\n \tif (params.use.acc_awb) {\n \t\tprintf(\"\\n**** AWB parameters ****\\n\");\n \t\tdisplayGrid(&params.acc_param.awb.config.grid, \"awb\");\n","prefixes":["libcamera-devel","3/5"]}