From patchwork Thu Aug 19 14:57:50 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: 13397 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 8768EBD87C for ; Thu, 19 Aug 2021 14:58:06 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A3ACB68911; Thu, 19 Aug 2021 16:58:05 +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="Hy7yub6j"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 515C160264 for ; Thu, 19 Aug 2021 16:58:03 +0200 (CEST) Received: from tatooine.ideasonboard.com (unknown [IPv6:2a01:e0a:169:7140:d68d:3cb6:f3c7:c19c]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D80D9DD; Thu, 19 Aug 2021 16:58:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1629385082; bh=YGKRfJJxMGdqvJA945EOdol7aCXfJBuatRmSkM4tbew=; h=From:To:Cc:Subject:Date:From; b=Hy7yub6jRquxRgU5xjYDqdAtE7fWJa7xQfqDQkeg53IRjfcdqOzpq4rtSOf98QMnY I+nWBvyrJ2hZrvhBjuZdvHqYk4pMZ6kT4AR2TXgthE6jfReKc9Nkv4apO2fOZdYDSe 4ZHHiVu1rQje1oymOAkjQsaqNatlap6S/Ds1rEE4= From: Jean-Michel Hautbois To: libcamera-devel@lists.libcamera.org Date: Thu, 19 Aug 2021 16:57:50 +0200 Message-Id: <20210819145759.184192-1-jeanmichel.hautbois@ideasonboard.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 0/9] 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 5/9 moves the contrast algorithm from AWB into its own algorithm. Patch 6/9 and 7/9 change the AWB and AGC to use the new interface. And the two latest patches are indeed the usage of the new modular interface applied to AWB and AGC. Jean-Michel Hautbois (9): ipa: move libipa::Algorithm to ipa/ipu3/algorithms ipa: ipu3: Introduce a Context structure ipa: ipu3: Add the functions to the Algorithm class ipa: ipu3: Introduce modular algorithm ipa: ipu3: Introduce a modular tone mapping algorithm ipa: ipu3: convert AWB to the new algorithm interface ipa: ipu3: convert AGC to the new algorithm interface ipa: ipu3: Move IPU3 awb into algorithms ipa: ipu3: Move IPU3 agc into algorithms .../ipu3/{ipu3_agc.cpp => algorithms/agc.cpp} | 41 ++--- src/ipa/ipu3/{ipu3_agc.h => algorithms/agc.h} | 32 ++-- src/ipa/ipu3/algorithms/algorithm.cpp | 102 +++++++++++ src/ipa/ipu3/algorithms/algorithm.h | 33 ++++ .../ipu3/{ipu3_awb.cpp => algorithms/awb.cpp} | 166 +++++++---------- src/ipa/ipu3/{ipu3_awb.h => algorithms/awb.h} | 26 +-- src/ipa/ipu3/algorithms/meson.build | 8 + src/ipa/ipu3/algorithms/tone_mapping.cpp | 58 ++++++ src/ipa/ipu3/algorithms/tone_mapping.h | 32 ++++ src/ipa/ipu3/ipa_context.h | 54 ++++++ src/ipa/ipu3/ipu3.cpp | 172 +++++++++++++++--- src/ipa/ipu3/meson.build | 6 +- src/ipa/libipa/algorithm.cpp | 39 ---- src/ipa/libipa/algorithm.h | 24 --- src/ipa/libipa/libipa.cpp | 22 +++ src/ipa/libipa/meson.build | 5 +- 16 files changed, 565 insertions(+), 255 deletions(-) rename src/ipa/ipu3/{ipu3_agc.cpp => algorithms/agc.cpp} (87%) rename src/ipa/ipu3/{ipu3_agc.h => algorithms/agc.h} (51%) create mode 100644 src/ipa/ipu3/algorithms/algorithm.cpp create mode 100644 src/ipa/ipu3/algorithms/algorithm.h rename src/ipa/ipu3/{ipu3_awb.cpp => algorithms/awb.cpp} (71%) rename src/ipa/ipu3/{ipu3_awb.h => algorithms/awb.h} (77%) create mode 100644 src/ipa/ipu3/algorithms/meson.build create mode 100644 src/ipa/ipu3/algorithms/tone_mapping.cpp create mode 100644 src/ipa/ipu3/algorithms/tone_mapping.h create mode 100644 src/ipa/ipu3/ipa_context.h delete mode 100644 src/ipa/libipa/algorithm.cpp delete mode 100644 src/ipa/libipa/algorithm.h create mode 100644 src/ipa/libipa/libipa.cpp Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Reviewed-by: Laurent Pinchart