From patchwork Wed Apr 26 13:10:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 18552 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 B7019BDCBD for ; Wed, 26 Apr 2023 13:13:19 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 56F01627F3; Wed, 26 Apr 2023 15:13:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1682514799; bh=Jyxinqtrg7A2JprM3fFwZZUqheTHCrjiVnEKJvYDb5Q=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=QnvhB1kpSH7hF9DouJVzktGTzHfJ+El3wHjYXOlPoojRypvJ0cJtwDGZBEar+xEzH QUXQ2lMXU/qOQW4P32CoVfSyjQ7CgZCcpj7Wqhu7OkqnY3x4wnE31vikS1/gBYVC31 2LLuhlVAUBJ2eG8f4wUG2Omoc8m4OTyfcN/Sg6gpHKCsWuf5OB2uRutdqIvhcQwUi8 FxAOuGx98rcEcjUZWL8nqdtfXTV02EgG9LyP1YXH2u5sgXw6zmFus7F6boIu+aAhK6 31RYTH7wzwunemUcTzPS30o9MVC/r/51nECezrdZagp/FlpReCAkihv2B+MHQss/GD Dvcru/3nMh5EQ== Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id BB400627EA for ; Wed, 26 Apr 2023 15:13:15 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="iglKZ3ZP"; dkim-atps=neutral Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-2f46348728eso4340367f8f.3 for ; Wed, 26 Apr 2023 06:13:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1682514795; x=1685106795; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PJ+IkmiZXDc1Kgr01RThPI7WHOWq+rDuJQy3cVcYU7k=; b=iglKZ3ZP0UGTz14bxsCJxeLP7TKmjDfEz/hKP1gCI6HTxjRFUIESNArYUeIB27arB1 ax0ohV65fpPFHmuH7Xk2/uuHHRd8Z3C3HjFhAUIjrwUqv6npk2ZVB7xgfUc1rcWa5S+4 KKvO+KDiKsKf+aQyWVrlVx/YmiGWVX4XXSOLO7jule10AjE7CJxK5aL0Ec2JrrJQq6VW rTuqaYrnAxjQiRu+8VhS4wg2bcBXayzQQjiUK/xTZ1/agcwcOwk+iuQBGq7fIGPK6xOk +34P6dRSXW+x1M6MRExSxq0vqBvexPb7Z8e4zvD8G7/wumI5DntBq+2uhGuVbxDVJdSE uqYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682514795; x=1685106795; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PJ+IkmiZXDc1Kgr01RThPI7WHOWq+rDuJQy3cVcYU7k=; b=Rg1lk9oBsx6D7q9Xus7X+jCyKJwbgqWFqI40WnGxIHhquJrQiGV56CSqVf6OqtzH66 nFcqRe8pM81Ms86DQCQ2njGPUJx0ToIy5ZhW4z2iEXDrNpoasYp9tzrJUPYY3n0jwnZY Fn3z16BzbbdrN7wkYsVqJaD19BHphQWHYJ8zy2qvBgFYFWkBP7pHnOL1IUIjxK60oR6e uRi5DWqZTtt06K47mlmtBrjMU3sVrC+zgylWO2rII69pCe2mzgexDcRnwGKVuitdK7ZL NsgFuNA/4rfUB9rPtGi7esLplKjUmWy4hM+vx3L0ecBMP/CxeYGBRQR8z8zKdyCRIz09 UVIQ== X-Gm-Message-State: AAQBX9ddZu7CVCY9/KvdjEvma/z9lktsrQ1f0zHaFTddhEq20lLfmVLc BYBvfW9IC+E5y8HBNY8zHnRTSgIwAVK8/vPcPH22Pg== X-Google-Smtp-Source: AKy350bKMKr7FqtRNVZ6IoktqIpr3Dak5ZL2FiJLIOZRx0ex0IKQh3PCIpd8URklDaHW7+c8fGfhHA== X-Received: by 2002:adf:eac5:0:b0:303:c151:8e69 with SMTP id o5-20020adfeac5000000b00303c1518e69mr11982324wrn.40.1682514794494; Wed, 26 Apr 2023 06:13:14 -0700 (PDT) Received: from localhost.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id k5-20020adff5c5000000b002f103ca90cdsm15780949wrp.101.2023.04.26.06.13.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Apr 2023 06:13:13 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Wed, 26 Apr 2023 14:10:48 +0100 Message-Id: <20230426131057.21550-5-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230426131057.21550-1-naush@raspberrypi.com> References: <20230426131057.21550-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 04/13] ipa: raspberrypi: Refactor and move IPA code 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: , X-Patchwork-Original-From: Naushir Patuck via libcamera-devel From: Naushir Patuck Reply-To: Naushir Patuck Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Split the Raspberry Pi IPA code into common and VC4/BCM2835 specific file structures. The common code files now live in src/ipa/rpi/{cam_helper,controller}/ and the vc4 specific files in src/ipa/rpi/vc4/. To build the IPA, the meson configuration option to select the Raspberry Pi IPA has now changed from "raspberrypi" to "rpi/vc4": meson setup build --Dipas=rpi/vc4 With this change, the camera tuning files are now installed under share/libcamera/ipa/rpi/vc4/ Signed-off-by: Naushir Patuck Reviewed-by: Jacopo Mondi --- Documentation/environment_variables.rst | 2 +- meson_options.txt | 2 +- src/ipa/meson.build | 10 +++ src/ipa/raspberrypi/meson.build | 66 ------------------- src/ipa/{raspberrypi => rpi}/README.md | 0 .../cam_helper}/cam_helper.cpp | 0 .../cam_helper}/cam_helper.h | 2 +- .../cam_helper}/cam_helper_imx219.cpp | 0 .../cam_helper}/cam_helper_imx290.cpp | 0 .../cam_helper}/cam_helper_imx296.cpp | 0 .../cam_helper}/cam_helper_imx477.cpp | 0 .../cam_helper}/cam_helper_imx519.cpp | 0 .../cam_helper}/cam_helper_imx708.cpp | 0 .../cam_helper}/cam_helper_ov5647.cpp | 0 .../cam_helper}/cam_helper_ov9281.cpp | 0 .../cam_helper}/md_parser.h | 0 .../cam_helper}/md_parser_smia.cpp | 0 src/ipa/rpi/cam_helper/meson.build | 14 ++++ .../controller/af_algorithm.h | 0 .../controller/af_status.h | 0 .../controller/agc_algorithm.h | 0 .../controller/agc_status.h | 0 .../controller/algorithm.cpp | 0 .../controller/algorithm.h | 0 .../controller/alsc_status.h | 0 .../controller/awb_algorithm.h | 0 .../controller/awb_status.h | 0 .../controller/black_level_status.h | 0 .../controller/camera_mode.h | 0 .../controller/ccm_algorithm.h | 0 .../controller/ccm_status.h | 0 .../controller/contrast_algorithm.h | 0 .../controller/contrast_status.h | 0 .../controller/controller.cpp | 0 .../controller/controller.h | 0 .../controller/denoise_algorithm.h | 0 .../controller/denoise_status.h | 0 .../controller/device_status.cpp | 0 .../controller/device_status.h | 0 .../controller/dpc_status.h | 0 .../controller/geq_status.h | 0 .../controller/histogram.cpp | 0 .../controller/histogram.h | 0 .../controller/lux_status.h | 0 src/ipa/rpi/controller/meson.build | 22 +++++++ .../controller/metadata.h | 0 .../controller/noise_status.h | 0 .../controller/pdaf_data.h | 0 .../{raspberrypi => rpi}/controller/pwl.cpp | 0 src/ipa/{raspberrypi => rpi}/controller/pwl.h | 0 .../controller/region_stats.h | 0 .../controller/rpi/af.cpp | 0 .../{raspberrypi => rpi}/controller/rpi/af.h | 0 .../controller/rpi/agc.cpp | 0 .../{raspberrypi => rpi}/controller/rpi/agc.h | 0 .../controller/rpi/alsc.cpp | 0 .../controller/rpi/alsc.h | 0 .../controller/rpi/awb.cpp | 0 .../{raspberrypi => rpi}/controller/rpi/awb.h | 0 .../controller/rpi/black_level.cpp | 0 .../controller/rpi/black_level.h | 0 .../controller/rpi/ccm.cpp | 0 .../{raspberrypi => rpi}/controller/rpi/ccm.h | 0 .../controller/rpi/contrast.cpp | 0 .../controller/rpi/contrast.h | 0 .../controller/rpi/dpc.cpp | 0 .../{raspberrypi => rpi}/controller/rpi/dpc.h | 0 .../controller/rpi/focus.h | 0 .../controller/rpi/geq.cpp | 0 .../{raspberrypi => rpi}/controller/rpi/geq.h | 0 .../controller/rpi/lux.cpp | 0 .../{raspberrypi => rpi}/controller/rpi/lux.h | 0 .../controller/rpi/noise.cpp | 0 .../controller/rpi/noise.h | 0 .../controller/rpi/sdn.cpp | 0 .../{raspberrypi => rpi}/controller/rpi/sdn.h | 0 .../controller/rpi/sharpen.cpp | 0 .../controller/rpi/sharpen.h | 0 .../controller/sharpen_algorithm.h | 0 .../controller/sharpen_status.h | 0 .../controller}/statistics.h | 0 .../{raspberrypi => rpi/vc4}/data/imx219.json | 0 .../vc4}/data/imx219_noir.json | 0 .../{raspberrypi => rpi/vc4}/data/imx290.json | 0 .../{raspberrypi => rpi/vc4}/data/imx296.json | 0 .../vc4}/data/imx296_mono.json | 0 .../{raspberrypi => rpi/vc4}/data/imx378.json | 0 .../{raspberrypi => rpi/vc4}/data/imx477.json | 0 .../vc4}/data/imx477_noir.json | 0 .../vc4}/data/imx477_scientific.json | 0 .../vc4}/data/imx477_v1.json | 0 .../{raspberrypi => rpi/vc4}/data/imx519.json | 0 .../{raspberrypi => rpi/vc4}/data/imx708.json | 0 .../vc4}/data/imx708_noir.json | 0 .../vc4}/data/imx708_wide.json | 0 .../vc4}/data/imx708_wide_noir.json | 0 .../{raspberrypi => rpi/vc4}/data/meson.build | 2 +- .../{raspberrypi => rpi/vc4}/data/ov5647.json | 0 .../vc4}/data/ov5647_noir.json | 0 .../vc4}/data/ov9281_mono.json | 0 .../vc4}/data/se327m12.json | 0 .../vc4}/data/uncalibrated.json | 0 src/ipa/rpi/vc4/meson.build | 40 +++++++++++ .../{raspberrypi => rpi/vc4}/raspberrypi.cpp | 48 +++++++------- .../pipeline/rpi/vc4/raspberrypi.cpp | 2 +- 105 files changed, 115 insertions(+), 95 deletions(-) delete mode 100644 src/ipa/raspberrypi/meson.build rename src/ipa/{raspberrypi => rpi}/README.md (100%) rename src/ipa/{raspberrypi => rpi/cam_helper}/cam_helper.cpp (100%) rename src/ipa/{raspberrypi => rpi/cam_helper}/cam_helper.h (99%) rename src/ipa/{raspberrypi => rpi/cam_helper}/cam_helper_imx219.cpp (100%) rename src/ipa/{raspberrypi => rpi/cam_helper}/cam_helper_imx290.cpp (100%) rename src/ipa/{raspberrypi => rpi/cam_helper}/cam_helper_imx296.cpp (100%) rename src/ipa/{raspberrypi => rpi/cam_helper}/cam_helper_imx477.cpp (100%) rename src/ipa/{raspberrypi => rpi/cam_helper}/cam_helper_imx519.cpp (100%) rename src/ipa/{raspberrypi => rpi/cam_helper}/cam_helper_imx708.cpp (100%) rename src/ipa/{raspberrypi => rpi/cam_helper}/cam_helper_ov5647.cpp (100%) rename src/ipa/{raspberrypi => rpi/cam_helper}/cam_helper_ov9281.cpp (100%) rename src/ipa/{raspberrypi => rpi/cam_helper}/md_parser.h (100%) rename src/ipa/{raspberrypi => rpi/cam_helper}/md_parser_smia.cpp (100%) create mode 100644 src/ipa/rpi/cam_helper/meson.build rename src/ipa/{raspberrypi => rpi}/controller/af_algorithm.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/af_status.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/agc_algorithm.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/agc_status.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/algorithm.cpp (100%) rename src/ipa/{raspberrypi => rpi}/controller/algorithm.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/alsc_status.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/awb_algorithm.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/awb_status.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/black_level_status.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/camera_mode.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/ccm_algorithm.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/ccm_status.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/contrast_algorithm.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/contrast_status.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/controller.cpp (100%) rename src/ipa/{raspberrypi => rpi}/controller/controller.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/denoise_algorithm.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/denoise_status.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/device_status.cpp (100%) rename src/ipa/{raspberrypi => rpi}/controller/device_status.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/dpc_status.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/geq_status.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/histogram.cpp (100%) rename src/ipa/{raspberrypi => rpi}/controller/histogram.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/lux_status.h (100%) create mode 100644 src/ipa/rpi/controller/meson.build rename src/ipa/{raspberrypi => rpi}/controller/metadata.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/noise_status.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/pdaf_data.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/pwl.cpp (100%) rename src/ipa/{raspberrypi => rpi}/controller/pwl.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/region_stats.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/af.cpp (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/af.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/agc.cpp (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/agc.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/alsc.cpp (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/alsc.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/awb.cpp (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/awb.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/black_level.cpp (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/black_level.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/ccm.cpp (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/ccm.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/contrast.cpp (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/contrast.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/dpc.cpp (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/dpc.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/focus.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/geq.cpp (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/geq.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/lux.cpp (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/lux.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/noise.cpp (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/noise.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/sdn.cpp (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/sdn.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/sharpen.cpp (100%) rename src/ipa/{raspberrypi => rpi}/controller/rpi/sharpen.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/sharpen_algorithm.h (100%) rename src/ipa/{raspberrypi => rpi}/controller/sharpen_status.h (100%) rename src/ipa/{raspberrypi => rpi/controller}/statistics.h (100%) rename src/ipa/{raspberrypi => rpi/vc4}/data/imx219.json (100%) rename src/ipa/{raspberrypi => rpi/vc4}/data/imx219_noir.json (100%) rename src/ipa/{raspberrypi => rpi/vc4}/data/imx290.json (100%) rename src/ipa/{raspberrypi => rpi/vc4}/data/imx296.json (100%) rename src/ipa/{raspberrypi => rpi/vc4}/data/imx296_mono.json (100%) rename src/ipa/{raspberrypi => rpi/vc4}/data/imx378.json (100%) rename src/ipa/{raspberrypi => rpi/vc4}/data/imx477.json (100%) rename src/ipa/{raspberrypi => rpi/vc4}/data/imx477_noir.json (100%) rename src/ipa/{raspberrypi => rpi/vc4}/data/imx477_scientific.json (100%) rename src/ipa/{raspberrypi => rpi/vc4}/data/imx477_v1.json (100%) rename src/ipa/{raspberrypi => rpi/vc4}/data/imx519.json (100%) rename src/ipa/{raspberrypi => rpi/vc4}/data/imx708.json (100%) rename src/ipa/{raspberrypi => rpi/vc4}/data/imx708_noir.json (100%) rename src/ipa/{raspberrypi => rpi/vc4}/data/imx708_wide.json (100%) rename src/ipa/{raspberrypi => rpi/vc4}/data/imx708_wide_noir.json (100%) rename src/ipa/{raspberrypi => rpi/vc4}/data/meson.build (89%) rename src/ipa/{raspberrypi => rpi/vc4}/data/ov5647.json (100%) rename src/ipa/{raspberrypi => rpi/vc4}/data/ov5647_noir.json (100%) rename src/ipa/{raspberrypi => rpi/vc4}/data/ov9281_mono.json (100%) rename src/ipa/{raspberrypi => rpi/vc4}/data/se327m12.json (100%) rename src/ipa/{raspberrypi => rpi/vc4}/data/uncalibrated.json (100%) create mode 100644 src/ipa/rpi/vc4/meson.build rename src/ipa/{raspberrypi => rpi/vc4}/raspberrypi.cpp (98%) diff --git a/Documentation/environment_variables.rst b/Documentation/environment_variables.rst index 4bf38b877897..888707785ee1 100644 --- a/Documentation/environment_variables.rst +++ b/Documentation/environment_variables.rst @@ -143,7 +143,7 @@ contain tuning parameters for the algorithms, in JSON format. The ``LIBCAMERA_IPA_CONFIG_PATH`` variable can be used to specify custom storage locations to search for those configuration files. -`Examples `__ +`Examples `__ IPA module ~~~~~~~~~~ diff --git a/meson_options.txt b/meson_options.txt index e1f4c205aa94..596f813ea5e5 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -27,7 +27,7 @@ option('gstreamer', option('ipas', type : 'array', - choices : ['ipu3', 'raspberrypi', 'rkisp1', 'vimc'], + choices : ['ipu3', 'rpi/vc4', 'rkisp1', 'vimc'], description : 'Select which IPA modules to build') option('lc-compliance', diff --git a/src/ipa/meson.build b/src/ipa/meson.build index 76ad5b445601..10d3b44ca7b6 100644 --- a/src/ipa/meson.build +++ b/src/ipa/meson.build @@ -37,6 +37,16 @@ endif enabled_ipa_modules = [] +# If the Raspberry Pi VC4 IPA is enabled, ensure we include the rpi/cam_helper +# and rpi/controller subdirectories in the build. +# +# This is done here and not within rpi/vc4/meson.build as meson does not +# allow the subdir command to traverse up the directory tree. +if pipelines.contains('rpi/vc4') + subdir('rpi/cam_helper') + subdir('rpi/controller') +endif + # The ipa-sign-install.sh script which uses the ipa_names variable will itself # prepend MESON_INSTALL_DESTDIR_PREFIX to each ipa module name, therefore we # must not include the prefix string here. diff --git a/src/ipa/raspberrypi/meson.build b/src/ipa/raspberrypi/meson.build deleted file mode 100644 index de78cbd80f9c..000000000000 --- a/src/ipa/raspberrypi/meson.build +++ /dev/null @@ -1,66 +0,0 @@ -# SPDX-License-Identifier: CC0-1.0 - -ipa_name = 'ipa_rpi' - -rpi_ipa_deps = [ - libcamera_private, - libatomic, -] - -rpi_ipa_includes = [ - ipa_includes, - libipa_includes, - include_directories('controller') -] - -rpi_ipa_sources = files([ - 'raspberrypi.cpp', - 'md_parser_smia.cpp', - 'cam_helper.cpp', - 'cam_helper_ov5647.cpp', - 'cam_helper_imx219.cpp', - 'cam_helper_imx290.cpp', - 'cam_helper_imx296.cpp', - 'cam_helper_imx477.cpp', - 'cam_helper_imx519.cpp', - 'cam_helper_imx708.cpp', - 'cam_helper_ov9281.cpp', - 'controller/controller.cpp', - 'controller/histogram.cpp', - 'controller/algorithm.cpp', - 'controller/rpi/af.cpp', - 'controller/rpi/alsc.cpp', - 'controller/rpi/awb.cpp', - 'controller/rpi/sharpen.cpp', - 'controller/rpi/black_level.cpp', - 'controller/rpi/geq.cpp', - 'controller/rpi/noise.cpp', - 'controller/rpi/lux.cpp', - 'controller/rpi/agc.cpp', - 'controller/rpi/dpc.cpp', - 'controller/rpi/ccm.cpp', - 'controller/rpi/contrast.cpp', - 'controller/rpi/sdn.cpp', - 'controller/pwl.cpp', - 'controller/device_status.cpp', -]) - -mod = shared_module(ipa_name, - [rpi_ipa_sources, libcamera_generated_ipa_headers], - name_prefix : '', - include_directories : rpi_ipa_includes, - dependencies : rpi_ipa_deps, - link_with : libipa, - install : true, - install_dir : ipa_install_dir) - -if ipa_sign_module - custom_target(ipa_name + '.so.sign', - input : mod, - output : ipa_name + '.so.sign', - command : [ipa_sign, ipa_priv_key, '@INPUT@', '@OUTPUT@'], - install : false, - build_by_default : true) -endif - -subdir('data') diff --git a/src/ipa/raspberrypi/README.md b/src/ipa/rpi/README.md similarity index 100% rename from src/ipa/raspberrypi/README.md rename to src/ipa/rpi/README.md diff --git a/src/ipa/raspberrypi/cam_helper.cpp b/src/ipa/rpi/cam_helper/cam_helper.cpp similarity index 100% rename from src/ipa/raspberrypi/cam_helper.cpp rename to src/ipa/rpi/cam_helper/cam_helper.cpp diff --git a/src/ipa/raspberrypi/cam_helper.h b/src/ipa/rpi/cam_helper/cam_helper.h similarity index 99% rename from src/ipa/raspberrypi/cam_helper.h rename to src/ipa/rpi/cam_helper/cam_helper.h index b3f8c9803094..58a4b202d5a8 100644 --- a/src/ipa/raspberrypi/cam_helper.h +++ b/src/ipa/rpi/cam_helper/cam_helper.h @@ -13,7 +13,7 @@ #include #include -#include "camera_mode.h" +#include "controller/camera_mode.h" #include "controller/controller.h" #include "controller/metadata.h" #include "md_parser.h" diff --git a/src/ipa/raspberrypi/cam_helper_imx219.cpp b/src/ipa/rpi/cam_helper/cam_helper_imx219.cpp similarity index 100% rename from src/ipa/raspberrypi/cam_helper_imx219.cpp rename to src/ipa/rpi/cam_helper/cam_helper_imx219.cpp diff --git a/src/ipa/raspberrypi/cam_helper_imx290.cpp b/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp similarity index 100% rename from src/ipa/raspberrypi/cam_helper_imx290.cpp rename to src/ipa/rpi/cam_helper/cam_helper_imx290.cpp diff --git a/src/ipa/raspberrypi/cam_helper_imx296.cpp b/src/ipa/rpi/cam_helper/cam_helper_imx296.cpp similarity index 100% rename from src/ipa/raspberrypi/cam_helper_imx296.cpp rename to src/ipa/rpi/cam_helper/cam_helper_imx296.cpp diff --git a/src/ipa/raspberrypi/cam_helper_imx477.cpp b/src/ipa/rpi/cam_helper/cam_helper_imx477.cpp similarity index 100% rename from src/ipa/raspberrypi/cam_helper_imx477.cpp rename to src/ipa/rpi/cam_helper/cam_helper_imx477.cpp diff --git a/src/ipa/raspberrypi/cam_helper_imx519.cpp b/src/ipa/rpi/cam_helper/cam_helper_imx519.cpp similarity index 100% rename from src/ipa/raspberrypi/cam_helper_imx519.cpp rename to src/ipa/rpi/cam_helper/cam_helper_imx519.cpp diff --git a/src/ipa/raspberrypi/cam_helper_imx708.cpp b/src/ipa/rpi/cam_helper/cam_helper_imx708.cpp similarity index 100% rename from src/ipa/raspberrypi/cam_helper_imx708.cpp rename to src/ipa/rpi/cam_helper/cam_helper_imx708.cpp diff --git a/src/ipa/raspberrypi/cam_helper_ov5647.cpp b/src/ipa/rpi/cam_helper/cam_helper_ov5647.cpp similarity index 100% rename from src/ipa/raspberrypi/cam_helper_ov5647.cpp rename to src/ipa/rpi/cam_helper/cam_helper_ov5647.cpp diff --git a/src/ipa/raspberrypi/cam_helper_ov9281.cpp b/src/ipa/rpi/cam_helper/cam_helper_ov9281.cpp similarity index 100% rename from src/ipa/raspberrypi/cam_helper_ov9281.cpp rename to src/ipa/rpi/cam_helper/cam_helper_ov9281.cpp diff --git a/src/ipa/raspberrypi/md_parser.h b/src/ipa/rpi/cam_helper/md_parser.h similarity index 100% rename from src/ipa/raspberrypi/md_parser.h rename to src/ipa/rpi/cam_helper/md_parser.h diff --git a/src/ipa/raspberrypi/md_parser_smia.cpp b/src/ipa/rpi/cam_helper/md_parser_smia.cpp similarity index 100% rename from src/ipa/raspberrypi/md_parser_smia.cpp rename to src/ipa/rpi/cam_helper/md_parser_smia.cpp diff --git a/src/ipa/rpi/cam_helper/meson.build b/src/ipa/rpi/cam_helper/meson.build new file mode 100644 index 000000000000..aa42ae91f69d --- /dev/null +++ b/src/ipa/rpi/cam_helper/meson.build @@ -0,0 +1,14 @@ +# SPDX-License-Identifier: CC0-1.0 + +rpi_ipa_cam_helper_sources = files([ + 'cam_helper.cpp', + 'cam_helper_ov5647.cpp', + 'cam_helper_imx219.cpp', + 'cam_helper_imx290.cpp', + 'cam_helper_imx296.cpp', + 'cam_helper_imx477.cpp', + 'cam_helper_imx519.cpp', + 'cam_helper_imx708.cpp', + 'cam_helper_ov9281.cpp', + 'md_parser_smia.cpp', +]) diff --git a/src/ipa/raspberrypi/controller/af_algorithm.h b/src/ipa/rpi/controller/af_algorithm.h similarity index 100% rename from src/ipa/raspberrypi/controller/af_algorithm.h rename to src/ipa/rpi/controller/af_algorithm.h diff --git a/src/ipa/raspberrypi/controller/af_status.h b/src/ipa/rpi/controller/af_status.h similarity index 100% rename from src/ipa/raspberrypi/controller/af_status.h rename to src/ipa/rpi/controller/af_status.h diff --git a/src/ipa/raspberrypi/controller/agc_algorithm.h b/src/ipa/rpi/controller/agc_algorithm.h similarity index 100% rename from src/ipa/raspberrypi/controller/agc_algorithm.h rename to src/ipa/rpi/controller/agc_algorithm.h diff --git a/src/ipa/raspberrypi/controller/agc_status.h b/src/ipa/rpi/controller/agc_status.h similarity index 100% rename from src/ipa/raspberrypi/controller/agc_status.h rename to src/ipa/rpi/controller/agc_status.h diff --git a/src/ipa/raspberrypi/controller/algorithm.cpp b/src/ipa/rpi/controller/algorithm.cpp similarity index 100% rename from src/ipa/raspberrypi/controller/algorithm.cpp rename to src/ipa/rpi/controller/algorithm.cpp diff --git a/src/ipa/raspberrypi/controller/algorithm.h b/src/ipa/rpi/controller/algorithm.h similarity index 100% rename from src/ipa/raspberrypi/controller/algorithm.h rename to src/ipa/rpi/controller/algorithm.h diff --git a/src/ipa/raspberrypi/controller/alsc_status.h b/src/ipa/rpi/controller/alsc_status.h similarity index 100% rename from src/ipa/raspberrypi/controller/alsc_status.h rename to src/ipa/rpi/controller/alsc_status.h diff --git a/src/ipa/raspberrypi/controller/awb_algorithm.h b/src/ipa/rpi/controller/awb_algorithm.h similarity index 100% rename from src/ipa/raspberrypi/controller/awb_algorithm.h rename to src/ipa/rpi/controller/awb_algorithm.h diff --git a/src/ipa/raspberrypi/controller/awb_status.h b/src/ipa/rpi/controller/awb_status.h similarity index 100% rename from src/ipa/raspberrypi/controller/awb_status.h rename to src/ipa/rpi/controller/awb_status.h diff --git a/src/ipa/raspberrypi/controller/black_level_status.h b/src/ipa/rpi/controller/black_level_status.h similarity index 100% rename from src/ipa/raspberrypi/controller/black_level_status.h rename to src/ipa/rpi/controller/black_level_status.h diff --git a/src/ipa/raspberrypi/controller/camera_mode.h b/src/ipa/rpi/controller/camera_mode.h similarity index 100% rename from src/ipa/raspberrypi/controller/camera_mode.h rename to src/ipa/rpi/controller/camera_mode.h diff --git a/src/ipa/raspberrypi/controller/ccm_algorithm.h b/src/ipa/rpi/controller/ccm_algorithm.h similarity index 100% rename from src/ipa/raspberrypi/controller/ccm_algorithm.h rename to src/ipa/rpi/controller/ccm_algorithm.h diff --git a/src/ipa/raspberrypi/controller/ccm_status.h b/src/ipa/rpi/controller/ccm_status.h similarity index 100% rename from src/ipa/raspberrypi/controller/ccm_status.h rename to src/ipa/rpi/controller/ccm_status.h diff --git a/src/ipa/raspberrypi/controller/contrast_algorithm.h b/src/ipa/rpi/controller/contrast_algorithm.h similarity index 100% rename from src/ipa/raspberrypi/controller/contrast_algorithm.h rename to src/ipa/rpi/controller/contrast_algorithm.h diff --git a/src/ipa/raspberrypi/controller/contrast_status.h b/src/ipa/rpi/controller/contrast_status.h similarity index 100% rename from src/ipa/raspberrypi/controller/contrast_status.h rename to src/ipa/rpi/controller/contrast_status.h diff --git a/src/ipa/raspberrypi/controller/controller.cpp b/src/ipa/rpi/controller/controller.cpp similarity index 100% rename from src/ipa/raspberrypi/controller/controller.cpp rename to src/ipa/rpi/controller/controller.cpp diff --git a/src/ipa/raspberrypi/controller/controller.h b/src/ipa/rpi/controller/controller.h similarity index 100% rename from src/ipa/raspberrypi/controller/controller.h rename to src/ipa/rpi/controller/controller.h diff --git a/src/ipa/raspberrypi/controller/denoise_algorithm.h b/src/ipa/rpi/controller/denoise_algorithm.h similarity index 100% rename from src/ipa/raspberrypi/controller/denoise_algorithm.h rename to src/ipa/rpi/controller/denoise_algorithm.h diff --git a/src/ipa/raspberrypi/controller/denoise_status.h b/src/ipa/rpi/controller/denoise_status.h similarity index 100% rename from src/ipa/raspberrypi/controller/denoise_status.h rename to src/ipa/rpi/controller/denoise_status.h diff --git a/src/ipa/raspberrypi/controller/device_status.cpp b/src/ipa/rpi/controller/device_status.cpp similarity index 100% rename from src/ipa/raspberrypi/controller/device_status.cpp rename to src/ipa/rpi/controller/device_status.cpp diff --git a/src/ipa/raspberrypi/controller/device_status.h b/src/ipa/rpi/controller/device_status.h similarity index 100% rename from src/ipa/raspberrypi/controller/device_status.h rename to src/ipa/rpi/controller/device_status.h diff --git a/src/ipa/raspberrypi/controller/dpc_status.h b/src/ipa/rpi/controller/dpc_status.h similarity index 100% rename from src/ipa/raspberrypi/controller/dpc_status.h rename to src/ipa/rpi/controller/dpc_status.h diff --git a/src/ipa/raspberrypi/controller/geq_status.h b/src/ipa/rpi/controller/geq_status.h similarity index 100% rename from src/ipa/raspberrypi/controller/geq_status.h rename to src/ipa/rpi/controller/geq_status.h diff --git a/src/ipa/raspberrypi/controller/histogram.cpp b/src/ipa/rpi/controller/histogram.cpp similarity index 100% rename from src/ipa/raspberrypi/controller/histogram.cpp rename to src/ipa/rpi/controller/histogram.cpp diff --git a/src/ipa/raspberrypi/controller/histogram.h b/src/ipa/rpi/controller/histogram.h similarity index 100% rename from src/ipa/raspberrypi/controller/histogram.h rename to src/ipa/rpi/controller/histogram.h diff --git a/src/ipa/raspberrypi/controller/lux_status.h b/src/ipa/rpi/controller/lux_status.h similarity index 100% rename from src/ipa/raspberrypi/controller/lux_status.h rename to src/ipa/rpi/controller/lux_status.h diff --git a/src/ipa/rpi/controller/meson.build b/src/ipa/rpi/controller/meson.build new file mode 100644 index 000000000000..90a67412444e --- /dev/null +++ b/src/ipa/rpi/controller/meson.build @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: CC0-1.0 + +rpi_ipa_controller_sources = files([ + 'algorithm.cpp', + 'controller.cpp', + 'device_status.cpp', + 'histogram.cpp', + 'pwl.cpp', + 'rpi/af.cpp', + 'rpi/agc.cpp', + 'rpi/alsc.cpp', + 'rpi/awb.cpp', + 'rpi/black_level.cpp', + 'rpi/ccm.cpp', + 'rpi/contrast.cpp', + 'rpi/dpc.cpp', + 'rpi/geq.cpp', + 'rpi/lux.cpp', + 'rpi/noise.cpp', + 'rpi/sdn.cpp', + 'rpi/sharpen.cpp', +]) diff --git a/src/ipa/raspberrypi/controller/metadata.h b/src/ipa/rpi/controller/metadata.h similarity index 100% rename from src/ipa/raspberrypi/controller/metadata.h rename to src/ipa/rpi/controller/metadata.h diff --git a/src/ipa/raspberrypi/controller/noise_status.h b/src/ipa/rpi/controller/noise_status.h similarity index 100% rename from src/ipa/raspberrypi/controller/noise_status.h rename to src/ipa/rpi/controller/noise_status.h diff --git a/src/ipa/raspberrypi/controller/pdaf_data.h b/src/ipa/rpi/controller/pdaf_data.h similarity index 100% rename from src/ipa/raspberrypi/controller/pdaf_data.h rename to src/ipa/rpi/controller/pdaf_data.h diff --git a/src/ipa/raspberrypi/controller/pwl.cpp b/src/ipa/rpi/controller/pwl.cpp similarity index 100% rename from src/ipa/raspberrypi/controller/pwl.cpp rename to src/ipa/rpi/controller/pwl.cpp diff --git a/src/ipa/raspberrypi/controller/pwl.h b/src/ipa/rpi/controller/pwl.h similarity index 100% rename from src/ipa/raspberrypi/controller/pwl.h rename to src/ipa/rpi/controller/pwl.h diff --git a/src/ipa/raspberrypi/controller/region_stats.h b/src/ipa/rpi/controller/region_stats.h similarity index 100% rename from src/ipa/raspberrypi/controller/region_stats.h rename to src/ipa/rpi/controller/region_stats.h diff --git a/src/ipa/raspberrypi/controller/rpi/af.cpp b/src/ipa/rpi/controller/rpi/af.cpp similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/af.cpp rename to src/ipa/rpi/controller/rpi/af.cpp diff --git a/src/ipa/raspberrypi/controller/rpi/af.h b/src/ipa/rpi/controller/rpi/af.h similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/af.h rename to src/ipa/rpi/controller/rpi/af.h diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/rpi/controller/rpi/agc.cpp similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/agc.cpp rename to src/ipa/rpi/controller/rpi/agc.cpp diff --git a/src/ipa/raspberrypi/controller/rpi/agc.h b/src/ipa/rpi/controller/rpi/agc.h similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/agc.h rename to src/ipa/rpi/controller/rpi/agc.h diff --git a/src/ipa/raspberrypi/controller/rpi/alsc.cpp b/src/ipa/rpi/controller/rpi/alsc.cpp similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/alsc.cpp rename to src/ipa/rpi/controller/rpi/alsc.cpp diff --git a/src/ipa/raspberrypi/controller/rpi/alsc.h b/src/ipa/rpi/controller/rpi/alsc.h similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/alsc.h rename to src/ipa/rpi/controller/rpi/alsc.h diff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/rpi/controller/rpi/awb.cpp similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/awb.cpp rename to src/ipa/rpi/controller/rpi/awb.cpp diff --git a/src/ipa/raspberrypi/controller/rpi/awb.h b/src/ipa/rpi/controller/rpi/awb.h similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/awb.h rename to src/ipa/rpi/controller/rpi/awb.h diff --git a/src/ipa/raspberrypi/controller/rpi/black_level.cpp b/src/ipa/rpi/controller/rpi/black_level.cpp similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/black_level.cpp rename to src/ipa/rpi/controller/rpi/black_level.cpp diff --git a/src/ipa/raspberrypi/controller/rpi/black_level.h b/src/ipa/rpi/controller/rpi/black_level.h similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/black_level.h rename to src/ipa/rpi/controller/rpi/black_level.h diff --git a/src/ipa/raspberrypi/controller/rpi/ccm.cpp b/src/ipa/rpi/controller/rpi/ccm.cpp similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/ccm.cpp rename to src/ipa/rpi/controller/rpi/ccm.cpp diff --git a/src/ipa/raspberrypi/controller/rpi/ccm.h b/src/ipa/rpi/controller/rpi/ccm.h similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/ccm.h rename to src/ipa/rpi/controller/rpi/ccm.h diff --git a/src/ipa/raspberrypi/controller/rpi/contrast.cpp b/src/ipa/rpi/controller/rpi/contrast.cpp similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/contrast.cpp rename to src/ipa/rpi/controller/rpi/contrast.cpp diff --git a/src/ipa/raspberrypi/controller/rpi/contrast.h b/src/ipa/rpi/controller/rpi/contrast.h similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/contrast.h rename to src/ipa/rpi/controller/rpi/contrast.h diff --git a/src/ipa/raspberrypi/controller/rpi/dpc.cpp b/src/ipa/rpi/controller/rpi/dpc.cpp similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/dpc.cpp rename to src/ipa/rpi/controller/rpi/dpc.cpp diff --git a/src/ipa/raspberrypi/controller/rpi/dpc.h b/src/ipa/rpi/controller/rpi/dpc.h similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/dpc.h rename to src/ipa/rpi/controller/rpi/dpc.h diff --git a/src/ipa/raspberrypi/controller/rpi/focus.h b/src/ipa/rpi/controller/rpi/focus.h similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/focus.h rename to src/ipa/rpi/controller/rpi/focus.h diff --git a/src/ipa/raspberrypi/controller/rpi/geq.cpp b/src/ipa/rpi/controller/rpi/geq.cpp similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/geq.cpp rename to src/ipa/rpi/controller/rpi/geq.cpp diff --git a/src/ipa/raspberrypi/controller/rpi/geq.h b/src/ipa/rpi/controller/rpi/geq.h similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/geq.h rename to src/ipa/rpi/controller/rpi/geq.h diff --git a/src/ipa/raspberrypi/controller/rpi/lux.cpp b/src/ipa/rpi/controller/rpi/lux.cpp similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/lux.cpp rename to src/ipa/rpi/controller/rpi/lux.cpp diff --git a/src/ipa/raspberrypi/controller/rpi/lux.h b/src/ipa/rpi/controller/rpi/lux.h similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/lux.h rename to src/ipa/rpi/controller/rpi/lux.h diff --git a/src/ipa/raspberrypi/controller/rpi/noise.cpp b/src/ipa/rpi/controller/rpi/noise.cpp similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/noise.cpp rename to src/ipa/rpi/controller/rpi/noise.cpp diff --git a/src/ipa/raspberrypi/controller/rpi/noise.h b/src/ipa/rpi/controller/rpi/noise.h similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/noise.h rename to src/ipa/rpi/controller/rpi/noise.h diff --git a/src/ipa/raspberrypi/controller/rpi/sdn.cpp b/src/ipa/rpi/controller/rpi/sdn.cpp similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/sdn.cpp rename to src/ipa/rpi/controller/rpi/sdn.cpp diff --git a/src/ipa/raspberrypi/controller/rpi/sdn.h b/src/ipa/rpi/controller/rpi/sdn.h similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/sdn.h rename to src/ipa/rpi/controller/rpi/sdn.h diff --git a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp b/src/ipa/rpi/controller/rpi/sharpen.cpp similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/sharpen.cpp rename to src/ipa/rpi/controller/rpi/sharpen.cpp diff --git a/src/ipa/raspberrypi/controller/rpi/sharpen.h b/src/ipa/rpi/controller/rpi/sharpen.h similarity index 100% rename from src/ipa/raspberrypi/controller/rpi/sharpen.h rename to src/ipa/rpi/controller/rpi/sharpen.h diff --git a/src/ipa/raspberrypi/controller/sharpen_algorithm.h b/src/ipa/rpi/controller/sharpen_algorithm.h similarity index 100% rename from src/ipa/raspberrypi/controller/sharpen_algorithm.h rename to src/ipa/rpi/controller/sharpen_algorithm.h diff --git a/src/ipa/raspberrypi/controller/sharpen_status.h b/src/ipa/rpi/controller/sharpen_status.h similarity index 100% rename from src/ipa/raspberrypi/controller/sharpen_status.h rename to src/ipa/rpi/controller/sharpen_status.h diff --git a/src/ipa/raspberrypi/statistics.h b/src/ipa/rpi/controller/statistics.h similarity index 100% rename from src/ipa/raspberrypi/statistics.h rename to src/ipa/rpi/controller/statistics.h diff --git a/src/ipa/raspberrypi/data/imx219.json b/src/ipa/rpi/vc4/data/imx219.json similarity index 100% rename from src/ipa/raspberrypi/data/imx219.json rename to src/ipa/rpi/vc4/data/imx219.json diff --git a/src/ipa/raspberrypi/data/imx219_noir.json b/src/ipa/rpi/vc4/data/imx219_noir.json similarity index 100% rename from src/ipa/raspberrypi/data/imx219_noir.json rename to src/ipa/rpi/vc4/data/imx219_noir.json diff --git a/src/ipa/raspberrypi/data/imx290.json b/src/ipa/rpi/vc4/data/imx290.json similarity index 100% rename from src/ipa/raspberrypi/data/imx290.json rename to src/ipa/rpi/vc4/data/imx290.json diff --git a/src/ipa/raspberrypi/data/imx296.json b/src/ipa/rpi/vc4/data/imx296.json similarity index 100% rename from src/ipa/raspberrypi/data/imx296.json rename to src/ipa/rpi/vc4/data/imx296.json diff --git a/src/ipa/raspberrypi/data/imx296_mono.json b/src/ipa/rpi/vc4/data/imx296_mono.json similarity index 100% rename from src/ipa/raspberrypi/data/imx296_mono.json rename to src/ipa/rpi/vc4/data/imx296_mono.json diff --git a/src/ipa/raspberrypi/data/imx378.json b/src/ipa/rpi/vc4/data/imx378.json similarity index 100% rename from src/ipa/raspberrypi/data/imx378.json rename to src/ipa/rpi/vc4/data/imx378.json diff --git a/src/ipa/raspberrypi/data/imx477.json b/src/ipa/rpi/vc4/data/imx477.json similarity index 100% rename from src/ipa/raspberrypi/data/imx477.json rename to src/ipa/rpi/vc4/data/imx477.json diff --git a/src/ipa/raspberrypi/data/imx477_noir.json b/src/ipa/rpi/vc4/data/imx477_noir.json similarity index 100% rename from src/ipa/raspberrypi/data/imx477_noir.json rename to src/ipa/rpi/vc4/data/imx477_noir.json diff --git a/src/ipa/raspberrypi/data/imx477_scientific.json b/src/ipa/rpi/vc4/data/imx477_scientific.json similarity index 100% rename from src/ipa/raspberrypi/data/imx477_scientific.json rename to src/ipa/rpi/vc4/data/imx477_scientific.json diff --git a/src/ipa/raspberrypi/data/imx477_v1.json b/src/ipa/rpi/vc4/data/imx477_v1.json similarity index 100% rename from src/ipa/raspberrypi/data/imx477_v1.json rename to src/ipa/rpi/vc4/data/imx477_v1.json diff --git a/src/ipa/raspberrypi/data/imx519.json b/src/ipa/rpi/vc4/data/imx519.json similarity index 100% rename from src/ipa/raspberrypi/data/imx519.json rename to src/ipa/rpi/vc4/data/imx519.json diff --git a/src/ipa/raspberrypi/data/imx708.json b/src/ipa/rpi/vc4/data/imx708.json similarity index 100% rename from src/ipa/raspberrypi/data/imx708.json rename to src/ipa/rpi/vc4/data/imx708.json diff --git a/src/ipa/raspberrypi/data/imx708_noir.json b/src/ipa/rpi/vc4/data/imx708_noir.json similarity index 100% rename from src/ipa/raspberrypi/data/imx708_noir.json rename to src/ipa/rpi/vc4/data/imx708_noir.json diff --git a/src/ipa/raspberrypi/data/imx708_wide.json b/src/ipa/rpi/vc4/data/imx708_wide.json similarity index 100% rename from src/ipa/raspberrypi/data/imx708_wide.json rename to src/ipa/rpi/vc4/data/imx708_wide.json diff --git a/src/ipa/raspberrypi/data/imx708_wide_noir.json b/src/ipa/rpi/vc4/data/imx708_wide_noir.json similarity index 100% rename from src/ipa/raspberrypi/data/imx708_wide_noir.json rename to src/ipa/rpi/vc4/data/imx708_wide_noir.json diff --git a/src/ipa/raspberrypi/data/meson.build b/src/ipa/rpi/vc4/data/meson.build similarity index 89% rename from src/ipa/raspberrypi/data/meson.build rename to src/ipa/rpi/vc4/data/meson.build index b163a052f57c..327462fa2420 100644 --- a/src/ipa/raspberrypi/data/meson.build +++ b/src/ipa/rpi/vc4/data/meson.build @@ -23,4 +23,4 @@ conf_files = files([ ]) install_data(conf_files, - install_dir : ipa_data_dir / 'raspberrypi') + install_dir : ipa_data_dir / 'rpi/vc4') diff --git a/src/ipa/raspberrypi/data/ov5647.json b/src/ipa/rpi/vc4/data/ov5647.json similarity index 100% rename from src/ipa/raspberrypi/data/ov5647.json rename to src/ipa/rpi/vc4/data/ov5647.json diff --git a/src/ipa/raspberrypi/data/ov5647_noir.json b/src/ipa/rpi/vc4/data/ov5647_noir.json similarity index 100% rename from src/ipa/raspberrypi/data/ov5647_noir.json rename to src/ipa/rpi/vc4/data/ov5647_noir.json diff --git a/src/ipa/raspberrypi/data/ov9281_mono.json b/src/ipa/rpi/vc4/data/ov9281_mono.json similarity index 100% rename from src/ipa/raspberrypi/data/ov9281_mono.json rename to src/ipa/rpi/vc4/data/ov9281_mono.json diff --git a/src/ipa/raspberrypi/data/se327m12.json b/src/ipa/rpi/vc4/data/se327m12.json similarity index 100% rename from src/ipa/raspberrypi/data/se327m12.json rename to src/ipa/rpi/vc4/data/se327m12.json diff --git a/src/ipa/raspberrypi/data/uncalibrated.json b/src/ipa/rpi/vc4/data/uncalibrated.json similarity index 100% rename from src/ipa/raspberrypi/data/uncalibrated.json rename to src/ipa/rpi/vc4/data/uncalibrated.json diff --git a/src/ipa/rpi/vc4/meson.build b/src/ipa/rpi/vc4/meson.build new file mode 100644 index 000000000000..992d0f1ab5a7 --- /dev/null +++ b/src/ipa/rpi/vc4/meson.build @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: CC0-1.0 + +ipa_name = 'ipa_vc4' + +vc4_ipa_deps = [ + libcamera_private, + libatomic, +] + +vc4_ipa_includes = [ + ipa_includes, + libipa_includes, +] + +vc4_ipa_sources = files([ + 'raspberrypi.cpp', +]) + +vc4_ipa_includes += include_directories('..') +vc4_ipa_sources += [rpi_ipa_cam_helper_sources, rpi_ipa_controller_sources] + +mod = shared_module(ipa_name, + [vc4_ipa_sources, libcamera_generated_ipa_headers], + name_prefix : '', + include_directories : vc4_ipa_includes, + dependencies : vc4_ipa_deps, + link_with : libipa, + install : true, + install_dir : ipa_install_dir) + +if ipa_sign_module + custom_target(ipa_name + '.so.sign', + input : mod, + output : ipa_name + '.so.sign', + command : [ipa_sign, ipa_priv_key, '@INPUT@', '@OUTPUT@'], + install : false, + build_by_default : true) +endif + +subdir('data') diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/rpi/vc4/raspberrypi.cpp similarity index 98% rename from src/ipa/raspberrypi/raspberrypi.cpp rename to src/ipa/rpi/vc4/raspberrypi.cpp index 9c29fa9a5e5c..841635ccde2b 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/rpi/vc4/raspberrypi.cpp @@ -33,29 +33,29 @@ #include "libcamera/internal/mapped_framebuffer.h" -#include "af_algorithm.h" -#include "af_status.h" -#include "agc_algorithm.h" -#include "agc_status.h" -#include "alsc_status.h" -#include "awb_algorithm.h" -#include "awb_status.h" -#include "black_level_status.h" -#include "cam_helper.h" -#include "ccm_algorithm.h" -#include "ccm_status.h" -#include "contrast_algorithm.h" -#include "contrast_status.h" -#include "controller.h" -#include "denoise_algorithm.h" -#include "denoise_status.h" -#include "dpc_status.h" -#include "geq_status.h" -#include "lux_status.h" -#include "metadata.h" -#include "sharpen_algorithm.h" -#include "sharpen_status.h" -#include "statistics.h" +#include "cam_helper/cam_helper.h" +#include "controller/af_algorithm.h" +#include "controller/af_status.h" +#include "controller/agc_algorithm.h" +#include "controller/agc_status.h" +#include "controller/alsc_status.h" +#include "controller/awb_algorithm.h" +#include "controller/awb_status.h" +#include "controller/black_level_status.h" +#include "controller/ccm_algorithm.h" +#include "controller/ccm_status.h" +#include "controller/contrast_algorithm.h" +#include "controller/contrast_status.h" +#include "controller/controller.h" +#include "controller/denoise_algorithm.h" +#include "controller/denoise_status.h" +#include "controller/dpc_status.h" +#include "controller/geq_status.h" +#include "controller/lux_status.h" +#include "controller/metadata.h" +#include "controller/sharpen_algorithm.h" +#include "controller/sharpen_status.h" +#include "controller/statistics.h" namespace libcamera { @@ -1840,7 +1840,7 @@ const struct IPAModuleInfo ipaModuleInfo = { IPA_MODULE_API_VERSION, 1, "PipelineHandlerRPi", - "raspberrypi", + "vc4", }; IPAInterface *ipaCreate() diff --git a/src/libcamera/pipeline/rpi/vc4/raspberrypi.cpp b/src/libcamera/pipeline/rpi/vc4/raspberrypi.cpp index 4595773d2517..cfde7f2e2229 100644 --- a/src/libcamera/pipeline/rpi/vc4/raspberrypi.cpp +++ b/src/libcamera/pipeline/rpi/vc4/raspberrypi.cpp @@ -1668,7 +1668,7 @@ int RPiCameraData::loadIPA(ipa::RPi::IPAInitResult *result) std::string model = sensor_->model(); if (isMonoSensor(sensor_)) model += "_mono"; - configurationFile = ipa_->configurationFile(model + ".json", ""); + configurationFile = ipa_->configurationFile(model + ".json", "rpi"); } else { configurationFile = std::string(configFromEnv); }