Show a patch.

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

{
    "id": 25308,
    "url": "https://patchwork.libcamera.org/api/patches/25308/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/25308/",
    "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": "<20251202133157.661407-23-bryan.odonoghue@linaro.org>",
    "date": "2025-12-02T13:31:53",
    "name": "[v3,22/22] libcamera: software_isp: lut: Make contrast available in debayer params",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "83993195e06b0449ff8570fc403c27b5cf696655",
    "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/25308/mbox/",
    "series": [
        {
            "id": 5630,
            "url": "https://patchwork.libcamera.org/api/series/5630/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5630",
            "date": "2025-12-02T13:31:31",
            "name": "GPUISP precursor series",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/5630/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/25308/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/25308/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 13743C32F8\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  2 Dec 2025 13:32:40 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9975160D39;\n\tTue,  2 Dec 2025 14:32:39 +0100 (CET)",
            "from mail-wr1-x434.google.com (mail-wr1-x434.google.com\n\t[IPv6:2a00:1450:4864:20::434])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8505E60D16\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  2 Dec 2025 14:32:26 +0100 (CET)",
            "by mail-wr1-x434.google.com with SMTP id\n\tffacd0b85a97d-42e2e5da5fcso1769808f8f.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 02 Dec 2025 05:32:26 -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\tffacd0b85a97d-42e1c5c30c4sm33363322f8f.9.2025.12.02.05.32.24\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 02 Dec 2025 05:32:25 -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=\"OJGikJs3\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1764682346; x=1765287146;\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=DqgHxVMLlIhOh7RzizVaQec40pqf/UIahAJyMSasrCI=;\n\tb=OJGikJs3NoAK/89kG74fD+fqQaxQgzUK1z0cus5biG7f9HvK/qpi1a08049oPzvV57\n\tiofWlzXnjE23/ZNvybT9y0UEjCcsPGSX9frGjc3w4Upex5Q0ClHtXjzdkXaW/ZM2v5YJ\n\tMGPCwxyHOeky+z7+lWV4pUuLjcIFeBTtbadjI+p24cQ7aGm9v84BeadJkTzYzQ8SpzxG\n\t423Hajmc1lqWXHmE4+nZYLyVZv/cpq57/tyfv4iIWdYINYxhTmh0BqVxAn+rajb35t7W\n\tnnAhPzv1s52lxXSUBc1OTyiCmMDOhiR/5Gk9GsBIwhwtsZGwMMbxZcaVmasxbUpYjW07\n\tmNtA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1764682346; x=1765287146;\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=DqgHxVMLlIhOh7RzizVaQec40pqf/UIahAJyMSasrCI=;\n\tb=uSkSrI4aQ5FxWaavsLWkTtwsv2UEDT0Hop170l+3EX4oo6Zyu+qBzTBRGns5w5b6WF\n\tobL31Qck4TknGmmIQwI5d063G0WLSkin0NAIQvBWCetivgAC/v1XcXKuyOyrmKxVd7wT\n\tdooCUQyGXIVbFSGSQfRCnDeYdZM47CY4l7RI1yWSn9TgoT/RKMsTzGv7AeCeaMOoUqKV\n\to6AKRDrnBSdjHA57lWXDIFGsF3jhP1vRAaBAGqhQsh72ZvGSo3CgDu3zQ+dOxG1qYoYj\n\tqx2UrxeyVdWHYboqEcCBIR/S0+RSa/IGAt23ghbuT84JA7xP9WY45S3K4Cfavjc/ovAk\n\t65dQ==",
        "X-Gm-Message-State": "AOJu0YwBw+4iM8vd9hTUHRsU8/FdT1SdzgsADLrj17vockzg1RHU5NOt\n\tAjxKfTFZbM93qQ/wkiQWmowBWytltSQC4KxRrevC5AY6IslkdZPd5xDc4ZhjXB7ZgNi3ULr+tzq\n\twF8bK",
        "X-Gm-Gg": "ASbGncs9m3mn4MpqOwE+HKxrsT2gCg/qP5D4AWK8R2YDtEqdJzo+DZaLondbmJQIJ+n\n\tBwqhzzyXw5mg1saWWdpBfuVp0rytESKc1TRgErgRmxNeGD1B95DCccFOFpPcDcKLBFeoKnSJQC4\n\tLn0D0TawUTBsysvNUS+dGeOnKI/k3w/ZGf+enwDoLJFoSL299CUO/WnIzbAeuExjowf+fnk3Hdo\n\tTXVYaaw9Q4oz2vkkS4O3UW9Uac7JUHh9NsYcn1MeQmgWMWOpEzZEnF5DtLkJavcGb6QLrD2eHZh\n\tZK30zTnLE1rn6zv5lCXhDz5Y1nhfnCyMXrdTMIMcspjnM7UvBeBkciBqwDY4/Yrom4a0RCp1pIs\n\tTz/MgShWVGvC8t0/na0sXRzM32im7ahFRGYgNthFsv03tAojR3lK/tHkCS/Qsmi2V6TLhy/kwDB\n\tcZe61tEI0X/UY6Ht8K6l/YZ2dLto0p/zOQHnYUmSggTjfUGDZRLfsFRKV4sfLAVuixPGk=",
        "X-Google-Smtp-Source": "AGHT+IFoulvQ3V34aUHRmh4I93l3uV3LSA4Kn0rjfu31G4n4zsesyV4EW+OP7/p6yciL7Js3k7sX1A==",
        "X-Received": "by 2002:a5d:4251:0:b0:42c:b8fd:21b3 with SMTP id\n\tffacd0b85a97d-42e0f362440mr23905039f8f.57.1764682345706; \n\tTue, 02 Dec 2025 05:32:25 -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>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>",
        "Subject": "[PATCH v3 22/22] libcamera: software_isp: lut: Make contrast\n\tavailable in debayer params",
        "Date": "Tue,  2 Dec 2025 13:31:53 +0000",
        "Message-ID": "<20251202133157.661407-23-bryan.odonoghue@linaro.org>",
        "X-Mailer": "git-send-email 2.52.0",
        "In-Reply-To": "<20251202133157.661407-1-bryan.odonoghue@linaro.org>",
        "References": "<20251202133157.661407-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 contrast used in IPA to Bayer parameters. Similar to the\ncalculated Gamma value we will pass this value into the debayer fragment\nshader for further consumption.\n\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.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                        | 1 +\n src/libcamera/software_isp/debayer.cpp                   | 5 +++++\n 3 files changed, 7 insertions(+)",
    "diff": "diff --git a/include/libcamera/internal/software_isp/debayer_params.h b/include/libcamera/internal/software_isp/debayer_params.h\nindex d5dad1a98..8033f7d5b 100644\n--- a/include/libcamera/internal/software_isp/debayer_params.h\n+++ b/include/libcamera/internal/software_isp/debayer_params.h\n@@ -59,6 +59,7 @@ struct DebayerParams {\n \tMatrix<float, 3, 3> ccm;\n \tRGB<float> blackLevel;\n \tfloat gamma;\n+\tfloat contrast;\n };\n \n } /* namespace libcamera */\ndiff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp\nindex ea5a86b20..9aaab54f1 100644\n--- a/src/ipa/simple/algorithms/lut.cpp\n+++ b/src/ipa/simple/algorithms/lut.cpp\n@@ -149,6 +149,7 @@ void Lut::prepare(IPAContext &context,\n \t}\n \n \tparams->gamma = context.configuration.gamma;\n+\tparams->contrast = context.activeState.gamma.contrast;\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 7e8d81c09..e01358720 100644\n--- a/src/libcamera/software_isp/debayer.cpp\n+++ b/src/libcamera/software_isp/debayer.cpp\n@@ -115,6 +115,11 @@ namespace libcamera {\n  * \\brief Gamma value for the GPUISP\n  */\n \n+/**\n+ * \\var DebayerParams::contrast\n+ * \\brief Contrast value for GPUISP\n+ */\n+\n /**\n  * \\class Debayer\n  * \\brief Base debayering class\n",
    "prefixes": [
        "v3",
        "22/22"
    ]
}