From patchwork Wed Apr 14 10:29:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 11927 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 E5D8DBD22F for ; Wed, 14 Apr 2021 10:30:03 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9AB3668818; Wed, 14 Apr 2021 12:30:02 +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="Eh3Obv55"; dkim-atps=neutral Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C2EF468803 for ; Wed, 14 Apr 2021 12:30:00 +0200 (CEST) Received: by mail-ej1-x62d.google.com with SMTP id w3so30658162ejc.4 for ; Wed, 14 Apr 2021 03:30:00 -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=Y7RBLkfsx9Q0XA5VMAG5UTmLaj1/rjfPHufTqSsjJXs=; b=Eh3Obv5549rmgXEGVthxv9ucPUsCnA4R+elqq8ohkvIH1IklA0A71QZUkgUy+rFQDZ pW9eiMnSzsV/JjR89dLfNpjiFxM8dTTg74yeb6cfqQicuzOjbMmP9H7TXTIt3P+MGe7z UOzK0zoHzxl+DjR5uuP4FxEkl+MibAMMjYjuyvSRIN7W0j0Nw8I+n1E42boN70rrRlG+ 0DfMt7/fk6QO3fkKPjZocs/HnUnSU/0TSkMWOkDtI1AtK4bu+sh3R6nLFikMRREMkhR3 ZTcyRBnm0h8NCtiJT98sqaaN/otY7oB2Pphyj5M28ZTDh8DEP9l00SsCihJ/24vxED8Y ei2Q== 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=Y7RBLkfsx9Q0XA5VMAG5UTmLaj1/rjfPHufTqSsjJXs=; b=a1KN8v3k6cE7QE9q2VPCaijbPWVDKhX6K5Kbw2BXkSPm0RKOMsJ66owYxORB5mMVN1 0TWcfflxe22nWh5uM1+RlZPWV4gek6uDs+QWTp/40jez0DjjRM3WiXhSGHmkko7MK+rp +rx496x4NfAl2WYT2wbQghX6G55tiLlyEDeTRVxsvTa4369Qv3PPsJt3ROP/suBPDPcx FtYmH9kwN/dQnKQsuAgv393+B6Rsc48NMbkeDCoG4tyfHsCGbcNzN4zQ1BNL2U+WfY/m 3DpuyptVGK8b9nA4udGpCfu0/9GaBmwl4vsQIB3Czku5duEr8tAgDfo0KQz5SRehWMRH 3/Ow== X-Gm-Message-State: AOAM530B3oBOiApK6x2WC6PQEFQoWyvUsYIWEQ6NBaRPrzhqeVHsXv2S mqtIPN+AzJ8dyZ/kKndUpGf0lCLFSt6Z8w== X-Google-Smtp-Source: ABdhPJyhta5LVEj6ZJk8ENLF3cfRberSlIERniNrg0KnP22vqyyUEAnurUjVJzX7lLWQn8n3a7trMA== X-Received: by 2002:a17:907:2bcb:: with SMTP id gv11mr2863941ejc.353.1618396200300; Wed, 14 Apr 2021 03:30:00 -0700 (PDT) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id h8sm11369137ede.25.2021.04.14.03.29.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Apr 2021 03:29:59 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Wed, 14 Apr 2021 11:29:53 +0100 Message-Id: <20210414102955.9503-2-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210414102955.9503-1-david.plowman@raspberrypi.com> References: <20210414102955.9503-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 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 Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- 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;