From patchwork Wed Sep 2 09:07:18 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Scally X-Patchwork-Id: 28162 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 EA86BC3344 for ; Wed, 2 Sep 2026 09:07:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C2628685A6; Wed, 2 Sep 2026 11:07:36 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Bc+Mw3uy"; 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 88BC06849B for ; Wed, 2 Sep 2026 11:07:34 +0200 (CEST) Received: from [127.0.1.1] (chfd-03-b2-v4wan-176392-cust229.vm15.cable.virginm.net [82.19.20.230]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 00FD01E6A; Wed, 2 Sep 2026 11:06:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1788339963; bh=xj8Y2AHJeNmh9KFhZQQwbIosOMkiwTooe/uXtt58mYU=; h=From:Subject:Date:To:Cc:From; b=Bc+Mw3uynx5QJgYKHWfyHyfeKvlE/EwPd0GQ5tKktTVbcNpJlePObiUkZG1+Cv1xH Bd9pjM+Y2Z7aZZ21k1PSNXWF9P7jDLvwL1xkc5cTybqVf1vAj9KRi9rr9cg1et/vCN KJbnBPPBRYayPZuiFhbs5/2geJ4mbr+OcFfzQp8I= From: Daniel Scally Subject: [PATCH v3 00/10] libipa: Re-work IPU3 IPA to use libipa algorithms Date: Wed, 02 Sep 2026 10:07:18 +0100 Message-Id: <20260902-ipu3-libipa-rework-v3-0-b7da9b062326@ideasonboard.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAEbnl2oC/33NQQ6CMBQE0KuYrq2h7achrryHcVHoR35Uii1UD eHuFlzogricSebNyAJ6wsD2m5F5jBTItSmo7YZVjWnPyMmmzGQmdaaF5tQNil+ppM5wjw/nL7y WSgMobUGWLA07jzU9F/R4+mSP9yHZ/bdsKPTOv5bjKOb270cUPOMWAIoyh1rY4kAWTXBt6Yy3u 8rd2KxG+SPJdUkmCUQOGqWyqHBFmqbpDY/bv0waAQAA X-Change-ID: 20260616-ipu3-libipa-rework-f2364436d42b To: libcamera-devel@lists.libcamera.org Cc: Daniel Scally , =?utf-8?q?Barnab=C3=A1s_?= =?utf-8?b?UMWRY3pl?= , Kieran Bingham , Jacopo Mondi X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3347; i=dan.scally@ideasonboard.com; h=from:subject:message-id; bh=xj8Y2AHJeNmh9KFhZQQwbIosOMkiwTooe/uXtt58mYU=; b=owEBbQKS/ZANAwAKAchJV3psRXUyAcsmYgBql+dTMbY5pjPNCX+hZxjYSwWRpGLjqVcNw2zuW jqYqnsoM+uJAjMEAAEKAB0WIQQqyuwyDnZdb+mxmm/ISVd6bEV1MgUCapfnUwAKCRDISVd6bEV1 MryDD/9pZSBmvdU4eCJ8lwJVhInKP1Rpu/XX3AKFWKiVThpWBtMJLhVifL+as9/2iQDjXRrd8JN Lf1htM/9L38WEbtxqOch/ITfgGG/szYYG2u08/x/+cetYg+/0rrNYN6BjrpdsLGJl0fl0JbKtDs Al4f7OC6kHcG5iHSnjjLYoMh6J5xZjvIWRU1h5TYPd9oC5e79+GaTCIRM7ZvgAXjISpdafBs2c2 QWN/rltm58DXGPlA/8A4DhEz+y+oYxW1hVowBX1qD+l/GLzlJqts2iE+wmWbRGfKkflZKXg3m0S /h2He6rFX7nSmBRMbhVjkQub5cvnV6vk5CrVfoCX2Qo1X51QGv9omqkG5eLr0ZK3fIiWNUKeZ61 PNBVGDXugmQBJhIJkXALqenmcTCL34dwy/ZaAGxnaO0PuHs0O0fkOAv9qGM4dmlN8QwdTqgCe3N h9nm/+q6eDNjF+3ZhZbNtq5tWlllsW6JVlDpxbpfSE7aF+nayzlDhkNmD+LQhQIRfv1bu1bkxRT vHWmxjuchC3qPiQ7KTBzbxpO8dryC58lsrWvNxHLXFcql+nlLJUU/rBxXosqw3QoSIiY6gCo8jI Sfs7dJWyfKnA9YtgyxFPvuozfFbtRwFMRNulZNeH3M2OJ8QBDH6Wy2sSU702Df+a9heGm2gshAa EHZNmBTx/CriX9g== X-Developer-Key: i=dan.scally@ideasonboard.com; a=openpgp; fpr=EEC699ACA1B7CB5D31330C0BBD501C2A3546CCF6 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" Hello all This series builds on top of the recent work adding libipa implementations of the AGC, AWB, CCM and LSC algorithms by adapting the IPU3 IPA to use them. As CCM and LSC were not present for this IPA previously, this series adds them. I also introduce the Gamma Correction algorithm to libipa following the theme of the earlier work and update the IPU3 and RkISP1 IPAs to use it. Tested on the IPU3 via the Surface Go2 with OV5693 and on RkISP1 via the Debix A with an imx708. Dan Signed-off-by: Daniel Scally --- Changes in v3: - Dropped three patches who's contents were superseded by the merged work from Barnabas: - ipa: ipu3: Convert from separate gains to RGB in AGC - ipa: ipu3: Don't pass sensorInfo to updateControls() - ipa: ipu3: Add IPACameraSensorInfo to IPAContext - New patch to correct an error in AwbGrey - Link to v2: https://patchwork.libcamera.org/project/libcamera/list/?series=6022 Changes in v2: - Added a patch converting the AGC from using separate class members for each colour channel's gain to a single RGB member - Added a patch that drops the sensorInfo parameter from IPAIPU3::updateControls() - Link to v1: https://patchwork.libcamera.org/project/libcamera/list/?series=5995 --- Daniel Scally (10): libipa: awb_grey: Correct minimum gain clamping ipa: ipu3: Remove ~Awb() from source and header ipu3: awb: Remove CCM settings from Awb algorithm ipa: ipu3: awb: Port to the new libipa AwbAlgorithm ipa: ipu3: ccm: Add a Colour Correction Matrix algorithm ipa: libipa: Add GammaAlgorithm class ipa: ipu3: ToneMapping: Convert to use GammaAlgorithm ipa: ipu3: Add Ccm to uncalibrated.yaml ipa: rkisp1: goc: Re-work to use GammaAlgorithm class ipa: ipu3: Add Lens Shading Correction algorithm src/ipa/ipu3/algorithms/agc.cpp | 16 +- src/ipa/ipu3/algorithms/awb.cpp | 243 ++++++++++++------------- src/ipa/ipu3/algorithms/awb.h | 22 ++- src/ipa/ipu3/algorithms/ccm.cpp | 116 ++++++++++++ src/ipa/ipu3/algorithms/ccm.h | 48 +++++ src/ipa/ipu3/algorithms/lsc.cpp | 295 +++++++++++++++++++++++++++++++ src/ipa/ipu3/algorithms/lsc.h | 60 +++++++ src/ipa/ipu3/algorithms/meson.build | 2 + src/ipa/ipu3/algorithms/tone_mapping.cpp | 73 ++++---- src/ipa/ipu3/algorithms/tone_mapping.h | 12 +- src/ipa/ipu3/data/uncalibrated.yaml | 1 + src/ipa/ipu3/ipa_context.cpp | 60 ++++--- src/ipa/ipu3/ipa_context.h | 27 ++- src/ipa/libipa/awb.cpp | 5 - src/ipa/libipa/awb_grey.cpp | 6 +- src/ipa/libipa/gamma.cpp | 257 +++++++++++++++++++++++++++ src/ipa/libipa/gamma.h | 94 ++++++++++ src/ipa/libipa/meson.build | 2 + src/ipa/rkisp1/algorithms/goc.cpp | 65 ++----- src/ipa/rkisp1/algorithms/goc.h | 7 +- src/ipa/rkisp1/ipa_context.h | 10 +- 21 files changed, 1141 insertions(+), 280 deletions(-) --- base-commit: 1df5cbe722a839ce4e257093550fa8107c02cf8b change-id: 20260616-ipu3-libipa-rework-f2364436d42b Best regards,