From patchwork Tue Aug 13 08:44:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 20894 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 37AFFC32A9 for ; Tue, 13 Aug 2024 08:45:08 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CA016633B5; Tue, 13 Aug 2024 10:45:07 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="EIhAtKy0"; 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 A798B6337E for ; Tue, 13 Aug 2024 10:45:06 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:7025:8d00:1ffd:751a]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C1EF8827; Tue, 13 Aug 2024 10:44:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1723538649; bh=g0EGizF8N6P27EL622ay/ZuWAfTMJgo8pFvqFqDWh+s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EIhAtKy0McuoXUjTtSIgRi8Vqmm/Ykl+ta3y39NpLrJTAWamtQ36jw6R3xS0bxV7j RNL4QSG7O9mdMBNqItf/4AUeTK1Sd2bv2kTKv2bRagrLK95hVCXm5UihUlGs1u6XCT rkGA5+bqpnFg640HoGL4GMmihYgfme5/cLUTlOAU= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v4 1/6] libcamera: controls: Update the ColourTemperature control to be writable Date: Tue, 13 Aug 2024 10:44:18 +0200 Message-ID: <20240813084451.44099-2-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240813084451.44099-1-stefan.klug@ideasonboard.com> References: <20240813084451.44099-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 an 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 Reviewed-by: Paul Elder --- 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 cf40771d3896..04dcc4af67fc 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 take precedence. + + The metadata will only report measured colour temperature values when + available, even if 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: