From patchwork Wed Mar 24 11:44:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 11692 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 3A917C32E5 for ; Wed, 24 Mar 2021 11:44:23 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 18CE168D6A; Wed, 24 Mar 2021 12:44:22 +0100 (CET) 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="mNfJ43Ek"; dkim-atps=neutral Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 94BB86051A for ; Wed, 24 Mar 2021 12:44:19 +0100 (CET) Received: by mail-ed1-x52e.google.com with SMTP id w18so27308201edc.0 for ; Wed, 24 Mar 2021 04:44:19 -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=mNfJ43Eks3xUF3+HJsLeQlHFAy2AU2UcydD50SW2Fn6aE+jnr+nKSHDbeDiVdJsJwv 4kEJhIKsIR/MUFhd5nwvpqKt0PqowGs3xrmfgyGEelLJK/N6pwCYWnUNMf9n99u1OIVk 74jRUeqWrNYgMLp3sG+wjF9q+DeDHNQyV3AjdeXd5Lo4mPelHtzVrXtK0i56pyVgfzoF 1WklXfJw5oUqVyaUWUvKVp8EWxrEcwImAIidzH2tAphqCs3Oocx4j3I7g4/vUpXsCpOT zaguXKpSd+7+xQdj7I/qkZ1+BpXeNEev3wpTowtY9YWMejdDfJqglf55H4BM5IBzlqZm GqHQ== 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=raVvjNpJk1oWCW/DW8IZ6dTSHYEYcfpdu25oToJNTWrQ7jG3GSeiaXMs/iS5AE3E3K bbwyy0Wwj5YbW4XmEl3IZIcxfCaSuMuiK3uE5XrCG5B81KBupPZYTSaugTB0ObWHibUD B5d1m2d5h4QOYjenZgV0JB7/VqLoOZOz+9QKZu0ISw2aNnYBIx+jk+3yJN4ksO8COjTP KS0D/nAqHFK6fHWaPyQui04adn5+2T3L2X2zhIQI3/cEmvogINZHAvyDTwteNYXngRKy ZZvOuk6qE/e7j6o9wtrf7bVvetgqtvZ9eUZR3aTMZr+mNnBoGRkaS99dm5/Xmy6Xvbx8 6peQ== X-Gm-Message-State: AOAM5308eamYOhTWOxRWsqxSoyqzmV5OGPhKZKEQSuBkmmTvHPwbvgT1 CI02qcXcsxKHezBZsveEWjiQz4dFCgR/pg== X-Google-Smtp-Source: ABdhPJwipaldQ0UbHtRg5u4PoBnIWSjDhneM08wVtrrD8s+7Vhvy+B3AB7OWsRpqOB3jSUNLen6+3w== X-Received: by 2002:a05:6402:c0f:: with SMTP id co15mr2887198edb.373.1616586259043; Wed, 24 Mar 2021 04:44:19 -0700 (PDT) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id c17sm1054781edw.32.2021.03.24.04.44.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 04:44:18 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Wed, 24 Mar 2021 11:44:14 +0000 Message-Id: <20210324114415.19866-2-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324114415.19866-1-david.plowman@raspberrypi.com> References: <20210324114415.19866-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/2] 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;