From patchwork Mon Jun 3 23:16:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 1344 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 05542618F7 for ; Tue, 4 Jun 2019 01:16:52 +0200 (CEST) Received: from localhost.localdomain (unknown [96.44.9.117]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5EEC8587; Tue, 4 Jun 2019 01:16:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1559603811; bh=O8JTsoc2Ne6jQjTOe/n2U9Bn1rv2GhthU6bs8Jp9E4g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pqkfeR3zltfEway2AdhL0DBaN+5rwPNdM9P8TK7fJ/74CtwJryOXfIUqavHrnruz2 hvp2DCPNRmE+hbBfCD4SCt4Ji2MX4ABiszgfr85mx0IcP+vMlWhPGY3fZK2LBz3hcz ESXdWYFy3PhCOr1W0sJRBGf+eEixh/6lmZ5GItoM= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Mon, 3 Jun 2019 19:16:34 -0400 Message-Id: <20190603231637.28554-8-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190603231637.28554-1-paul.elder@ideasonboard.com> References: <20190603231637.28554-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 07/10] libcamera: ipa: add dummy IPA implementation X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jun 2019 23:16:52 -0000 Add a dummy IPA module. Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart --- Changes in v2: - use macros for defining the version fields in ipaModuleInfo src/ipa/ipa_dummy.cpp | 45 +++++++++++++++++++++++++++++++++++++++++++ src/ipa/meson.build | 11 +++++++++++ 2 files changed, 56 insertions(+) create mode 100644 src/ipa/ipa_dummy.cpp diff --git a/src/ipa/ipa_dummy.cpp b/src/ipa/ipa_dummy.cpp new file mode 100644 index 0000000..99a74ff --- /dev/null +++ b/src/ipa/ipa_dummy.cpp @@ -0,0 +1,45 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2019, Google Inc. + * + * ipa_dummy.cpp - Dummy Image Processing Algorithm module + */ + +#include + +#include +#include + +namespace libcamera { + +class IPADummy : public IPAInterface +{ +public: + int init(); +}; + +int IPADummy::init() +{ + std::cout << "initializing dummy IPA!" << std::endl; + return 0; +} + +/* + * External IPA module interface + */ + +extern "C" { +const struct libcamera::IPAModuleInfo ipaModuleInfo = { + IPA_MODULE_API_VERSION, + PIPELINE_VERSION(0, 1), + "PipelineHandlerVimc", + "Dummy IPA for Vimc", +}; + +IPAInterface *ipaCreate() +{ + return new IPADummy(); +} +}; + +}; /* namespace libcamera */ diff --git a/src/ipa/meson.build b/src/ipa/meson.build index be4f954..33d734d 100644 --- a/src/ipa/meson.build +++ b/src/ipa/meson.build @@ -1,2 +1,13 @@ +ipa_dummy_sources = files([ + 'ipa_dummy.cpp', +]) + +ipa_dummy = shared_library('ipa_dummy', + ipa_dummy_sources, + name_prefix : '', + include_directories : libcamera_includes, + install : true, + install_dir : join_paths(get_option('libdir'), 'libcamera')) + config_h.set('IPA_MODULE_DIR', '"' + join_paths(get_option('prefix'), get_option('libdir'), 'libcamera') + '"')