Show a patch.

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

{
    "id": 20110,
    "url": "https://patchwork.libcamera.org/api/patches/20110/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/20110/",
    "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": "<20240528161126.35119-5-mzamazal@redhat.com>",
    "date": "2024-05-28T16:11:25",
    "name": "[v4,4/5] libcamera: software_isp: Remove DebayerParams::kGain10",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "62bdd1e9c0a4051e00b32ac8e4ba184e7b5ad05b",
    "submitter": {
        "id": 177,
        "url": "https://patchwork.libcamera.org/api/people/177/?format=api",
        "name": "Milan Zamazal",
        "email": "mzamazal@redhat.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/20110/mbox/",
    "series": [
        {
            "id": 4330,
            "url": "https://patchwork.libcamera.org/api/series/4330/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4330",
            "date": "2024-05-28T16:11:21",
            "name": "Software ISP levels cleanup",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/4330/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/20110/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/20110/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 BCDC3BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 28 May 2024 16:12:04 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 29870634C3;\n\tTue, 28 May 2024 18:12:03 +0200 (CEST)",
            "from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DC575634BC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 28 May 2024 18:11:55 +0200 (CEST)",
            "from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com\n\t[66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-97-OWKHKf-3PO6-PIFvmeS9qg-1; Tue, 28 May 2024 12:11:53 -0400",
            "from smtp.corp.redhat.com\n\t(int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby mimecast-mx02.redhat.com (Postfix) with ESMTPS id C53D9800281;\n\tTue, 28 May 2024 16:11:52 +0000 (UTC)",
            "from nuthatch.redhat.com (unknown [10.45.224.39])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 6A50FC15BB9;\n\tTue, 28 May 2024 16:11:51 +0000 (UTC)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"ahcskVVl\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1716912714;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=RBMqN3mK1/BRKWDoV2uQlS9EKpzPdHHLFRw/vFbKjTg=;\n\tb=ahcskVVlc926i9pVa8uhGIsWQxWPtXhmBxRFgxNi813sqNYGaJ/HwmTwrD6u5H6D9ef2uo\n\tZ06SrrHlVSMesG+O5+Fedz5B5OC0Z+hP2zlrGLulRK8uCLMWnl8KsO11jIFO7XELyOIFO2\n\tB30qJQdP2apYAetSSdTmutJqEH/KOb0=",
        "X-MC-Unique": "OWKHKf-3PO6-PIFvmeS9qg-1",
        "From": "Milan Zamazal <mzamazal@redhat.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Milan Zamazal <mzamazal@redhat.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tAndrei Konovalov <andrey.konovalov.ynk@gmail.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "Subject": "[PATCH v4 4/5] libcamera: software_isp: Remove\n\tDebayerParams::kGain10",
        "Date": "Tue, 28 May 2024 18:11:25 +0200",
        "Message-ID": "<20240528161126.35119-5-mzamazal@redhat.com>",
        "In-Reply-To": "<20240528161126.35119-1-mzamazal@redhat.com>",
        "References": "<20240528161126.35119-1-mzamazal@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.4.1 on 10.11.54.8",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain; charset=\"US-ASCII\"; x-default=true",
        "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": "The constant is used in a single place internally and doesn't belong to\nDebayerParams anymore.  Let's use 256 directly.\n\nSigned-off-by: Milan Zamazal <mzamazal@redhat.com>\nReviewed-by: Andrei Konovalov <andrey.konovalov.ynk@gmail.com>\n---\n include/libcamera/internal/software_isp/debayer_params.h | 1 -\n src/ipa/simple/soft_simple.cpp                           | 3 +--\n src/libcamera/software_isp/debayer.cpp                   | 5 -----\n 3 files changed, 1 insertion(+), 8 deletions(-)",
    "diff": "diff --git a/include/libcamera/internal/software_isp/debayer_params.h b/include/libcamera/internal/software_isp/debayer_params.h\nindex 69fed1e7..2f75b4b5 100644\n--- a/include/libcamera/internal/software_isp/debayer_params.h\n+++ b/include/libcamera/internal/software_isp/debayer_params.h\n@@ -16,7 +16,6 @@\n namespace libcamera {\n \n struct DebayerParams {\n-\tstatic constexpr unsigned int kGain10 = 256;\n \tstatic constexpr unsigned int kRGBLookupSize = 256;\n \tstatic constexpr float kGamma = 0.5;\n \ndiff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp\nindex 2c9fe98e..26597c99 100644\n--- a/src/ipa/simple/soft_simple.cpp\n+++ b/src/ipa/simple/soft_simple.cpp\n@@ -289,8 +289,7 @@ void IPASoftSimple::processStats(const ControlList &sensorControls)\n \n \tfor (unsigned int i = 0; i < DebayerParams::kRGBLookupSize; i++) {\n \t\tconstexpr unsigned int div =\n-\t\t\tDebayerParams::kRGBLookupSize * DebayerParams::kGain10 /\n-\t\t\tkGammaLookupSize;\n+\t\t\tDebayerParams::kRGBLookupSize * 256 / kGammaLookupSize;\n \t\tunsigned int idx;\n \n \t\t/* Apply gamma after gain! */\ndiff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\nindex 028bf27e..80bf5dbe 100644\n--- a/src/libcamera/software_isp/debayer.cpp\n+++ b/src/libcamera/software_isp/debayer.cpp\n@@ -18,11 +18,6 @@ namespace libcamera {\n  * \\brief Struct to hold the debayer parameters.\n  */\n \n-/**\n- * \\var DebayerParams::kGain10\n- * \\brief const value for 1.0 gain\n- */\n-\n /**\n  * \\var DebayerParams::kRGBLookupSize\n  * \\brief Size of a color lookup table\n",
    "prefixes": [
        "v4",
        "4/5"
    ]
}