From patchwork Sun Dec 19 23:27:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 15168 X-Patchwork-Delegate: laurent.pinchart@ideasonboard.com 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 DF380BE080 for ; Sun, 19 Dec 2021 23:27:25 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 94478608ED; Mon, 20 Dec 2021 00:27:25 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="fccFNGah"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AC871605A7 for ; Mon, 20 Dec 2021 00:27:21 +0100 (CET) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2198E10DD; Mon, 20 Dec 2021 00:27:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1639956441; bh=A4QhqVh6gjw1VyoZDlLNJ0o9h1Axn08jKOl0FGIL2CU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fccFNGah23la0RfmTytJfhQS8ojfTyO088V1nhGPm2tSluNACBa7G/Lbb/HbCiYQU 1vj2rJWA/BWvEEhqNT39F2EGajGd5mduATLJ2NNsKI+4laF7yZ97Ickxuus/i/O1zk TLMKBlDFQVNsPuXaxuaAtI+pfFSpmsaidhaL3OXo= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Mon, 20 Dec 2021 01:27:12 +0200 Message-Id: <20211219232714.11427-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211219232714.11427-1-laurent.pinchart@ideasonboard.com> References: <20211219232714.11427-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/4] ipa: raspberrypi: cam_helper: Make exposure conversion functions virtual 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Naushir Patuck Some sensors (namely the Sony IMX296, whose support will be added shortly) require different conversion formulas between exposure time and exposure lines. Make the Exposure() and ExposureLines() functions virtual to allow this. Signed-off-by: Laurent Pinchart Signed-off-by: Naushir Patuck @raspberrypi.com> Reviewed-by: Naushir Patuck @raspberrypi.com> Reviewed-by: Kieran Bingham Signed-off-by: Naushir Patuck --- src/ipa/raspberrypi/cam_helper.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ipa/raspberrypi/cam_helper.hpp b/src/ipa/raspberrypi/cam_helper.hpp index a776153fcb84..300f8f8a2d3b 100644 --- a/src/ipa/raspberrypi/cam_helper.hpp +++ b/src/ipa/raspberrypi/cam_helper.hpp @@ -76,8 +76,8 @@ public: virtual void Prepare(libcamera::Span buffer, Metadata &metadata); virtual void Process(StatisticsPtr &stats, Metadata &metadata); - uint32_t ExposureLines(libcamera::utils::Duration exposure) const; - libcamera::utils::Duration Exposure(uint32_t exposure_lines) const; + virtual uint32_t ExposureLines(libcamera::utils::Duration exposure) const; + virtual libcamera::utils::Duration Exposure(uint32_t exposure_lines) const; virtual uint32_t GetVBlanking(libcamera::utils::Duration &exposure, libcamera::utils::Duration minFrameDuration, libcamera::utils::Duration maxFrameDuration) const;