From patchwork Tue Apr 27 13:08:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 12119 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 3B652BDE3B for ; Tue, 27 Apr 2021 13:08:54 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id F19D0688B6; Tue, 27 Apr 2021 15:08:51 +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="WOu9A4j6"; dkim-atps=neutral Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 87517602C2 for ; Tue, 27 Apr 2021 15:08:50 +0200 (CEST) Received: by mail-wm1-x332.google.com with SMTP id n84so4602035wma.0 for ; Tue, 27 Apr 2021 06:08:50 -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=wG9J5D/wwMDG87CUQxw2d46l59UXBc9BQI+/bLGXxxo=; b=WOu9A4j6OvJ9gO9ZwfZCEjEu4wqabTRyX6AfP8KOn7S32W+PM2ZxVPLLk4V4TUwNKv XM60dUxEMEYqixaQm0Du/V1g9KzMuBDBfgkNhDTMIa10d5XAithhdakq8xeDplRBv4BY b4ZzU9D/tgMKP6Pl2bxc593Oqz3qUa7/g/pgLz78SCNlIt5FblNQWVizOXaKymZ1LrIX mxcJrMsO8G6xaYfjJenr6xqE/0kc+MWpwnBopDdvTxShkWzTo4kEvUpIXXuvGyqBYaeu qTLIy2HFP1byAPbA8BNiem43r7xSGeGq8TK1kKgGzcIuFGA9wpvOT65S5sUcTqDkcCcQ FF3g== 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=wG9J5D/wwMDG87CUQxw2d46l59UXBc9BQI+/bLGXxxo=; b=kP/gzQnirCKnpUsEVLYp4EPHE1iRbOtpt5s9kIBizRYVwvP4v1Ba/jzXDhmJR06g41 vm+gqRK3086z3qNyfFLFmkhc8Xsa3hKrCerVOZVk2e/Axt4hsqEUYw/s5fkpSq1Q7Ok/ 0g8RhD55tJ2f1BXipgb12pfDuZbTQqQooDn4cvJ1e4W92wn2lrshkaP5j5vop05NcWPE V2H7fRKys8K1RrNVhWJytz/Z/h+Za4pOLt9fXoagpaBx3b+fAS2DNr/EVdY3onNYfraZ zCEhDhawFlldfqxJgkfz0xkZXjkKJ5LQw4r4xDVQI2WzJrHsMakH0CFCY+vwoC5z8+d/ jkWQ== X-Gm-Message-State: AOAM530FtuojgIyWWDGV4Up9rSQxRfBb0WdrYkYWZaRkIX/RoRe2tmSU GTr9Z3LOxJYCVojxtaQywlr+rTZvOWnAuw== X-Google-Smtp-Source: ABdhPJyvWoYxEKdF0H0BI75F493KRnADzjRWZznZXbQq8g46cvG7owDA6kgf3bBT+dFota2bL5n8QQ== X-Received: by 2002:a05:600c:4e93:: with SMTP id f19mr24479679wmq.122.1619528930103; Tue, 27 Apr 2021 06:08:50 -0700 (PDT) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id r11sm3899327wrx.22.2021.04.27.06.08.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 06:08:49 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Tue, 27 Apr 2021 14:08:41 +0100 Message-Id: <20210427130844.11357-2-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210427130844.11357-1-david.plowman@raspberrypi.com> References: <20210427130844.11357-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 1/4] 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 Reviewed-by: Kieran Bingham --- 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 c3ed5362..618391e9 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;