From patchwork Fri Jun 26 13:05:47 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Scally X-Patchwork-Id: 27060 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 D9809BF415 for ; Fri, 26 Jun 2026 13:06:08 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 95ADD65EF2; Fri, 26 Jun 2026 15:06:06 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="EV7QQeVd"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A4CF465878 for ; Fri, 26 Jun 2026 15:06:04 +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 88CF21E7; Fri, 26 Jun 2026 15:05:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1782479123; bh=bg6FLWOcwnLerEpNQm7f3WlLqr2Yy3k8GPstZr9y31Q=; h=From:Subject:Date:To:Cc:From; b=EV7QQeVdv29ZnrdPzZl8sEKzLqmM6jfxLYgtGRkRVlVCOnBvEnbj3lqg/CtfYaszp o7yFxlRAciqMAWCuxhjMXwrTdAjZ2GojVjG4X3Xi+O1p9j/6+ZUWR6RU8a8Bdr828C P3OmMlPChd5mb9lk8IoS2AuOT95D3a2zKmjTP7bg= From: Daniel Scally Subject: [PATCH v2 00/12] libipa: Re-work IPU3 IPA to use libipa algorithms Date: Fri, 26 Jun 2026 14:05:47 +0100 Message-Id: <20260626-ipu3-libipa-rework-v2-0-41546e23de3e@ideasonboard.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIACx5PmoC/33PTW6DMBAF4Ksgr+vKNv7NqveosrDxEEYNmNqEJ oq4e11Qpa66fCPN0/eepEBGKOTUPEmGFQumqQbx0pBu8NMFKMaaiWBCM801xfnW0isGnD3N8JX yB+1Fq6VsdZQikPo4Z+jxvpe+n4+c4fNWu5fjSIIvQLs0jricmmgsA2FVUK6NkQtwihljOt722 nXAjHPOcuDkr6kSD5H6xfjrJWVchrFQ5bTWofPMi578CAYsS8qPfeXKd8J/g1ZOGY1SShuU7Hm 0bxjBlzSF5HN8rXBy3rbtG2FyWbo9AQAA 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=3216; i=dan.scally@ideasonboard.com; h=from:subject:message-id; bh=bg6FLWOcwnLerEpNQm7f3WlLqr2Yy3k8GPstZr9y31Q=; b=owEBbQKS/ZANAwAKAchJV3psRXUyAcsmYgBqPnk58c00r4JNA5wj21cKv7ZwIIw9n3sc8PtBx AYthUqVq8KJAjMEAAEKAB0WIQQqyuwyDnZdb+mxmm/ISVd6bEV1MgUCaj55OQAKCRDISVd6bEV1 MnKoEACDP4s6Dqu/iUGwYpqGCmeHeCglC5HisqX8JIBMY+121hnyuao+58mEUOCCL6Us1YZmZum jzz/X5eW4TUYK2Gc0fAen04XxUvWno4BtiHOz1nEFnrSb39ifax2gNIE1N4241ooeWGvCSNdyi7 q/xJTbu0Ym0A2+vbKXJQ23TAmyhSv0hHS/d+T7zPi9d/Z2sfiNJZGfysbmjxiIlzRro3APejwU5 PjfBwdHKwl43X9jY+/DcUPRHj1at/JsndokMTW8UlIQKgbmJ4U1Sir3/NGEnnl4tt/ZiFfVA594 RYzC4cZZwSN9wBLzR9G1ZiTK467kFdo+K4ZW9WljNiofvHTV+LUhBO2x1rLgUK07+5M6mPeOA8K p3FHcbdanhstBK9+XEtrC+zvtjiLAF0PQjFeBH8HJGIuZ8+irGFNUtnlc/CaLNMto5ZWnAb1Arq PqB6pyHnYOikeBp5+onunZTYPJkL+Kq5u8KRtQNEsb47AsdBbn98QlUauJ/5KhIXfUM1MRIJjJB XWl+qDt/PPwAboDzH8LOMscrm2gpT05hW3VLfUhMUJPxdRf7PwJSSUWsZ8X5PY8K43B0dUSC3Nq kCBELX0byctPBDlig98frs8zkpsOPemuswbP7gZ7t4Xdr8oCqTGVi6hIA0MA05Q7XKdZh5gPYm9 q8DAStTEcwo5hSQ== 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 Jacopo's recent set [1] adding libipa implementations of the AWB, LSC and CCM 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 Jacopo's 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 and imx708. Dan [1] https://patchwork.libcamera.org/project/libcamera/list/?series=6013 Signed-off-by: Daniel Scally --- 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://lore.kernel.org/r/20260616-ipu3-libipa-rework-v1-0-d4448b54f1d8@ideasonboard.com --- Daniel Scally (12): ipa: ipu3: Remove ~Awb() from source and header ipu3: awb: Remove CCM settings from Awb algorithm ipa: ipu3: Convert from separate gains to RGB in AGC 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: Don't pass sensorInfo to updateControls() ipa: ipu3: Add IPACameraSensorInfo to IPAContext ipa: ipu3: Add Lens Shading Correction algorithm src/ipa/ipu3/algorithms/agc.cpp | 11 +- src/ipa/ipu3/algorithms/agc.h | 6 +- src/ipa/ipu3/algorithms/awb.cpp | 214 ++++++++++------------ 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 | 296 +++++++++++++++++++++++++++++++ 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 | 77 ++++---- src/ipa/ipu3/ipa_context.h | 30 ++-- src/ipa/ipu3/ipu3.cpp | 29 ++- src/ipa/libipa/gamma.cpp | 257 +++++++++++++++++++++++++++ src/ipa/libipa/gamma.h | 94 ++++++++++ src/ipa/libipa/meson.build | 2 + src/ipa/rkisp1/algorithms/goc.cpp | 63 ++----- src/ipa/rkisp1/algorithms/goc.h | 7 +- src/ipa/rkisp1/ipa_context.h | 10 +- 21 files changed, 1137 insertions(+), 293 deletions(-) --- base-commit: d780e285b593dd12e950777c13f69ce0799981e1 change-id: 20260616-ipu3-libipa-rework-f2364436d42b prerequisite-change-id: 20260615-libipa-algorithms-59666bca0a2f Best regards,