[{"id":23885,"web_url":"https://patchwork.libcamera.org/comment/23885/","msgid":"<20220714183003.jz4gx5qfvl7qmyz5@uno.localdomain>","date":"2022-07-14T18:30:03","subject":"Re: [libcamera-devel] [PATCH v2 04/11] pipeline: rkisp1: Add basic\n\tAF controls to the supported controls list","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Daniel,\n\nOn Wed, Jul 13, 2022 at 10:43:10AM +0200, Daniel Semkowicz via libcamera-devel wrote:\n> This will expose the AF controls and will allow controlling them using\n> the top level API.\n>\n> Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>\n> ---\n>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 10 ++++++----\n>  1 file changed, 6 insertions(+), 4 deletions(-)\n>\n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> index 7ee80192..99d66b1d 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> @@ -958,10 +958,12 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)\n>  \tstd::unique_ptr<RkISP1CameraData> data =\n>  \t\tstd::make_unique<RkISP1CameraData>(this, &mainPath_, &selfPath_);\n>\n> -\tControlInfoMap::Map ctrls;\n> -\tctrls.emplace(std::piecewise_construct,\n> -\t\t      std::forward_as_tuple(&controls::AeEnable),\n> -\t\t      std::forward_as_tuple(false, true));\n> +\tControlInfoMap::Map ctrls({\n> +\t\t{ &controls::AeEnable, ControlInfo(false, true) },\n> +\t\t{ &controls::AfMode, ControlInfo(controls::AfModeValues) },\n> +\t\t{ &controls::AfTrigger, ControlInfo(controls::AfTriggerValues) },\n> +\t\t{ &controls::AfPause, ControlInfo(controls::AfPauseValues) }\n\nDoes the algorithm support continuous auto-focus ? Has it been tested ?\nI've been told by those who tried implement it (RPi) that without PDAF\nstatistics from the sensor it's rather hard to get it right.\n\nIf the algorithm does not support it I would drop AfPause as it's\nonly useful for CAF (and the associated functions should probably be\nremoved along the class hierarchy as well maybe)\n\n> +\t});\n>\n>  \tdata->controlInfo_ = ControlInfoMap(std::move(ctrls),\n>  \t\t\t\t\t    controls::controls);\n> --\n> 2.34.1\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 D31E9BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 14 Jul 2022 18:30:08 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 449C963312;\n\tThu, 14 Jul 2022 20:30:08 +0200 (CEST)","from relay11.mail.gandi.net (relay11.mail.gandi.net\n\t[IPv6:2001:4b98:dc4:8::231])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 230246330D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 Jul 2022 20:30:06 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 55D28100004;\n\tThu, 14 Jul 2022 18:30:05 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657823408;\n\tbh=D0BAY7b5C+VQLLsIqlucXTkrR7UEIPbwXtoIA9Lrmjc=;\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=VswAPInmAZw34atzrOdV5PZi8mFKF2Dva6z7tOM3zysJTKwf99/DP0UEMVYYcvj02\n\tHMkS5ysG0BVf4KZThUAsoE7PElCLdQ0F/zcoA8zhSsXVf8z4Apl+azg37ztYbQinug\n\tp143njEsrhs33t6HLiBFwg5/XMEqGMInh6wtSw8Qw7q5REJobV4LHYZhbT3rNs6Dyh\n\tVkq9JMizrslFVcMB+3MnOTIlsdKcf4smPUSGc5IsDN7hfDlSXoWwdjs7V6bETTMfgL\n\tVVgdJUXEv9+OFhvqbKIcbdgYpeQqkGbhSY9gUrU2I/NEBtuhHI1pAibfm+OOlVOR5P\n\tf41vBEAE6FHBQ==","Date":"Thu, 14 Jul 2022 20:30:03 +0200","To":"Daniel Semkowicz <dse@thaumatec.com>","Message-ID":"<20220714183003.jz4gx5qfvl7qmyz5@uno.localdomain>","References":"<20220713084317.24268-1-dse@thaumatec.com>\n\t<20220713084317.24268-5-dse@thaumatec.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220713084317.24268-5-dse@thaumatec.com>","Subject":"Re: [libcamera-devel] [PATCH v2 04/11] pipeline: rkisp1: Add basic\n\tAF controls to the supported controls list","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@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":23893,"web_url":"https://patchwork.libcamera.org/comment/23893/","msgid":"<165783848912.3944957.2092346887013083056@Monstersaurus>","date":"2022-07-14T22:41:29","subject":"Re: [libcamera-devel] [PATCH v2 04/11] pipeline: rkisp1: Add basic\n\tAF controls to the supported controls list","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Jacopo Mondi via libcamera-devel (2022-07-14 19:30:03)\n> Hi Daniel,\n> \n> On Wed, Jul 13, 2022 at 10:43:10AM +0200, Daniel Semkowicz via libcamera-devel wrote:\n> > This will expose the AF controls and will allow controlling them using\n> > the top level API.\n> >\n> > Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>\n> > ---\n> >  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 10 ++++++----\n> >  1 file changed, 6 insertions(+), 4 deletions(-)\n> >\n> > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > index 7ee80192..99d66b1d 100644\n> > --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > @@ -958,10 +958,12 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)\n> >       std::unique_ptr<RkISP1CameraData> data =\n> >               std::make_unique<RkISP1CameraData>(this, &mainPath_, &selfPath_);\n> >\n> > -     ControlInfoMap::Map ctrls;\n> > -     ctrls.emplace(std::piecewise_construct,\n> > -                   std::forward_as_tuple(&controls::AeEnable),\n> > -                   std::forward_as_tuple(false, true));\n> > +     ControlInfoMap::Map ctrls({\n> > +             { &controls::AeEnable, ControlInfo(false, true) },\n> > +             { &controls::AfMode, ControlInfo(controls::AfModeValues) },\n> > +             { &controls::AfTrigger, ControlInfo(controls::AfTriggerValues) },\n> > +             { &controls::AfPause, ControlInfo(controls::AfPauseValues) }\n> \n> Does the algorithm support continuous auto-focus ? Has it been tested ?\n> I've been told by those who tried implement it (RPi) that without PDAF\n> statistics from the sensor it's rather hard to get it right.\n> \n> If the algorithm does not support it I would drop AfPause as it's\n> only useful for CAF (and the associated functions should probably be\n> removed along the class hierarchy as well maybe)\n\nAs this algorithm implementation is going into libipa, I wonder if we\ncan get it (the common algorithm implementation) to report the controls\nit supports and merge that into the ControlList of supported controls\nexposed by the IPA?\n\nThat would help towards keeping the support modular, and choosing a\ndifferent algorithm implementation (perhaps at runtime) could then\ncorrectly reflect the supported controls?\n\n--\nKieran\n\n\n> \n> > +     });\n> >\n> >       data->controlInfo_ = ControlInfoMap(std::move(ctrls),\n> >                                           controls::controls);\n> > --\n> > 2.34.1\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 D833EBD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 14 Jul 2022 22:41:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5A4BB63312;\n\tFri, 15 Jul 2022 00:41:33 +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 96B2060489\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Jul 2022 00:41:31 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 159FD9DA;\n\tFri, 15 Jul 2022 00:41:31 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657838493;\n\tbh=QH8sYV7CDLvZc6VNbJV7P9z+2bfqymnXi+xDHo4b/VM=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=cqu7ZuBJGtITugObIwQoPnG4MnQ2tFGuqyclKRzDkBMv0rkliyr4/Ox9YSndx5k1Z\n\tRmYE2kxQWA67xOm49lEJGa2lRplQNg6k75xzMUZwS2T0C1Oj+HzI2VbLD4a8nMwBNr\n\tb2N0jReoZMsRjWQbtQWvwWsFdD7T08ooLuM/ftTZL437DFuUn7UxxJRluIm21htFB4\n\t2yIPKqFqkTyqPxh5zu/Gil27EMCMP5H9kib5sjNYM33YpzqpXUFhC0YM/fqjNWjnDk\n\tUS06bsDmSzo5SeVveRMo/hwlWf5uVR2Vnd+EDps//AidFgCsXY7xU9MUCcUjO8hnPM\n\tm1e+6B1COdDqQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1657838491;\n\tbh=QH8sYV7CDLvZc6VNbJV7P9z+2bfqymnXi+xDHo4b/VM=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=lvx8kJ18zZbc2ctVw4Xxdo7DY8HxlJ4gnslPMiI48k+AF4TKjcoAeqv6HdSAXxZsu\n\tRaMXzNSzHhVs1CV/oWnHCvy1YB9MgHCmGWCdZdR2DVNH8YAZiDxlWb8qYnZ1OcYrJN\n\tiRrjbcUUz14CB3HNIo42EgY3NOq4UAemtRwrQgkQ="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"lvx8kJ18\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20220714183003.jz4gx5qfvl7qmyz5@uno.localdomain>","References":"<20220713084317.24268-1-dse@thaumatec.com>\n\t<20220713084317.24268-5-dse@thaumatec.com>\n\t<20220714183003.jz4gx5qfvl7qmyz5@uno.localdomain>","To":"Daniel Semkowicz <dse@thaumatec.com>, Jacopo Mondi <jacopo@jmondi.org>, \n\tJacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Date":"Thu, 14 Jul 2022 23:41:29 +0100","Message-ID":"<165783848912.3944957.2092346887013083056@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH v2 04/11] pipeline: rkisp1: Add basic\n\tAF controls to the supported controls list","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":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@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":23903,"web_url":"https://patchwork.libcamera.org/comment/23903/","msgid":"<YtC4QJ2EKyyleHtF@pendragon.ideasonboard.com>","date":"2022-07-15T00:43:44","subject":"Re: [libcamera-devel] [PATCH v2 04/11] pipeline: rkisp1: Add basic\n\tAF controls to the supported controls list","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hello,\n\nOn Thu, Jul 14, 2022 at 11:41:29PM +0100, Kieran Bingham via libcamera-devel wrote:\n> Quoting Jacopo Mondi via libcamera-devel (2022-07-14 19:30:03)\n> > On Wed, Jul 13, 2022 at 10:43:10AM +0200, Daniel Semkowicz via libcamera-devel wrote:\n> > > This will expose the AF controls and will allow controlling them using\n> > > the top level API.\n> > >\n> > > Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>\n> > > ---\n> > >  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 10 ++++++----\n> > >  1 file changed, 6 insertions(+), 4 deletions(-)\n> > >\n> > > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > > index 7ee80192..99d66b1d 100644\n> > > --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > > +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > > @@ -958,10 +958,12 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)\n> > >       std::unique_ptr<RkISP1CameraData> data =\n> > >               std::make_unique<RkISP1CameraData>(this, &mainPath_, &selfPath_);\n> > >\n> > > -     ControlInfoMap::Map ctrls;\n> > > -     ctrls.emplace(std::piecewise_construct,\n> > > -                   std::forward_as_tuple(&controls::AeEnable),\n> > > -                   std::forward_as_tuple(false, true));\n> > > +     ControlInfoMap::Map ctrls({\n> > > +             { &controls::AeEnable, ControlInfo(false, true) },\n> > > +             { &controls::AfMode, ControlInfo(controls::AfModeValues) },\n> > > +             { &controls::AfTrigger, ControlInfo(controls::AfTriggerValues) },\n> > > +             { &controls::AfPause, ControlInfo(controls::AfPauseValues) }\n> > \n> > Does the algorithm support continuous auto-focus ? Has it been tested ?\n> > I've been told by those who tried implement it (RPi) that without PDAF\n> > statistics from the sensor it's rather hard to get it right.\n> > \n> > If the algorithm does not support it I would drop AfPause as it's\n> > only useful for CAF (and the associated functions should probably be\n> > removed along the class hierarchy as well maybe)\n> \n> As this algorithm implementation is going into libipa, I wonder if we\n> can get it (the common algorithm implementation) to report the controls\n> it supports and merge that into the ControlList of supported controls\n> exposed by the IPA?\n> \n> That would help towards keeping the support modular, and choosing a\n> different algorithm implementation (perhaps at runtime) could then\n> correctly reflect the supported controls?\n\nYes, that would be better. The RPi IPA module has recently gone that\nroute, see commit 53ada24e63f4 (\"pipeline: ipa: raspberrypi: Move\nControlInfoMap to the IPA\").\n\n> > > +     });\n> > >\n> > >       data->controlInfo_ = ControlInfoMap(std::move(ctrls),\n> > >                                           controls::controls);","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 BD2BABE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Jul 2022 00:44:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0578F63312;\n\tFri, 15 Jul 2022 02:44:17 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EC97060489\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Jul 2022 02:44:15 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 52B889DA;\n\tFri, 15 Jul 2022 02:44:15 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657845857;\n\tbh=NfEcGMkQlfnhQpaZJhpGGTy4VRRe0IPopWc9m2pkLv4=;\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=ENFz5IHsf2OjV0o0uJy05eWguu5TdaIZ676nOyMamhA6gd4RTSzl8z25OiroJhCV9\n\trqmRxAd7R+aBsMF12XBkE6cT5AznJGIz2YUSW2FuUYMtt1GzMzoNm+ADd0y21abWzR\n\td8P47m1l4RSm9+M4mpKKuu1MYjXNa+yrmgWWb3V703/HC8GRASsmUYXrFJd+9JQsgR\n\tmRmeY5QjTnnCfQUldsxkLs3BP0HYXR+IXurYKky7hOM4q+6zupoT2fKjTPvnW1vHYw\n\tl4m2VWGwXMkr+JVfoYEFMFesRh7dUvJMhQPd2130spE/w8jxs3S8pRas7zc5reakqP\n\tDXZnJZAd5/iXw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1657845855;\n\tbh=NfEcGMkQlfnhQpaZJhpGGTy4VRRe0IPopWc9m2pkLv4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Vi4FwxwOhKgIZ6jSDtiUyR0+4XMFKVRhZZkRki1yOV4IG5KOR4iOnNi2f90/qgSNs\n\t/G3AjmzUnhii6PImn4O5mxcqOawXYCdgeWerVyeI9euKX+vUN3zRKWLoknXet4RU/+\n\t+HO5iTmdkl/6MCMzrR9wPpP1Zaw/TZS3k/U4eiig="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"Vi4FwxwO\"; dkim-atps=neutral","Date":"Fri, 15 Jul 2022 03:43:44 +0300","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<YtC4QJ2EKyyleHtF@pendragon.ideasonboard.com>","References":"<20220713084317.24268-1-dse@thaumatec.com>\n\t<20220713084317.24268-5-dse@thaumatec.com>\n\t<20220714183003.jz4gx5qfvl7qmyz5@uno.localdomain>\n\t<165783848912.3944957.2092346887013083056@Monstersaurus>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<165783848912.3944957.2092346887013083056@Monstersaurus>","Subject":"Re: [libcamera-devel] [PATCH v2 04/11] pipeline: rkisp1: Add basic\n\tAF controls to the supported controls list","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":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":23953,"web_url":"https://patchwork.libcamera.org/comment/23953/","msgid":"<CAHgnY3n7jwKFiD6JWMy8ytcKt38Ft5+UsSBP=HD6+Rj6Y9rbiA@mail.gmail.com>","date":"2022-07-18T15:38:41","subject":"Re: [libcamera-devel] [PATCH v2 04/11] pipeline: rkisp1: Add basic\n\tAF controls to the supported controls list","submitter":{"id":126,"url":"https://patchwork.libcamera.org/api/people/126/","name":"Daniel Semkowicz","email":"dse@thaumatec.com"},"content":"Hi,\n\nOn Fri, Jul 15, 2022 at 2:44 AM Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> Hello,\n>\n> On Thu, Jul 14, 2022 at 11:41:29PM +0100, Kieran Bingham via libcamera-devel wrote:\n> > Quoting Jacopo Mondi via libcamera-devel (2022-07-14 19:30:03)\n> > > On Wed, Jul 13, 2022 at 10:43:10AM +0200, Daniel Semkowicz via libcamera-devel wrote:\n> > > > This will expose the AF controls and will allow controlling them using\n> > > > the top level API.\n> > > >\n> > > > Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>\n> > > > ---\n> > > >  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 10 ++++++----\n> > > >  1 file changed, 6 insertions(+), 4 deletions(-)\n> > > >\n> > > > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > > > index 7ee80192..99d66b1d 100644\n> > > > --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > > > +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > > > @@ -958,10 +958,12 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)\n> > > >       std::unique_ptr<RkISP1CameraData> data =\n> > > >               std::make_unique<RkISP1CameraData>(this, &mainPath_, &selfPath_);\n> > > >\n> > > > -     ControlInfoMap::Map ctrls;\n> > > > -     ctrls.emplace(std::piecewise_construct,\n> > > > -                   std::forward_as_tuple(&controls::AeEnable),\n> > > > -                   std::forward_as_tuple(false, true));\n> > > > +     ControlInfoMap::Map ctrls({\n> > > > +             { &controls::AeEnable, ControlInfo(false, true) },\n> > > > +             { &controls::AfMode, ControlInfo(controls::AfModeValues) },\n> > > > +             { &controls::AfTrigger, ControlInfo(controls::AfTriggerValues) },\n> > > > +             { &controls::AfPause, ControlInfo(controls::AfPauseValues) }\n> > >\n> > > Does the algorithm support continuous auto-focus ? Has it been tested ?\n> > > I've been told by those who tried implement it (RPi) that without PDAF\n> > > statistics from the sensor it's rather hard to get it right.\n> > >\n> > > If the algorithm does not support it I would drop AfPause as it's\n> > > only useful for CAF (and the associated functions should probably be\n> > > removed along the class hierarchy as well maybe)\n\nAlgorithm supports continuous autofocus, but this part requires more\nimprovement, as currently this works exactly the same as for triggered\nAF, just the trigger is automatically generated by detecting major\nchange in contrast value. And for manual trigger lens is always set to\nthe initial position. While for manual trigger this is not so big problem,\nfor the continuous AF, you certainly would like to have smooth lens control.\n\n\n> >\n> > As this algorithm implementation is going into libipa, I wonder if we\n> > can get it (the common algorithm implementation) to report the controls\n> > it supports and merge that into the ControlList of supported controls\n> > exposed by the IPA?\n> >\n> > That would help towards keeping the support modular, and choosing a\n> > different algorithm implementation (perhaps at runtime) could then\n> > correctly reflect the supported controls?\n>\n> Yes, that would be better. The RPi IPA module has recently gone that\n> route, see commit 53ada24e63f4 (\"pipeline: ipa: raspberrypi: Move\n> ControlInfoMap to the IPA\").\n>\n\nI have seen these changes and I also think this is a good idea.\n\nBest regards\nDaniel\n\n> > > > +     });\n> > > >\n> > > >       data->controlInfo_ = ControlInfoMap(std::move(ctrls),\n> > > >                                           controls::controls);\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","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 42EB8BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 18 Jul 2022 15:38:55 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9DCCE63312;\n\tMon, 18 Jul 2022 17:38:54 +0200 (CEST)","from mail-lf1-x131.google.com (mail-lf1-x131.google.com\n\t[IPv6:2a00:1450:4864:20::131])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AD73D6048B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Jul 2022 17:38:53 +0200 (CEST)","by mail-lf1-x131.google.com with SMTP id d12so19975104lfq.12\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Jul 2022 08:38:53 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658158734;\n\tbh=hC+jrgiH6R2lf3XHtZVZq4d3YSKiEbpwLvH1PBIXR20=;\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=ZCPuCKGQcBf2lImgbuCQzjl4vlaSIX6bT7NGWn9lX9En/vv3yEU1IGXJU1L6/ewqU\n\tnQZM4kmRIFO71+4L9zOy2ppzSrMf88G3ThLfPoCBj5xPuXMuMwVCaKSQGYJFOtth1S\n\tKTugEgMStUWcUapnwjPm/TJde5A0Iib5ZopBwYDYEICMFIGZVfiGZ8RntL8CBG6UOB\n\tXDj5lmvWEvAOuJyl+b4+Lr4IPg+aeoiLw+L/ms9gyxraY7vqQjnq8RMzfoy9pyGBZH\n\t4L0tE3eZpuUXt9mXH+jCSNVkePrynDuNpacbMqkOYQErapUrP9E7Oh6SuKzq5GU46+\n\tQRMv/gASkI6zA==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=thaumatec-com.20210112.gappssmtp.com; s=20210112;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=8Wz0f4NBqSQr+2DY2A73s1zQG4LbybGtL5qEPQMMLVs=;\n\tb=3/x3KGuV41LQPS3aviNRz+V5UONRFwahtJTu7n8qcBch817hsVqzzOMCuhSTMjd/K0\n\tPJPaBW0MDkWoyZnN64PqW6Sx55cRNB+Ocfs13fXodWowfVdTlrgkYBSDUDayymYxgX9p\n\td4lVGR8Otgc14ojUQW92bjd6zmP3vqb3U0hX0XCrFAPMhBfN2Aio8voXA1osSLE5SVGx\n\tyNlup87ud9byzs3PGiK9L5EnrItOBSkFi4NMcAsaFtRqzS4dS5WJC8TPZqRfecVulzhA\n\tSv1rKwlM/7RfhKBUwyHrZM3lNktAWLzMonPHs+C9KcgqRwFz6LGJkUp8a+b/wjRYl3Bw\n\tm5Sw=="],"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=\"3/x3KGuV\"; \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:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=8Wz0f4NBqSQr+2DY2A73s1zQG4LbybGtL5qEPQMMLVs=;\n\tb=zVprQ9VVTvNfXPTccE2vDaYswBMr/9N3wl35VTec9CXezVAaTwHQaZ7L31CPTn5nch\n\t6MlAZw+95/t9ZSnCAH46P7CM8Q/n+JXRMxYhvZ774oaj+rdfdfgJsZVbFsIqn4q1/dar\n\tuXGFpymH/V401pbHjePMXanyuxqtU4bdK90lpY/QLbHpIFPEekyISL3rO3lixIzVIdzX\n\tjZ/23RaagXIlZ4vq64twxVHLJXLO76RO8QSycNlL+ofWAkM4MfHpper/Ni235DIb5wAS\n\tfpvn6HcrIxNZVIMZUK3kV/zLTgvB5qc5tUNv5DpGTfmR2v9Lw6Veb+NIl1dgdSOeHhOG\n\tkgrA==","X-Gm-Message-State":"AJIora82INks7T4VMi+0xlvYHYpcygHC9B0DTOU8kd7FE8bFisnACSXG\n\tO64TMfR4FGDPIdLZDdhwtvSPr6PiHBA8QmSJuAq4RQ==","X-Google-Smtp-Source":"AGRyM1tmGt3UdBRNEko7M+9Sl15Hz0ob5+wjRszKaghh0KLH/7yrSU34bkGgCzBtR0i7r/qVhmBldZPxO7UHKxyOx9Q=","X-Received":"by 2002:a05:6512:12d5:b0:48a:1cd7:127a with SMTP id\n\tp21-20020a05651212d500b0048a1cd7127amr10819065lfg.577.1658158732876;\n\tMon, 18 Jul 2022 08:38:52 -0700 (PDT)","MIME-Version":"1.0","References":"<20220713084317.24268-1-dse@thaumatec.com>\n\t<20220713084317.24268-5-dse@thaumatec.com>\n\t<20220714183003.jz4gx5qfvl7qmyz5@uno.localdomain>\n\t<165783848912.3944957.2092346887013083056@Monstersaurus>\n\t<YtC4QJ2EKyyleHtF@pendragon.ideasonboard.com>","In-Reply-To":"<YtC4QJ2EKyyleHtF@pendragon.ideasonboard.com>","Date":"Mon, 18 Jul 2022 17:38:41 +0200","Message-ID":"<CAHgnY3n7jwKFiD6JWMy8ytcKt38Ft5+UsSBP=HD6+Rj6Y9rbiA@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH v2 04/11] pipeline: rkisp1: Add basic\n\tAF controls to the supported controls list","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 via libcamera-devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]