Patch Detail
Show a patch.
GET /api/1.1/patches/13574/?format=api
{ "id": 13574, "url": "https://patchwork.libcamera.org/api/1.1/patches/13574/?format=api", "web_url": "https://patchwork.libcamera.org/patch/13574/", "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": "<20210831063438.785767-4-hiroh@chromium.org>", "date": "2021-08-31T06:34:36", "name": "[libcamera-devel,3/5] mapped_framebuffer: Introduce MappedVectorBuffer", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "dd75e7d11ff7a6323962c3db9d8ee7d1f27d0385", "submitter": { "id": 63, "url": "https://patchwork.libcamera.org/api/1.1/people/63/?format=api", "name": "Hirokazu Honda", "email": "hiroh@chromium.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/13574/mbox/", "series": [], "comments": "https://patchwork.libcamera.org/api/patches/13574/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/13574/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 C4B05BD87D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 31 Aug 2021 06:35:13 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7D91A69171;\n\tTue, 31 Aug 2021 08:35:13 +0200 (CEST)", "from mail-pl1-x634.google.com (mail-pl1-x634.google.com\n\t[IPv6:2607:f8b0:4864:20::634])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6A5D169169\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 31 Aug 2021 08:35:09 +0200 (CEST)", "by mail-pl1-x634.google.com with SMTP id m4so10040890pll.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 30 Aug 2021 23:35:09 -0700 (PDT)", "from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:203:3c62:aba4:18ea:5441])\n\tby smtp.gmail.com with ESMTPSA id\n\td17sm16304027pfn.110.2021.08.30.23.35.06\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 30 Aug 2021 23:35:07 -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=\"EsJ3FVwp\"; 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=yFuXrHPkuSawVSKXm42XTQO9ATri+BKx9ZteY5W3TA8=;\n\tb=EsJ3FVwpmY6/Kx8Liyup8CPzOMysP3l+EBl/nBVfTB9aXEu0+oRTJqIKJZ9nky/2Zy\n\tU8ttS2begJUfOjk/5GVmKxl0nb7WNwHzjgCLkOBV6K6CF5P48NnQis8EG6A0YmbVCehz\n\tQYE9WWk6wIohJiynLw9MRZK48ldcCh6dXNfds=", "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=yFuXrHPkuSawVSKXm42XTQO9ATri+BKx9ZteY5W3TA8=;\n\tb=uRvrEHob67jQCa6VxQMHJ6m9KjCEgohfx+Ef7fIlwhCThul/r3K6sAkg0WYKjvpYXP\n\tzjjJaM7KbhjkVhaUzZTpVeY2fKdnuKxR5wG/JHxA/pZ7lg5D05yvU5PTRmWXYrAXuyzy\n\t0RyPlvVBhlOC7M6wPkm5VuJ40Vt92h/ytC48/uHHxSH1CLzE5DsFxU4iQR4izbkOqKHT\n\thD89pkQ3tDqXPCc8NkEhr2KO6OecNf+Dsu2Y69vrhFN0Qnw3Y3xQCHl6TsshMEjymN1a\n\tmMuMtbSFl5vKwOL7G1jI4Y6FsvL2RE/wtjmrdc+8lsJMeVpbJVbOmh50WoxcEhTjqEcM\n\todAw==", "X-Gm-Message-State": "AOAM533Oz0h54JOvfd+1jsxXUngdKugjEUOgf48veJxQWImfZjl2ATrT\n\tBinn063dTHizBePH1KWMsz0jeg5kqJ4GRA==", "X-Google-Smtp-Source": "ABdhPJyDP/jpSkXeBaS8QF/i8+4E5Uqw0cMex+2JkOVtd0pan+CNozvUvf1YkVz5VJjVY16ZixTsPQ==", "X-Received": "by 2002:a17:902:b218:b029:11a:bf7b:1a80 with SMTP id\n\tt24-20020a170902b218b029011abf7b1a80mr3234684plr.82.1630391707494; \n\tMon, 30 Aug 2021 23:35:07 -0700 (PDT)", "From": "Hirokazu Honda <hiroh@chromium.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 31 Aug 2021 15:34:36 +0900", "Message-Id": "<20210831063438.785767-4-hiroh@chromium.org>", "X-Mailer": "git-send-email 2.33.0.259.gc128427fd7-goog", "In-Reply-To": "<20210831063438.785767-1-hiroh@chromium.org>", "References": "<20210831063438.785767-1-hiroh@chromium.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 3/5] mapped_framebuffer: Introduce\n\tMappedVectorBuffer", "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": "MappedFrameBuffer is a main class of deriving MappedBuffer. It works\nwith FrameBuffer, so the source planes must be given as file\ndescriptors.\nMappedBuffer interface is a generic class of providing accessing\nplanes in memory. This introduces a new class deriving MappedBuffer,\nMappedVectorBuffer. It is created with the plane data in heap,\nconcretely, std::vector<uint8_t> and owns it.\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\n---\n include/libcamera/internal/mapped_framebuffer.h | 9 +++++++++\n src/libcamera/mapped_framebuffer.cpp | 17 +++++++++++++++++\n 2 files changed, 26 insertions(+)", "diff": "diff --git a/include/libcamera/internal/mapped_framebuffer.h b/include/libcamera/internal/mapped_framebuffer.h\nindex 70ffbcbe..7deecded 100644\n--- a/include/libcamera/internal/mapped_framebuffer.h\n+++ b/include/libcamera/internal/mapped_framebuffer.h\n@@ -59,6 +59,15 @@ public:\n \n LIBCAMERA_FLAGS_ENABLE_OPERATORS(MappedFrameBuffer::MapFlag)\n \n+class MappedVectorBuffer : public MappedBuffer\n+{\n+public:\n+\tMappedVectorBuffer(std::vector<std::vector<uint8_t>> &&planes);\n+\n+private:\n+\tstd::vector<std::vector<uint8_t>> data_;\n+};\n+\n } /* namespace libcamera */\n \n #endif /* __LIBCAMERA_INTERNAL_MAPPED_FRAMEBUFFER_H__ */\ndiff --git a/src/libcamera/mapped_framebuffer.cpp b/src/libcamera/mapped_framebuffer.cpp\nindex 464d35fe..b09ad41a 100644\n--- a/src/libcamera/mapped_framebuffer.cpp\n+++ b/src/libcamera/mapped_framebuffer.cpp\n@@ -240,4 +240,21 @@ MappedFrameBuffer::MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags)\n \t}\n }\n \n+/**\n+ * \\class MappedVectorBuffer\n+ * \\brief Owns planes data in heap and provides the MappedBuffer interface\n+ */\n+\n+/**\n+ * \\brief Takes the ownership of the passed \\a planes\n+ * \\param[in] planes the plane data that shall be owned by MappedVectorBuffer\n+ */\n+MappedVectorBuffer::MappedVectorBuffer(std::vector<std::vector<uint8_t>> &&planes)\n+\t: data_(std::move(planes))\n+{\n+\tplanes_.reserve(data_.size());\n+\tfor (auto &plane : data_)\n+\t\tplanes_.emplace_back(plane.data(), plane.size());\n+}\n+\n } /* namespace libcamera */\n", "prefixes": [ "libcamera-devel", "3/5" ] }