From patchwork Mon Aug 9 09:20:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Michel Hautbois X-Patchwork-Id: 13251 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 7BD70BD87D for ; Mon, 9 Aug 2021 09:20:18 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BF8996884F; Mon, 9 Aug 2021 11:20:17 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="JMHPJzTp"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E3C2F687EB for ; Mon, 9 Aug 2021 11:20:15 +0200 (CEST) Received: from tatooine.ideasonboard.com (unknown [IPv6:2a01:e0a:169:7140:14c5:c0eb:b1fb:db22]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 74B7EEE; Mon, 9 Aug 2021 11:20:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1628500815; bh=Aw6BnvfWVlvq0fhzyT/EpqGFvb5wp7VoRtkmUgkhSgA=; h=From:To:Cc:Subject:Date:From; b=JMHPJzTpZaNM0aVdYZwdnqPxdzhB5lRgc7lJPMSF9+z3tGk5DDuZJeo5tLjE/vgMc fOQ0QLC+AjcZcnKIGnApW4ta6gskDpqrq3SDDI3t+CKg60FhYMWH9iJ0TPhec7lJUI tuOeasCNqq02ryXLwPiSJSkijpKGEwsi01ePlr7c= From: Jean-Michel Hautbois To: libcamera-devel@lists.libcamera.org Date: Mon, 9 Aug 2021 11:20:02 +0200 Message-Id: <20210809092007.79067-1-jeanmichel.hautbois@ideasonboard.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 0/5] IPU3: Introduce modularity for algorithms 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 patch series splits the algorithms in IPU3 into a modular form. When the Metadata class was discussed a proposal from Kieran was to have a fully-defined structure which would be used to pass the context between algorithms and the IPAIPU3 class, as well as between the algorithms themselves. The algorithms are statically emplaced in a list for the moment, and a registration system may be used later. In order to demonstrate how to add a new algorithm, patch 3/5 demonstrates how the gamma table is calculated. Patch 4/5 and 5/5 move the AWB and AGC algorithms currently used. Jean-Michel Hautbois (5): ipa: ipu3: Introduce a Context structure ipa: ipu3: Introduce modular algorithms ipa: ipu3: Introduce a modular contrast algorithm ipa: ipu3: Move IPU3 awb into algorithms ipa: ipu3: Move IPU3 agc into algorithms .../ipu3/{ipu3_agc.cpp => algorithms/agc.cpp} | 59 +++++---- src/ipa/ipu3/{ipu3_agc.h => algorithms/agc.h} | 33 +++-- src/ipa/ipu3/algorithms/algorithm.h | 30 +++++ .../ipu3/{ipu3_awb.cpp => algorithms/awb.cpp} | 79 ++++-------- src/ipa/ipu3/{ipu3_awb.h => algorithms/awb.h} | 28 +++-- src/ipa/ipu3/algorithms/contrast.cpp | 52 ++++++++ src/ipa/ipu3/algorithms/contrast.h | 32 +++++ src/ipa/ipu3/algorithms/meson.build | 7 ++ src/ipa/ipu3/ipa_context.h | 53 ++++++++ src/ipa/ipu3/ipu3.cpp | 114 +++++++++++++----- src/ipa/ipu3/meson.build | 6 +- 11 files changed, 345 insertions(+), 148 deletions(-) rename src/ipa/ipu3/{ipu3_agc.cpp => algorithms/agc.cpp} (80%) rename src/ipa/ipu3/{ipu3_agc.h => algorithms/agc.h} (59%) create mode 100644 src/ipa/ipu3/algorithms/algorithm.h rename src/ipa/ipu3/{ipu3_awb.cpp => algorithms/awb.cpp} (78%) rename src/ipa/ipu3/{ipu3_awb.h => algorithms/awb.h} (77%) create mode 100644 src/ipa/ipu3/algorithms/contrast.cpp create mode 100644 src/ipa/ipu3/algorithms/contrast.h create mode 100644 src/ipa/ipu3/algorithms/meson.build create mode 100644 src/ipa/ipu3/ipa_context.h