From patchwork Fri Jul 2 10:37:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12766 X-Patchwork-Delegate: paul.elder@ideasonboard.com 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 56955C3222 for ; Fri, 2 Jul 2021 10:38:16 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 081D5684EA; Fri, 2 Jul 2021 12:38:16 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="bgxVp09D"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B4400684F4 for ; Fri, 2 Jul 2021 12:38:14 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 29E874AB; Fri, 2 Jul 2021 12:38:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1625222294; bh=z9IJjouWybFV7nry8bVO05OXCZmi4nqmm270vwxuz2g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bgxVp09D7n3EbiD1OrisfcoeaVBC/X6rBF/wm7vXj7gfO5aGEWkZw2RBET24oSps6 8veV5jHJkFHQ9Ht1SQZuVNg7RjnXfEVheertu1U+CTtGq+VWrfKrfyoGl3fg7TaMZ/ cTzW/td8ZTkOgSPhPoBsmWI5gSITyPK2Xbf66ifI= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 2 Jul 2021 19:37:45 +0900 Message-Id: <20210702103800.41291-2-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210702103800.41291-1-paul.elder@ideasonboard.com> References: <20210702103800.41291-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH v3 01/16] controls: Add boolean constructor for ControlInfo 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" It would be convenient to be able to iterate over available boolean values, for example for controls that designate if some function can be enabled/disabled. The current min/max/def constructor is insufficient, as .values() is empty, so the values cannot be easily iterated over, and creating a Span of booleans does not work for the values constructor. Add a new constructor to ControlInfo that takes a Span of booleans (to allow specifiying one or two available values), and a default. The default value is not optional, as it doesn't make sense to have a silent default for boolean values. Signed-off-by: Paul Elder --- New in v3 --- include/libcamera/controls.h | 1 + src/libcamera/controls.cpp | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h index 1bc958a4..2dd147c8 100644 --- a/include/libcamera/controls.h +++ b/include/libcamera/controls.h @@ -272,6 +272,7 @@ public: const ControlValue &def = 0); explicit ControlInfo(Span values, const ControlValue &def = {}); + explicit ControlInfo(Span values, bool def); const ControlValue &min() const { return min_; } const ControlValue &max() const { return max_; } diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp index 34317fa0..e32e22e2 100644 --- a/src/libcamera/controls.cpp +++ b/src/libcamera/controls.cpp @@ -514,6 +514,26 @@ ControlInfo::ControlInfo(Span values, values_.push_back(value); } +/** + * \brief Construct a ControlInfo from a list of valid boolean values + * \param[in] values The control valid boolean vaalues + * \param[in] def The control default boolean value + * + * Construct a ControlInfo from a list of valid boolean values. The ControlInfo + * minimum and maximum values are set to the first and last members of the + * values list respectively. The default value is set to \a def. + */ +ControlInfo::ControlInfo(Span values, bool def) + : def_(def) +{ + min_ = values.front(); + max_ = values.back(); + + values_.reserve(2); + for (const bool &value : values) + values_.push_back(value); +} + /** * \fn ControlInfo::min() * \brief Retrieve the minimum value of the control From patchwork Fri Jul 2 10:37:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12767 X-Patchwork-Delegate: paul.elder@ideasonboard.com 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 B4ED3C3222 for ; Fri, 2 Jul 2021 10:38:18 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6FE59684F5; Fri, 2 Jul 2021 12:38:18 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="lcFeDnjz"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8486A684F4 for ; Fri, 2 Jul 2021 12:38:16 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1D8384AB; Fri, 2 Jul 2021 12:38:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1625222296; bh=suJnK99d9R8uCjtGTWwDvgmBLODHQYMksj5ADPhFG8Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lcFeDnjzyRfF+HjtozDUjpZtLXb8Kv88DXQf2FqhwUKtakIpL3uUUEF6ziT4p1n3C +SY3cMQjv/4Sb12E9Em9kh3d+yp2HNx7e/XB2vPpFwT17Tw0xEd4Zd8JMutt1OjN+7 fa9iRo9z6+goMrMYScZbW5jbzZFLcspaiBVfar5E= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 2 Jul 2021 19:37:46 +0900 Message-Id: <20210702103800.41291-3-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210702103800.41291-1-paul.elder@ideasonboard.com> References: <20210702103800.41291-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH v4 02/16] android: Add infrastructure for determining capabilities and hardware level 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" Add the infrastructure for checking and reporting capabilities. Use these capabilities to determine the hardware level as well. Since the raw capability is set to true when support is determined to be available, leave that as default false and set to true, since copying the pattern of the other capabilities would cause redundant code. Note that this will cause CTS to fail, as we don't yet declare the lack of support for FULL based on the available controls. Bug: https://bugs.libcamera.org/show_bug.cgi?id=55 Signed-off-by: Paul Elder --- Changes in v4: - rebase on camera capabilities refactoring - switch to std::set from std::map - make hwlevel similar to capabilities Changes in v3: - fix some compiler errors - go ahead and initialize the capabilities to true, update the commit message accordingly Changes in v2: - add a flag for FULL, since there are a few requirements that are not obtained from capabilities alone - add burst capture capability, since that is required for FULL as well This is my vision of how we would support the various capabilities. Although we don't have anything for FULL yet; I imagine that we would start the flags for manual sensor and manual post processing with true, and then if a required control is unavailable, then we would set the flag to false. I considered declaring an enum in CameraDevice to mirror the android ones, just for shorthand, but it seemed like a lot of code for not much gain. Unless the shorthand would be valuable because these constant names are so long? I think the available keys lists will have to be moved to the head of the function, and then as available controls are discovered add them to that list. --- src/android/camera_capabilities.cpp | 50 +++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp index 6b5edb66..54bd71da 100644 --- a/src/android/camera_capabilities.cpp +++ b/src/android/camera_capabilities.cpp @@ -9,6 +9,7 @@ #include #include +#include #include @@ -114,6 +115,15 @@ const std::map camera3FormatsMap = { }, }; +const std::map +hwLevelStrings = { + { ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED, "LIMITED" }, + { ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL, "FULL" }, + { ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY, "LEGACY" }, + { ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_3, "LEVEL_3" }, + { ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL, "EXTERNAL" }, +}; + } /* namespace */ int CameraCapabilities::initialize(std::shared_ptr camera, @@ -376,6 +386,19 @@ int CameraCapabilities::initializeStaticMetadata() const ControlInfoMap &controlsInfo = camera_->controls(); const ControlList &properties = camera_->properties(); + std::set + capabilities = { + ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE, + ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR, + ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING, + ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE, + }; + + std::set + hwLevels = { + ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL, + }; + /* Color correction static metadata. */ { std::vector data; @@ -834,11 +857,6 @@ int CameraCapabilities::initializeStaticMetadata() uint8_t croppingType = ANDROID_SCALER_CROPPING_TYPE_CENTER_ONLY; staticMetadata_->addEntry(ANDROID_SCALER_CROPPING_TYPE, croppingType); - /* Info static metadata. */ - uint8_t supportedHWLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED; - staticMetadata_->addEntry(ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL, - supportedHWLevel); - /* Request static metadata. */ int32_t partialResultCount = 1; staticMetadata_->addEntry(ANDROID_REQUEST_PARTIAL_RESULT_COUNT, @@ -859,10 +877,6 @@ int CameraCapabilities::initializeStaticMetadata() staticMetadata_->addEntry(ANDROID_REQUEST_MAX_NUM_INPUT_STREAMS, maxNumInputStreams); - std::vector availableCapabilities = { - ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE, - }; - /* Report if camera supports RAW. */ bool rawStreamAvailable = false; std::unique_ptr cameraConfig = @@ -874,7 +888,7 @@ int CameraCapabilities::initializeStaticMetadata() if (info.colourEncoding == PixelFormatInfo::ColourEncodingRAW && info.bitsPerPixel == 16) { rawStreamAvailable = true; - availableCapabilities.push_back(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_RAW); + capabilities.insert(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_RAW); } } @@ -883,9 +897,25 @@ int CameraCapabilities::initializeStaticMetadata() staticMetadata_->addEntry(ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS, numOutStreams); + /* Check capabilities */ + std::vector availableCapabilities(capabilities.begin(), + capabilities.end()); staticMetadata_->addEntry(ANDROID_REQUEST_AVAILABLE_CAPABILITIES, availableCapabilities); + uint8_t hwLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED; + if (capabilities.count(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR) && + capabilities.count(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING) && + capabilities.count(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE) && + hwLevels.count(ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL)) + hwLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL; + staticMetadata_->addEntry(ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL, + hwLevel); + + LOG(HAL, Info) + << "Hardware level: " + << hwLevelStrings.find((camera_metadata_enum_android_info_supported_hardware_level)hwLevel)->second; + std::vector availableCharacteristicsKeys = { ANDROID_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES, ANDROID_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES, From patchwork Fri Jul 2 10:37:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12768 X-Patchwork-Delegate: paul.elder@ideasonboard.com 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 1CAEAC3222 for ; Fri, 2 Jul 2021 10:38:21 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CDCFF684F4; Fri, 2 Jul 2021 12:38:20 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="L/3gy9Ex"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 66CFB684F4 for ; Fri, 2 Jul 2021 12:38:18 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E2B854AB; Fri, 2 Jul 2021 12:38:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1625222298; bh=M/XyidS39Eq3xrd8+tOjw8pyKGsMgn/xbrW83OXSV4U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L/3gy9ExTypbgjgvqS0N1C4/M3TPVSjZNTCZ35stPDrlkhoiuoocLt3rDZMAuo23o ohWh8XdAmSg9Mqzo7p5hcFKWnlFvctAR0FIhWnuStHm7H+kN83H9sjkdIALBAezYs0 3X9dyAZsmWbstXrz56d6TgQ3/q6KlS/jwGCA+XHk= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 2 Jul 2021 19:37:47 +0900 Message-Id: <20210702103800.41291-4-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210702103800.41291-1-paul.elder@ideasonboard.com> References: <20210702103800.41291-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH v3 03/16] android: Add helpers for setting android metadata from libcamera controls 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" Add helpers for setting android metadata from libcamera controls. There are two versions, for scalars and collections, both of which take a default value to fill in the android control if the libcamera control is not found. A version for scalars exists for no default, to not set the android control at all if it is not found in libcamera. The functions take two template parameters, the first for the android type, and the second for the libcamera type of the control. They can be different, for example, if the former is an enum and the latter is a boolean, or if the former is an enum (uint8_t) and the latter is an enum (int32_t). The versions that take a default value return the value that was set in the android metadata. Signed-off-by: Paul Elder --- Changes in v3: - setMetadata for collection only works with vectors - change enum to enum class - add two template parameters for android type and libcamera type - add docs New in v2 TODO: make ControlList versions so that we can use them in result metadata --- src/android/camera_capabilities.cpp | 137 ++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp index 54bd71da..1d4c44ce 100644 --- a/src/android/camera_capabilities.cpp +++ b/src/android/camera_capabilities.cpp @@ -124,6 +124,143 @@ hwLevelStrings = { { ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL, "EXTERNAL" }, }; +enum class ControlRange { + Min, + Def, + Max, +}; + +/** + * \brief Set android metadata from libcamera ControlInfo + * \tparam T Type of the control in android + * \tparam V Type of the control in libcamera + * \param[in] metadata Android metadata to add the control value to + * \param[in] tag Android metadata tag to add + * \param[in] controlsInfo libcamera ControlInfoMap from which to find the control info + * \param[in] control libcamera ControlId to find from \a controlsInfo + * \param[in] controlRange Whether to use the min, def, or max value from the control info + * + * Set the android metadata entry in \a metadata with tag \a tag based on the + * control info found for the libcamera control \a control in the libcamera + * ControlInfoMap \a controlsInfo. If no libcamera ControlInfo is found, then + * the function returns without modifying anything. + * + * This function is for scalar values. + */ +template> * = nullptr, + typename V> +void setMetadata(CameraMetadata *metadata, uint32_t tag, + const ControlInfoMap &controlsInfo, const ControlId *control, + enum ControlRange controlRange) +{ + const auto &info = controlsInfo.find(control); + if (info == controlsInfo.end()) + return; + + T ret; + switch (controlRange) { + case ControlRange::Min: + ret = info->second.min().get(); + break; + case ControlRange::Def: + ret = info->second.def().get(); + break; + case ControlRange::Max: + ret = info->second.max().get(); + break; + } + + metadata->addEntry(tag, ret); + return; +} + +/** + * \brief Set android metadata from libcamera ControlInfo or a default value + * \tparam T Type of the control in android + * \tparam U Type of the control in libcamera + * \param[in] metadata Android metadata to add the control value to + * \param[in] tag Android metadata tag to add + * \param[in] controlsInfo libcamera ControlInfoMap from which to find the control info + * \param[in] control libcamera ControlId to find from \a controlsInfo + * \param[in] controlRange Whether to use the min, def, or max value from the control info + * \param[in] defaultValue The value to set in \a metadata if \a control is not found + * + * Set the android metadata entry in \a metadata with tag \a tag based on the + * control info found for the libcamera control \a control in the libcamera + * ControlInfoMap \a controlsInfo. If no libcamera ControlInfo is found, then + * the android metadata entry is set to \a defaultValue. + * + * This function is for scalar values. + */ +template> * = nullptr> +T setMetadata(CameraMetadata *metadata, uint32_t tag, + const ControlInfoMap &controlsInfo, const ControlId *control, + enum ControlRange controlRange, const V defaultValue) +{ + T ret = defaultValue; + + const auto &info = controlsInfo.find(control); + if (info != controlsInfo.end()) { + switch (controlRange) { + case ControlRange::Min: + ret = info->second.min().get(); + break; + case ControlRange::Def: + ret = info->second.def().get(); + break; + case ControlRange::Max: + ret = info->second.max().get(); + break; + } + } + + metadata->addEntry(tag, ret); + return ret; +} + +/** + * \brief Set android metadata from libcamera ControlInfo or a default value + * \tparam T Type of the control in android + * \tparam V Type of the control in libcamera + * \param[in] metadata Android metadata to add the control value to + * \param[in] tag Android metadata tag to add + * \param[in] controlsInfo libcamera ControlInfoMap from which to find the control info + * \param[in] control libcamera ControlId to find from \a controlsInfo + * \param[in] defaultVector The value to set in \a metadata if \a control is not found + * + * Set the android metadata entry in \a metadata with tag \a tag based on the + * control info found for the libcamera control \a control in the libcamera + * ControlInfoMap \a controlsInfo. If no libcamera ControlInfo is found, then + * the android metadata entry is set to \a defaultVector. + * + * This function is for vector values. + */ +template +std::vector setMetadata(CameraMetadata *metadata, uint32_t tag, + const ControlInfoMap &controlsInfo, + const ControlId *control, + const std::vector &defaultVector) +{ + std::vector ret = {}; + + const auto &info = controlsInfo.find(control); + if (info != controlsInfo.end()) { + ret.reserve(info->second.values().size()); + for (const auto &value : info->second.values()) + ret.push_back(value.get()); + } else { + ret = defaultVector; + } + + metadata->addEntry(tag, ret); + return ret; +} + } /* namespace */ int CameraCapabilities::initialize(std::shared_ptr camera, From patchwork Fri Jul 2 10:37:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12769 X-Patchwork-Delegate: paul.elder@ideasonboard.com 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 7C17DC3222 for ; Fri, 2 Jul 2021 10:38:22 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 37608684EA; Fri, 2 Jul 2021 12:38:22 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="d/jr0b6R"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AEA9D684F2 for ; Fri, 2 Jul 2021 12:38:20 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DB65E4AB; Fri, 2 Jul 2021 12:38:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1625222300; bh=AYcneyqdlXVNb+KfsqqK/l6a6Fv5IopjSTuCKdlKpgo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d/jr0b6RqcCy+4VyxTOHPlQig4EVV6HWlErAcyIbMvDcIh6GlDWKk7laUXywpgI7l zAyaDxP98rc4qZ61Bjic6x2/bzvhltI8Hee3GJbmTUU0BaDNUgvGJR1KUcJHOYaWLb +BiLKzqKqKqzGnI7MZ+jio+456z5C8IXB+0YQboM= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 2 Jul 2021 19:37:48 +0900 Message-Id: <20210702103800.41291-5-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210702103800.41291-1-paul.elder@ideasonboard.com> References: <20210702103800.41291-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH v3 04/16] android, controls: Add and plumb MaxLatency control 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" Add a MaxLatency control, and plumb it into the HAL accordingly. Bug: https://bugs.libcamera.org/show_bug.cgi?id=50 Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart --- Changes in v3: - use v3 setMetadata - add comment to explain 4 - remove todo Changes in v2: - use new setMetadata - rebase on camera capabilities refactor --- src/android/camera_capabilities.cpp | 13 +++++++++++-- src/libcamera/control_ids.yaml | 10 ++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp index 1d4c44ce..530167de 100644 --- a/src/android/camera_capabilities.cpp +++ b/src/android/camera_capabilities.cpp @@ -870,8 +870,17 @@ int CameraCapabilities::initializeStaticMetadata() } /* Sync static metadata. */ - int32_t maxLatency = ANDROID_SYNC_MAX_LATENCY_UNKNOWN; - staticMetadata_->addEntry(ANDROID_SYNC_MAX_LATENCY, maxLatency); + int32_t maxLatency = setMetadata( + staticMetadata_.get(), ANDROID_SYNC_MAX_LATENCY, + controlsInfo, &controls::draft::MaxLatency, + ControlRange::Def, + (int32_t)ANDROID_SYNC_MAX_LATENCY_UNKNOWN); + LOG(HAL, Info) << "Max sync latency is " << maxLatency; + /* CTS allows a sync latency of up to 4 for burst capture capability */ + if (maxLatency < 0 || 4 < maxLatency) + capabilities.erase(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE); + if (maxLatency != 0) + hwLevels.erase(ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL); /* Flash static metadata. */ char flashAvailable = ANDROID_FLASH_INFO_AVAILABLE_FALSE; diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml index d92f29f5..9d4638ae 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -622,6 +622,16 @@ controls: detection, additional format conversions etc) count as an additional pipeline stage. + - MaxLatency: + type: int32_t + draft: true + description: | + The maximum number of frames that can occur after a request (different + than the previous) has been submitted, and before the result's state + becomes synchronized. A value of -1 indicates unknown latency, and 0 + indicates per-frame control. Currently identical to + ANDROID_SYNC_MAX_LATENCY. + - TestPatternMode: type: int32_t draft: true From patchwork Fri Jul 2 10:37:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12770 X-Patchwork-Delegate: paul.elder@ideasonboard.com 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 D7B85C3222 for ; Fri, 2 Jul 2021 10:38:24 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 90D32684E7; Fri, 2 Jul 2021 12:38:24 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="llwICyYa"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CAF68684F2 for ; Fri, 2 Jul 2021 12:38:22 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 58710891; Fri, 2 Jul 2021 12:38:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1625222302; bh=ijlqyjiC8eGczISYnu50gavvQApOfrstEsLecP7RyV8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=llwICyYarxbfI/TQEBxlMWMRrb8uTXvObXl0BsHEI7TwP+S5KD4V6iMETPmZh/THT 76EtpNJD+sJx0L9GYDr+m2mEQL7drQ9VbXOvilBJpDeTsWwJ/J0rGgCdDQvRBMouQd YXNpCyY6VUH9OJwXi0D/Ts4ZRyoAhXmMtFKQ15NI= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 2 Jul 2021 19:37:49 +0900 Message-Id: <20210702103800.41291-6-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210702103800.41291-1-paul.elder@ideasonboard.com> References: <20210702103800.41291-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH v3 05/16] controls: Replace AeLocked with AeState, and add AeLock 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" AeLocked alone isn't sufficient for reporting the AE state, so replace it with AeState. Add an AeLock control for instructing the camera to lock the AE values. Update the current users of AeLocked accordingly. Signed-off-by: Paul Elder --- No change in v3 --- src/ipa/raspberrypi/raspberrypi.cpp | 5 +- src/ipa/rkisp1/rkisp1.cpp | 13 ++-- src/libcamera/control_ids.yaml | 96 ++++++++++++++++++----------- 3 files changed, 71 insertions(+), 43 deletions(-) diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp index 4d09a84f..4981aa29 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -469,7 +469,10 @@ void IPARPi::reportMetadata() AgcStatus *agcStatus = rpiMetadata_.GetLocked("agc.status"); if (agcStatus) { - libcameraMetadata_.set(controls::AeLocked, agcStatus->locked); + libcameraMetadata_.set(controls::AeState, + agcStatus->locked ? + controls::AeStateLocked : + controls::AeStateSearching); libcameraMetadata_.set(controls::DigitalGain, agcStatus->digital_gain); } diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index cdfb4d13..4eca26e2 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -51,7 +51,7 @@ private: const rkisp1_stat_buffer *stats); void setControls(unsigned int frame); - void metadataReady(unsigned int frame, unsigned int aeState); + void metadataReady(unsigned int frame, int aeState); std::map buffers_; std::map buffersMemory_; @@ -227,7 +227,7 @@ void IPARkISP1::updateStatistics(unsigned int frame, const rkisp1_stat_buffer *stats) { const rkisp1_cif_isp_stat *params = &stats->params; - unsigned int aeState = 0; + int aeState = controls::AeStateInactive; if (stats->meas_type & RKISP1_CIF_ISP_STAT_AUTOEXP) { const rkisp1_cif_isp_ae_stat *ae = ¶ms->ae; @@ -262,7 +262,9 @@ void IPARkISP1::updateStatistics(unsigned int frame, setControls(frame + 1); } - aeState = fabs(factor - 1.0f) < 0.05f ? 2 : 1; + aeState = fabs(factor - 1.0f) < 0.05f ? + controls::AeStateConverged : + controls::AeStateSearching; } metadataReady(frame, aeState); @@ -281,12 +283,11 @@ void IPARkISP1::setControls(unsigned int frame) queueFrameAction.emit(frame, op); } -void IPARkISP1::metadataReady(unsigned int frame, unsigned int aeState) +void IPARkISP1::metadataReady(unsigned int frame, int aeState) { ControlList ctrls(controls::controls); - if (aeState) - ctrls.set(controls::AeLocked, aeState == 2); + ctrls.set(controls::AeState, aeState); RkISP1Action op; op.op = ActionMetadata; diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml index 9d4638ae..5717bc1f 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -14,16 +14,70 @@ controls: \sa ExposureTime AnalogueGain - - AeLocked: + - AeLock: type: bool description: | - Report the lock status of a running AE algorithm. + Control to lock the AE values. + When set to true, the AE algorithm is locked to its latest parameters, + and will not change exposure settings until set to false. + \sa AeState - If the AE algorithm is locked the value shall be set to true, if it's - converging it shall be set to false. If the AE algorithm is not - running the control shall not be present in the metadata control list. + - AeState: + type: int32_t + description: | + Control to report the current AE algorithm state. Enabling or disabling + AE (AeEnable) always resets the AeState to AeStateInactive. The camera + device can do several state transitions between two results, if it is + allowed by the state transition table. For example, AeStateInactive may + never actually be seen in a result. - \sa AeEnable + The state in the result is the state for this image (in sync with this + image). If AE state becomes AeStateConverged, then the image data + associated with the result should be good to use. + + The state transitions mentioned below assume that AeEnable is on. + + \sa AeLock + enum: + - name: AeStateInactive + value: 0 + description: | + The AE algorithm is inactive. + If the camera initiates an AE scan, the state shall go to Searching. + If AeLock is on, the state shall go to Locked. + - name: AeStateSearching + value: 1 + description: | + The AE algorithm has not converged yet. + If the camera finishes an AE scan, the state shall go to Converged. + If the camera finishes an AE scan, but flash is required, the state + shall go to FlashRequired. + If AeLock is on, the state shall go to Locked. + - name: AeStateConverged + value: 2 + description: | + The AE algorithm has converged. + If the camera initiates an AE scan, the state shall go to Searching. + If AeLock is on, the state shall go to Locked. + - name: AeStateLocked + value: 3 + description: | + The AE algorithm is locked. + If AeLock is off, the state can go to Searching, Converged, or + FlashRequired. + - name: AeStateFlashRequired + value: 4 + description: | + The AE algorithm would need a flash for good results + If the camera initiates an AE scan, the state shall go to Searching. + If AeLock is on, the state shall go to Locked. + - name: AeStatePrecapture + value: 5 + description: | + The AE algorithm has started a pre-capture metering session. + After the sequence is finished, the state shall go to Converged if + AeLock is off, and Locked if it is on. + \sa AePrecaptureTrigger # AeMeteringMode needs further attention: # - Auto-generate max enum value. @@ -477,36 +531,6 @@ controls: High quality aberration correction which might reduce the frame rate. - - AeState: - type: int32_t - draft: true - description: | - Control to report the current AE algorithm state. Currently identical to - ANDROID_CONTROL_AE_STATE. - - Current state of the AE algorithm. - enum: - - name: AeStateInactive - value: 0 - description: The AE algorithm is inactive. - - name: AeStateSearching - value: 1 - description: The AE algorithm has not converged yet. - - name: AeStateConverged - value: 2 - description: The AE algorithm has converged. - - name: AeStateLocked - value: 3 - description: The AE algorithm is locked. - - name: AeStateFlashRequired - value: 4 - description: The AE algorithm would need a flash for good results - - name: AeStatePrecapture - value: 5 - description: | - The AE algorithm has started a pre-capture metering session. - \sa AePrecaptureTrigger - - AfState: type: int32_t draft: true From patchwork Fri Jul 2 10:37:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12771 X-Patchwork-Delegate: paul.elder@ideasonboard.com 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 B4F7CC3222 for ; Fri, 2 Jul 2021 10:38:26 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6C49A684F8; Fri, 2 Jul 2021 12:38:26 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="TNnQ9Swi"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id BF3A0684F6 for ; Fri, 2 Jul 2021 12:38:24 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4B3D54AB; Fri, 2 Jul 2021 12:38:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1625222304; bh=p8jz7QVzI8DLaijluE0KkGGqeckdX07fqMZpSOBqMKI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TNnQ9SwivoF10kE3owWkq3HLwDHeBrYV0WgIavfVbvOarU2JFobKSbOPYCphaj3nz eHQySCPlQBPWB4kLWFjTfSbX9nm5VGFxwOlFKumkQxPzFDAtEVzYg4OZbuvu4WS2rI 1aVEIg+XmHLCs4iYrGajxpO1fTVjsHZII29NOYsU= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 2 Jul 2021 19:37:50 +0900 Message-Id: <20210702103800.41291-7-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210702103800.41291-1-paul.elder@ideasonboard.com> References: <20210702103800.41291-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH v3 06/16] controls: Replace AwbEnable with AwbMode 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" Previously it was possible to have AwbEnable set to false, yet have AwbMode on anything. This caused a confusion situation, so merge the two into AwbMode. While at it, pull in the android AWB modes. Adjust the previous users of AwbEnable accordingly. Signed-off-by: Paul Elder --- Changes in v3: - resume raspberrypi awb on any non-off mode --- include/libcamera/ipa/raspberrypi.h | 1 - src/ipa/raspberrypi/raspberrypi.cpp | 27 ++++++++---------------- src/libcamera/control_ids.yaml | 32 +++++++++++++++-------------- test/controls/control_list.cpp | 6 +++--- 4 files changed, 29 insertions(+), 37 deletions(-) diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h index a8790000..63392a26 100644 --- a/include/libcamera/ipa/raspberrypi.h +++ b/include/libcamera/ipa/raspberrypi.h @@ -35,7 +35,6 @@ static const ControlInfoMap Controls = { { &controls::AeConstraintMode, ControlInfo(controls::AeConstraintModeValues) }, { &controls::AeExposureMode, ControlInfo(controls::AeExposureModeValues) }, { &controls::ExposureValue, ControlInfo(0.0f, 16.0f) }, - { &controls::AwbEnable, ControlInfo(false, true) }, { &controls::ColourGains, ControlInfo(0.0f, 32.0f) }, { &controls::AwbMode, ControlInfo(controls::AwbModeValues) }, { &controls::Brightness, ControlInfo(-1.0f, 1.0f) }, diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp index 4981aa29..620ed0f0 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -746,24 +746,6 @@ void IPARPi::queueRequest(const ControlList &controls) break; } - case controls::AWB_ENABLE: { - RPiController::Algorithm *awb = controller_.GetAlgorithm("awb"); - if (!awb) { - LOG(IPARPI, Warning) - << "Could not set AWB_ENABLE - no AWB algorithm"; - break; - } - - if (ctrl.second.get() == false) - awb->Pause(); - else - awb->Resume(); - - libcameraMetadata_.set(controls::AwbEnable, - ctrl.second.get()); - break; - } - case controls::AWB_MODE: { RPiController::AwbAlgorithm *awb = dynamic_cast( controller_.GetAlgorithm("awb")); @@ -774,6 +756,15 @@ void IPARPi::queueRequest(const ControlList &controls) } int32_t idx = ctrl.second.get(); + + if (idx == controls::AwbOff) { + awb->Pause(); + break; + } + + if (awb->IsPaused()) + awb->Resume(); + if (AwbModeTable.count(idx)) { awb->SetMode(AwbModeTable.at(idx)); libcameraMetadata_.set(controls::AwbMode, idx); diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml index 5717bc1f..2e62f61b 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -229,13 +229,6 @@ controls: Report an estimate of the current illuminance level in lux. The Lux control can only be returned in metadata. - - AwbEnable: - type: bool - description: | - Enable or disable the AWB. - - \sa ColourGains - # AwbMode needs further attention: # - Auto-generate max enum value. # - Better handling of custom types. @@ -245,29 +238,38 @@ controls: Specify the range of illuminants to use for the AWB algorithm. The modes supported are platform specific, and not all modes may be supported. enum: - - name: AwbAuto + - name: AwbOff value: 0 + description: The AWB routune is disabled. + - name: AwbAuto + value: 1 description: Search over the whole colour temperature range. - name: AwbIncandescent - value: 1 - description: Incandescent AWB lamp mode. - - name: AwbTungsten value: 2 - description: Tungsten AWB lamp mode. + description: Incandescent AWB lamp mode. - name: AwbFluorescent value: 3 description: Fluorescent AWB lamp mode. - - name: AwbIndoor + - name: AwbWarmFluorescent value: 4 - description: Indoor AWB lighting mode. + description: Warm fluorescent AWB lamp mode. - name: AwbDaylight value: 5 description: Daylight AWB lighting mode. - name: AwbCloudy value: 6 description: Cloudy AWB lighting mode. - - name: AwbCustom + - name: AwbTwilight value: 7 + description: Twilight AWB lamp mode. + - name: AwbTungsten + value: 8 + description: Tungsten AWB lamp mode. + - name: AwbIndoor + value: 9 + description: Indoor AWB lighting mode. + - name: AwbCustom + value: 10 description: Custom AWB mode. - AwbLocked: diff --git a/test/controls/control_list.cpp b/test/controls/control_list.cpp index 70cf61b8..ce55d09b 100644 --- a/test/controls/control_list.cpp +++ b/test/controls/control_list.cpp @@ -143,10 +143,10 @@ protected: * Attempt to set an invalid control and verify that the * operation failed. */ - list.set(controls::AwbEnable, true); + list.set(controls::AwbMode, true); - if (list.contains(controls::AwbEnable)) { - cout << "List shouldn't contain AwbEnable control" << endl; + if (list.contains(controls::AwbMode)) { + cout << "List shouldn't contain AwbMode control" << endl; return TestFail; } From patchwork Fri Jul 2 10:37:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12772 X-Patchwork-Delegate: paul.elder@ideasonboard.com 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 5CF55C3222 for ; Fri, 2 Jul 2021 10:38:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1DBF8684F3; Fri, 2 Jul 2021 12:38:29 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="JUV94TEN"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 82C5C684FC for ; Fri, 2 Jul 2021 12:38:26 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 24053891; Fri, 2 Jul 2021 12:38:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1625222306; bh=IrsC/FeWyfcL0Sh+EI8m4+rQeJYAHb7u7XqagunHW5k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JUV94TENVIKbSsgXxqHeQ2q3RGcnhpmB2vuO3Pw+ZTH9H+N4nWg1ve1BD8Y7/c7Ex Fdj2pmCOLEqw9d/exc2Z4yRROrw3hx+Aq/yYLqQx7ZLzgqBfJBX3gMRdYITFoqjBBi Bje43DGQy5DPT7Ro8iN62yLgE/jII/t4Zx+nUOUE= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 2 Jul 2021 19:37:51 +0900 Message-Id: <20210702103800.41291-8-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210702103800.41291-1-paul.elder@ideasonboard.com> References: <20210702103800.41291-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH v3 07/16] controls: Replace AwbLocked with AwbState, and add AwbLock 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" AwbLocked alone isn't sufficient for reporting the AWB state, so replace it with AwbState. Add an AwbLock control for instructing the camera to lock the AWB values. Signed-off-by: Paul Elder --- No change in v3 --- src/libcamera/control_ids.yaml | 82 ++++++++++++++++++++-------------- 1 file changed, 49 insertions(+), 33 deletions(-) diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml index 2e62f61b..3a4f07cf 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -161,6 +161,55 @@ controls: value: 3 description: Custom exposure mode. + - AwbLock: + type: bool + description: | + Control to lock the AWB values. + When set to true, the AWB algorithm is locked to its latest parameters, + and will not change exposure settings until set to false. + \sa AwbState + + - AwbState: + type: int32_t + description: | + Control to report the current AWB algorithm state. Switching between or + enabling AWB modes (AwbMode) always resets the AwbState to + AwbStateInactive. The camera device can do several state transitions + between two results, if it is allowed by the state transition table. + For example, AwbStateInactive may never actually be seen in a result. + + The state in the result is the state for this image (in sync with this + image). If AWB state becomes AwbStateConverged, then the image data + associated with the result should be good to use. + + The state transitions mentioned below assume that AwbMode is auto. + + \sa AwbLock + enum: + - name: AwbStateInactive + value: 0 + description: | + The AWB algorithm is inactive. + If the camera initiates an AWB scan, the state shall go to Searching. + If AwbLock is on, the state shall go to Locked. + - name: AwbStateSearching + value: 1 + description: | + The AWB algorithm has not converged yet. + If the camera finishes an AWB scan, the state shall go to Converged. + If AwbLock is on, the state shall go to Locked. + - name: AwbStateConverged + value: 2 + description: | + The AWB algorithm has converged. + If the camera initiates an AWB scan, the state shall go to Searching. + If AwbLock is on, the state shall go to Locked. + - name: AwbStateLocked + value: 3 + description: | + The AWB algorithm is locked. + If AwbLock is off, the state shall go to Searching. + - ExposureValue: type: float description: | @@ -272,17 +321,6 @@ controls: value: 10 description: Custom AWB mode. - - AwbLocked: - type: bool - description: | - Report the lock status of a running AWB algorithm. - - If the AWB algorithm is locked the value shall be set to true, if it's - converging it shall be set to false. If the AWB algorithm is not - running the control shall not be present in the metadata control list. - - \sa AwbEnable - - ColourGains: type: float description: | @@ -572,28 +610,6 @@ controls: description: | AF has completed a passive scan without finding focus. - - AwbState: - type: int32_t - draft: true - description: | - Control to report the current AWB algorithm state. Currently identical - to ANDROID_CONTROL_AWB_STATE. - - Current state of the AWB algorithm. - enum: - - name: AwbStateInactive - value: 0 - description: The AWB algorithm is inactive. - - name: AwbStateSearching - value: 1 - description: The AWB algorithm has not converged yet. - - name: AwbConverged - value: 2 - description: The AWB algorithm has converged. - - name: AwbLocked - value: 3 - description: The AWB algorithm is locked. - - SensorRollingShutterSkew: type: int64_t draft: true From patchwork Fri Jul 2 10:37:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12773 X-Patchwork-Delegate: paul.elder@ideasonboard.com 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 B6161C3223 for ; Fri, 2 Jul 2021 10:38:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 74A54684F2; Fri, 2 Jul 2021 12:38:29 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="owPMM4w3"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6C17E684EA for ; Fri, 2 Jul 2021 12:38:28 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 013704AB; Fri, 2 Jul 2021 12:38:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1625222308; bh=iVTWY+Na5T9ScmcOGpzeaufCqnADUGvdg5sxTmjdXW0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=owPMM4w3qy1ck3nnokqawz86XvDOIR+Ej2gKkS3WqHGzsXmNNvtn+noKN/I857KwO 5pwX2lHGo61049GgSVgV4ZAVK/Y6aJOLg1YXMat33O6lijYvzcp5XnSL0ZfJ/j9QTH MDMMYmgigLAKAD8OnBETJdjSNnCWvsxfRmFUR7Ug= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 2 Jul 2021 19:37:52 +0900 Message-Id: <20210702103800.41291-9-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210702103800.41291-1-paul.elder@ideasonboard.com> References: <20210702103800.41291-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH v3 08/16] android: Plumb AeEnable control 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" Plumb the AeEnable control into the HAL for CONTROL_AE_AVAILABLE_MODES for static metadata, and CONTROL_AE_MODE for result metadata. Bug: https://bugs.libcamera.org/show_bug.cgi?id=42 Signed-off-by: Paul Elder --- Changes in v3 - use new setMetadata - rebase on camera capabilities refactor --- src/android/camera_capabilities.cpp | 19 ++++++++++++++----- src/android/camera_device.cpp | 6 ++++-- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp index 530167de..21ba791a 100644 --- a/src/android/camera_capabilities.cpp +++ b/src/android/camera_capabilities.cpp @@ -7,6 +7,7 @@ #include "camera_capabilities.h" +#include #include #include #include @@ -561,11 +562,19 @@ int CameraCapabilities::initializeStaticMetadata() staticMetadata_->addEntry(ANDROID_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES, aeAvailableAntiBandingModes); - std::vector aeAvailableModes = { - ANDROID_CONTROL_AE_MODE_ON, - }; - staticMetadata_->addEntry(ANDROID_CONTROL_AE_AVAILABLE_MODES, - aeAvailableModes); + std::vector aeModes = setMetadata( + staticMetadata_.get(), + ANDROID_CONTROL_AE_AVAILABLE_MODES, + controlsInfo, &controls::AeEnable, + std::vector({ ANDROID_CONTROL_AE_MODE_ON })); + + if (std::find(aeModes.begin(), aeModes.end(), + ANDROID_CONTROL_AE_MODE_OFF) == aeModes.end()) { + LOG(HAL, Info) << "AE cannot be turned off"; + hwLevels.erase(ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL); + /* \todo Double check if this is the correct capability */ + capabilities.erase(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR); + } int64_t minFrameDurationNsec = -1; int64_t maxFrameDurationNsec = -1; diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index 678cde23..1711f271 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -1202,8 +1202,10 @@ CameraDevice::getResultMetadata(const Camera3RequestDescriptor &descriptor) cons value = ANDROID_CONTROL_AE_LOCK_OFF; resultMetadata->addEntry(ANDROID_CONTROL_AE_LOCK, value); - value = ANDROID_CONTROL_AE_MODE_ON; - resultMetadata->addEntry(ANDROID_CONTROL_AE_MODE, value); + if (metadata.contains(controls::AeEnable)) { + uint8_t aeMode = metadata.get(controls::AeEnable); + resultMetadata->addEntry(ANDROID_CONTROL_AE_MODE, aeMode); + } if (settings.getEntry(ANDROID_CONTROL_AE_TARGET_FPS_RANGE, &entry)) /* From patchwork Fri Jul 2 10:37:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12774 X-Patchwork-Delegate: paul.elder@ideasonboard.com 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 462A3C3222 for ; Fri, 2 Jul 2021 10:38:32 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id F35B2684F2; Fri, 2 Jul 2021 12:38:31 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="o0nc2LLs"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4F640684EA for ; Fri, 2 Jul 2021 12:38:30 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CCA6B4AB; Fri, 2 Jul 2021 12:38:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1625222310; bh=pea6CLApvUCw4iHgN4LrzPdMmrovxBTWZ3iURRQT+3k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o0nc2LLsxb32/g4ajierppvbkDor0YgJOyXOdWBnP3tfyDkpvKlBUtFO9kNbq4HMW NaXq6+3jiG26H1zNRVMPUS2Hf/MLRJy38z86NMzGLb7CgrcrIBXCyfy+pcbpG/4BwV BSCdterBh0GL7l36+7G9xqcvRVarIEqHTJXSpmYE= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 2 Jul 2021 19:37:53 +0900 Message-Id: <20210702103800.41291-10-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210702103800.41291-1-paul.elder@ideasonboard.com> References: <20210702103800.41291-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH v3 09/16] android: Plumb AeLock control 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" Plumb the AeLock control into the HAL for CONTROL_AE_LOCK_AVAILABLE_MODES for static metadata. Bug: https://bugs.libcamera.org/show_bug.cgi?id=43 Signed-off-by: Paul Elder --- Changes in v3: - use new setMetadata - rebase on camera capabilities refactor TODO: plumb result metadata --- src/android/camera_capabilities.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp index 21ba791a..5896d61d 100644 --- a/src/android/camera_capabilities.cpp +++ b/src/android/camera_capabilities.cpp @@ -686,9 +686,17 @@ int CameraCapabilities::initializeStaticMetadata() staticMetadata_->addEntry(ANDROID_CONTROL_SCENE_MODE_OVERRIDES, sceneModesOverride); - uint8_t aeLockAvailable = ANDROID_CONTROL_AE_LOCK_AVAILABLE_FALSE; - staticMetadata_->addEntry(ANDROID_CONTROL_AE_LOCK_AVAILABLE, - aeLockAvailable); + uint8_t aeLockAvailable = setMetadata( + staticMetadata_.get(), + ANDROID_CONTROL_AE_LOCK_AVAILABLE, + controlsInfo, &controls::AeLock, + ControlRange::Max, + (uint8_t)ANDROID_CONTROL_AE_LOCK_AVAILABLE_FALSE); + if (aeLockAvailable != ANDROID_CONTROL_AE_LOCK_AVAILABLE_TRUE) { + LOG(HAL, Info) << "AE lock is unavailable"; + capabilities.erase(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE); + capabilities.erase(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR); + } uint8_t awbLockAvailable = ANDROID_CONTROL_AWB_LOCK_AVAILABLE_FALSE; staticMetadata_->addEntry(ANDROID_CONTROL_AWB_LOCK_AVAILABLE, From patchwork Fri Jul 2 10:37:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12775 X-Patchwork-Delegate: paul.elder@ideasonboard.com 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 C5274C3222 for ; Fri, 2 Jul 2021 10:38:34 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7C882684F3; Fri, 2 Jul 2021 12:38:34 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="KrcAjf5I"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 33E79684FA for ; Fri, 2 Jul 2021 12:38:32 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C06BA4AB; Fri, 2 Jul 2021 12:38:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1625222312; bh=1oNaV1COmX83StINoM4E3rLeScTiGuSt00wkeJqpDi8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KrcAjf5I/QYPFz5Ip1HuGiuDJhlanks39L8mzbSpSllvTrQC74ts1VTLdfp1NdUya +nS1lD8FE94RuYNtRxOV5bArSTZDTrBhZboPlshBz4E4nYin3OSfXGFcy0rrS8QRV+ 56Ltw8War9FLs7D7NxqTsTj4MqBuao4A9tJEz77w= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 2 Jul 2021 19:37:54 +0900 Message-Id: <20210702103800.41291-11-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210702103800.41291-1-paul.elder@ideasonboard.com> References: <20210702103800.41291-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH v3 10/16] android: Plumb AwbMode control 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" Plumb the AwbMode control into the HAL for CONTROL_AWB_AVAILABLE_MODES for static metadata. Bug: https://bugs.libcamera.org/show_bug.cgi?id=44 Signed-off-by: Paul Elder --- Changes in v3: - use new setMetadata - rebase on camera capabilities refactor TODO: plumb result metadata --- src/android/camera_capabilities.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp index 5896d61d..a1674eae 100644 --- a/src/android/camera_capabilities.cpp +++ b/src/android/camera_capabilities.cpp @@ -662,15 +662,17 @@ int CameraCapabilities::initializeStaticMetadata() staticMetadata_->addEntry(ANDROID_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES, availableStabilizationModes); - /* - * \todo Inspect the camera capabilities to report the available - * AWB modes. Default to AUTO as CTS tests require it. - */ - std::vector availableAwbModes = { - ANDROID_CONTROL_AWB_MODE_AUTO, - }; - staticMetadata_->addEntry(ANDROID_CONTROL_AWB_AVAILABLE_MODES, - availableAwbModes); + std::vector awbModes = setMetadata( + staticMetadata_.get(), + ANDROID_CONTROL_AWB_AVAILABLE_MODES, + controlsInfo, &controls::AwbMode, + std::vector({ ANDROID_CONTROL_AWB_MODE_AUTO })); + if (std::find(awbModes.begin(), awbModes.end(), + ANDROID_CONTROL_AWB_MODE_OFF) == awbModes.end()) { + LOG(HAL, Info) << "AWB cannot be turned off"; + hwLevels.erase(ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL); + capabilities.erase(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING); + } std::vector availableMaxRegions = { 0, 0, 0, From patchwork Fri Jul 2 10:37:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12776 X-Patchwork-Delegate: paul.elder@ideasonboard.com 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 38F55C3222 for ; Fri, 2 Jul 2021 10:38:36 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E5CDE684FB; Fri, 2 Jul 2021 12:38:35 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="M8H0ajIA"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2E964684F2 for ; Fri, 2 Jul 2021 12:38:34 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B1FB84AB; Fri, 2 Jul 2021 12:38:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1625222313; bh=iN69RLAK1D2meF3e9tUqtevbFTdsyHTS14qo31Nl9Mw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M8H0ajIAJrQ4TNPFhQoryi/DpnoZp6xE02CxByMu9tqecTur75WI1dZ4j8ToSkafB ycyS7Pl/+W0QNk/Sk+x36fcAjzQFew5NlzZmLR/xBV/rEYXnObCr5u0kP1/F7DcB6e 7TJo11Gh/u4TL9+c9COc0n2GJaq395S7FWx+nbsA= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 2 Jul 2021 19:37:55 +0900 Message-Id: <20210702103800.41291-12-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210702103800.41291-1-paul.elder@ideasonboard.com> References: <20210702103800.41291-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH v3 11/16] android: Plumb AwbLock control 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" Plumb the AwbLock control into the HAL for CONTROL_AWB_LOCK_AVAILABLE_MODES for static metadata. Bug: https://bugs.libcamera.org/show_bug.cgi?id=45 Signed-off-by: Paul Elder --- Changes in v3: - use new setMetadata - rebase on camera capabilities refactor TODO: plumb result metadata --- src/android/camera_capabilities.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp index a1674eae..cb9a49c7 100644 --- a/src/android/camera_capabilities.cpp +++ b/src/android/camera_capabilities.cpp @@ -572,7 +572,6 @@ int CameraCapabilities::initializeStaticMetadata() ANDROID_CONTROL_AE_MODE_OFF) == aeModes.end()) { LOG(HAL, Info) << "AE cannot be turned off"; hwLevels.erase(ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL); - /* \todo Double check if this is the correct capability */ capabilities.erase(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR); } @@ -700,9 +699,17 @@ int CameraCapabilities::initializeStaticMetadata() capabilities.erase(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR); } - uint8_t awbLockAvailable = ANDROID_CONTROL_AWB_LOCK_AVAILABLE_FALSE; - staticMetadata_->addEntry(ANDROID_CONTROL_AWB_LOCK_AVAILABLE, - awbLockAvailable); + uint8_t awbLockAvailable = setMetadata( + staticMetadata_.get(), + ANDROID_CONTROL_AWB_LOCK_AVAILABLE, + controlsInfo, &controls::AwbLock, + ControlRange::Max, + (uint8_t)ANDROID_CONTROL_AWB_LOCK_AVAILABLE_FALSE); + if (awbLockAvailable != ANDROID_CONTROL_AWB_LOCK_AVAILABLE_TRUE) { + LOG(HAL, Info) << "AWB lock is unavailable"; + capabilities.erase(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE); + capabilities.erase(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING); + } char availableControlModes = ANDROID_CONTROL_MODE_AUTO; staticMetadata_->addEntry(ANDROID_CONTROL_AVAILABLE_MODES, From patchwork Fri Jul 2 10:37:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12777 X-Patchwork-Delegate: paul.elder@ideasonboard.com 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 2E4ECC3222 for ; Fri, 2 Jul 2021 10:38:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DDE59684FB; Fri, 2 Jul 2021 12:38:37 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="NPVbWGcH"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 55FE0684FD for ; Fri, 2 Jul 2021 12:38:36 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8C19D4AB; Fri, 2 Jul 2021 12:38:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1625222316; bh=zEWJ8a1HM1i/FAFgOPOvoL/2C5fEF2TjHFNVYzgUkeQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NPVbWGcHUE11pwSdXKiely/KKD+j1DtKRfqIqLLP0Oxau/wn0oQQbJ7JchVlTqBXQ asT3CL4tyg7jIVWe/VJCPpeUvfmtfIHsBQAzU5Y18Z3iIctnJHtd72Kh3g23vYVdZB 3JbmjGUmB9NxASN3Thynv8nk3BNVZGBiPxaA4Eic= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 2 Jul 2021 19:37:56 +0900 Message-Id: <20210702103800.41291-13-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210702103800.41291-1-paul.elder@ideasonboard.com> References: <20210702103800.41291-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH v3 12/16] pipeline: ipu3: Set MaxLatency ControlInfo 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" We want the IPU3 IPA to support setting MaxLatency, so initialize the MaxLatency ControlInfo in the IPU3 pipeline handler. Bug: https://bugs.libcamera.org/show_bug.cgi?id=50 Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart --- No change in v3 --- src/libcamera/pipeline/ipu3/ipu3.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 76c3bb3d..d3dafd98 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -49,6 +49,7 @@ static constexpr unsigned int IMGU_OUTPUT_HEIGHT_MARGIN = 32; static constexpr Size IPU3ViewfinderSize(1280, 720); static const ControlInfoMap::Map IPU3Controls = { + { &controls::draft::MaxLatency, ControlInfo(0, 0, 0) }, { &controls::draft::PipelineDepth, ControlInfo(2, 3) }, }; From patchwork Fri Jul 2 10:37:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12778 X-Patchwork-Delegate: paul.elder@ideasonboard.com 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 95207C3222 for ; Fri, 2 Jul 2021 10:38:39 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 50135684FD; Fri, 2 Jul 2021 12:38:39 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="I7w8AsJe"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3DF65684FD for ; Fri, 2 Jul 2021 12:38:38 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B05AC4AB; Fri, 2 Jul 2021 12:38:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1625222318; bh=QBdRZ6yRKb34w4pSKot0TfhTvRGHHBZ2vG4Fso9Ztrc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I7w8AsJeLcjLe8q+AOZrlhg/yV2Rz7Ri5BA8f1icU2P0d0N0JvaUUxz85Z3FofhRz Az2D9EjaoZxQYz3Y7vA3ALaTQQZR3JKfhENWkA6HPHfHE5Nn4fb9q7Gs9ZGgjbVxkY sc0BLYyABe3UhHm+gqFZnLSk7UMiagW6YfYd1uwA= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 2 Jul 2021 19:37:57 +0900 Message-Id: <20210702103800.41291-14-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210702103800.41291-1-paul.elder@ideasonboard.com> References: <20210702103800.41291-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH v3 13/16] FULL: pipeline: ipu3: Set AeEnable ControlInfo 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" We want the IPU3 IPA to support enabling and disabling AE, so initialize the AeEnable ControlInfo in the IPU3 pipeline handler. Bug: https://bugs.libcamera.org/show_bug.cgi?id=42 Signed-off-by: Paul Elder --- Changes in v3: - use boolean ControlInfo constructor --- src/libcamera/pipeline/ipu3/ipu3.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index d3dafd98..a755493c 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -12,6 +12,7 @@ #include #include +#include #include #include @@ -49,6 +50,7 @@ static constexpr unsigned int IMGU_OUTPUT_HEIGHT_MARGIN = 32; static constexpr Size IPU3ViewfinderSize(1280, 720); static const ControlInfoMap::Map IPU3Controls = { + { &controls::AeEnable, ControlInfo(Span({ false, true }), true) }, { &controls::draft::MaxLatency, ControlInfo(0, 0, 0) }, { &controls::draft::PipelineDepth, ControlInfo(2, 3) }, }; From patchwork Fri Jul 2 10:37:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12779 X-Patchwork-Delegate: paul.elder@ideasonboard.com 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 EC3D6C3222 for ; Fri, 2 Jul 2021 10:38:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A9ECE684F2; Fri, 2 Jul 2021 12:38:41 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="GmFY3edw"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3B66F684FB for ; Fri, 2 Jul 2021 12:38:40 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B232E4AB; Fri, 2 Jul 2021 12:38:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1625222320; bh=YEchcfzy2jPO/Yl2DrRbEIUmV+gbrqgMQ2NyZK1Qz0U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GmFY3edwsUfrD40ut0u2U1bnp7gB5Dw2TwcBTbmOT/0w7i2pcp0iBcXhJs0F5fjBp 9fGfNClRrZE7f/lC6L6fwP7eIe+JZ2kbQiVBrSJ9RUfKQY9iS+R8guTgrtCvyeKZP1 loUofIvDv8T3EAPF2ilrYgc3A9qXEwas2x2Iinm8= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 2 Jul 2021 19:37:58 +0900 Message-Id: <20210702103800.41291-15-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210702103800.41291-1-paul.elder@ideasonboard.com> References: <20210702103800.41291-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH v3 14/16] pipeline: ipu3: Set AeLock ControlInfo 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" We want the IPU3 IPA to support AeLock, so initialize the AeLock ControlInfo in the IPU3 pipeline handler. Bug: https://bugs.libcamera.org/show_bug.cgi?id=43 Signed-off-by: Paul Elder --- Changes in v3: - use boolean ControlInfo constructor --- src/libcamera/pipeline/ipu3/ipu3.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index a755493c..053c13de 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -51,6 +51,7 @@ static constexpr Size IPU3ViewfinderSize(1280, 720); static const ControlInfoMap::Map IPU3Controls = { { &controls::AeEnable, ControlInfo(Span({ false, true }), true) }, + { &controls::AeLock, ControlInfo(Span({ false, true }), false) }, { &controls::draft::MaxLatency, ControlInfo(0, 0, 0) }, { &controls::draft::PipelineDepth, ControlInfo(2, 3) }, }; From patchwork Fri Jul 2 10:37:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12780 X-Patchwork-Delegate: paul.elder@ideasonboard.com 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 4DF87C3222 for ; Fri, 2 Jul 2021 10:38:43 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0A261684F4; Fri, 2 Jul 2021 12:38:43 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="UH9CsMiX"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2469A684FB for ; Fri, 2 Jul 2021 12:38:42 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id ABB7C4AB; Fri, 2 Jul 2021 12:38:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1625222321; bh=sh+H8AIoXd3li76BxYBe0UdJ0UzSXNrFPqwoKWgSSNI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UH9CsMiX8gMbpYEuUgZHu4te/bPiNmvUOIHq5F0Pv47yS1OI6tHpjbYDKdTgytRF0 BfzPPLP06Lp5lFobQ+UBvcMVy/mtfwhuJHvl8hs/tDkIMgxaYcvgCZzRqpyZ/AwFqn 6PE6OwK+xpLfOH4t59oXY30cIe5Qbs8qAJhFAd1c= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 2 Jul 2021 19:37:59 +0900 Message-Id: <20210702103800.41291-16-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210702103800.41291-1-paul.elder@ideasonboard.com> References: <20210702103800.41291-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH v3 15/16] pipeline: ipu3: Set AwbMode ControlInfo 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" We want the IPU3 IPA to support setting the AWB mode, so initialize the AwbMode ControlInfo in the IPU3 pipeline handler. Bug: https://bugs.libcamera.org/show_bug.cgi?id=44 Signed-off-by: Paul Elder --- No change in v3 --- src/libcamera/pipeline/ipu3/ipu3.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 053c13de..7906c6ca 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -52,6 +52,7 @@ static constexpr Size IPU3ViewfinderSize(1280, 720); static const ControlInfoMap::Map IPU3Controls = { { &controls::AeEnable, ControlInfo(Span({ false, true }), true) }, { &controls::AeLock, ControlInfo(Span({ false, true }), false) }, + { &controls::AwbMode, ControlInfo(controls::AwbModeValues) }, { &controls::draft::MaxLatency, ControlInfo(0, 0, 0) }, { &controls::draft::PipelineDepth, ControlInfo(2, 3) }, }; From patchwork Fri Jul 2 10:38:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12781 X-Patchwork-Delegate: paul.elder@ideasonboard.com 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 A83C4C3222 for ; Fri, 2 Jul 2021 10:38:45 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 64524684F4; Fri, 2 Jul 2021 12:38:45 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="e7J/HB5m"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 18629684F2 for ; Fri, 2 Jul 2021 12:38:44 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A309D4AB; Fri, 2 Jul 2021 12:38:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1625222323; bh=oSSvP5KvOo9zcz0/Z6VdUYUkpsxd0fC+uG2+Pyj4NWY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e7J/HB5mVmLXC6BbLuuJHI28PUDZxpHiP25DI29I2LVzoGKmTJOmf+kYhnZs6SrgO WYcdwRMD3nflQlMXEHSxCQtEsDgLELC2SQ/BHXvYncj2gTtpwyCSEAfogrkiqkaaux PQwC0YeKZKzFsPF3jVFFV8yavXxN2YLyHTQ3bLfU= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 2 Jul 2021 19:38:00 +0900 Message-Id: <20210702103800.41291-17-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210702103800.41291-1-paul.elder@ideasonboard.com> References: <20210702103800.41291-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH v3 16/16] pipeline: ipu3: Set AwbLock ControlInfo 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" We want the IPU3 IPA to support AwbLock, so initialize the AwbLock ControlInfo in the IPU3 pipeline handler. Bug: https://bugs.libcamera.org/show_bug.cgi?id=45 Signed-off-by: Paul Elder --- Changes in v3: - use boolean ControlInfo constructor --- src/libcamera/pipeline/ipu3/ipu3.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 7906c6ca..5409e955 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -52,6 +52,7 @@ static constexpr Size IPU3ViewfinderSize(1280, 720); static const ControlInfoMap::Map IPU3Controls = { { &controls::AeEnable, ControlInfo(Span({ false, true }), true) }, { &controls::AeLock, ControlInfo(Span({ false, true }), false) }, + { &controls::AwbLock, ControlInfo(Span({ false, true }), false) }, { &controls::AwbMode, ControlInfo(controls::AwbModeValues) }, { &controls::draft::MaxLatency, ControlInfo(0, 0, 0) }, { &controls::draft::PipelineDepth, ControlInfo(2, 3) },