Show a patch.

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

{
    "id": 19971,
    "url": "https://patchwork.libcamera.org/api/patches/19971/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/19971/",
    "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": "<20240430173430.200392-2-mzamazal@redhat.com>",
    "date": "2024-04-30T17:34:26",
    "name": "[v2,1/5] libcamera: software_isp: Use a specific integer type for black level",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "914eab5a6e21c32e8cf665abcd704820b9094ddd",
    "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/19971/mbox/",
    "series": [
        {
            "id": 4280,
            "url": "https://patchwork.libcamera.org/api/series/4280/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4280",
            "date": "2024-04-30T17:34:25",
            "name": "Software ISP levels cleanup",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/4280/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/19971/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/19971/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 25329C32A2\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 30 Apr 2024 17:35:05 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C1E7B63424;\n\tTue, 30 Apr 2024 19:35:04 +0200 (CEST)",
            "from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A19866341B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Apr 2024 19:35:01 +0200 (CEST)",
            "from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73])\n\tby relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n\tcipher=TLS_AES_256_GCM_SHA384) id us-mta-296-K9mOjVFvODeV4GkJKO71yQ-1;\n\tTue, 30 Apr 2024 13:34:53 -0400",
            "from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5])\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 9D6C81C03149;\n\tTue, 30 Apr 2024 17:34:52 +0000 (UTC)",
            "from nuthatch.redhat.com (unknown [10.45.224.26])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 90EB9EC687;\n\tTue, 30 Apr 2024 17:34: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=\"ZaHxMEMX\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1714498499;\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=olvBuaQpgD6Wxrktiam3erqiSenpkLpngmJ1trLOqW4=;\n\tb=ZaHxMEMXcd3nVGkdZ6tWv4Fyg6EdikW/x3ZG6IV1IYecrtq01ytJCGborEUlgkV92fo0vG\n\tB9Bb85fN16CMvrrfIxrTXjOm8xt3dNng7yeCLzXvoy4iA041H2li2JgLUtkIHikFHYF1FV\n\t4nUvKGMxj0IdIatR4lqZ1gbRcUz1q3E=",
        "X-MC-Unique": "K9mOjVFvODeV4GkJKO71yQ-1",
        "From": "Milan Zamazal <mzamazal@redhat.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Milan Zamazal <mzamazal@redhat.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "Subject": "[PATCH v2 1/5] libcamera: software_isp: Use a specific integer type\n\tfor black level",
        "Date": "Tue, 30 Apr 2024 19:34:26 +0200",
        "Message-ID": "<20240430173430.200392-2-mzamazal@redhat.com>",
        "In-Reply-To": "<20240430173430.200392-1-mzamazal@redhat.com>",
        "References": "<20240430173430.200392-1-mzamazal@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.4.1 on 10.11.54.5",
        "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 documented range of values corresponds to uint8_t, so let's use that\ntype.\n\nSigned-off-by: Milan Zamazal <mzamazal@redhat.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/simple/black_level.cpp | 2 +-\n src/ipa/simple/black_level.h   | 5 +++--\n 2 files changed, 4 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/src/ipa/simple/black_level.cpp b/src/ipa/simple/black_level.cpp\nindex c7e8d8b7..410dc17b 100644\n--- a/src/ipa/simple/black_level.cpp\n+++ b/src/ipa/simple/black_level.cpp\n@@ -43,7 +43,7 @@ BlackLevel::BlackLevel()\n  * \\return The black level, in the range from 0 (minimum) to 255 (maximum).\n  * If the black level couldn't be determined yet, return 0.\n  */\n-unsigned int BlackLevel::get() const\n+uint8_t BlackLevel::get() const\n {\n \treturn blackLevelSet_ ? blackLevel_ : 0;\n }\ndiff --git a/src/ipa/simple/black_level.h b/src/ipa/simple/black_level.h\nindex 7e37757e..e6cfa7ed 100644\n--- a/src/ipa/simple/black_level.h\n+++ b/src/ipa/simple/black_level.h\n@@ -8,6 +8,7 @@\n #pragma once\n \n #include <array>\n+#include <stdint.h>\n \n #include \"libcamera/internal/software_isp/swisp_stats.h\"\n \n@@ -17,11 +18,11 @@ class BlackLevel\n {\n public:\n \tBlackLevel();\n-\tunsigned int get() const;\n+\tuint8_t get() const;\n \tvoid update(SwIspStats::Histogram &yHistogram);\n \n private:\n-\tunsigned int blackLevel_;\n+\tuint8_t blackLevel_;\n \tbool blackLevelSet_;\n };\n \n",
    "prefixes": [
        "v2",
        "1/5"
    ]
}