From patchwork Mon Jun 3 14:06:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 20193 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 B9AA1BD87C for ; Mon, 3 Jun 2024 14:08:44 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6BC99634CD; Mon, 3 Jun 2024 16:08:44 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="H3FIKxTb"; 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 54DBA634B2 for ; Mon, 3 Jun 2024 16:08:43 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:6067:153a:95aa:2e07]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 55E43BC0; Mon, 3 Jun 2024 16:08:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1717423716; bh=sdNvzbOEJC0veHQ5FTjS/q4Opfi5ToQeXw7PVHyzrm4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H3FIKxTbHg1bXR9bqcX9gLzPmrJFfE4b/TQcsSB9K3ZzG3fMCo5dw406+gc1SXRrE KMF8EPMpKxLxzRgThNVFoY7ZLFVANH0bUgmizbDRtS0QypP+Gj5NM3bAjc+F8tNfiM Dk5VutvOBjGPB5oNe/7tpgBIXdislSCYhNbSifyg= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug , Daniel Scally , Kieran Bingham Subject: [PATCH v3 1/3] libcamera: Add gamma control id Date: Mon, 3 Jun 2024 16:06:28 +0200 Message-ID: <20240603140806.90045-2-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240603140806.90045-1-stefan.klug@ideasonboard.com> References: <20240603140806.90045-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 --- v2 -> v3: - no changes 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: |