From patchwork Wed May 29 19:42:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 20141 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 0DA3BBDE6B for ; Wed, 29 May 2024 19:44:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B2B84634BE; Wed, 29 May 2024 21:44:04 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="I+up1b5Q"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id F10B06347E for ; Wed, 29 May 2024 21:44:02 +0200 (CEST) Received: from neptunite.hamster-moth.ts.net (h175-177-049-156.catv02.itscom.jp [175.177.49.156]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 22120149B; Wed, 29 May 2024 21:43:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1717011839; bh=4XC+W3tewX7dBN09vSB6sEGjsvw6KXo6ZoiOSnBP3ZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I+up1b5Q9hlfO0cwd8ZyOXi0aANJdQTWE8UScmvl7QnwOrTSmYuXT83qzJcQdEsbG ATbSwJ+a+zg1KH/HyWXTGmW66YWHMSwfQ3Y8i0b8YxBm90WjyQRoRsOVXdWUv9uBCX 8loWVR35odiVj3kJ0K5I1p5t3PBe6zlJp5H24ohA= From: Paul Elder To: libcamera-devel@lists.libcamera.org Cc: Paul Elder , Stefan Klug Subject: [PATCH v3 1/4] utils: libtuning: modules: Add skeletal AGC module Date: Thu, 30 May 2024 04:42:48 +0900 Message-Id: <20240529194251.863689-2-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240529194251.863689-1-paul.elder@ideasonboard.com> References: <20240529194251.863689-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add a skeletal AGC module just so that we can have some AGC tuning values that we can use to test during development of AGC in the IPAs. As rkisp1 is the main target, we only add support for rkisp1 for now. The parameters are mostly copied from the hardcoded values in ctt, except for the metering modes. Signed-off-by: Paul Elder Reviewed-by: Stefan Klug --- Changes in v3: - remove unused compatible string - make gain start from 2 in the exposure modes Changes in v2: - remove unneccessary imports - add support for both v10 and v12 --- .../tuning/libtuning/modules/agc/__init__.py | 6 + utils/tuning/libtuning/modules/agc/agc.py | 21 ++++ utils/tuning/libtuning/modules/agc/rkisp1.py | 110 ++++++++++++++++++ 3 files changed, 137 insertions(+) create mode 100644 utils/tuning/libtuning/modules/agc/__init__.py create mode 100644 utils/tuning/libtuning/modules/agc/agc.py create mode 100644 utils/tuning/libtuning/modules/agc/rkisp1.py diff --git a/utils/tuning/libtuning/modules/agc/__init__.py b/utils/tuning/libtuning/modules/agc/__init__.py new file mode 100644 index 000000000..4db9ca371 --- /dev/null +++ b/utils/tuning/libtuning/modules/agc/__init__.py @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2024, Paul Elder + +from libtuning.modules.agc.agc import AGC +from libtuning.modules.agc.rkisp1 import AGCRkISP1 diff --git a/utils/tuning/libtuning/modules/agc/agc.py b/utils/tuning/libtuning/modules/agc/agc.py new file mode 100644 index 000000000..9c8899bad --- /dev/null +++ b/utils/tuning/libtuning/modules/agc/agc.py @@ -0,0 +1,21 @@ +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (C) 2019, Raspberry Pi Ltd +# Copyright (C) 2024, Paul Elder + +from ..module import Module + +import libtuning as lt + + +class AGC(Module): + type = 'agc' + hr_name = 'AGC (Base)' + out_name = 'GenericAGC' + + # \todo Add sector shapes and stuff just like lsc + def __init__(self, *, + debug: list): + super().__init__() + + self.debug = debug diff --git a/utils/tuning/libtuning/modules/agc/rkisp1.py b/utils/tuning/libtuning/modules/agc/rkisp1.py new file mode 100644 index 000000000..02feb10e0 --- /dev/null +++ b/utils/tuning/libtuning/modules/agc/rkisp1.py @@ -0,0 +1,110 @@ +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (C) 2019, Raspberry Pi Ltd +# Copyright (C) 2024, Paul Elder +# +# rkisp1.py - AGC module for tuning rkisp1 + +from .agc import AGC + +import libtuning as lt + + +class AGCRkISP1(AGC): + hr_name = 'AGC (RkISP1)' + out_name = 'Agc' + + def __init__(self, *, **kwargs): + super().__init__(**kwargs) + + # We don't actually need anything from the config file + def validate_config(self, config: dict) -> bool: + return True + + def _generate_metering_modes(self) -> dict: + centre_weighted = { + 'v10': [ + 0, 0, 0, 0, 0, + 0, 6, 8, 6, 0, + 0, 8, 16, 8, 0, + 0, 6, 8, 6, 0, + 0, 0, 0, 0, 0 + ], + + 'v12': [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 4, 3, 0, 0, 0, + 0, 0, 3, 6, 8, 6, 3, 0, 0, + 0, 0, 4, 8, 16, 8, 4, 0, 0, + 0, 0, 3, 6, 8, 6, 3, 0, 0, + 0, 0, 0, 3, 4, 3, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, + ] + } + + spot = { + 'v10': [ + 0, 0, 0, 0, 0, + 0, 2, 4, 2, 0, + 0, 4, 16, 4, 0, + 0, 2, 4, 2, 0, + 0, 0, 0, 0, 0 + ], + + 'v12': [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 2, 1, 0, 0, 0, + 0, 0, 1, 2, 4, 2, 1, 0, 0, + 0, 0, 2, 4, 16, 4, 2, 0, 0, + 0, 0, 1, 2, 4, 2, 1, 0, 0, + 0, 0, 0, 1, 2, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, + ] + } + + matrix = { + 'v10': [1 for i in range(0, 25)], + 'v12': [1 for i in range(0, 81)] + } + + return { + 'MeteringCentreWeighted': centre_weighted, + 'MeteringSpot': spot, + 'MeteringMatrix': matrix + } + + def _generate_exposure_modes(self) -> dict: + normal = { 'shutter': [100, 10000, 30000, 60000, 120000], + 'gain': [2.0, 4.0, 6.0, 6.0, 6.0]} + short = { 'shutter': [100, 5000, 10000, 20000, 120000], + 'gain': [2.0, 4.0, 6.0, 6.0, 6.0]} + + return { 'ExposureNormal': normal, 'ExposureShort': short } + + def _generate_constraint_modes(self) -> dict: + normal = { 'lower': { 'qLo': 0.98, 'qHi': 1.0, 'yTarget': [ 0, 0.5, 1000, 0.5 ] } } + highlight = { + 'lower': { 'qLo': 0.98, 'qHi': 1.0, 'yTarget': [ 0, 0.5, 1000, 0.5 ] }, + 'upper': { 'qLo': 0.98, 'qHi': 1.0, 'yTarget': [ 0, 0.8, 1000, 0.5 ] } + } + + return { 'ConstraintNormal': normal, 'ConstraintHighlight': highlight } + + def _generate_y_target(self) -> list: + return [0, 0.16, 1000, 0.165, 10000, 0.17] + + def process(self, config: dict, images: list, outputs: dict) -> dict: + output = {} + + output['AeMeteringMode'] = self._generate_metering_modes() + output['AeExposureMode'] = self._generate_exposure_modes() + output['AeConstraintMode'] = self._generate_constraint_modes() + output['relativeLuminanceTarget'] = self._generate_y_target() + + # \todo Debug functionality + + return output From patchwork Wed May 29 19:42:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 20142 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 75BBFBDE6B for ; Wed, 29 May 2024 19:44:08 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 048C5634C8; Wed, 29 May 2024 21:44:08 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="c8tOAwZW"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 701DF634C2 for ; Wed, 29 May 2024 21:44:05 +0200 (CEST) Received: from neptunite.hamster-moth.ts.net (h175-177-049-156.catv02.itscom.jp [175.177.49.156]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0353B2D31; Wed, 29 May 2024 21:43:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1717011841; bh=nVO5rPCbzvVbHR4CyGheeYI4KRk2ybF5DKInajZN+yQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c8tOAwZWjs/EsrnGKUTHzoPrU5iz+cBunUEHDN9ZoSZ+xIyz0UtgltoZB4Q5NulCE xqtlFwvRyZOAWG63Jgjy3nCw3uPBYERy25mBAtLP+CXjpTJCGfMCUlDB07qRSx/psZ DZvQbcin8dg6ZdVkOpN2mGOP3Oa20boS+PmckcdE= From: Paul Elder To: libcamera-devel@lists.libcamera.org Cc: Paul Elder , Stefan Klug , Daniel Scally Subject: [PATCH v3 2/4] utils: tuning: rkisp1: Add skeletal AGC to the rkisp1 tuning script Date: Thu, 30 May 2024 04:42:49 +0900 Message-Id: <20240529194251.863689-3-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240529194251.863689-1-paul.elder@ideasonboard.com> References: <20240529194251.863689-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add the skeletal AGC module to the rkisp1 tuning script. For now it just spits out hardcoded values. Signed-off-by: Paul Elder Reviewed-by: Stefan Klug Reviewed-by: Daniel Scally --- No change in v3 Changes in v2: - remove hw_rev parameter from the rkisp1 agc tuning module, as the tuning file should support both hardware revisions simultaneously --- utils/tuning/rkisp1.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/tuning/rkisp1.py b/utils/tuning/rkisp1.py index 517c791e6..d0ce15d5e 100755 --- a/utils/tuning/rkisp1.py +++ b/utils/tuning/rkisp1.py @@ -11,6 +11,7 @@ import libtuning as lt from libtuning.parsers import YamlParser from libtuning.generators import YamlOutput from libtuning.modules.lsc import LSCRkISP1 +from libtuning.modules.agc import AGCRkISP1 tuner = lt.Tuner('RkISP1') tuner.add(LSCRkISP1( @@ -32,9 +33,10 @@ tuner.add(LSCRkISP1( # values. This can also be a custom function. smoothing_function=lt.smoothing.MedianBlur(3), )) +tuner.add(AGCRkISP1(debug=[lt.Debug.Plot])) tuner.set_input_parser(YamlParser()) tuner.set_output_formatter(YamlOutput()) -tuner.set_output_order([LSCRkISP1]) +tuner.set_output_order([AGCRkISP1, LSCRkISP1]) if __name__ == '__main__': sys.exit(tuner.run(sys.argv)) From patchwork Wed May 29 19:42:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 20143 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 CE355C32C8 for ; Wed, 29 May 2024 19:44:09 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2BB2B634CA; Wed, 29 May 2024 21:44:09 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="QXJMVWCC"; dkim-atps=neutral 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 475046347E for ; Wed, 29 May 2024 21:44:07 +0200 (CEST) Received: from neptunite.hamster-moth.ts.net (h175-177-049-156.catv02.itscom.jp [175.177.49.156]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 24FB12D5D; Wed, 29 May 2024 21:44:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1717011843; bh=9IxEWkZbwQqaizoHJawuveQaiiZwuPXi1L4OgFqTLy4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QXJMVWCC0mScOAaLJhWzH/5VHJnCKHottJOCMlBrnudo5UwI6JhYs8aJuS8oP4fYO ObbKJaZLZIBsGPV1L29hlouSd3NFAn9HzpzKnQUN/YzKF4GLcky5T9z21e0dbNEqqm 6rYviiIlNw2aytFCP+pdgILePiymbJkLcdDU8nIE= From: Paul Elder To: libcamera-devel@lists.libcamera.org Cc: Paul Elder , Daniel Scally , Stefan Klug Subject: [PATCH v3 3/4] utils: libtuning: modules: Add skeletal CCM module Date: Thu, 30 May 2024 04:42:50 +0900 Message-Id: <20240529194251.863689-4-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240529194251.863689-1-paul.elder@ideasonboard.com> References: <20240529194251.863689-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add a skeletal CCM module just so that we can have some CCM tuning values that we can use to test during development of CCM in the IPAs. As rkisp1 is the main target, we only add support for rkisp1 for now. The parameters are copied from the hardcoded values in ctt, except for the offsets, which are all set to zero. Signed-off-by: Paul Elder Reviewed-by: Daniel Scally Reviewed-by: Stefan Klug --- Changes in v3: - remove the unused compatible string - fix the commit message Changes in v2: - move converting floating to fixed point from the tuning script to the IPA - reorganize the ccm list to mirror the format of lsc - add offset vectors --- .../tuning/libtuning/modules/ccm/__init__.py | 6 ++ utils/tuning/libtuning/modules/ccm/ccm.py | 22 +++++ utils/tuning/libtuning/modules/ccm/rkisp1.py | 87 +++++++++++++++++++ 3 files changed, 115 insertions(+) create mode 100644 utils/tuning/libtuning/modules/ccm/__init__.py create mode 100644 utils/tuning/libtuning/modules/ccm/ccm.py create mode 100644 utils/tuning/libtuning/modules/ccm/rkisp1.py diff --git a/utils/tuning/libtuning/modules/ccm/__init__.py b/utils/tuning/libtuning/modules/ccm/__init__.py new file mode 100644 index 000000000..322602afe --- /dev/null +++ b/utils/tuning/libtuning/modules/ccm/__init__.py @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2024, Paul Elder + +from libtuning.modules.ccm.ccm import CCM +from libtuning.modules.ccm.rkisp1 import CCMRkISP1 diff --git a/utils/tuning/libtuning/modules/ccm/ccm.py b/utils/tuning/libtuning/modules/ccm/ccm.py new file mode 100644 index 000000000..7ddf0a8ca --- /dev/null +++ b/utils/tuning/libtuning/modules/ccm/ccm.py @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (C) 2019, Raspberry Pi Ltd +# Copyright (C) 2024, Paul Elder + +from ..module import Module + +import libtuning as lt +import libtuning.utils as utils + +import numpy as np + +class CCM(Module): + type = 'ccm' + hr_name = 'CCM (Base)' + out_name = 'GenericCCM' + + def __init__(self, *, + debug: list): + super().__init__() + + self.debug = debug diff --git a/utils/tuning/libtuning/modules/ccm/rkisp1.py b/utils/tuning/libtuning/modules/ccm/rkisp1.py new file mode 100644 index 000000000..fe3d7056b --- /dev/null +++ b/utils/tuning/libtuning/modules/ccm/rkisp1.py @@ -0,0 +1,87 @@ +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (C) 2019, Raspberry Pi Ltd +# Copyright (C) 2024, Paul Elder +# +# rkisp1.py - Ccm module for tuning rkisp1 + +from .ccm import CCM + +import libtuning as lt +import libtuning.utils as utils + +from numbers import Number +import numpy as np + + +class CCMRkISP1(CCM): + hr_name = 'Crosstalk Correction (RkISP1)' + out_name = 'Ccm' + + def __init__(self, **kwargs): + super().__init__(**kwargs) + + # We don't actually need anything from the config file + def validate_config(self, config: dict) -> bool: + return True + + def _generate_ccms(self) -> dict: + ccms = [ + { + 'ct': 2860, + 'ccm': [ 2.12089, -0.52461, -0.59629, + -0.85342, 2.80445, -0.95103, + -0.26897, -1.14788, 2.41685 ], + 'offsets': [ 0, 0, 0 ] + }, + + { + 'ct': 2960, + 'ccm': [ 2.26962, -0.54174, -0.72789, + -0.77008, 2.60271, -0.83262, + -0.26036, -1.51254, 2.77289 ], + 'offsets': [ 0, 0, 0 ] + }, + + { + 'ct': 3603, + 'ccm': [ 2.18644, -0.66148, -0.52496, + -0.77828, 2.69474, -0.91645, + -0.25239, -0.83059, 2.08298 ], + 'offsets': [ 0, 0, 0 ] + }, + + { + 'ct': 4650, + 'ccm': [ 2.18174, -0.70887, -0.47287, + -0.70196, 2.76426, -1.06231, + -0.25157, -0.71978, 1.97135 ], + 'offsets': [ 0, 0, 0 ] + }, + + { + 'ct': 5858, + 'ccm': [ 2.32392, -0.88421, -0.43971, + -0.63821, 2.58348, -0.94527, + -0.28541, -0.54112, 1.82653 ], + 'offsets': [ 0, 0, 0 ] + }, + + { + 'ct': 7580, + 'ccm': [ 2.21175, -0.53242, -0.67933, + -0.57875, 3.07922, -1.50047, + -0.27709, -0.73338, 2.01048 ], + 'offsets': [ 0, 0, 0 ] + }, + ] + + return ccms + + def process(self, config: dict, images: list, outputs: dict) -> dict: + output = {} + + output['ccms'] = self._generate_ccms() + # \todo Debug functionality + + return output From patchwork Wed May 29 19:42:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 20144 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 D68ADBDE6B for ; Wed, 29 May 2024 19:44:13 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8BD67634BE; Wed, 29 May 2024 21:44:13 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="uf3UuiUn"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6A1F0634CD for ; Wed, 29 May 2024 21:44:09 +0200 (CEST) Received: from neptunite.hamster-moth.ts.net (h175-177-049-156.catv02.itscom.jp [175.177.49.156]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 45D4E2D31; Wed, 29 May 2024 21:44:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1717011845; bh=Hju9W8J1Vc8PB6YVvbsEqWOO0/IfdGb8ebuzysxABl0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uf3UuiUnKg4KcKHaNBzW4wc+0vxwkTS5OGbMOIqqaKfP55pam7b1JlVlYF6yrx9Y8 /1b+cy5yrTTk0vg4oCCMlo6oUBCuBjePPR5wVFOAzrGuqxlYTKbXtownmkd7Ice5ST hqlYIYgpqwhKkCWgGD8tgZ9azb8afZILbXUTekhA= From: Paul Elder To: libcamera-devel@lists.libcamera.org Cc: Paul Elder , Stefan Klug , Daniel Scally Subject: [PATCH v3 4/4] utils: tuning: rkisp1: Add skeletal CCM to the rkisp1 tuning script Date: Thu, 30 May 2024 04:42:51 +0900 Message-Id: <20240529194251.863689-5-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240529194251.863689-1-paul.elder@ideasonboard.com> References: <20240529194251.863689-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add the skeletal CCM module to the rkisp1 tuning script. For now it just spits out hardcoded values. Signed-off-by: Paul Elder Reviewed-by: Stefan Klug Reviewed-by: Daniel Scally --- Changes in v3: - fix the commit message No change in v2 --- utils/tuning/rkisp1.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/tuning/rkisp1.py b/utils/tuning/rkisp1.py index d0ce15d5e..efb80da05 100755 --- a/utils/tuning/rkisp1.py +++ b/utils/tuning/rkisp1.py @@ -12,6 +12,7 @@ from libtuning.parsers import YamlParser from libtuning.generators import YamlOutput from libtuning.modules.lsc import LSCRkISP1 from libtuning.modules.agc import AGCRkISP1 +from libtuning.modules.ccm import CCMRkISP1 tuner = lt.Tuner('RkISP1') tuner.add(LSCRkISP1( @@ -34,9 +35,10 @@ tuner.add(LSCRkISP1( smoothing_function=lt.smoothing.MedianBlur(3), )) tuner.add(AGCRkISP1(debug=[lt.Debug.Plot])) +tuner.add(CCMRkISP1(debug=[lt.Debug.Plot])) tuner.set_input_parser(YamlParser()) tuner.set_output_formatter(YamlOutput()) -tuner.set_output_order([AGCRkISP1, LSCRkISP1]) +tuner.set_output_order([AGCRkISP1, LSCRkISP1, CCMRkISP1]) if __name__ == '__main__': sys.exit(tuner.run(sys.argv))