Show a patch.

GET /api/1.1/patches/12323/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 12323,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/12323/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/12323/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20210519101954.77711-3-umang.jain@ideasonboard.com>",
    "date": "2021-05-19T10:19:49",
    "name": "[libcamera-devel,v2,2/7] ipa: mojom: Move CameraSensorInfo struct exclusively to IPA IPC",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "abaaeea21e4bff8bf788eccaa7f918bdeef75ea6",
    "submitter": {
        "id": 86,
        "url": "https://patchwork.libcamera.org/api/1.1/people/86/?format=api",
        "name": "Umang Jain",
        "email": "umang.jain@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/12323/mbox/",
    "series": [
        {
            "id": 2038,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2038/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2038",
            "date": "2021-05-19T10:19:47",
            "name": "External IPU3 IPA support",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/2038/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/12323/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/12323/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 31F44C31FB\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 19 May 2021 10:20:10 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 36A7268924;\n\tWed, 19 May 2021 12:20:09 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 77E4D602B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 19 May 2021 12:20:08 +0200 (CEST)",
            "from perceval.ideasonboard.com (unknown [103.251.226.105])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2B5A245E;\n\tWed, 19 May 2021 12:20:06 +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=\"eYQ7y2WU\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621419608;\n\tbh=NyZGhRujvDOzzkpY7R3W9PidphlIVJ/Q6ZoQNb+ZTbA=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=eYQ7y2WUcIN6NgWnVBuduqJkzd/d68ZnUejIgbsWjdGFD1zCZlYrDGceRre/+nGZ3\n\t0E3vT8a+CEZH/yOWbSAmsXKV3aj8ibugT7NNcYEUEOSmL/DklER0/WAXkyhHj5jJge\n\t2bA+2N1QANQN6j2BkCFTaIXUokmlEaXfZFgBPx24=",
        "From": "Umang Jain <umang.jain@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed, 19 May 2021 15:49:49 +0530",
        "Message-Id": "<20210519101954.77711-3-umang.jain@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.26.2",
        "In-Reply-To": "<20210519101954.77711-1-umang.jain@ideasonboard.com>",
        "References": "<20210519101954.77711-1-umang.jain@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 2/7] ipa: mojom: Move CameraSensorInfo\n\tstruct exclusively 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>",
        "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-handler\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.\n\nFinally, update header paths to include CameraSensorInfo definition\nfrom IPA interfaces instead of \"libcamera/internal/camera_sensor.h\".\n\nSigned-off-by: Umang Jain <umang.jain@ideasonboard.com>\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n include/libcamera/internal/camera_sensor.h |  17 +--\n include/libcamera/ipa/core.mojom           |   2 +-\n include/libcamera/ipa/ipa_interface.h      |   2 -\n src/ipa/raspberrypi/raspberrypi.cpp        |   1 -\n src/libcamera/camera_sensor.cpp            | 111 -----------------\n src/libcamera/ipa/core_ipa_interface.cpp   | 131 +++++++++++++++++++++\n 6 files changed, 133 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 e49815d8..b95b3dc4 100644\n--- a/include/libcamera/ipa/core.mojom\n+++ b/include/libcamera/ipa/core.mojom\n@@ -78,7 +78,7 @@ module libcamera;\n \tuint32 height;\n };\n \n-[skipHeader] struct CameraSensorInfo {\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\ndiff --git a/src/libcamera/ipa/core_ipa_interface.cpp b/src/libcamera/ipa/core_ipa_interface.cpp\nindex fe1ecce6..def8d184 100644\n--- a/src/libcamera/ipa/core_ipa_interface.cpp\n+++ b/src/libcamera/ipa/core_ipa_interface.cpp\n@@ -102,4 +102,135 @@ namespace libcamera {\n  * \\brief The stream size in pixels\n  */\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+ * \\fn CameraSensorInfo::CameraSensorInfo(const std::string &model,\n+\t\t\t\t\t  uint32_t bitsPerPixel,\n+\t\t\t\t\t  const Size &activeAreaSize,\n+\t\t\t\t\t  const Rectangle &analogCrop,\n+\t\t\t\t\t  const Size &outputSize,\n+\t\t\t\t\t  uint64_t pixelRate,\n+\t\t\t\t\t  uint32_t lineLength,\n+\t\t\t\t\t  uint32_t minFrameLength,\n+\t\t\t\t\t  uint32_t maxFrameLength)\n+ * \\param[in] model\n+ * \\param[in] bitsPerPixel\n+ * \\param[in] activeAreaSize\n+ * \\param[in] analogCrop\n+ * \\param[in] outputSize\n+ * \\param[in] pixelRate\n+ * \\param[in] lineLength\n+ * \\param[in] minFrameLength\n+ * \\param[in] maxFrameLength\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+       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 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+       frameDuration(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+       frameDuration(s) = maxFrameLength(lines) * lineLength(pixels) / pixelRate(pixels per second)\n+   \\endverbatim\n+ */\n } /* namespace libcamera */\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "2/7"
    ]
}