[{"id":16927,"web_url":"https://patchwork.libcamera.org/comment/16927/","msgid":"<f1cd1b0d-2524-5384-24d1-22f624d2b1a2@ideasonboard.com>","date":"2021-05-13T08:17:32","subject":"Re: [libcamera-devel] [RFC PATCH] ipa: Documentation: Enable\n\tdocumentation of mojom files","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Paul\n\nThanks for your work.\n\nOn 5/13/21 1:23 PM, Paul Elder wrote:\n> Enable generation of documentation for mojom files. As doxygen cannot\n> parse mojom files directly, put the comments in a cpp file instead, and\n> plumb meson and doxygen accordingly.\n>\n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n>\n> ---\n> Obviously we'll have to remove the documentation from core.mojom, and\n> add documentation accordingly to the other mojom files. This is still\n> and RFC just to see if this is the direction we want to go.\nPerfectly understand-able. And this is already looking in a decent shape \nfor starters.\n> ---\n>   Documentation/Doxyfile.in                    |   4 +-\n>   Documentation/meson.build                    |   1 +\n>   include/libcamera/ipa/core_ipa_interface.cpp | 190 +++++++++++++++++++\n>   include/libcamera/ipa/meson.build            |   4 +\n>   4 files changed, 197 insertions(+), 2 deletions(-)\n>   create mode 100644 include/libcamera/ipa/core_ipa_interface.cpp\n>\n> diff --git a/Documentation/Doxyfile.in b/Documentation/Doxyfile.in\n> index af006724..213adb9b 100644\n> --- a/Documentation/Doxyfile.in\n> +++ b/Documentation/Doxyfile.in\n> @@ -844,7 +844,6 @@ EXCLUDE                = @TOP_SRCDIR@/include/libcamera/span.h \\\n>   \t\t\t @TOP_SRCDIR@/src/libcamera/pipeline/ \\\n>   \t\t\t @TOP_SRCDIR@/src/libcamera/tracepoints.cpp \\\n>   \t\t\t @TOP_BUILDDIR@/include/libcamera/internal/tracepoints.h \\\n> -\t\t\t @TOP_BUILDDIR@/include/libcamera/ipa/ \\\n>   \t\t\t @TOP_BUILDDIR@/src/libcamera/proxy/\n>   \n>   # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or\n> @@ -861,7 +860,8 @@ EXCLUDE_SYMLINKS       = NO\n>   # Note that the wildcards are matched against the file with absolute path, so to\n>   # exclude all test directories for example use the pattern */test/*\n>   \n> -EXCLUDE_PATTERNS       =\n> +EXCLUDE_PATTERNS       = @TOP_BUILDDIR@/include/libcamera/ipa/*_serializer.h \\\n> +\t\t\t @TOP_BUILDDIR@/include/libcamera/ipa/*_proxy.h\n>   \n>   # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names\n>   # (namespaces, classes, functions, etc.) that should be excluded from the\n> diff --git a/Documentation/meson.build b/Documentation/meson.build\n> index c8521574..86f1134b 100644\n> --- a/Documentation/meson.build\n> +++ b/Documentation/meson.build\n> @@ -23,6 +23,7 @@ if doxygen.found() and dot.found()\n>                     input : [\n>                         doxyfile,\n>                         libcamera_internal_headers,\n> +                      libcamera_ipa_docs,\n>                         libcamera_ipa_headers,\n>                         libcamera_public_headers,\n>                         libcamera_sources,\n> diff --git a/include/libcamera/ipa/core_ipa_interface.cpp b/include/libcamera/ipa/core_ipa_interface.cpp\n2 questions\n  - Is it okay to have a .cpp in /include/ $includedir? Maybe yes, but I \nam not sure\n  - I have a struct to be documented in ipu3.mojom, so should I be \nmaking ipu3_ipa_interface.cpp in the same way, for documenting it? (or \nhave only one \"doc\" file consolidation)?\n> new file mode 100644\n> index 00000000..f9820b92\n> --- /dev/null\n> +++ b/include/libcamera/ipa/core_ipa_interface.cpp\n> @@ -0,0 +1,190 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +\n> +namespace libcamera {\n> +\n> +/**\n> + * \\struct CameraSensorInfo\n> + * \\brief Report the image sensor characteristics\n> + *\n> + * The structure reports image sensor characteristics used by IPA modules to\n> + * tune their algorithms based on the image sensor model currently in use and\n> + * its configuration.\n> + *\n> + * The reported information describes the sensor's intrinsics characteristics,\n> + * such as its pixel array size and the sensor model name, as well as\n> + * information relative to the currently configured mode, such as the produced\n> + * image size and the bit depth of the requested image format.\n> + *\n> + * Instances of this structure are meant to be assembled by the CameraSensor\n> + * class by inspecting the sensor static properties as well as information\n> + * relative to the current configuration.\n> + */\n> +\n> +/**\n> + * \\var CameraSensorInfo::model\n> + * \\brief The image sensor model name\n> + *\n> + * The sensor model name is a free-formed string that uniquely identifies the\n> + * sensor model.\n> + */\n> +\n> +/**\n> + * \\var CameraSensorInfo::bitsPerPixel\n> + * \\brief The number of bits per pixel of the image format produced by the\n> + * image sensor\n> + */\n> +\n> +/**\n> + * \\var CameraSensorInfo::activeAreaSize\n> + * \\brief The size of the pixel array active area of the sensor\n> + */\n> +\n> +/**\n> + * \\var CameraSensorInfo::analogCrop\n> + * \\brief The portion of the pixel array active area which is read-out and\n> + * processed\n> + *\n> + * The analog crop rectangle top-left corner is defined as the displacement\n> + * from the top-left corner of the pixel array active area. The rectangle\n> + * horizontal and vertical sizes define the portion of the pixel array which\n> + * is read-out and provided to the sensor's internal processing pipeline, before\n> + * any pixel sub-sampling method, such as pixel binning, skipping and averaging\n> + * take place.\n> + */\n> +\n> +/**\n> + * \\var CameraSensorInfo::outputSize\n> + * \\brief The size of the images produced by the camera sensor\n> + *\n> + * The output image size defines the horizontal and vertical sizes of the images\n> + * produced by the image sensor. The output image size is defined as the end\n> + * result of the sensor's internal image processing pipeline stages, applied on\n> + * the pixel array portion defined by the analog crop rectangle. Each image\n> + * processing stage that performs pixel sub-sampling techniques, such as pixel\n> + * binning or skipping, or perform any additional digital scaling concur in the\n> + * definition of the output image size.\n> + */\n> +\n> +/**\n> + * \\var CameraSensorInfo::pixelRate\n> + * \\brief The number of pixels produced in a second\n> + *\n> + * To obtain the read-out time in seconds of a full line:\n> + *\n> + * \\verbatim\n> +\tlineDuration(s) = lineLength(pixels) / pixelRate(pixels per second)\n> +   \\endverbatim\n> + */\n> +\n> +/**\n> + * \\var CameraSensorInfo::lineLength\n> + * \\brief Total line length in pixels\n> + *\n> + * The total line length in pixel clock periods, including blanking.\n> + */\n> +\n> +/**\n> + * \\var CameraSensorInfo::minFrameLength\n> + * \\brief The minimum allowable frame length in units of lines\n> + *\n> + * The sensor frame length comprises of active output lines and blanking lines\n> + * in a frame. The minimum frame length value dictates the minimum allowable\n> + * frame duration of the sensor mode.\n> + *\n> + * To obtain the minimum frame duration:\n> + *\n> + * \\verbatim\n> +\tframeDuration(s) = minFrameLength(lines) * lineLength(pixels) / pixelRate(pixels per second)\n> +   \\endverbatim\n> + */\n> +\n> +/**\n> + * \\var CameraSensorInfo::maxFrameLength\n> + * \\brief The maximum allowable frame length in units of lines\n> + *\n> + * The sensor frame length comprises of active output lines and blanking lines\n> + * in a frame. The maximum frame length value dictates the maximum allowable\n> + * frame duration of the sensor mode.\n> + *\n> + * To obtain the maximum frame duration:\n> + *\n> + * \\verbatim\n> +\tframeDuration(s) = maxFrameLength(lines) * lineLength(pixels) / pixelRate(pixels per second)\n> +   \\endverbatim\n> + */\n> +\n> +/**\n> + * \\struct IPABuffer\n> + * \\brief Buffer information for the IPA interface\n> + *\n> + * The IPABuffer structure associates buffer memory with a unique ID. It is\n> + * used to map buffers to the IPA with IPAInterface::mapBuffers(), after which\n> + * buffers will be identified by their ID in the IPA interface.\n> + */\n> +\n> +/**\n> + * \\var IPABuffer::id\n> + * \\brief The buffer unique ID\n> + *\n> + * Buffers mapped to the IPA are identified by numerical unique IDs. The IDs\n> + * are chosen by the pipeline handler to fulfil the following constraints:\n> + *\n> + * - IDs shall be positive integers different than zero\n> + * - IDs shall be unique among all mapped buffers\n> + *\n> + * When buffers are unmapped with IPAInterface::unmapBuffers() their IDs are\n> + * freed and may be reused for new buffer mappings.\n> + */\n> +\n> +/**\n> + * \\var IPABuffer::planes\n> + * \\brief The buffer planes description\n> + *\n> + * Stores the dmabuf handle and length for each plane of the buffer.\n> + */\n> +\n> +/**\n> + * \\struct IPASettings\n> + * \\brief IPA interface initialization settings\n> + *\n> + * The IPASettings structure stores data passed to the IPAInterface::init()\n> + * function. The data contains settings that don't depend on a particular camera\n> + * or pipeline configuration and are valid for the whole life time of the IPA\n> + * interface.\n> + */\n> +\n> +/**\n> + * \\var IPASettings::configurationFile\n> + * \\brief The name of the IPA configuration file\n> + *\n> + * This field may be an empty string if the IPA doesn't require a configuration\n> + * file.\n> + */\n> +\n> + /**\n> + * \\var IPASettings::sensorModel\n> + * \\brief The sensor model name\n> + *\n> + * Provides the sensor model name to the IPA.\n> + */\n> +\n> +/**\n> + * \\struct IPAStream\n> + * \\brief Stream configuration for the IPA interface\n> + *\n> + * The IPAStream structure stores stream configuration parameters needed by the\n> + * IPAInterface::configure() method. It mirrors the StreamConfiguration class\n> + * that is not suitable for this purpose due to not being serializable.\n> + */\n> +\n> +/**\n> + * \\var IPAStream::pixelFormat\n> + * \\brief The stream pixel format\n> + */\n> +\n> +/**\n> + * \\var IPAStream::size\n> + * \\brief The stream size in pixels\n> + */\n> +\n> +} /* namespace libcamera */\n> diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build\n> index 40c4e737..69bc855e 100644\n> --- a/include/libcamera/ipa/meson.build\n> +++ b/include/libcamera/ipa/meson.build\n> @@ -6,6 +6,10 @@ libcamera_ipa_headers = files([\n>       'ipa_module_info.h',\n>   ])\n>   \n> +libcamera_ipa_docs = files([\n> +    'core_ipa_interface.cpp',\n> +])\n> +\n>   install_headers(libcamera_ipa_headers,\n>                   subdir: libcamera_include_dir / 'ipa')\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 2F064C31EB\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 13 May 2021 08:17:40 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9D57868919;\n\tThu, 13 May 2021 10:17:39 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 341AE68919\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 13 May 2021 10:17:38 +0200 (CEST)","from localhost.localdomain (unknown [103.251.226.24])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A6957891;\n\tThu, 13 May 2021 10:17:36 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"CvFt5OBL\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1620893857;\n\tbh=0PMZ/+TVuXIw+HiLShXchId1dGOqmuSEpvgLCACukvc=;\n\th=Subject:To:References:From:Date:In-Reply-To:From;\n\tb=CvFt5OBL9Esb1sFTUXL5fuVqQYS/o+vpNOn4VQq8bxfZ/asZDaUmWYzeB8AXW2q5n\n\tEOXsDjFIeWD+rElKp6wsnS75I63O5jBlfKuDeYRA9Q2xMcVj1fhQHW7a6CazBIlA5h\n\tbgJmNvqyhkKk+0k5qt9JiS2Z0feplhsIOm8vo1qk=","To":"Paul Elder <paul.elder@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20210513075346.739370-1-paul.elder@ideasonboard.com>","From":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<f1cd1b0d-2524-5384-24d1-22f624d2b1a2@ideasonboard.com>","Date":"Thu, 13 May 2021 13:47:32 +0530","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n\tThunderbird/68.11.0","MIME-Version":"1.0","In-Reply-To":"<20210513075346.739370-1-paul.elder@ideasonboard.com>","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [RFC PATCH] ipa: Documentation: Enable\n\tdocumentation of mojom files","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","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>","Content-Transfer-Encoding":"base64","Content-Type":"text/plain; charset=\"utf-8\"; Format=\"flowed\"","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":16945,"web_url":"https://patchwork.libcamera.org/comment/16945/","msgid":"<8cf47f8d-2fd6-33a0-9261-b34e6721fb56@ideasonboard.com>","date":"2021-05-14T09:54:17","subject":"Re: [libcamera-devel] [RFC PATCH] ipa: Documentation: Enable\n\tdocumentation of mojom files","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Heya,\n\nOn 13/05/2021 09:17, Umang Jain wrote:\n> Hi Paul\n> \n> Thanks for your work.\n> \n> On 5/13/21 1:23 PM, Paul Elder wrote:\n>> Enable generation of documentation for mojom files. As doxygen cannot\n>> parse mojom files directly, put the comments in a cpp file instead, and\n>> plumb meson and doxygen accordingly.\n>>\n>> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n>>\n>> ---\n>> Obviously we'll have to remove the documentation from core.mojom, and\n>> add documentation accordingly to the other mojom files. This is still\n>> and RFC just to see if this is the direction we want to go.\n> Perfectly understand-able. And this is already looking in a decent shape\n> for starters.\n>> ---\n>>   Documentation/Doxyfile.in                    |   4 +-\n>>   Documentation/meson.build                    |   1 +\n>>   include/libcamera/ipa/core_ipa_interface.cpp | 190 +++++++++++++++++++\n>>   include/libcamera/ipa/meson.build            |   4 +\n>>   4 files changed, 197 insertions(+), 2 deletions(-)\n>>   create mode 100644 include/libcamera/ipa/core_ipa_interface.cpp\n>>\n>> diff --git a/Documentation/Doxyfile.in b/Documentation/Doxyfile.in\n>> index af006724..213adb9b 100644\n>> --- a/Documentation/Doxyfile.in\n>> +++ b/Documentation/Doxyfile.in\n>> @@ -844,7 +844,6 @@ EXCLUDE                =\n>> @TOP_SRCDIR@/include/libcamera/span.h \\\n>>                @TOP_SRCDIR@/src/libcamera/pipeline/ \\\n>>                @TOP_SRCDIR@/src/libcamera/tracepoints.cpp \\\n>>                @TOP_BUILDDIR@/include/libcamera/internal/tracepoints.h \\\n>> -             @TOP_BUILDDIR@/include/libcamera/ipa/ \\\n>>                @TOP_BUILDDIR@/src/libcamera/proxy/\n>>     # The EXCLUDE_SYMLINKS tag can be used to select whether or not\n>> files or\n>> @@ -861,7 +860,8 @@ EXCLUDE_SYMLINKS       = NO\n>>   # Note that the wildcards are matched against the file with absolute\n>> path, so to\n>>   # exclude all test directories for example use the pattern */test/*\n>>   -EXCLUDE_PATTERNS       =\n>> +EXCLUDE_PATTERNS       =\n>> @TOP_BUILDDIR@/include/libcamera/ipa/*_serializer.h \\\n>> +             @TOP_BUILDDIR@/include/libcamera/ipa/*_proxy.h\n>>     # The EXCLUDE_SYMBOLS tag can be used to specify one or more\n>> symbol names\n>>   # (namespaces, classes, functions, etc.) that should be excluded\n>> from the\n>> diff --git a/Documentation/meson.build b/Documentation/meson.build\n>> index c8521574..86f1134b 100644\n>> --- a/Documentation/meson.build\n>> +++ b/Documentation/meson.build\n>> @@ -23,6 +23,7 @@ if doxygen.found() and dot.found()\n>>                     input : [\n>>                         doxyfile,\n>>                         libcamera_internal_headers,\n>> +                      libcamera_ipa_docs,\n>>                         libcamera_ipa_headers,\n>>                         libcamera_public_headers,\n>>                         libcamera_sources,\n>> diff --git a/include/libcamera/ipa/core_ipa_interface.cpp\n>> b/include/libcamera/ipa/core_ipa_interface.cpp\n> 2 questions\n>  - Is it okay to have a .cpp in /include/ $includedir? Maybe yes, but I\n> am not sure\n\nI would say no ;-) Not unless someone intends to include the .cpp file.\n\n\n>  - I have a struct to be documented in ipu3.mojom, so should I be making\n> ipu3_ipa_interface.cpp in the same way, for documenting it? (or have\n> only one \"doc\" file consolidation)?\n\nYes, it should be separated (as you have done). But it should be under\nsrc/libcamera/ipa/ IMO\n\n\n\n>> new file mode 100644\n>> index 00000000..f9820b92\n>> --- /dev/null\n>> +++ b/include/libcamera/ipa/core_ipa_interface.cpp\n>> @@ -0,0 +1,190 @@\n>> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n>> +\n>> +namespace libcamera {\n>> +\n>> +/**\n>> + * \\struct CameraSensorInfo\n>> + * \\brief Report the image sensor characteristics\n>> + *\n>> + * The structure reports image sensor characteristics used by IPA\n>> modules to\n>> + * tune their algorithms based on the image sensor model currently in\n>> use and\n>> + * its configuration.\n>> + *\n>> + * The reported information describes the sensor's intrinsics\n>> characteristics,\n>> + * such as its pixel array size and the sensor model name, as well as\n>> + * information relative to the currently configured mode, such as the\n>> produced\n>> + * image size and the bit depth of the requested image format.\n>> + *\n>> + * Instances of this structure are meant to be assembled by the\n>> CameraSensor\n>> + * class by inspecting the sensor static properties as well as\n>> information\n>> + * relative to the current configuration.\n>> + */\n>> +\n>> +/**\n>> + * \\var CameraSensorInfo::model\n>> + * \\brief The image sensor model name\n>> + *\n>> + * The sensor model name is a free-formed string that uniquely\n>> identifies the\n>> + * sensor model.\n>> + */\n>> +\n>> +/**\n>> + * \\var CameraSensorInfo::bitsPerPixel\n>> + * \\brief The number of bits per pixel of the image format produced\n>> by the\n>> + * image sensor\n>> + */\n>> +\n>> +/**\n>> + * \\var CameraSensorInfo::activeAreaSize\n>> + * \\brief The size of the pixel array active area of the sensor\n>> + */\n>> +\n>> +/**\n>> + * \\var CameraSensorInfo::analogCrop\n>> + * \\brief The portion of the pixel array active area which is\n>> read-out and\n>> + * processed\n>> + *\n>> + * The analog crop rectangle top-left corner is defined as the\n>> displacement\n>> + * from the top-left corner of the pixel array active area. The\n>> rectangle\n>> + * horizontal and vertical sizes define the portion of the pixel\n>> array which\n>> + * is read-out and provided to the sensor's internal processing\n>> pipeline, before\n>> + * any pixel sub-sampling method, such as pixel binning, skipping and\n>> averaging\n>> + * take place.\n>> + */\n>> +\n>> +/**\n>> + * \\var CameraSensorInfo::outputSize\n>> + * \\brief The size of the images produced by the camera sensor\n>> + *\n>> + * The output image size defines the horizontal and vertical sizes of\n>> the images\n>> + * produced by the image sensor. The output image size is defined as\n>> the end\n>> + * result of the sensor's internal image processing pipeline stages,\n>> applied on\n>> + * the pixel array portion defined by the analog crop rectangle. Each\n>> image\n>> + * processing stage that performs pixel sub-sampling techniques, such\n>> as pixel\n>> + * binning or skipping, or perform any additional digital scaling\n>> concur in the\n>> + * definition of the output image size.\n>> + */\n>> +\n>> +/**\n>> + * \\var CameraSensorInfo::pixelRate\n>> + * \\brief The number of pixels produced in a second\n>> + *\n>> + * To obtain the read-out time in seconds of a full line:\n>> + *\n>> + * \\verbatim\n>> +    lineDuration(s) = lineLength(pixels) / pixelRate(pixels per second)\n>> +   \\endverbatim\n>> + */\n>> +\n>> +/**\n>> + * \\var CameraSensorInfo::lineLength\n>> + * \\brief Total line length in pixels\n>> + *\n>> + * The total line length in pixel clock periods, including blanking.\n>> + */\n>> +\n>> +/**\n>> + * \\var CameraSensorInfo::minFrameLength\n>> + * \\brief The minimum allowable frame length in units of lines\n>> + *\n>> + * The sensor frame length comprises of active output lines and\n>> blanking lines\n>> + * in a frame. The minimum frame length value dictates the minimum\n>> allowable\n>> + * frame duration of the sensor mode.\n>> + *\n>> + * To obtain the minimum frame duration:\n>> + *\n>> + * \\verbatim\n>> +    frameDuration(s) = minFrameLength(lines) * lineLength(pixels) /\n>> pixelRate(pixels per second)\n>> +   \\endverbatim\n>> + */\n>> +\n>> +/**\n>> + * \\var CameraSensorInfo::maxFrameLength\n>> + * \\brief The maximum allowable frame length in units of lines\n>> + *\n>> + * The sensor frame length comprises of active output lines and\n>> blanking lines\n>> + * in a frame. The maximum frame length value dictates the maximum\n>> allowable\n>> + * frame duration of the sensor mode.\n>> + *\n>> + * To obtain the maximum frame duration:\n>> + *\n>> + * \\verbatim\n>> +    frameDuration(s) = maxFrameLength(lines) * lineLength(pixels) /\n>> pixelRate(pixels per second)\n>> +   \\endverbatim\n>> + */\n>> +\n>> +/**\n>> + * \\struct IPABuffer\n>> + * \\brief Buffer information for the IPA interface\n>> + *\n>> + * The IPABuffer structure associates buffer memory with a unique ID.\n>> It is\n>> + * used to map buffers to the IPA with IPAInterface::mapBuffers(),\n>> after which\n>> + * buffers will be identified by their ID in the IPA interface.\n>> + */\n>> +\n>> +/**\n>> + * \\var IPABuffer::id\n>> + * \\brief The buffer unique ID\n>> + *\n>> + * Buffers mapped to the IPA are identified by numerical unique IDs.\n>> The IDs\n>> + * are chosen by the pipeline handler to fulfil the following\n>> constraints:\n>> + *\n>> + * - IDs shall be positive integers different than zero\n>> + * - IDs shall be unique among all mapped buffers\n>> + *\n>> + * When buffers are unmapped with IPAInterface::unmapBuffers() their\n>> IDs are\n>> + * freed and may be reused for new buffer mappings.\n>> + */\n>> +\n>> +/**\n>> + * \\var IPABuffer::planes\n>> + * \\brief The buffer planes description\n>> + *\n>> + * Stores the dmabuf handle and length for each plane of the buffer.\n>> + */\n>> +\n>> +/**\n>> + * \\struct IPASettings\n>> + * \\brief IPA interface initialization settings\n>> + *\n>> + * The IPASettings structure stores data passed to the\n>> IPAInterface::init()\n>> + * function. The data contains settings that don't depend on a\n>> particular camera\n>> + * or pipeline configuration and are valid for the whole life time of\n>> the IPA\n>> + * interface.\n>> + */\n>> +\n>> +/**\n>> + * \\var IPASettings::configurationFile\n>> + * \\brief The name of the IPA configuration file\n>> + *\n>> + * This field may be an empty string if the IPA doesn't require a\n>> configuration\n>> + * file.\n>> + */\n>> +\n>> + /**\n>> + * \\var IPASettings::sensorModel\n>> + * \\brief The sensor model name\n>> + *\n>> + * Provides the sensor model name to the IPA.\n>> + */\n>> +\n>> +/**\n>> + * \\struct IPAStream\n>> + * \\brief Stream configuration for the IPA interface\n>> + *\n>> + * The IPAStream structure stores stream configuration parameters\n>> needed by the\n>> + * IPAInterface::configure() method. It mirrors the\n>> StreamConfiguration class\n>> + * that is not suitable for this purpose due to not being serializable.\n>> + */\n>> +\n>> +/**\n>> + * \\var IPAStream::pixelFormat\n>> + * \\brief The stream pixel format\n>> + */\n>> +\n>> +/**\n>> + * \\var IPAStream::size\n>> + * \\brief The stream size in pixels\n>> + */\n>> +\n>> +} /* namespace libcamera */\n>> diff --git a/include/libcamera/ipa/meson.build\n>> b/include/libcamera/ipa/meson.build\n>> index 40c4e737..69bc855e 100644\n>> --- a/include/libcamera/ipa/meson.build\n>> +++ b/include/libcamera/ipa/meson.build\n>> @@ -6,6 +6,10 @@ libcamera_ipa_headers = files([\n>>       'ipa_module_info.h',\n>>   ])\n>>   +libcamera_ipa_docs = files([\n>> +    'core_ipa_interface.cpp',\n>> +])\n>> +\n>>   install_headers(libcamera_ipa_headers,\n>>                   subdir: libcamera_include_dir / 'ipa')\n>>   \n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 3BE8FC31F8\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 14 May 2021 09:54:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6EF096891C;\n\tFri, 14 May 2021 11:54:21 +0200 (CEST)","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 1456668911\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 14 May 2021 11:54:20 +0200 (CEST)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 67F1A9F0;\n\tFri, 14 May 2021 11:54:19 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"B+3ZLvQn\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1620986059;\n\tbh=XHLIgWA19ih6lNn0edovwz8I/3bXUX+qop827mX+tNs=;\n\th=Reply-To:Subject:To:References:From:Date:In-Reply-To:From;\n\tb=B+3ZLvQnkb5ObvGobNgpBFxpKMy7CCmo6Tg7/RJaGI8Pine+GYavq0H8AT9yrwJvY\n\tIkzk3/D9rcm+SK4eg3QvfpCxM0N+ERYfK1mgEnGBfQiMUe4kfUrWCrg/BdR7u+5Ftj\n\teKDks35ldLZ7ss4oj4Jx/ZhWdeQPLf+4bAcmVAN8=","To":"Umang Jain <umang.jain@ideasonboard.com>,\n\tPaul Elder <paul.elder@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20210513075346.739370-1-paul.elder@ideasonboard.com>\n\t<f1cd1b0d-2524-5384-24d1-22f624d2b1a2@ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Organization":"Ideas on Board","Message-ID":"<8cf47f8d-2fd6-33a0-9261-b34e6721fb56@ideasonboard.com>","Date":"Fri, 14 May 2021 10:54:17 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.7.1","MIME-Version":"1.0","In-Reply-To":"<f1cd1b0d-2524-5384-24d1-22f624d2b1a2@ideasonboard.com>","Content-Language":"en-GB","Subject":"Re: [libcamera-devel] [RFC PATCH] ipa: Documentation: Enable\n\tdocumentation of mojom files","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","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>","Reply-To":"kieran.bingham@ideasonboard.com","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":16960,"web_url":"https://patchwork.libcamera.org/comment/16960/","msgid":"<YKASPuCbltbGQg9u@pendragon.ideasonboard.com>","date":"2021-05-15T18:26:06","subject":"Re: [libcamera-devel] [RFC PATCH] ipa: Documentation: Enable\n\tdocumentation of mojom files","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 Thu, May 13, 2021 at 04:53:46PM +0900, Paul Elder wrote:\n> Enable generation of documentation for mojom files. As doxygen cannot\n> parse mojom files directly, put the comments in a cpp file instead, and\n> plumb meson and doxygen accordingly.\n\nA really open question: would it make sense to write a small python\nscript that would extract the comments from the .mojom files and\ngenerate .cpp files, to keep the documentation close to the definition\nof the data types ? We don't do so for C++ data types, so maybe it's\nfine to move the documentation to .cpp files manually. Conceptually we\ncould generate code in different languages, in which case it would make\nmore sense to have the documentation in the .mojom file, but I doubt\nwe'll ever do so.\n\n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> \n> ---\n> Obviously we'll have to remove the documentation from core.mojom, and\n> add documentation accordingly to the other mojom files. This is still\n> and RFC just to see if this is the direction we want to go.\n> ---\n>  Documentation/Doxyfile.in                    |   4 +-\n>  Documentation/meson.build                    |   1 +\n>  include/libcamera/ipa/core_ipa_interface.cpp | 190 +++++++++++++++++++\n>  include/libcamera/ipa/meson.build            |   4 +\n>  4 files changed, 197 insertions(+), 2 deletions(-)\n>  create mode 100644 include/libcamera/ipa/core_ipa_interface.cpp\n> \n> diff --git a/Documentation/Doxyfile.in b/Documentation/Doxyfile.in\n> index af006724..213adb9b 100644\n> --- a/Documentation/Doxyfile.in\n> +++ b/Documentation/Doxyfile.in\n> @@ -844,7 +844,6 @@ EXCLUDE                = @TOP_SRCDIR@/include/libcamera/span.h \\\n>  \t\t\t @TOP_SRCDIR@/src/libcamera/pipeline/ \\\n>  \t\t\t @TOP_SRCDIR@/src/libcamera/tracepoints.cpp \\\n>  \t\t\t @TOP_BUILDDIR@/include/libcamera/internal/tracepoints.h \\\n> -\t\t\t @TOP_BUILDDIR@/include/libcamera/ipa/ \\\n>  \t\t\t @TOP_BUILDDIR@/src/libcamera/proxy/\n>  \n>  # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or\n> @@ -861,7 +860,8 @@ EXCLUDE_SYMLINKS       = NO\n>  # Note that the wildcards are matched against the file with absolute path, so to\n>  # exclude all test directories for example use the pattern */test/*\n>  \n> -EXCLUDE_PATTERNS       =\n> +EXCLUDE_PATTERNS       = @TOP_BUILDDIR@/include/libcamera/ipa/*_serializer.h \\\n> +\t\t\t @TOP_BUILDDIR@/include/libcamera/ipa/*_proxy.h\n>  \n>  # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names\n>  # (namespaces, classes, functions, etc.) that should be excluded from the\n> diff --git a/Documentation/meson.build b/Documentation/meson.build\n> index c8521574..86f1134b 100644\n> --- a/Documentation/meson.build\n> +++ b/Documentation/meson.build\n> @@ -23,6 +23,7 @@ if doxygen.found() and dot.found()\n>                    input : [\n>                        doxyfile,\n>                        libcamera_internal_headers,\n> +                      libcamera_ipa_docs,\n>                        libcamera_ipa_headers,\n>                        libcamera_public_headers,\n>                        libcamera_sources,\n> diff --git a/include/libcamera/ipa/core_ipa_interface.cpp b/include/libcamera/ipa/core_ipa_interface.cpp\n> new file mode 100644\n> index 00000000..f9820b92\n> --- /dev/null\n> +++ b/include/libcamera/ipa/core_ipa_interface.cpp\n> @@ -0,0 +1,190 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +\n> +namespace libcamera {\n> +\n> +/**\n> + * \\struct CameraSensorInfo\n> + * \\brief Report the image sensor characteristics\n> + *\n> + * The structure reports image sensor characteristics used by IPA modules to\n> + * tune their algorithms based on the image sensor model currently in use and\n> + * its configuration.\n> + *\n> + * The reported information describes the sensor's intrinsics characteristics,\n> + * such as its pixel array size and the sensor model name, as well as\n> + * information relative to the currently configured mode, such as the produced\n> + * image size and the bit depth of the requested image format.\n> + *\n> + * Instances of this structure are meant to be assembled by the CameraSensor\n> + * class by inspecting the sensor static properties as well as information\n> + * relative to the current configuration.\n> + */\n> +\n> +/**\n> + * \\var CameraSensorInfo::model\n> + * \\brief The image sensor model name\n> + *\n> + * The sensor model name is a free-formed string that uniquely identifies the\n> + * sensor model.\n> + */\n> +\n> +/**\n> + * \\var CameraSensorInfo::bitsPerPixel\n> + * \\brief The number of bits per pixel of the image format produced by the\n> + * image sensor\n> + */\n> +\n> +/**\n> + * \\var CameraSensorInfo::activeAreaSize\n> + * \\brief The size of the pixel array active area of the sensor\n> + */\n> +\n> +/**\n> + * \\var CameraSensorInfo::analogCrop\n> + * \\brief The portion of the pixel array active area which is read-out and\n> + * processed\n> + *\n> + * The analog crop rectangle top-left corner is defined as the displacement\n> + * from the top-left corner of the pixel array active area. The rectangle\n> + * horizontal and vertical sizes define the portion of the pixel array which\n> + * is read-out and provided to the sensor's internal processing pipeline, before\n> + * any pixel sub-sampling method, such as pixel binning, skipping and averaging\n> + * take place.\n> + */\n> +\n> +/**\n> + * \\var CameraSensorInfo::outputSize\n> + * \\brief The size of the images produced by the camera sensor\n> + *\n> + * The output image size defines the horizontal and vertical sizes of the images\n> + * produced by the image sensor. The output image size is defined as the end\n> + * result of the sensor's internal image processing pipeline stages, applied on\n> + * the pixel array portion defined by the analog crop rectangle. Each image\n> + * processing stage that performs pixel sub-sampling techniques, such as pixel\n> + * binning or skipping, or perform any additional digital scaling concur in the\n> + * definition of the output image size.\n> + */\n> +\n> +/**\n> + * \\var CameraSensorInfo::pixelRate\n> + * \\brief The number of pixels produced in a second\n> + *\n> + * To obtain the read-out time in seconds of a full line:\n> + *\n> + * \\verbatim\n> +\tlineDuration(s) = lineLength(pixels) / pixelRate(pixels per second)\n> +   \\endverbatim\n> + */\n> +\n> +/**\n> + * \\var CameraSensorInfo::lineLength\n> + * \\brief Total line length in pixels\n> + *\n> + * The total line length in pixel clock periods, including blanking.\n> + */\n> +\n> +/**\n> + * \\var CameraSensorInfo::minFrameLength\n> + * \\brief The minimum allowable frame length in units of lines\n> + *\n> + * The sensor frame length comprises of active output lines and blanking lines\n> + * in a frame. The minimum frame length value dictates the minimum allowable\n> + * frame duration of the sensor mode.\n> + *\n> + * To obtain the minimum frame duration:\n> + *\n> + * \\verbatim\n> +\tframeDuration(s) = minFrameLength(lines) * lineLength(pixels) / pixelRate(pixels per second)\n> +   \\endverbatim\n> + */\n> +\n> +/**\n> + * \\var CameraSensorInfo::maxFrameLength\n> + * \\brief The maximum allowable frame length in units of lines\n> + *\n> + * The sensor frame length comprises of active output lines and blanking lines\n> + * in a frame. The maximum frame length value dictates the maximum allowable\n> + * frame duration of the sensor mode.\n> + *\n> + * To obtain the maximum frame duration:\n> + *\n> + * \\verbatim\n> +\tframeDuration(s) = maxFrameLength(lines) * lineLength(pixels) / pixelRate(pixels per second)\n> +   \\endverbatim\n> + */\n> +\n> +/**\n> + * \\struct IPABuffer\n> + * \\brief Buffer information for the IPA interface\n> + *\n> + * The IPABuffer structure associates buffer memory with a unique ID. It is\n> + * used to map buffers to the IPA with IPAInterface::mapBuffers(), after which\n> + * buffers will be identified by their ID in the IPA interface.\n> + */\n> +\n> +/**\n> + * \\var IPABuffer::id\n> + * \\brief The buffer unique ID\n> + *\n> + * Buffers mapped to the IPA are identified by numerical unique IDs. The IDs\n> + * are chosen by the pipeline handler to fulfil the following constraints:\n> + *\n> + * - IDs shall be positive integers different than zero\n> + * - IDs shall be unique among all mapped buffers\n> + *\n> + * When buffers are unmapped with IPAInterface::unmapBuffers() their IDs are\n> + * freed and may be reused for new buffer mappings.\n> + */\n> +\n> +/**\n> + * \\var IPABuffer::planes\n> + * \\brief The buffer planes description\n> + *\n> + * Stores the dmabuf handle and length for each plane of the buffer.\n> + */\n> +\n> +/**\n> + * \\struct IPASettings\n> + * \\brief IPA interface initialization settings\n> + *\n> + * The IPASettings structure stores data passed to the IPAInterface::init()\n> + * function. The data contains settings that don't depend on a particular camera\n> + * or pipeline configuration and are valid for the whole life time of the IPA\n> + * interface.\n> + */\n> +\n> +/**\n> + * \\var IPASettings::configurationFile\n> + * \\brief The name of the IPA configuration file\n> + *\n> + * This field may be an empty string if the IPA doesn't require a configuration\n> + * file.\n> + */\n> +\n> + /**\n> + * \\var IPASettings::sensorModel\n> + * \\brief The sensor model name\n> + *\n> + * Provides the sensor model name to the IPA.\n> + */\n> +\n> +/**\n> + * \\struct IPAStream\n> + * \\brief Stream configuration for the IPA interface\n> + *\n> + * The IPAStream structure stores stream configuration parameters needed by the\n> + * IPAInterface::configure() method. It mirrors the StreamConfiguration class\n> + * that is not suitable for this purpose due to not being serializable.\n> + */\n> +\n> +/**\n> + * \\var IPAStream::pixelFormat\n> + * \\brief The stream pixel format\n> + */\n> +\n> +/**\n> + * \\var IPAStream::size\n> + * \\brief The stream size in pixels\n> + */\n> +\n> +} /* namespace libcamera */\n> diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build\n> index 40c4e737..69bc855e 100644\n> --- a/include/libcamera/ipa/meson.build\n> +++ b/include/libcamera/ipa/meson.build\n> @@ -6,6 +6,10 @@ libcamera_ipa_headers = files([\n>      'ipa_module_info.h',\n>  ])\n>  \n> +libcamera_ipa_docs = files([\n> +    'core_ipa_interface.cpp',\n> +])\n> +\n>  install_headers(libcamera_ipa_headers,\n>                  subdir: libcamera_include_dir / 'ipa')\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id D18F1C31FC\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 15 May 2021 18:26:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 21DF86891D;\n\tSat, 15 May 2021 20:26:17 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 58FAE6891A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 15 May 2021 20:26:16 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D221A436;\n\tSat, 15 May 2021 20:26:15 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"EkN/3OYw\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621103176;\n\tbh=z9mNoBMjX3iqanuqF64FCDsa81KqEHveJ0oUYQxxzpM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=EkN/3OYwrV4uqAEN5rniYQ/cyYWk1I9gJCkvVQ5fQMle6JIK+j45BGKV6X2SkMMp+\n\tEYP4102MW6+9hP78T6XdGSKeU6DRXzTSd5T0op5+CMFjzpS6wYRHU40f32K8HCx4ca\n\tcYZ/mEltaBuTkLfNKFFM357YIZLTcEl1/cvk+oBk=","Date":"Sat, 15 May 2021 21:26:06 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<YKASPuCbltbGQg9u@pendragon.ideasonboard.com>","References":"<20210513075346.739370-1-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210513075346.739370-1-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [RFC PATCH] ipa: Documentation: Enable\n\tdocumentation of mojom files","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":16983,"web_url":"https://patchwork.libcamera.org/comment/16983/","msgid":"<99c3e281-17b3-4411-d0f2-d2c89a60ace9@ideasonboard.com>","date":"2021-05-17T09:26:31","subject":"Re: [libcamera-devel] [RFC PATCH] ipa: Documentation: Enable\n\tdocumentation of mojom files","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Laurent,\n\nOn 15/05/2021 19:26, Laurent Pinchart wrote:\n> Hi Paul,\n> \n> Thank you for the patch.\n> \n> On Thu, May 13, 2021 at 04:53:46PM +0900, Paul Elder wrote:\n>> Enable generation of documentation for mojom files. As doxygen cannot\n>> parse mojom files directly, put the comments in a cpp file instead, and\n>> plumb meson and doxygen accordingly.\n> \n> A really open question: would it make sense to write a small python\n> script that would extract the comments from the .mojom files and\n> generate .cpp files, to keep the documentation close to the definition\n> of the data types ? We don't do so for C++ data types, so maybe it's\n> fine to move the documentation to .cpp files manually. Conceptually we\n> could generate code in different languages, in which case it would make\n> more sense to have the documentation in the .mojom file, but I doubt\n> we'll ever do so.\n\nIf we're going to do that we may as well update doxygen to parse mojom\nfiles.\n\nIf we script generating some .cpp files to move documentation into, then\nwe have to manually add those .cpp files into the meson.build and link\nthose generated files to doxygen anyway.\n\nAt that point, it's probably better that we simply pass the mojom files\nto Doxygen and teach it how to parse it for comments (or more likely,\nhow to ignore any mojom specifics).\n\nBut that then incurs a penalty of requiring to get that unstreamed to\ndoxygen and requiring that version before it can be used by anyone\nbuilding our documentation... :-(\n\n--\nKieran\n\n\n\n>> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n>>\n>> ---\n>> Obviously we'll have to remove the documentation from core.mojom, and\n>> add documentation accordingly to the other mojom files. This is still\n>> and RFC just to see if this is the direction we want to go.\n>> ---\n>>  Documentation/Doxyfile.in                    |   4 +-\n>>  Documentation/meson.build                    |   1 +\n>>  include/libcamera/ipa/core_ipa_interface.cpp | 190 +++++++++++++++++++\n>>  include/libcamera/ipa/meson.build            |   4 +\n>>  4 files changed, 197 insertions(+), 2 deletions(-)\n>>  create mode 100644 include/libcamera/ipa/core_ipa_interface.cpp\n>>\n>> diff --git a/Documentation/Doxyfile.in b/Documentation/Doxyfile.in\n>> index af006724..213adb9b 100644\n>> --- a/Documentation/Doxyfile.in\n>> +++ b/Documentation/Doxyfile.in\n>> @@ -844,7 +844,6 @@ EXCLUDE                = @TOP_SRCDIR@/include/libcamera/span.h \\\n>>  \t\t\t @TOP_SRCDIR@/src/libcamera/pipeline/ \\\n>>  \t\t\t @TOP_SRCDIR@/src/libcamera/tracepoints.cpp \\\n>>  \t\t\t @TOP_BUILDDIR@/include/libcamera/internal/tracepoints.h \\\n>> -\t\t\t @TOP_BUILDDIR@/include/libcamera/ipa/ \\\n>>  \t\t\t @TOP_BUILDDIR@/src/libcamera/proxy/\n>>  \n>>  # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or\n>> @@ -861,7 +860,8 @@ EXCLUDE_SYMLINKS       = NO\n>>  # Note that the wildcards are matched against the file with absolute path, so to\n>>  # exclude all test directories for example use the pattern */test/*\n>>  \n>> -EXCLUDE_PATTERNS       =\n>> +EXCLUDE_PATTERNS       = @TOP_BUILDDIR@/include/libcamera/ipa/*_serializer.h \\\n>> +\t\t\t @TOP_BUILDDIR@/include/libcamera/ipa/*_proxy.h\n>>  \n>>  # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names\n>>  # (namespaces, classes, functions, etc.) that should be excluded from the\n>> diff --git a/Documentation/meson.build b/Documentation/meson.build\n>> index c8521574..86f1134b 100644\n>> --- a/Documentation/meson.build\n>> +++ b/Documentation/meson.build\n>> @@ -23,6 +23,7 @@ if doxygen.found() and dot.found()\n>>                    input : [\n>>                        doxyfile,\n>>                        libcamera_internal_headers,\n>> +                      libcamera_ipa_docs,\n>>                        libcamera_ipa_headers,\n>>                        libcamera_public_headers,\n>>                        libcamera_sources,\n>> diff --git a/include/libcamera/ipa/core_ipa_interface.cpp b/include/libcamera/ipa/core_ipa_interface.cpp\n>> new file mode 100644\n>> index 00000000..f9820b92\n>> --- /dev/null\n>> +++ b/include/libcamera/ipa/core_ipa_interface.cpp\n>> @@ -0,0 +1,190 @@\n>> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n>> +\n>> +namespace libcamera {\n>> +\n>> +/**\n>> + * \\struct CameraSensorInfo\n>> + * \\brief Report the image sensor characteristics\n>> + *\n>> + * The structure reports image sensor characteristics used by IPA modules to\n>> + * tune their algorithms based on the image sensor model currently in use and\n>> + * its configuration.\n>> + *\n>> + * The reported information describes the sensor's intrinsics characteristics,\n>> + * such as its pixel array size and the sensor model name, as well as\n>> + * information relative to the currently configured mode, such as the produced\n>> + * image size and the bit depth of the requested image format.\n>> + *\n>> + * Instances of this structure are meant to be assembled by the CameraSensor\n>> + * class by inspecting the sensor static properties as well as information\n>> + * relative to the current configuration.\n>> + */\n>> +\n>> +/**\n>> + * \\var CameraSensorInfo::model\n>> + * \\brief The image sensor model name\n>> + *\n>> + * The sensor model name is a free-formed string that uniquely identifies the\n>> + * sensor model.\n>> + */\n>> +\n>> +/**\n>> + * \\var CameraSensorInfo::bitsPerPixel\n>> + * \\brief The number of bits per pixel of the image format produced by the\n>> + * image sensor\n>> + */\n>> +\n>> +/**\n>> + * \\var CameraSensorInfo::activeAreaSize\n>> + * \\brief The size of the pixel array active area of the sensor\n>> + */\n>> +\n>> +/**\n>> + * \\var CameraSensorInfo::analogCrop\n>> + * \\brief The portion of the pixel array active area which is read-out and\n>> + * processed\n>> + *\n>> + * The analog crop rectangle top-left corner is defined as the displacement\n>> + * from the top-left corner of the pixel array active area. The rectangle\n>> + * horizontal and vertical sizes define the portion of the pixel array which\n>> + * is read-out and provided to the sensor's internal processing pipeline, before\n>> + * any pixel sub-sampling method, such as pixel binning, skipping and averaging\n>> + * take place.\n>> + */\n>> +\n>> +/**\n>> + * \\var CameraSensorInfo::outputSize\n>> + * \\brief The size of the images produced by the camera sensor\n>> + *\n>> + * The output image size defines the horizontal and vertical sizes of the images\n>> + * produced by the image sensor. The output image size is defined as the end\n>> + * result of the sensor's internal image processing pipeline stages, applied on\n>> + * the pixel array portion defined by the analog crop rectangle. Each image\n>> + * processing stage that performs pixel sub-sampling techniques, such as pixel\n>> + * binning or skipping, or perform any additional digital scaling concur in the\n>> + * definition of the output image size.\n>> + */\n>> +\n>> +/**\n>> + * \\var CameraSensorInfo::pixelRate\n>> + * \\brief The number of pixels produced in a second\n>> + *\n>> + * To obtain the read-out time in seconds of a full line:\n>> + *\n>> + * \\verbatim\n>> +\tlineDuration(s) = lineLength(pixels) / pixelRate(pixels per second)\n>> +   \\endverbatim\n>> + */\n>> +\n>> +/**\n>> + * \\var CameraSensorInfo::lineLength\n>> + * \\brief Total line length in pixels\n>> + *\n>> + * The total line length in pixel clock periods, including blanking.\n>> + */\n>> +\n>> +/**\n>> + * \\var CameraSensorInfo::minFrameLength\n>> + * \\brief The minimum allowable frame length in units of lines\n>> + *\n>> + * The sensor frame length comprises of active output lines and blanking lines\n>> + * in a frame. The minimum frame length value dictates the minimum allowable\n>> + * frame duration of the sensor mode.\n>> + *\n>> + * To obtain the minimum frame duration:\n>> + *\n>> + * \\verbatim\n>> +\tframeDuration(s) = minFrameLength(lines) * lineLength(pixels) / pixelRate(pixels per second)\n>> +   \\endverbatim\n>> + */\n>> +\n>> +/**\n>> + * \\var CameraSensorInfo::maxFrameLength\n>> + * \\brief The maximum allowable frame length in units of lines\n>> + *\n>> + * The sensor frame length comprises of active output lines and blanking lines\n>> + * in a frame. The maximum frame length value dictates the maximum allowable\n>> + * frame duration of the sensor mode.\n>> + *\n>> + * To obtain the maximum frame duration:\n>> + *\n>> + * \\verbatim\n>> +\tframeDuration(s) = maxFrameLength(lines) * lineLength(pixels) / pixelRate(pixels per second)\n>> +   \\endverbatim\n>> + */\n>> +\n>> +/**\n>> + * \\struct IPABuffer\n>> + * \\brief Buffer information for the IPA interface\n>> + *\n>> + * The IPABuffer structure associates buffer memory with a unique ID. It is\n>> + * used to map buffers to the IPA with IPAInterface::mapBuffers(), after which\n>> + * buffers will be identified by their ID in the IPA interface.\n>> + */\n>> +\n>> +/**\n>> + * \\var IPABuffer::id\n>> + * \\brief The buffer unique ID\n>> + *\n>> + * Buffers mapped to the IPA are identified by numerical unique IDs. The IDs\n>> + * are chosen by the pipeline handler to fulfil the following constraints:\n>> + *\n>> + * - IDs shall be positive integers different than zero\n>> + * - IDs shall be unique among all mapped buffers\n>> + *\n>> + * When buffers are unmapped with IPAInterface::unmapBuffers() their IDs are\n>> + * freed and may be reused for new buffer mappings.\n>> + */\n>> +\n>> +/**\n>> + * \\var IPABuffer::planes\n>> + * \\brief The buffer planes description\n>> + *\n>> + * Stores the dmabuf handle and length for each plane of the buffer.\n>> + */\n>> +\n>> +/**\n>> + * \\struct IPASettings\n>> + * \\brief IPA interface initialization settings\n>> + *\n>> + * The IPASettings structure stores data passed to the IPAInterface::init()\n>> + * function. The data contains settings that don't depend on a particular camera\n>> + * or pipeline configuration and are valid for the whole life time of the IPA\n>> + * interface.\n>> + */\n>> +\n>> +/**\n>> + * \\var IPASettings::configurationFile\n>> + * \\brief The name of the IPA configuration file\n>> + *\n>> + * This field may be an empty string if the IPA doesn't require a configuration\n>> + * file.\n>> + */\n>> +\n>> + /**\n>> + * \\var IPASettings::sensorModel\n>> + * \\brief The sensor model name\n>> + *\n>> + * Provides the sensor model name to the IPA.\n>> + */\n>> +\n>> +/**\n>> + * \\struct IPAStream\n>> + * \\brief Stream configuration for the IPA interface\n>> + *\n>> + * The IPAStream structure stores stream configuration parameters needed by the\n>> + * IPAInterface::configure() method. It mirrors the StreamConfiguration class\n>> + * that is not suitable for this purpose due to not being serializable.\n>> + */\n>> +\n>> +/**\n>> + * \\var IPAStream::pixelFormat\n>> + * \\brief The stream pixel format\n>> + */\n>> +\n>> +/**\n>> + * \\var IPAStream::size\n>> + * \\brief The stream size in pixels\n>> + */\n>> +\n>> +} /* namespace libcamera */\n>> diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build\n>> index 40c4e737..69bc855e 100644\n>> --- a/include/libcamera/ipa/meson.build\n>> +++ b/include/libcamera/ipa/meson.build\n>> @@ -6,6 +6,10 @@ libcamera_ipa_headers = files([\n>>      'ipa_module_info.h',\n>>  ])\n>>  \n>> +libcamera_ipa_docs = files([\n>> +    'core_ipa_interface.cpp',\n>> +])\n>> +\n>>  install_headers(libcamera_ipa_headers,\n>>                  subdir: libcamera_include_dir / 'ipa')\n>>  \n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id E8E2BC31FC\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 17 May 2021 09:26:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 525F3602B2;\n\tMon, 17 May 2021 11:26:37 +0200 (CEST)","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 2C701602B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 17 May 2021 11:26:35 +0200 (CEST)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 696FB88F;\n\tMon, 17 May 2021 11:26:34 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"hRafStum\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621243594;\n\tbh=/7VWe/mmSKZD7xhy4XPkQWdgkHzV/hxH5Q+4cdJ2D/c=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=hRafStumqyOoSpjmuiIh2fWEsB2v0vrkwl4pH8h9Fudaffq61qua+y7F/ZkayK9H8\n\tg6YcJ8G6uWTnqL1HoULpsnnWxSBuqYBO0iduI0CxNENSmOLmiuSet6npE0fdlgWoJJ\n\t4Rz6bmesTL30h6xKvtNnWW8DDqfTNVb3fOhwsTfY=","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tPaul Elder <paul.elder@ideasonboard.com>","References":"<20210513075346.739370-1-paul.elder@ideasonboard.com>\n\t<YKASPuCbltbGQg9u@pendragon.ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Organization":"Ideas on Board","Message-ID":"<99c3e281-17b3-4411-d0f2-d2c89a60ace9@ideasonboard.com>","Date":"Mon, 17 May 2021 10:26:31 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.7.1","MIME-Version":"1.0","In-Reply-To":"<YKASPuCbltbGQg9u@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [RFC PATCH] ipa: Documentation: Enable\n\tdocumentation of mojom files","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","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>","Reply-To":"kieran.bingham@ideasonboard.com","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":16984,"web_url":"https://patchwork.libcamera.org/comment/16984/","msgid":"<YKI4OcHfXonCziZ8@pendragon.ideasonboard.com>","date":"2021-05-17T09:32:41","subject":"Re: [libcamera-devel] [RFC PATCH] ipa: Documentation: Enable\n\tdocumentation of mojom files","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Mon, May 17, 2021 at 10:26:31AM +0100, Kieran Bingham wrote:\n> On 15/05/2021 19:26, Laurent Pinchart wrote:\n> > On Thu, May 13, 2021 at 04:53:46PM +0900, Paul Elder wrote:\n> >> Enable generation of documentation for mojom files. As doxygen cannot\n> >> parse mojom files directly, put the comments in a cpp file instead, and\n> >> plumb meson and doxygen accordingly.\n> > \n> > A really open question: would it make sense to write a small python\n> > script that would extract the comments from the .mojom files and\n> > generate .cpp files, to keep the documentation close to the definition\n> > of the data types ? We don't do so for C++ data types, so maybe it's\n> > fine to move the documentation to .cpp files manually. Conceptually we\n> > could generate code in different languages, in which case it would make\n> > more sense to have the documentation in the .mojom file, but I doubt\n> > we'll ever do so.\n> \n> If we're going to do that we may as well update doxygen to parse mojom\n> files.\n> \n> If we script generating some .cpp files to move documentation into, then\n> we have to manually add those .cpp files into the meson.build and link\n> those generated files to doxygen anyway.\n\nWe don't have to compile them though.\n\n> At that point, it's probably better that we simply pass the mojom files\n> to Doxygen and teach it how to parse it for comments (or more likely,\n> how to ignore any mojom specifics).\n> \n> But that then incurs a penalty of requiring to get that unstreamed to\n> doxygen and requiring that version before it can be used by anyone\n> building our documentation... :-(\n\nAnd it would also be orders of magnitude more complex to develop. I\ndon't think it would be reasonable to do so ourselves.\n\n> >> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> >>\n> >> ---\n> >> Obviously we'll have to remove the documentation from core.mojom, and\n> >> add documentation accordingly to the other mojom files. This is still\n> >> and RFC just to see if this is the direction we want to go.\n> >> ---\n> >>  Documentation/Doxyfile.in                    |   4 +-\n> >>  Documentation/meson.build                    |   1 +\n> >>  include/libcamera/ipa/core_ipa_interface.cpp | 190 +++++++++++++++++++\n> >>  include/libcamera/ipa/meson.build            |   4 +\n> >>  4 files changed, 197 insertions(+), 2 deletions(-)\n> >>  create mode 100644 include/libcamera/ipa/core_ipa_interface.cpp\n> >>\n> >> diff --git a/Documentation/Doxyfile.in b/Documentation/Doxyfile.in\n> >> index af006724..213adb9b 100644\n> >> --- a/Documentation/Doxyfile.in\n> >> +++ b/Documentation/Doxyfile.in\n> >> @@ -844,7 +844,6 @@ EXCLUDE                = @TOP_SRCDIR@/include/libcamera/span.h \\\n> >>  \t\t\t @TOP_SRCDIR@/src/libcamera/pipeline/ \\\n> >>  \t\t\t @TOP_SRCDIR@/src/libcamera/tracepoints.cpp \\\n> >>  \t\t\t @TOP_BUILDDIR@/include/libcamera/internal/tracepoints.h \\\n> >> -\t\t\t @TOP_BUILDDIR@/include/libcamera/ipa/ \\\n> >>  \t\t\t @TOP_BUILDDIR@/src/libcamera/proxy/\n> >>  \n> >>  # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or\n> >> @@ -861,7 +860,8 @@ EXCLUDE_SYMLINKS       = NO\n> >>  # Note that the wildcards are matched against the file with absolute path, so to\n> >>  # exclude all test directories for example use the pattern */test/*\n> >>  \n> >> -EXCLUDE_PATTERNS       =\n> >> +EXCLUDE_PATTERNS       = @TOP_BUILDDIR@/include/libcamera/ipa/*_serializer.h \\\n> >> +\t\t\t @TOP_BUILDDIR@/include/libcamera/ipa/*_proxy.h\n> >>  \n> >>  # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names\n> >>  # (namespaces, classes, functions, etc.) that should be excluded from the\n> >> diff --git a/Documentation/meson.build b/Documentation/meson.build\n> >> index c8521574..86f1134b 100644\n> >> --- a/Documentation/meson.build\n> >> +++ b/Documentation/meson.build\n> >> @@ -23,6 +23,7 @@ if doxygen.found() and dot.found()\n> >>                    input : [\n> >>                        doxyfile,\n> >>                        libcamera_internal_headers,\n> >> +                      libcamera_ipa_docs,\n> >>                        libcamera_ipa_headers,\n> >>                        libcamera_public_headers,\n> >>                        libcamera_sources,\n> >> diff --git a/include/libcamera/ipa/core_ipa_interface.cpp b/include/libcamera/ipa/core_ipa_interface.cpp\n> >> new file mode 100644\n> >> index 00000000..f9820b92\n> >> --- /dev/null\n> >> +++ b/include/libcamera/ipa/core_ipa_interface.cpp\n> >> @@ -0,0 +1,190 @@\n> >> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> >> +\n> >> +namespace libcamera {\n> >> +\n> >> +/**\n> >> + * \\struct CameraSensorInfo\n> >> + * \\brief Report the image sensor characteristics\n> >> + *\n> >> + * The structure reports image sensor characteristics used by IPA modules to\n> >> + * tune their algorithms based on the image sensor model currently in use and\n> >> + * its configuration.\n> >> + *\n> >> + * The reported information describes the sensor's intrinsics characteristics,\n> >> + * such as its pixel array size and the sensor model name, as well as\n> >> + * information relative to the currently configured mode, such as the produced\n> >> + * image size and the bit depth of the requested image format.\n> >> + *\n> >> + * Instances of this structure are meant to be assembled by the CameraSensor\n> >> + * class by inspecting the sensor static properties as well as information\n> >> + * relative to the current configuration.\n> >> + */\n> >> +\n> >> +/**\n> >> + * \\var CameraSensorInfo::model\n> >> + * \\brief The image sensor model name\n> >> + *\n> >> + * The sensor model name is a free-formed string that uniquely identifies the\n> >> + * sensor model.\n> >> + */\n> >> +\n> >> +/**\n> >> + * \\var CameraSensorInfo::bitsPerPixel\n> >> + * \\brief The number of bits per pixel of the image format produced by the\n> >> + * image sensor\n> >> + */\n> >> +\n> >> +/**\n> >> + * \\var CameraSensorInfo::activeAreaSize\n> >> + * \\brief The size of the pixel array active area of the sensor\n> >> + */\n> >> +\n> >> +/**\n> >> + * \\var CameraSensorInfo::analogCrop\n> >> + * \\brief The portion of the pixel array active area which is read-out and\n> >> + * processed\n> >> + *\n> >> + * The analog crop rectangle top-left corner is defined as the displacement\n> >> + * from the top-left corner of the pixel array active area. The rectangle\n> >> + * horizontal and vertical sizes define the portion of the pixel array which\n> >> + * is read-out and provided to the sensor's internal processing pipeline, before\n> >> + * any pixel sub-sampling method, such as pixel binning, skipping and averaging\n> >> + * take place.\n> >> + */\n> >> +\n> >> +/**\n> >> + * \\var CameraSensorInfo::outputSize\n> >> + * \\brief The size of the images produced by the camera sensor\n> >> + *\n> >> + * The output image size defines the horizontal and vertical sizes of the images\n> >> + * produced by the image sensor. The output image size is defined as the end\n> >> + * result of the sensor's internal image processing pipeline stages, applied on\n> >> + * the pixel array portion defined by the analog crop rectangle. Each image\n> >> + * processing stage that performs pixel sub-sampling techniques, such as pixel\n> >> + * binning or skipping, or perform any additional digital scaling concur in the\n> >> + * definition of the output image size.\n> >> + */\n> >> +\n> >> +/**\n> >> + * \\var CameraSensorInfo::pixelRate\n> >> + * \\brief The number of pixels produced in a second\n> >> + *\n> >> + * To obtain the read-out time in seconds of a full line:\n> >> + *\n> >> + * \\verbatim\n> >> +\tlineDuration(s) = lineLength(pixels) / pixelRate(pixels per second)\n> >> +   \\endverbatim\n> >> + */\n> >> +\n> >> +/**\n> >> + * \\var CameraSensorInfo::lineLength\n> >> + * \\brief Total line length in pixels\n> >> + *\n> >> + * The total line length in pixel clock periods, including blanking.\n> >> + */\n> >> +\n> >> +/**\n> >> + * \\var CameraSensorInfo::minFrameLength\n> >> + * \\brief The minimum allowable frame length in units of lines\n> >> + *\n> >> + * The sensor frame length comprises of active output lines and blanking lines\n> >> + * in a frame. The minimum frame length value dictates the minimum allowable\n> >> + * frame duration of the sensor mode.\n> >> + *\n> >> + * To obtain the minimum frame duration:\n> >> + *\n> >> + * \\verbatim\n> >> +\tframeDuration(s) = minFrameLength(lines) * lineLength(pixels) / pixelRate(pixels per second)\n> >> +   \\endverbatim\n> >> + */\n> >> +\n> >> +/**\n> >> + * \\var CameraSensorInfo::maxFrameLength\n> >> + * \\brief The maximum allowable frame length in units of lines\n> >> + *\n> >> + * The sensor frame length comprises of active output lines and blanking lines\n> >> + * in a frame. The maximum frame length value dictates the maximum allowable\n> >> + * frame duration of the sensor mode.\n> >> + *\n> >> + * To obtain the maximum frame duration:\n> >> + *\n> >> + * \\verbatim\n> >> +\tframeDuration(s) = maxFrameLength(lines) * lineLength(pixels) / pixelRate(pixels per second)\n> >> +   \\endverbatim\n> >> + */\n> >> +\n> >> +/**\n> >> + * \\struct IPABuffer\n> >> + * \\brief Buffer information for the IPA interface\n> >> + *\n> >> + * The IPABuffer structure associates buffer memory with a unique ID. It is\n> >> + * used to map buffers to the IPA with IPAInterface::mapBuffers(), after which\n> >> + * buffers will be identified by their ID in the IPA interface.\n> >> + */\n> >> +\n> >> +/**\n> >> + * \\var IPABuffer::id\n> >> + * \\brief The buffer unique ID\n> >> + *\n> >> + * Buffers mapped to the IPA are identified by numerical unique IDs. The IDs\n> >> + * are chosen by the pipeline handler to fulfil the following constraints:\n> >> + *\n> >> + * - IDs shall be positive integers different than zero\n> >> + * - IDs shall be unique among all mapped buffers\n> >> + *\n> >> + * When buffers are unmapped with IPAInterface::unmapBuffers() their IDs are\n> >> + * freed and may be reused for new buffer mappings.\n> >> + */\n> >> +\n> >> +/**\n> >> + * \\var IPABuffer::planes\n> >> + * \\brief The buffer planes description\n> >> + *\n> >> + * Stores the dmabuf handle and length for each plane of the buffer.\n> >> + */\n> >> +\n> >> +/**\n> >> + * \\struct IPASettings\n> >> + * \\brief IPA interface initialization settings\n> >> + *\n> >> + * The IPASettings structure stores data passed to the IPAInterface::init()\n> >> + * function. The data contains settings that don't depend on a particular camera\n> >> + * or pipeline configuration and are valid for the whole life time of the IPA\n> >> + * interface.\n> >> + */\n> >> +\n> >> +/**\n> >> + * \\var IPASettings::configurationFile\n> >> + * \\brief The name of the IPA configuration file\n> >> + *\n> >> + * This field may be an empty string if the IPA doesn't require a configuration\n> >> + * file.\n> >> + */\n> >> +\n> >> + /**\n> >> + * \\var IPASettings::sensorModel\n> >> + * \\brief The sensor model name\n> >> + *\n> >> + * Provides the sensor model name to the IPA.\n> >> + */\n> >> +\n> >> +/**\n> >> + * \\struct IPAStream\n> >> + * \\brief Stream configuration for the IPA interface\n> >> + *\n> >> + * The IPAStream structure stores stream configuration parameters needed by the\n> >> + * IPAInterface::configure() method. It mirrors the StreamConfiguration class\n> >> + * that is not suitable for this purpose due to not being serializable.\n> >> + */\n> >> +\n> >> +/**\n> >> + * \\var IPAStream::pixelFormat\n> >> + * \\brief The stream pixel format\n> >> + */\n> >> +\n> >> +/**\n> >> + * \\var IPAStream::size\n> >> + * \\brief The stream size in pixels\n> >> + */\n> >> +\n> >> +} /* namespace libcamera */\n> >> diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build\n> >> index 40c4e737..69bc855e 100644\n> >> --- a/include/libcamera/ipa/meson.build\n> >> +++ b/include/libcamera/ipa/meson.build\n> >> @@ -6,6 +6,10 @@ libcamera_ipa_headers = files([\n> >>      'ipa_module_info.h',\n> >>  ])\n> >>  \n> >> +libcamera_ipa_docs = files([\n> >> +    'core_ipa_interface.cpp',\n> >> +])\n> >> +\n> >>  install_headers(libcamera_ipa_headers,\n> >>                  subdir: libcamera_include_dir / 'ipa')\n> >>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id B7C5FC31FB\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 17 May 2021 09:32:54 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 297706891F;\n\tMon, 17 May 2021 11:32:54 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9D1A2602B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 17 May 2021 11:32:52 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EFA4788F;\n\tMon, 17 May 2021 11:32:51 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"SQbyKJrL\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621243972;\n\tbh=CjIbtwe/uZh1SXrHXup8lLyZl2sd5mxZBSC4TVIeYp8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=SQbyKJrL5Am6pCRSsHyBmBgpa1IbP0MYtqdKqSu0aIToQrtrnChB4Z0yTzjcQ+fEJ\n\tCWerGIJ4+pyRmM5QiT57aiksHCuX3i7WBSG3dkFkpxNaGv1UB65RMDB6mBVz6nFNgN\n\tsoQb8u39RSnx04QKiw61zxJV3k7UgbgunKY/UTqE=","Date":"Mon, 17 May 2021 12:32:41 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<YKI4OcHfXonCziZ8@pendragon.ideasonboard.com>","References":"<20210513075346.739370-1-paul.elder@ideasonboard.com>\n\t<YKASPuCbltbGQg9u@pendragon.ideasonboard.com>\n\t<99c3e281-17b3-4411-d0f2-d2c89a60ace9@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<99c3e281-17b3-4411-d0f2-d2c89a60ace9@ideasonboard.com>","Subject":"Re: [libcamera-devel] [RFC PATCH] ipa: Documentation: Enable\n\tdocumentation of mojom files","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]