[{"id":19395,"web_url":"https://patchwork.libcamera.org/comment/19395/","msgid":"<30f7ddcc-397e-3e4c-ba9a-f9918b8b35e2@ideasonboard.com>","date":"2021-09-06T05:48:19","subject":"Re: [libcamera-devel] [PATCH v2 07/27] libcamera: formats: Support\n\tV4L2 non-contiguous formats","submitter":{"id":75,"url":"https://patchwork.libcamera.org/api/people/75/","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@ideasonboard.com"},"content":"Hi Laurent,\n\nOn 06/09/2021 04:00, Laurent Pinchart wrote:\n> V4L2 describes multi-planar formats with different 4CCs depending on\n> whether or not the planes are stored contiguously in memory. Support\n> this when translating between PixelFormat and V4L2PixelFormat.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> Reviewed-by: Hirokazu Honda <hiroh@chromium.org>\n> ---\n> Changes since v1:\n> \n> - Replace the v4l2Format array with a structure\n\nI like it better, easier to read :-).\nReviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n\n> ---\n>  include/libcamera/internal/formats.h |   5 +-\n>  src/libcamera/formats.cpp            | 284 +++++++++++++++++++++------\n>  src/libcamera/v4l2_pixelformat.cpp   |  11 +-\n>  3 files changed, 240 insertions(+), 60 deletions(-)\n> \n> diff --git a/include/libcamera/internal/formats.h b/include/libcamera/internal/formats.h\n> index b2869c93e960..5ebc68f91cda 100644\n> --- a/include/libcamera/internal/formats.h\n> +++ b/include/libcamera/internal/formats.h\n> @@ -54,7 +54,10 @@ public:\n>  \t/* \\todo Add support for non-contiguous memory planes */\n>  \tconst char *name;\n>  \tPixelFormat format;\n> -\tV4L2PixelFormat v4l2Format;\n> +\tstruct {\n> +\t\tV4L2PixelFormat single;\n> +\t\tV4L2PixelFormat multi;\n> +\t} v4l2Formats;\n>  \tunsigned int bitsPerPixel;\n>  \tenum ColourEncoding colourEncoding;\n>  \tbool packed;\n> diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp\n> index ce0081a8a3d1..5bbb12347ac8 100644\n> --- a/src/libcamera/formats.cpp\n> +++ b/src/libcamera/formats.cpp\n> @@ -55,8 +55,15 @@ LOG_DEFINE_CATEGORY(Formats)\n>   * \\var PixelFormatInfo::format\n>   * \\brief The PixelFormat described by this instance\n>   *\n> - * \\var PixelFormatInfo::v4l2Format\n> - * \\brief The V4L2 pixel format corresponding to the PixelFormat\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>   *\n>   * \\var PixelFormatInfo::bitsPerPixel\n>   * \\brief The average number of bits per pixel\n> @@ -149,7 +156,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::RGB565, {\n>  \t\t.name = \"RGB565\",\n>  \t\t.format = formats::RGB565,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> @@ -159,7 +169,10 @@ 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.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_RGB565X),\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.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> @@ -169,7 +182,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::BGR888, {\n>  \t\t.name = \"BGR888\",\n>  \t\t.format = formats::BGR888,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_RGB24),\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.bitsPerPixel = 24,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> @@ -179,7 +195,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::RGB888, {\n>  \t\t.name = \"RGB888\",\n>  \t\t.format = formats::RGB888,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_BGR24),\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.bitsPerPixel = 24,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> @@ -189,7 +208,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::XRGB8888, {\n>  \t\t.name = \"XRGB8888\",\n>  \t\t.format = formats::XRGB8888,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_XBGR32),\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.bitsPerPixel = 32,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> @@ -199,7 +221,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::XBGR8888, {\n>  \t\t.name = \"XBGR8888\",\n>  \t\t.format = formats::XBGR8888,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_RGBX32),\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.bitsPerPixel = 32,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> @@ -209,7 +234,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::BGRX8888, {\n>  \t\t.name = \"BGRX8888\",\n>  \t\t.format = formats::BGRX8888,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_XRGB32),\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.bitsPerPixel = 32,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> @@ -219,7 +247,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::ABGR8888, {\n>  \t\t.name = \"ABGR8888\",\n>  \t\t.format = formats::ABGR8888,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_RGBA32),\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.bitsPerPixel = 32,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> @@ -229,7 +260,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::ARGB8888, {\n>  \t\t.name = \"ARGB8888\",\n>  \t\t.format = formats::ARGB8888,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_ABGR32),\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.bitsPerPixel = 32,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> @@ -239,7 +273,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::BGRA8888, {\n>  \t\t.name = \"BGRA8888\",\n>  \t\t.format = formats::BGRA8888,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_ARGB32),\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.bitsPerPixel = 32,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> @@ -249,7 +286,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::RGBA8888, {\n>  \t\t.name = \"RGBA8888\",\n>  \t\t.format = formats::RGBA8888,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_BGRA32),\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.bitsPerPixel = 32,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> @@ -261,7 +301,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::YUYV, {\n>  \t\t.name = \"YUYV\",\n>  \t\t.format = formats::YUYV,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -271,7 +314,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::YVYU, {\n>  \t\t.name = \"YVYU\",\n>  \t\t.format = formats::YVYU,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -281,7 +327,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::UYVY, {\n>  \t\t.name = \"UYVY\",\n>  \t\t.format = formats::UYVY,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -291,7 +340,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::VYUY, {\n>  \t\t.name = \"VYUY\",\n>  \t\t.format = formats::VYUY,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -303,7 +355,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::NV12, {\n>  \t\t.name = \"NV12\",\n>  \t\t.format = formats::NV12,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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},\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -313,7 +368,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::NV21, {\n>  \t\t.name = \"NV21\",\n>  \t\t.format = formats::NV21,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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},\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -323,7 +381,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::NV16, {\n>  \t\t.name = \"NV16\",\n>  \t\t.format = formats::NV16,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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},\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -333,7 +394,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::NV61, {\n>  \t\t.name = \"NV61\",\n>  \t\t.format = formats::NV61,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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},\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -343,7 +407,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::NV24, {\n>  \t\t.name = \"NV24\",\n>  \t\t.format = formats::NV24,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 24,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -353,7 +420,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::NV42, {\n>  \t\t.name = \"NV42\",\n>  \t\t.format = formats::NV42,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 24,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -363,7 +433,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::YUV420, {\n>  \t\t.name = \"YUV420\",\n>  \t\t.format = formats::YUV420,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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},\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -373,7 +446,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::YVU420, {\n>  \t\t.name = \"YVU420\",\n>  \t\t.format = formats::YVU420,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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},\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -383,7 +459,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::YUV422, {\n>  \t\t.name = \"YUV422\",\n>  \t\t.format = formats::YUV422,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_YUV422P),\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},\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -395,7 +474,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::R8, {\n>  \t\t.name = \"R8\",\n>  \t\t.format = formats::R8,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_GREY),\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.bitsPerPixel = 8,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -407,7 +489,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::SBGGR8, {\n>  \t\t.name = \"SBGGR8\",\n>  \t\t.format = formats::SBGGR8,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 8,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -417,7 +502,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::SGBRG8, {\n>  \t\t.name = \"SGBRG8\",\n>  \t\t.format = formats::SGBRG8,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 8,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -427,7 +515,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::SGRBG8, {\n>  \t\t.name = \"SGRBG8\",\n>  \t\t.format = formats::SGRBG8,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 8,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -437,7 +528,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::SRGGB8, {\n>  \t\t.name = \"SRGGB8\",\n>  \t\t.format = formats::SRGGB8,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 8,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -447,7 +541,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::SBGGR10, {\n>  \t\t.name = \"SBGGR10\",\n>  \t\t.format = formats::SBGGR10,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -457,7 +554,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::SGBRG10, {\n>  \t\t.name = \"SGBRG10\",\n>  \t\t.format = formats::SGBRG10,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -467,7 +567,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::SGRBG10, {\n>  \t\t.name = \"SGRBG10\",\n>  \t\t.format = formats::SGRBG10,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -477,7 +580,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::SRGGB10, {\n>  \t\t.name = \"SRGGB10\",\n>  \t\t.format = formats::SRGGB10,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -487,7 +593,10 @@ 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.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SBGGR10P),\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.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -497,7 +606,10 @@ 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.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SGBRG10P),\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.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -507,7 +619,10 @@ 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.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SGRBG10P),\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.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -517,7 +632,10 @@ 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.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SRGGB10P),\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.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -527,7 +645,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::SBGGR12, {\n>  \t\t.name = \"SBGGR12\",\n>  \t\t.format = formats::SBGGR12,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -537,7 +658,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::SGBRG12, {\n>  \t\t.name = \"SGBRG12\",\n>  \t\t.format = formats::SGBRG12,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -547,7 +671,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::SGRBG12, {\n>  \t\t.name = \"SGRBG12\",\n>  \t\t.format = formats::SGRBG12,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -557,7 +684,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::SRGGB12, {\n>  \t\t.name = \"SRGGB12\",\n>  \t\t.format = formats::SRGGB12,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -567,7 +697,10 @@ 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.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SBGGR12P),\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.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -577,7 +710,10 @@ 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.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SGBRG12P),\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.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -587,7 +723,10 @@ 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.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SGRBG12P),\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.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -597,7 +736,10 @@ 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.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SRGGB12P),\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.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -607,7 +749,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::SBGGR16, {\n>  \t\t.name = \"SBGGR16\",\n>  \t\t.format = formats::SBGGR16,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -617,7 +762,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::SGBRG16, {\n>  \t\t.name = \"SGBRG16\",\n>  \t\t.format = formats::SGBRG16,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -627,7 +775,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::SGRBG16, {\n>  \t\t.name = \"SGRBG16\",\n>  \t\t.format = formats::SGRBG16,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -637,7 +788,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::SRGGB16, {\n>  \t\t.name = \"SRGGB16\",\n>  \t\t.format = formats::SRGGB16,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -647,7 +801,10 @@ 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.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SBGGR10),\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.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -658,7 +815,10 @@ 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.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SGBRG10),\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.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -668,7 +828,10 @@ 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.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SGRBG10),\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.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -678,7 +841,10 @@ 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.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SRGGB10),\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.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -690,7 +856,10 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t{ formats::MJPEG, {\n>  \t\t.name = \"MJPEG\",\n>  \t\t.format = formats::MJPEG,\n> -\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_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.bitsPerPixel = 0,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -736,7 +905,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.v4l2Format == format;\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});\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 93fc4446cc64..d1f3a42f3de2 100644\n> --- a/src/libcamera/v4l2_pixelformat.cpp\n> +++ b/src/libcamera/v4l2_pixelformat.cpp\n> @@ -67,12 +67,19 @@ const std::map<V4L2PixelFormat, PixelFormat> vpf2pf{\n>  \n>  \t/* YUV planar formats. */\n>  \t{ V4L2PixelFormat(V4L2_PIX_FMT_NV16), formats::NV16 },\n> +\t{ V4L2PixelFormat(V4L2_PIX_FMT_NV16M), formats::NV16 },\n>  \t{ V4L2PixelFormat(V4L2_PIX_FMT_NV61), formats::NV61 },\n> +\t{ V4L2PixelFormat(V4L2_PIX_FMT_NV61M), formats::NV61 },\n>  \t{ V4L2PixelFormat(V4L2_PIX_FMT_NV12), formats::NV12 },\n> +\t{ V4L2PixelFormat(V4L2_PIX_FMT_NV12M), formats::NV12 },\n>  \t{ V4L2PixelFormat(V4L2_PIX_FMT_NV21), formats::NV21 },\n> +\t{ V4L2PixelFormat(V4L2_PIX_FMT_NV21M), formats::NV21 },\n>  \t{ V4L2PixelFormat(V4L2_PIX_FMT_YUV420), formats::YUV420 },\n> +\t{ V4L2PixelFormat(V4L2_PIX_FMT_YUV420M), formats::YUV420 },\n>  \t{ V4L2PixelFormat(V4L2_PIX_FMT_YVU420), formats::YVU420 },\n> +\t{ V4L2PixelFormat(V4L2_PIX_FMT_YVU420M), formats::YVU420 },\n>  \t{ V4L2PixelFormat(V4L2_PIX_FMT_YUV422P), formats::YUV422 },\n> +\t{ V4L2PixelFormat(V4L2_PIX_FMT_YUV422M), formats::YUV422 },\n>  \n>  \t/* Greyscale formats. */\n>  \t{ V4L2PixelFormat(V4L2_PIX_FMT_GREY), formats::R8 },\n> @@ -202,13 +209,13 @@ PixelFormat V4L2PixelFormat::toPixelFormat() const\n>   * \\return The V4L2PixelFormat corresponding to \\a pixelFormat\n>   */\n>  V4L2PixelFormat V4L2PixelFormat::fromPixelFormat(const PixelFormat &pixelFormat,\n> -\t\t\t\t\t\t [[maybe_unused]] bool multiplanar)\n> +\t\t\t\t\t\t bool multiplanar)\n>  {\n>  \tconst PixelFormatInfo &info = PixelFormatInfo::info(pixelFormat);\n>  \tif (!info.isValid())\n>  \t\treturn V4L2PixelFormat();\n>  \n> -\treturn info.v4l2Format;\n> +\treturn multiplanar ? info.v4l2Formats.multi : info.v4l2Formats.single;\n>  }\n>  \n>  } /* namespace libcamera */\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 B3691BD87D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  6 Sep 2021 05:48:25 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2F9E66916A;\n\tMon,  6 Sep 2021 07:48:25 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 414406024D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  6 Sep 2021 07:48:23 +0200 (CEST)","from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:eb18:8e30:9b7:f998])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CA309317;\n\tMon,  6 Sep 2021 07:48:22 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"UvOv149F\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1630907302;\n\tbh=patMODTxxDaWYQzkmUrfDuHfkryKovxHyzrefIDb168=;\n\th=Subject:To:References:From:Date:In-Reply-To:From;\n\tb=UvOv149FpDen18/FmiwB4mBYcpaMw64WylXY4dCcV5OLav4IYayRmO4j3di/bovNK\n\tq9zO0MXHXND+Fi8bDZWXEuL1ESHWYimQPRXbe6+XwPXAix866j8tvKbKoLynrNxTYg\n\tBGBTD2fOeNyslv8fZPatcQTVB3K4Bb3bpgOT5Vi0=","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20210906020100.14430-1-laurent.pinchart@ideasonboard.com>\n\t<20210906020100.14430-8-laurent.pinchart@ideasonboard.com>","From":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","Message-ID":"<30f7ddcc-397e-3e4c-ba9a-f9918b8b35e2@ideasonboard.com>","Date":"Mon, 6 Sep 2021 07:48:19 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.13.0","MIME-Version":"1.0","In-Reply-To":"<20210906020100.14430-8-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v2 07/27] libcamera: formats: Support\n\tV4L2 non-contiguous 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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]