From patchwork Thu May 16 12:41:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 20049 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 86B02BDE6B for ; Thu, 16 May 2024 12:43:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3D21863482; Thu, 16 May 2024 14:43:10 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="NZ6tDFN0"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id BAA396347E for ; Thu, 16 May 2024 14:43:08 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:3fef:fa64:e35:24d4]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 514839D5; Thu, 16 May 2024 14:43:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1715863380; bh=NBUQGgzgDnhnzt+SHSpduQBh+VyD7Ldv5dWg7jK4Qn4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NZ6tDFN0y9P9J3vS67J7LaIz7JnCFAAnnN7ps7W3bYK5CQoOcDFMHSwJhRCu1qiRU fK2R008mGm0+DODZ3KdPA78Dn76k3ajJAC1cCLDHrXZhznZYLsO8WTehgI7b0/SDYQ y/33U+RCViSTODQTUPbQhKL3NIWJfs1KWzdku4TQ= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH 2/3] libcamera: Add gamma control id Date: Thu, 16 May 2024 14:41:49 +0200 Message-Id: <20240516124150.219054-3-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240516124150.219054-1-stefan.klug@ideasonboard.com> References: <20240516124150.219054-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" A camera gamma of roughly 2.2 is necessary to produce correct output images on a standard monitor. Add a control for that. Further information is available here: https://en.wikipedia.org/wiki/SRGB https://www.cambridgeincolour.com/tutorials/gamma-correction.htm Signed-off-by: Stefan Klug Reviewed-by: Daniel Scally --- src/libcamera/control_ids_core.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml index bf1f1a83..43b85135 100644 --- a/src/libcamera/control_ids_core.yaml +++ b/src/libcamera/control_ids_core.yaml @@ -243,6 +243,12 @@ controls: Specify a fixed contrast parameter. Normal contrast is given by the value 1.0; larger values produce images with more contrast. + - Gamma: + type: float + description: | + Specify a fixed gamma value. Default is 2.2 which closely mimics sRGB + gamma. Note that this is camera gamma, so it is applied as 1.0/gamma + - Lux: type: float description: |