Show a patch.

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

{
    "id": 16973,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/16973/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16973/",
    "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": "<20220805124027.530212-3-fsylvestre@baylibre.com>",
    "date": "2022-08-05T12:40:26",
    "name": "[libcamera-devel,v2,2/3] ipa: rkisp1: Add enable field for LSC algorithm in IPA context",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "c2150102919b85c5d1742bb84cea9e93b042c18b",
    "submitter": {
        "id": 123,
        "url": "https://patchwork.libcamera.org/api/1.1/people/123/?format=api",
        "name": "Florian Sylvestre",
        "email": "fsylvestre@baylibre.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/16973/mbox/",
    "series": [
        {
            "id": 3375,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3375/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3375",
            "date": "2022-08-05T12:40:24",
            "name": "Add DPF tuning support for RkISP1",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/3375/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16973/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16973/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 5EFE0BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  5 Aug 2022 12:40:36 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 29ECA6332F;\n\tFri,  5 Aug 2022 14:40:36 +0200 (CEST)",
            "from mail-wr1-x431.google.com (mail-wr1-x431.google.com\n\t[IPv6:2a00:1450:4864:20::431])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 702C76332E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  5 Aug 2022 14:40:33 +0200 (CEST)",
            "by mail-wr1-x431.google.com with SMTP id bv3so3124917wrb.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 05 Aug 2022 05:40:33 -0700 (PDT)",
            "from BL087.. ([2a01:e34:eea9:e630:997d:fb84:b99a:cc47])\n\tby smtp.gmail.com with ESMTPSA id\n\tw13-20020adff9cd000000b0021db7b0162esm3869206wrr.105.2022.08.05.05.40.31\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 05 Aug 2022 05:40:32 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659703236;\n\tbh=GYn7Od6k2DG4KI5EiH7VP9qw22z7yuc5GJu28+wJWqU=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=gD8vomin8GJZwyXmqp2YsdlV0lfWSdnj1ahxs+uuC2ta9qXCbM42pPChFRSc7tWxw\n\tPQyTqpoyFPqUXcerAEgX0yNxnRz1UCUYCai33oFa+QECW2KP1WoReUH7zkByba5Lqu\n\tIKDPd3WC5selGwsm9Qj/3aPJpMd0gXAGdY9HlUbrB62Y8DnwxdwcfelliXqPeT6gTD\n\tDEjHMDakwCdLn8cotK6k/0z400s6CPBz15oSvlesP9x2V7flr6Dsz0HHaC885jQyVL\n\tbgVNFTS/RySlpnnsmQsQup8DI58bNKHXY6iUnTXdJwE0yy02lcJG+wp5YjPpOXtmiy\n\tB9bmkhV8G1MVQ==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=baylibre-com.20210112.gappssmtp.com; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc;\n\tbh=0RUI5YjPJg66gmG507iTjF1fm00NL7pDQWiNs6V9UYE=;\n\tb=UEjy7l6yKGAQ2amn8yS9gtFQqALDRRhmg1OHqFf9hUucEi+v03TDZURBpwrg4XiDEw\n\tMc9cQZMAXOC3qMQBQ7Fg1NhKiXLQP+Z7puhiYKFgx5L+P2CdywJ9vasDJ5IOD04Ou34E\n\taHVWo84kftJV3aUg0RccAMnyrG5fnce2xX7IC2JFJVxTveIHcAfSeOJZeHXqzUVACo/H\n\tg+3yikjBTgLahgaEfDupIiaHkmMMrHfq+ZIHwgMt3mdGcuOsRP6NHoGIL6LCzmVtEALC\n\tA3xAuMxs6/yTArGVezwm45xPYmIlepgD+LVrpskXdrvHiIlK8YNYuSb53rD2DvrIp/fr\n\tz1kQ=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=baylibre-com.20210112.gappssmtp.com\n\theader.i=@baylibre-com.20210112.gappssmtp.com header.b=\"UEjy7l6y\"; \n\tdkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc;\n\tbh=0RUI5YjPJg66gmG507iTjF1fm00NL7pDQWiNs6V9UYE=;\n\tb=yL4OM4pe4xycmmsvdVlgowRH6xlGQKl9Z+fEndmjibCsWQQSIwkn4N/9CpFd04XF1u\n\tW6WviLJG5xkkmKhN0yUdMLF+5q1RdGl1i1xX6yTrdY8Cl3BywwAtMXSZw9p2hlG4iJSx\n\tX2De9D4a9DWBLTp4Rc6k+OKSLDdDqszHlb7CuJGKxyJETdWhyjQj7iJLplZAN60qkfXV\n\tHDSmI4tujIpGNN593ThT5E2WPoZqfyKdnnoLsFt10G/qQ/+aV6icSsd0Aht1U8MBtd49\n\tFumOKrHUhHDKx+DFZHjb2M/mSZtQebxMqU3iKDSQlSwllH9pkuRGkAhDUYLDRiUtpBqi\n\txS9Q==",
        "X-Gm-Message-State": "ACgBeo0WtRBlx3LVlAbyA6klIYyECTNGHFsnX6VH0DkmCpkzKKeQl/u/\n\tYZsxQHLfp36u+H/6ZMiA3ek0W/3aXibJbFNQ",
        "X-Google-Smtp-Source": "AA6agR4f6eadDKXlLr4a9RUQ78gyKLyYQO+HGq4462ufbxl8rKRJ+tBl31OMQkE+pHOR/ef0EJj8IQ==",
        "X-Received": "by 2002:adf:ef07:0:b0:220:785d:38f9 with SMTP id\n\te7-20020adfef07000000b00220785d38f9mr4070593wro.586.1659703232623; \n\tFri, 05 Aug 2022 05:40:32 -0700 (PDT)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri,  5 Aug 2022 14:40:26 +0200",
        "Message-Id": "<20220805124027.530212-3-fsylvestre@baylibre.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20220805124027.530212-1-fsylvestre@baylibre.com>",
        "References": "<20220805124027.530212-1-fsylvestre@baylibre.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 2/3] ipa: rkisp1: Add enable field for\n\tLSC algorithm in IPA context",
        "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>",
        "From": "Florian Sylvestre via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Florian Sylvestre <fsylvestre@baylibre.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Add an enable variable in the lsc struct in IPASessionConfiguration which\nindicates if the lsc algorithm has been configured. This will allow other\nalgorithms to retrieve this information.\n\nSigned-off-by: Florian Sylvestre <fsylvestre@baylibre.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/rkisp1/algorithms/lsc.cpp | 10 ++++++++++\n src/ipa/rkisp1/algorithms/lsc.h   |  1 +\n src/ipa/rkisp1/ipa_context.cpp    |  8 ++++++++\n src/ipa/rkisp1/ipa_context.h      |  4 ++++\n 4 files changed, 23 insertions(+)",
    "diff": "diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp\nindex 05c8c0da..da287ac7 100644\n--- a/src/ipa/rkisp1/algorithms/lsc.cpp\n+++ b/src/ipa/rkisp1/algorithms/lsc.cpp\n@@ -119,6 +119,16 @@ int LensShadingCorrection::init([[maybe_unused]] IPAContext &context,\n \treturn 0;\n }\n \n+/**\n+ * \\copydoc libcamera::ipa::Algorithm::configure\n+ */\n+int LensShadingCorrection::configure(IPAContext &context,\n+\t\t\t\t     [[maybe_unused]] const IPACameraSensorInfo &configInfo)\n+{\n+\tcontext.configuration.lsc.enabled = initialized_;\n+\treturn 0;\n+}\n+\n /**\n  * \\copydoc libcamera::ipa::Algorithm::prepare\n  */\ndiff --git a/src/ipa/rkisp1/algorithms/lsc.h b/src/ipa/rkisp1/algorithms/lsc.h\nindex fdb2ec1d..f68602c0 100644\n--- a/src/ipa/rkisp1/algorithms/lsc.h\n+++ b/src/ipa/rkisp1/algorithms/lsc.h\n@@ -20,6 +20,7 @@ public:\n \t~LensShadingCorrection() = default;\n \n \tint init(IPAContext &context, const YamlObject &tuningData) override;\n+\tint configure(IPAContext &context, const IPACameraSensorInfo &configInfo) override;\n \tvoid prepare(IPAContext &context, rkisp1_params_cfg *params) override;\n \n private:\ndiff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp\nindex 23a63f8c..1338ae40 100644\n--- a/src/ipa/rkisp1/ipa_context.cpp\n+++ b/src/ipa/rkisp1/ipa_context.cpp\n@@ -92,6 +92,14 @@ namespace libcamera::ipa::rkisp1 {\n  * \\brief Indicates if the AWB hardware is enabled to apply colour gains\n  */\n \n+/**\n+ * \\var IPASessionConfiguration::lsc\n+ * \\brief Lens Shading Correction configuration of the IPA\n+ *\n+ * \\var IPASessionConfiguration::lsc.enabled\n+ * \\brief Indicates if the LSC hardware is enabled to apply LSC algorithm\n+ */\n+\n /**\n  * \\var IPASessionConfiguration::sensor\n  * \\brief Sensor-specific configuration of the IPA\ndiff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\nindex 7f7b3e4d..0cd6aadb 100644\n--- a/src/ipa/rkisp1/ipa_context.h\n+++ b/src/ipa/rkisp1/ipa_context.h\n@@ -32,6 +32,10 @@ struct IPASessionConfiguration {\n \t\tbool enabled;\n \t} awb;\n \n+\tstruct {\n+\t\tbool enabled;\n+\t} lsc;\n+\n \tstruct {\n \t\tutils::Duration lineDuration;\n \t\tSize size;\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "2/3"
    ]
}