From patchwork Tue Nov 26 09:15:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 22091 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 3FC87C0DA4 for ; Tue, 26 Nov 2024 09:15:23 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7CFFA65FA3; Tue, 26 Nov 2024 10:15:22 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="ZSoGRMOi"; 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 F149660531 for ; Tue, 26 Nov 2024 10:15:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732612519; 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=OV79d9YQk265Icj+pMnoqan/Kn7lzjtjd087l/+4cE8=; b=ZSoGRMOi90bX+F4sL8jW3vgZVdhm17xX7gdqXZxI9NhjdFkcqAeOLUg+1bCDg5JJbsCtq3 yxYckh3DFVuw7c+p3lpaHoYihBH63k4I5B3EFgcBXCR0WhEaKwl3Yqtm3u/KjuQVH8e/k3 cLKjddGoK9OhkKPGa+/r6D9CBhXZhRg= 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-581-hXMsE_xTPtKASMAhkwfllA-1; Tue, 26 Nov 2024 04:15:17 -0500 X-MC-Unique: hXMsE_xTPtKASMAhkwfllA-1 X-Mimecast-MFC-AGG-ID: hXMsE_xTPtKASMAhkwfllA Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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 506431955F45; Tue, 26 Nov 2024 09:15:16 +0000 (UTC) Received: from nuthatch.brq.redhat.com (unknown [10.43.17.31]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 23B0A1955F40; Tue, 26 Nov 2024 09:15:14 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal , Kieran Bingham Subject: [PATCH v4 0/4] Add contrast control to software ISP Date: Tue, 26 Nov 2024 10:15:01 +0100 Message-ID: <20241126091509.89677-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: xa8KccNmSHbzn1rXdl9BJkRY6l-sO44KQYMjys_ilkY_1732612516 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 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 | 45 ++++++++++++++++--- 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, 87 insertions(+), 14 deletions(-)