Patch Detail
Show a patch.
GET /api/1.1/patches/3573/?format=api
{ "id": 3573, "url": "https://patchwork.libcamera.org/api/1.1/patches/3573/?format=api", "web_url": "https://patchwork.libcamera.org/patch/3573/", "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": "<20200427213236.333777-5-jacopo@jmondi.org>", "date": "2020-04-27T21:32:33", "name": "[libcamera-devel,v4,4/7] libcamera: camera_sensor: Define CameraSensorInfo", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "e5e14e6144532ddd11f470a8a48a4c85c86aeca4", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/3573/mbox/", "series": [ { "id": 837, "url": "https://patchwork.libcamera.org/api/1.1/series/837/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=837", "date": "2020-04-27T21:32:29", "name": "libcamera: Add CameraSensorInfo", "version": 4, "mbox": "https://patchwork.libcamera.org/series/837/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/3573/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/3573/checks/", "tags": {}, "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net\n\t[217.70.183.194])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 68850603F9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Apr 2020 23:29:35 +0200 (CEST)", "from uno.homenet.telecomitalia.it (a-ur1-85.tin.it\n\t[212.216.150.148]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay2-d.mail.gandi.net (Postfix) with ESMTPSA id B9EEF40002;\n\tMon, 27 Apr 2020 21:29:34 +0000 (UTC)" ], "X-Originating-IP": "212.216.150.148", "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 27 Apr 2020 23:32:33 +0200", "Message-Id": "<20200427213236.333777-5-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.26.1", "In-Reply-To": "<20200427213236.333777-1-jacopo@jmondi.org>", "References": "<20200427213236.333777-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v4 4/7] libcamera: camera_sensor: Define\n\tCameraSensorInfo", "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>", "X-List-Received-Date": "Mon, 27 Apr 2020 21:29:35 -0000" }, "content": "Define the CameraSensorInfo structure that reports the current image sensor\nconfiguration.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/camera_sensor.cpp | 84 +++++++++++++++++++++++++++\n src/libcamera/include/camera_sensor.h | 13 +++++\n 2 files changed, 97 insertions(+)", "diff": "diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\nindex ce585cab1a4f..4fd1ee84eb47 100644\n--- a/src/libcamera/camera_sensor.cpp\n+++ b/src/libcamera/camera_sensor.cpp\n@@ -28,6 +28,90 @@ 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 here reported information describe the sensor's intrinsics\n+ * characteristics, such as its pixel array size and the sensor model name,\n+ * as well as information relative to the currently configured mode, such as\n+ * the produced 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 the currently\n+ * configured sensor mode.\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 pixel produced in a second\n+ *\n+ * The pixel read out frequency in Hz. The property describes how many pixels\n+ * per second are produced by the camera sensor, including blanking.\n+ *\n+ * To obtain the read-out time in second of a full line:\n+ *\n+ * \\verbatim\n+\tlineDuration(s) = lineLength(pixel) / pixelRate(Hz)\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 * \\class CameraSensor\n * \\brief A camera sensor based on V4L2 subdevices\ndiff --git a/src/libcamera/include/camera_sensor.h b/src/libcamera/include/camera_sensor.h\nindex 5277f7f7fe87..28ebfaa30c22 100644\n--- a/src/libcamera/include/camera_sensor.h\n+++ b/src/libcamera/include/camera_sensor.h\n@@ -22,6 +22,19 @@ class V4L2Subdevice;\n \n struct V4L2SubdeviceFormat;\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+\tuint32_t pixelRate;\n+\tuint32_t lineLength;\n+};\n+\n class CameraSensor : protected Loggable\n {\n public:\n", "prefixes": [ "libcamera-devel", "v4", "4/7" ] }