Show a patch.

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

{
    "id": 18445,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/18445/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/18445/",
    "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": "<20230324142908.64224-3-dse@thaumatec.com>",
    "date": "2023-03-24T14:29:00",
    "name": "[libcamera-devel,v5,02/10] ipa: rkisp1: Add lens limits to the session config",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "095174af2a42430b1050d0bce07dcde7f4bd6b54",
    "submitter": {
        "id": 126,
        "url": "https://patchwork.libcamera.org/api/1.1/people/126/?format=api",
        "name": "Daniel Semkowicz",
        "email": "dse@thaumatec.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/18445/mbox/",
    "series": [
        {
            "id": 3813,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3813/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3813",
            "date": "2023-03-24T14:28:58",
            "name": "ipa: rkisp1: Add autofocus algorithm",
            "version": 5,
            "mbox": "https://patchwork.libcamera.org/series/3813/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/18445/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/18445/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 17A89C3260\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 24 Mar 2023 14:29:32 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9695C62718;\n\tFri, 24 Mar 2023 15:29:28 +0100 (CET)",
            "from mail-lj1-x236.google.com (mail-lj1-x236.google.com\n\t[IPv6:2a00:1450:4864:20::236])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E7E5A61ECF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Mar 2023 15:29:25 +0100 (CET)",
            "by mail-lj1-x236.google.com with SMTP id f16so1896575ljq.10\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Mar 2023 07:29:25 -0700 (PDT)",
            "from localhost.localdomain ([91.90.166.178])\n\tby smtp.gmail.com with ESMTPSA id\n\tj21-20020a2e8515000000b002a10b2ea089sm981714lji.16.2023.03.24.07.29.24\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 24 Mar 2023 07:29:25 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1679668168;\n\tbh=ejOENZ/e1++33Ovtlo6eNchLLyXr5wDvErTCzcVI18U=;\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:Cc:\n\tFrom;\n\tb=hl1xoDjdHc6KWyLWYSUrfRFlTUfdFBEivQfxaaN4N+7cu52S2JXjiFLnT6Cd8waZE\n\tNnQRYn5MREWDKI+gX7waQUOD1wDSpmndetixlPVWD68Fai1LEgp2wu7r+k2DwGqcqo\n\tKyAn61ju29EyQRqXzHhbhHU/UDMJiJSsLXiBSRz2Ah45fIM2+zBTkM4TDom4m7sEHr\n\tSNTaemz7DbpWSCpUAZI6Kr0l+mNuGlRp707Xt+aqWDPt+3x4OrTFoQxCGswXtnwOWU\n\t1Hd7V3DyHtuCOg5UncG56lyYzu6AbXXGV8BpevKpmKbz8RNxxkR0lpB5LFOKbY3TSv\n\tuzTjtegUJ2Qdw==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=thaumatec-com.20210112.gappssmtp.com; s=20210112; t=1679668165;\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=8l6sE+OVX2uuIoyLjXNkPNCNwAZLjqHWm3i7Yg1Y6Qs=;\n\tb=cgVGFXgy1eGQ71qzy5NkubQESUttyiML1nkR9DwMpM6WPYF1Xjoi25+6ogQ/8N1Ujq\n\t8fRqRDYwjCKBvZ/wXp2/nfLGWVhjRl5/rHT8erSegd/Wfg0XTM8dTb7Xx3B7oG5lJY6g\n\t3UlQpjwQrzlaxSJhZJLwwKNAxWLKehx46VtJIccu1Kl101fBn/q37oF/kIRGZ1KzDgaO\n\tIzksOJp6mMcvShtRVCyOZdy2aZ8WLpuQDZ0Af5zW9mLgHoC6SAZNe3HNKgynBVVOD41T\n\tuoGupIQjN99gN6q1p+IJ34hNfxGSYGD/5ihkMFQSwshzrjsOdWKcIAyfoikRkCXJxtnu\n\tGyFQ=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=thaumatec-com.20210112.gappssmtp.com\n\theader.i=@thaumatec-com.20210112.gappssmtp.com header.b=\"cgVGFXgy\"; \n\tdkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112; t=1679668165;\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\t:subject:date:message-id:reply-to;\n\tbh=8l6sE+OVX2uuIoyLjXNkPNCNwAZLjqHWm3i7Yg1Y6Qs=;\n\tb=SUC5xuLMmmeyqXBqtumsee7lDCNH2d+wnUciuIQtYTYsfbRQNBnw+tMeeDMPv1X3yn\n\txRL7xwoY8KDfWBW8LmUCti2DYBdsn82ttP0IsV2YS72MCwStFlF7ld3q3EtB0Ux8jtp2\n\tG3Gcc1V+V/Buz0Pn1dUHWGddDE7GEU1MvivAKwi4Dhnaf48EwqvPADKM9ASzXOJmIWSq\n\tHh3VRBdqtcqn7ywq9y1lufM/n1Sjd9vQKMwAwmJYjcmuLgEgB1zx2SQNAKuOmSBrQcpc\n\tSA7tqngth7mhWxhaJyTGFxf/Sav8G9ubqv8Blu0QCJWk1JcQZo/NwGR9LK9GKPdKg+Rl\n\toE9A==",
        "X-Gm-Message-State": "AAQBX9eoEU9omuxyZm6Vd5CHerosWH22C9lfsECPurOZkpHA6rwsG73e\n\t0EcmBZ79niLKraSxs1xoYsiWhEZjtHfmDL2ZGjI=",
        "X-Google-Smtp-Source": "AKy350bYQiA9mHFitxVRLanw8dmjb30gvJu1p94qjoKYdQ5KTNfyPVOzSivvSwT471uUE31th1ST1A==",
        "X-Received": "by 2002:a2e:b046:0:b0:2a2:86de:667a with SMTP id\n\td6-20020a2eb046000000b002a286de667amr932749ljl.40.1679668165285; \n\tFri, 24 Mar 2023 07:29:25 -0700 (PDT)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri, 24 Mar 2023 15:29:00 +0100",
        "Message-Id": "<20230324142908.64224-3-dse@thaumatec.com>",
        "X-Mailer": "git-send-email 2.39.2",
        "In-Reply-To": "<20230324142908.64224-1-dse@thaumatec.com>",
        "References": "<20230324142908.64224-1-dse@thaumatec.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v5 02/10] ipa: rkisp1: Add lens limits to\n\tthe session config",
        "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": "Daniel Semkowicz via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Daniel Semkowicz <dse@thaumatec.com>",
        "Cc": "jacopo.mondi@ideasonboard.com",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Add information about focus lens position limits to the IPA session\nconfiguration. These information can then be used by IPA algorithms\nto know which focus positions are valid.\n\nSigned-off-by: Daniel Semkowicz <dse@thaumatec.com>\n---\n src/ipa/rkisp1/ipa_context.cpp | 12 ++++++++++++\n src/ipa/rkisp1/ipa_context.h   |  5 +++++\n src/ipa/rkisp1/rkisp1.cpp      | 13 ++++++++++++-\n 3 files changed, 29 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp\nindex 9bbf3684..401c098f 100644\n--- a/src/ipa/rkisp1/ipa_context.cpp\n+++ b/src/ipa/rkisp1/ipa_context.cpp\n@@ -89,6 +89,18 @@ namespace libcamera::ipa::rkisp1 {\n  * \\brief Sensor output resolution\n  */\n \n+/**\n+ * \\var IPASessionConfiguration::lens\n+ * \\brief Lens-specific information\n+ *\n+ * \\var IPASessionConfiguration::lens.minFocusPosition\n+ * \\brief Minimum position supported by the camera focus lens\n+ *\n+ * \\var IPASessionConfiguration::lens.maxFocusPosition\n+ * \\brief Maximum position supported by the camera focus lens\n+ *\n+ */\n+\n /**\n  * \\var IPASessionConfiguration::raw\n  * \\brief Indicates if the camera is configured to capture raw frames\ndiff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\nindex b9b20653..bfb6e1b7 100644\n--- a/src/ipa/rkisp1/ipa_context.h\n+++ b/src/ipa/rkisp1/ipa_context.h\n@@ -45,6 +45,11 @@ struct IPASessionConfiguration {\n \t\tSize size;\n \t} sensor;\n \n+\tstruct {\n+\t\tint32_t minFocusPosition;\n+\t\tint32_t maxFocusPosition;\n+\t} lens;\n+\n \tstruct {\n \t\trkisp1_cif_isp_version revision;\n \t} hw;\ndiff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex 248cf5e0..cd1fbae3 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -267,9 +267,20 @@ int IPARkISP1::configure(const IPAConfigInfo &ipaConfig,\n \t\t\treturn format.colourEncoding == PixelFormatInfo::ColourEncodingRAW;\n \t\t});\n \n-\tif (!ipaConfig.lensControls.empty())\n+\tif (!ipaConfig.lensControls.empty()) {\n \t\tlensControls_ = ipaConfig.lensControls;\n \n+\t\tconst ControlInfo focusAbsolute =\n+\t\t\tlensControls_->find(V4L2_CID_FOCUS_ABSOLUTE)->second;\n+\n+\t\tLOG(IPARkISP1, Debug)\n+\t\t\t<< \"Focus lens: \" << focusAbsolute.toString();\n+\n+\t\tauto &lensConfig = context_.configuration.lens;\n+\t\tlensConfig.minFocusPosition = focusAbsolute.min().get<int32_t>();\n+\t\tlensConfig.maxFocusPosition = focusAbsolute.max().get<int32_t>();\n+\t}\n+\n \tfor (auto const &a : algorithms()) {\n \t\tAlgorithm *algo = static_cast<Algorithm *>(a.get());\n \n",
    "prefixes": [
        "libcamera-devel",
        "v5",
        "02/10"
    ]
}