Patch Detail
Show a patch.
GET /api/patches/12250/?format=api
{ "id": 12250, "url": "https://patchwork.libcamera.org/api/patches/12250/?format=api", "web_url": "https://patchwork.libcamera.org/patch/12250/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20210511115611.57642-1-umang.jain@ideasonboard.com>", "date": "2021-05-11T11:56:11", "name": "[libcamera-devel] ipa: mojom: Move CameraSensorInfo struct exclusively to IPA IPC", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "0cf78cf1796f049654985f59c8a5581449cddcf4", "submitter": { "id": 86, "url": "https://patchwork.libcamera.org/api/people/86/?format=api", "name": "Umang Jain", "email": "umang.jain@ideasonboard.com" }, "delegate": { "id": 12, "url": "https://patchwork.libcamera.org/api/users/12/?format=api", "username": "uajain", "first_name": "Umang", "last_name": "Jain", "email": "umang.jain@ideasonboard.com" }, "mbox": "https://patchwork.libcamera.org/patch/12250/mbox/", "series": [ { "id": 2018, "url": "https://patchwork.libcamera.org/api/series/2018/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2018", "date": "2021-05-11T11:56:11", "name": "[libcamera-devel] ipa: mojom: Move CameraSensorInfo struct exclusively to IPA IPC", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2018/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/12250/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/12250/checks/", "tags": {}, "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 1570FBF839\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 11 May 2021 11:56:21 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8B1726891E;\n\tTue, 11 May 2021 13:56:20 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A112361538\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 11 May 2021 13:56:19 +0200 (CEST)", "from perceval.ideasonboard.com (unknown [103.251.226.24])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C579B4A2;\n\tTue, 11 May 2021 13:56:17 +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=\"oFP9tVbs\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1620734179;\n\tbh=qlFHHET9dKBVNxDPxD7XkU7S44C6EZMq8uFWSw3jAjc=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=oFP9tVbsagpzO5Bfs9rB1vc8c8Dh2BP96pyQHyUUJ7v9tqXwQD7J8xeMl+B00X3Fg\n\tbC+4PvfN0Su6iZtXOjCMTJxW6EapGfD8pBsqI48z01nHvXc6C6o9//EWLoHxeA+Q6i\n\tDDh075zZF1s51gAjrgG+UK8emr641Cd9T6JbLWzk=", "From": "Umang Jain <umang.jain@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 11 May 2021 17:26:11 +0530", "Message-Id": "<20210511115611.57642-1-umang.jain@ideasonboard.com>", "X-Mailer": "git-send-email 2.26.2", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH] ipa: mojom: Move CameraSensorInfo struct\n\texclusively to IPA IPC", "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-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "CameraSensorInfo structure is designed to pass in camera sensor related\ninformation from pipeline-handler to IPA. Since the pipeline-hander\nand IPA are connected via mojom IPC IPA interface, the interface\nitself provides a more suitable placement of CameraSensorInfo,\ninstead of camera_sensor.h (which is a libcamera internal header\nultimately, at this point).\n\nAs CameraSensorInfo is already defined in core.mojom, it is just\na matter of removing [skipHeader] tag to allow code-generation\nof CameraSensorInfo. Also, update header paths to include\nCameraSensorInfo definition from IPA interfaces instead of\n\"libcamera/internal/camera_sensor.h\".\n\nSigned-off-by: Umang Jain <umang.jain@ideasonboard.com>\n---\n include/libcamera/internal/camera_sensor.h | 17 +---\n include/libcamera/ipa/core.mojom | 112 ++++++++++++++++++++-\n include/libcamera/ipa/ipa_interface.h | 2 -\n src/ipa/raspberrypi/raspberrypi.cpp | 1 -\n src/libcamera/camera_sensor.cpp | 111 --------------------\n 5 files changed, 112 insertions(+), 131 deletions(-)", "diff": "diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h\nindex 2a5c51a1..0905ebfa 100644\n--- a/include/libcamera/internal/camera_sensor.h\n+++ b/include/libcamera/internal/camera_sensor.h\n@@ -14,6 +14,7 @@\n #include <libcamera/class.h>\n #include <libcamera/controls.h>\n #include <libcamera/geometry.h>\n+#include <libcamera/ipa/core_ipa_interface.h>\n \n #include \"libcamera/internal/formats.h\"\n #include \"libcamera/internal/log.h\"\n@@ -24,22 +25,6 @@ namespace libcamera {\n class BayerFormat;\n class MediaEntity;\n \n-struct CameraSensorInfo {\n-\tstd::string model;\n-\n-\tuint32_t bitsPerPixel;\n-\n-\tSize activeAreaSize;\n-\tRectangle analogCrop;\n-\tSize outputSize;\n-\n-\tuint64_t pixelRate;\n-\tuint32_t lineLength;\n-\n-\tuint32_t minFrameLength;\n-\tuint32_t maxFrameLength;\n-};\n-\n class CameraSensor : protected Loggable\n {\n public:\ndiff --git a/include/libcamera/ipa/core.mojom b/include/libcamera/ipa/core.mojom\nindex 6caaa63e..2a09b233 100644\n--- a/include/libcamera/ipa/core.mojom\n+++ b/include/libcamera/ipa/core.mojom\n@@ -78,7 +78,117 @@ module libcamera;\n \tuint32 height;\n };\n \n-[skipHeader] struct CameraSensorInfo {\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+struct CameraSensorInfo {\n \tstring model;\n \n \tuint32 bitsPerPixel;\ndiff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h\nindex dfe1b40a..4aefaa71 100644\n--- a/include/libcamera/ipa/ipa_interface.h\n+++ b/include/libcamera/ipa/ipa_interface.h\n@@ -18,8 +18,6 @@\n #include <libcamera/geometry.h>\n #include <libcamera/signal.h>\n \n-#include \"libcamera/internal/camera_sensor.h\"\n-\n namespace libcamera {\n \n /*\ndiff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex 52d91db2..87774500 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -25,7 +25,6 @@\n #include <libcamera/span.h>\n \n #include \"libcamera/internal/buffer.h\"\n-#include \"libcamera/internal/camera_sensor.h\"\n #include \"libcamera/internal/log.h\"\n \n #include <linux/bcm2835-isp.h>\ndiff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\nindex eb84d9eb..170de827 100644\n--- a/src/libcamera/camera_sensor.cpp\n+++ b/src/libcamera/camera_sensor.cpp\n@@ -33,117 +33,6 @@ namespace libcamera {\n \n LOG_DEFINE_CATEGORY(CameraSensor)\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 * \\class CameraSensor\n * \\brief A camera sensor based on V4L2 subdevices\n", "prefixes": [ "libcamera-devel" ] }