Patch Detail
Show a patch.
GET /api/1.1/patches/17965/?format=api
{ "id": 17965, "url": "https://patchwork.libcamera.org/api/1.1/patches/17965/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17965/", "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": "<20221209090050.19441-2-naush@raspberrypi.com>", "date": "2022-12-09T09:00:39", "name": "[libcamera-devel,v4,01/12] libcamera: stream: Add stream hints to StreamConfiguration", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "4bf835c7b68b4f87bb9fe0715faca8e155d7bf21", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/17965/mbox/", "series": [ { "id": 3663, "url": "https://patchwork.libcamera.org/api/1.1/series/3663/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3663", "date": "2022-12-09T09:00:38", "name": "Raspberry Pi: Platform configuration and buffer allocation improvements", "version": 4, "mbox": "https://patchwork.libcamera.org/series/3663/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17965/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17965/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 9DB55BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 9 Dec 2022 09:01:32 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E201363356;\n\tFri, 9 Dec 2022 10:01:30 +0100 (CET)", "from mail-wm1-x333.google.com (mail-wm1-x333.google.com\n\t[IPv6:2a00:1450:4864:20::333])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5D9B561F1E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 9 Dec 2022 10:01:29 +0100 (CET)", "by mail-wm1-x333.google.com with SMTP id\n\th8-20020a1c2108000000b003d1efd60b65so5289981wmh.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 09 Dec 2022 01:01:29 -0800 (PST)", "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tbd10-20020a05600c1f0a00b003cf774c31a0sm7773674wmb.16.2022.12.09.01.01.27\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 09 Dec 2022 01:01:28 -0800 (PST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1670576490;\n\tbh=6TPR2QHCOzSmsRgML58GJeHoEheaiRbUfY1Sp25II2M=;\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=NEirU1zKsPhFz0yWxm5uXOgIkpfRn/7P9Aq+9Hrv3kgdMH3bxIOcCemumBiNarp4q\n\tDSb7643GsdT40QlEFM5ssy9qRfRij9X3nKeVCPkyzlErhqbfcXjuX/ArjQQqbIoIIE\n\t7oHRxo2280rwNRkSzt/jZ1vr+hJ2k74TqO6mITqUp643Beo2jvYv9eDoXp2QKsqcuv\n\tkBOpyXu8MaeSrs5e3k+JJOQeMkX1aQvsPZ3+IwTqgnwGJhTY62Y+PYxZQGUjEBvLcA\n\tUn+ZPrS6H/UeRPBxzhNuJ/fM168DIs2kzQo4ZykSZ4zahrVNq0qMZxMPzZCMLbd/vb\n\t/k53zXufh9hfA==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=+2T3ZLVGJwVrydTkz6iNKwj5oO6lQf9kYT88gPluNzs=;\n\tb=aKdXRz0iNekVqSnj1JMh6iqn53I32dcR+aAowJgBq30JZuVizyrEw/KPZttRjajyaG\n\td3vjVG3JkgU6M9qfce2Skr4Dn2UP0y2EouQZvu/J4zzXpgvUPAi8ddsZCPbWkxGHymL2\n\tJnKE/BOIKSzi6yLJ1Iw9ZbHEbTr2BL3QlEQu76w94cDpainVxutsrVKVt0N5iWn0YK+5\n\tWnKoln2VNrphXp14j+VLNhkp2cvgzwo+IchNKSdfwhn/MA244+Zz31qlRDiQR8VGT1O3\n\tOfQXiw3AaREG4Tlq7vGC2Qdv/4KXThP327nV3gHptsnvveGEI06iC7rD8wG1tI7FMczU\n\tGPAA==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"aKdXRz0i\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=+2T3ZLVGJwVrydTkz6iNKwj5oO6lQf9kYT88gPluNzs=;\n\tb=1XWt3xruI7dDFb1n37G+QykWidA6B4yJcb14vJFzvBUZTI4WZJOdfCNA1utJDv5tyo\n\tGPczzfc5q8UT3spbuFrJN/9VUJWGZ5CErxDhG5bkxSI6vWIkvsjFOzPCyemUxEGUOtoW\n\tw/in4reH9sMyC6K3+tP6P1Cdu4Of/zfbvOYg9KbhBbYK5uvlfcXPkXeSZwXsWd1a+TZ6\n\tbn6O9uz1YfBj0O5uqpKRjaKStYstPCiTqNWWwO39NOVZBSvW67+q8rV/Chok7ifUDHUF\n\tlsZhJbyLbdvtLfJSKV/rjQ5l7waXLnaChqx1DVguYbw+uQYgkX/Tju7DQdysWZ4pSgIg\n\thqDQ==", "X-Gm-Message-State": "ANoB5pmaxgeKBVRSa6KQ1vvWsMkpz9eVpDLYoGJDqt4jkzOhVKvFzlF3\n\tV7mmyCsGT4jHtdOZ1OYQnG2aVt5fEmWbhZbD", "X-Google-Smtp-Source": "AA0mqf7APrhALFxz3tBarLWzO9se3SjrXXYUOBsaxe6mPhOUTsA4rFAsHeFAsOo7lBKctrLPyUaZoQ==", "X-Received": "by 2002:a05:600c:5546:b0:3d1:f6b3:2ce3 with SMTP id\n\tiz6-20020a05600c554600b003d1f6b32ce3mr4821034wmb.35.1670576488710; \n\tFri, 09 Dec 2022 01:01:28 -0800 (PST)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 9 Dec 2022 09:00:39 +0000", "Message-Id": "<20221209090050.19441-2-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20221209090050.19441-1-naush@raspberrypi.com>", "References": "<20221209090050.19441-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v4 01/12] libcamera: stream: Add stream\n\thints 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>", "From": "Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Naushir Patuck <naush@raspberrypi.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Add a new hints flags field in the StreamConfiguration structure to allow the\napplication to specify certain intended behavior when driving libcamera.\nPipeline handlers are expected to look at these hint flags and may optimise\ninternal operations based on them.\n\nCurrently, only one flag is listed, MandatoryRequestBuffer, which the\napplication sets to guarantee that a buffer will be provided in the Request for\neach configured stream.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n include/libcamera/stream.h | 8 ++++++++\n src/libcamera/stream.cpp | 24 ++++++++++++++++++++++++\n 2 files changed, 32 insertions(+)", "diff": "diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\nindex 29235ddf0d8a..1c5273004297 100644\n--- a/include/libcamera/stream.h\n+++ b/include/libcamera/stream.h\n@@ -13,6 +13,8 @@\n #include <string>\n #include <vector>\n \n+#include <libcamera/base/flags.h>\n+\n #include <libcamera/color_space.h>\n #include <libcamera/framebuffer.h>\n #include <libcamera/geometry.h>\n@@ -51,6 +53,12 @@ struct StreamConfiguration {\n \n \tstd::optional<ColorSpace> colorSpace;\n \n+\tenum class Hint {\n+\t\tNone = 0,\n+\t\tMandatoryRequestBuffer = (1 << 0),\n+\t};\n+\tFlags<Hint> hints;\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 67f308157fbf..504c6d86cd04 100644\n--- a/src/libcamera/stream.cpp\n+++ b/src/libcamera/stream.cpp\n@@ -349,6 +349,30 @@ StreamConfiguration::StreamConfiguration(const StreamFormats &formats)\n * color spaces can be supported and in what combinations.\n */\n \n+/**\n+ * \\enum StreamConfiguration::Hint\n+ * \\brief List of available hint flags provided by the application for a stream\n+ *\n+ * \\var StreamConfiguration::Hint::None\n+ * No hints for this stream.\n+ * \\var StreamConfiguration::Hint::MandatoryRequestBuffer\n+ * Informs the pipeline handler that the application guarantee to provide a\n+ * buffer for the configured stream in the Request. This may allow the pipeline\n+ * handler to allocate fewer (or no) buffers for internal use.\n+ */\n+\n+/**\n+ * \\var StreamConfiguration::hints\n+ * \\brief Application provided StreamConfiguration::Hint flags for specific\n+ * stream behavior\n+ *\n+ * Provides hints from the application to the pipeline handlers on how it\n+ * intends on handling a given configured stream. These hints may alter the\n+ * behavior of the pipeline handlers, for example, by allocating fewer buffers\n+ * for internal use if an application guarantees to always provide a buffer in\n+ * the Request for a stream.\n+ */\n+\n /**\n * \\fn StreamConfiguration::stream()\n * \\brief Retrieve the stream associated with the configuration\n", "prefixes": [ "libcamera-devel", "v4", "01/12" ] }