Show a patch.

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

{
    "id": 15805,
    "url": "https://patchwork.libcamera.org/api/patches/15805/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15805/",
    "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": "<20220506051841.70792-3-hpa@redhat.com>",
    "date": "2022-05-06T05:18:40",
    "name": "[libcamera-devel,v2,2/3] ipa: ipu3: af: Trigger AF after AGC is stable",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "2d5baaefb29c7789a918eb48daf6fc466e014186",
    "submitter": {
        "id": 105,
        "url": "https://patchwork.libcamera.org/api/people/105/?format=api",
        "name": "Kate Hsuan",
        "email": "hpa@redhat.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/15805/mbox/",
    "series": [
        {
            "id": 3096,
            "url": "https://patchwork.libcamera.org/api/series/3096/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3096",
            "date": "2022-05-06T05:18:38",
            "name": "ipa: ipu3: af: Temporarily suspend AWB during AF scanning",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/3096/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/15805/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15805/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 95C6EC3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  6 May 2022 05:19:26 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E551565650;\n\tFri,  6 May 2022 07:19:25 +0200 (CEST)",
            "from us-smtp-delivery-74.mimecast.com\n\t(us-smtp-delivery-74.mimecast.com [170.10.133.74])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 829A865649\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  6 May 2022 07:19:24 +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.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n\tus-mta-394-1tJWtS3lOHK6ZPPmyIZnfQ-1; Fri, 06 May 2022 01:19:22 -0400",
            "from smtp.corp.redhat.com\n\t(int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5D11F8001EA;\n\tFri,  6 May 2022 05:19:22 +0000 (UTC)",
            "from fedora.redhat.com (unknown [10.39.192.101])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id DD8402166B1A;\n\tFri,  6 May 2022 05:19:19 +0000 (UTC)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1651814366;\n\tbh=ZGem10q5WiPOC/d2uCOAfYfrTHlzxaLoBKgTMKV7uL0=;\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=GEJnfKaIo1kCG6T3JyzNjV3nZfID2izfk9ciYshWI3l4ALZnEfIccm23bwJp9Ohic\n\t4J/sZW49VfftCjL/dHpf1X8ZxAi4XCzIcA5RtxF+wLGVu0gWLjq7AOAxnXxHfnFgUL\n\tmKyn0n3aKYcbW0gbooQakPKPQLVHepV3OLFqbgJIeZ2SUzllhrp6tF7+32BNhgCv+j\n\txhRcmkqCS8PHOmWi8lb7Jf8M6GvCYNr3CRptCUb7WZpd/tSojAN1oVln9eHaVl6z3J\n\t6RMuk/uEk+tymtC/q7RKJCw3FxyKGOzM3ChIOS8zIGhgPojDLbJaiq9ygaTY8o+Ov3\n\tVQgBUSKv0ZufQ==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1651814363;\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=cQ9ZrM0EBcsJIxhSzclD3wJkVaHwjYhhItKbzmRLEzo=;\n\tb=DHPWrOAKCqNe8riYrpxptNzOhJjj6IAPP/g+0arV1/AN92NApQSAf9cpttjH6KNfKIZ6jS\n\tFMRHgNAOc8Sk/7SfB5epU3F2JN8q+tl0oidjpPGu41JCaRH/CMy971YZ1wZpGetxfXoi8j\n\t+o+bWHSm57/cNcsXDurWChAwGjcYLjw="
        ],
        "Authentication-Results": [
            "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"DHPWrOAK\"; \n\tdkim-atps=neutral",
            "relay.mimecast.com;\n\tauth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hpa@redhat.com"
        ],
        "X-MC-Unique": "1tJWtS3lOHK6ZPPmyIZnfQ-1",
        "To": "libcamera devel <libcamera-devel@lists.libcamera.org>,\n\tJean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>,\n\tHans De Goede <hdegoede@redhat.com>",
        "Date": "Fri,  6 May 2022 13:18:40 +0800",
        "Message-Id": "<20220506051841.70792-3-hpa@redhat.com>",
        "In-Reply-To": "<20220506051841.70792-1-hpa@redhat.com>",
        "References": "<20220506051841.70792-1-hpa@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.78 on 10.11.54.6",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain; charset=\"US-ASCII\"; x-default=true",
        "Subject": "[libcamera-devel] [PATCH v2 2/3] ipa: ipu3: af: Trigger AF after\n\tAGC is stable",
        "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": "Kate Hsuan via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Kate Hsuan <hpa@redhat.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "AGC stable status is used to determine that AF is triggered or paused.\nIf AGC is ready, AF can start to evaluate the lens position.\n\nSigned-off-by: Kate Hsuan<hpa@redhat.com>\n---\n src/ipa/ipu3/algorithms/af.cpp | 12 ++++++++++++\n src/ipa/ipu3/algorithms/af.h   |  2 ++\n 2 files changed, 14 insertions(+)",
    "diff": "diff --git a/src/ipa/ipu3/algorithms/af.cpp b/src/ipa/ipu3/algorithms/af.cpp\nindex f700b01f..8cabd064 100644\n--- a/src/ipa/ipu3/algorithms/af.cpp\n+++ b/src/ipa/ipu3/algorithms/af.cpp\n@@ -403,6 +403,16 @@ bool Af::afIsOutOfFocus(IPAContext context)\n \t\treturn false;\n }\n \n+void Af::pause(IPAContext &context)\n+{\n+\tcontext.frameContext.af.focus = focus_;\n+}\n+\n+bool Af::isAgcStable(IPAContext context)\n+{\n+\treturn context.frameContext.agc.stable;\n+}\n+\n /**\n  * \\brief Determine the max contrast image and lens position.\n  * \\param[in] context The IPA context.\n@@ -421,6 +431,8 @@ bool Af::afIsOutOfFocus(IPAContext context)\n  */\n void Af::process(IPAContext &context, const ipu3_uapi_stats_3a *stats)\n {\n+\tif (!isAgcStable(context))\n+\t\tpause(context);\n \t/* Evaluate the AF buffer length */\n \tuint32_t afRawBufferLen = context.configuration.af.afGrid.width *\n \t\t\t\t  context.configuration.af.afGrid.height;\ndiff --git a/src/ipa/ipu3/algorithms/af.h b/src/ipa/ipu3/algorithms/af.h\nindex b85cf941..c1c9d39e 100644\n--- a/src/ipa/ipu3/algorithms/af.h\n+++ b/src/ipa/ipu3/algorithms/af.h\n@@ -44,6 +44,8 @@ private:\n \tdouble afEstimateVariance(Span<const y_table_item_t> y_items, bool isY1);\n \n \tbool afIsOutOfFocus(IPAContext context);\n+\tbool isAgcStable(IPAContext context);\n+\tvoid pause(IPAContext &context);\n \n \t/* VCM step configuration. It is the current setting of the VCM step. */\n \tuint32_t focus_;\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "2/3"
    ]
}