From patchwork Fri Nov 15 07:46:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Scally X-Patchwork-Id: 21896 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 1C7ACC0F1B for ; Fri, 15 Nov 2024 07:46:52 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id F1E0D6585E; Fri, 15 Nov 2024 08:46:50 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="tdp7D8kY"; 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 F072D618BB for ; Fri, 15 Nov 2024 08:46:47 +0100 (CET) Received: from mail.ideasonboard.com (cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net [86.13.91.161]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id EAA71291; Fri, 15 Nov 2024 08:46:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1731656793; bh=DcQ5qx9BpRZA+1zOFmXoV7FnuEsD47oNaMO0vUBHRRA=; h=From:To:Cc:Subject:Date:From; b=tdp7D8kY6kg60v8GMfzFPtxUN24pZHw3vEB9CbBM/PTjzcHCjL0S1MrFiKUamBQzh X9TDp6a3OfMPD3RIAoXWd3RCv3GVV5CH8k5s4VMcBtaLOkwA96qLdu+TZuUEnDgkz8 GFmVxSVygX22RISrMHm1mFT8zRhM9jTSvDBqLX6s= From: Daniel Scally To: libcamera-devel@lists.libcamera.org Cc: mike.rudenko@gmail.com, Daniel Scally Subject: [PATCH v3 0/6] Centralise common functions in IPA modules Date: Fri, 15 Nov 2024 07:46:22 +0000 Message-Id: <20241115074628.417215-1-dan.scally@ideasonboard.com> X-Mailer: git-send-email 2.34.1 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" Hello all This series attempts to centralise some common things that are cropping up in multiple different IPAs. A helpers file is added for functions to be defined in that can be used in each IPA module so that a single common implementation is used across the board. Additionally the common hardcoding of default sensor delay values in pipeline handlers is switched to using values from the sensor's CameraSensorProperties class - the values there are those from the Rpi handler if available, or the defaults otherwise. Thanks Dan Daniel Scally (6): ipa: libipa: Add colour helpers ipa: ipu3: Use centralised libipa helpers ipa: rkisp1: Use centralised libipa helpers ipa: rpi: Use centralised libipa helpers libcamera: camera_sensor_properties: Add sensor control delays libcamera: pipelines: Draw control delays from CameraSensor properties include/libcamera/internal/camera_sensor.h | 2 + .../internal/camera_sensor_properties.h | 9 +++ src/ipa/ipu3/algorithms/agc.cpp | 7 +- src/ipa/ipu3/algorithms/awb.cpp | 32 +------- src/ipa/ipu3/algorithms/awb.h | 1 - src/ipa/libipa/colours.cpp | 77 ++++++++++++++++++ src/ipa/libipa/colours.h | 21 +++++ src/ipa/libipa/meson.build | 2 + src/ipa/rkisp1/algorithms/awb.cpp | 18 +---- src/ipa/rkisp1/algorithms/awb.h | 2 - src/ipa/rpi/controller/rpi/agc_channel.cpp | 10 ++- src/libcamera/pipeline/ipu3/ipu3.cpp | 12 ++- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 13 ++- src/libcamera/pipeline/simple/simple.cpp | 8 +- src/libcamera/sensor/camera_sensor.cpp | 13 +++ src/libcamera/sensor/camera_sensor_legacy.cpp | 33 ++++++++ .../sensor/camera_sensor_properties.cpp | 79 +++++++++++++++++++ 17 files changed, 267 insertions(+), 72 deletions(-) create mode 100644 src/ipa/libipa/colours.cpp create mode 100644 src/ipa/libipa/colours.h