From patchwork Thu Nov 28 12:52:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 22127 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 352E2BD78E for ; Thu, 28 Nov 2024 12:52:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 18AEC65F5A; Thu, 28 Nov 2024 13:52:40 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="AGkQA/3N"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AE46465898 for ; Thu, 28 Nov 2024 13:52:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732798356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rUSZymMRnzaY4jP/EPStyHrZ6J5CU6gnfCU+LAXxaQA=; b=AGkQA/3Nns3dnaX5UIewnX3r0aS0rsUiS/SwhKMPR5L7OZ0WLNKsuyf7/GsG4Y39j1FWBH Oc2MZ35Z21Igvc82Zobq686tlm1uXl1Dv4tNXt04JBghfIDF79SRi8CwARqQdyOlOkZxaY jOO3iFlABKXdahn7C/D1qbvaPFAbIbc= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-627-qIp6EkARP8isTNoFKT3vAw-1; Thu, 28 Nov 2024 07:52:33 -0500 X-MC-Unique: qIp6EkARP8isTNoFKT3vAw-1 X-Mimecast-MFC-AGG-ID: qIp6EkARP8isTNoFKT3vAw Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DFEB11955D83; Thu, 28 Nov 2024 12:52:31 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.225.146]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BB4A61955D45; Thu, 28 Nov 2024 12:52:29 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal , Kieran Bingham , Laurent Pinchart , Stefan Klug Subject: [PATCH v5 0/4] Add contrast control to software ISP Date: Thu, 28 Nov 2024 13:52:21 +0100 Message-ID: <20241128125226.683249-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: yRxvQ3FBr8wy4eUtAwk6n4UMuxojkycGolFuiYfi6Lc_1732798352 X-Mimecast-Originator: redhat.com 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" The purpose of these patches is adding support to software ISP for modifying image processing parameters in runtime. The first software ISP image control, implemented here, is contrast. It is simple to implement, doesn’t slow down image processing and can enhance the image easily. Changes in v5: - The contrast value range changed to 0..2 and transformed as suggested by Stefan. Changes in v4: - Rebased on master; more controls are to be added to the software ISP, let’s keep what we already have up to date. Changes in v3: - Added a simplified constructor for IPAContext (and the same for ipu3 when on it; rkisp1 has already been handled elsewhere). - C++ comment -> C comment. - Contrast algorithm merged to Lut. Changes in v2: - Rebased on the merged version of software ISP refactoring. - Control initialization moved from toplevel to an algorithm. Milan Zamazal (4): ipa: software_isp: Add constructor to the IPA context ipa: ipu3: Add constructor to the IPA context libcamera: software_isp: Add support for contrast control libcamera: software_isp: Add contrast control .../internal/software_isp/software_isp.h | 3 +- include/libcamera/ipa/soft.mojom | 2 +- src/ipa/ipu3/ipa_context.cpp | 4 ++ src/ipa/ipu3/ipa_context.h | 5 ++ src/ipa/ipu3/ipu3.cpp | 2 +- src/ipa/simple/algorithms/lut.cpp | 47 +++++++++++++++++-- src/ipa/simple/algorithms/lut.h | 6 +++ src/ipa/simple/ipa_context.h | 13 +++++ src/ipa/simple/soft_simple.cpp | 11 +++-- src/libcamera/pipeline/simple/simple.cpp | 2 +- src/libcamera/software_isp/software_isp.cpp | 8 +++- 11 files changed, 89 insertions(+), 14 deletions(-)