[{"id":1715,"web_url":"https://patchwork.libcamera.org/comment/1715/","msgid":"<20190528145819.GE14336@pendragon.ideasonboard.com>","date":"2019-05-28T14:58:19","subject":"Re: [libcamera-devel] [PATCH 1/8] libcamera: ipa_interface: add\n\theader","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, May 27, 2019 at 06:35:33PM -0400, Paul Elder wrote:\n> Define an IPAInterface class which will contain an IPA implementation.\n> The methods that the IPAInterface exposes form the interface to the IPA\n> implementation, hence the name. IPA module shared objects will implement\n> this class.\n> \n> This also means that IPA module shared objects must be implemented in\n> C++, so remove the C test IPA module.\n\nYou could have split it in two patches, but it's ok.\n\n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> ---\n>  include/libcamera/ipa/ipa_interface.h | 22 ++++++++++++++++++++++\n>  include/libcamera/meson.build         |  1 +\n>  src/libcamera/ipa_interface.cpp       | 27 +++++++++++++++++++++++++++\n>  src/libcamera/meson.build             |  1 +\n>  test/ipa/ipa_test.cpp                 |  2 --\n>  test/ipa/meson.build                  |  1 -\n>  test/ipa/shared_test.c                |  6 ------\n>  7 files changed, 51 insertions(+), 9 deletions(-)\n>  create mode 100644 include/libcamera/ipa/ipa_interface.h\n>  create mode 100644 src/libcamera/ipa_interface.cpp\n>  delete mode 100644 test/ipa/shared_test.c\n> \n> diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h\n> new file mode 100644\n> index 0000000..2c5eb1f\n> --- /dev/null\n> +++ b/include/libcamera/ipa/ipa_interface.h\n> @@ -0,0 +1,22 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright (C) 2019, Google Inc.\n> + *\n> + * ipa_interface.h - Image Processing Algorithm interface\n> + */\n> +#ifndef __LIBCAMERA_IPA_INTERFACE_H__\n> +#define __LIBCAMERA_IPA_INTERFACE_H__\n> +\n> +namespace libcamera {\n> +\n> +class IPAInterface\n> +{\n> +public:\n> +\tvirtual ~IPAInterface() {}\n> +\n> +\tvirtual int init() = 0;\n> +};\n> +\n> +} /* namespace libcamera */\n> +\n> +#endif /* __LIBCAMERA_IPA_INTERFACE_H__ */\n> diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\n> index 1fcf6b5..1b86fdc 100644\n> --- a/include/libcamera/meson.build\n> +++ b/include/libcamera/meson.build\n> @@ -5,6 +5,7 @@ libcamera_api = files([\n>      'event_dispatcher.h',\n>      'event_notifier.h',\n>      'geometry.h',\n> +    'ipa/ipa_interface.h',\n>      'ipa/ipa_module_info.h',\n>      'object.h',\n>      'request.h',\n> diff --git a/src/libcamera/ipa_interface.cpp b/src/libcamera/ipa_interface.cpp\n> new file mode 100644\n> index 0000000..9d30da2\n> --- /dev/null\n> +++ b/src/libcamera/ipa_interface.cpp\n> @@ -0,0 +1,27 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright (C) 2019, Google Inc.\n> + *\n> + * ipa_interface.cpp - Image Processing Algorithm interface\n> + */\n> +\n> +#include <libcamera/ipa/ipa_interface.h>\n> +\n> +/**\n> + * \\file ipa_interface.h\n> + * \\brief Image Processing Algorithm interface\n> + */\n> +\n> +namespace libcamera {\n> +\n> +/**\n> + * \\class IPAInterface\n> + * \\brief Interface for IPA implementation\n> + */\n> +\n> +/**\n> + * \\fn IPAInterface::init()\n> + * \\brief Initialise the IPAInterface\n> + */\n\nAs this is just a skeleton we'll fix it later, but in general\ndocumentation should be more detailed than this for public APIs.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> +\n> +} /* namespace libcamera */\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index 6a73580..07335e5 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -10,6 +10,7 @@ libcamera_sources = files([\n>      'event_notifier.cpp',\n>      'formats.cpp',\n>      'geometry.cpp',\n> +    'ipa_interface.cpp',\n>      'ipa_module.cpp',\n>      'log.cpp',\n>      'media_device.cpp',\n> diff --git a/test/ipa/ipa_test.cpp b/test/ipa/ipa_test.cpp\n> index 9861ee2..2dbc702 100644\n> --- a/test/ipa/ipa_test.cpp\n> +++ b/test/ipa/ipa_test.cpp\n> @@ -60,8 +60,6 @@ protected:\n>  \t\t\t9001,\n>  \t\t};\n>  \n> -\t\tcount += runTest(\"test/ipa/ipa-dummy-c.so\", testInfo);\n> -\n>  \t\tcount += runTest(\"test/ipa/ipa-dummy-cpp.so\", testInfo);\n>  \n>  \t\tif (count < 0)\n> diff --git a/test/ipa/meson.build b/test/ipa/meson.build\n> index ecde313..08ee95c 100644\n> --- a/test/ipa/meson.build\n> +++ b/test/ipa/meson.build\n> @@ -1,5 +1,4 @@\n>  ipa_modules_sources = [\n> -    ['ipa-dummy-c',   'shared_test.c'],\n>      ['ipa-dummy-cpp', 'shared_test.cpp'],\n>  ]\n>  \n> diff --git a/test/ipa/shared_test.c b/test/ipa/shared_test.c\n> deleted file mode 100644\n> index 87d182b..0000000\n> --- a/test/ipa/shared_test.c\n> +++ /dev/null\n> @@ -1,6 +0,0 @@\n> -#include <libcamera/ipa/ipa_module_info.h>\n> -\n> -const struct IPAModuleInfo ipaModuleInfo = {\n> -\t.name = \"It's over nine thousand!\",\n> -\t.version = 9001,\n> -};","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0A448600EA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 28 May 2019 16:58:46 +0200 (CEST)","from pendragon.ideasonboard.com (85-76-65-42-nat.elisa-mobile.fi\n\t[85.76.65.42])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8484DD85;\n\tTue, 28 May 2019 16:58:42 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1559055525;\n\tbh=RDkArV67ED7DdPyI60fW66ArvxY5m4+SB/oVV/KfSm8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Quzri7SdZTxHCQF+DIODzxGMANKV3nByG2nJN+3uoZryk/69ATxRlrF7COSpql7yX\n\txuhZlw5XM0+5xmzrPPv/1u0UHDXSEC401Q//LReW6/nZ+b0xTqYb1mNBYnPQKOTSB8\n\tETm4fEOBct2PlNNWzMpKIMDY2nmidZvv9ag8hQlQ=","Date":"Tue, 28 May 2019 17:58:19 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Paul Elder <paul.elder@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190528145819.GE14336@pendragon.ideasonboard.com>","References":"<20190527223540.21855-1-paul.elder@ideasonboard.com>\n\t<20190527223540.21855-2-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190527223540.21855-2-paul.elder@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 1/8] libcamera: ipa_interface: add\n\theader","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, 28 May 2019 14:58:46 -0000"}},{"id":1743,"web_url":"https://patchwork.libcamera.org/comment/1743/","msgid":"<20190603215459.GD2960@bigcity.dyn.berto.se>","date":"2019-06-03T21:54:59","subject":"Re: [libcamera-devel] [PATCH 1/8] libcamera: ipa_interface: add\n\theader","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Paul,\n\nThanks for your work.\n\nOn 2019-05-27 18:35:33 -0400, Paul Elder wrote:\n> Define an IPAInterface class which will contain an IPA implementation.\n\ns/will contain/describes/\n\n> The methods that the IPAInterface exposes form the interface to the IPA\n> implementation, hence the name. IPA module shared objects will implement\n> this class.\n\nHow about,\n\nThe IPAInterface acts as a base for IPA implementations and describes \nits interface. This commit only describes a skeleton interface with a \nsingle init() method.\n\n> \n> This also means that IPA module shared objects must be implemented in\n> C++, so remove the C test IPA module.\n\nI think you should move this to a separate patch.\n\n> \n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> ---\n>  include/libcamera/ipa/ipa_interface.h | 22 ++++++++++++++++++++++\n>  include/libcamera/meson.build         |  1 +\n>  src/libcamera/ipa_interface.cpp       | 27 +++++++++++++++++++++++++++\n>  src/libcamera/meson.build             |  1 +\n>  test/ipa/ipa_test.cpp                 |  2 --\n>  test/ipa/meson.build                  |  1 -\n>  test/ipa/shared_test.c                |  6 ------\n>  7 files changed, 51 insertions(+), 9 deletions(-)\n>  create mode 100644 include/libcamera/ipa/ipa_interface.h\n>  create mode 100644 src/libcamera/ipa_interface.cpp\n>  delete mode 100644 test/ipa/shared_test.c\n> \n> diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h\n> new file mode 100644\n> index 0000000..2c5eb1f\n> --- /dev/null\n> +++ b/include/libcamera/ipa/ipa_interface.h\n> @@ -0,0 +1,22 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright (C) 2019, Google Inc.\n> + *\n> + * ipa_interface.h - Image Processing Algorithm interface\n> + */\n> +#ifndef __LIBCAMERA_IPA_INTERFACE_H__\n> +#define __LIBCAMERA_IPA_INTERFACE_H__\n> +\n> +namespace libcamera {\n> +\n> +class IPAInterface\n> +{\n> +public:\n> +\tvirtual ~IPAInterface() {}\n> +\n> +\tvirtual int init() = 0;\n> +};\n> +\n> +} /* namespace libcamera */\n> +\n> +#endif /* __LIBCAMERA_IPA_INTERFACE_H__ */\n> diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\n> index 1fcf6b5..1b86fdc 100644\n> --- a/include/libcamera/meson.build\n> +++ b/include/libcamera/meson.build\n> @@ -5,6 +5,7 @@ libcamera_api = files([\n>      'event_dispatcher.h',\n>      'event_notifier.h',\n>      'geometry.h',\n> +    'ipa/ipa_interface.h',\n>      'ipa/ipa_module_info.h',\n>      'object.h',\n>      'request.h',\n> diff --git a/src/libcamera/ipa_interface.cpp b/src/libcamera/ipa_interface.cpp\n> new file mode 100644\n> index 0000000..9d30da2\n> --- /dev/null\n> +++ b/src/libcamera/ipa_interface.cpp\n> @@ -0,0 +1,27 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright (C) 2019, Google Inc.\n> + *\n> + * ipa_interface.cpp - Image Processing Algorithm interface\n> + */\n> +\n> +#include <libcamera/ipa/ipa_interface.h>\n> +\n> +/**\n> + * \\file ipa_interface.h\n> + * \\brief Image Processing Algorithm interface\n> + */\n> +\n> +namespace libcamera {\n> +\n> +/**\n> + * \\class IPAInterface\n> + * \\brief Interface for IPA implementation\n\ns/IPA implementation/IPA implementations/\n\nor\n\ns/IPA implementation/an IPA implementation/\n\n> + */\n> +\n> +/**\n> + * \\fn IPAInterface::init()\n> + * \\brief Initialise the IPAInterface\n> + */\n> +\n> +} /* namespace libcamera */\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index 6a73580..07335e5 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -10,6 +10,7 @@ libcamera_sources = files([\n>      'event_notifier.cpp',\n>      'formats.cpp',\n>      'geometry.cpp',\n> +    'ipa_interface.cpp',\n>      'ipa_module.cpp',\n>      'log.cpp',\n>      'media_device.cpp',\n> diff --git a/test/ipa/ipa_test.cpp b/test/ipa/ipa_test.cpp\n> index 9861ee2..2dbc702 100644\n> --- a/test/ipa/ipa_test.cpp\n> +++ b/test/ipa/ipa_test.cpp\n> @@ -60,8 +60,6 @@ protected:\n>  \t\t\t9001,\n>  \t\t};\n>  \n> -\t\tcount += runTest(\"test/ipa/ipa-dummy-c.so\", testInfo);\n> -\n>  \t\tcount += runTest(\"test/ipa/ipa-dummy-cpp.so\", testInfo);\n>  \n>  \t\tif (count < 0)\n> diff --git a/test/ipa/meson.build b/test/ipa/meson.build\n> index ecde313..08ee95c 100644\n> --- a/test/ipa/meson.build\n> +++ b/test/ipa/meson.build\n> @@ -1,5 +1,4 @@\n>  ipa_modules_sources = [\n> -    ['ipa-dummy-c',   'shared_test.c'],\n>      ['ipa-dummy-cpp', 'shared_test.cpp'],\n>  ]\n>  \n> diff --git a/test/ipa/shared_test.c b/test/ipa/shared_test.c\n> deleted file mode 100644\n> index 87d182b..0000000\n> --- a/test/ipa/shared_test.c\n> +++ /dev/null\n> @@ -1,6 +0,0 @@\n> -#include <libcamera/ipa/ipa_module_info.h>\n> -\n> -const struct IPAModuleInfo ipaModuleInfo = {\n> -\t.name = \"It's over nine thousand!\",\n> -\t.version = 9001,\n> -};\n> -- \n> 2.20.1\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lj1-x241.google.com (mail-lj1-x241.google.com\n\t[IPv6:2a00:1450:4864:20::241])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0875260B1B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  3 Jun 2019 23:55:01 +0200 (CEST)","by mail-lj1-x241.google.com with SMTP id j24so17754070ljg.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 03 Jun 2019 14:55:01 -0700 (PDT)","from localhost (89-233-230-99.cust.bredband2.com. [89.233.230.99])\n\tby smtp.gmail.com with ESMTPSA id\n\tm28sm133316ljb.68.2019.06.03.14.54.59\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tMon, 03 Jun 2019 14:54:59 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=h1szlAfJebbg+en9Q19nYyYEVQqcRTNAAmS48pdMcII=;\n\tb=B7BcxPMyAxXMOQH7n37Hy4bgVAwG640yn0QZS1kvaLwzvxxyOtRv7mLTq9OEBL2Vrz\n\taJ95doDyssZ9kYxwunrv6FGkPOVnURyx1X0xLB9bQg9UhKVcM0R/+HZhe2iQhjVG9iFg\n\t6nWbQuMAVxTodv6kpC/bviM/qsdM4o+fO6h1G68isLIA01nKM7Lxyc76J5XNR4mKs2hR\n\t6aHojKUqA+Oxpxasu3QfDa6h2EvnTKabyDw7FkH5jWSQ1TYtg8KqdyzZ13yr7HNLw4Yx\n\tNDJZCDM3jSUsoMAlEUuZTUAAtB4y1+Ba2N/LmlxJgf5ZFrnzQ7p4ItomD+MwJ8Mvtucn\n\tGTbA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=h1szlAfJebbg+en9Q19nYyYEVQqcRTNAAmS48pdMcII=;\n\tb=d0brtSjPzCsJziEt4U+gO7yJh1LDdgPyMSoj/F4zfQxgsRYjI757WwRMkGORdy6Srb\n\tXjBXE1LONG1CRJYf/7rgoIbuxYlJPwziFdamcbfxvgn6UiT/wdwdRZ+KMWxaoPjovZop\n\tyUav5gUAnCGc5kQFK18Qo84EYw2vP+IwPXcZ8DPXn/L1pkgirqq8wgOGolGs5PG9Ssvf\n\txjCqhfOMlM/CH6vxTb4KbxfoKsFOTDIYpwa1j2XDy1p+zXzpIowRmKaOg2lyA3HC3zBV\n\tAvJNeORKcfg1EsuR7uI6qXQN5YpeRvNf2ZMPrD1YUHeNWRF1dynwnzTEhakZH1eZA9EE\n\tH/6Q==","X-Gm-Message-State":"APjAAAWMqZqxJbtlqBqwNHL1RwIIGvXw7hvDZ9hJhM2fpAFXhBNfHW1O\n\t5hHn3NFjL/V0IoJ67e03O1KYUeBHSqY=","X-Google-Smtp-Source":"APXvYqw+tPHgQ37c/jHWMBaYMCEzrZH8Blms45T43FcaUcs73db6BLNBOukf3Kj/yROfFFo5xeKp2g==","X-Received":"by 2002:a2e:2e06:: with SMTP id u6mr12343073lju.54.1559598900354;\n\tMon, 03 Jun 2019 14:55:00 -0700 (PDT)","Date":"Mon, 3 Jun 2019 23:54:59 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Paul Elder <paul.elder@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190603215459.GD2960@bigcity.dyn.berto.se>","References":"<20190527223540.21855-1-paul.elder@ideasonboard.com>\n\t<20190527223540.21855-2-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20190527223540.21855-2-paul.elder@ideasonboard.com>","User-Agent":"Mutt/1.11.4 (2019-03-13)","Subject":"Re: [libcamera-devel] [PATCH 1/8] libcamera: ipa_interface: add\n\theader","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":"Mon, 03 Jun 2019 21:55:01 -0000"}}]