Show a patch.

GET /api/1.1/patches/13507/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 13507,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/13507/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/13507/",
    "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": "<20210826112539.170694-8-hiroh@chromium.org>",
    "date": "2021-08-26T11:25:37",
    "name": "[libcamera-devel,v3,7/9] V4L2VideDevice::createBuffer() creates the same number of FrameBuffer::Planes as V4L2 format planes. Therefore, if the v4l2 format single is single-planar format, the created number of FrameBuffer::Planes is 1. It should rather cr",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "6db279a96b662330d0fd1871ddba09b568dac3a5",
    "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/13507/mbox/",
    "series": [
        {
            "id": 2398,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2398/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2398",
            "date": "2021-08-26T11:25:30",
            "name": "Add offset to FrameBuffer::Plane",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/2398/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/13507/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/13507/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 85DADC3243\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 26 Aug 2021 11:26:04 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3F4876891B;\n\tThu, 26 Aug 2021 13:26:02 +0200 (CEST)",
            "from mail-pl1-x636.google.com (mail-pl1-x636.google.com\n\t[IPv6:2607:f8b0:4864:20::636])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EF6FD6891B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Aug 2021 13:25:59 +0200 (CEST)",
            "by mail-pl1-x636.google.com with SMTP id m4so1633017pll.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Aug 2021 04:25:59 -0700 (PDT)",
            "from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:203:a5bc:b3dd:7208:bec1])\n\tby smtp.gmail.com with ESMTPSA id\n\ts29sm3472057pgl.38.2021.08.26.04.25.56\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 26 Aug 2021 04:25:57 -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=\"NAomP8cE\"; 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=RKGsxDXeIpUrZGD7PC/qMrhFninvZF/n+M+4dHhZyu8=;\n\tb=NAomP8cEGvvsXLbkdDFJlrWyryxfoGYJ9IKGalcxCkkrJPNU/9YhUOWki5/rwZyvoM\n\tPltQ7p8lC03qrlacnSVu/LTPpFBAZYUb+RMAiIJp8p06tejOICu8QFLg2hkCAkevF6HF\n\tPZU1Lpji1Gvdjf7S7RARihGYgR5EOHu5NuoQc=",
        "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=RKGsxDXeIpUrZGD7PC/qMrhFninvZF/n+M+4dHhZyu8=;\n\tb=Pai30Chpt2/JJ//ZGHkbRyQm29b0WlcIcD5NEAXLmOStQpkryrsDt8xsJXR5dNPWD5\n\tLz0f3CJSSdSsEhnJ1rHmuO/e3clAVMZ7oyz1BRDwkb3MInia6YXAvq2HHMxVliB69/3E\n\tDFd9xJfORvZathHhjiXYHhgZ1F7eAGWHOprBO9U13AXV1hhjYYFle9q8fhwQgiiwI346\n\tH8x8A5ztLkRi//rbnp9U1oj0K5O237ElCHj1C+SC/4uXcYqm4+1R4BPjK1CS5rhM6WXH\n\tIWchPG52bvcSjC8J+QZ6oJPA+pMm2zO1rp7pdCmw0744nFXnkwxpTBtNloQo5bW2XyKm\n\tSbYw==",
        "X-Gm-Message-State": "AOAM531jGJaRfk7JoSG6mJyb0hOXpQpT+5f2NtBw+6s8RNM9aVeVT6ug\n\tghTY/pbK2OUrZU3apiBsmXAgT/4QfuRXMg==",
        "X-Google-Smtp-Source": "ABdhPJwXU7p2z3HT9a3DLxWOlPUWX3VUZCDAaB7HDdWzQOWN03BODRn2cs3sbuAuratVetVfhx1+lg==",
        "X-Received": "by 2002:a17:90a:680a:: with SMTP id\n\tp10mr3760726pjj.179.1629977158131; \n\tThu, 26 Aug 2021 04:25:58 -0700 (PDT)",
        "From": "Hirokazu Honda <hiroh@chromium.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 26 Aug 2021 20:25:37 +0900",
        "Message-Id": "<20210826112539.170694-8-hiroh@chromium.org>",
        "X-Mailer": "git-send-email 2.33.0.rc2.250.ged5fa647cd-goog",
        "In-Reply-To": "<20210826112539.170694-1-hiroh@chromium.org>",
        "References": "<20210826112539.170694-1-hiroh@chromium.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v3 7/9] V4L2VideDevice::createBuffer()\n\tcreates the same number of FrameBuffer::Planes as V4L2 format planes.\n\tTherefore, if the v4l2 format single is single-planar format,\n\tthe created number of FrameBuffer::Planes is 1. It should rather\n\tcreate the\n\tsame number of FrameBuffer::Planes as the color format planes.",
        "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": "Signed-off-by: Hirokazu Honda <hiroh@chromium.org>\n---\n include/libcamera/internal/v4l2_videodevice.h |  10 +-\n src/libcamera/v4l2_videodevice.cpp            | 141 ++++++++++++++----\n test/v4l2_videodevice/buffer_cache.cpp        |   6 +-\n 3 files changed, 123 insertions(+), 34 deletions(-)",
    "diff": "diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h\nindex e767ec84..bfda6726 100644\n--- a/include/libcamera/internal/v4l2_videodevice.h\n+++ b/include/libcamera/internal/v4l2_videodevice.h\n@@ -114,8 +114,9 @@ struct V4L2Capability final : v4l2_capability {\n class V4L2BufferCache\n {\n public:\n-\tV4L2BufferCache(unsigned int numEntries);\n-\tV4L2BufferCache(const std::vector<std::unique_ptr<FrameBuffer>> &buffers);\n+\tV4L2BufferCache(unsigned int numEntries, unsigned int numPlanes);\n+\tV4L2BufferCache(const std::vector<std::unique_ptr<FrameBuffer>> &buffers,\n+\t\t\tunsigned int numPlanes);\n \t~V4L2BufferCache();\n \n \tint get(const FrameBuffer &buffer);\n@@ -126,7 +127,8 @@ private:\n \t{\n \tpublic:\n \t\tEntry();\n-\t\tEntry(bool free, uint64_t lastUsed, const FrameBuffer &buffer);\n+\t\tEntry(bool free, uint64_t lastUsed, unsigned int numPlanes,\n+\t\t      const FrameBuffer &buffer);\n \n \t\tbool operator==(const FrameBuffer &buffer) const;\n \n@@ -149,6 +151,7 @@ private:\n \n \tstd::atomic<uint64_t> lastUsedCounter_;\n \tstd::vector<Entry> cache_;\n+\tunsigned int numPlanes_;\n \t/* \\todo Expose the miss counter through an instrumentation API. */\n \tunsigned int missCounter_;\n };\n@@ -242,6 +245,7 @@ private:\n \tFrameBuffer *dequeueBuffer();\n \n \tV4L2Capability caps_;\n+\tV4L2DeviceFormat format_;\n \n \tenum v4l2_buf_type bufferType_;\n \tenum v4l2_memory memoryType_;\ndiff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\nindex 2ff25af2..f5f8741a 100644\n--- a/src/libcamera/v4l2_videodevice.cpp\n+++ b/src/libcamera/v4l2_videodevice.cpp\n@@ -25,6 +25,7 @@\n \n #include <libcamera/file_descriptor.h>\n \n+#include \"libcamera/internal/formats.h\"\n #include \"libcamera/internal/media_device.h\"\n #include \"libcamera/internal/media_object.h\"\n \n@@ -157,13 +158,15 @@ LOG_DECLARE_CATEGORY(V4L2)\n /**\n  * \\brief Create an empty cache with \\a numEntries entries\n  * \\param[in] numEntries Number of entries to reserve in the cache\n+ * \\param[in] numPlanes Number of V4L2 buffer planes\n  *\n- * Create a cache with \\a numEntries entries all marked as unused. The entries\n- * will be populated as the cache is used. This is typically used to implement\n- * buffer import, with buffers added to the cache as they are queued.\n+ * Create a cache with \\a numEntries entries all marked as unused. The entry is\n+ * for \\a numPlanes planes V4L2 buffer. The entries will be populated as the\n+ * cache is used. This is typically used to implement buffer import, with\n+ * buffers added to the cache as they are queued.\n  */\n-V4L2BufferCache::V4L2BufferCache(unsigned int numEntries)\n-\t: lastUsedCounter_(1), missCounter_(0)\n+V4L2BufferCache::V4L2BufferCache(unsigned int numEntries, unsigned int numPlanes)\n+\t: lastUsedCounter_(1), numPlanes_(numPlanes), missCounter_(0)\n {\n \tcache_.resize(numEntries);\n }\n@@ -171,17 +174,20 @@ V4L2BufferCache::V4L2BufferCache(unsigned int numEntries)\n /**\n  * \\brief Create a pre-populated cache\n  * \\param[in] buffers Array of buffers to pre-populated with\n+ * \\param[in] numPlanes Number of V4L2 buffer planes\n  *\n- * Create a cache pre-populated with \\a buffers. This is typically used to\n- * implement buffer export, with all buffers added to the cache when they are\n- * allocated.\n+ * Create a cache pre-populated with \\a buffers. The entry is for \\a numPlanes\n+ * planes V4L2 buffer. This is typically used to implement buffer export, with\n+ * all buffers added to the cache when they are allocated.\n  */\n-V4L2BufferCache::V4L2BufferCache(const std::vector<std::unique_ptr<FrameBuffer>> &buffers)\n-\t: lastUsedCounter_(1), missCounter_(0)\n+V4L2BufferCache::V4L2BufferCache(const std::vector<std::unique_ptr<FrameBuffer>> &buffers,\n+\t\t\t\t unsigned int numPlanes)\n+\t: lastUsedCounter_(1), numPlanes_(numPlanes), missCounter_(0)\n {\n \tfor (const std::unique_ptr<FrameBuffer> &buffer : buffers)\n \t\tcache_.emplace_back(true,\n \t\t\t\t    lastUsedCounter_.fetch_add(1, std::memory_order_acq_rel),\n+\t\t\t\t    numPlanes_,\n \t\t\t\t    *buffer.get());\n }\n \n@@ -237,6 +243,7 @@ int V4L2BufferCache::get(const FrameBuffer &buffer)\n \n \tcache_[use] = Entry(false,\n \t\t\t    lastUsedCounter_.fetch_add(1, std::memory_order_acq_rel),\n+\t\t\t    numPlanes_,\n \t\t\t    buffer);\n \n \treturn use;\n@@ -257,24 +264,53 @@ V4L2BufferCache::Entry::Entry()\n {\n }\n \n-V4L2BufferCache::Entry::Entry(bool free, uint64_t lastUsed, const FrameBuffer &buffer)\n+V4L2BufferCache::Entry::Entry(bool free, uint64_t lastUsed,\n+\t\t\t      unsigned int numPlanes, const FrameBuffer &buffer)\n \t: free_(free), lastUsed_(lastUsed)\n {\n-\tfor (const FrameBuffer::Plane &plane : buffer.planes())\n-\t\tplanes_.emplace_back(plane);\n+\tASSERT(numPlanes <= buffer.planes().size());\n+\tunsigned int length = 0;\n+\tfor (const FrameBuffer::Plane &plane : buffer.planes()) {\n+\t\tASSERT(plane.offset == length);\n+\t\tlength += plane.length;\n+\n+\t\tif (planes_.size() < numPlanes)\n+\t\t\tplanes_.emplace_back(plane);\n+\t}\n+\n+\tif (numPlanes == 1)\n+\t\tplanes_[0].length = length;\n }\n \n bool V4L2BufferCache::Entry::operator==(const FrameBuffer &buffer) const\n {\n \tconst std::vector<FrameBuffer::Plane> &planes = buffer.planes();\n \n-\tif (planes_.size() != planes.size())\n+\tif (planes_.size() != planes.size() || planes_.size() == 1)\n \t\treturn false;\n \n-\tfor (unsigned int i = 0; i < planes.size(); i++)\n-\t\tif (planes_[i].fd != planes[i].fd.fd() ||\n-\t\t    planes_[i].length != planes[i].length)\n+\tif (planes_.size() == 1) {\n+\t\t/*\n+\t\t * planes_ is V4L2 single-planar format buffer. fds of\n+\t\t * FrameBuffer::Plane must be identical and the sum of plane\n+\t\t * size is the V4L2 buffer length.\n+\t\t */\n+\t\tunsigned int length = 0;\n+\t\tfor (unsigned int i = 0; i < planes.size(); i++) {\n+\t\t\tif (planes_[0].fd != planes[i].fd.fd())\n+\t\t\t\treturn false;\n+\t\t\tlength += planes[i].length;\n+\t\t}\n+\t\tif (length != planes_[0].length)\n \t\t\treturn false;\n+\t} else {\n+\t\t/* planes_ is V4L2 multi-planar format buffer. */\n+\t\tfor (unsigned int i = 0; i < planes.size(); i++)\n+\t\t\tif (planes_[i].fd != planes[i].fd.fd() ||\n+\t\t\t    planes_[i].length != planes[i].length)\n+\t\t\t\treturn false;\n+\t}\n+\n \treturn true;\n }\n \n@@ -579,6 +615,12 @@ int V4L2VideoDevice::open()\n \t\t<< \"Opened device \" << caps_.bus_info() << \": \"\n \t\t<< caps_.driver() << \": \" << caps_.card();\n \n+\tret = getFormat(&format_);\n+\tif (ret) {\n+\t\tLOG(V4L2, Error) << \"Failed to get format\";\n+\t\treturn ret;\n+\t}\n+\n \treturn 0;\n }\n \n@@ -668,6 +710,12 @@ int V4L2VideoDevice::open(int handle, enum v4l2_buf_type type)\n \t\t<< \"Opened device \" << caps_.bus_info() << \": \"\n \t\t<< caps_.driver() << \": \" << caps_.card();\n \n+\tret = getFormat(&format_);\n+\tif (ret) {\n+\t\tLOG(V4L2, Error) << \"Failed to get format\";\n+\t\treturn ret;\n+\t}\n+\n \treturn 0;\n }\n \n@@ -761,12 +809,19 @@ int V4L2VideoDevice::tryFormat(V4L2DeviceFormat *format)\n  */\n int V4L2VideoDevice::setFormat(V4L2DeviceFormat *format)\n {\n+\tint ret = 0;\n \tif (caps_.isMeta())\n-\t\treturn trySetFormatMeta(format, true);\n+\t\tret = trySetFormatMeta(format, true);\n \telse if (caps_.isMultiplanar())\n-\t\treturn trySetFormatMultiplane(format, true);\n+\t\tret = trySetFormatMultiplane(format, true);\n \telse\n-\t\treturn trySetFormatSingleplane(format, true);\n+\t\tret = trySetFormatSingleplane(format, true);\n+\n+\t/* Cache the set format on success. */\n+\tif (ret == 0)\n+\t\tformat_ = *format;\n+\n+\treturn ret;\n }\n \n int V4L2VideoDevice::getFormatMeta(V4L2DeviceFormat *format)\n@@ -1152,8 +1207,13 @@ int V4L2VideoDevice::requestBuffers(unsigned int count,\n  * successful return the driver's internal buffer management is initialized in\n  * MMAP mode, and the video device is ready to accept queueBuffer() calls.\n  *\n- * The number of planes and the plane sizes for the allocation are determined\n- * by the currently active format on the device as set by setFormat().\n+ * The number of planes and their offsets and sizes are determined by the\n+ * currently active format on the device as set by setFormat(). They do not map\n+ * to the V4L2 buffer planes, but to colour planes of the pixel format. For\n+ * instance, if the active format is formats::NV12, the allocated FrameBuffer\n+ * instances will have two planes, for the luma and chroma components,\n+ * regardless of whether the device uses V4L2_PIX_FMT_NV12 or\n+ * V4L2_PIX_FMT_NV12M.\n  *\n  * Buffers allocated with this function shall later be free with\n  * releaseBuffers(). If buffers have already been allocated with\n@@ -1171,7 +1231,7 @@ int V4L2VideoDevice::allocateBuffers(unsigned int count,\n \tif (ret < 0)\n \t\treturn ret;\n \n-\tcache_ = new V4L2BufferCache(*buffers);\n+\tcache_ = new V4L2BufferCache(*buffers, format_.planesCount);\n \tmemoryType_ = V4L2_MEMORY_MMAP;\n \n \treturn ret;\n@@ -1190,8 +1250,13 @@ int V4L2VideoDevice::allocateBuffers(unsigned int count,\n  * usable with any V4L2 video device in DMABUF mode, or with other dmabuf\n  * importers.\n  *\n- * The number of planes and the plane sizes for the allocation are determined\n- * by the currently active format on the device as set by setFormat().\n+ * The number of planes and their offsets and sizes are determined by the\n+ * currently active format on the device as set by setFormat(). They do not map\n+ * to the V4L2 buffer planes, but to colour planes of the pixel format. For\n+ * instance, if the active format is formats::NV12, the allocated FrameBuffer\n+ * instances will have two planes, for the luma and chroma components,\n+ * regardless of whether the device uses V4L2_PIX_FMT_NV12 or\n+ * V4L2_PIX_FMT_NV12M.\n  *\n  * Multiple independent sets of buffers can be allocated with multiple calls to\n  * this function. Device-specific limitations may apply regarding the minimum\n@@ -1289,12 +1354,32 @@ std::unique_ptr<FrameBuffer> V4L2VideoDevice::createBuffer(unsigned int index)\n \t\t * \\todo Set the right offset once V4L2 API provides a way.\n \t\t */\n \t\tplane.offset = 0;\n-\t\tplane.length = multiPlanar ?\n-\t\t\tbuf.m.planes[nplane].length : buf.length;\n+\t\tplane.length = multiPlanar ? buf.m.planes[nplane].length : buf.length;\n \n \t\tplanes.push_back(std::move(plane));\n \t}\n \n+\tconst auto &info = PixelFormatInfo::info(format_.fourcc);\n+\tif (info.isValid() && info.numPlanes() != numPlanes) {\n+\t\tASSERT(numPlanes == 1u);\n+\t\tconst size_t numColorPlanes = info.numPlanes();\n+\t\tplanes.resize(numColorPlanes);\n+\t\tconst FileDescriptor &fd = planes[0].fd;\n+\t\tsize_t offset = 0;\n+\t\tfor (size_t i = 0; i < numColorPlanes; ++i) {\n+\t\t\tplanes[i].fd = fd;\n+\t\t\tplanes[i].offset = offset;\n+\n+\t\t\t/* \\todo Take the V4L2 stride into account */\n+\t\t\tconst unsigned int vertSubSample =\n+\t\t\t\tinfo.planes[i].verticalSubSampling;\n+\t\t\tplanes[i].length =\n+\t\t\t\tinfo.stride(format_.size.width, i, 1u) *\n+\t\t\t\t((format_.size.height + vertSubSample - 1) / vertSubSample);\n+\t\t\toffset += planes[i].length;\n+\t\t}\n+\t}\n+\n \treturn std::make_unique<FrameBuffer>(std::move(planes));\n }\n \n@@ -1352,7 +1437,7 @@ int V4L2VideoDevice::importBuffers(unsigned int count)\n \tif (ret)\n \t\treturn ret;\n \n-\tcache_ = new V4L2BufferCache(count);\n+\tcache_ = new V4L2BufferCache(count, format_.planesCount);\n \n \tLOG(V4L2, Debug) << \"Prepared to import \" << count << \" buffers\";\n \ndiff --git a/test/v4l2_videodevice/buffer_cache.cpp b/test/v4l2_videodevice/buffer_cache.cpp\nindex b3f2bec1..48f748bc 100644\n--- a/test/v4l2_videodevice/buffer_cache.cpp\n+++ b/test/v4l2_videodevice/buffer_cache.cpp\n@@ -166,7 +166,7 @@ public:\n \t\t * Test cache of same size as there are buffers, the cache is\n \t\t * created from a list of buffers and will be pre-populated.\n \t\t */\n-\t\tV4L2BufferCache cacheFromBuffers(buffers);\n+\t\tV4L2BufferCache cacheFromBuffers(buffers, 1u);\n \n \t\tif (testSequential(&cacheFromBuffers, buffers) != TestPass)\n \t\t\treturn TestFail;\n@@ -181,7 +181,7 @@ public:\n \t\t * Test cache of same size as there are buffers, the cache is\n \t\t * not pre-populated.\n \t\t */\n-\t\tV4L2BufferCache cacheFromNumbers(numBuffers);\n+\t\tV4L2BufferCache cacheFromNumbers(numBuffers, 1u);\n \n \t\tif (testSequential(&cacheFromNumbers, buffers) != TestPass)\n \t\t\treturn TestFail;\n@@ -196,7 +196,7 @@ public:\n \t\t * Test cache half the size of number of buffers used, the cache\n \t\t * is not pre-populated.\n \t\t */\n-\t\tV4L2BufferCache cacheHalf(numBuffers / 2);\n+\t\tV4L2BufferCache cacheHalf(numBuffers / 2, 1u);\n \n \t\tif (testRandom(&cacheHalf, buffers) != TestPass)\n \t\t\treturn TestFail;\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "7/9"
    ]
}