{"id":17661,"url":"https://patchwork.libcamera.org/api/1.1/patches/17661/?format=json","web_url":"https://patchwork.libcamera.org/patch/17661/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20221022062310.2545463-11-paul.elder@ideasonboard.com>","date":"2022-10-22T06:23:09","name":"[libcamera-devel,v2,10/11,DNI] utils: tuning: Add full libtuning raspberrypi tuning script","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"fafac785353f688b443dbc6fdb7043e32cb887f2","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/1.1/people/17/?format=json","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/17661/mbox/","series":[{"id":3573,"url":"https://patchwork.libcamera.org/api/1.1/series/3573/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3573","date":"2022-10-22T06:22:59","name":"utils: tuning: Add a new tuning infrastructure","version":2,"mbox":"https://patchwork.libcamera.org/series/3573/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/17661/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/17661/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 35D71C327C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 22 Oct 2022 06:23:42 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A89C262EEC;\n\tSat, 22 Oct 2022 08:23:41 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A68FE62EC6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 22 Oct 2022 08:23:38 +0200 (CEST)","from pyrite.rasen.tech (h175-177-042-159.catv02.itscom.jp\n\t[175.177.42.159])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 55E7A106;\n\tSat, 22 Oct 2022 08:23:37 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1666419821;\n\tbh=okeMoeWqj1EblqU83DqjMjkYekp8+PSq3UnXEZT98fo=;\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=uo0fpgJOcRRrU+Zk9868go8qVAixnrutDOK1B1o/Tno/cpkzI40RR77hhHm7At0CN\n\tlySX2e2heQ9E4YPrJVw8R9vlPtTQGBzjK/t1NYDFhXmyw9WcfC1h/KATWXBntqulR5\n\tA9fvNGYCxGDdV6vIL7Q0zPHuzKqi5joVC58ooaJyo0NNv4s96SyF/pCmeZ/A+MR/Eg\n\t9PsKGeIRFn8oRjKxi4p0U8FEEYNM2adP3bnHEncYtlanciPLQ5xKJQWUo3DEXeVyHO\n\tsRR9CCQG7k1fU1pp5hezskrycoyhuwRzH1+mcIhJ5ivI4OuqREakLI4tnaqBBhHyb9\n\tLI6d0SIrJcCsA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1666419818;\n\tbh=okeMoeWqj1EblqU83DqjMjkYekp8+PSq3UnXEZT98fo=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=JkwzhaG8xaD5Yptpv8OnJ6YTPRzQdyAhQ4Pizwb1F7XIvZCg6CFy3LQmG+TTcXDyB\n\th0U/34oYodnKmBPHYUIUDsQ85wJ6xP90u7/0bJCn7f0oLi8puGvSNm6OrENQQCZ29Y\n\tnvpNF15YWcGJSR4Y6mJOQHQ7iLR5mOO57301VJUE="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"JkwzhaG8\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Sat, 22 Oct 2022 15:23:09 +0900","Message-Id":"<20221022062310.2545463-11-paul.elder@ideasonboard.com>","X-Mailer":"git-send-email 2.30.2","In-Reply-To":"<20221022062310.2545463-1-paul.elder@ideasonboard.com>","References":"<20221022062310.2545463-1-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 10/11] [DNI] utils: tuning: Add full\n\tlibtuning raspberrypi tuning script","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":"Paul Elder via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Paul Elder <paul.elder@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Add a tuning script for raspberrypi that uses libtuning. This reproduces\nwhat ctt does (albeit with less logging for now), but with common\ncomponents factored out into libtuning so that tuning scripts for other\nplatforms can reuse them.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n\n---\nChanges in v2:\n- add SPDX and copyright\n\nThis is incomplete, hence the DNI.\n---\n utils/tuning/raspberrypi.py | 44 +++++++++++++++++++++++++++++++++++++\n 1 file changed, 44 insertions(+)\n create mode 100644 utils/tuning/raspberrypi.py","diff":"diff --git a/utils/tuning/raspberrypi.py b/utils/tuning/raspberrypi.py\nnew file mode 100644\nindex 00000000..8e963743\n--- /dev/null\n+++ b/utils/tuning/raspberrypi.py\n@@ -0,0 +1,44 @@\n+#!/usr/bin/env python3\n+# SPDX-License-Identifier: GPL-2.0-or-later\n+#\n+# Copyright (C) 2022, Paul Elder <paul.elder@ideasonboard.com>\n+#\n+# raspberrypi.py - Tuning script for raspberrypi\n+\n+import sys\n+\n+import libtuning as lt\n+from libtuning.modules import AWB\n+from libtuning.parsers import RaspberryPiParser\n+from libtuning.generators import RaspberryPiOutput\n+\n+from raspberrypi.alsc import ALSC\n+\n+tuner = lt.Camera('Raspberry Pi')\n+\n+# These modules can also be custom modules. libtuning will come with utilities\n+# for handling stuff like images, so there shouldn't be too much boilerplate\n+# involved in creating custom modules, though I don't yet have a concrete\n+# vision on how custom implementations of modules would look.\n+tuner.add(ALSC)\n+\n+# Other tuning modules can be added like so.\n+# The order that the tuning modules will be executed is determined by the order\n+# that they're added.\n+# This is kind of an implementation detail, but the \"context\" is saved\n+# internally in lt.Camera, so modules that are added (and therefore executed)\n+# later can use the output of the previous modules. I'm thinking that a module\n+# that depends on values from another module has two modes of execution, for\n+# when those values are available and another for when they're not. Not quite\n+# sure concretely how to handle this yet.\n+tuner.add(AWB(  # module parameters\n+))\n+\n+tuner.setInputType(RaspberryPiParser)\n+tuner.setOutputType(RaspberryPiOutput)\n+\n+# The order of the output doesn't necessarily have to be the same as the order\n+# of input, which is specified by the order of adding the modules above.\n+tuner.setOutputOrder([AWB, ALSC])\n+\n+tuner.run(sys.argv)\n","prefixes":["libcamera-devel","v2","10/11","DNI"]}