{"id":15514,"url":"https://patchwork.libcamera.org/api/1.1/covers/15514/?format=json","web_url":"https://patchwork.libcamera.org/cover/15514/","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":"<20220323133622.61593-1-jeanmichel.hautbois@ideasonboard.com>","date":"2022-03-23T13:36:19","name":"[libcamera-devel,RFC,0/3] 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/15514/mbox/","series":[{"id":2988,"url":"https://patchwork.libcamera.org/api/1.1/series/2988/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2988","date":"2022-03-23T13:36:19","name":"RPi: Introduce AF algorithm","version":1,"mbox":"https://patchwork.libcamera.org/series/2988/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/15514/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 50653C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 23 Mar 2022 13:36:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6ED68604D5;\n\tWed, 23 Mar 2022 14:36:28 +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 BFA12604C4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 23 Mar 2022 14:36:26 +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 5C7C8FFD;\n\tWed, 23 Mar 2022 14:36:26 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1648042588;\n\tbh=LqZRP45lUVjzLVS6N0v6YA+UVE9sUV6T7S+YXPhmWgM=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=Mzwb7hSzyMLoKV4+Pm9ypdOeqwHz9IrwipXcJjXcixWo4l1hR9YgwJjqfW6Af0WXT\n\tmGcnS1DZuj/HcT9rgABITXXljQ+ohzGi20GtSsOEo+wSEtWX2I/yG3SQ1k02e343T8\n\ttNItii/lCclkSFMqP3bKFvOJRGOFO96Ug/O1GPDcWi0ywh7XW6ViE7NuBEfGR2HK5J\n\t1Zlog02aYST6+1ZEZss9+YWw0/BRUpfTLEkn8IEdbyvh7+JtiGdC/6bhjW4UFnkOYd\n\tPtrwdi/17smDld29Azx02o99FP5NwJHExtJmvu4sBuKwIOzD0GirZcu6KZR+hQycTb\n\tEnLt6b3SnUzNw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1648042586;\n\tbh=LqZRP45lUVjzLVS6N0v6YA+UVE9sUV6T7S+YXPhmWgM=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=TRBQA1m7llObQn0XFgscT/WNOMbEoXaVvW2dg6Npp//y4gQ4cY92q4pjdEwaedpu3\n\tG1Iz1N5x4Wm01/CQfG64ACuaf2F1TOywrNeUN+exf7gMWdG2xAswjr9LhPHa4+zHgP\n\tpDgj+eBbwZf5aKOE5vfsa8G1SLNhE+EwjUZb7BTw="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"TRBQA1m7\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Wed, 23 Mar 2022 14:36:19 +0100","Message-Id":"<20220323133622.61593-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 0/3] 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\nDavid, Naushir, Laurent, Kieran, I am not sure about the copyrights and\nlicenses, please comment :-).\n\nThanks !\n\nJean-Michel Hautbois (3):\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           |  36 ++-\n .../pipeline/raspberrypi/raspberrypi.cpp      |  17 ++\n 9 files changed, 393 insertions(+), 2 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"}