Show a patch.

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

{
    "id": 18236,
    "url": "https://patchwork.libcamera.org/api/patches/18236/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/18236/",
    "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": "<20230202111252.3366729-8-matthias.fend@emfend.at>",
    "date": "2023-02-02T11:12:52",
    "name": "[libcamera-devel,RFC,7/7] ipa: rkisp1: pass volatile lens controls to IPA",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "2b189eeb9a1fc45f251a7e02c831287626170fab",
    "submitter": {
        "id": 134,
        "url": "https://patchwork.libcamera.org/api/people/134/?format=api",
        "name": "Matthias Fend",
        "email": "matthias.fend@emfend.at"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/18236/mbox/",
    "series": [
        {
            "id": 3735,
            "url": "https://patchwork.libcamera.org/api/series/3735/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3735",
            "date": "2023-02-02T11:12:45",
            "name": "add support for more complex optics",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3735/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/18236/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/18236/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 D426DC329F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  2 Feb 2023 11:13:09 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 03FBA62600;\n\tThu,  2 Feb 2023 12:13:09 +0100 (CET)",
            "from lx20.hoststar.hosting (lx20.hoststar.hosting [168.119.41.54])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A6482603BF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  2 Feb 2023 12:13:05 +0100 (CET)",
            "from 194-208-208-245.tele.net ([194.208.208.245]:51050\n\thelo=localhost.localdomain)\n\tby lx20.hoststar.hosting with esmtpsa (TLS1.3) tls\n\tTLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93)\n\t(envelope-from <matthias.fend@emfend.at>)\n\tid 1pNXWa-008Uhs-Li; Thu, 02 Feb 2023 12:13:05 +0100"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1675336389;\n\tbh=BVKpqVC9xGR6xzI0O91hmWTtwDzCtMT6oCu/Y2MVGbg=;\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=pqRxk6UlZfTvfe6pY3vpOG0wpZu1Ll5pNzoOrkLTLX+TK/iZNjMbOJoufSGoTZ/fF\n\tdGwKh/AdfB8S65Ghh1E4VD6fzY/aSx4NAU1bzZI8crhKy8Qj5563tfYhS76BYkX7qZ\n\tTcfvG0u9NsRpxrk50B+uEhDq3S5peaF6wosC1zhMK2+Z60kl518ZUoHbCvSahss6rJ\n\tFtIorn2zD7HxbgCXfdNQ1/b92t2osyW9SVqWTjV0vuPjwCj+uZ3Qhxtk7DIBQkE1Q9\n\tlo8g6SWXLtEQ8bSduJwaRDDZ1q7W+8mvmD/F+5xjE91EsQBLpkE8/D2ciDwho72VJl\n\tFVDj2UOt2jM5w==",
            "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=emfend.at;\n\ts=mail;\n\th=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:\n\tMessage-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:\n\tList-Post:List-Owner:List-Archive;\n\tbh=9GZ+zWhGJaBVEBa+rOxQbXfMFUX89kReqVqYSHT0yE8=;\n\tb=nWK1meAj+WK8o8I7PZnoGlJ+rp\n\tqBBNlfqwqdS0NvIg8l2mvK9MgooH9hy1ulqVRi5+CvalPUNjqU7x0e6dHR8lprcLb22BW715zAQfc\n\tCWpz5v4tGbFnVvNUrfpqKeY7w1Fth2GTqYqoWx/uWdMS8oeFIFo3JPcEkR2VGqISCjGQ=;"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=emfend.at header.i=@emfend.at\n\theader.b=\"nWK1meAj\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu,  2 Feb 2023 12:12:52 +0100",
        "Message-Id": "<20230202111252.3366729-8-matthias.fend@emfend.at>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230202111252.3366729-1-matthias.fend@emfend.at>",
        "References": "<20230202111252.3366729-1-matthias.fend@emfend.at>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Spam-Score": "-1.0",
        "X-Spam-Bar": "-",
        "X-Spam-Report": "Spam detection software,\n\trunning on the system \"lx20.hoststar.hosting\", \n\thas NOT identified this incoming email as spam.  The original\n\tmessage has been attached to this so you can view it or label\n\tsimilar future email.  If you have any questions, see\n\tthe administrator of that system for details.\n\tContent preview: This method reads all v4l2 controls marked as\n\tvolatile from\n\tthe underlying v4l2 subdevice. Signed-off-by: Matthias Fend\n\t<matthias.fend@emfend.at>\n\t--- include/libcamera/internal/camera_lens.h | 1 +\n\tsrc/libcamera/camera_lens.cpp\n\t| 9 +++++++++ 2 files changed, 10 insertions(+) \n\tContent analysis details:   (-1.0 points, 5.0 required)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP\n\t0.0 TVD_RCVD_IP            Message was received from an IP address\n\t0.0 KAM_DMARC_STATUS Test Rule for DKIM or SPF Failure with Strict\n\tAlignment",
        "Subject": "[libcamera-devel] [RFC PATCH 7/7] ipa: rkisp1: pass volatile lens\n\tcontrols to IPA",
        "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": "Matthias Fend via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Matthias Fend <matthias.fend@emfend.at>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "All v4l2 controls that may change by themselves (volatile) are passed to\nthe IPA.\nAn example for this can be the current actual position of the focus lens,\nwhich is needed for an autofocus algorithm.\n\nSigned-off-by: Matthias Fend <matthias.fend@emfend.at>\n---\n include/libcamera/ipa/rkisp1.mojom       |  3 ++-\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 12 ++++++++++--\n 2 files changed, 12 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/include/libcamera/ipa/rkisp1.mojom b/include/libcamera/ipa/rkisp1.mojom\nindex d33e93df..9ede5fde 100644\n--- a/include/libcamera/ipa/rkisp1.mojom\n+++ b/include/libcamera/ipa/rkisp1.mojom\n@@ -33,7 +33,8 @@ interface IPARkISP1Interface {\n \t[async] queueRequest(uint32 frame, libcamera.ControlList reqControls);\n \t[async] fillParamsBuffer(uint32 frame, uint32 bufferId);\n \t[async] processStatsBuffer(uint32 frame, uint32 bufferId,\n-\t\t\t\t   libcamera.ControlList sensorControls);\n+\t\t\t\t   libcamera.ControlList sensorControls,\n+\t\t\t\t   libcamera.ControlList lensControls);\n };\n \n interface IPARkISP1EventInterface {\ndiff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex e4f328cb..6073e5fa 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -1275,9 +1275,10 @@ void PipelineHandlerRkISP1::bufferReady(FrameBuffer *buffer)\n \t\t\t\t\tmetadata.timestamp);\n \n \t\tif (isRaw_) {\n+\t\t\tconst ControlList lensCtrls;\n \t\t\tconst ControlList &ctrls =\n \t\t\t\tdata->delayedCtrls_->get(metadata.sequence);\n-\t\t\tdata->ipa_->processStatsBuffer(info->frame, 0, ctrls);\n+\t\t\tdata->ipa_->processStatsBuffer(info->frame, 0, ctrls, lensCtrls);\n \t\t}\n \t} else {\n \t\tif (isRaw_)\n@@ -1319,8 +1320,15 @@ void PipelineHandlerRkISP1::statReady(FrameBuffer *buffer)\n \tif (data->frame_ <= buffer->metadata().sequence)\n \t\tdata->frame_ = buffer->metadata().sequence + 1;\n \n+\tControlInfoMap emptyInfoMap;\n+\tControlList lensControls = ControlList(emptyInfoMap);\n+\tCameraLens *lens = data->sensor_->focusLens();\n+\tif (lens)\n+\t\tlensControls.merge(lens->getVolatileControls());\n+\n \tdata->ipa_->processStatsBuffer(info->frame, info->statBuffer->cookie(),\n-\t\t\t\t       data->delayedCtrls_->get(buffer->metadata().sequence));\n+\t\t\t\t       data->delayedCtrls_->get(buffer->metadata().sequence),\n+\t\t\t\t       lensControls);\n }\n \n REGISTER_PIPELINE_HANDLER(PipelineHandlerRkISP1)\n",
    "prefixes": [
        "libcamera-devel",
        "RFC",
        "7/7"
    ]
}