From patchwork Fri Jun 18 10:33:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12634 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 CE7C9BD78E for ; Fri, 18 Jun 2021 10:34:04 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 765D668946; Fri, 18 Jun 2021 12:34:04 +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="mYn6aeOc"; 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 9F14668941 for ; Fri, 18 Jun 2021 12:34:03 +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 34CC53E5; Fri, 18 Jun 2021 12:34:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1624012443; bh=DDyZJfAEx2CPr4RXyfDklS42LxrHzNi3OOwXiXQVd4g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mYn6aeOceqpS+TSwXvbfMKI1ri4pbJIcD+mLcBKl+Yx050TX/kOBHoN8puU//78gN hCbZHIKW6OV/x3ZCK1zuxn2LRUcuFjo8yj4+4uUtN8EFTv3FQ8IH+EeJNq/7rEH22p AjndjmEFlZNbJ9VOA5tVBhQvPkdUdJTL5MWio/4s= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 18 Jun 2021 19:33:38 +0900 Message-Id: <20210618103351.1642060-2-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210618103351.1642060-1-paul.elder@ideasonboard.com> References: <20210618103351.1642060-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 01/14] 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 --- This patch doesn't need to be reviewed. It's just here for dependency resolution. Changes in v3: - fix come 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_device.cpp | 43 +++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index 8c71fd06..25dd2569 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -840,6 +841,17 @@ const camera_metadata_t *CameraDevice::getStaticMetadata() const ControlInfoMap &controlsInfo = camera_->controls(); const ControlList &properties = camera_->properties(); + std::map + capabilities = { + { ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE, true }, + { ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE, true }, + { ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR, true }, + { ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING, true }, + { ANDROID_REQUEST_AVAILABLE_CAPABILITIES_RAW, false }, + }; + + bool fullSupport = true; + /* Color correction static metadata. */ { std::vector data; @@ -1298,11 +1310,6 @@ const camera_metadata_t *CameraDevice::getStaticMetadata() 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, @@ -1323,10 +1330,6 @@ const camera_metadata_t *CameraDevice::getStaticMetadata() 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 = @@ -1338,7 +1341,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata() if (info.colourEncoding == PixelFormatInfo::ColourEncodingRAW && info.bitsPerPixel == 16) { rawStreamAvailable = true; - availableCapabilities.push_back(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_RAW); + capabilities[ANDROID_REQUEST_AVAILABLE_CAPABILITIES_RAW] = true; } } @@ -1347,9 +1350,29 @@ const camera_metadata_t *CameraDevice::getStaticMetadata() staticMetadata_->addEntry(ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS, numOutStreams); + /* Check capabilities */ + std::vector availableCapabilities; + for (auto cap : capabilities) { + if (cap.second) + availableCapabilities.push_back(cap.first); + } staticMetadata_->addEntry(ANDROID_REQUEST_AVAILABLE_CAPABILITIES, availableCapabilities); + uint8_t supportedHWLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED; + if (capabilities[ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR] && + capabilities[ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING] && + capabilities[ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE] && + fullSupport) + supportedHWLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL; + staticMetadata_->addEntry(ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL, + supportedHWLevel); + + LOG(HAL, Info) + << "Hardware level: " + << (supportedHWLevel == ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL + ? "FULL" : "LIMITED"); + std::vector availableCharacteristicsKeys = { ANDROID_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES, ANDROID_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES, From patchwork Fri Jun 18 10:33:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12635 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 2F430BD78E for ; Fri, 18 Jun 2021 10:34:07 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E074868943; Fri, 18 Jun 2021 12:34:06 +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="t7AdLKq8"; 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 665CC6050D for ; Fri, 18 Jun 2021 12:34:05 +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 152733E5; Fri, 18 Jun 2021 12:34:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1624012445; bh=xgJ1noi88BFzIY/jc9lyVAkhrYdLrP5AI6PVYfCe/5Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t7AdLKq88wOoV3w142eHviJDrebW/dTRVWTLyfc9F73TUGt/3l+V9g/eD4oAIpq1m oOTXMUDTlXSt7/CX/n6MkUWaaKw25kdGF22iuiS3fkUmHH7Fw2pIZ4uV5nQa0wm/NS iEl9KXdif8x0dD8SR9Nh5oSCRSZjY4TFKWhnWpQ4= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 18 Jun 2021 19:33:39 +0900 Message-Id: <20210618103351.1642060-3-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210618103351.1642060-1-paul.elder@ideasonboard.com> References: <20210618103351.1642060-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 02/14] 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 --- src/android/camera_device.cpp | 8 ++++++++ src/libcamera/control_ids.yaml | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index 25dd2569..86f47e00 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -1187,6 +1187,14 @@ const camera_metadata_t *CameraDevice::getStaticMetadata() /* Sync static metadata. */ int32_t maxLatency = ANDROID_SYNC_MAX_LATENCY_UNKNOWN; + const auto &maxLatencyInfo = controlsInfo.find(&controls::draft::MaxLatency); + if (maxLatencyInfo != controlsInfo.end()) + maxLatency = maxLatencyInfo->second.def().get(); + if (maxLatency < 0 && 4 < maxLatency) + capabilities[ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE] = false; + /* \todo Double check if this is the case */ + if (maxLatency != 0) + fullSupport = false; staticMetadata_->addEntry(ANDROID_SYNC_MAX_LATENCY, maxLatency); /* Flash static metadata. */ 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 Jun 18 10:33:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12636 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 8314EBD78E for ; Fri, 18 Jun 2021 10:34:09 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 46A8768941; Fri, 18 Jun 2021 12:34:09 +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="P3fT8pcE"; 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 425376050D for ; Fri, 18 Jun 2021 12:34:07 +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 C2AF03E5; Fri, 18 Jun 2021 12:34:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1624012447; bh=vwkG7wE4Wj5QKoP4l+aaXyndyPv+Vru9EoN0bCh9j9U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P3fT8pcEBcaYcJvAy2oYNCytZcbw1034wN2stIyi+nC5UkR2yNLHm/XFbtmrdb4Kp pYf6zNVOYqhGrfC+zvKei/2Q6RBbfRi6HO3mox//Uv2svmri9yrANwBRP0qQnoFzgk CcbLBcJwTj88SI+F+uGp/Owz7tCmrBzM+A/sbEgU= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 18 Jun 2021 19:33:40 +0900 Message-Id: <20210618103351.1642060-4-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210618103351.1642060-1-paul.elder@ideasonboard.com> References: <20210618103351.1642060-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 03/14] 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 --- 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 1c1e802a..ad0132c0 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -468,7 +468,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 b47ea324..88a562a8 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 Jun 18 10:33:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12637 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 EED75BD78E for ; Fri, 18 Jun 2021 10:34:09 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id ACB3B6894B; Fri, 18 Jun 2021 12:34:09 +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="v2z1IPL9"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9C80568941 for ; Fri, 18 Jun 2021 12:34:08 +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 86B729C7; Fri, 18 Jun 2021 12:34:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1624012448; bh=0UqKuy0TOfuJyrYC6abjKchK9EqwXWeZZlvJdpj4vIo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v2z1IPL9cp2+6pfh3nMZ7FxVAM5Rvq7p+ln3/fo/QWxyGtbU2SYFoi2CBVFOdB6UZ ZI1ylIl1AYiTLZqjdNCvs5nZM6TpgqMtPbdiAZLdrOH5f5kL/U8Ny1E13CVzRAn928 /9MU/75PwCP87sXnJdZxL0jnRPKZOCPsPX1yNHcQ= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 18 Jun 2021 19:33:41 +0900 Message-Id: <20210618103351.1642060-5-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210618103351.1642060-1-paul.elder@ideasonboard.com> References: <20210618103351.1642060-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 04/14] 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 --- 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 ad0132c0..ed5f1250 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -745,24 +745,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")); @@ -773,6 +755,15 @@ void IPARPi::queueRequest(const ControlList &controls) } int32_t idx = ctrl.second.get(); + + if (idx == controls::AwbOff) { + awb->Pause(); + break; + } + + if (idx == controls::AwbAuto) + 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 Jun 18 10:33:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12638 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 8DCA1BD78E for ; Fri, 18 Jun 2021 10:34:12 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 51B4768942; Fri, 18 Jun 2021 12:34:12 +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="L4lpw9Cg"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 236FE6894C for ; Fri, 18 Jun 2021 12:34:10 +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 F3C383E5; Fri, 18 Jun 2021 12:34:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1624012449; bh=4eiqMpq1onsYkzQ5uR/cYCBDpjyj3yaXBJYQgJpFqUM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L4lpw9CglS6qOnkviizsfyjm49t4j6cQwhSghuA0b+RqrTU4aN7cYwWVBrl/xHi+J 0FcIhdf+oAfkV0VtJ5FGhyxCQH78jPrRF4diDmNZ5sIPESsMaV4H5YzWnHN1cHFrtI nSXTy3rE6ToVcM2hBdOsFyzsYsw3/aCH2PmxLWIk= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 18 Jun 2021 19:33:42 +0900 Message-Id: <20210618103351.1642060-6-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210618103351.1642060-1-paul.elder@ideasonboard.com> References: <20210618103351.1642060-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 05/14] 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 --- 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 Jun 18 10:33:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12639 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 E4CD7C3219 for ; Fri, 18 Jun 2021 10:34:12 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A9D9D68943; Fri, 18 Jun 2021 12:34:12 +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="FlwYk9+V"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E701D60298 for ; Fri, 18 Jun 2021 12:34:11 +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 7C0FF3E5; Fri, 18 Jun 2021 12:34:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1624012451; bh=Co965+o+kEO4rsN9l1QBlKtc1l/sUICPybNaaYUwMTg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FlwYk9+Va1vcLfIXsGJDEyCuW+dfDiwnhuW7pIF24YCfQVr8IsYhuuGchp2Ear3cY b1fswtRncNb2yC0XzuvTCWCh/R1uLBzomV/Rx8/opJsqYsfaG0pkY5TAL2tumJpSQs wJjA6S3xv1O/5wqErqaFg/HDtC0mzaBkLCFjkHoo= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 18 Jun 2021 19:33:43 +0900 Message-Id: <20210618103351.1642060-7-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210618103351.1642060-1-paul.elder@ideasonboard.com> References: <20210618103351.1642060-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 06/14] 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 --- src/android/camera_device.cpp | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index 86f47e00..3446cdb6 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -10,6 +10,7 @@ #include "camera_ops.h" #include "post_processor.h" +#include #include #include #include @@ -877,9 +878,24 @@ const camera_metadata_t *CameraDevice::getStaticMetadata() staticMetadata_->addEntry(ANDROID_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES, aeAvailableAntiBandingModes); - std::vector aeAvailableModes = { - ANDROID_CONTROL_AE_MODE_ON, - }; + std::vector aeAvailableModes; + aeAvailableModes.reserve(2); + const auto &aeModesInfo = controlsInfo.find(&controls::AeEnable); + if (aeModesInfo != controlsInfo.end()) { + aeAvailableModes.push_back(aeModesInfo->second.min().get()); + if (aeModesInfo->second.min() != aeModesInfo->second.max()) + aeAvailableModes.push_back(aeModesInfo->second.max().get()); + } else { + aeAvailableModes.push_back(ANDROID_CONTROL_AE_MODE_ON); + } + + if (std::find(aeAvailableModes.begin(), + aeAvailableModes.end(), + ANDROID_CONTROL_AE_MODE_OFF) == aeAvailableModes.end()) { + fullSupport = false; + /* \todo Double check if this is the correct capability */ + capabilities[ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR] = false; + } staticMetadata_->addEntry(ANDROID_CONTROL_AE_AVAILABLE_MODES, aeAvailableModes); @@ -2333,8 +2349,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 Jun 18 10:33:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12640 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 5273ABD78E for ; Fri, 18 Jun 2021 10:34:15 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0A87068941; Fri, 18 Jun 2021 12:34:15 +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="wajXb/4m"; 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 C81AD6050D for ; Fri, 18 Jun 2021 12:34:13 +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 55AB53E5; Fri, 18 Jun 2021 12:34:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1624012453; bh=Xfz2OpTDCUs+50XQINHBJZ7KpMgvnqI94HKP2zqkQk8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wajXb/4mz7+ZuFV9VZRUZZ2eBjO+Yne73uQBn/AUaQJvSKa1w3idApOkFsF36J+kc 6kn3k05EfVgznFk7sitQ5gCY2DLao47DMnMGsF3yX23RyXcpb03cwBajjXb48lsi0b RtPHKTHLx5mKiIa8lDyfwzJWx/KVTogQEawHLFL4= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 18 Jun 2021 19:33:44 +0900 Message-Id: <20210618103351.1642060-8-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210618103351.1642060-1-paul.elder@ideasonboard.com> References: <20210618103351.1642060-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 07/14] 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 Reviewed-by: Laurent Pinchart --- TODO: plumb result metadata --- src/android/camera_device.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index 3446cdb6..3add5bc6 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -1010,6 +1010,14 @@ const camera_metadata_t *CameraDevice::getStaticMetadata() sceneModesOverride); uint8_t aeLockAvailable = ANDROID_CONTROL_AE_LOCK_AVAILABLE_FALSE; + const auto &aeLockInfo = controlsInfo.find(&controls::AeLock); + if (aeLockInfo != controlsInfo.end()) { + aeLockAvailable = aeLockInfo->second.max().get(); + } + if (!aeLockAvailable) { + capabilities[ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE] = false; + capabilities[ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR] = false; + } staticMetadata_->addEntry(ANDROID_CONTROL_AE_LOCK_AVAILABLE, aeLockAvailable); From patchwork Fri Jun 18 10:33: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: 12641 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 AB4CDBD78E for ; Fri, 18 Jun 2021 10:34:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 60DCF6050D; Fri, 18 Jun 2021 12:34:17 +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="j3z/HEky"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9A80768942 for ; Fri, 18 Jun 2021 12:34:15 +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 300AC3E5; Fri, 18 Jun 2021 12:34:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1624012455; bh=EW0UAEsn953yfsNjHn/JEiHyaxTzFEndifV4wA/fhxA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j3z/HEkyF369rLHwhQPod9Qa8euyhvIhEHWQyXVA662JqnF67tx+RucGwqWRTnW00 zuunFic1BhwxsywtITwb8zK2seYk9uWEv7nU5ck5OypCATPB2Qo2wRjGAndJeGPBIb n+vAFkn54DW7eHE4m/tysD0NYprYTeR/oD3QVix8= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 18 Jun 2021 19:33:45 +0900 Message-Id: <20210618103351.1642060-9-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210618103351.1642060-1-paul.elder@ideasonboard.com> References: <20210618103351.1642060-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 08/14] 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 Reviewed-by: Laurent Pinchart --- TODO: plumb result metadata --- src/android/camera_device.cpp | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index 3add5bc6..a8b6fa38 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -985,15 +985,25 @@ const camera_metadata_t *CameraDevice::getStaticMetadata() 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, - }; + std::vector awbAvailableModes; + awbAvailableModes.reserve(2); + const auto &awbModesInfo = controlsInfo.find(&controls::AwbMode); + if (awbModesInfo != controlsInfo.end()) { + for (const auto &value : awbModesInfo->second.values()) + awbAvailableModes.push_back(value.get()); + } else { + awbAvailableModes.push_back(ANDROID_CONTROL_AWB_MODE_AUTO); + } + + if (std::find(awbAvailableModes.begin(), + awbAvailableModes.end(), + ANDROID_CONTROL_AWB_MODE_OFF) == awbAvailableModes.end()) { + fullSupport = false; + /* \todo Double check if this is the correct capability */ + capabilities[ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING] = false; + } staticMetadata_->addEntry(ANDROID_CONTROL_AWB_AVAILABLE_MODES, - availableAwbModes); + awbAvailableModes); std::vector availableMaxRegions = { 0, 0, 0, From patchwork Fri Jun 18 10:33: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: 12642 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 004E3BD78E for ; Fri, 18 Jun 2021 10:34:19 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B6BA46050D; Fri, 18 Jun 2021 12:34:19 +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="n/7fOFud"; 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 65E8A68945 for ; Fri, 18 Jun 2021 12:34:17 +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 091E23E5; Fri, 18 Jun 2021 12:34:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1624012457; bh=i1UmYNrHYnx1fY9FEZR2TcibEIkhl38gdzlu4qHv3zI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n/7fOFudTtjJwN8sbBxGLtrIafZwLM89h/xWh1yQJJ8t2wJMN75P27ak4ECIPaijY 43g8h29zu4AbXJUloDZlb5tOfkvDkQuog/MShhZGFUD9XL8uivCB1CW5tXnwzc4qFl 6J9lmdj3eJYzX/xtOr4mLlLECcD+JrewbyAZLOy8= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 18 Jun 2021 19:33:46 +0900 Message-Id: <20210618103351.1642060-10-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210618103351.1642060-1-paul.elder@ideasonboard.com> References: <20210618103351.1642060-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 09/14] 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 Reviewed-by: Laurent Pinchart --- TODO: plumb result metadata --- src/android/camera_device.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index a8b6fa38..e89afbb1 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -1032,6 +1032,14 @@ const camera_metadata_t *CameraDevice::getStaticMetadata() aeLockAvailable); uint8_t awbLockAvailable = ANDROID_CONTROL_AWB_LOCK_AVAILABLE_FALSE; + const auto &awbLockInfo = controlsInfo.find(&controls::AwbLock); + if (awbLockInfo != controlsInfo.end()) { + awbLockAvailable = awbLockInfo->second.max().get(); + } + if (!awbLockAvailable) { + capabilities[ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE] = false; + capabilities[ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING] = false; + } staticMetadata_->addEntry(ANDROID_CONTROL_AWB_LOCK_AVAILABLE, awbLockAvailable); From patchwork Fri Jun 18 10:33: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: 12643 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 5C30AC3219 for ; Fri, 18 Jun 2021 10:34:20 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1C3AF6894C; Fri, 18 Jun 2021 12:34: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="jDu5mGae"; 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 3384260298 for ; Fri, 18 Jun 2021 12:34:19 +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 BE20F9C7; Fri, 18 Jun 2021 12:34:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1624012458; bh=EDX+LeAV5Chh4ww0pXi9apSGsprxlHB83gSVoVjPz3s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jDu5mGaeWLA+GpHPkatujstDkzMjwfAh9F+8uPYZVurV0SD6Nm9Sqdw/ejGdaJ7ys fiLoMlD0e7VNoQh+2n055G1k9ZKeJWZESvFuhkSVCPOTS5oLzl9HhsHYQKTAplpIR/ AfHkLtX4aEfiX4BRhnCVA63OtCRdgLBEicQ7zVLw= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 18 Jun 2021 19:33:47 +0900 Message-Id: <20210618103351.1642060-11-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210618103351.1642060-1-paul.elder@ideasonboard.com> References: <20210618103351.1642060-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 10/14] FULL: 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" Set the MaxLatency ControlInfo in IPU3, to satisfy CTS FULL requirements. Bug: https://bugs.libcamera.org/show_bug.cgi?id=50 Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart --- 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 6c93bc6d..1899f389 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -48,6 +48,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 Jun 18 10:33: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: 12644 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 AEB8EBD78E for ; Fri, 18 Jun 2021 10:34:22 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7184F68941; Fri, 18 Jun 2021 12:34: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="KRrrg2Du"; 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 05D8860298 for ; Fri, 18 Jun 2021 12:34:21 +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 7EAD13E5; Fri, 18 Jun 2021 12:34:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1624012460; bh=MqshCIoNwREr5g9RZQkXBGnl9QYbdhdm6amejXP9sWA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KRrrg2DuxxOc6TNetlE9eXYYPVgkN0P1hPatn6Ai30e3eijy799XGeNbwUKj1qR4+ tyBen/w8OLV1pC37GOWejypNVA0YAqdMwfSX290+B7rJFOYkIIgqhF/7QDELM07s85 MZQNOAhzC6EvZ23I1RDL6yRmd6/C6uAP494kI0ck= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 18 Jun 2021 19:33:48 +0900 Message-Id: <20210618103351.1642060-12-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210618103351.1642060-1-paul.elder@ideasonboard.com> References: <20210618103351.1642060-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 11/14] 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" Set the AeEnable ControlInfo in IPU3, to satisfy CTS FULL requirements. Bug: https://bugs.libcamera.org/show_bug.cgi?id=42 Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart --- 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 1899f389..a9faa9e3 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -48,6 +48,7 @@ static constexpr unsigned int IMGU_OUTPUT_HEIGHT_MARGIN = 32; static constexpr Size IPU3ViewfinderSize(1280, 720); static const ControlInfoMap::Map IPU3Controls = { + { &controls::AeEnable, ControlInfo(false, true) }, { &controls::draft::MaxLatency, ControlInfo(0, 0, 0) }, { &controls::draft::PipelineDepth, ControlInfo(2, 3) }, }; From patchwork Fri Jun 18 10:33: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: 12645 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 1B3E8BD78E for ; Fri, 18 Jun 2021 10:34:25 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C77B56050D; Fri, 18 Jun 2021 12:34: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="dltZ7JyV"; 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 C9FE16050D for ; Fri, 18 Jun 2021 12:34: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 5924C3E5; Fri, 18 Jun 2021 12:34:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1624012462; bh=G/nQVfDn8if/c4bgrmooJGBT6d3vBO+t48juYAGktHM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dltZ7JyV4k09FVSxG/tXtALGxfwixOkGPLqKo5dG6j+uFKeArBFDkxsyZlB2JCdt1 Z2Om2O9ogxnrNKaZ4pwC6INY7cCut0uQB1F71xEC3y6LgFG5phufBdyI63r+1PCKsO YSrcyr962rV6yknkj1KnkjgzGkX4dnZHyiZsHrLg= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 18 Jun 2021 19:33:49 +0900 Message-Id: <20210618103351.1642060-13-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210618103351.1642060-1-paul.elder@ideasonboard.com> References: <20210618103351.1642060-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 12/14] FULL: 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" Set the AeLock ControlInfo in IPU3, to satisfy CTS FULL requirements. Bug: https://bugs.libcamera.org/show_bug.cgi?id=43 Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart --- 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 a9faa9e3..f315a411 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -49,6 +49,7 @@ static constexpr Size IPU3ViewfinderSize(1280, 720); static const ControlInfoMap::Map IPU3Controls = { { &controls::AeEnable, ControlInfo(false, true) }, + { &controls::AeLock, ControlInfo(false, true) }, { &controls::draft::MaxLatency, ControlInfo(0, 0, 0) }, { &controls::draft::PipelineDepth, ControlInfo(2, 3) }, }; From patchwork Fri Jun 18 10:33: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: 12646 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 ACFA4BD78E for ; Fri, 18 Jun 2021 10:34:26 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 712156894A; Fri, 18 Jun 2021 12:34: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="n/CpVfyq"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CFE2168948 for ; Fri, 18 Jun 2021 12:34: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 20B413E5; Fri, 18 Jun 2021 12:34:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1624012464; bh=sLNMzA2bUnWAInLjrivzFMS78sbMAm+HPMIM0vYTkBY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n/CpVfyqeube+yWx/RVoKG6qF3KiRZGlePyImRqRXyIVxT+lkR/fUfEh6a1s1LEwL kj3UO7By9r7279rSD7ijVsjyRHMoPHfcpnwkwSghNEjVeriPqK4yvWdLcVyHjUUSwS wx5eppGdTin6VNybz5Q7/9g7a+hzxe3IlwUvfjAU= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 18 Jun 2021 19:33:50 +0900 Message-Id: <20210618103351.1642060-14-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210618103351.1642060-1-paul.elder@ideasonboard.com> References: <20210618103351.1642060-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 13/14] FULL: 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" Set the AwbMode ControlInfo in IPU3, to satisfy CTS FULL requirements. Bug: https://bugs.libcamera.org/show_bug.cgi?id=44 Signed-off-by: Paul Elder --- 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 f315a411..32d0bc1c 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -50,6 +50,7 @@ static constexpr Size IPU3ViewfinderSize(1280, 720); static const ControlInfoMap::Map IPU3Controls = { { &controls::AeEnable, ControlInfo(false, true) }, { &controls::AeLock, ControlInfo(false, true) }, + { &controls::AwbMode, ControlInfo(controls::AwbModeValues) }, { &controls::draft::MaxLatency, ControlInfo(0, 0, 0) }, { &controls::draft::PipelineDepth, ControlInfo(2, 3) }, }; From patchwork Fri Jun 18 10:33: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: 12647 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 165B4BD78E for ; Fri, 18 Jun 2021 10:34:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C7A0F68948; Fri, 18 Jun 2021 12:34:28 +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="pvKZvTVe"; 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 9A0C060298 for ; Fri, 18 Jun 2021 12:34: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 453529C7; Fri, 18 Jun 2021 12:34:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1624012466; bh=bSC0iTtdpuTlxJGYtrxArp+HtrqckQ7dHJfqegdsicc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pvKZvTVeHVi2QnedjGjGvk9fkbMZXMMRBZPRRGQ8IFmCvr59iF6S9MKJHtZxX2csc aPi0sFdJpRsmVNME94m98gAyTHZyh9iZ2ai6oAItN9Q8sZiSW7WDClQo5f+0MV5cc4 vsW+qOC1NZuQsOnBev2BI+kqdb2eQgPZqEu5Ozjs= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 18 Jun 2021 19:33:51 +0900 Message-Id: <20210618103351.1642060-15-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210618103351.1642060-1-paul.elder@ideasonboard.com> References: <20210618103351.1642060-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 14/14] FULL: 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" Set the AwbLock ControlInfo in IPU3, to satisfy CTS FULL requirements. Bug: https://bugs.libcamera.org/show_bug.cgi?id=45 Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart --- 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 32d0bc1c..7355edc0 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -50,6 +50,7 @@ static constexpr Size IPU3ViewfinderSize(1280, 720); static const ControlInfoMap::Map IPU3Controls = { { &controls::AeEnable, ControlInfo(false, true) }, { &controls::AeLock, ControlInfo(false, true) }, + { &controls::AwbLock, ControlInfo(false, true) }, { &controls::AwbMode, ControlInfo(controls::AwbModeValues) }, { &controls::draft::MaxLatency, ControlInfo(0, 0, 0) }, { &controls::draft::PipelineDepth, ControlInfo(2, 3) },