{"id":20609,"url":"https://patchwork.libcamera.org/api/patches/20609/?format=json","web_url":"https://patchwork.libcamera.org/patch/20609/","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":"<20240705144209.418906-21-stefan.klug@ideasonboard.com>","date":"2024-07-05T14:41:56","name":"[v4,20/23] tuning: rkisp1: Add some static modules","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"73ae75baca05d48871e36cb5f8ffe72b685581a3","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/people/184/?format=json","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/20609/mbox/","series":[{"id":4446,"url":"https://patchwork.libcamera.org/api/series/4446/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4446","date":"2024-07-05T14:41:36","name":"Add ccm calibration to libtuning","version":4,"mbox":"https://patchwork.libcamera.org/series/4446/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/20609/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/20609/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 8EB58BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  5 Jul 2024 14:43:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 39DDD63372;\n\tFri,  5 Jul 2024 16:43:07 +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 788AA63367\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  5 Jul 2024 16:43:04 +0200 (CEST)","from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:60b6:33a3:3a20:6030])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id ECF0B4CC;\n\tFri,  5 Jul 2024 16:42:34 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Dgkv+Qqf\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1720190555;\n\tbh=HM13yj/E/MbjeNSkEMeGwLwbNhbgFCmUhpbdNuqcNs0=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Dgkv+QqfMaaV6r0jWnYUtip8chJao3E7FIlN7Ff5V6FyYAkvJSCk2drJ96L234Da+\n\txCPRgSynKZXzFgJCnujzFQ8oxCfPn/KfZc1Ok73EOo7fdAfY+mZfzT2tagFxr/jfwv\n\tz5UAKpp7YMBubID8Gxp5vh1aL01uuLYB02Zb6VjI=","From":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Stefan Klug <stefan.klug@ideasonboard.com>,\n\tPaul Elder <paul.elder@ideasonboard.com>","Subject":"[PATCH v4 20/23] tuning: rkisp1: Add some static modules","Date":"Fri,  5 Jul 2024 16:41:56 +0200","Message-ID":"<20240705144209.418906-21-stefan.klug@ideasonboard.com>","X-Mailer":"git-send-email 2.43.0","In-Reply-To":"<20240705144209.418906-1-stefan.klug@ideasonboard.com>","References":"<20240705144209.418906-1-stefan.klug@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","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":"Add awb, blc, cproc, filter, and gamma to the tuning file.  These don't\nneed any configuration.\n\nAt the moment there are no inter-module dependencies in the tuning\nprocess. We can therefore safely sort them alphabetically. As soon as\nthe first dependency gets introduced (most likely lsc -> ccm) we will\nsee how to solve that.\n\nThe output order controls the order of processing in the IPA. It is now\nalso in alphabetical order which happens to be no change for the modules\nthat existed previously. For the others, there is no need for a specific\norder.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n utils/tuning/rkisp1.py | 21 +++++++++++++++++----\n 1 file changed, 17 insertions(+), 4 deletions(-)","diff":"diff --git a/utils/tuning/rkisp1.py b/utils/tuning/rkisp1.py\nindex fae35783c656..0d279a39ab1b 100755\n--- a/utils/tuning/rkisp1.py\n+++ b/utils/tuning/rkisp1.py\n@@ -15,11 +15,24 @@ from libtuning.generators import YamlOutput\n from libtuning.modules.lsc import LSCRkISP1\n from libtuning.modules.agc import AGCRkISP1\n from libtuning.modules.ccm import CCMRkISP1\n-\n+from libtuning.modules.static import StaticModule\n \n coloredlogs.install(level=logging.INFO, fmt='%(name)s %(levelname)s %(message)s')\n \n+awb = StaticModule('Awb')\n+blc = StaticModule('BlackLevelCorrection')\n+color_processing = StaticModule('ColorProcessing')\n+filter = StaticModule('Filter')\n+gamma_out = StaticModule('GammaOutCorrection', {'gamma': 2.2})\n+\n tuner = lt.Tuner('RkISP1')\n+tuner.add(AGCRkISP1(debug=[lt.Debug.Plot]))\n+tuner.add(awb)\n+tuner.add(blc)\n+tuner.add(CCMRkISP1(debug=[lt.Debug.Plot]))\n+tuner.add(color_processing)\n+tuner.add(filter)\n+tuner.add(gamma_out)\n tuner.add(LSCRkISP1(\n           debug=[lt.Debug.Plot],\n           # This is for the actual LSC tuning, and is part of the base LSC\n@@ -39,11 +52,11 @@ tuner.add(LSCRkISP1(\n           # values.  This can also be a custom function.\n           smoothing_function=lt.smoothing.MedianBlur(3),\n           ))\n-tuner.add(AGCRkISP1(debug=[lt.Debug.Plot]))\n-tuner.add(CCMRkISP1(debug=[lt.Debug.Plot]))\n+\n tuner.set_input_parser(YamlParser())\n tuner.set_output_formatter(YamlOutput())\n-tuner.set_output_order([AGCRkISP1, CCMRkISP1, LSCRkISP1])\n+tuner.set_output_order([AGCRkISP1, awb, blc, CCMRkISP1, color_processing,\n+                        filter, gamma_out, LSCRkISP1])\n \n if __name__ == '__main__':\n     sys.exit(tuner.run(sys.argv))\n","prefixes":["v4","20/23"]}