From patchwork Wed Jun 5 09:53: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: 20206 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 3BD40BDE6B for ; Wed, 5 Jun 2024 09:54:30 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D428565441; Wed, 5 Jun 2024 11:54:29 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="N0x3URwR"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8D7D5634B5 for ; Wed, 5 Jun 2024 11:54:26 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:dcc4:f2dc:93ce:ff8f]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 186E914B0; Wed, 5 Jun 2024 11:54:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1717581258; bh=GVPEBSdYs8x82qZeGmW5HxFXKVTXyuYiO+6i/L6OhHU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N0x3URwRQoUVhxTcC8uAlw45lKj0PbddLfENqSBwyvd6Dl68z+fGC0oYCnrFzjX5P d7lh1Su4GMqa1EcWbXe3J4kQLj1Y7yH9piDKdmOavipyv2NAk5lgK0axjBlDhmNhA7 YO/vdODu8EYuJVgWEqU8MexpgvR83Gn5QAwV+eBE= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug , Daniel Scally , Kieran Bingham Subject: [PATCH v4 1/3] libcamera: Add gamma control id Date: Wed, 5 Jun 2024 11:53:49 +0200 Message-ID: <20240605095417.157703-2-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240605095417.157703-1-stefan.klug@ideasonboard.com> References: <20240605095417.157703-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 Reviewed-by: Paul Elder --- 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 bf1f1a839f6a..303b0d32e020 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: |