{"id":18516,"url":"https://patchwork.libcamera.org/api/1.1/patches/18516/?format=json","web_url":"https://patchwork.libcamera.org/patch/18516/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20230331081930.19289-9-dse@thaumatec.com>","date":"2023-03-31T08:19:28","name":"[libcamera-devel,v6,08/10] ipa: rkisp1: Add AF controls to the RkISP1 IPA","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"0fed5963ffa8dec3be63addcfedb42081b2be54e","submitter":{"id":126,"url":"https://patchwork.libcamera.org/api/1.1/people/126/?format=json","name":"Daniel Semkowicz","email":"dse@thaumatec.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/18516/mbox/","series":[{"id":3831,"url":"https://patchwork.libcamera.org/api/1.1/series/3831/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3831","date":"2023-03-31T08:19:21","name":"ipa: rkisp1: Add autofocus algorithm","version":6,"mbox":"https://patchwork.libcamera.org/series/3831/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/18516/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/18516/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 1A67FC32A2\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 31 Mar 2023 08:20:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B650B627B4;\n\tFri, 31 Mar 2023 10:20:00 +0200 (CEST)","from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com\n\t[IPv6:2a00:1450:4864:20::12c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D7C4962767\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 31 Mar 2023 10:19:51 +0200 (CEST)","by mail-lf1-x12c.google.com with SMTP id bi9so27854895lfb.12\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 31 Mar 2023 01:19:51 -0700 (PDT)","from localhost.localdomain ([91.90.166.178])\n\tby smtp.gmail.com with ESMTPSA id\n\tt1-20020ac24c01000000b004e84a8c3d86sm281459lfq.42.2023.03.31.01.19.50\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 31 Mar 2023 01:19:50 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1680250800;\n\tbh=ddO7lhcTqPn3VTiQbDIp4Kz85JQMSb4v8yRyNascC0w=;\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=RZ/h4Ej1AUO7BKMfcdK7fNEGdOTK7gluACtM/HCI2QtUa/lsCdn1BD7dkNljs0qqm\n\tJqeN2jtoIAcb9HSn+AXi+du8lTRAieAOXQWv2NN5AQpE0LzOrNelrUhgck2IOP+TcW\n\t4mSOEoZGpf2w7S5IGfBf+XAcB5o6TTyAaNqM6aoPWI3Y2ixWpINbce5Y5osd2Uo8Y8\n\th2WwLM+ehAdwfdg8aBkSLP+eAYY51Psst3Dpz06N0VW/Ng0VZCyyHknS3TT2VE93JE\n\t1HjlxXGPjqYP1pdMzvZW7NvRPGP5bgj5dhf1cD5qSipi2dp+CFDvIrihBmefxv2l15\n\tGFt+EDBEMCBqw==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=thaumatec-com.20210112.gappssmtp.com; s=20210112; t=1680250791;\n\tx=1682842791; \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=+vsWWrTWtLRSMEpTx2i8HEygt1ysKs5UmI4Wea6ETIw=;\n\tb=6Bn+nXjLWAjkd3aJSiMG8AO7xb57/xyzy65JVYi+mGHrmqZIGTkcdhsqwG0V7fhLyb\n\tE8xLVX2vmM1aM9Z50UVnnLdU4osgt4hR0xScKO7gt43EuDF6PnVIEfqZurWWL7wJ06ok\n\tHWU2FQu6QnTy86h87WNPq+3OfQuUC4ayKfuwI1kcWtVs9RMSLQi0eA+vlM5rqFt48iBZ\n\tSe4T0SBiwftzkOKCqd7nrN5gKWlNOB5kd43t5lDevEDSRjfc0/fcFM/JTtnFguMmt24A\n\tsLiOB6oRQtkOB7rgtLVYW4AJpcuk203l1bbTw9SaTbjagQd6waCw3ld61b9LQwpLTziS\n\ts7bw=="],"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=\"6Bn+nXjL\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112; t=1680250791; x=1682842791;\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=+vsWWrTWtLRSMEpTx2i8HEygt1ysKs5UmI4Wea6ETIw=;\n\tb=MdYI13BcNjCVRZeoVKhrfBmRJDGZ5zrmiL22UnPWtzdasUdv+BGUlt0D70S+lQrrxf\n\tmve8vPsEeVqWrx4uw/hSWmXfP2oNYaqZhRWEIjit/w7FQkqVIUvnarX5kBGbCX7p0LTi\n\tLbSl9FpH2/l577NygFWjVs/3qEY46fJGMiLfQoty9UDftwD7Egvy7QUkVSVMikzdEf0r\n\thduD/MeuCcOkHBCuYQJiC6GroklmJWyqIgjpsYprNHGoowhk4oZE2US1HVgO34zERKLh\n\t7dlUJbUgkpIxvxwBYgznjjzVWYDcVG2xOLDi+swyFlHXUTH0Wj05xJmKyo6/2elZLkzX\n\t7UVg==","X-Gm-Message-State":"AAQBX9esQo0DHxMhI0FfiP1b6T+tbsEY2u56DqD60zvSf/lTD8VM9O5X\n\tG/8lMSP7OnNmY1fQRIX1+JUSpYdaGy+4iGLP5FHT/A==","X-Google-Smtp-Source":"AKy350b/a2EP7/0m0rW+nFgsiFQJSCb8H2hu/nQeai9m1NRY66+bpER/mczdOfWroh/fIbtXe5KxIg==","X-Received":"by 2002:ac2:5551:0:b0:4dd:cef0:c27c with SMTP id\n\tl17-20020ac25551000000b004ddcef0c27cmr7147849lfk.33.1680250791173; \n\tFri, 31 Mar 2023 01:19:51 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 31 Mar 2023 10:19:28 +0200","Message-Id":"<20230331081930.19289-9-dse@thaumatec.com>","X-Mailer":"git-send-email 2.39.2","In-Reply-To":"<20230331081930.19289-1-dse@thaumatec.com>","References":"<20230331081930.19289-1-dse@thaumatec.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v6 08/10] ipa: rkisp1: Add AF controls to\n\tthe RkISP1 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":"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":"Add controls supported by the AF algorithm to the list of controls\nsupported by the RkISP1 IPA. This exposes the AF controls to the user\nand allows controlling the AF algorithm using the top level API.\n\nSigned-off-by: Daniel Semkowicz <dse@thaumatec.com>\n---\n src/ipa/rkisp1/rkisp1.cpp | 22 ++++++++++++++++++++++\n 1 file changed, 22 insertions(+)","diff":"diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex 292768cf..9c8b4a82 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -456,6 +456,28 @@ void IPARkISP1::updateControls(const IPACameraSensorInfo &sensorInfo,\n \t\t\t\t\t\t\t      frameDurations[1],\n \t\t\t\t\t\t\t      frameDurations[2]);\n \n+\tif (lensControls_) {\n+\t\tconst ControlInfo &focusAbsolute =\n+\t\t\tlensControls_->at(V4L2_CID_FOCUS_ABSOLUTE);\n+\n+\t\tusing namespace controls;\n+\n+\t\tctrlMap[&AfMetering] = ControlInfo(AfMeteringValues);\n+\t\tctrlMap[&AfMode] = ControlInfo(AfModeValues);\n+\t\tctrlMap[&AfPause] = ControlInfo(\n+\t\t\tSpan<const ControlValue>{\n+\t\t\t\t{ static_cast<int32_t>(AfPauseImmediate),\n+\t\t\t\t  static_cast<int32_t>(AfPauseResume) } });\n+\t\tctrlMap[&AfTrigger] = ControlInfo(AfTriggerValues);\n+\t\tctrlMap[&AfWindows] = ControlInfo(\n+\t\t\tRectangle(), Rectangle(sensorInfo.outputSize),\n+\t\t\tRectangle());\n+\t\tctrlMap[&LensPosition] = ControlInfo(\n+\t\t\tstatic_cast<float>(focusAbsolute.min().get<int32_t>()),\n+\t\t\tstatic_cast<float>(focusAbsolute.max().get<int32_t>()),\n+\t\t\tstatic_cast<float>(focusAbsolute.def().get<int32_t>()));\n+\t}\n+\n \t*ipaControls = ControlInfoMap(std::move(ctrlMap), controls::controls);\n }\n \n","prefixes":["libcamera-devel","v6","08/10"]}