From patchwork Thu Jun 9 06:03:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Michel Hautbois X-Patchwork-Id: 16187 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 4E291C3275 for ; Thu, 9 Jun 2022 06:03:22 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 888AC65642; Thu, 9 Jun 2022 08:03:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1654754597; bh=P/Bcl69wUsnsnNBY8yMyCSIbSTSZgX/mA31kq/ZiSGk=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=JfubH64gX4gFGnqFWbd5Rmp9zfWkwe+rfFKopBKTnbh5yDuYT3DapZeuA3ZYvhb14 Kcath3Pk4IXXf41UDvwXShcnAnpj/hVsMF7a/q5tvhw4HV48FylK+yee0TlK0F79vU iYj8r9t8vos5PZMYsY3uJK+hNLO+ZHeKonvQsl3Wh/E5pDYEkyfEJEVItijXjDW4Mc 6/BcOgRNZFnnOh9GleXzqoG14yj7e7xKUApPwSN3I//JTFftWYW8NBC/d9z4s35Hs5 k1M8HThh0T8fao9uDM/iraKxJK2HJ+MhRDc1/ZXIBu+OW5NIAxri6Y1CD5eoxboXqv a6uePfF6wcPUA== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C570D65636 for ; Thu, 9 Jun 2022 08:03:13 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="etD7DTjD"; dkim-atps=neutral Received: from tatooine.ideasonboard.com (unknown [IPv6:2a01:e0a:169:7140:ae94:9dc3:50ea:aee6]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 859566CF; Thu, 9 Jun 2022 08:03:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1654754593; bh=P/Bcl69wUsnsnNBY8yMyCSIbSTSZgX/mA31kq/ZiSGk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=etD7DTjDqNoMPIz2kMpTXbQpiw+0d1S9xwXavvaUMl5PWp6sYW1GzUCyKaUZvfou1 fVFvP6bJf6qfhqkwlqOvPif2aygy8Ynb54ddSj7QQr5irEbzfMv6EFHhR30gBCxOhT 1swepI/lPFtgS1aPiHmbyo0qXe3WJhhSUoe7KAG0= To: libcamera-devel@lists.libcamera.org Date: Thu, 9 Jun 2022 08:03:06 +0200 Message-Id: <20220609060306.57953-5-jeanmichel.hautbois@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220609060306.57953-1-jeanmichel.hautbois@ideasonboard.com> References: <20220609060306.57953-1-jeanmichel.hautbois@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 4/4] libcamera: lens: Add the hyperfocale property support X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jean-Michel Hautbois via libcamera-devel From: Jean-Michel Hautbois Reply-To: Jean-Michel Hautbois Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" A tuned lens may have measured its hyperfocale, which can then be used by the controls::LensPosition control. Add support for it in the camera lens properties database. Signed-off-by: Jean-Michel Hautbois --- include/libcamera/internal/camera_lens_properties.h | 1 + src/libcamera/camera_lens_properties.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/include/libcamera/internal/camera_lens_properties.h b/include/libcamera/internal/camera_lens_properties.h index 7424b375..13fa025c 100644 --- a/include/libcamera/internal/camera_lens_properties.h +++ b/include/libcamera/internal/camera_lens_properties.h @@ -19,6 +19,7 @@ struct CameraLensProperties { static const CameraLensProperties *get(const std::string &lens); Size lensFocusRange; + float hyperfocal; }; } /* namespace libcamera */ diff --git a/src/libcamera/camera_lens_properties.cpp b/src/libcamera/camera_lens_properties.cpp index 225546ae..7cab2704 100644 --- a/src/libcamera/camera_lens_properties.cpp +++ b/src/libcamera/camera_lens_properties.cpp @@ -35,6 +35,9 @@ LOG_DEFINE_CATEGORY(CameraLensProperties) * * \var CameraLensProperties::lensFocusRange * \brief The limits for the sensor position, stored as a min and a max. + * + * \var CameraLensProperties::hyperfocal + * \brief The hyperfocal distance measured, expressed in millimeters */ /** @@ -48,6 +51,7 @@ const CameraLensProperties *CameraLensProperties::get(const std::string &lens) static const std::map lensProps = { { "dw9714", { .lensFocusRange = { 150, 800 }, + .hyperfocal = 500, } }, };