From patchwork Fri Feb 19 17:22:22 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: 11345 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 8954EBD1F6 for ; Fri, 19 Feb 2021 17:22:27 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 050CE689D9; Fri, 19 Feb 2021 18:22:27 +0100 (CET) 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="qC1dFL5t"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E5E75689CD for ; Fri, 19 Feb 2021 18:22:25 +0100 (CET) Received: from localhost.localdomain (unknown [IPv6:2a01:e0a:169:7140:e9be:2a73:b117:75b1]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6C06C596; Fri, 19 Feb 2021 18:22:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1613755345; bh=db439f1gkxQ4FPvrpOjW7aHwyTmKs6ydeVsCX0wTrmw=; h=From:To:Cc:Subject:Date:From; b=qC1dFL5tLI0UMU3bfIMNMev2eqOe9yzbpFrTq/uvUNuWTtC0KvEDkox+BRcNb0gtI /w5itmuyAF6wwjXaZMlc4PQPdbxSCEu+fDuWLp0L7gAR0CScjvXbjMhILaQuAKeE8R CDA3hiIA8mqPX3T6/G/WEPZ/uRLNk+4L+7Aqh5Zo= From: Jean-Michel Hautbois To: libcamera-devel@lists.libcamera.org Date: Fri, 19 Feb 2021 18:22:22 +0100 Message-Id: <20210219172224.69862-1-jeanmichel.hautbois@ideasonboard.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 0/2] Implement IPA algorithms and demo with IPU3 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 RFC is really meant to start discussions. It demonstrates on IPU3 a conjunction of automatic exposure (AGC) and automatic white balance (AWB). The skeleton are extracted from RPi controller and probably subject to modifications and discussions : - are the mandatory methods really those ? - how to exchange data between algorithms ? - metadata like RPi? - IPC ? - public methods? - controller API ? - is the controller needed at all ? The implementation in IPU3 is tested on SGo2. It is not perfect but shows a really better behaviour than default ;-). Jean-Michel Hautbois (2): WIP: ipa: Add Controller and Algorithm skeleton WIP: ipa: ipu3: Add support for IPU3 AWB algorithm include/libcamera/ipa/agc_algorithm.h | 32 ++++ include/libcamera/ipa/awb_algorithm.h | 27 ++++ include/libcamera/ipa/ipa_algorithm.h | 46 ++++++ include/libcamera/ipa/ipa_controller.h | 39 +++++ include/libcamera/ipa/meson.build | 4 + src/ipa/ipu3/ipu3.cpp | 31 +++- src/ipa/ipu3/ipu3_agc.cpp | 195 +++++++++++++++++++++++++ src/ipa/ipu3/ipu3_agc.h | 96 ++++++++++++ src/ipa/ipu3/ipu3_awb.cpp | 182 +++++++++++++++++++++++ src/ipa/ipu3/ipu3_awb.h | 130 +++++++++++++++++ src/ipa/ipu3/meson.build | 8 +- src/ipa/libipa/ipa_algorithm.cpp | 20 +++ src/ipa/libipa/ipa_controller.cpp | 45 ++++++ src/ipa/libipa/meson.build | 2 + src/libcamera/pipeline/ipu3/ipu3.cpp | 1 + 15 files changed, 853 insertions(+), 5 deletions(-) create mode 100644 include/libcamera/ipa/agc_algorithm.h create mode 100644 include/libcamera/ipa/awb_algorithm.h create mode 100644 include/libcamera/ipa/ipa_algorithm.h create mode 100644 include/libcamera/ipa/ipa_controller.h create mode 100644 src/ipa/ipu3/ipu3_agc.cpp create mode 100644 src/ipa/ipu3/ipu3_agc.h create mode 100644 src/ipa/ipu3/ipu3_awb.cpp create mode 100644 src/ipa/ipu3/ipu3_awb.h create mode 100644 src/ipa/libipa/ipa_algorithm.cpp create mode 100644 src/ipa/libipa/ipa_controller.cpp