Show a patch.

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

{
    "id": 16740,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/16740/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16740/",
    "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": "<20220723095330.43542-2-jacopo@jmondi.org>",
    "date": "2022-07-23T09:53:23",
    "name": "[libcamera-devel,v2,1/8] libcamera: formats: Support multiple V4L2 pixel formats",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2ab0ecdcca4139f710e23ed9b3fe736c3e56e6ec",
    "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/16740/mbox/",
    "series": [
        {
            "id": 3320,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3320/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3320",
            "date": "2022-07-23T09:53:22",
            "name": "libcamera: Map multiple V4L2 formats to a single libcamera::format",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/3320/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16740/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16740/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 C0432BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 23 Jul 2022 09:53:49 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 786C663315;\n\tSat, 23 Jul 2022 11:53:49 +0200 (CEST)",
            "from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net\n\t[217.70.183.201])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 01F946330E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 23 Jul 2022 11:53:48 +0200 (CEST)",
            "(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 9F8931BF20A;\n\tSat, 23 Jul 2022 09:53:45 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658570029;\n\tbh=ArpbPgOsEsRlAYmL84t9r72AurH5FKNwpuhY/Hg5Ibs=;\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:Cc:\n\tFrom;\n\tb=gU6ycnpUZiCj0lZsSXzOoX1trG0ONECMGObiKooCQ9HcjYc7lnnYdtHvW21wQpUgA\n\tZNVYhB1qjeR/FCfQtACD/ZFtZp7jpRPf0jqQpoN61u9mqgZ9sgFWMrUJCzVhixj5z+\n\t1kv549t37m+Hmq0j+g61RSsexlA2kSlWRIeaMZ9tnXVAkNYXDNKOBUT6Zaa54fjHXM\n\tQkTyrSpgXAWKmakxy8tSQJGHH+aeNEPcwQv4M6H+ChhIwUSXx1G8rBUS6KSXQgCAYq\n\tF6m6CQA2tmxfvkLAM0KUwCIc2+qhapHYvLIqppcVql7W+AfQ0fw6Fo8E5pHL78aqGi\n\tf9yyyhsfRd4Lg==",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Sat, 23 Jul 2022 11:53:23 +0200",
        "Message-Id": "<20220723095330.43542-2-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.37.1",
        "In-Reply-To": "<20220723095330.43542-1-jacopo@jmondi.org>",
        "References": "<20220723095330.43542-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 1/8] libcamera: formats: Support\n\tmultiple V4L2 pixel 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>",
        "Cc": "jozef@mlich.cz, Pavel Machek <pavel@ucw.cz>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Associate a list of V4L2PixelFormat entries to a libcamera Format in\nthe PixelFormatInfo. This change prepares for supporting through a\nsingle libcamera Format devices which use different but equivalent\nversions of the same format, like V4L2_PIX_FMT_MJPEG and\nV4L2_PIX_FMT_JPEG.\n\nChange the existing users to always use the first entry to not break\nthe build.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n include/libcamera/internal/formats.h |   4 +-\n src/libcamera/formats.cpp            | 248 +++++++++++++--------------\n src/libcamera/v4l2_pixelformat.cpp   |   2 +-\n 3 files changed, 127 insertions(+), 127 deletions(-)",
    "diff": "diff --git a/include/libcamera/internal/formats.h b/include/libcamera/internal/formats.h\nindex ee599765be47..90c8b2cda78a 100644\n--- a/include/libcamera/internal/formats.h\n+++ b/include/libcamera/internal/formats.h\n@@ -54,8 +54,8 @@ public:\n \tconst char *name;\n \tPixelFormat format;\n \tstruct {\n-\t\tV4L2PixelFormat single;\n-\t\tV4L2PixelFormat multi;\n+\t\tstd::vector<V4L2PixelFormat> single;\n+\t\tstd::vector<V4L2PixelFormat> multi;\n \t} v4l2Formats;\n \tunsigned int bitsPerPixel;\n \tenum ColourEncoding colourEncoding;\ndiff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp\nindex 283ecb3d89d8..f7e9adc7ff77 100644\n--- a/src/libcamera/formats.cpp\n+++ b/src/libcamera/formats.cpp\n@@ -157,8 +157,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_RGB565) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n@@ -170,8 +170,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_RGB565X) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n@@ -183,8 +183,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_RGB24) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 24,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n@@ -196,8 +196,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_BGR24) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 24,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n@@ -209,8 +209,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_XBGR32) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 32,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n@@ -222,8 +222,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_RGBX32) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 32,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n@@ -235,8 +235,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_BGRX32) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 32,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n@@ -248,8 +248,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_XRGB32) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 32,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n@@ -261,8 +261,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_RGBA32) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 32,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n@@ -274,8 +274,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_ABGR32) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 32,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n@@ -287,8 +287,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_ARGB32) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 32,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n@@ -300,8 +300,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_BGRA32) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 32,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n@@ -315,8 +315,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_YUYV) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -328,8 +328,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_YVYU) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -341,8 +341,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_UYVY) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -354,8 +354,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_VYUY) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -369,8 +369,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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_NV12) },\n+\t\t\t.multi = { V4L2PixelFormat(V4L2_PIX_FMT_NV12M) },\n \t\t},\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -382,8 +382,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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_NV21) },\n+\t\t\t.multi = { V4L2PixelFormat(V4L2_PIX_FMT_NV21M) },\n \t\t},\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -395,8 +395,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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_NV16) },\n+\t\t\t.multi = { V4L2PixelFormat(V4L2_PIX_FMT_NV16M) },\n \t\t},\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -408,8 +408,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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_NV61) },\n+\t\t\t.multi = { V4L2PixelFormat(V4L2_PIX_FMT_NV61M) },\n \t\t},\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -421,8 +421,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_NV24) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 24,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -434,8 +434,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_NV42) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 24,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -447,8 +447,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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_YUV420) },\n+\t\t\t.multi = { V4L2PixelFormat(V4L2_PIX_FMT_YUV420M) },\n \t\t},\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -460,8 +460,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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_YVU420) },\n+\t\t\t.multi = { V4L2PixelFormat(V4L2_PIX_FMT_YVU420M) },\n \t\t},\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -473,8 +473,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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_YUV422P) },\n+\t\t\t.multi = { V4L2PixelFormat(V4L2_PIX_FMT_YUV422M) },\n \t\t},\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -486,8 +486,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat() },\n+\t\t\t.multi = { V4L2PixelFormat(V4L2_PIX_FMT_YVU422M) },\n \t\t},\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -499,8 +499,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat() },\n+\t\t\t.multi = { V4L2PixelFormat(V4L2_PIX_FMT_YUV444M) },\n \t\t},\n \t\t.bitsPerPixel = 24,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -512,8 +512,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat() },\n+\t\t\t.multi = { V4L2PixelFormat(V4L2_PIX_FMT_YVU444M) },\n \t\t},\n \t\t.bitsPerPixel = 24,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -527,8 +527,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_GREY) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 8,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -540,8 +540,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_Y10) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -553,8 +553,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_Y12) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -566,8 +566,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_Y10P) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -581,8 +581,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SBGGR8) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 8,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -594,8 +594,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SGBRG8) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 8,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -607,8 +607,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SGRBG8) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 8,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -620,8 +620,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SRGGB8) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 8,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -633,8 +633,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SBGGR10) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -646,8 +646,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SGBRG10) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -659,8 +659,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SGRBG10) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -672,8 +672,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SRGGB10) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -685,8 +685,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SBGGR10P) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -698,8 +698,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SGBRG10P) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -711,8 +711,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SGRBG10P) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -724,8 +724,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SRGGB10P) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -737,8 +737,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SBGGR12) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -750,8 +750,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SGBRG12) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -763,8 +763,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SGRBG12) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -776,8 +776,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SRGGB12) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -789,8 +789,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SBGGR12P) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -802,8 +802,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SGBRG12P) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -815,8 +815,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SGRBG12P) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -828,8 +828,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SRGGB12P) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 12,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -841,8 +841,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SBGGR16) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -854,8 +854,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SGBRG16) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -867,8 +867,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SGRBG16) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -880,8 +880,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_SRGGB16) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 16,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -893,8 +893,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SBGGR10) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -907,8 +907,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SGBRG10) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -920,8 +920,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SGRBG10) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -933,8 +933,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SRGGB10) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 10,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n@@ -948,8 +948,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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\t.single = { V4L2PixelFormat(V4L2_PIX_FMT_MJPEG) },\n+\t\t\t.multi = { V4L2PixelFormat() },\n \t\t},\n \t\t.bitsPerPixel = 0,\n \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n@@ -996,8 +996,8 @@ const PixelFormatInfo &PixelFormatInfo::info(const V4L2PixelFormat &format)\n {\n \tconst auto &info = std::find_if(pixelFormatInfo.begin(), pixelFormatInfo.end(),\n \t\t\t\t\t[format](auto pair) {\n-\t\t\t\t\t\treturn pair.second.v4l2Formats.single == format ||\n-\t\t\t\t\t\t       pair.second.v4l2Formats.multi == format;\n+\t\t\t\t\t\treturn pair.second.v4l2Formats.single[0] == format ||\n+\t\t\t\t\t\t       pair.second.v4l2Formats.multi[0] == format;\n \t\t\t\t\t});\n \tif (info == pixelFormatInfo.end())\n \t\treturn pixelFormatInfoInvalid;\ndiff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp\nindex 58fc4e9d2032..cf6c1858bd1a 100644\n--- a/src/libcamera/v4l2_pixelformat.cpp\n+++ b/src/libcamera/v4l2_pixelformat.cpp\n@@ -321,7 +321,7 @@ V4L2PixelFormat V4L2PixelFormat::fromPixelFormat(const PixelFormat &pixelFormat,\n \tif (!info.isValid())\n \t\treturn V4L2PixelFormat();\n \n-\treturn multiplanar ? info.v4l2Formats.multi : info.v4l2Formats.single;\n+\treturn multiplanar ? info.v4l2Formats.multi[0] : info.v4l2Formats.single[0];\n }\n \n /**\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "1/8"
    ]
}