From patchwork Mon Jun 3 14:06:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 20192 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 B61A9BD87C for ; Mon, 3 Jun 2024 14:08:28 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 97307634CA; Mon, 3 Jun 2024 16:08:27 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="NIXSwNjZ"; 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 7C0FC61A3B for ; Mon, 3 Jun 2024 16:08:25 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:6067:153a:95aa:2e07]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3F8D1BC0; Mon, 3 Jun 2024 16:08:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1717423698; bh=9Okq4pbEwsV9TR2BYOEpxjfR2Lxx7pan6cDMgvHe43s=; h=From:To:Cc:Subject:Date:From; b=NIXSwNjZQOS/EQkgwlzE/l4OV2foLxu+2OdwhhhOzxoOlZBy1llAgU9lSdl96lSUi po1uGSLIxp4WWGb/rggJe/DK15ZsjywzYrJHg7dMApPmrr37AYdGeRCrRqttH0KS5X sAhJJBvYUiKo520a7ihLk1glBK0zoU7hA1yTnfYM= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v3 0/3] libcamera: Add gamma control for rkisp1 Date: Mon, 3 Jun 2024 16:06:27 +0200 Message-ID: <20240603140806.90045-1-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.43.0 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" This patchset adds a gamma algorithm and the corresponding control for rkisp1. A camera gamma of roughly 2.2 is necessary to produce correct output images on a standard monitor and to comply with sRGB. Further information is available here: https://en.wikipedia.org/wiki/SRGB https://www.cambridgeincolour.com/tutorials/gamma-correction.htm v2 -> v3: - Renamed the algorithm to GammaOutCorrection which seems to be more in line with the other algorithms. (This got clearer to me after writing the schema file) - Added ability to configure the default gamma value in the tuning file - Squashed patch 1/4 and 4/4 to make it easier to review - Applied feedback from reviews v1 -> v2: - fixed some stylistic issues from review - added gamma control only if algorithm is present Stefan Klug (3): libcamera: Add gamma control id ipa: rkisp1: Fix algorithm controls vanish after configure ipa: rkisp1: Add GammaOutCorrection algorithm src/ipa/rkisp1/algorithms/goc.cpp | 161 ++++++++++++++++++++++++++ src/ipa/rkisp1/algorithms/goc.h | 48 ++++++++ src/ipa/rkisp1/algorithms/meson.build | 1 + src/ipa/rkisp1/ipa_context.h | 4 + src/ipa/rkisp1/rkisp1.cpp | 2 +- src/libcamera/control_ids_core.yaml | 7 ++ 6 files changed, 222 insertions(+), 1 deletion(-) create mode 100644 src/ipa/rkisp1/algorithms/goc.cpp create mode 100644 src/ipa/rkisp1/algorithms/goc.h