{"id":17652,"url":"https://patchwork.libcamera.org/api/covers/17652/?format=json","web_url":"https://patchwork.libcamera.org/cover/17652/","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":"<20221022062310.2545463-1-paul.elder@ideasonboard.com>","date":"2022-10-22T06:22:59","name":"[libcamera-devel,v2,00/11] utils: tuning: Add a new tuning infrastructure","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/?format=json","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/cover/17652/mbox/","series":[{"id":3573,"url":"https://patchwork.libcamera.org/api/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/covers/17652/comments/","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 DF313C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 22 Oct 2022 06:23:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 18D8262EC6;\n\tSat, 22 Oct 2022 08:23:23 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DF91F61F51\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 22 Oct 2022 08:23:20 +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 523DE106;\n\tSat, 22 Oct 2022 08:23:19 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1666419803;\n\tbh=FhneLda9TqzA9v/1BCMsyNYoXUd+/PSlMi4oLZdjCNs=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=BWQFKeNkepS9PWhSx4j5xAXm17dRnva7ZIPkhIQjlqAie3otFaXEiSQzwM9aSLEl/\n\tdDfAlBHrxwHC3rZUm95pZkW8r4cgQr8pFpS2NBjcRFsTAcOJnucenrNAa3lCPyKbqa\n\thJlWYBdv/ij7HbSmCj35qwV5+lMq86kv89V8iNzrxpBDg8rhCqRM/Nivc6Dh1ZiLKq\n\tKW0J6Fd0KhtdqFnk3M5Tgf2shf5myEql2kocL8uZ+4OnxgDEaZ1LLGcOQHbu/eSasK\n\tkl1G/GksALcIkSLipMWBA027fittyxZv6Kjm5fDUViVy/t6fhjpSbXYgoawSUMY9aI\n\t8yLEGC3+6Cuiw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1666419800;\n\tbh=FhneLda9TqzA9v/1BCMsyNYoXUd+/PSlMi4oLZdjCNs=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=fIZI97AUUasMggyRAov9JUL0ckNpdTIWeB/mutgLq8IGcuACN2AfnBl82Lc17j9tm\n\tTXl7QHO2aj7oq3yccbT/oEwW+ET+4rV9dJ2zzymY+h30SEO9g1RjNRmFHmIZw2Eo49\n\tBxI5XCsHVZlwbuvIPbBQJYHrkndAUi1bDkO4+N9w="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"fIZI97AU\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Sat, 22 Oct 2022 15:22:59 +0900","Message-Id":"<20221022062310.2545463-1-paul.elder@ideasonboard.com>","X-Mailer":"git-send-email 2.30.2","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 00/11] utils: tuning: Add a new tuning\n\tinfrastructure","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":"This patch series adds a new tuning infrastructure called libtuning,\ninspired by ctt.\n\nThe design modularizes common components of tuning tools such that\nnew tuning scripts for new platforms can be created easily, as show in\npatches 9/11 to 11/11.\n\nThe common \"core\" components include file management, argument\nparsing, image loading and validation, and macbeth chart detection, as\nwell as miscellaneous (but tedious) math utilities. It connects\neverything together such that a platform's tuning script can very easily\ncustomize tuning modules in a variety of ways, even including the format\nof the input configuration file and the output tuning file. These are\nall implemented in patch 1/7, as they are all interconnected.\n\nThe input configuration file and output tuning file could have different\nformats as well, hence why these have their own classes. As of v1, only\nthe raspberrypi's formats were implemented, in patches 5/11 and 6/11\nrespectively. As of v2, output for yaml is added in patch 8/11. A\nskeleton for yaml input is added as well in patch 7/11, though it is not\nimplemented yet as there is no specification for the yaml input\nconfiguration format, and the only existing user of it doesn't actually\nneed a configuration file.\n\nAs of v2, it became apparent that it was infeasible to create an ALSC\nmodule (that's what we're starting with) that could completely support\ndifferent platforms with configuration options alone. So, the ALSC\nmodule was split into a base one (patch 2/11), with variations for\nraspberrypi and rkisp1 implemented on top of it in patches 3/11 and 4/11\nrespectively. I think they came out quite nice, and they are still more\nmanageable than an entirely new tuning module per platform.\n\nI have also since managed to get test images and so this entire thing\nruns! Even though the rkisp1 tuning script (patch 11/11) says \"WIP\", it\ndoes run and outputs a valid tuning file. I haven't tried using the\ntuning file with libcamera though, as it is missng the /other/ algorithm\ntuning results.\n\nThe output from the libtuning-based alsc-only raspberrypi tuning script\n(patch 9/11) has been confirmed to be character-for-character exactly\nthe same as the output from ctt's alsc-only tuning script.\n\n\nPaul Elder (11):\n  utils: tuning: libtuning: Implement the core of libtuning\n  utils: libtuning: modules: Add ALSC module\n  utils: libtuning: modules: alsc: Add raspberrypi ALSC module\n  utils: libtuning: modules: alsc: Add rkisp1 ALSC module\n  utils: libtuning: parsers: Add raspberrypi parser\n  utils: libtuning: generators: Add raspberrypi output\n  [WIP] utils: libtuning: parsers: Add yaml parser\n  utils: libtuning: generators: Add yaml output\n  utils: tuning: Add alsc-only libtuning raspberrypi tuning script\n  [DNI] utils: tuning: Add full libtuning raspberrypi tuning script\n  [WIP] utils: tuning: Add tuning script for rkisp1\n\n utils/tuning/README.md                        |   7 +\n utils/tuning/libtuning/__init__.py            |  13 +\n utils/tuning/libtuning/average.py             |  22 +\n utils/tuning/libtuning/generators/__init__.py |   6 +\n .../tuning/libtuning/generators/generator.py  |  16 +\n .../generators/raspberrypi_output.py          | 115 ++++\n .../libtuning/generators/yaml_output.py       | 121 +++++\n utils/tuning/libtuning/gradient.py            | 109 ++++\n utils/tuning/libtuning/image.py               | 137 +++++\n utils/tuning/libtuning/libtuning.py           | 205 +++++++\n utils/tuning/libtuning/macbeth.py             | 505 ++++++++++++++++++\n utils/tuning/libtuning/macbeth_ref.pgm        |   6 +\n utils/tuning/libtuning/modules/__init__.py    |   0\n .../tuning/libtuning/modules/alsc/__init__.py |   7 +\n utils/tuning/libtuning/modules/alsc/alsc.py   |  78 +++\n .../libtuning/modules/alsc/raspberrypi.py     | 246 +++++++++\n utils/tuning/libtuning/modules/alsc/rkisp1.py | 112 ++++\n utils/tuning/libtuning/modules/module.py      |  48 ++\n utils/tuning/libtuning/parsers/__init__.py    |   6 +\n utils/tuning/libtuning/parsers/parser.py      |  22 +\n .../libtuning/parsers/raspberrypi_parser.py   |  91 ++++\n utils/tuning/libtuning/parsers/yaml_parser.py |  15 +\n utils/tuning/libtuning/smoothing.py           |  25 +\n utils/tuning/libtuning/utils.py               | 151 ++++++\n utils/tuning/raspberrypi.py                   |  44 ++\n utils/tuning/raspberrypi/__init__.py          |   0\n utils/tuning/raspberrypi/alsc.py              |  17 +\n utils/tuning/raspberrypi_alsc_only.py         |  22 +\n utils/tuning/rkisp1.py                        |  58 ++\n 29 files changed, 2204 insertions(+)\n create mode 100644 utils/tuning/README.md\n create mode 100644 utils/tuning/libtuning/__init__.py\n create mode 100644 utils/tuning/libtuning/average.py\n create mode 100644 utils/tuning/libtuning/generators/__init__.py\n create mode 100644 utils/tuning/libtuning/generators/generator.py\n create mode 100644 utils/tuning/libtuning/generators/raspberrypi_output.py\n create mode 100644 utils/tuning/libtuning/generators/yaml_output.py\n create mode 100644 utils/tuning/libtuning/gradient.py\n create mode 100644 utils/tuning/libtuning/image.py\n create mode 100644 utils/tuning/libtuning/libtuning.py\n create mode 100644 utils/tuning/libtuning/macbeth.py\n create mode 100644 utils/tuning/libtuning/macbeth_ref.pgm\n create mode 100644 utils/tuning/libtuning/modules/__init__.py\n create mode 100644 utils/tuning/libtuning/modules/alsc/__init__.py\n create mode 100644 utils/tuning/libtuning/modules/alsc/alsc.py\n create mode 100644 utils/tuning/libtuning/modules/alsc/raspberrypi.py\n create mode 100644 utils/tuning/libtuning/modules/alsc/rkisp1.py\n create mode 100644 utils/tuning/libtuning/modules/module.py\n create mode 100644 utils/tuning/libtuning/parsers/__init__.py\n create mode 100644 utils/tuning/libtuning/parsers/parser.py\n create mode 100644 utils/tuning/libtuning/parsers/raspberrypi_parser.py\n create mode 100644 utils/tuning/libtuning/parsers/yaml_parser.py\n create mode 100644 utils/tuning/libtuning/smoothing.py\n create mode 100644 utils/tuning/libtuning/utils.py\n create mode 100644 utils/tuning/raspberrypi.py\n create mode 100644 utils/tuning/raspberrypi/__init__.py\n create mode 100644 utils/tuning/raspberrypi/alsc.py\n create mode 100755 utils/tuning/raspberrypi_alsc_only.py\n create mode 100755 utils/tuning/rkisp1.py"}