Patch Detail
Show a patch.
GET /api/1.1/patches/16467/?format=api
{ "id": 16467, "url": "https://patchwork.libcamera.org/api/1.1/patches/16467/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16467/", "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": "<20220630133902.321099-10-jacopo@jmondi.org>", "date": "2022-06-30T13:38:48", "name": "[libcamera-devel,v3,09/23] libcamera: camera_sensor_properties: Add sensor delays", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": true, "hash": "ebe48e5710dd107d2a6fc13c1cbda25d555653bc", "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/16467/mbox/", "series": [ { "id": 3238, "url": "https://patchwork.libcamera.org/api/1.1/series/3238/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3238", "date": "2022-06-30T13:38:39", "name": "Internal controls, sensor delays and IPA rework", "version": 3, "mbox": "https://patchwork.libcamera.org/series/3238/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16467/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16467/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 3078CC327A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 30 Jun 2022 13:39:34 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B5542656A1;\n\tThu, 30 Jun 2022 15:39:33 +0200 (CEST)", "from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net\n\t[IPv6:2001:4b98:dc4:8::221])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B3C9E65697\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 30 Jun 2022 15:39:29 +0200 (CEST)", "(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id E8AF424000E;\n\tThu, 30 Jun 2022 13:39:28 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656596373;\n\tbh=qfkbTfnrg4/rHiitqO5pfDyHxnXcXfcTXHBeAKyDSns=;\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=3CPjN0H1DAV39gwhDxMH0CN2EpjuyyJOKwSzoaTQLg0hoQcmMDs0AyBs6oNhkZz0D\n\tX1QowD0ngDSvxiwwMCMTEhyBwRW6ZAZEkBMSPdyQh1n3OSUzyLT85tu9RC87AGyqg/\n\tqN6BkVbI+fmkGwuKpaEO/5i59gh9e8BAAIrYg0d1Sm9JiuOzQEmizCBZMudMAWlyXk\n\tlVOP9RNSObHSmFDMLj3uVqdAjwEgxT5MLFh01mD3896a0B6JOi7qfSz7aksYhJBrC5\n\tgtKz4bTzgpvfvLHay4ybjlzvYxbyufTqrav0OeyfCTZ6chgVAJGZTm/mdTQLZYEnIX\n\t5B/Bu0ussFkFA==", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 30 Jun 2022 15:38:48 +0200", "Message-Id": "<20220630133902.321099-10-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.36.1", "In-Reply-To": "<20220630133902.321099-1-jacopo@jmondi.org>", "References": "<20220630133902.321099-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v3 09/23] 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 | 4 ++\n .../camera_sensor_properties.cpp | 40 +++++++++++++++++++\n 2 files changed, 44 insertions(+)", "diff": "diff --git a/include/libcamera/internal/camera_sensor_properties.h b/include/libcamera/internal/camera_sensor_properties.h\nindex 1ee3cb994106..2404b0674323 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@@ -16,10 +17,13 @@\n namespace libcamera {\n \n struct CameraSensorProperties {\n+\tusing SensorDelays = std::unordered_map<const ControlId *, unsigned int>;\n+\n \tstatic const CameraSensorProperties *get(const std::string &sensor);\n \n \tSize unitCellSize;\n \tstd::map<controls::draft::TestPatternModeEnum, int32_t> testPatternModes;\n+\tSensorDelays sensorDelays;\n };\n \n } /* namespace libcamera */\ndiff --git a/src/libcamera/camera_sensor/camera_sensor_properties.cpp b/src/libcamera/camera_sensor/camera_sensor_properties.cpp\nindex e5f27f06eb1d..4b5ab716abe2 100644\n--- a/src/libcamera/camera_sensor/camera_sensor_properties.cpp\n+++ b/src/libcamera/camera_sensor/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,18 @@ 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+ * \\typedef CameraSensorProperties::SensorDelays\n+ * \\brief Camera sensor controls delays\n+ *\n+ * Type to represent a map of camera sensor controls associated with their\n+ * latencies, expressed in frame periods.\n */\n \n /**\n@@ -69,6 +83,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 +94,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::AnalogueGain, 1 },\n+\t\t\t},\n \t\t} },\n \t\t{ \"imx258\", {\n \t\t\t.unitCellSize = { 1120, 1120 },\n@@ -89,18 +109,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::AnalogueGain, 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 +136,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 +144,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::AnalogueGain, 2 },\n+\t\t\t},\n \t\t} },\n \t\t{ \"ov5670\", {\n \t\t\t.unitCellSize = { 1120, 1120 },\n@@ -126,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{ \"ov5675\", {\n \t\t\t.unitCellSize = { 1120, 1120 },\n@@ -133,6 +169,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 +182,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 +197,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 +205,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", "v3", "09/23" ] }