Show a patch.

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

{
    "id": 3590,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/3590/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3590/",
    "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": "<20200428091934.341550-4-jacopo@jmondi.org>",
    "date": "2020-04-28T09:19:31",
    "name": "[libcamera-devel,v5,4/7] libcamera: camera_sensor: Define CameraSensorInfo",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "94aeced3b7554338f9b434e7702e0ba1ad8296c1",
    "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/3590/mbox/",
    "series": [
        {
            "id": 842,
            "url": "https://patchwork.libcamera.org/api/1.1/series/842/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=842",
            "date": "2020-04-28T09:17:13",
            "name": "libcamera: Add CameraSensorInfo",
            "version": 5,
            "mbox": "https://patchwork.libcamera.org/series/842/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3590/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3590/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 5B7AC61AD4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 28 Apr 2020 11:16:37 +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 4D57C40008;\n\tTue, 28 Apr 2020 09:16:36 +0000 (UTC)"
        ],
        "X-Originating-IP": "212.216.150.148",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 28 Apr 2020 11:19:31 +0200",
        "Message-Id": "<20200428091934.341550-4-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.26.1",
        "In-Reply-To": "<20200428091934.341550-1-jacopo@jmondi.org>",
        "References": "<20200428091934.341550-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v5 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": "Tue, 28 Apr 2020 09:16:38 -0000"
    },
    "content": "Define the CameraSensorInfo structure that reports the current image sensor\nconfiguration.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/camera_sensor.cpp       | 81 +++++++++++++++++++++++++++\n src/libcamera/include/camera_sensor.h | 13 +++++\n 2 files changed, 94 insertions(+)\n\n--\n2.26.1",
    "diff": "diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\nindex 53bb814225e8..2c016791e32f 100644\n--- a/src/libcamera/camera_sensor.cpp\n+++ b/src/libcamera/camera_sensor.cpp\n@@ -28,6 +28,87 @@ 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  * \\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 e68185370eb2..33997f2ed7f2 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+\tuint64_t pixelRate;\n+\tuint32_t lineLength;\n+};\n+\n class CameraSensor : protected Loggable\n {\n public:\n",
    "prefixes": [
        "libcamera-devel",
        "v5",
        "4/7"
    ]
}