Show a patch.

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

{
    "id": 16928,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/16928/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16928/",
    "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": "<20220803103849.26144-3-jacopo@jmondi.org>",
    "date": "2022-08-03T10:38:44",
    "name": "[libcamera-devel,v5,2/7] libcamera: formats: Merge V4L2 single and multi formats",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "4ac26e8968d950cd4cf6c1918dd79a3e674444d9",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/16928/mbox/",
    "series": [
        {
            "id": 3365,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3365/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3365",
            "date": "2022-08-03T10:38:42",
            "name": "libcamera: Map multiple V4L2 formats to a single libcamera::format",
            "version": 5,
            "mbox": "https://patchwork.libcamera.org/series/3365/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16928/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16928/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 86325BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  3 Aug 2022 10:39:02 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 52F396331B;\n\tWed,  3 Aug 2022 12:39:02 +0200 (CEST)",
            "from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net\n\t[IPv6:2001:4b98:dc4:8::225])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C4680603E6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  3 Aug 2022 12:39:00 +0200 (CEST)",
            "(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id BC0A41C000A;\n\tWed,  3 Aug 2022 10:38:58 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659523142;\n\tbh=M3lZgXuoLtm2DkTaX5MA7J5wByZDecd72blxOvNQ2AQ=;\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=Crul9fUquq6zL+cAJMccS9ZdPBdcemzaKWXP3P0CJMeEj8VDu3/9AB6KWzLZmhsrQ\n\tattTUTOecgg67tAy2pN+arWaEQWeY9lRDkwCLYXbkEScBDlCt2yl1Z/LzbgvHvcM7L\n\tjFq4cedk/nnTlpNUyjo03ccpMAaLahU7yWsjONV2R4/ht0Ve1XGlVvSa5Bl50RDwbf\n\txJ2AEGTHtVyALAxuiPxCO9Y9sJs33bBWXwh36Hlf88ESr1xo3uovc0yZNbrb9c/soR\n\tPEXdaHp2j3EYf8QXjeur4FVtt0Ot6i8BoYUt7xLbML20aUapR3HRx7DT6W292NDtJl\n\tLyzKZi2UqKavQ==",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed,  3 Aug 2022 12:38:44 +0200",
        "Message-Id": "<20220803103849.26144-3-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.37.1",
        "In-Reply-To": "<20220803103849.26144-1-jacopo@jmondi.org>",
        "References": "<20220803103849.26144-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v5 2/7] libcamera: formats: Merge V4L2\n\tsingle and multi formats",
        "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": "Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Jacopo Mondi <jacopo@jmondi.org>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "To each libcamera PixelFormat two V4L2 formats are associated, the\n'single' and 'multi' format variants.\n\nThe two versions list plane contiguous and non-contiguous format\nvariants, and an optional argument to V4L2PixelFormat::fromPixelFormat()\nwas used to select which one to pick.\n\nIn order to prepare to remove V4L2PixelFormat::fromPixelFormat(), and\nconsidering that no caller in the codebase uses the non-contiguous\nformat variant, merge the two formats vectors in a single one and\ndefault the selection to the first available one, which is functionally\nequivalent to what is currently implemented.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/internal/formats.h          |   5 +-\n include/libcamera/internal/v4l2_pixelformat.h |   3 +-\n src/libcamera/formats.cpp                     | 307 ++++--------------\n src/libcamera/v4l2_pixelformat.cpp            |  14 +-\n 4 files changed, 78 insertions(+), 251 deletions(-)",
    "diff": "diff --git a/include/libcamera/internal/formats.h b/include/libcamera/internal/formats.h\nindex ee599765be47..5b16c0a8c071 100644\n--- a/include/libcamera/internal/formats.h\n+++ b/include/libcamera/internal/formats.h\n@@ -53,10 +53,7 @@ public:\n \t/* \\todo Add support for non-contiguous memory planes */\n \tconst char *name;\n \tPixelFormat format;\n-\tstruct {\n-\t\tV4L2PixelFormat single;\n-\t\tV4L2PixelFormat multi;\n-\t} v4l2Formats;\n+\tstd::vector<V4L2PixelFormat> v4l2Formats;\n \tunsigned int bitsPerPixel;\n \tenum ColourEncoding colourEncoding;\n \tbool packed;\ndiff --git a/include/libcamera/internal/v4l2_pixelformat.h b/include/libcamera/internal/v4l2_pixelformat.h\nindex 7bd3ea79428f..ed94baf92795 100644\n--- a/include/libcamera/internal/v4l2_pixelformat.h\n+++ b/include/libcamera/internal/v4l2_pixelformat.h\n@@ -44,8 +44,7 @@ public:\n \tconst char *description() const;\n \n \tPixelFormat toPixelFormat() const;\n-\tstatic V4L2PixelFormat fromPixelFormat(const PixelFormat &pixelFormat,\n-\t\t\t\t\t       bool multiplanar = false);\n+\tstatic V4L2PixelFormat fromPixelFormat(const PixelFormat &pixelFormat);\n \n private:\n \tuint32_t fourcc_;\ndiff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp\nindex 53207b734143..b760ec0eff82 100644\n--- a/src/libcamera/formats.cpp\n+++ b/src/libcamera/formats.cpp\n@@ -42,12 +42,9 @@ LOG_DEFINE_CATEGORY(Formats)\n  * \\var PixelFormatInfo::v4l2Formats\n  * \\brief The V4L2 pixel formats corresponding to the PixelFormat\n  *\n- * Multiple V4L2 formats may exist for one PixelFormat when the format uses\n- * multiple planes, as V4L2 defines separate 4CCs for contiguous and separate\n- * planes formats. The two entries in the array store the contiguous and\n- * non-contiguous V4L2 formats respectively. If the PixelFormat isn't a\n- * multiplanar format, or if no corresponding non-contiguous V4L2 format\n- * exists, the second entry is invalid.\n+ * Multiple V4L2 formats may exist for one PixelFormat, as V4L2 defines\n+ * separate 4CCs for contiguous and non-contiguous versions of the same image\n+ * format.\n  *\n  * \\var PixelFormatInfo::bitsPerPixel\n  * \\brief The average number of bits per pixel\n@@ -156,10 +153,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::RGB565, {\n \t\t.name = \"RGB565\",\n \t\t.format = formats::RGB565,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_RGB565),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_RGB565), },\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n \t\t.packed = false,\n@@ -169,10 +163,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::RGB565_BE, {\n \t\t.name = \"RGB565_BE\",\n \t\t.format = formats::RGB565_BE,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_RGB565X),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_RGB565X), },\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n \t\t.packed = false,\n@@ -182,10 +173,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::BGR888, {\n \t\t.name = \"BGR888\",\n \t\t.format = formats::BGR888,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_RGB24),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_RGB24), },\n \t\t.bitsPerPixel = 24,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n \t\t.packed = false,\n@@ -195,10 +183,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::RGB888, {\n \t\t.name = \"RGB888\",\n \t\t.format = formats::RGB888,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_BGR24),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_BGR24), },\n \t\t.bitsPerPixel = 24,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n \t\t.packed = false,\n@@ -208,10 +193,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::XRGB8888, {\n \t\t.name = \"XRGB8888\",\n \t\t.format = formats::XRGB8888,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_XBGR32),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_XBGR32), },\n \t\t.bitsPerPixel = 32,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n \t\t.packed = false,\n@@ -221,10 +203,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::XBGR8888, {\n \t\t.name = \"XBGR8888\",\n \t\t.format = formats::XBGR8888,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_RGBX32),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_RGBX32), },\n \t\t.bitsPerPixel = 32,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n \t\t.packed = false,\n@@ -234,10 +213,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::RGBX8888, {\n \t\t.name = \"RGBX8888\",\n \t\t.format = formats::RGBX8888,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_BGRX32),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_BGRX32), },\n \t\t.bitsPerPixel = 32,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n \t\t.packed = false,\n@@ -247,10 +223,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::BGRX8888, {\n \t\t.name = \"BGRX8888\",\n \t\t.format = formats::BGRX8888,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_XRGB32),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_XRGB32), },\n \t\t.bitsPerPixel = 32,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n \t\t.packed = false,\n@@ -260,10 +233,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::ABGR8888, {\n \t\t.name = \"ABGR8888\",\n \t\t.format = formats::ABGR8888,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_RGBA32),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_RGBA32), },\n \t\t.bitsPerPixel = 32,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n \t\t.packed = false,\n@@ -273,10 +243,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::ARGB8888, {\n \t\t.name = \"ARGB8888\",\n \t\t.format = formats::ARGB8888,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_ABGR32),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_ABGR32), },\n \t\t.bitsPerPixel = 32,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n \t\t.packed = false,\n@@ -286,10 +253,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::BGRA8888, {\n \t\t.name = \"BGRA8888\",\n \t\t.format = formats::BGRA8888,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_ARGB32),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_ARGB32), },\n \t\t.bitsPerPixel = 32,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n \t\t.packed = false,\n@@ -299,10 +263,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::RGBA8888, {\n \t\t.name = \"RGBA8888\",\n \t\t.format = formats::RGBA8888,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_BGRA32),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_BGRA32), },\n \t\t.bitsPerPixel = 32,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n \t\t.packed = false,\n@@ -314,10 +275,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::YUYV, {\n \t\t.name = \"YUYV\",\n \t\t.format = formats::YUYV,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_YUYV),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_YUYV), },\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n \t\t.packed = false,\n@@ -327,10 +285,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::YVYU, {\n \t\t.name = \"YVYU\",\n \t\t.format = formats::YVYU,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_YVYU),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_YVYU), },\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n \t\t.packed = false,\n@@ -340,10 +295,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::UYVY, {\n \t\t.name = \"UYVY\",\n \t\t.format = formats::UYVY,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_UYVY),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_UYVY), },\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n \t\t.packed = false,\n@@ -353,10 +305,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::VYUY, {\n \t\t.name = \"VYUY\",\n \t\t.format = formats::VYUY,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_VYUY),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_VYUY), },\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n \t\t.packed = false,\n@@ -369,8 +318,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t\t.name = \"NV12\",\n \t\t.format = formats::NV12,\n \t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_NV12),\n-\t\t\t.multi = V4L2PixelFormat(V4L2_PIX_FMT_NV12M),\n+\t\t\tV4L2PixelFormat(V4L2_PIX_FMT_NV12),\n+\t\t\tV4L2PixelFormat(V4L2_PIX_FMT_NV12M),\n \t\t},\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -382,8 +331,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t\t.name = \"NV21\",\n \t\t.format = formats::NV21,\n \t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_NV21),\n-\t\t\t.multi = V4L2PixelFormat(V4L2_PIX_FMT_NV21M),\n+\t\t\tV4L2PixelFormat(V4L2_PIX_FMT_NV21),\n+\t\t\tV4L2PixelFormat(V4L2_PIX_FMT_NV21M),\n \t\t},\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -395,8 +344,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t\t.name = \"NV16\",\n \t\t.format = formats::NV16,\n \t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_NV16),\n-\t\t\t.multi = V4L2PixelFormat(V4L2_PIX_FMT_NV16M),\n+\t\t\tV4L2PixelFormat(V4L2_PIX_FMT_NV16),\n+\t\t\tV4L2PixelFormat(V4L2_PIX_FMT_NV16M),\n \t\t},\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -408,8 +357,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t\t.name = \"NV61\",\n \t\t.format = formats::NV61,\n \t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_NV61),\n-\t\t\t.multi = V4L2PixelFormat(V4L2_PIX_FMT_NV61M),\n+\t\t\tV4L2PixelFormat(V4L2_PIX_FMT_NV61),\n+\t\t\tV4L2PixelFormat(V4L2_PIX_FMT_NV61M),\n \t\t},\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -420,10 +369,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::NV24, {\n \t\t.name = \"NV24\",\n \t\t.format = formats::NV24,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_NV24),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_NV24), },\n \t\t.bitsPerPixel = 24,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n \t\t.packed = false,\n@@ -433,10 +379,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::NV42, {\n \t\t.name = \"NV42\",\n \t\t.format = formats::NV42,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_NV42),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_NV42), },\n \t\t.bitsPerPixel = 24,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n \t\t.packed = false,\n@@ -447,8 +390,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t\t.name = \"YUV420\",\n \t\t.format = formats::YUV420,\n \t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_YUV420),\n-\t\t\t.multi = V4L2PixelFormat(V4L2_PIX_FMT_YUV420M),\n+\t\t\tV4L2PixelFormat(V4L2_PIX_FMT_YUV420),\n+\t\t\tV4L2PixelFormat(V4L2_PIX_FMT_YUV420M),\n \t\t},\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -460,8 +403,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t\t.name = \"YVU420\",\n \t\t.format = formats::YVU420,\n \t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_YVU420),\n-\t\t\t.multi = V4L2PixelFormat(V4L2_PIX_FMT_YVU420M),\n+\t\t\tV4L2PixelFormat(V4L2_PIX_FMT_YVU420),\n+\t\t\tV4L2PixelFormat(V4L2_PIX_FMT_YVU420M),\n \t\t},\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -473,8 +416,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t\t.name = \"YUV422\",\n \t\t.format = formats::YUV422,\n \t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_YUV422P),\n-\t\t\t.multi = V4L2PixelFormat(V4L2_PIX_FMT_YUV422M),\n+\t\t\tV4L2PixelFormat(V4L2_PIX_FMT_YUV422P),\n+\t\t\tV4L2PixelFormat(V4L2_PIX_FMT_YUV422M),\n \t\t},\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -485,10 +428,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::YVU422, {\n \t\t.name = \"YVU422\",\n \t\t.format = formats::YVU422,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(),\n-\t\t\t.multi = V4L2PixelFormat(V4L2_PIX_FMT_YVU422M),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_YVU422M), },\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n \t\t.packed = false,\n@@ -498,10 +438,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::YUV444, {\n \t\t.name = \"YUV444\",\n \t\t.format = formats::YUV444,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(),\n-\t\t\t.multi = V4L2PixelFormat(V4L2_PIX_FMT_YUV444M),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_YUV444M), },\n \t\t.bitsPerPixel = 24,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n \t\t.packed = false,\n@@ -511,10 +448,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::YVU444, {\n \t\t.name = \"YVU444\",\n \t\t.format = formats::YVU444,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(),\n-\t\t\t.multi = V4L2PixelFormat(V4L2_PIX_FMT_YVU444M),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_YVU444M), },\n \t\t.bitsPerPixel = 24,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n \t\t.packed = false,\n@@ -526,10 +460,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::R8, {\n \t\t.name = \"R8\",\n \t\t.format = formats::R8,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_GREY),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_GREY), },\n \t\t.bitsPerPixel = 8,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n \t\t.packed = false,\n@@ -539,10 +470,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::R10, {\n \t\t.name = \"R10\",\n \t\t.format = formats::R10,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_Y10),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_Y10), },\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n \t\t.packed = false,\n@@ -552,10 +480,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::R12, {\n \t\t.name = \"R12\",\n \t\t.format = formats::R12,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_Y12),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_Y12), },\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n \t\t.packed = false,\n@@ -565,10 +490,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::R10_CSI2P, {\n \t\t.name = \"R10_CSI2P\",\n \t\t.format = formats::R10,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_Y10P),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_Y10P), },\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n \t\t.packed = true,\n@@ -580,10 +502,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SBGGR8, {\n \t\t.name = \"SBGGR8\",\n \t\t.format = formats::SBGGR8,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SBGGR8),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SBGGR8), },\n \t\t.bitsPerPixel = 8,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = false,\n@@ -593,10 +512,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SGBRG8, {\n \t\t.name = \"SGBRG8\",\n \t\t.format = formats::SGBRG8,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SGBRG8),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SGBRG8), },\n \t\t.bitsPerPixel = 8,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = false,\n@@ -606,10 +522,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SGRBG8, {\n \t\t.name = \"SGRBG8\",\n \t\t.format = formats::SGRBG8,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SGRBG8),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SGRBG8), },\n \t\t.bitsPerPixel = 8,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = false,\n@@ -619,10 +532,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SRGGB8, {\n \t\t.name = \"SRGGB8\",\n \t\t.format = formats::SRGGB8,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SRGGB8),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SRGGB8), },\n \t\t.bitsPerPixel = 8,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = false,\n@@ -632,10 +542,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SBGGR10, {\n \t\t.name = \"SBGGR10\",\n \t\t.format = formats::SBGGR10,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SBGGR10),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SBGGR10), },\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = false,\n@@ -645,10 +552,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SGBRG10, {\n \t\t.name = \"SGBRG10\",\n \t\t.format = formats::SGBRG10,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SGBRG10),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SGBRG10), },\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = false,\n@@ -658,10 +562,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SGRBG10, {\n \t\t.name = \"SGRBG10\",\n \t\t.format = formats::SGRBG10,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SGRBG10),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SGRBG10), },\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = false,\n@@ -671,10 +572,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SRGGB10, {\n \t\t.name = \"SRGGB10\",\n \t\t.format = formats::SRGGB10,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SRGGB10),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SRGGB10), },\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = false,\n@@ -684,10 +582,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SBGGR10_CSI2P, {\n \t\t.name = \"SBGGR10_CSI2P\",\n \t\t.format = formats::SBGGR10_CSI2P,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SBGGR10P),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SBGGR10P), },\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = true,\n@@ -697,10 +592,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SGBRG10_CSI2P, {\n \t\t.name = \"SGBRG10_CSI2P\",\n \t\t.format = formats::SGBRG10_CSI2P,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SGBRG10P),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SGBRG10P), },\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = true,\n@@ -710,10 +602,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SGRBG10_CSI2P, {\n \t\t.name = \"SGRBG10_CSI2P\",\n \t\t.format = formats::SGRBG10_CSI2P,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SGRBG10P),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SGRBG10P), },\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = true,\n@@ -723,10 +612,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SRGGB10_CSI2P, {\n \t\t.name = \"SRGGB10_CSI2P\",\n \t\t.format = formats::SRGGB10_CSI2P,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SRGGB10P),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SRGGB10P), },\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = true,\n@@ -736,10 +622,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SBGGR12, {\n \t\t.name = \"SBGGR12\",\n \t\t.format = formats::SBGGR12,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SBGGR12),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SBGGR12), },\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = false,\n@@ -749,10 +632,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SGBRG12, {\n \t\t.name = \"SGBRG12\",\n \t\t.format = formats::SGBRG12,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SGBRG12),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SGBRG12), },\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = false,\n@@ -762,10 +642,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SGRBG12, {\n \t\t.name = \"SGRBG12\",\n \t\t.format = formats::SGRBG12,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SGRBG12),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SGRBG12), },\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = false,\n@@ -775,10 +652,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SRGGB12, {\n \t\t.name = \"SRGGB12\",\n \t\t.format = formats::SRGGB12,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SRGGB12),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SRGGB12), },\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = false,\n@@ -788,10 +662,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SBGGR12_CSI2P, {\n \t\t.name = \"SBGGR12_CSI2P\",\n \t\t.format = formats::SBGGR12_CSI2P,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SBGGR12P),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SBGGR12P), },\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = true,\n@@ -801,10 +672,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SGBRG12_CSI2P, {\n \t\t.name = \"SGBRG12_CSI2P\",\n \t\t.format = formats::SGBRG12_CSI2P,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SGBRG12P),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SGBRG12P), },\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = true,\n@@ -814,10 +682,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SGRBG12_CSI2P, {\n \t\t.name = \"SGRBG12_CSI2P\",\n \t\t.format = formats::SGRBG12_CSI2P,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SGRBG12P),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SGRBG12P), },\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = true,\n@@ -827,10 +692,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SRGGB12_CSI2P, {\n \t\t.name = \"SRGGB12_CSI2P\",\n \t\t.format = formats::SRGGB12_CSI2P,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SRGGB12P),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SRGGB12P), },\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = true,\n@@ -840,10 +702,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SBGGR16, {\n \t\t.name = \"SBGGR16\",\n \t\t.format = formats::SBGGR16,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SBGGR16),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SBGGR16), },\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = false,\n@@ -853,10 +712,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SGBRG16, {\n \t\t.name = \"SGBRG16\",\n \t\t.format = formats::SGBRG16,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SGBRG16),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SGBRG16), },\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = false,\n@@ -866,10 +722,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SGRBG16, {\n \t\t.name = \"SGRBG16\",\n \t\t.format = formats::SGRBG16,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SGRBG16),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SGRBG16), },\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = false,\n@@ -879,10 +732,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SRGGB16, {\n \t\t.name = \"SRGGB16\",\n \t\t.format = formats::SRGGB16,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_SRGGB16),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_SRGGB16), },\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = false,\n@@ -892,10 +742,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SBGGR10_IPU3, {\n \t\t.name = \"SBGGR10_IPU3\",\n \t\t.format = formats::SBGGR10_IPU3,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SBGGR10),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SBGGR10), },\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = true,\n@@ -906,10 +753,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SGBRG10_IPU3, {\n \t\t.name = \"SGBRG10_IPU3\",\n \t\t.format = formats::SGBRG10_IPU3,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SGBRG10),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SGBRG10), },\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = true,\n@@ -919,10 +763,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SGRBG10_IPU3, {\n \t\t.name = \"SGRBG10_IPU3\",\n \t\t.format = formats::SGRBG10_IPU3,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SGRBG10),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SGRBG10), },\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = true,\n@@ -932,10 +773,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::SRGGB10_IPU3, {\n \t\t.name = \"SRGGB10_IPU3\",\n \t\t.format = formats::SRGGB10_IPU3,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SRGGB10),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SRGGB10), },\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n \t\t.packed = true,\n@@ -947,10 +785,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t{ formats::MJPEG, {\n \t\t.name = \"MJPEG\",\n \t\t.format = formats::MJPEG,\n-\t\t.v4l2Formats = {\n-\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_MJPEG),\n-\t\t\t.multi = V4L2PixelFormat(),\n-\t\t},\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_MJPEG), },\n \t\t.bitsPerPixel = 0,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n \t\t.packed = false,\ndiff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp\nindex bdcdc3be4e0c..9f74bd37c5ea 100644\n--- a/src/libcamera/v4l2_pixelformat.cpp\n+++ b/src/libcamera/v4l2_pixelformat.cpp\n@@ -304,24 +304,20 @@ PixelFormat V4L2PixelFormat::toPixelFormat() const\n /**\n  * \\brief Convert \\a pixelFormat to its corresponding V4L2PixelFormat\n  * \\param[in] pixelFormat The PixelFormat to convert\n- * \\param[in] multiplanar V4L2 Multiplanar API support flag\n  *\n- * Multiple V4L2 formats may exist for one PixelFormat when the format uses\n- * multiple planes, as V4L2 defines separate 4CCs for contiguous and separate\n- * planes formats. Set the \\a multiplanar parameter to false to select a format\n- * with contiguous planes, or to true to select a format with non-contiguous\n- * planes.\n+ * Multiple V4L2 formats may exist for one PixelFormat as V4L2 defines separate\n+ * 4CCs for contiguous and non-contiguous versions of the same image format.\n+ * When that is the case, this function returns the contiguous planes format.\n  *\n  * \\return The V4L2PixelFormat corresponding to \\a pixelFormat\n  */\n-V4L2PixelFormat V4L2PixelFormat::fromPixelFormat(const PixelFormat &pixelFormat,\n-\t\t\t\t\t\t bool multiplanar)\n+V4L2PixelFormat V4L2PixelFormat::fromPixelFormat(const PixelFormat &pixelFormat)\n {\n \tconst PixelFormatInfo &info = PixelFormatInfo::info(pixelFormat);\n \tif (!info.isValid())\n \t\treturn V4L2PixelFormat();\n \n-\treturn multiplanar ? info.v4l2Formats.multi : info.v4l2Formats.single;\n+\treturn info.v4l2Formats[0];\n }\n \n /**\n",
    "prefixes": [
        "libcamera-devel",
        "v5",
        "2/7"
    ]
}