Patch Detail
Show a patch.
GET /api/patches/17880/?format=api
{ "id": 17880, "url": "https://patchwork.libcamera.org/api/patches/17880/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17880/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20221124113849.2193579-2-paul.elder@ideasonboard.com>", "date": "2022-11-24T11:38:44", "name": "[libcamera-devel,1/6] utils: libtuning: module: Prepare per-module debugging infrastructure", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "bcb4d5a3cf201852618698f5aa2d788b5d82ae40", "submitter": { "id": 17, "url": "https://patchwork.libcamera.org/api/people/17/?format=api", "name": "Paul Elder", "email": "paul.elder@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/17880/mbox/", "series": [ { "id": 3637, "url": "https://patchwork.libcamera.org/api/series/3637/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3637", "date": "2022-11-24T11:38:43", "name": "utils: tuning: Add per-module debugging", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3637/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17880/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17880/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 C14ECBE08B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 24 Nov 2022 11:39:04 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8CF4E6331E;\n\tThu, 24 Nov 2022 12:39:04 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5543C63313\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Nov 2022 12:39:02 +0100 (CET)", "from pyrite.tail37cf.ts.net (h175-177-042-159.catv02.itscom.jp\n\t[175.177.42.159])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1EF34496;\n\tThu, 24 Nov 2022 12:39:00 +0100 (CET)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1669289944;\n\tbh=GNpywXg/yKexz4YE18N9donLS2yBn68Rnq+bjYOsli0=;\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=yqnvgLx36oLlPb73NLHOlyLmtloNErnuHg0cEgWybiirYawvaSW+1wgXaJYFiNfJt\n\tp1TbQLbyg0L/3iuUjSUdh9554jMrk/cSjnx3uSH85iUD1A5GDzU/cC+r96ilRnpFGl\n\ty06Q3UGgwV3Swct8YePfiB+yVoNgxLj3x5pJC0VTuwpZdK82n0F4OOXaqPpyTC1ZCk\n\tVGYdSY9i7lt8bv8zaleVmJ6nkODXpaVjCIzT+GQiDXUuT0KqTQ3hsc2qCEDRk2aety\n\tpl58Hb+q2vDKo1rNXxHtomJgUt3PE/AZDlAiKLcyWP8TsyaAY7tcxKjL7BmdYIAX52\n\tE2rNDu0EnNXtQ==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1669289942;\n\tbh=GNpywXg/yKexz4YE18N9donLS2yBn68Rnq+bjYOsli0=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=feIdwJG3IMsjHZEIdUFh9BbJ5PivlS/ZRQg+F2+A/k56Sr8BOk5Si6UFOtUq6HZoA\n\thq8AApdXi1Fq5vXH5kISX1xj06RtNNAXoe9xw5tW5tHt9et6Tc88TUFw2LSAoS5ly7\n\tMU3r5CxxH688VVK6p7rCiaQezQ+JUgInIn0N+Hwo=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"feIdwJG3\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 24 Nov 2022 20:38:44 +0900", "Message-Id": "<20221124113849.2193579-2-paul.elder@ideasonboard.com>", "X-Mailer": "git-send-email 2.35.1", "In-Reply-To": "<20221124113849.2193579-1-paul.elder@ideasonboard.com>", "References": "<20221124113849.2193579-1-paul.elder@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 1/6] utils: libtuning: module: Prepare\n\tper-module debugging infrastructure", "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": "Prepare for per-module debugging infrastructure in the base Module\nclass. The debug parameter will be provided from a command line argument\nas opposed to from the tuning script as was originally planned.\n\nRemove the debug parameter from the LSC constructor (it is the only\nmodule that we have so far). As the debug parameter currently does not\ndo anything, no regression is introduced.\n\nUpdate the tuning scripts accordingly.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n utils/tuning/libtuning/modules/lsc/lsc.py | 3 ---\n utils/tuning/libtuning/modules/module.py | 6 ++++++\n utils/tuning/raspberrypi/alsc.py | 1 -\n utils/tuning/rkisp1.py | 1 -\n 4 files changed, 6 insertions(+), 5 deletions(-)", "diff": "diff --git a/utils/tuning/libtuning/modules/lsc/lsc.py b/utils/tuning/libtuning/modules/lsc/lsc.py\nindex 344a07a3..f54ca8be 100644\n--- a/utils/tuning/libtuning/modules/lsc/lsc.py\n+++ b/utils/tuning/libtuning/modules/lsc/lsc.py\n@@ -17,7 +17,6 @@ class LSC(Module):\n out_name = 'GenericLSC'\n \n def __init__(self, *,\n- debug: list,\n sector_shape: tuple,\n sector_x_gradient: lt.Gradient,\n sector_y_gradient: lt.Gradient,\n@@ -25,8 +24,6 @@ class LSC(Module):\n smoothing_function: lt.Smoothing):\n super().__init__()\n \n- self.debug = debug\n-\n self.sector_shape = sector_shape\n self.sector_x_gradient = sector_x_gradient\n self.sector_y_gradient = sector_y_gradient\ndiff --git a/utils/tuning/libtuning/modules/module.py b/utils/tuning/libtuning/modules/module.py\nindex 12e2fc7c..b4ad0625 100644\n--- a/utils/tuning/libtuning/modules/module.py\n+++ b/utils/tuning/libtuning/modules/module.py\n@@ -4,6 +4,8 @@\n #\n # module.py - Base class for algorithm-specific tuning modules\n \n+from pathlib import Path\n+\n \n # @var type Type of the module. Defined in the base module.\n # @var out_name The key that will be used for the algorithm in the algorithms\n@@ -15,8 +17,12 @@ class Module(object):\n out_name = 'GenericAlgorithm'\n \n def __init__(self):\n+ self.debug = None\n pass\n \n+ def enable_debug(self, output_dir: Path):\n+ self.debug = output_dir\n+\n def validate_config(self, config: dict) -> bool:\n raise NotImplementedError\n \ndiff --git a/utils/tuning/raspberrypi/alsc.py b/utils/tuning/raspberrypi/alsc.py\nindex 024eb5a3..4dc5f5ba 100644\n--- a/utils/tuning/raspberrypi/alsc.py\n+++ b/utils/tuning/raspberrypi/alsc.py\n@@ -10,7 +10,6 @@ from libtuning.modules.lsc import ALSCRaspberryPi\n ALSC = \\\n ALSCRaspberryPi(do_color=lt.Param('do_alsc_colour', lt.Param.Mode.Optional, True),\n luminance_strength=lt.Param('luminance_strength', lt.Param.Mode.Optional, 0.5),\n- debug=[lt.Debug.Plot],\n sector_shape=(16, 12),\n sector_x_gradient=lt.gradient.Linear(lt.Remainder.DistributeFront),\n sector_y_gradient=lt.gradient.Linear(lt.Remainder.DistributeFront),\ndiff --git a/utils/tuning/rkisp1.py b/utils/tuning/rkisp1.py\nindex 1cea6ddb..43b4b190 100755\n--- a/utils/tuning/rkisp1.py\n+++ b/utils/tuning/rkisp1.py\n@@ -14,7 +14,6 @@ from libtuning.modules.lsc import LSCRkISP1\n \n tuner = lt.Tuner('RkISP1')\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 # module. rkisp1's table sector sizes (16x16 programmed as mirrored\n # 8x8) are separate, and is hardcoded in its specific LSC tuning\n", "prefixes": [ "libcamera-devel", "1/6" ] }