From patchwork Wed May 22 14:54:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 20084 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 DB856BD87C for ; Wed, 22 May 2024 14:55:03 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 91D9363490; Wed, 22 May 2024 16:55:03 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="n/ZViwQ9"; 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 4523D63492 for ; Wed, 22 May 2024 16:55:01 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:9beb:c30d:4413:8c99]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 630EAABE; Wed, 22 May 2024 16:54:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1716389688; bh=RFEDvH9SP97LtiGrQ4eBonFrHzcEbaVasLfGJIl/zJs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n/ZViwQ9wH2R2z4kdB4yWEc72dGXL7AVIRwflPo7BErFFXEFg/0ZWEDv0oQSYh2X7 ChudlANVgXLHt1x+YmlHKv7/jJrGbEG3+abO9Aipin8NS5zL2d0Mdmd4zj6KqRFBnl KbeunsAxdIT+1VU0ufBN2ohAvmFAC/Ru+qIq4F1k= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug , Daniel Scally Subject: [PATCH v2 2/4] libcamera: Add gamma control id Date: Wed, 22 May 2024 16:54:36 +0200 Message-Id: <20240522145438.436688-3-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240522145438.436688-1-stefan.klug@ideasonboard.com> References: <20240522145438.436688-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 Reviewed-by: Kieran Bingham --- v1 -> v2: - small change in description src/libcamera/control_ids_core.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml index bf1f1a83..303b0d32 100644 --- a/src/libcamera/control_ids_core.yaml +++ b/src/libcamera/control_ids_core.yaml @@ -243,6 +243,13 @@ 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 must be 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: |