Patch Detail
Show a patch.
GET /api/1.1/patches/15115/?format=api
{ "id": 15115, "url": "https://patchwork.libcamera.org/api/1.1/patches/15115/?format=api", "web_url": "https://patchwork.libcamera.org/patch/15115/", "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": "<20211210144424.14747-3-david.plowman@raspberrypi.com>", "date": "2021-12-10T14:44:18", "name": "[libcamera-devel,v12,2/8] libcamera: stream: Add ColorSpace fields to StreamConfiguration", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "cf78a336651f15c101dcc5162976fbd2fd6de722", "submitter": { "id": 42, "url": "https://patchwork.libcamera.org/api/1.1/people/42/?format=api", "name": "David Plowman", "email": "david.plowman@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/15115/mbox/", "series": [ { "id": 2835, "url": "https://patchwork.libcamera.org/api/1.1/series/2835/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2835", "date": "2021-12-10T14:44:16", "name": "Colour spaces", "version": 12, "mbox": "https://patchwork.libcamera.org/series/2835/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/15115/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/15115/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 2D5B3BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 10 Dec 2021 14:44:43 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8FE5D60897;\n\tFri, 10 Dec 2021 15:44:41 +0100 (CET)", "from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com\n\t[IPv6:2a00:1450:4864:20::32e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 540036089A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 10 Dec 2021 15:44:38 +0100 (CET)", "by mail-wm1-x32e.google.com with SMTP id\n\t77-20020a1c0450000000b0033123de3425so9229049wme.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 10 Dec 2021 06:44:38 -0800 (PST)", "from pi4-davidp.pitowers.org\n\t([2a00:1098:3142:14:e4a2:3070:eea4:e434])\n\tby smtp.gmail.com with ESMTPSA id\n\tw22sm3000515wmi.27.2021.12.10.06.44.37\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 10 Dec 2021 06:44:37 -0800 (PST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"PFh15tLc\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=+sH0KfN2WD6NxZb8aJTKXBPu6mnk13ViaZCwPQX529M=;\n\tb=PFh15tLcvGqkun0JNjSyVOvabdRysp3B3lCm7P0RX3vUodzD0x+lUgWcHifSnzgUXt\n\tJCJDx3nUB/1MUH7F6Q6AhwNcuXVUD7UgyCHlgmNzdVKf1v7m5/EnNzBkzta1OgUYr2sK\n\toR4ChGLs5SRRGJ+eHB3EizOXzdcamrUMswGeIZf3T/bVdcPi3516A6WmPdx5XumEDC5L\n\toecCWZ9mD9bhoq7MLQ2j4dgCcbQ4Cy7kSeNWtz7EC6eK0lD12O8zLG14B2qnP34PWCBU\n\trrdDbOumjRfAVceaaYwSreQ46uDi6+XYepGlTMoDTe9ju3I8r9vnXIsgrQ1vITxNM8ww\n\tBS3g==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\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=+sH0KfN2WD6NxZb8aJTKXBPu6mnk13ViaZCwPQX529M=;\n\tb=LVHvyF8+BBQaLgwS6RZQIDP/cXToVmr8lGcfitjHmkKCcYJLRPmTHj9Qe4MpyOBS6a\n\tA5u7PgoFubyHIgP3WRNSBKgtKgZahJ53fKm+JEoOzLWOvABziPJVuPfMAB36mi0LNWud\n\tnFefMaIBngkfipZXetyz1+0Ve7SqE6eZUw3+qNiz8drxH5aaXZi7d5o+4aUV91X98/aE\n\tzCwewGtxqv/ItFqToJici0OiTQBc0r4f5ugumUb6aw8Gt5Gz16ZvhY9QzOfPZ9QTLeio\n\t1l3EKImkqOoR1xNaaykhzfUisO6vcfHQNRwvNS3mhsGbf6h658yQYXsggUcHyEEqvWmu\n\tBlNw==", "X-Gm-Message-State": "AOAM531eI6uhcD25/mzgo2G612XH/2NeaWl8xweT/nUsNvwqJnBf8p95\n\t7jKpd2C6X9wacP7nQbZMDwwB5Q==", "X-Google-Smtp-Source": "ABdhPJyqP9e5TP1Cz3iTlFuY+U68rI/Ub+0S78g17FoNnVJVufOOul0WInw9mB5NBYbYM6JrX1T0ZQ==", "X-Received": "by 2002:a05:600c:4f92:: with SMTP id\n\tn18mr16535049wmq.123.1639147477881; \n\tFri, 10 Dec 2021 06:44:37 -0800 (PST)", "From": "David Plowman <david.plowman@raspberrypi.com>", "To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tHans Verkuil <hverkuil-cisco@xs4all.nl>, Tomasz Figa <tfiga@google.com>, \n\tJacopo Mondi <jacopo@jmondi.org>,\n\tNaushir Patuck <naush@raspberrypi.com>, \n\tlibcamera-devel@lists.libcamera.org", "Date": "Fri, 10 Dec 2021 14:44:18 +0000", "Message-Id": "<20211210144424.14747-3-david.plowman@raspberrypi.com>", "X-Mailer": "git-send-email 2.30.2", "In-Reply-To": "<20211210144424.14747-1-david.plowman@raspberrypi.com>", "References": "<20211210144424.14747-1-david.plowman@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v12 2/8] libcamera: stream: Add ColorSpace\n\tfields to StreamConfiguration", "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": "This is so that applications can choose appropriate color spaces which\nwill then be passed down to the V4L2 devices.\n\nThe ColorSpace field is actually optional. If it is not set you will\nget the camera's default color space.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/stream.h | 3 +++\n src/libcamera/stream.cpp | 20 ++++++++++++++++++++\n 2 files changed, 23 insertions(+)", "diff": "diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\nindex 41ec02b1..f0ae7e62 100644\n--- a/include/libcamera/stream.h\n+++ b/include/libcamera/stream.h\n@@ -12,6 +12,7 @@\n #include <string>\n #include <vector>\n \n+#include <libcamera/color_space.h>\n #include <libcamera/framebuffer.h>\n #include <libcamera/geometry.h>\n #include <libcamera/pixel_format.h>\n@@ -47,6 +48,8 @@ struct StreamConfiguration {\n \n \tunsigned int bufferCount;\n \n+\tstd::optional<ColorSpace> colorSpace;\n+\n \tStream *stream() const { return stream_; }\n \tvoid setStream(Stream *stream) { stream_ = stream; }\n \tconst StreamFormats &formats() const { return formats_; }\ndiff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\nindex b421e17e..686e693b 100644\n--- a/src/libcamera/stream.cpp\n+++ b/src/libcamera/stream.cpp\n@@ -329,6 +329,26 @@ StreamConfiguration::StreamConfiguration(const StreamFormats &formats)\n * \\brief Requested number of buffers to allocate for the stream\n */\n \n+/**\n+ * \\var StreamConfiguration::colorSpace\n+ * \\brief The ColorSpace for this stream\n+ *\n+ * This field allows a ColorSpace to be selected for this Stream.\n+ *\n+ * The field is optional and an application can choose to leave it unset.\n+ * Platforms that support the use of color spaces may provide default\n+ * values through the generateConfiguration() method. An application can\n+ * override these when necessary.\n+ *\n+ * If a specific ColorSpace is requested but the Camera cannot deliver it,\n+ * then the StreamConfiguration will be adjusted to a value that can be\n+ * delivered. In this case the validate() method will indicate via its\n+ * return value that the CameraConfiguration has been adjusted.\n+ *\n+ * Note that platforms will typically have different constraints on what\n+ * color spaces can be supported and in what combinations.\n+ */\n+\n /**\n * \\fn StreamConfiguration::stream()\n * \\brief Retrieve the stream associated with the configuration\n", "prefixes": [ "libcamera-devel", "v12", "2/8" ] }