[{"id":26815,"web_url":"https://patchwork.libcamera.org/comment/26815/","msgid":"<20230403093709.f64codbt43ouy7a4@uno.localdomain>","date":"2023-04-03T09:37:09","subject":"Re: [libcamera-devel] [PATCH v6 08/10] ipa: rkisp1: Add AF controls\n\tto the RkISP1 IPA","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Daniel\n\nOn Fri, Mar 31, 2023 at 10:19:28AM +0200, Daniel Semkowicz via libcamera-devel wrote:\n> Add controls supported by the AF algorithm to the list of controls\n> supported by the RkISP1 IPA. This exposes the AF controls to the user\n> and allows controlling the AF algorithm using the top level API.\n>\n> Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>\n> ---\n>  src/ipa/rkisp1/rkisp1.cpp | 22 ++++++++++++++++++++++\n>  1 file changed, 22 insertions(+)\n>\n> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> index 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\nI wonder if the ISP doesn't have a minimum valid window size..\n\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\nWe're here exposing the values as they come from the v4l2 control\ninterface. We should get to a point where we have a CameraLensHelper\nlike we have CameraSensorHelpers to translate the platform-specific\nvalue to a generic value. I can add a \\todo when applying if you agree\nwith this.\n\nThe rest looks good\n\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\nThanks\n  j\n\n\n> +\t}\n> +\n>  \t*ipaControls = ControlInfoMap(std::move(ctrlMap), controls::controls);\n>  }\n>\n> --\n> 2.39.2\n>","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 B5E59C326B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  3 Apr 2023 09:37:14 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2133A6271C;\n\tMon,  3 Apr 2023 11:37:14 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 485BB61EC6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  3 Apr 2023 11:37:12 +0200 (CEST)","from ideasonboard.com (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C57AC6CF;\n\tMon,  3 Apr 2023 11:37:11 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1680514634;\n\tbh=KkW63wO29ztnzi0YkAJ1X/7KB2/TNvYQD82Hw26U1Hk=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=ZgKmt1TB87k6AqvzYBeQte9xJiq3SRFZPpZzmW4cb3yj4DmVQfdBy+FwIupYnlPyO\n\tPXyDgQOqGgaDIfQLpQKjrsnJFyH8Ux0VSigxPHJ3CSMIo1irilG9f9ljp5d6xj0rkL\n\tK01bhhOadVTRxZSyVfQku9HLP9jsVbNgr2R3LxvtXl1ndemoaVlNM8KclVf+gThHFZ\n\txu1+HWm+irg3Y8xOT7fPxHW7rDBjwhJegiEsyfvkfkKnPUbH/4S+JnCMOlexjdnUXe\n\tzsMEAenY//awRrhlqnOvePaqoN2W7g6oazVLCIhzJ4ar1lqWQywXftmS+7fVy44LkG\n\tQx1/83ykGM1Ag==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1680514631;\n\tbh=KkW63wO29ztnzi0YkAJ1X/7KB2/TNvYQD82Hw26U1Hk=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=YLGfpGUErAZLhv85b9jedtr6vRVMTa/yh8WfIgUsC1liuhaRZDbj2JtneDp1MYOwA\n\tjR0oHAwBblYDHJPl5cui4J1FlAejKPFwANEqSD49619tGnh+Hw0Fy5IMS/PJXM1q7W\n\tfoY+JWCdHVa0SAkdEeB1W9IKwrJtE0Jb8XVaYs7c="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"YLGfpGUE\"; dkim-atps=neutral","Date":"Mon, 3 Apr 2023 11:37:09 +0200","To":"Daniel Semkowicz <dse@thaumatec.com>","Message-ID":"<20230403093709.f64codbt43ouy7a4@uno.localdomain>","References":"<20230331081930.19289-1-dse@thaumatec.com>\n\t<20230331081930.19289-9-dse@thaumatec.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230331081930.19289-9-dse@thaumatec.com>","Subject":"Re: [libcamera-devel] [PATCH v6 08/10] ipa: rkisp1: Add AF controls\n\tto the 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":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26836,"web_url":"https://patchwork.libcamera.org/comment/26836/","msgid":"<CAHgnY3=ArhUiEA5d+7vTKZ5tvOBALPYJwXDLGYVwzFAa+r6QUg@mail.gmail.com>","date":"2023-04-04T09:49:59","subject":"Re: [libcamera-devel] [PATCH v6 08/10] ipa: rkisp1: Add AF controls\n\tto the RkISP1 IPA","submitter":{"id":126,"url":"https://patchwork.libcamera.org/api/people/126/","name":"Daniel Semkowicz","email":"dse@thaumatec.com"},"content":"Hi Jacopo,\n\nOn Mon, Apr 3, 2023 at 11:37 AM Jacopo Mondi\n<jacopo.mondi@ideasonboard.com> wrote:\n>\n> Hi Daniel\n>\n> On Fri, Mar 31, 2023 at 10:19:28AM +0200, Daniel Semkowicz via libcamera-devel wrote:\n> > Add controls supported by the AF algorithm to the list of controls\n> > supported by the RkISP1 IPA. This exposes the AF controls to the user\n> > and allows controlling the AF algorithm using the top level API.\n> >\n> > Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>\n> > ---\n> >  src/ipa/rkisp1/rkisp1.cpp | 22 ++++++++++++++++++++++\n> >  1 file changed, 22 insertions(+)\n> >\n> > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> > index 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> >                                                             frameDurations[1],\n> >                                                             frameDurations[2]);\n> >\n> > +     if (lensControls_) {\n> > +             const ControlInfo &focusAbsolute =\n> > +                     lensControls_->at(V4L2_CID_FOCUS_ABSOLUTE);\n> > +\n> > +             using namespace controls;\n> > +\n> > +             ctrlMap[&AfMetering] = ControlInfo(AfMeteringValues);\n> > +             ctrlMap[&AfMode] = ControlInfo(AfModeValues);\n> > +             ctrlMap[&AfPause] = ControlInfo(\n> > +                     Span<const ControlValue>{\n> > +                             { static_cast<int32_t>(AfPauseImmediate),\n> > +                               static_cast<int32_t>(AfPauseResume) } });\n> > +             ctrlMap[&AfTrigger] = ControlInfo(AfTriggerValues);\n> > +             ctrlMap[&AfWindows] = ControlInfo(\n> > +                     Rectangle(), Rectangle(sensorInfo.outputSize),\n>\n> I wonder if the ISP doesn't have a minimum valid window size..\n\nUnfortunately, I did not find any documentation on that.\nOnly the window margins.\n\n>\n> > +                     Rectangle());\n> > +             ctrlMap[&LensPosition] = ControlInfo(\n> > +                     static_cast<float>(focusAbsolute.min().get<int32_t>()),\n> > +                     static_cast<float>(focusAbsolute.max().get<int32_t>()),\n> > +                     static_cast<float>(focusAbsolute.def().get<int32_t>()));\n>\n> We're here exposing the values as they come from the v4l2 control\n> interface. We should get to a point where we have a CameraLensHelper\n> like we have CameraSensorHelpers to translate the platform-specific\n> value to a generic value. I can add a \\todo when applying if you agree\n> with this.\n\nYes, I agree. For now, let's start with something basic that works :)\n\n>\n> The rest looks good\n>\n> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n>\n> Thanks\n>   j\n>\n>\n> > +     }\n> > +\n> >       *ipaControls = ControlInfoMap(std::move(ctrlMap), controls::controls);\n> >  }\n> >\n> > --\n> > 2.39.2\n> >\n\nBest regards\nDaniel","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 E595CC326B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  4 Apr 2023 09:50:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2DF6262724;\n\tTue,  4 Apr 2023 11:50:12 +0200 (CEST)","from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com\n\t[IPv6:2a00:1450:4864:20::52f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5C1D5626DA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  4 Apr 2023 11:50:11 +0200 (CEST)","by mail-ed1-x52f.google.com with SMTP id er13so87171153edb.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 04 Apr 2023 02:50:11 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1680601812;\n\tbh=YTn1SyV9b98aqefkUBULuMi4mJniyV6VRqvfhFbftU4=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=lI/eBtiHrhrOVDkeq52a0AyfJA4ith4ckHWxb5yCK4vooPj8sowr1bVy/uF8I1znq\n\tEBhPNTKHcnka1YOG5ExfFjDLK5+xEtL74NaOmS56Xv+TQPwMVRCxqGLP2RsdC5fgRQ\n\tkLhJ8dwma+QV3NY4RCHFrjAgF36W0E+keDPnl3HuMvLCLG9bmg7hhogjJRQQMdBVXt\n\tRrPZ0AG04yobCT02jv4CqGmwMhMSTaL/R/y5GkPT+OCkiEpt27zA/IU1WmhXxPUfYC\n\t8Z47VKwsUrXGj7/Z0JN6VBO2ywfHQ3ZWI3vls8wqBkdTaGiyeoj6+rGqYQp1ZXY4fs\n\t2la1q5r6ZYYbg==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=thaumatec-com.20210112.gappssmtp.com; s=20210112; t=1680601811;\n\tx=1683193811; \n\th=content-transfer-encoding:cc:to:subject:message-id:date:from\n\t:in-reply-to:references:mime-version:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=ohvqwPEwidFI1+GwmhJF4QHVPG2xeBV5aWAC4s5yuvs=;\n\tb=NvzgtRCjZrlQRhBE4TXzJc4ibXyvgc0enmYMcDW+eBYvmuhdO2Lq4HUR3z4Swy0vVL\n\t/G2mh2H3cc6svrCCxaYUALJU6nuMAMn9NK8yYG4bFOib3axRWef++FN8X3RO2gPzHlmS\n\t6eXnd72qenmAPA4oB3JCVAKrNRVbqcCFLCDDhzlUB6sjAoMWpQ/6+r+jJCvsZlW0UTf8\n\tQjd/lj0qeN84SPi570ugEIDSMxtDbbsLjqioSaMCqE0VaYVHDMZKqVmVOJIZdUYyEJDP\n\tZruzlLXP/srtp9vPXLk7fiyMP0Z5zABWaIX3QLX3C2YnlKuLep87+oPTEMghlWvbDoWX\n\tUXHA=="],"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=\"NvzgtRCj\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112; t=1680601811; x=1683193811;\n\th=content-transfer-encoding:cc:to:subject:message-id:date:from\n\t:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=ohvqwPEwidFI1+GwmhJF4QHVPG2xeBV5aWAC4s5yuvs=;\n\tb=isppC6hAdLTq8WJTuDB8lDgXQLzwQL/9dkQjtU8rTPCYP4tDQBSUGMTyrlmB7EZ47z\n\tTu48v9KioHFNp6FjOCqujK7RFickxy7QvLdLxG1LKvEUDXbOBoc9b4NuPY7FK6x5H3Jg\n\tWeX5vn+YBJMXY0ijwAmlvXcjAz9Z9YCYKmsRiDpQ8EKrBBNt+6k2/gBGIvWKSk1Wf/gV\n\t8bDbRo3+PHBLa8Dbbxa2ahNIILTEVeZKZDXJKSM262uzUhJVc2w6SvADkhQqRKOTu85w\n\texJeBE/chBxXKZ9cRoBtGg3VHGQ6Pvh26lawWZfx545k4/GuLiXHCv29ncTUQc760CAb\n\tBQpw==","X-Gm-Message-State":"AAQBX9dDF+Jp4xlLMMglxN/HVDFDE5aaD0Q/7m3Hk+cLKS+ViEm4wMwS\n\tMxLrhCyXXhS8PpiDTBCzlOzG9/KTzmfIRmEhWGeXqx8SnpmrPbmEdE1wHQ==","X-Google-Smtp-Source":"AKy350bliybklaS1f5MtfnAxya9yFlnLt/5rrC6pisLiwh+LNmCLIdOCHHbIG3C6HntogXykbb38aTkYErfTuv4nQQs=","X-Received":"by 2002:a17:907:6b8f:b0:932:4577:6705 with SMTP id\n\trg15-20020a1709076b8f00b0093245776705mr968190ejc.6.1680601810912;\n\tTue, 04 Apr 2023 02:50:10 -0700 (PDT)","MIME-Version":"1.0","References":"<20230331081930.19289-1-dse@thaumatec.com>\n\t<20230331081930.19289-9-dse@thaumatec.com>\n\t<20230403093709.f64codbt43ouy7a4@uno.localdomain>","In-Reply-To":"<20230403093709.f64codbt43ouy7a4@uno.localdomain>","Date":"Tue, 4 Apr 2023 11:49:59 +0200","Message-ID":"<CAHgnY3=ArhUiEA5d+7vTKZ5tvOBALPYJwXDLGYVwzFAa+r6QUg@mail.gmail.com>","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","Subject":"Re: [libcamera-devel] [PATCH v6 08/10] ipa: rkisp1: Add AF controls\n\tto the 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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":27146,"web_url":"https://patchwork.libcamera.org/comment/27146/","msgid":"<CAHgnY3nFV8cP_uRg069WYDMpwMOTfgg2snv-VCE=D-gyLJgfBg@mail.gmail.com>","date":"2023-05-26T10:58:25","subject":"Re: [libcamera-devel] [PATCH v6 08/10] ipa: rkisp1: Add AF controls\n\tto the RkISP1 IPA","submitter":{"id":126,"url":"https://patchwork.libcamera.org/api/people/126/","name":"Daniel Semkowicz","email":"dse@thaumatec.com"},"content":"Hello Laurent,\n\nOn Wed, Apr 26, 2023 at 5:58 AM Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> Hi Daniel,\n>\n> Thank you for the patch.\n>\n> On Tue, Apr 04, 2023 at 11:49:59AM +0200, Daniel Semkowicz via libcamera-devel wrote:\n> > On Mon, Apr 3, 2023 at 11:37 AM Jacopo Mondi wrote:\n> > > On Fri, Mar 31, 2023 at 10:19:28AM +0200, Daniel Semkowicz via libcamera-devel wrote:\n> > > > Add controls supported by the AF algorithm to the list of controls\n> > > > supported by the RkISP1 IPA. This exposes the AF controls to the user\n> > > > and allows controlling the AF algorithm using the top level API.\n> > > >\n> > > > Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>\n> > > > ---\n> > > >  src/ipa/rkisp1/rkisp1.cpp | 22 ++++++++++++++++++++++\n> > > >  1 file changed, 22 insertions(+)\n> > > >\n> > > > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> > > > index 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> > > >                                                             frameDurations[1],\n> > > >                                                             frameDurations[2]);\n> > > >\n> > > > +     if (lensControls_) {\n> > > > +             const ControlInfo &focusAbsolute =\n> > > > +                     lensControls_->at(V4L2_CID_FOCUS_ABSOLUTE);\n> > > > +\n> > > > +             using namespace controls;\n> > > > +\n> > > > +             ctrlMap[&AfMetering] = ControlInfo(AfMeteringValues);\n> > > > +             ctrlMap[&AfMode] = ControlInfo(AfModeValues);\n> > > > +             ctrlMap[&AfPause] = ControlInfo(\n> > > > +                     Span<const ControlValue>{\n> > > > +                             { static_cast<int32_t>(AfPauseImmediate),\n> > > > +                               static_cast<int32_t>(AfPauseResume) } });\n> > > > +             ctrlMap[&AfTrigger] = ControlInfo(AfTriggerValues);\n> > > > +             ctrlMap[&AfWindows] = ControlInfo(\n> > > > +                     Rectangle(), Rectangle(sensorInfo.outputSize),\n> > >\n> > > I wonder if the ISP doesn't have a minimum valid window size..\n> >\n> > Unfortunately, I did not find any documentation on that.\n> > Only the window margins.\n>\n> There doesn't seem to be a minimum size other than (1, 1), as it makes\n> no sense to compute AF stats on an empty window. I'd set the minimum to\n> that value.\n>\n> > > > +                     Rectangle());\n>\n> The default should match the 3/4 of the image used by default by the AF\n> algorithm.\n>\n> > > > +             ctrlMap[&LensPosition] = ControlInfo(\n> > > > +                     static_cast<float>(focusAbsolute.min().get<int32_t>()),\n> > > > +                     static_cast<float>(focusAbsolute.max().get<int32_t>()),\n> > > > +                     static_cast<float>(focusAbsolute.def().get<int32_t>()));\n> > >\n> > > We're here exposing the values as they come from the v4l2 control\n> > > interface. We should get to a point where we have a CameraLensHelper\n> > > like we have CameraSensorHelpers to translate the platform-specific\n> > > value to a generic value. I can add a \\todo when applying if you agree\n> > > with this.\n> >\n> > Yes, I agree. For now, let's start with something basic that works :)\n>\n> We don't have to calibrate the values yet, but they should already be\n> expressed in 1/distance units.\n>\n> > > The rest looks good\n> > >\n> > > Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> > >\n> > > > +     }\n> > > > +\n> > > >       *ipaControls = ControlInfoMap(std::move(ctrlMap), controls::controls);\n> > > >  }\n> > > >\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\n\nThank you for the review.\nThese comments are reasonable. I will correct the code according\nto the comments.\n\nBest regards\nDaniel","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 178BDC31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 26 May 2023 10:58:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 87304626F5;\n\tFri, 26 May 2023 12:58:38 +0200 (CEST)","from mail-ej1-x630.google.com (mail-ej1-x630.google.com\n\t[IPv6:2a00:1450:4864:20::630])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6EDC9626F4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 26 May 2023 12:58:37 +0200 (CEST)","by mail-ej1-x630.google.com with SMTP id\n\ta640c23a62f3a-96f850b32caso107753666b.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 26 May 2023 03:58:37 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1685098718;\n\tbh=hQXvUkDOJFaU8oITTxKwf1FWs0mfTTnP67/nFLAmt+0=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=fzhMVZ18NOZG0V5+5QeY3U/knOSGGhpDll/lhSOneFTu4ap7kn8owpwhjzfBiOhSR\n\tzSCUl8PcjTbLTgsj96O1bECdNYJbuHa4Hni82iVPeG7Yixq7kVgRo8pb9KriCQiJTF\n\tQjTsu1acDcZxO+Tlxt3rWfEP7DHTRUci9zRtMzz/k1xna3EphhpFB42+wox2u+ZnAY\n\tz6Eq8KKQhsUR7xDZWw4bMJpGFv5R4aq0iUfPn6Lewl/aURpTNgNy53lRq7FHaoscaM\n\tp9V9DbgYOuTRBUMyBPAEBU+crAe8LQDcV4tANy6DHpc1aVGL+wS0Crxb6zC7YVkpHW\n\tAGshCAl4JidNQ==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=thaumatec-com.20221208.gappssmtp.com; s=20221208; t=1685098717;\n\tx=1687690717; \n\th=content-transfer-encoding:cc:to:subject:message-id:date:from\n\t:in-reply-to:references:mime-version:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=UaEpUCePYNBO2bSK5SqmAdIIh0GXNeyzCk+MFHrn0ps=;\n\tb=FadxPj3YhW6H1nz+/HEebgTqLYyJFINl1xN60KxKbLSpjAEPpQFRWI+YEZWTWN9mjd\n\tv0oZwr/B/lPuBKb4LirlwMZGt25I4WjeHn8Imp/RcxzHkdkfrCbLdb4Zo4ogFWZJ1SSW\n\tz1TN6vhXW/ZccUKSbgD9VW77cN2fGCgG4ciAwGUe9pyRXijqf33NQPu+UY4zMfDyKDyz\n\tp4r6oH1gpXxZFrkmJxRM1UtUzYox9ClLlTr3m9K3dR1AolSSNzB21cj7OxyvBd2Ta4cK\n\tmj8Jph6IuAg1vBOMJYP8ztgALmMStKEORgM3GJ4Twi7RC+cPeEg6lUnvmWrkA79pntuM\n\txmiw=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=thaumatec-com.20221208.gappssmtp.com\n\theader.i=@thaumatec-com.20221208.gappssmtp.com header.b=\"FadxPj3Y\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1685098717; x=1687690717;\n\th=content-transfer-encoding:cc:to:subject:message-id:date:from\n\t:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=UaEpUCePYNBO2bSK5SqmAdIIh0GXNeyzCk+MFHrn0ps=;\n\tb=MG9AeVS4+HSFtPoN+DILKN0IeUWqavOisVEm1pHMdyWur4sOD8EFvOYkyB3R+A+Cg8\n\tnbW33X/CMP+tT28X/GxjazcCZGVljf5cumMH9XsH2KuiOAetX3vWsxu6Ps3jV0JWarkr\n\tg2Tf/e6Y1dVKh8r3L5XRCh+wxbzwFChtB+OUD17PyYUnh9YzpmvsaG2c2E15nJ+LKg/F\n\tN6qXHsanDyRTfeDlDaw5rGabMacgeK2Kby2OdZuMBzMMj4ZBpbaA82YcrDHvRKmCWOIC\n\tOrJ1x1qUTzrNamOYUDGxqnMC7IHjLVj5P2vm4TJhSClAkb7vENvpoi0328fZJW12093L\n\ttVoQ==","X-Gm-Message-State":"AC+VfDyNmxr3mnaZ7sr5ggSPvLz++d2dN2fx7GP5o1erqQLITvY9prA0\n\tWePnuCwN6h3sDIS9znuQmafdULUPXbwq3E1F1PGkhXAs9Zov3qRxgDN9ow==","X-Google-Smtp-Source":"ACHHUZ7TIlmkIQ27Yk034pnQaMwf3gEj3SJYxe09SZIXv17ao5Agq8yleqsu+zj+KcqH60V17cuNXwLIccME8+SPrrY=","X-Received":"by 2002:a17:907:9345:b0:956:fbd7:bc5e with SMTP id\n\tbv5-20020a170907934500b00956fbd7bc5emr1685258ejc.64.1685098716863;\n\tFri, 26 May 2023 03:58:36 -0700 (PDT)","MIME-Version":"1.0","References":"<20230331081930.19289-1-dse@thaumatec.com>\n\t<20230331081930.19289-9-dse@thaumatec.com>\n\t<20230403093709.f64codbt43ouy7a4@uno.localdomain>\n\t<CAHgnY3=ArhUiEA5d+7vTKZ5tvOBALPYJwXDLGYVwzFAa+r6QUg@mail.gmail.com>\n\t<20230426035813.GH1667@pendragon.ideasonboard.com>","In-Reply-To":"<20230426035813.GH1667@pendragon.ideasonboard.com>","Date":"Fri, 26 May 2023 12:58:25 +0200","Message-ID":"<CAHgnY3nFV8cP_uRg069WYDMpwMOTfgg2snv-VCE=D-gyLJgfBg@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","Subject":"Re: [libcamera-devel] [PATCH v6 08/10] ipa: rkisp1: Add AF controls\n\tto the 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>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]