From patchwork Thu Apr 8 13:36:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 11871 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 21424BD16B for ; Thu, 8 Apr 2021 13:36:43 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9F5C6687F8; Thu, 8 Apr 2021 15:36:41 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="fO71p/dT"; dkim-atps=neutral Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 78F01602CC for ; Thu, 8 Apr 2021 15:36:40 +0200 (CEST) Received: by mail-wr1-x433.google.com with SMTP id f6so2167431wrv.12 for ; Thu, 08 Apr 2021 06:36:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mrjhT2FmHfGM+ETL2c8tGFpgFd9U4oNZSbU5UloGtqs=; b=fO71p/dTsgRkASA+2kJHgAqOz7xU5NzsTI/JKbkmAEU3d9dcouDa74bRuwviOPPHYc yuD66h0c1r7IYTDYi5Or1ZEh0E/v0dnqTXHr4mwK3x9ZNNICwh0mH/xJ2DXZSW0LjgR4 Xf/PYWKlxYfUCJ0Lj/bPLEW0T+Lxbrz+BXSoqz85HrMwny6Mo7+WPjJhKTDEseA+Mt3m QAkcCI3pKeGttfhMG6LBIGa/ycO33EwZ8F4UHH9kCVjEmXfyQXBsJDoKhNPcZGkQ1ARl 0J9xcBTGSN7oraVVKj5+zgMVYFZOji/KrcsoyLMyIZSxMVxReCp7WdOxQFChmFomgqKG 3E5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mrjhT2FmHfGM+ETL2c8tGFpgFd9U4oNZSbU5UloGtqs=; b=ITLHJnr4SUoCCA/XM6zKTx6M9OejbsB10jbB+GSj+gPZVFaP+mSTECDDJveoQVI463 Q4cWbEbyddDiNDEjrqPD3+PQrtj7d7wkhBW+KrJ0TcUlscYNKBCtH9ZY8+UThHNoN8k6 cdHBxFyDGleylaJIUtY9fLm61UPur36wND5z8hH1jT1VQI8mPBG6oO2qDudHUl2DGvRF Wr0v5NOGzrAdQb/08Zv5v7JHLsrrckn4i88PBme31EkM7Zkq04pi0Iiew19Fz64KlUQT CVU8Llm0m2XjN64lsHbwl+iOrU6ltlJPQWGuh3nUrG6v34erqxZVo+RiO6DcznS1tTLk r2aQ== X-Gm-Message-State: AOAM532p0/esJvNssJmrPbei6J6rrHywJBVwIXMkaKG5QCkSghGCJaaz lTW8KmlQXw2foG6jyxaJl+/H7Ur05IerFg== X-Google-Smtp-Source: ABdhPJyyWcNVJsRVyT/keBNVl8KDqQ0l+DNhITvlfVy+xmiT0JogyQR46P3yJqEASNG1NhFvT0m/nA== X-Received: by 2002:adf:f908:: with SMTP id b8mr11244846wrr.184.1617888999952; Thu, 08 Apr 2021 06:36:39 -0700 (PDT) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id z18sm13132522wmc.27.2021.04.08.06.36.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Apr 2021 06:36:39 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Thu, 8 Apr 2021 14:36:32 +0100 Message-Id: <20210408133634.16815-2-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210408133634.16815-1-david.plowman@raspberrypi.com> References: <20210408133634.16815-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 1/3] ipa: raspberrypi: Make CamHelper exposure methods 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" This allows derived classes to override them if they have any special behaviours to implement. For instance if a particular camera mode produces a different signal level to other modes, you might choose to address that in the gain or exposure methods. Signed-off-by: David Plowman Reviewed-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 1b2d6eec..4053a870 100644 --- a/src/ipa/raspberrypi/cam_helper.hpp +++ b/src/ipa/raspberrypi/cam_helper.hpp @@ -66,8 +66,8 @@ public: virtual ~CamHelper(); void SetCameraMode(const CameraMode &mode); MdParser &Parser() const { return *parser_; } - uint32_t ExposureLines(double exposure_us) const; - double Exposure(uint32_t exposure_lines) const; // in us + virtual uint32_t ExposureLines(double exposure_us) const; + virtual double Exposure(uint32_t exposure_lines) const; // in us virtual uint32_t GetVBlanking(double &exposure_us, double minFrameDuration, double maxFrameDuration) const; virtual uint32_t GainCode(double gain) const = 0;