Patch Detail
Show a patch.
GET /api/patches/12465/?format=api
{ "id": 12465, "url": "https://patchwork.libcamera.org/api/patches/12465/?format=api", "web_url": "https://patchwork.libcamera.org/patch/12465/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/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": "<20210528030531.189492-3-hiroh@chromium.org>", "date": "2021-05-28T03:05:28", "name": "[libcamera-devel,v6,3/6] libcamera: CameraSensorProperties: Add table of v4l2 index and test pattern", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "bd7ca081e8ce0d3903fdf3a18861b151d7eb5215", "submitter": { "id": 63, "url": "https://patchwork.libcamera.org/api/people/63/?format=api", "name": "Hirokazu Honda", "email": "hiroh@chromium.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/12465/mbox/", "series": [ { "id": 2089, "url": "https://patchwork.libcamera.org/api/series/2089/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2089", "date": "2021-05-28T03:05:26", "name": "[libcamera-devel,v6,1/6] libcamera: controls: Add sensor test pattern mode", "version": 6, "mbox": "https://patchwork.libcamera.org/series/2089/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/12465/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/12465/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 104C1C3205\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 28 May 2021 03:05:46 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C5A8F68928;\n\tFri, 28 May 2021 05:05:45 +0200 (CEST)", "from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com\n\t[IPv6:2607:f8b0:4864:20::42c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7C0E66891E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 May 2021 05:05:41 +0200 (CEST)", "by mail-pf1-x42c.google.com with SMTP id g18so2174857pfr.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 May 2021 20:05:41 -0700 (PDT)", "from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:2:caec:ab3b:ea16:3d01])\n\tby smtp.gmail.com with ESMTPSA id\n\tl20sm2892051pjq.38.2021.05.27.20.05.38\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 27 May 2021 20:05:39 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"KEudBN3m\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=1mgTVTj9HIrtZgDXP5g+nM7aA1/x6toabEVAACNVooQ=;\n\tb=KEudBN3mvZcdL5ClsxE6jEH0qdX8skJx9SFvHQBDz/aO8f4QQZJoYnlr6wZUGw9Z0n\n\tnkRdzZHQ6o7WRrMf+k5mpLtOLH0S9CPqRGVpj/4qmD3IqewdZ9I9mno1JuCB9l6ChuGH\n\t30qzoBNvyH+APUUePb94wu75tx8gnqzt9hlMU=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=1mgTVTj9HIrtZgDXP5g+nM7aA1/x6toabEVAACNVooQ=;\n\tb=G4ozReQ2GCeuWlnXKGn1AeFEeFPzH9l02Uw5UV7CPS5+qoyovzUk/5l2qXAqg/+vN4\n\tU39GtVaPX9PZCTrAN+FfvNg6/X3ysZR0vO7ENLIWNKALj962jXebByanF7Ou+55R7Ksf\n\t+GL1I0q0uQ/moPJuE0+E5V8YuajT7acWE2FQSnedKWqi1hO7vXod6TdQGkwuqpomDAf8\n\tzyZX92F3BFBQtdcnIIsdKxu8AwEkPCbJ4sq/HluHUR4fvhyqxDYxNN1x8aC/XNr74ITf\n\tHEj2CdsO9TqR7GRtaYsFh9cHq0aUuI2FFar90Te090M5R/rgTcIQm0GakhkmMDadlng3\n\tO1HQ==", "X-Gm-Message-State": "AOAM532L4YynzZij76MHY2ymRu5cwJGPe7MEwRDchi9fZaB8Hp9in6Ae\n\twtNAmMHYNqj28/YPk23Im+jIN6iSPYOrMA==", "X-Google-Smtp-Source": "ABdhPJwIEuKSsCKK3bqsGIKSgEga2J+b5337DMhUNYw0uS1IBSRbzRDZLgBojK1bVHWHfYVvh0V2rw==", "X-Received": "by 2002:a62:fb17:0:b029:2df:b6dc:c68c with SMTP id\n\tx23-20020a62fb170000b02902dfb6dcc68cmr1579721pfm.31.1622171139675; \n\tThu, 27 May 2021 20:05:39 -0700 (PDT)", "From": "Hirokazu Honda <hiroh@chromium.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 28 May 2021 12:05:28 +0900", "Message-Id": "<20210528030531.189492-3-hiroh@chromium.org>", "X-Mailer": "git-send-email 2.32.0.rc0.204.g9fa02ecfa5-goog", "In-Reply-To": "<20210528030531.189492-1-hiroh@chromium.org>", "References": "<20210528030531.189492-1-hiroh@chromium.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v6 3/6] libcamera: CameraSensorProperties:\n\tAdd table of v4l2 index and test pattern", "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": "The V4L2 specification defines the sensor test pattern modes\nthrough a menu control, where a numerical index is associated to\na string that describes the test pattern. The index-to-pattern\nmapping is driver specific and requires a corresponding representation\nin the library.\n\nAdd to the static list of CameraSensorProperties a map of indexes to\nlibcamera::controls::TestPatternModes values to be able to map the\nindexes returned by the driver to the corresponding test pattern mode.\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.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 f5e242cb..88ec7261 100644\n--- a/include/libcamera/internal/camera_sensor_properties.h\n+++ b/include/libcamera/internal/camera_sensor_properties.h\n@@ -7,6 +7,7 @@\n #ifndef __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__\n #define __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__\n \n+#include <map>\n #include <string>\n \n #include <libcamera/geometry.h>\n@@ -17,6 +18,7 @@ struct CameraSensorProperties {\n \tstatic const CameraSensorProperties *get(const std::string &sensor);\n \n \tSize unitCellSize;\n+\tstd::map<uint8_t, uint8_t> testPatternModeMap;\n };\n \n } /* namespace libcamera */\ndiff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp\nindex 2a6e97f7..841564ff 100644\n--- a/src/libcamera/camera_sensor_properties.cpp\n+++ b/src/libcamera/camera_sensor_properties.cpp\n@@ -9,6 +9,8 @@\n \n #include <map>\n \n+#include <libcamera/control_ids.h>\n+\n #include \"libcamera/internal/log.h\"\n \n /**\n@@ -34,6 +36,11 @@ LOG_DEFINE_CATEGORY(CameraSensorProperties)\n *\n * \\var CameraSensorProperties::unitCellSize\n * \\brief The physical size of a pixel, including pixel edges, in nanometers.\n+ *\n+ * \\var CameraSensorProperties::testPatternModeMap\n+ * \\brief Map that associates the indexes of the sensor test pattern modes as\n+ * returned by V4L2_CID_TEST_PATTERN with the corresponding TestPattern\n+ * control value\n */\n \n /**\n@@ -47,15 +54,40 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n \tstatic const std::map<std::string, const CameraSensorProperties> sensorProps = {\n \t\t{ \"imx219\", {\n \t\t\t.unitCellSize = { 1120, 1120 },\n+\t\t\t.testPatternModeMap = {\n+\t\t\t\t{ 0, controls::draft::TestPatternModeOff },\n+\t\t\t\t{ 1, controls::draft::TestPatternModeColorBars },\n+\t\t\t\t{ 2, controls::draft::TestPatternModeSolidColor },\n+\t\t\t\t{ 3, controls::draft::TestPatternModeColorBarsFadeToGray },\n+\t\t\t\t{ 4, controls::draft::TestPatternModePn9 },\n+\t\t\t},\n \t\t} },\n \t\t{ \"ov5670\", {\n \t\t\t.unitCellSize = { 1120, 1120 },\n+\t\t\t.testPatternModeMap = {\n+\t\t\t\t{ 0, controls::draft::TestPatternModeOff },\n+\t\t\t\t{ 1, controls::draft::TestPatternModeColorBars },\n+\t\t\t},\n \t\t} },\n \t\t{ \"ov13858\", {\n \t\t\t.unitCellSize = { 1120, 1120 },\n+\t\t\t.testPatternModeMap = {\n+\t\t\t\t{ 0, controls::draft::TestPatternModeOff },\n+\t\t\t\t{ 1, controls::draft::TestPatternModeColorBars },\n+\t\t\t\t{ 2, controls::draft::TestPatternModeColorBarsFadeToGray },\n+\t\t\t},\n \t\t} },\n \t\t{ \"ov5693\", {\n \t\t\t.unitCellSize = { 1400, 1400 },\n+\t\t\t.testPatternModeMap = {\n+\t\t\t\t{ 0, controls::draft::TestPatternModeOff },\n+\t\t\t\t{ 2, controls::draft::TestPatternModeColorBars },\n+\t\t\t\t/*\n+\t\t\t\t * No correspondence test pattern mode for\n+\t\t\t\t * 1: \"Random data\" and 3: \"Colour Bars with\n+\t\t\t\t * Rolling Bar\".\n+\t\t\t\t */\n+\t\t\t},\n \t\t} },\n \t};\n \n", "prefixes": [ "libcamera-devel", "v6", "3/6" ] }