[{"id":19497,"web_url":"https://patchwork.libcamera.org/comment/19497/","msgid":"<YTcqzY2TTCsBlq3e@pendragon.ideasonboard.com>","date":"2021-09-07T09:03:09","subject":"Re: [libcamera-devel] [PATCH 1/2] libcamera: formats: Add field for\n\tname of V4L2 format","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Paul,\n\nThank you for the patch.\n\nOn Tue, Sep 07, 2021 at 04:13:10PM +0900, Paul Elder wrote:\n> The v4l2 compatibility layer needs to report the proper human-readable\n> name for the V4L2 formats. To prepare for this, add a field to\n> PixelFormatInfo to hold the V4L2 name, and populate it with the names\n> from drivers/media/v4l2-core/v4l2-ioctl.c from the kernel.\n> \n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> ---\n>  include/libcamera/internal/formats.h |  1 +\n>  src/libcamera/formats.cpp            | 58 ++++++++++++++++++++++++++++\n>  2 files changed, 59 insertions(+)\n> \n> diff --git a/include/libcamera/internal/formats.h b/include/libcamera/internal/formats.h\n> index 51a8a6b8..82ab9a02 100644\n> --- a/include/libcamera/internal/formats.h\n> +++ b/include/libcamera/internal/formats.h\n> @@ -52,6 +52,7 @@ public:\n>  \tconst char *name;\n>  \tPixelFormat format;\n>  \tV4L2PixelFormat v4l2Format;\n> +\tconst char *v4l2Name;\n\nThis will conflict with \"[PATCH v3 07/30] libcamera: formats: Support\nV4L2 non-contiguous formats\" which I'd like to merge ASAP.\n\nAs the V4L2 format name is only needed by the V4L2 compat layer,\nwouldn't it be better to store it in there ? The only drawback I can see\nis that someone may forget to update it when adding new V4L2 formats.\nThat's something we could catch during review, possibly with the help of\ncheckstyle.py.\n\nIf we want to keep the name in the libcamera core, I think it would be\nbest placed in v4l2_pixelformat.cpp. The vpf2pf map would need to be\nreworked with a V4L2 pixel format info structure as the mapped type.\n\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 603d8861..0fb29fb5 100644\n> --- a/src/libcamera/formats.cpp\n> +++ b/src/libcamera/formats.cpp\n> @@ -57,6 +57,10 @@ LOG_DEFINE_CATEGORY(Formats)\n>   * \\var PixelFormatInfo::v4l2Format\n>   * \\brief The V4L2 pixel format corresponding to the PixelFormat\n>   *\n> + * \\var PixelFormatInfo::v4l2Name\n> + * \\brief The human-readable name of the V4L2 pixel format corresponding to the\n> + * PixelFormat\n> + *\n>   * \\var PixelFormatInfo::bitsPerPixel\n>   * \\brief The average number of bits per pixel\n>   *\n> @@ -149,6 +153,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"RGB565\",\n>  \t\t.format = formats::RGB565,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_RGB565),\n> +\t\t.v4l2Name = \"16-bit RGB 5-6-5\",\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> @@ -159,6 +164,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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.v4l2Name = \"16-bit RGB 5-6-5 BE\",\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> @@ -169,6 +175,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"BGR888\",\n>  \t\t.format = formats::BGR888,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_RGB24),\n> +\t\t.v4l2Name = \"24-bit RGB 8-8-8\",\n>  \t\t.bitsPerPixel = 24,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> @@ -179,6 +186,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"RGB888\",\n>  \t\t.format = formats::RGB888,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_BGR24),\n> +\t\t.v4l2Name = \"24-bit BGR 8-8-8\",\n>  \t\t.bitsPerPixel = 24,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> @@ -189,6 +197,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"XRGB8888\",\n>  \t\t.format = formats::XRGB8888,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_XBGR32),\n> +\t\t.v4l2Name = \"32-bit BGRX 8-8-8-8\",\n>  \t\t.bitsPerPixel = 32,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> @@ -199,6 +208,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"XBGR8888\",\n>  \t\t.format = formats::XBGR8888,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_RGBX32),\n> +\t\t.v4l2Name = \"32-bit RGBX 8-8-8-8\",\n>  \t\t.bitsPerPixel = 32,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> @@ -209,6 +219,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"BGRX8888\",\n>  \t\t.format = formats::BGRX8888,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_XRGB32),\n> +\t\t.v4l2Name = \"32-bit XRGB 8-8-8-8\",\n>  \t\t.bitsPerPixel = 32,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> @@ -219,6 +230,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"ABGR8888\",\n>  \t\t.format = formats::ABGR8888,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_RGBA32),\n> +\t\t.v4l2Name = \"32-bit RGBA 8-8-8-8\",\n>  \t\t.bitsPerPixel = 32,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> @@ -229,6 +241,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"ARGB8888\",\n>  \t\t.format = formats::ARGB8888,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_ABGR32),\n> +\t\t.v4l2Name = \"32-bit BGRA 8-8-8-8\",\n>  \t\t.bitsPerPixel = 32,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> @@ -239,6 +252,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"BGRA8888\",\n>  \t\t.format = formats::BGRA8888,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_ARGB32),\n> +\t\t.v4l2Name = \"32-bit ARGB 8-8-8-8\",\n>  \t\t.bitsPerPixel = 32,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> @@ -249,6 +263,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"RGBA8888\",\n>  \t\t.format = formats::RGBA8888,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_BGRA32),\n> +\t\t.v4l2Name = \"32-bit ABGR 8-8-8-8\",\n>  \t\t.bitsPerPixel = 32,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> @@ -261,6 +276,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"YUYV\",\n>  \t\t.format = formats::YUYV,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_YUYV),\n> +\t\t.v4l2Name = \"YUYV 4:2:2\",\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -271,6 +287,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"YVYU\",\n>  \t\t.format = formats::YVYU,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_YVYU),\n> +\t\t.v4l2Name = \"YVYU 4:2:2\",\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -281,6 +298,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"UYVY\",\n>  \t\t.format = formats::UYVY,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_UYVY),\n> +\t\t.v4l2Name = \"UYVY 4:2:2\",\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -291,6 +309,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"VYUY\",\n>  \t\t.format = formats::VYUY,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_VYUY),\n> +\t\t.v4l2Name = \"VYUY 4:2:2\",\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -303,6 +322,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"NV12\",\n>  \t\t.format = formats::NV12,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_NV12),\n> +\t\t.v4l2Name = \"Y/CbCr 4:2:0\",\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -313,6 +333,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"NV21\",\n>  \t\t.format = formats::NV21,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_NV21),\n> +\t\t.v4l2Name = \"Y/CrCb 4:2:0\",\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -323,6 +344,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"NV16\",\n>  \t\t.format = formats::NV16,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_NV16),\n> +\t\t.v4l2Name = \"Y/CbCr 4:2:2\",\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -333,6 +355,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"NV61\",\n>  \t\t.format = formats::NV61,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_NV61),\n> +\t\t.v4l2Name = \"Y/CrCb 4:2:2\",\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -343,6 +366,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"NV24\",\n>  \t\t.format = formats::NV24,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_NV24),\n> +\t\t.v4l2Name = \"Y/CbCr 4:4:4\",\n>  \t\t.bitsPerPixel = 24,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -353,6 +377,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"NV42\",\n>  \t\t.format = formats::NV42,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_NV42),\n> +\t\t.v4l2Name = \"Y/CrCb 4:4:4\",\n>  \t\t.bitsPerPixel = 24,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -363,6 +388,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"YUV420\",\n>  \t\t.format = formats::YUV420,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_YUV420),\n> +\t\t.v4l2Name = \"Planar YUV 4:2:0\",\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -373,6 +399,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"YVU420\",\n>  \t\t.format = formats::YVU420,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_YVU420),\n> +\t\t.v4l2Name = \"Planar YVU 4:2:0\",\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -383,6 +410,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"YUV422\",\n>  \t\t.format = formats::YUV422,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_YUV422P),\n> +\t\t.v4l2Name = \"Planar YUV 4:2:2\",\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -395,6 +423,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"R8\",\n>  \t\t.format = formats::R8,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_GREY),\n> +\t\t.v4l2Name = \"8-bit Greyscale\",\n>  \t\t.bitsPerPixel = 8,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> @@ -407,6 +436,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"SBGGR8\",\n>  \t\t.format = formats::SBGGR8,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SBGGR8),\n> +\t\t.v4l2Name = \"8-bit Bayer BGBG/GRGR\",\n>  \t\t.bitsPerPixel = 8,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -417,6 +447,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"SGBRG8\",\n>  \t\t.format = formats::SGBRG8,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SGBRG8),\n> +\t\t.v4l2Name = \"8-bit Bayer GBGB/RGRG\",\n>  \t\t.bitsPerPixel = 8,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -427,6 +458,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"SGRBG8\",\n>  \t\t.format = formats::SGRBG8,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SGRBG8),\n> +\t\t.v4l2Name = \"8-bit Bayer GRGR/BGBG\",\n>  \t\t.bitsPerPixel = 8,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -437,6 +469,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"SRGGB8\",\n>  \t\t.format = formats::SRGGB8,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SRGGB8),\n> +\t\t.v4l2Name = \"8-bit Bayer RGRG/GBGB\",\n>  \t\t.bitsPerPixel = 8,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -447,6 +480,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"SBGGR10\",\n>  \t\t.format = formats::SBGGR10,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SBGGR10),\n> +\t\t.v4l2Name = \"10-bit Bayer BGBG/GRGR\",\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -457,6 +491,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"SGBRG10\",\n>  \t\t.format = formats::SGBRG10,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SGBRG10),\n> +\t\t.v4l2Name = \"10-bit Bayer GBGB/RGRG\",\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -467,6 +502,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"SGRBG10\",\n>  \t\t.format = formats::SGRBG10,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SGRBG10),\n> +\t\t.v4l2Name = \"10-bit Bayer GRGR/BGBG\",\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -477,6 +513,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"SRGGB10\",\n>  \t\t.format = formats::SRGGB10,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SRGGB10),\n> +\t\t.v4l2Name = \"10-bit Bayer RGRG/GBGB\",\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -487,6 +524,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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.v4l2Name = \"10-bit Bayer BGBG/GRGR Packed\",\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -497,6 +535,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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.v4l2Name = \"10-bit Bayer GBGB/RGRG Packed\",\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -507,6 +546,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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.v4l2Name = \"10-bit Bayer GRGR/BGBG Packed\",\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -517,6 +557,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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.v4l2Name = \"10-bit Bayer RGRG/GBGB Packed\",\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -527,6 +568,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"SBGGR12\",\n>  \t\t.format = formats::SBGGR12,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SBGGR12),\n> +\t\t.v4l2Name = \"12-bit Bayer BGBG/GRGR\",\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -537,6 +579,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"SGBRG12\",\n>  \t\t.format = formats::SGBRG12,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SGBRG12),\n> +\t\t.v4l2Name = \"12-bit Bayer GBGB/RGRG\",\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -547,6 +590,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"SGRBG12\",\n>  \t\t.format = formats::SGRBG12,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SGRBG12),\n> +\t\t.v4l2Name = \"12-bit Bayer GRGR/BGBG\",\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -557,6 +601,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"SRGGB12\",\n>  \t\t.format = formats::SRGGB12,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SRGGB12),\n> +\t\t.v4l2Name = \"12-bit Bayer RGRG/GBGB\",\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -567,6 +612,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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.v4l2Name = \"12-bit Bayer BGBG/GRGR Packed\",\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -577,6 +623,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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.v4l2Name = \"12-bit Bayer GBGB/RGRG Packed\",\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -587,6 +634,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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.v4l2Name = \"12-bit Bayer GRGR/BGBG Packed\",\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -597,6 +645,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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.v4l2Name = \"12-bit Bayer RGRG/GBGB Packed\",\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -607,6 +656,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"SBGGR16\",\n>  \t\t.format = formats::SBGGR16,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SBGGR16),\n> +\t\t.v4l2Name = \"16-bit Bayer BGBG/GRGR\",\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -617,6 +667,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"SGBRG16\",\n>  \t\t.format = formats::SGBRG16,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SGBRG16),\n> +\t\t.v4l2Name = \"16-bit Bayer GBGB/RGRG\",\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -627,6 +678,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"SGRBG16\",\n>  \t\t.format = formats::SGRBG16,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SGRBG16),\n> +\t\t.v4l2Name = \"16-bit Bayer GRGR/BGBG\",\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -637,6 +689,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"SRGGB16\",\n>  \t\t.format = formats::SRGGB16,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SRGGB16),\n> +\t\t.v4l2Name = \"16-bit Bayer RGRG/GBGB\",\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> @@ -647,6 +700,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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.v4l2Name = \"10-bit bayer BGGR IPU3 Packed\",\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -658,6 +712,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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.v4l2Name = \"10-bit bayer GBRG IPU3 Packed\",\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -668,6 +723,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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.v4l2Name = \"10-bit bayer GRBG IPU3 Packed\",\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -678,6 +734,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\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.v4l2Name = \"10-bit bayer RGGB IPU3 Packed\",\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> @@ -690,6 +747,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.name = \"MJPEG\",\n>  \t\t.format = formats::MJPEG,\n>  \t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_MJPEG),\n> +\t\t.v4l2Name = \"Motion-JPEG\",\n>  \t\t.bitsPerPixel = 0,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,","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 78F97BE175\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  7 Sep 2021 09:03:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CCD4A6916C;\n\tTue,  7 Sep 2021 11:03:30 +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 D1B3169167\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  7 Sep 2021 11:03:28 +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 45095499;\n\tTue,  7 Sep 2021 11:03:28 +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=\"C/eYTOGh\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1631005408;\n\tbh=vwJHcOHVP1gaHgy/IpRN50rxlK2roFPxnfLodlZN9Fo=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=C/eYTOGh6fb8CKdIGbOTtYitZvUz8o2rAZ85SOSQf9upUoC2zKcrfskfECx1hZTfM\n\tTNP64DEUcXsWyT5TifSPMBrgGGa91YIYmxVdl5MmbPwNI+qZIUJ2bDQoLfBLgRrbFS\n\tkw5nZBXPxaE0ydmvcKynrtvc0nRorSofiJHyW+G4=","Date":"Tue, 7 Sep 2021 12:03:09 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<YTcqzY2TTCsBlq3e@pendragon.ideasonboard.com>","References":"<20210907071311.3364713-1-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210907071311.3364713-1-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 1/2] libcamera: formats: Add field for\n\tname of V4L2 format","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]