Show a patch.

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

{
    "id": 16608,
    "url": "https://patchwork.libcamera.org/api/patches/16608/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16608/",
    "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": "<20220713084317.24268-11-dse@thaumatec.com>",
    "date": "2022-07-13T08:43:16",
    "name": "[libcamera-devel,v2,10/11] ipa: rkisp1: af: Skip few frames after changing lens position",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "16ce083aeb25bbf304b89b93d82478d35d6a403d",
    "submitter": {
        "id": 126,
        "url": "https://patchwork.libcamera.org/api/people/126/?format=api",
        "name": "Daniel Semkowicz",
        "email": "dse@thaumatec.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/16608/mbox/",
    "series": [
        {
            "id": 3276,
            "url": "https://patchwork.libcamera.org/api/series/3276/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3276",
            "date": "2022-07-13T08:43:06",
            "name": "ipa: rkisp1: Add autofocus algorithm",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/3276/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16608/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16608/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 5EF5FBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 13 Jul 2022 08:43:52 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2C85C63313;\n\tWed, 13 Jul 2022 10:43:52 +0200 (CEST)",
            "from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com\n\t[IPv6:2a00:1450:4864:20::42c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 035C36332B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Jul 2022 10:43:49 +0200 (CEST)",
            "by mail-wr1-x42c.google.com with SMTP id v16so14439356wrd.13\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Jul 2022 01:43:49 -0700 (PDT)",
            "from localhost.localdomain (ip092042140082.rev.nessus.at.\n\t[92.42.140.82]) by smtp.gmail.com with ESMTPSA id\n\tbg32-20020a05600c3ca000b003a04d19dab3sm5667468wmb.3.2022.07.13.01.43.47\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 13 Jul 2022 01:43:48 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657701832;\n\tbh=m+Xj9uD9TyeuceKfbUq/i9CZdpOv8SWmTrnRRg9kaqQ=;\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=EOPf4IpTni0MbTve1H5U1Hv16pPLp7APovevYx5tDjmbPai4dzIPt3w35SqqZ3et/\n\tHsaG62wzwZlronn3zb5l80KlswQhYyyJxX56jmp6tfWA9S2ZI3VcHgeqTBUG3gHl7x\n\tQWx6sKqDfYT9FyHpTMkTXU5YUWdYXKM01CEgpwhIMa0LMf7KRKutqq38jaVwUe5XEA\n\tE/3E6tmcW3pfP+hf1HNGKg3hULHlr1l7pLRlBUrpRifIB+HS/948fe+0G0uVCajaEI\n\t5ZG/yIqw6tr4oIF9aZDl5Qy6q7LZ9egpUUyBjPd0QnhuMiWHqkAj9gURP6x9paZg8Z\n\tJS5hqZmSwBrBA==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=thaumatec-com.20210112.gappssmtp.com; s=20210112;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=TEGxL/naVQWQr6xucb2l/oPavSBpoOzBqH6+ELsxOok=;\n\tb=j+SzsUAcCBf5txDfkptZX1lcfIyqzZpFWNE8xooIov5+NSNLf/NZ1nlAPPU81ret8u\n\twi8GLBtuNMGm3Z+zEWZ6wuTK8a0/JSktUS7eluXlH3oQqGohGJ89dBYR9GwTXV9kyNAC\n\tmxlGTpZ8pJhVndbU6EJ2tvpHZrm3xbMUHI6kjJdwrndZrEEjWDaefVOxSDBlBlGaiwso\n\tWerZdeAQErT/dy/vBRREceEybQgIBtU4b9+UZ4usue8T0glHqsQwl4tJ7SUPyaVTV7j5\n\taF168FNJ2fnn6QNGFbEsJYj8z1w0OrQWkLJ97aupQ2vh7KszaTrCVohOnEG46TgA2jvt\n\tP+DQ=="
        ],
        "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=\"j+SzsUAc\"; \n\tdkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=TEGxL/naVQWQr6xucb2l/oPavSBpoOzBqH6+ELsxOok=;\n\tb=HBCTrxKfhYwoG/Tq30gzk/a9x+EhIpd2McHLq9I1FS0uBN07dRAI01R5SSo6iqwFrc\n\t6GOp31XwZYXLFXfyp7WK8Kh+98X7yiAAYfk81Y6IS+hksvPCtTmohgODXtohPyhvyyeG\n\ttfZR7h83dG8xyAF8YDtZ5/I2HmrQkvgSXi8Xm0++ZCn6QuVmJXsrmL2jkiOSVRL3vPCe\n\tfrRsX7O7SnUogdbN3A1nKuxkc1jR+6CHYVKT5RKF01QRwt65IrPubhAWIRwLWy3KnGKf\n\tQIGCH2KlGQZ0l+ANrMuXJwFlFcs0pAAOazHwBNeHHhnG41SYoQBn6/Frz7MYxSIuRO1q\n\tV55Q==",
        "X-Gm-Message-State": "AJIora+PuAkPCfhbJ6nVJM7yYoCMBO6MDPfYQ5vz/RSqwzR0cVjDfNk/\n\t1kB3VAnb5F0yJ5LE5W89IAikaRDBSUiJkA==",
        "X-Google-Smtp-Source": "AGRyM1sXVokCw6nXi8XnVOHXewAKHrzTW+POJsPOPis6d+pRWu2r0rHfk5wviIW084OLqjW4ih2L3w==",
        "X-Received": "by 2002:a5d:4344:0:b0:21d:578a:d8b7 with SMTP id\n\tu4-20020a5d4344000000b0021d578ad8b7mr2026751wrr.108.1657701828587; \n\tWed, 13 Jul 2022 01:43:48 -0700 (PDT)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed, 13 Jul 2022 10:43:16 +0200",
        "Message-Id": "<20220713084317.24268-11-dse@thaumatec.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20220713084317.24268-1-dse@thaumatec.com>",
        "References": "<20220713084317.24268-1-dse@thaumatec.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 10/11] ipa: rkisp1: af: Skip few frames\n\tafter changing lens position",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "With 30fps stream, lens movement takes more time than one frame. Skip\nfew frames to allow lens to stabilize before calculating next contrast\nvalue.\n\nSigned-off-by: Daniel Semkowicz <dse@thaumatec.com>\n---\n src/ipa/rkisp1/algorithms/af.cpp | 5 ++++-\n src/ipa/rkisp1/algorithms/af.h   | 2 ++\n 2 files changed, 6 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/ipa/rkisp1/algorithms/af.cpp b/src/ipa/rkisp1/algorithms/af.cpp\nindex cd4f0e08..a0d914e0 100644\n--- a/src/ipa/rkisp1/algorithms/af.cpp\n+++ b/src/ipa/rkisp1/algorithms/af.cpp\n@@ -86,7 +86,10 @@ void Af::process(IPAContext &context,\n \n \tuint32_t lensPosition = processAutofocus(sharpness);\n \n-\tcontext.frameContext.af.focus = lensPosition;\n+\tif (lensPosition != context.frameContext.af.focus) {\n+\t\tcontext.frameContext.af.focus = lensPosition;\n+\t\tsetFramesToSkip(kFLensWaitFrames);\n+\t}\n }\n \n void Af::setMetering(controls::AfMeteringEnum metering)\ndiff --git a/src/ipa/rkisp1/algorithms/af.h b/src/ipa/rkisp1/algorithms/af.h\nindex eeb806c0..36d0c9b0 100644\n--- a/src/ipa/rkisp1/algorithms/af.h\n+++ b/src/ipa/rkisp1/algorithms/af.h\n@@ -36,6 +36,8 @@ private:\n \tRectangle defaultWindow_;\n \tRectangle userWindow_;\n \tbool updateAfwindow_ = false;\n+\n+\tstatic constexpr uint32_t kFLensWaitFrames = 2;\n };\n \n } /* namespace libcamera::ipa::rkisp1::algorithms */\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "10/11"
    ]
}