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