From patchwork Tue Aug 2 10:09:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 16894 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 9A54CC3275 for ; Tue, 2 Aug 2022 10:10:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E7DB563312; Tue, 2 Aug 2022 12:10:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1659435002; bh=rm9D9IB2WmD2UobW8ZzSDYdICcikILbOg72nIlWhnJE=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=lkpnWw6/eyMvJKEhdZol06e4AKE4B60bFRNlzu5u6k0rk+8i/TVa+QiYdVB9zEiET PlsnrdJqdx5gCSLnoanniAOLyRduwgHJGG3KiQe6BH0VkWtVXGKiNyIh8bBI5vL6CO dEe5t9aSCPcpZ8W3dDTTuGwADrB1v3Xzt5f5mvLX3HDXypBWXsR9uIdLUZ6TdehFCT c8E+bthm77b1h1g5CLPb0RBHmT6tU5uT80APbA1s6CeQLalZuU0qEUwfasAW0I8J0Z K5/Jy+nloDcPdIJgUE/DHrrXsFdwHSj8My/MrPw8tNtYnPNZbaEB55LJYsjlfgjMLU kRxmUDmo0bcRQ== 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 0AC9F603E6 for ; Tue, 2 Aug 2022 12:10:01 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="tivqHeEf"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 750BA25B for ; Tue, 2 Aug 2022 12:10:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1659435000; bh=rm9D9IB2WmD2UobW8ZzSDYdICcikILbOg72nIlWhnJE=; h=From:To:Subject:Date:From; b=tivqHeEf2wA6Sew0yLgEJ0dHwxmu6czX0E83Tlf7RLF9Or98ZMdZH3TStH3QfA+j8 MvHDroM8W6UMOt5+zMkMajHiy5iu71FPfxG8IkiRuxphNc2HIlbS423dtzrSp4ZEuu +6ANW5NLgeqZpzvsqcUfgEpO+tPzpL+2G1nYk/UU= To: libcamera-devel@lists.libcamera.org Date: Tue, 2 Aug 2022 13:09:51 +0300 Message-Id: <20220802100955.1546-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 0/4] Add tuning data file support to the IPU3 IPA module 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: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hello, This patch series adds support for tuning data files to the IPU3 IPA module. It mimicks the RkISP1 implementation that was merged recently, and brings dynamic instantiation of algorithms from the tuning file. The series leaves a few questions unanswered, in particular how to handle the IPU3 IPA module based on the closed-source Intel 3A binaries. I don't think this is a blocker, the pipeline handler will pass a tuning file name to the IPA module, which that particular module will ignore. I haven't really thought about how to handle the fact that different IPA modules may require different tuning files, maybe this should be handled in the broader context of how to select one IPA module among multiple options. Another question is if there is room for more code sharing, both on the pipeline handler side and the IPA module side, as the IPU3 code is very similar to the RkISP1 code. I think this should be addressed in a second step, once we'll see how both implementations will evolve. The patches haven't been tested yet, hence the RFC. I'd like feedback on the direction this is taking, and if someone wants to give the series a go on an IPU3 device, that will also be appreciated. Laurent Pinchart (4): pipeline: ipu3: Support IPA tuning file ipa: ipu3: Add an uncalibrated.yaml tuning data file ipa: ipu3: Register algorithms ipa: ipu3: Add YAML tuning file support src/ipa/ipu3/algorithms/af.cpp | 2 + src/ipa/ipu3/algorithms/agc.cpp | 2 + src/ipa/ipu3/algorithms/awb.cpp | 2 + src/ipa/ipu3/algorithms/blc.cpp | 2 + src/ipa/ipu3/algorithms/tone_mapping.cpp | 2 + src/ipa/ipu3/data/meson.build | 8 +++ src/ipa/ipu3/data/uncalibrated.yaml | 11 ++++ src/ipa/ipu3/ipu3.cpp | 70 ++++++++++++++++++------ src/ipa/ipu3/meson.build | 1 + src/libcamera/pipeline/ipu3/ipu3.cpp | 22 +++++++- 10 files changed, 102 insertions(+), 20 deletions(-) create mode 100644 src/ipa/ipu3/data/meson.build create mode 100644 src/ipa/ipu3/data/uncalibrated.yaml