From patchwork Mon Jun 28 08:56:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 12720 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 60228C321F for ; Mon, 28 Jun 2021 08:56:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A6C31684DA; Mon, 28 Jun 2021 10:56:34 +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="N36mUbQH"; dkim-atps=neutral Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id EDF6E684D3 for ; Mon, 28 Jun 2021 10:56:32 +0200 (CEST) Received: by mail-wm1-x329.google.com with SMTP id w13so10869232wmc.3 for ; Mon, 28 Jun 2021 01:56:32 -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=sowNw/qaIjLQtmQOw1xULSjivxaJNp/QUhd2EfpMn8E=; b=N36mUbQHe8pAE5SF0BLTZU7KMAInBEnJn8YbEeW+Gld1HV1H48pD/QPaPGHAptxncF RMSbUKP7wi3aqtDSj0MHuNsf9MmxEi2nPl/3S1ImYPUyLpjXCuUp6uGkSF/7iAKizVjW LujCizuzXKDk4rv9Fk7x+mLVmJZDcAxcfQFmppLqzaGDtEOd9DYza/eEdlxR+a8cOBNg OUfq0O5SvHyTSrfZJSW2dWg7cEEbgPgvcBPjT1GyxTI+Lqn1ZvCNsvMkq58NCr5yEds8 CR9KsSquGLIJttBPwUtMo3LM9E2nki/J9pMkG7fCwqUxb5j3j0/O1ypL0RaXME6Af+aK 9hZw== 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=sowNw/qaIjLQtmQOw1xULSjivxaJNp/QUhd2EfpMn8E=; b=jHun08BZCqJivYLYPriSe80FcwVRa/rPScddyqLYQeGbPpeG6CETss22k3KLJjqZDV alDmQLf62ntW7gegCYxrXtEGrO8HkClvlJZM5KYtYeN7addC0ztL8sSAqON9DNQF09Em cu1/H9m1HPI9TjXznxam9tUymHrH3kVH9seWaO50I8qfG781FlWpVZdA/1KiDvYU8aXb Iz5mohl3QeapjQAnMgbrTQUme9f2w2RGREwJHNV004W7mC3Bcf2D7QU5hl9vk6KQfRAB iEQkwN6V2LlaSiUSXtB2qnBFgvhytYKKRdnWRPpTB9uhJanDSa12fRaua/evGkNndtVG N6ig== X-Gm-Message-State: AOAM530rA8oE4XRL6gU6CjsAA0RAhbGdt4Z+SId7CRGZdbSnUURXHK2N p/vEbb75DwuQwy2/TH4MV86CCm3JvoEvng== X-Google-Smtp-Source: ABdhPJzlGz/huVVbAM5fQACVw5Xzes6ZdnlFuokcJkR/qgIe318E62Cw4xVNI2uYmZhC8M0rm9Xgxw== X-Received: by 2002:a1c:4cd:: with SMTP id 196mr5282435wme.145.1624870592475; Mon, 28 Jun 2021 01:56:32 -0700 (PDT) Received: from pi4-davidp.pitowers.org ([2a00:1098:3142:14:1ce1:9965:4328:89c4]) by smtp.gmail.com with ESMTPSA id g7sm10578243wmq.27.2021.06.28.01.56.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Jun 2021 01:56:32 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Mon, 28 Jun 2021 09:56:29 +0100 Message-Id: <20210628085630.2081-2-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210628085630.2081-1-david.plowman@raspberrypi.com> References: <20210628085630.2081-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/2] libcamera: camera: add a mode sensitivity field 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" The modeSensitivity field is a number that describes how sensitive the selected sensor mode is compared to other readout modes of the same sensor. For example, a binned mode might have twice the sensitivity of the full resolution mode, meaning you would get double the signal level for the same exposure and gains. Signed-off-by: David Plowman --- include/libcamera/camera.h | 2 ++ src/libcamera/camera.cpp | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h index d7164180..85f7f999 100644 --- a/include/libcamera/camera.h +++ b/include/libcamera/camera.h @@ -65,6 +65,8 @@ public: Transform transform; + float modeSensitivity; + protected: CameraConfiguration(); diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp index 1340c266..6b3627b6 100644 --- a/src/libcamera/camera.cpp +++ b/src/libcamera/camera.cpp @@ -154,7 +154,7 @@ LOG_DECLARE_CATEGORY(Camera) * \brief Create an empty camera configuration */ CameraConfiguration::CameraConfiguration() - : transform(Transform::Identity), config_({}) + : transform(Transform::Identity), modeSensitivity(1.0), config_({}) { } @@ -325,6 +325,20 @@ std::size_t CameraConfiguration::size() const * may adjust this field at its discretion if the selection is not supported. */ +/** + * \var CameraConfiguration::modeSensitivity + * \brief The relative sensitivity of the chosen sensor mode + * + * Some sensors have readout modes with different sensitivities. For example, + * a binned camera mode might, with the same exposure and gains, produce + * twice the signal level of the full resolution readout. This would be + * signalled by the binned mode, when it is chosen, indicating a value here + * that is twice that of the full resolution mode. + * + * This value should only be read, and not set, by the user. It will be + * valid after the configure method has reteurned successfully. + */ + /** * \var CameraConfiguration::config_ * \brief The vector of stream configurations