From patchwork Tue Jun 11 14:02:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 20260 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 30C95C31E9 for ; Tue, 11 Jun 2024 14:02:23 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B20AE65446; Tue, 11 Jun 2024 16:02:21 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="VpeWcqQT"; 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 0229F61A26 for ; Tue, 11 Jun 2024 16:02:19 +0200 (CEST) Received: from neptunite.hamster-moth.ts.net (h175-177-049-156.catv02.itscom.jp [175.177.49.156]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 763F8D77; Tue, 11 Jun 2024 16:02:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1718114527; bh=wKJzH0CkWfB/Uz1AgGjPtFMqJ9qDzDJF1ckV5AunJmo=; h=From:To:Cc:Subject:Date:From; b=VpeWcqQTqE5ng29r0NkyRQJg3em1Ho3Rpadfs75rCB7SaVnwK/Y74gRqSyk6fiziD II8YDvJVeqbvqPn0KDIxU/NRs18rVbs0dLQ8vItJ37PbvIHBCsF5HFB3fby4XwEnR4 VRnbqRu28Kesgu5oPbRHutykAS8qkukCLfag3ujY= From: Paul Elder To: libcamera-devel@lists.libcamera.org Cc: Paul Elder Subject: [PATCH v7 0/3] ipa: rkisp1: Add crosstalk algorithm Date: Tue, 11 Jun 2024 23:02:04 +0900 Message-Id: <20240611140207.520083-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 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 adds the crosstalk / color correction algorithm to the rkisp1 IPA. Interpolating matrices is likely to be a common functionaily, as lens shading correction also does it, and other IPAs will will want to do both color correction and lens shading correction. Because of this, the crosstalk is implemented using a generic matrix interpolator, which is added to libipa, in addition to a Matrix class. v3 mainly adds ccm offsets, and some fixes some initialization and asserts. v4 cleans up / optimizes the Matrix class and supports the reorganized tuning file layout for color correction matrices. v5 mainly adds documentation, as well as a simple cache to the matrix interpolator. v6 fixes documentation (again). v7 fixes offsets initialization and adds ccm to metadata, as well as copyright and licenses, as these classes weren't actually copied. Paul Elder (3): ipa: libipa: Add Matrix class ipa: libipa: Add MatrixInterpolator class ipa: rkisp1: algorithms: Add crosstalk algorithm src/ipa/libipa/matrix.cpp | 123 ++++++++++++++++++ src/ipa/libipa/matrix.h | 172 +++++++++++++++++++++++++ src/ipa/libipa/matrix_interpolator.cpp | 110 ++++++++++++++++ src/ipa/libipa/matrix_interpolator.h | 124 ++++++++++++++++++ src/ipa/libipa/meson.build | 4 + src/ipa/rkisp1/algorithms/ccm.cpp | 140 ++++++++++++++++++++ src/ipa/rkisp1/algorithms/ccm.h | 50 +++++++ src/ipa/rkisp1/algorithms/meson.build | 1 + src/ipa/rkisp1/ipa_context.h | 5 + 9 files changed, 729 insertions(+) create mode 100644 src/ipa/libipa/matrix.cpp create mode 100644 src/ipa/libipa/matrix.h create mode 100644 src/ipa/libipa/matrix_interpolator.cpp create mode 100644 src/ipa/libipa/matrix_interpolator.h create mode 100644 src/ipa/rkisp1/algorithms/ccm.cpp create mode 100644 src/ipa/rkisp1/algorithms/ccm.h