From patchwork Fri Oct 11 18:27:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 21597 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 8E5ACC3260 for ; Fri, 11 Oct 2024 18:28:11 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6D58B65390; Fri, 11 Oct 2024 20:28:10 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="het5JFT+"; 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 F34F56538A for ; Fri, 11 Oct 2024 20:28:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728671288; 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=/5fy2wi1L0TrgN937mTTDBqMyOn1c6OMhDcX6RA4+eU=; b=het5JFT+19+q+QuRe6A7a922w7iXTvVVSFDI/QcqKh/6VBpxIYEU9kujnH0greprPKbApk OZ0lj99SAUs793nfQrH7JSBW76YtJZPkdPqGYI6eqe9Vx5hiVx52fhtcnxLCWNvGRIUm3s SUwR1f1N8jfyM42FZ1RIIWxnyJI35lM= 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-651-o19DxYpeOhiszHRQ1Ymg8A-1; Fri, 11 Oct 2024 14:28:05 -0400 X-MC-Unique: o19DxYpeOhiszHRQ1Ymg8A-1 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 AA0A419560AA; Fri, 11 Oct 2024 18:28:04 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.224.99]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 491D130001A3; Fri, 11 Oct 2024 18:28:03 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal , Kieran Bingham Subject: [PATCH v3 0/4] Add contrast control to software ISP Date: Fri, 11 Oct 2024 20:27:55 +0200 Message-ID: <20241011182800.1750589-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 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 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 | 45 ++++++++++++++++--- src/ipa/simple/algorithms/lut.h | 6 +++ src/ipa/simple/ipa_context.h | 14 ++++++ 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, 88 insertions(+), 14 deletions(-)