[{"id":1757,"web_url":"https://patchwork.libcamera.org/comment/1757/","msgid":"<20190604115857.GK4771@pendragon.ideasonboard.com>","date":"2019-06-04T11:58:57","subject":"Re: [libcamera-devel] [PATCH v2 07/10] libcamera: ipa: add dummy\n\tIPA implementation","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Paul,\n\nThank you for the patch.\n\nOn Mon, Jun 03, 2019 at 07:16:34PM -0400, Paul Elder wrote:\n> Add a dummy IPA module.\n> \n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> ---\n> Changes in v2:\n> - use macros for defining the version fields in ipaModuleInfo\n> \n>  src/ipa/ipa_dummy.cpp | 45 +++++++++++++++++++++++++++++++++++++++++++\n>  src/ipa/meson.build   | 11 +++++++++++\n>  2 files changed, 56 insertions(+)\n>  create mode 100644 src/ipa/ipa_dummy.cpp\n> \n> diff --git a/src/ipa/ipa_dummy.cpp b/src/ipa/ipa_dummy.cpp\n> new file mode 100644\n> index 0000000..99a74ff\n> --- /dev/null\n> +++ b/src/ipa/ipa_dummy.cpp\n> @@ -0,0 +1,45 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright (C) 2019, Google Inc.\n> + *\n> + * ipa_dummy.cpp - Dummy Image Processing Algorithm module\n> + */\n> +\n> +#include <iostream>\n> +\n> +#include <libcamera/ipa/ipa_interface.h>\n> +#include <libcamera/ipa/ipa_module_info.h>\n> +\n> +namespace libcamera {\n> +\n> +class IPADummy : public IPAInterface\n> +{\n> +public:\n> +\tint init();\n> +};\n> +\n> +int IPADummy::init()\n> +{\n> +\tstd::cout << \"initializing dummy IPA!\" << std::endl;\n> +\treturn 0;\n> +}\n> +\n> +/*\n> + * External IPA module interface\n> + */\n> +\n> +extern \"C\" {\n> +const struct libcamera::IPAModuleInfo ipaModuleInfo = {\n\nYou're in the libcamera namespace, so there's no need for libcamera::.\n\n> +\tIPA_MODULE_API_VERSION,\n> +\tPIPELINE_VERSION(0, 1),\n> +\t\"PipelineHandlerVimc\",\n> +\t\"Dummy IPA for Vimc\",\n> +};\n> +\n> +IPAInterface *ipaCreate()\n> +{\n> +\treturn new IPADummy();\n> +}\n> +};\n> +\n> +}; /* namespace libcamera */\n> diff --git a/src/ipa/meson.build b/src/ipa/meson.build\n> index be4f954..33d734d 100644\n> --- a/src/ipa/meson.build\n> +++ b/src/ipa/meson.build\n> @@ -1,2 +1,13 @@\n> +ipa_dummy_sources = files([\n> +    'ipa_dummy.cpp',\n> +])\n> +\n> +ipa_dummy = shared_library('ipa_dummy',\n> +                           ipa_dummy_sources,\n> +                           name_prefix : '',\n> +                           include_directories : libcamera_includes,\n> +                           install : true,\n> +                           install_dir : join_paths(get_option('libdir'), 'libcamera'))\n\nI expect other IPA modules to need the same install_dir. How about\n\nipa_install_dir = join_paths(get_option('libdir'), 'libcamera')\n\nipa_dummy = shared_library('ipa_dummy',\n...\n                           install_dir : ipa_install_dir)\n\n> +\n>  config_h.set('IPA_MODULE_DIR',\n>               '\"' + join_paths(get_option('prefix'), get_option('libdir'), 'libcamera') + '\"')\n\nAnd here\n\n             '\"' + join_paths(get_option('prefix'), ipa_install_dir) +'\"')\n\nWith this fixed,\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8F6D8630CD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  4 Jun 2019 13:59:10 +0200 (CEST)","from pendragon.ideasonboard.com (unknown\n\t[IPv6:2a02:2788:668:163:5bb7:9f6c:564c:d55e])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1A61B2D2;\n\tTue,  4 Jun 2019 13:59:10 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1559649550;\n\tbh=/3kNs18P310VYZv9vJjiUxArE+iU+Oq67+ciNA12818=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=sA8ADTNjXDpPOEuhnj8JOp/syXwtik6Cx6FYXTpi75soMsU/76m0ZUijf2p9sw1HU\n\tBb6ITeuGp5HTWYweWPshK0QgiMRGaT1ogaGhKvNZdbuuKxuZUlVRObxvmk0JyFuH+Q\n\tcGGAbcaalk3Q1GZCuCBkFst6+da3QvNzxjFWPJzQ=","Date":"Tue, 4 Jun 2019 14:58:57 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Paul Elder <paul.elder@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190604115857.GK4771@pendragon.ideasonboard.com>","References":"<20190603231637.28554-1-paul.elder@ideasonboard.com>\n\t<20190603231637.28554-8-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190603231637.28554-8-paul.elder@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v2 07/10] libcamera: ipa: add dummy\n\tIPA implementation","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<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>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Tue, 04 Jun 2019 11:59:10 -0000"}}]