[{"id":24072,"web_url":"https://patchwork.libcamera.org/comment/24072/","msgid":"<YtwsB7aWUR+HTrlh@pendragon.ideasonboard.com>","date":"2022-07-23T17:12:39","subject":"Re: [libcamera-devel] [PATCH v2 1/8] libcamera: formats: Support\n\tmultiple V4L2 pixel formats","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch.\n\nOn Sat, Jul 23, 2022 at 11:53:23AM +0200, Jacopo Mondi via libcamera-devel wrote:\n> Associate a list of V4L2PixelFormat entries to a libcamera Format in\n\ns/libcamera Format/libcamera PixelFormat/\n\nOr just PixelFormat.\n\n> the PixelFormatInfo. This change prepares for supporting through a\n> single libcamera Format devices which use different but equivalent\n\nSame here.\n\n> versions of the same format, like V4L2_PIX_FMT_MJPEG and\n> V4L2_PIX_FMT_JPEG.\n> \n> Change the existing users to always use the first entry to not break\n> the build.\n> \n> Signed-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(-)\n> \n> diff --git a/include/libcamera/internal/formats.h b/include/libcamera/internal/formats.h\n> index 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\nI'd like to merge the two vectors into a single one, and just have\n\n\tstd::vector<V4L2PixelFormat> v4l2Formats;\n\nThat won't allow differentiating between single and multiplanar formats\nanymore, but none of the existing code does that. It would still allow\npicking the single or multiplanar format supported by the device for a\ngiven libcamera format. If a device supports both single and multiplanar\nvariants we have no information that we can use to pick one of them in\nparticular anyway, and that problem should be solved by V4L2 extensions\nto add data offset support to planes.\n\nThis doesn't have to be done in this patch as long as it's part of the\nseries, but I'm not sure introducing two vectors and merging them in a\nsubsequent step would really help.\n\n>  \tunsigned int bitsPerPixel;\n>  \tenum ColourEncoding colourEncoding;\n> diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp\n> index 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;\n> diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp\n> index 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>  /**","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 22689C3275\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 23 Jul 2022 17:12:45 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8D4A863312;\n\tSat, 23 Jul 2022 19:12:44 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 14E0C603F8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 23 Jul 2022 19:12:43 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 67E979F7;\n\tSat, 23 Jul 2022 19:12:42 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658596364;\n\tbh=rzX5ZTLiMYsZiUinGRdp4r1B9lWHKUM9BOiT0Qc/F2I=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=D0dtryn9pKMMn4RlaYlFkBrshdqs2PMjpTKRnWMC1tpqZFvCDec7K61gBtf71LdPa\n\tlnzBTqONUGXDRjOk5ROBRBzcnrus+zcp+Q70wGxVgBwNSlurOkkguv2jkceXw9dxQ8\n\tDp39bkKR3EMKIn5WPIcqLZlPERZWtSBjCdK58GX9jC/vAJTEb/MedgT0HMKiYzQ4Id\n\toKJK+3WfurxSnB7m6ThOJYyvvuQQRgX5FRUIjE4i8OVLkA6tQNWuaDLY6D3YtO1kEu\n\t/kJHC2Xj0pM/cSl+Qp+WDr/NcOL26Iv/TaESgFlpZDiaL6gVwIud6nc2hIYRnpFe73\n\tmldzKpNYnfUWw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1658596362;\n\tbh=rzX5ZTLiMYsZiUinGRdp4r1B9lWHKUM9BOiT0Qc/F2I=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=k6/TrTbl9LUafBXUrII2QPCZ4OebVqh1/hIgMfZrjsp5HB9rLcucjvkVedDLC9l1l\n\tyQKi/QsgGDpxfl+rdLHsNHie7adsi+Rs8S7ueJvSJYHUXKrvHiIs38BX+hhU68Nvqm\n\tSpvy8TxGf87t35udjfXWSx5Jte3OLdNu8uDOroMw="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"k6/TrTbl\"; dkim-atps=neutral","Date":"Sat, 23 Jul 2022 20:12:39 +0300","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<YtwsB7aWUR+HTrlh@pendragon.ideasonboard.com>","References":"<20220723095330.43542-1-jacopo@jmondi.org>\n\t<20220723095330.43542-2-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220723095330.43542-2-jacopo@jmondi.org>","Subject":"Re: [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":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, jozef@mlich.cz,\n\tPavel Machek <pavel@ucw.cz>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]