Show a patch.

GET /api/1.1/patches/23299/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 23299,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/23299/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23299/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20250429124806.138056-2-isaac.scott@ideasonboard.com>",
    "date": "2025-04-29T12:48:06",
    "name": "[1/1] libipa: Allow disabling algorithms via the tuning file",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "26829309fc08354ba2029634ff9fa7a062ffc6c2",
    "submitter": {
        "id": 215,
        "url": "https://patchwork.libcamera.org/api/1.1/people/215/?format=api",
        "name": "Isaac Scott",
        "email": "isaac.scott@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/23299/mbox/",
    "series": [
        {
            "id": 5152,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5152/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5152",
            "date": "2025-04-29T12:48:05",
            "name": "Allow algorithms to be disabled via the tuning file",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5152/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23299/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23299/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<kieran.bingham@ideasonboard.com>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": [
            "parsemail@patchwork.libcamera.org",
            "kbingham@ideasonboard.com"
        ],
        "Received": [
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 56752C327D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 29 Apr 2025 13:03:20 +0000 (UTC)",
            "from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net\n\t[86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B17C2AF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 29 Apr 2025 15:03:14 +0200 (CEST)",
            "from perceval.ideasonboard.com\n\tby perceval.ideasonboard.com with LMTP id kDGJN5DKEGgOLzgA4E0KoQ\n\t(envelope-from <libcamera-devel-bounces@lists.libcamera.org>)\n\tfor <kbingham@ideasonboard.com>; Tue, 29 Apr 2025 14:48:16 +0200",
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\tby perceval.ideasonboard.com (Postfix) with ESMTPS\n\tid 5E4204CE;\tTue, 29 Apr 2025 14:48:16 +0200 (CEST)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AA41B68ADB;\n\tTue, 29 Apr 2025 14:48:20 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2C321617DC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 29 Apr 2025 14:48:17 +0200 (CEST)",
            "from isaac-ThinkPad-T16-Gen-2.lan\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 82C07AF;\n\tTue, 29 Apr 2025 14:48:11 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1745931794;\n\tbh=KbS3mukcgnOPMc4hFmFPVUJylIR4G9rs7QD+GbSrbAY=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id:\n\tList-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:\n\tResent-From:Resent-To:From;\n\tb=s7VlSk58OYIqSIrM74o4iu0zvrEqUThJqlKDtj74r15iNiGG9XLS0icbGFBSCIoF8\n\tZ2FKRsgpEjAVebesoZNOzR6A7TVH5KHdRh7IYNvy3GZI3vHh45ZoRT7/f6a3iE9XP4\n\tNMo+eEy7cSRDSEN+Jj6aQ08omk48P0MeKNuYZ+DU=",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1745930891;\n\tbh=KbS3mukcgnOPMc4hFmFPVUJylIR4G9rs7QD+GbSrbAY=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Vfv18LO2BobyPHkKe3Iuk3ltjE5kncSOROMvveSRFZUMBdYfGDjjtW3AK4JIicfRP\n\tvxYu6YqySVsK+KCMECqd+2R4PfGFqtuMwdwsL2eOkiFnPyagGGd4Wov3C+1KbFUKmU\n\tVgR4oSPBmIDmnmLMWYAECidANgBg3Keu8m0C57WY="
        ],
        "Authentication-Results": [
            "perceval.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.a=rsa-sha256 header.s=mail header.b=Vfv18LO2; dkim-atps=neutral",
            "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"Vfv18LO2\";\tdkim-atps=neutral"
        ],
        "From": "Isaac Scott <isaac.scott@ideasonboard.com>",
        "To": "libcamera devel <libcamera-devel@lists.libcamera.org>",
        "Cc": "Isaac Scott <isaac.scott@ideasonboard.com>",
        "Subject": "[PATCH 1/1] libipa: Allow disabling algorithms via the tuning file",
        "Date": "Tue, 29 Apr 2025 13:48:06 +0100",
        "Message-ID": "<20250429124806.138056-2-isaac.scott@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20250429124806.138056-1-isaac.scott@ideasonboard.com>",
        "References": "<20250429124806.138056-1-isaac.scott@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>",
        "X-TUID": "4hdkPGZyiZG3",
        "Resent-From": "Kieran Bingham <kieran.bingham@ideasonboard.com>",
        "Resent-To": "parsemail@patchwork.libcamera.org"
    },
    "content": "Allows the user to add \"disabled\" as a parameter in their tuning file,\nwhich lets them test disabling algorithms without having to delete them.\n\nUsage example:\n\nversion: 1\nalgorithms:\n  - Agc:\n      disabled:\n      AeMeteringMode:\n        MeteringCentreWeighted: [ 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 ]\n        MeteringSpot: [ 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 ]\n        MeteringMatrix: [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n      AeExposureMode:\n\nThis example will disable the Agc algorithm.\n\nSigned-off-by: Isaac Scott <isaac.scott@ideasonboard.com>\n---\n src/ipa/libipa/module.h | 7 +++++++\n 1 file changed, 7 insertions(+)",
    "diff": "diff --git a/src/ipa/libipa/module.h b/src/ipa/libipa/module.h\nindex 0fb51916..86cc382b 100644\n--- a/src/ipa/libipa/module.h\n+++ b/src/ipa/libipa/module.h\n@@ -74,6 +74,13 @@ private:\n \tint createAlgorithm(Context &context, const YamlObject &data)\n \t{\n \t\tconst auto &[name, algoData] = *data.asDict().begin();\n+\t\tif (algoData.contains(\"disabled\")) {\n+\t\t\tLOG(IPAModuleAlgo, Debug)\n+\t\t\t\t<< \"Algorithm \" << name << \" is disabled\"\n+\t\t\t\t<< \" in the tuning file!\";\n+\t\t\t/* If we return an error code, the IPA does not work */\n+\t\t\treturn 0;\n+\t\t}\n \t\tstd::unique_ptr<Algorithm<Module>> algo = createAlgorithm(name);\n \t\tif (!algo) {\n \t\t\tLOG(IPAModuleAlgo, Error)\n",
    "prefixes": [
        "1/1"
    ]
}