Show a patch.

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

{
    "id": 16385,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/16385/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16385/",
    "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": "<20220627162732.33160-5-jacopo@jmondi.org>",
    "date": "2022-06-27T16:27:21",
    "name": "[libcamera-devel,04/15] libcamera: camera_sensor_properties: Add sensor delays",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": true,
    "hash": "b5096d3aef695a34578c820e60225a48e672f9f0",
    "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/16385/mbox/",
    "series": [
        {
            "id": 3224,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3224/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3224",
            "date": "2022-06-27T16:27:17",
            "name": "Internal controls, sensor delays and IPA init/configure rework",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3224/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16385/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16385/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 B1565BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Jun 2022 16:27:48 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id ADA8865649;\n\tMon, 27 Jun 2022 18:27:47 +0200 (CEST)",
            "from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net\n\t[217.70.183.200])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D05EB65641\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Jun 2022 18:27:43 +0200 (CEST)",
            "(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 3308320008;\n\tMon, 27 Jun 2022 16:27:42 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656347267;\n\tbh=zDe4M49TC5p06UHt+KurRaCJqiyk+cq+1bpvCuMHd/4=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=YJz3nvyU8krlLxdW9kNil8tFHmv4c0QasZF7UFGcmwd/9hJUw5dKPBSo+IDGZRb+k\n\tuB+l67y/0JcSitHiCvMDT94DgULHxeprDCBCmcaO3LCAnkkeRyBSbulkmFHvNhPKNP\n\tqrIobWpSagXrUFhs1vpa4CYF+xrSdPFKJjYQPy0ezMgGrH5BsYMAvG3WheRUYa4MVX\n\tLUqZf9SJ9AD7Bk0IOT0GhpoWMvW6t9e6Yb2sWRi1nfJ2KKLCDmSBOUdsBmQF9E6N4u\n\t8alt3zwzJx+/+O3TnZw3bt+guDA5o6CdukaUn2qB93Q6yx+w7XKJpXO/zbxhlCkzmU\n\tFf6XkfmSsfZUw==",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 27 Jun 2022 18:27:21 +0200",
        "Message-Id": "<20220627162732.33160-5-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.36.1",
        "In-Reply-To": "<20220627162732.33160-1-jacopo@jmondi.org>",
        "References": "<20220627162732.33160-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 04/15] libcamera:\n\tcamera_sensor_properties: Add sensor delays",
        "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>",
        "From": "Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Jacopo Mondi <jacopo@jmondi.org>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Add to the camera sensor properties a map of control identifiers to\ntheir latencies.\n\nSome camera sensor controls take a variable number of frames to take\neffect, hence they should be set in advance. The newly introduced map\nrecords that information as a property of the camera sensor class.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n .../internal/camera_sensor_properties.h       |  2 ++\n src/libcamera/camera_sensor_properties.cpp    | 32 +++++++++++++++++++\n 2 files changed, 34 insertions(+)",
    "diff": "diff --git a/include/libcamera/internal/camera_sensor_properties.h b/include/libcamera/internal/camera_sensor_properties.h\nindex 1ee3cb994106..868b992196de 100644\n--- a/include/libcamera/internal/camera_sensor_properties.h\n+++ b/include/libcamera/internal/camera_sensor_properties.h\n@@ -9,6 +9,7 @@\n \n #include <map>\n #include <string>\n+#include <unordered_map>\n \n #include <libcamera/control_ids.h>\n #include <libcamera/geometry.h>\n@@ -20,6 +21,7 @@ struct CameraSensorProperties {\n \n \tSize unitCellSize;\n \tstd::map<controls::draft::TestPatternModeEnum, int32_t> testPatternModes;\n+\tstd::unordered_map<const ControlId *, unsigned int> sensorDelays;\n };\n \n } /* namespace libcamera */\ndiff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp\nindex e5f27f06eb1d..5ff28eb04b9f 100644\n--- a/src/libcamera/camera_sensor_properties.cpp\n+++ b/src/libcamera/camera_sensor_properties.cpp\n@@ -13,6 +13,8 @@\n \n #include <libcamera/control_ids.h>\n \n+#include <libcamera/internal/control_ids.h>\n+\n /**\n  * \\file camera_sensor_properties.h\n  * \\brief Database of camera sensor properties\n@@ -41,6 +43,10 @@ LOG_DEFINE_CATEGORY(CameraSensorProperties)\n  * \\brief Map that associates the TestPattern control value with the indexes of\n  * the corresponding sensor test pattern modes as returned by\n  * V4L2_CID_TEST_PATTERN.\n+ *\n+ * \\var CameraSensorProperties::sensorDelays\n+ * \\brief Map that associates control identifiers with their latencies,\n+ * expressed in frame periods.\n  */\n \n /**\n@@ -69,6 +75,7 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n \t\t\t\t * 9: \"Resolution Pattern\"\n \t\t\t\t */\n \t\t\t},\n+\t\t\t.sensorDelays = { },\n \t\t} },\n \t\t{ \"imx219\", {\n \t\t\t.unitCellSize = { 1120, 1120 },\n@@ -79,6 +86,11 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n \t\t\t\t{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },\n \t\t\t\t{ controls::draft::TestPatternModePn9, 4 },\n \t\t\t},\n+\t\t\t.sensorDelays = {\n+\t\t\t\t{ &controls::internal::FrameDuration, 2 },\n+\t\t\t\t{ &controls::internal::ExposureTime, 2 },\n+\t\t\t\t{ &controls::internal::draft::SensorAnalogueGain, 1 },\n+\t\t\t},\n \t\t} },\n \t\t{ \"imx258\", {\n \t\t\t.unitCellSize = { 1120, 1120 },\n@@ -89,18 +101,26 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n \t\t\t\t{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },\n \t\t\t\t{ controls::draft::TestPatternModePn9, 4 },\n \t\t\t},\n+\t\t\t.sensorDelays = { },\n \t\t} },\n \t\t{ \"imx290\", {\n \t\t\t.unitCellSize = { 2900, 2900 },\n \t\t\t.testPatternModes = {},\n+\t\t\t.sensorDelays = {\n+\t\t\t\t{ &controls::internal::FrameDuration, 2 },\n+\t\t\t\t{ &controls::internal::ExposureTime, 2 },\n+\t\t\t\t{ &controls::internal::draft::SensorAnalogueGain, 2 },\n+\t\t\t},\n \t\t} },\n \t\t{ \"imx296\", {\n \t\t\t.unitCellSize = { 3450, 3450 },\n \t\t\t.testPatternModes = {},\n+\t\t\t.sensorDelays = { },\n \t\t} },\n \t\t{ \"imx477\", {\n \t\t\t.unitCellSize = { 1550, 1550 },\n \t\t\t.testPatternModes = {},\n+\t\t\t.sensorDelays = { },\n \t\t} },\n \t\t{ \"ov2740\", {\n \t\t\t.unitCellSize = { 1400, 1400 },\n@@ -108,6 +128,7 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n \t\t\t\t{ controls::draft::TestPatternModeOff, 0 },\n \t\t\t\t{ controls::draft::TestPatternModeColorBars, 1},\n \t\t\t},\n+\t\t\t.sensorDelays = { },\n \t\t} },\n \t\t{ \"ov5640\", {\n \t\t\t.unitCellSize = { 1400, 1400 },\n@@ -115,10 +136,16 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n \t\t\t\t{ controls::draft::TestPatternModeOff, 0 },\n \t\t\t\t{ controls::draft::TestPatternModeColorBars, 1 },\n \t\t\t},\n+\t\t\t.sensorDelays = { },\n \t\t} },\n \t\t{ \"ov5647\", {\n \t\t\t.unitCellSize = { 1400, 1400 },\n \t\t\t.testPatternModes = {},\n+\t\t\t.sensorDelays = {\n+\t\t\t\t{ &controls::internal::FrameDuration, 2 },\n+\t\t\t\t{ &controls::internal::ExposureTime, 2 },\n+\t\t\t\t{ &controls::internal::draft::SensorAnalogueGain, 2 },\n+\t\t\t},\n \t\t} },\n \t\t{ \"ov5670\", {\n \t\t\t.unitCellSize = { 1120, 1120 },\n@@ -126,6 +153,7 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n \t\t\t\t{ controls::draft::TestPatternModeOff, 0 },\n \t\t\t\t{ controls::draft::TestPatternModeColorBars, 1 },\n \t\t\t},\n+\t\t\t.sensorDelays = { },\n \t\t} },\n \t\t{ \"ov5675\", {\n \t\t\t.unitCellSize = { 1120, 1120 },\n@@ -133,6 +161,7 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n \t\t\t\t{ controls::draft::TestPatternModeOff, 0 },\n \t\t\t\t{ controls::draft::TestPatternModeColorBars, 1 },\n \t\t\t},\n+\t\t\t.sensorDelays = { },\n \t\t} },\n \t\t{ \"ov5693\", {\n \t\t\t.unitCellSize = { 1400, 1400 },\n@@ -145,6 +174,7 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n \t\t\t\t * Rolling Bar\".\n \t\t\t\t */\n \t\t\t},\n+\t\t\t.sensorDelays = { },\n \t\t} },\n \t\t{ \"ov8865\", {\n \t\t\t.unitCellSize = { 1400, 1400 },\n@@ -159,6 +189,7 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n \t\t\t\t * 5: \"Color squares with rolling bar\"\n \t\t\t\t */\n \t\t\t},\n+\t\t\t.sensorDelays = { },\n \t\t} },\n \t\t{ \"ov13858\", {\n \t\t\t.unitCellSize = { 1120, 1120 },\n@@ -166,6 +197,7 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n \t\t\t\t{ controls::draft::TestPatternModeOff, 0 },\n \t\t\t\t{ controls::draft::TestPatternModeColorBars, 1 },\n \t\t\t},\n+\t\t\t.sensorDelays = { },\n \t\t} },\n \t};\n \n",
    "prefixes": [
        "libcamera-devel",
        "04/15"
    ]
}