Show a patch.

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

{
    "id": 25235,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/25235/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/25235/",
    "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": "<20251127022256.178929-22-bryan.odonoghue@linaro.org>",
    "date": "2025-11-27T02:22:53",
    "name": "[v2,21/22] libcamera: software_isp: lut: Make gamma from lut.cpp available in debayer params",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "7e3165c52936b4a82668272030fb62fd74c41dad",
    "submitter": {
        "id": 175,
        "url": "https://patchwork.libcamera.org/api/1.1/people/175/?format=api",
        "name": "Bryan O'Donoghue",
        "email": "bryan.odonoghue@linaro.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/25235/mbox/",
    "series": [
        {
            "id": 5616,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5616/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5616",
            "date": "2025-11-27T02:22:32",
            "name": "GPUISP precursor series",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/5616/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/25235/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/25235/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 0ACF7C3260\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Nov 2025 02:23:53 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B6C1C60B37;\n\tThu, 27 Nov 2025 03:23:52 +0100 (CET)",
            "from mail-wm1-x335.google.com (mail-wm1-x335.google.com\n\t[IPv6:2a00:1450:4864:20::335])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 87FF460B2F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Nov 2025 03:23:48 +0100 (CET)",
            "by mail-wm1-x335.google.com with SMTP id\n\t5b1f17b1804b1-47774d3536dso2787165e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Nov 2025 18:23:48 -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-4790b0e21e8sm71549495e9.15.2025.11.26.18.23.47\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 26 Nov 2025 18:23:47 -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=\"eP/IYhlM\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1764210228; x=1764815028;\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=I8jixvijd6gJLN+QzpL1b1w727QQZ88ZES2h9Mcjbmo=;\n\tb=eP/IYhlMzocDjxBGFH4R7PC3DeMsllYvA0+kON4gYtfgaQauBuXKwLmcObwz/8eUf8\n\tk+/A8nB+9DkJ49LWsBmbnDgfBa5K1Vleq4EPQyi+R2+NLGus+USswrDpYdHtv+BpDnY1\n\ta2jTMBLnbfY2MO/iq5xL0240hArSXOB3dQOouTRoasifbsHvEO/5McmKmej5ww8Yy59b\n\tIRHttd/zN9hLimQugOn0XO2VR0f6pbV5dLag4jib9GyPmEPNFQ6eKx+XC2Cfgr4JKSEe\n\ty0AZk6HbQcwYloWK25eIAms4jrsCFPOxzI3ePLV9V6COVYOd8DUuDfr3q/sR1NfE1YvW\n\toddA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1764210228; x=1764815028;\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=I8jixvijd6gJLN+QzpL1b1w727QQZ88ZES2h9Mcjbmo=;\n\tb=YddmhZdWiA7UAzwN953HZijZwmU6dECPoc/u6fUzsvFuX5cuWOqOMQ1I6JqF9TnWjg\n\tBJVgf8+Oc24pFizhDWlbzjVilG5kYkrNbHdu2Vp6W6/YPqPeIvjav4RJBjwwicvoZcBc\n\tPDUvVTxh+lV/q++IechqiR3QVKbvz0+BnQkkNhjDF3gf575YpuKazkiufID8nNThQZGy\n\tmVjMutLyyq/i/IJE+RGPDfA5rbrHKv5K6Ao/L8dLNJOUuqJ0qDVUjY4ugAheT0v4fMK1\n\t4KlbQj/Y8edg9b5NDGDAEOuM7RF1tFlFPcFPRXMbSRje+Yxnu83JRfGIviZFK0kpR+Jw\n\t69Gg==",
        "X-Gm-Message-State": "AOJu0Yz3g6oUF4aHmpsU3ZFZuyzp0lUsuJLEh+YlriZ6saoVL3IEUTuJ\n\txuNwlzZ4oCQp2Y80gsq2RiHULwI806TStKDEASz2Uas0kghUi6GSUfunA0qtxkSVeRHLV9sWiJ+\n\twjh6cjJQ=",
        "X-Gm-Gg": "ASbGncte4ppeLXmmvUzPE8KpGfB8qDEIQLu2LgjVCN/Z/dzOVeYmi5HOKFmYMMxOzUk\n\tRhWDkrVodtFSOXTuTdJyfY6qmaWTraec1sCXuU3/rrlbi13REyjEJ4QR+A1hiw9IKRk/u698kjy\n\tZraBO5DZOjZpqlbQaD6MACFE+78S9AtF/Ph6lnMsFqDMlj94nxcvLpVIs2WsLWIb0I0mMB+bNBS\n\tQgt8m6lkItX1LiSCcpVrOjzQK0mQvvh+lDD7t3X+U4hxQgQz7Aj/DKnZAX+8FCJgFeRSoBmdHoD\n\tS57unN2eAgXt85mK+O1OJCcgDUrIxchTiu8hn1om1cjzC+ECiPA5EHnj1MhEAVW8r9rBZxLD6La\n\txQr/JBKO/gUfM3ZkemTkRI9WSsy9V86rC18DZ5rfhNwOtWz+xFitXMPE+mF+VZyLTRPBVIC78rs\n\tJZA7G+RJrUBJZyu+/DkbUTauSxyWp9n74qGnsqzSoZcdqhY1OzF9knrZh0slWqpp6LnUM=",
        "X-Google-Smtp-Source": "AGHT+IEzzJOoT/BNeqJ1COeUoWLOThiDZAq87waMjXYINNIB5nsBh3V8JBlvLUqXuG7PUFhFrKGkQQ==",
        "X-Received": "by 2002:a05:600c:314d:b0:477:9890:9ab8 with SMTP id\n\t5b1f17b1804b1-477c04c3593mr215473345e9.3.1764210227921; \n\tWed, 26 Nov 2025 18:23:47 -0800 (PST)",
        "From": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "pavel@ucw.cz, Bryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tMilan Zamazal <mzamazal@redhat.com>",
        "Subject": "[PATCH v2 21/22] libcamera: software_isp: lut: Make gamma from\n\tlut.cpp available in debayer params",
        "Date": "Thu, 27 Nov 2025 02:22:53 +0000",
        "Message-ID": "<20251127022256.178929-22-bryan.odonoghue@linaro.org>",
        "X-Mailer": "git-send-email 2.51.2",
        "In-Reply-To": "<20251127022256.178929-1-bryan.odonoghue@linaro.org>",
        "References": "<20251127022256.178929-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": "Provide the gamma used in IPA to Bayer parameters. We will pass Gamma into\nthe shader via a uniform and can then tweak that value from outside at\nwill.\n\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n include/libcamera/internal/software_isp/debayer_params.h | 1 +\n src/ipa/simple/algorithms/lut.cpp                        | 2 ++\n src/libcamera/software_isp/debayer.cpp                   | 5 +++++\n 3 files changed, 8 insertions(+)",
    "diff": "diff --git a/include/libcamera/internal/software_isp/debayer_params.h b/include/libcamera/internal/software_isp/debayer_params.h\nindex 5a0d9438f..d5dad1a98 100644\n--- a/include/libcamera/internal/software_isp/debayer_params.h\n+++ b/include/libcamera/internal/software_isp/debayer_params.h\n@@ -58,6 +58,7 @@ struct DebayerParams {\n \t */\n \tMatrix<float, 3, 3> ccm;\n \tRGB<float> blackLevel;\n+\tfloat gamma;\n };\n \n } /* namespace libcamera */\ndiff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp\nindex 49482d711..ea5a86b20 100644\n--- a/src/ipa/simple/algorithms/lut.cpp\n+++ b/src/ipa/simple/algorithms/lut.cpp\n@@ -147,6 +147,8 @@ void Lut::prepare(IPAContext &context,\n \t\t\tparams->gammaLut[i] = gammaTable[i / div];\n \t\t}\n \t}\n+\n+\tparams->gamma = context.configuration.gamma;\n }\n \n void Lut::process([[maybe_unused]] IPAContext &context,\ndiff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\nindex 1034912e7..8bcbd5dde 100644\n--- a/src/libcamera/software_isp/debayer.cpp\n+++ b/src/libcamera/software_isp/debayer.cpp\n@@ -110,6 +110,11 @@ namespace libcamera {\n  * \\brief Blacklevel gains for the GPUISP\n  */\n \n+/**\n+ * \\var DebayerParams::gamma\n+ * \\brief Gamma value for the GPUISP\n+ */\n+\n /**\n  * \\class Debayer\n  * \\brief Base debayering class\n",
    "prefixes": [
        "v2",
        "21/22"
    ]
}