From patchwork Mon Aug 5 12:05:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 20771 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 01F8AC323E for ; Mon, 5 Aug 2024 12:05:55 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A66CF63385; Mon, 5 Aug 2024 14:05:55 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="A9s/S2EV"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AB43D6195D for ; Mon, 5 Aug 2024 14:05:52 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:30ff:e7b4:349c:44ce]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5EC20581; Mon, 5 Aug 2024 14:05:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1722859501; bh=SWD+JJG6iwx8L2d9BHWiU2/XvE5aNdYH6jstXTLijeE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A9s/S2EVVe4l3hE/JntiZmY2vBzzz/90/21ooPGOKn+ngxu4oHbtxKIFityFMdlYA P5Fr8vXAe2DJ/AeYZt+wD4s5EEjw2KnBE/GHGCFPBRZl6BxB5eL0gF23t6V4s7/wsw 34KEYZh9KP+6qd1IZ6KhXJbPECH0t7orvnAWgUQg= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: David Plowman , Stefan Klug Subject: [PATCH v1 1/6] libcamera: controls: Update the ColourTemperature control to be writable Date: Mon, 5 Aug 2024 14:05:02 +0200 Message-ID: <20240805120522.1613342-2-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240805120522.1613342-1-stefan.klug@ideasonboard.com> References: <20240805120522.1613342-1-stefan.klug@ideasonboard.com> MIME-Version: 1.0 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" For manual control it is helpful to be able to specify a fixed colour temperature. It also provides a easy way to apply the temperature specific CCMs and colour gains that are contained in the tuning files. Document this and update the control dependencies. Signed-off-by: Stefan Klug --- src/libcamera/control_ids_core.yaml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml index 9d413a94e0ee..90a52bccaa98 100644 --- a/src/libcamera/control_ids_core.yaml +++ b/src/libcamera/control_ids_core.yaml @@ -252,9 +252,12 @@ controls: - AwbEnable: type: bool description: | - Enable or disable the AWB. + Enable or disable the AWB. Disabling AWB stops updates to the + ColourGains and to the ColourCorrectionMatrix. + \sa ColourCorrectionMatrix \sa ColourGains + \sa ColourTemperature # AwbMode needs further attention: # - Auto-generate max enum value. @@ -309,13 +312,24 @@ controls: disabled. \sa AwbEnable + \sa ColourTemperature size: [2] - ColourTemperature: type: int32_t - description: Report the current estimate of the colour temperature, in - kelvin, for this frame. The ColourTemperature control can only be - returned in metadata. + description: | + Report the current estimate of the colour temperature, in kelvin, for + this frame. An implementation may also allow this control to be set when + AWB is disabled. In that case ColourGains and the ColourCorrectionMatrix + get set accordingly. If either ColourGains or ColourCorrectionMatrix are + specified at the same time, they takes precedence. + + Note that the metadata always contains the measured value, even when the + value was set manually. + + \sa AwbEnable + \sa ColourCorrectionMatrix + \sa ColourGains - Saturation: type: float @@ -365,6 +379,8 @@ controls: transformation. The 3x3 matrix is stored in conventional reading order in an array of 9 floating point values. + \sa AwbEnable + \sa ColourTemperature size: [3,3] - ScalerCrop: