From patchwork Thu Jun 30 10:17:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Michel Hautbois X-Patchwork-Id: 16454 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 754CFBE173 for ; Thu, 30 Jun 2022 10:17:13 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5C77D65652; Thu, 30 Jun 2022 12:17:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1656584231; bh=Yg5sa1AqVVlgjTpOSBRX1gkku0YI3CInhPOvLn5bSIk=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=hNid5btnWkZBwsObX5fPTXoQ21HP3Nl1D89KodQswDPk09x98bGNmOjJTO4wmk2SX +wKzRkUFNhZETNSdikbLNg0hQvnr2uuHyzTxW5zWAzbYpBhyYmyUivqPiMFTiI/aPl GuOaT6kc1M2jFc5sEk9t3kSDMvEEw5lXsVgUCHr8WTJ85ToTRZiZFVFft00ufDXqh8 nrJefcnlTxOQoNqzyZyd93G6dOWATlj2V8McZLihKrZ7TcDtvtypm4sSeKNYp77SlJ Dmx4Pf9NLgnMRcalxfxJoUZizYYKsqPsA/Gn+7mgIeVb0/rWN+aBGYCwXQtJewAE1a TgYdLsdZmjURA== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5CBBF6564C for ; Thu, 30 Jun 2022 12:17:07 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="BKxAy+ut"; dkim-atps=neutral Received: from tatooine.ideasonboard.com (unknown [IPv6:2a01:e0a:169:7140:4fb3:9c17:e136:8792]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id BC9A6832; Thu, 30 Jun 2022 12:17:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1656584226; bh=Yg5sa1AqVVlgjTpOSBRX1gkku0YI3CInhPOvLn5bSIk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BKxAy+utOrArZ/TeES4xrdpsow4GeoBqdwbnbN3SEmmi5tnhE3yP5TKOxIPG3zwaG aABo3e7QaLty0KVf5bNrUv6DCIqQmZEF9IUR7O6Amq/56HzbitiE0x8gDCYmnYH0q1 p+a/XNDOQ6OxOx2XSdiAAr6sUClnYIDXR8X8GTDU= 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 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jean-Michel Hautbois via libcamera-devel From: Jean-Michel Hautbois Reply-To: Jean-Michel Hautbois Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Bayer Noise Reduction is a processing block which contains optical correction parameters for the ImgU. Display the configured parameters. Signed-off-by: Jean-Michel Hautbois --- utils/ipu3/ipu3-dump-params.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/utils/ipu3/ipu3-dump-params.c b/utils/ipu3/ipu3-dump-params.c index 37cf2e6f..257f2205 100644 --- a/utils/ipu3/ipu3-dump-params.c +++ b/utils/ipu3/ipu3-dump-params.c @@ -39,6 +39,27 @@ static void displayGrid(struct ipu3_uapi_grid_config *grid, const char *gridName grid->height << grid->block_height_log2); } +static void displayBNR(struct ipu3_uapi_params *params) +{ + struct ipu3_uapi_bnr_static_config bnr = params->acc_param.bnr; + printf("WB gains: (gr: %u, r: %u, gb: %u, b: %u)\n", + bnr.wb_gains.gr, bnr.wb_gains.r, + bnr.wb_gains.gb, bnr.wb_gains.b); + printf("WB gains thresholds: (gr: %u, r: %u, gb: %u, b: %u)\n", + bnr.wb_gains_thr.gr, bnr.wb_gains_thr.r, + bnr.wb_gains_thr.gb, bnr.wb_gains_thr.b); + printf("Optical window center: (%d, %d) column size is %u\n", + bnr.opt_center.x_reset, bnr.opt_center.y_reset, bnr.column_size); + printf("Noise model coefficients that controls noise threshold:\n"); + printf("Free coefficient (cf): %u, Gain coefficient(cg): %u\n", + bnr.thr_coeffs.cf, bnr.thr_coeffs.cg); + printf("Intensity coefficient(ci): %u, Normalization shift value for r^2 calculation(r_nf): %u\n", + bnr.thr_coeffs.ci, bnr.thr_coeffs.r_nf); + printf("Lens shading gain approximations: (gr: %u, r: %u, gb: %u, b: %u)\n", + bnr.thr_ctrl_shd.gr, bnr.thr_ctrl_shd.r, + bnr.thr_ctrl_shd.gb, bnr.thr_ctrl_shd.b); +} + int main(int argc, char *argv[]) { int in_fd; @@ -64,6 +85,10 @@ start: printf("Read parameters buffer of size %d\n", ret); + if (params.use.acc_bnr) { + printf("\n**** Bayer noise reduction parameters ****\n"); + displayBNR(¶ms); + } if (params.use.acc_awb) { printf("\n**** AWB parameters ****\n"); displayGrid(¶ms.acc_param.awb.config.grid, "awb");