From patchwork Thu Nov 7 10:25:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Scally X-Patchwork-Id: 21827 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 DF198BDB13 for ; Thu, 7 Nov 2024 10:25:30 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E70BA65474; Thu, 7 Nov 2024 11:25:28 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="h2NbqGqg"; 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 7B64960363 for ; Thu, 7 Nov 2024 11:25:24 +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 51E355B3; Thu, 7 Nov 2024 11:25:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1730975115; bh=B7ELfe5jHXOuDGYvng2ef9fQb7xfg1qFMkj8mpd8HHM=; h=From:To:Cc:Subject:Date:From; b=h2NbqGqgi8AAUiNuKAI9l1OHLUj7S9bieQnetXlaOyzVKPt8Ly+LMRqF6A8SEXMgg N84W3ZnVwtvsgwodNBoZcyWk/rfePV9YQ5b5L3hO0UNiUOWbin3EOjNo/z/a4ebODz GH+7oPrPbSa7EVTxsnKswLeFaBT4XzCp2tXPQbC8= From: Daniel Scally To: libcamera-devel@lists.libcamera.org Cc: mike.rudenko@gmail.com, Daniel Scally Subject: [PATCH v2 0/6] Centralise common functions in IPA modules Date: Thu, 7 Nov 2024 10:25:02 +0000 Message-Id: <20241107102508.48322-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 miscellaneous 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/helpers.cpp | 77 ++++++++ src/ipa/libipa/helpers.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 | 33 ++++ .../sensor/camera_sensor_properties.cpp | 167 ++++++++++++++++++ 16 files changed, 342 insertions(+), 72 deletions(-) create mode 100644 src/ipa/libipa/helpers.cpp create mode 100644 src/ipa/libipa/helpers.h