Show a patch.

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

{
    "id": 25256,
    "url": "https://patchwork.libcamera.org/api/patches/25256/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/25256/",
    "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": "<20251127023739.179652-20-bryan.odonoghue@linaro.org>",
    "date": "2025-11-27T02:37:34",
    "name": "[v5,19/24] ipa: Add a new Algorithm::init() to support self-initalising algorithms",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "4b2aa67f0f47febb4837278cc2ddf6b434724493",
    "submitter": {
        "id": 175,
        "url": "https://patchwork.libcamera.org/api/people/175/?format=api",
        "name": "Bryan O'Donoghue",
        "email": "bryan.odonoghue@linaro.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/25256/mbox/",
    "series": [
        {
            "id": 5617,
            "url": "https://patchwork.libcamera.org/api/series/5617/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5617",
            "date": "2025-11-27T02:37:15",
            "name": "Add GLES 2.0 GPUISP to libcamera",
            "version": 5,
            "mbox": "https://patchwork.libcamera.org/series/5617/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/25256/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/25256/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 8368AC32DE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Nov 2025 02:38:28 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2E57A60C66;\n\tThu, 27 Nov 2025 03:38:28 +0100 (CET)",
            "from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com\n\t[IPv6:2a00:1450:4864:20::32c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0336460C66\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Nov 2025 03:38:25 +0100 (CET)",
            "by mail-wm1-x32c.google.com with SMTP id\n\t5b1f17b1804b1-4779aa4f928so2352635e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Nov 2025 18:38:25 -0800 (PST)",
            "from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie.\n\t[188.141.3.146]) by smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-4790552c3c9sm58186345e9.0.2025.11.26.18.38.22\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 26 Nov 2025 18:38:23 -0800 (PST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"Wmj+esZV\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1764211104; x=1764815904;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=16pZ/JdoiYUGtAtk/R99scAohK2wEjdJ1P32w9Duc1Y=;\n\tb=Wmj+esZVbEXhV3QaSG552fkvTS1RT0rvfh+IHPfmfQBY3BIDw9SPr451r6isHqiJv0\n\tErc59n2bQu277dnkKZHAYFj/z+MxM9sb9XlydFVgAs4AMl6ioVC29pXawgaODXG1Ii7R\n\t9VmzUZkBsor2wKAT1/H7u5t4deXgVEyP6ea6aiF1GXXf24hnqLgr5gncvyRGsXQhRDtM\n\thNxaEEO/j86k7jUL7MOTgXfdXRbPlD1Y6ZCUqMlhaYwAWYozzbnlSRpttrUmcOBIJ4CW\n\tWTINJ68yHXBTzqIXjtDB5CYws5uNXGJkYQKbSxNjV7C9Ik3Hgh9b/y5aJdZ7mntnpQ+f\n\t8ylw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1764211104; x=1764815904;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=16pZ/JdoiYUGtAtk/R99scAohK2wEjdJ1P32w9Duc1Y=;\n\tb=wXRuqVzmOpAOsVcuU+75qzTPirSIfI3UPVGVFtxgok1+iB57DpxtGVuIdOKwGyF2en\n\t9JbUeL9Vs8osPX4oOTS89vCuGVjmjliZ/9zJqNV/QWNmZLYbBE0RXryuisb6gbUlToDg\n\tr7vI1UQQpt9KU8k/sPcNqj3ess/C4pYKC30z+iqHowd9ANhufhkgoXR/gAocSDLZvMAh\n\t327Qx9W4TMYJv7vVbeSJyqmOmOKOz92ElvL9Vpe+sKlOH9Bn8iCzCS7CQ+SfDp9Liu0t\n\tRirA/xAiSktPnKvarq2O4BJtQowxSAVDT1zYzTEawZs4NpSRxwmHxgR7ZS7FwHtqfyLj\n\thHwA==",
        "X-Gm-Message-State": "AOJu0Yzq6vU014Bx9GRDR6EJvYxlTLquKNpw5PiOUY5M6g+IF4ZrU14J\n\twrSogrptxymNJNrW3lzLGhISkR+Ot5Naw6cXRy3Ko7i2+wSorrhfhTGfbZQa2PwUEZhf/YYpuwE\n\tGjJCwbVU=",
        "X-Gm-Gg": "ASbGnct8KeCMEzxlLzjC0iicOyN6/1jnDUmBOpsn7bluz/M2kO8QMDayPXkQT7etjy9\n\tn9GzQecFEjv2Nks/S55tptPwvpJwWbn/+E4N/mVHOdCyjPaAH5nz+AVNnKje1DlKKoawHnr+Pqj\n\tsdETTbw7QMNEplbtnZ//oOsdmt443QK0cuGxDV4OIxPZrrdM7a5R+zvgHaVR8VcrjlUIXyrkG65\n\tqa3a94wWpYE8HlKeNdRSapuCgRMArQUtVvD7/DcC9vNljpULKCM0ZDL2KGGXNrhFKHw2W4qBUNg\n\t56BZqVqDzosxk036rimQJPWTKQ0HP5DX5J2r9d1e0ketGEAybb/OafMsj6teUziqsrEtbcW7qZI\n\t+cL3PS5+ZLlf+91r51gU+XfkyplnQsWqMej3ojofeTshS47MOc2eGFKBea+KfG3p68Z0Q9S/BBS\n\tj1x92dsfQZOJD+PVFqacTrrAHRGD4iH0Sbcj/IoBfdKFK3jiyTjHhUkRr/URUybXvz730=",
        "X-Google-Smtp-Source": "AGHT+IHzIQR+1DCDyIpRDMKPSK0EfjrwE6u55O6LGP6G8W8hQTzwHfYw+msbMCGKWK7ttfDlA0gsyA==",
        "X-Received": "by 2002:a05:600c:c48e:b0:477:28c1:26ce with SMTP id\n\t5b1f17b1804b1-47904acef1dmr83249335e9.7.1764211104376; \n\tWed, 26 Nov 2025 18:38:24 -0800 (PST)",
        "From": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "pavel@ucw.cz,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>",
        "Subject": "[PATCH v5 19/24] ipa: Add a new Algorithm::init() to support\n\tself-initalising algorithms",
        "Date": "Thu, 27 Nov 2025 02:37:34 +0000",
        "Message-ID": "<20251127023739.179652-20-bryan.odonoghue@linaro.org>",
        "X-Mailer": "git-send-email 2.51.2",
        "In-Reply-To": "<20251127023739.179652-1-bryan.odonoghue@linaro.org>",
        "References": "<20251127023739.179652-1-bryan.odonoghue@linaro.org>",
        "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 in an algorithm init() routine which can be called in the absence of a\nYaml input. Do this to allow an algorithm to set up a default set of\nparameters.\n\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n src/ipa/libipa/algorithm.cpp | 13 ++++++++++++-\n src/ipa/libipa/algorithm.h   |  5 +++++\n 2 files changed, 17 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/ipa/libipa/algorithm.cpp b/src/ipa/libipa/algorithm.cpp\nindex 201efdfdb..da44c77ca 100644\n--- a/src/ipa/libipa/algorithm.cpp\n+++ b/src/ipa/libipa/algorithm.cpp\n@@ -38,7 +38,7 @@ namespace ipa {\n  */\n \n /**\n- * \\fn Algorithm::init()\n+ * \\fn Algorithm::init(typename Module::Context &context, const YamlObject &tuningData)\n  * \\brief Initialize the Algorithm with tuning data\n  * \\param[in] context The shared IPA context\n  * \\param[in] tuningData The tuning data for the algorithm\n@@ -50,6 +50,17 @@ namespace ipa {\n  * \\return 0 if successful, an error code otherwise\n  */\n \n+/**\n+ * \\fn Algorithm::init(typename Module::Context &context)\n+ * \\brief Initialize the algorithm with default parameters\n+ *\n+ * This method is called when no tuning data is available. The algorithm\n+ * should initialize with sensible default values.\n+ *\n+ * \\param context The IPA context containing algorithm state\n+ * \\return 0 on success, negative error code on failure\n+ */\n+\n /**\n  * \\fn Algorithm::configure()\n  * \\brief Configure the Algorithm given an IPAConfigInfo\ndiff --git a/src/ipa/libipa/algorithm.h b/src/ipa/libipa/algorithm.h\nindex 9a19dbd61..9fcbe23a9 100644\n--- a/src/ipa/libipa/algorithm.h\n+++ b/src/ipa/libipa/algorithm.h\n@@ -32,6 +32,11 @@ public:\n \t\treturn 0;\n \t}\n \n+\tvirtual int init([[maybe_unused]] typename Module::Context &context)\n+\t{\n+\t\treturn 0;\n+\t}\n+\n \tvirtual int configure([[maybe_unused]] typename Module::Context &context,\n \t\t\t      [[maybe_unused]] const typename Module::Config &configInfo)\n \t{\n",
    "prefixes": [
        "v5",
        "19/24"
    ]
}