From patchwork Wed Sep 22 13:29: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: 13885 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 38925BF01C for ; Wed, 22 Sep 2021 13:29:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id F3D0869191; Wed, 22 Sep 2021 15:29:28 +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="fOX/Lr6/"; dkim-atps=neutral Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 55ADD6917F for ; Wed, 22 Sep 2021 15:29:25 +0200 (CEST) Received: by mail-wr1-x42f.google.com with SMTP id t8so6940074wri.1 for ; Wed, 22 Sep 2021 06:29:25 -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=u/KfOE6Hnhi4DCfVpPNhejIB69FbyQsSdO7xOHmF9IY=; b=fOX/Lr6/T0YXnV39PQdmvvGjCpbWKSJVIOAwTu0ElsfACVj3XEMQXnoJTu459mDfoX nKXarWYJXsFIQTJPuYaW6vtlg93TflnWDIJPKJVRjSVEUaYZhzwmxUhynZi5l/E4E9HB ytfAieDXgw4+7UBTI8ihuwcNNwJW9LuttLKMCEZ1PLqICPAa3RS0xjNgTgZhFQeXWZNL WWXe3LZjm5whjqXJnHotpZ75ikikHYks6xns9eT5ITGQ+FsCmtsC/hlIN4qV0gPNmakj abeq3wEhAsQ934musZuMZqxyOi+aqMrrGrHOgkdU6FbHUwn0RrXqMSSA62HOd94x5Gnx 0okg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=u/KfOE6Hnhi4DCfVpPNhejIB69FbyQsSdO7xOHmF9IY=; b=PNQJ6SRv/zF5rRFhn8odNIKVUiPCf5AmfAIpX/yIv7Vk8hIENEdQ0FVjrfnrd7qHNf 1in9lz9wsAPxmryO5WmjMjl8GHoKmqxIDX9PMqeXLa2Ggx+tNh7s+KK/5YbM6BocwHiF 4rXQNDWua/bNYSKTQ6LuaIQXnpWuNEGPf63Tj09wVnNMuXtktoXtZzGCn1H+y9fgr6/g vNuwMCPuWOp4dSIr4fD523aPcfGXhI8bV+uLy+Pm98ZpCLHb7B3lziMpX+GGyWs8UGSz N/h3AGsp3jaFUvjgO2qte+0PtvfAr0iRbsgfesTWlgI16ELI5HtDcL84woxrDg4UIoBK g3kg== X-Gm-Message-State: AOAM530vrJxGZ0DM6KzX1H2bdso9IxVy1lnfHQv3yLd3nOoRfsnRXyvL m2D1rD9zVR+pQ7XHXR0BW1sP2EgjcxcaFVEP X-Google-Smtp-Source: ABdhPJx2wGCTVY56A1AvEKt8npegT6HuO2icJ3Qpig7KoSKeVVezc+m30gKFigh9HLLM7YLc1zzLsw== X-Received: by 2002:a05:600c:2259:: with SMTP id a25mr10650208wmm.133.1632317364777; Wed, 22 Sep 2021 06:29:24 -0700 (PDT) Received: from pi4-davidp.pitowers.org ([2a00:1098:3142:14:1ce1:9965:4328:89c4]) by smtp.gmail.com with ESMTPSA id q126sm5776310wma.10.2021.09.22.06.29.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Sep 2021 06:29:24 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Wed, 22 Sep 2021 14:29:14 +0100 Message-Id: <20210922132915.14881-2-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210922132915.14881-1-david.plowman@raspberrypi.com> References: <20210922132915.14881-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 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 Reviewed-by: Kieran Bingham Reviewed-by: Naushir Patuck --- 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 601ee46e..3314c06b 100644 --- a/include/libcamera/camera.h +++ b/include/libcamera/camera.h @@ -66,6 +66,8 @@ public: Transform transform; + float modeSensitivity; + protected: CameraConfiguration(); diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp index 71809bcd..8d795dff 100644 --- a/src/libcamera/camera.cpp +++ b/src/libcamera/camera.cpp @@ -156,7 +156,7 @@ LOG_DECLARE_CATEGORY(Camera) * \brief Create an empty camera configuration */ CameraConfiguration::CameraConfiguration() - : transform(Transform::Identity), config_({}) + : transform(Transform::Identity), modeSensitivity(1.0), config_({}) { } @@ -327,6 +327,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