| Message ID | 20260407-kbingham-awb-split-v1-0-a39af3f4dc20@ideasonboard.com |
|---|---|
| Headers | show
Return-Path: <libcamera-devel-bounces@lists.libcamera.org> 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 5DFF1BDCBD for <parsemail@patchwork.libcamera.org>; Tue, 7 Apr 2026 22:02:45 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 768F062DB5; Wed, 8 Apr 2026 00:02:43 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="PiIDJUet"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B6F4A62CEB for <libcamera-devel@lists.libcamera.org>; Wed, 8 Apr 2026 00:02:40 +0200 (CEST) Received: from [192.168.0.204] (ams.linuxembedded.co.uk [209.38.108.23]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id BBC1A667; Wed, 8 Apr 2026 00:01:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1775599272; bh=6+mVYyQ5ebGu/DoOLfr93wj1t8EjPHDOhE41URuAa3o=; h=From:Subject:Date:To:Cc:From; b=PiIDJUetOQ4TzeG8rp5HLkvadIwVLwQw7XcqUvqHqgORJMLWkiNQ06ZxPl1xto4yu ot9HJTRwxPB/4p26uimj5ZfEA5J4Hv+B3CdIcvxu4xV1R7tv727wt35QjfmsUa6bZQ 5Rutkw82aSzO+YI9v0EOO4bltpteLqZreA45OrxM= From: Kieran Bingham <kieran.bingham@ideasonboard.com> Subject: [PATCH 00/13] ipa: simple: Convert to libipa AWB implementation Date: Tue, 07 Apr 2026 23:01:03 +0100 Message-Id: <20260407-kbingham-awb-split-v1-0-a39af3f4dc20@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAAAAAAAC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIzMDYyND3eykzLz0jMRc3cTyJN3igpzMEt0UQ2OD1NRUc7NUYzMloMaCotS 0zAqwodGxtbUAVKOdL2QAAAA= X-Change-ID: 20260321-kbingham-awb-split-d130eee76e36 To: libcamera-devel@lists.libcamera.org Cc: Kieran Bingham <kieran.bingham@ideasonboard.com>, Milan Zamazal <mzamazal@redhat.com> X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1775599359; l=3827; i=kieran.bingham@ideasonboard.com; s=20260204; h=from:subject:message-id; bh=6+mVYyQ5ebGu/DoOLfr93wj1t8EjPHDOhE41URuAa3o=; b=6pSWA0BLlSos7gjGKM+RjfPju3rtD9CtOIZxBowOPEifKPd8ATfpYYpecFav7KVSJyqab2OpX wlHgkWCLe5mDGQxYyO2qMgLrmpwZaGeQbtzoRhgDM8+g3DtPEQjU3Bg X-Developer-Key: i=kieran.bingham@ideasonboard.com; a=ed25519; pk=IOxS2C6nWHNjLfkDR71Iesk904i6wJDfEERqV7hDBdY= X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <libcamera-devel.lists.libcamera.org> List-Unsubscribe: <https://lists.libcamera.org/options/libcamera-devel>, <mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe> List-Archive: <https://lists.libcamera.org/pipermail/libcamera-devel/> List-Post: <mailto:libcamera-devel@lists.libcamera.org> List-Help: <mailto:libcamera-devel-request@lists.libcamera.org?subject=help> List-Subscribe: <https://lists.libcamera.org/listinfo/libcamera-devel>, <mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe> Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" <libcamera-devel-bounces@lists.libcamera.org> |
| Series |
|
| Related |
show
|
This series starts by clearing the unpacked fragment shader to keep the same indentation in both shader types to ease future patches. Then there is a quite substantial patch which splits the AWB handling for the SoftISP out of the combined matrix. This is important to be able to prevent saturation issues in bright regions showing up as neon colours. The AWB is applied and then the result is clamped to the sensor range (at that point with black level subtracted). The gains are then fixed in the CPU ISP, with contributions from Milan. The GPU CCM matrix multiplication is simplified to use the native GPU multiplication types, and adapts the ordering when the uniforms are created. We then refactor the libipa lux algorithm to provide a common data structure and move the RKISP1 implementation to use this new type. That allows the Simple IPA to re-use the lux algorithm without duplicating the data structures. The same approach is then taken to convert the Awb structures to common definitions and the simple IPA is refactored to be able to utilise the libipa AWB implementation. The AWB implementations for configure, queueReqeust, and prepare are then refactored into functions that can be directly called in the libipa implementation to reduce duplicating identical code when adding a new platform to use AWB. The last conversion patches might also further refactor common details from the initialisation functions and process functions, and also the stats helpers are completely duplicated, so they'll be in the next version too. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> --- Kieran Bingham (11): libcamera: shaders: unpacked: Fix indentations softisp: Split AWB from Combined Matrix shaders: bayer: Use native matrix multiplication ipa: libipa: provide lux context structures ipa: simple: Add lux algorithm to the SoftIPA ipa: libipa: Awb: Provide common context storage libcamera: vector: Convertor Constructor ipa: simple: Convert awb to libipa implementation ipa: libipa: awb: Move configure to common ipa: libipa: awb: convert to common queueRequest ipa: libipa: awb: factor out common prepare Milan Zamazal (2): libcamera: software_isp: Fix black level handling in CPU ISP libcamera: software_isp: Apply gains in CPU ISP include/libcamera/internal/vector.h | 8 + src/ipa/libipa/awb.cpp | 155 ++++++++++++++++++++ src/ipa/libipa/awb.h | 38 +++++ src/ipa/libipa/lux.cpp | 16 ++ src/ipa/libipa/lux.h | 12 ++ src/ipa/rkisp1/algorithms/awb.cpp | 73 +-------- src/ipa/rkisp1/ipa_context.h | 41 ++---- src/ipa/simple/algorithms/awb.cpp | 171 +++++++++++++++++----- src/ipa/simple/algorithms/awb.h | 12 ++ src/ipa/simple/algorithms/ccm.cpp | 2 +- src/ipa/simple/algorithms/lux.cpp | 93 ++++++++++++ src/ipa/simple/algorithms/lux.h | 39 +++++ src/ipa/simple/algorithms/meson.build | 1 + src/ipa/simple/ipa_context.h | 20 +-- src/libcamera/shaders/bayer_1x_packed.frag | 47 +----- src/libcamera/shaders/bayer_unpacked.frag | 228 ++++++++++++----------------- src/libcamera/software_isp/debayer_cpu.cpp | 71 ++++----- src/libcamera/software_isp/debayer_egl.cpp | 17 +-- src/libcamera/software_isp/debayer_egl.h | 3 + src/libcamera/vector.cpp | 7 + 20 files changed, 693 insertions(+), 361 deletions(-) --- base-commit: 7528d65aeee57c02ea5b085a3e3d364f23ed4ade change-id: 20260321-kbingham-awb-split-d130eee76e36 Best regards,