{"id":15525,"url":"https://patchwork.libcamera.org/api/1.1/covers/15525/?format=json","web_url":"https://patchwork.libcamera.org/cover/15525/","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":"<20220323160145.90606-1-jeanmichel.hautbois@ideasonboard.com>","date":"2022-03-23T16:01:41","name":"[libcamera-devel,RFC,v2,0/4] RPi: Introduce AF algorithm","submitter":{"id":75,"url":"https://patchwork.libcamera.org/api/1.1/people/75/?format=json","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/cover/15525/mbox/","series":[{"id":2991,"url":"https://patchwork.libcamera.org/api/1.1/series/2991/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2991","date":"2022-03-23T16:01:41","name":"RPi: Introduce AF algorithm","version":2,"mbox":"https://patchwork.libcamera.org/series/2991/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/15525/comments/","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 2AA7CC0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 23 Mar 2022 16:01:52 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6F29F632E2;\n\tWed, 23 Mar 2022 17:01:51 +0100 (CET)","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 8E92F604C4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 23 Mar 2022 17:01:49 +0100 (CET)","from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:2e05:b10:1542:d51b])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 21BBE9DE;\n\tWed, 23 Mar 2022 17:01:49 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1648051311;\n\tbh=lmXaKk/h92pWA3EB7jtH/S1ZyC4jIPDVvusZ6FKa/XY=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=v1QaXQJpoX5JXEVBimz0Jz8motKI+bsibUfPJJcKpt1TAQkF6wDTVWOSI/3R+Bdcd\n\tdebIRZsMKBU0ksvDLPYaITn54euvTwcywl5oadQeraLwEel/C3veiNY6Fy/n9jMYm2\n\tJmoC77d1IMmhajqLXAeevYBM4pTVFvGiYiQ/sEhYY29806LX5MLyuTs1t9DTo8HcaY\n\t+9DwvF6bhUk90ABI4XFpdcxIhjujbz6ZIpE6sRf+o54y2ZUvZWqyVsniSJmLzpu84s\n\ttGxaZ9qDzjQrzsBvWL4Rv+MeZJH78Uwsp7uy1TdvOAPaDq2ROcollqUMtSXks/gHMT\n\twp2nGfj+R/d1w==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1648051309;\n\tbh=lmXaKk/h92pWA3EB7jtH/S1ZyC4jIPDVvusZ6FKa/XY=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=B37J4P9rVxc5O9jhgRqHChW65SWhYnLUWw/VoyKGhYk7qq+MP8s/UZ0D3jVesQAvo\n\tPpLC1tja8CFZ3pBJGpmCud/Jg7hYYL0e1w4h0Ln15eU2UBDFSqdABlnLvgPnMHzKb1\n\t5BwL9DW8/gBV0WH+wFH7VqN42dPtcXTJUWNu6q78="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"B37J4P9r\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Wed, 23 Mar 2022 17:01:41 +0100","Message-Id":"<20220323160145.90606-1-jeanmichel.hautbois@ideasonboard.com>","X-Mailer":"git-send-email 2.32.0","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [RFC PATCH v2 0/4] RPi: Introduce AF algorithm","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":"Jean-Michel Hautbois via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Hello !\n\nI proposed to add the lens controls with ancillary links support in a\nprevious series [1] but it seems more interesting to have it on top of\nan AF algorithm.\n\nThe first patch in this series introduces Kate's algorithm used by the\nIPU3IPA which is a contrast-based one. I adapted it a bit, as the\nstatistics on RPi are not the same, and I simplified it a bit, using\nonly one of the filters and all the regions (ie, it calculates a focus\non the scene, and not only on the center of this scene).\n\nThis is posted as a RFC, as it lacks a few things:\n- Kieran mentionned that the entityControls in the RPi pipeline handler\n  should be emplaced into a map using an enum. I tried to do it, but I\n  am no jinja2 expert, and it takes me too much time for something\n  supposed to be easy :-). Help appreciated here (;-) ;-)).\n- The algorithm is not using any controls while David proposed those in\n  [3]. I am planning to do it, at least to pass a region and send back\n  the focus lens position but -ENOTIME yet.\n\nIn v2, I also included the namespace renaming, I wanted it in v1 but\nmissed it...\n\nDavid, Naushir, Laurent, Kieran, I am not sure about the copyrights and\nlicenses, please comment :-).\n\nThanks !\n\n---\n[1]: https://patchwork.libcamera.org/project/libcamera/list/?series=2969 \n[2]: https://patchwork.libcamera.org/project/libcamera/list/?series=2957\n\nJean-Michel Hautbois (4):\n  ipa: RPi: Move the IPA to the ipa::RPi namespace\n  ipa: raspberrypi: Introduce an autofocus algorithm\n  libcamera: raspberrypi: Control the lens from pipeline\n  ipa: raspberrypi: Control the lens position\n\n include/libcamera/ipa/raspberrypi.mojom       |   1 +\n .../raspberrypi/controller/af_algorithm.hpp   |  20 ++\n src/ipa/raspberrypi/controller/af_status.h    |  31 +++\n src/ipa/raspberrypi/controller/focus_status.h |   3 +\n src/ipa/raspberrypi/controller/iob/af.cpp     | 231 ++++++++++++++++++\n src/ipa/raspberrypi/controller/iob/af.h       |  55 +++++\n src/ipa/raspberrypi/meson.build               |   1 +\n src/ipa/raspberrypi/raspberrypi.cpp           |  84 +++++--\n .../pipeline/raspberrypi/raspberrypi.cpp      |  17 ++\n 9 files changed, 423 insertions(+), 20 deletions(-)\n create mode 100644 src/ipa/raspberrypi/controller/af_algorithm.hpp\n create mode 100644 src/ipa/raspberrypi/controller/af_status.h\n create mode 100644 src/ipa/raspberrypi/controller/iob/af.cpp\n create mode 100644 src/ipa/raspberrypi/controller/iob/af.h"}