[{"id":11255,"web_url":"https://patchwork.libcamera.org/comment/11255/","msgid":"<20200708202154.bjjxihuugj76ddvf@uno.localdomain>","date":"2020-07-08T20:21:54","subject":"Re: [libcamera-devel] [PATCH v4 02/21] libcamera: formats: Add\n\tfields to info to ease calculating stride","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Paul,\n  there a still a few minor points from my previous comments that went\nun-adressed (the fact a single plane has no sub-sampling in example)\nbut I like this version more than the previous one.\n\nI would have included the RGB10 example I gave, as it's more\ninformative than RGB888, being it not byte aligned.\n\nBut I won't bother any more, you already did a great job putting this\ndown in writing, it's not easy stuff to grasp\n\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks for you effort on this\n   j\n\nOn Wed, Jul 08, 2020 at 10:43:58PM +0900, Paul Elder wrote:\n> Packed formats make it difficult to calculate stride as well as\n> frame size with the fields that PixelFormatInfo currently has.\n> bitsPerPixel is defined as the average number of bits per pixel, and\n> only counts effective bits, so it is not useful for calculating\n> stride and frame size.\n>\n> To fix this, we introduce a concept of a \"pixel group\". The size of this\n> group is defined as the minimum number of pixels (including padding)\n> necessary in a row when the image has only one column of effective\n> pixels. The pixel group has one more attribute, that is the \"bytes per\n> group\". This determines how many bytes one pixel group consumes. These\n> are the fields pixelsPerGroup and bytesPerGroup that are defined in this\n> patch. Defining these two values makes it really simple to calculate\n> bytes-per-line, as ceil(width / pixelsPerGroup) * bytesPerGroup, where\n> width is measured in number of pixels. The ceiling accounts for padding.\n>\n> The pixel group has another contraint, which is that the pixel group\n> (bytesPerGroup and pixelsPerGroup) is the smallest repeatable unit. What\n> this means is that, for example, in the IPU3 formats, if there is only\n> one column of effective pixels, it looks like it could be fit in 5 bytes\n> with 3 padding pixels (for a total of 4 pixels over 5 bytes). However,\n> this unit is not repeatable, as at the 7th group in the same row, the\n> pattern is broken. Therefore, the pixel group for IPU3 formats must be\n> 25 pixels over 32 bytes.\n>\n> Clearly, pixelsPerGroup must be constant for all planes in the format.\n> The bytesPerGroup then, must be a per-plane attribute. There is one more\n> field, verticalSubSampling, that is per-plane. This is simply a divider,\n> to divide the number of rows of pixels by the sub-sampling value, to\n> obtain the number of rows of pixels for the subsampled plane.\n>\n> For example, for something simple like BGR888, it is self-explanatory:\n> the pixel group size is 1, and the bytes necessary is 3, and there is\n> only one plane with no (= 1) vertical subsampling. For YUYV, the\n> CbCr pair is shared between two pixels, so even if you have only one\n> pixel, you would still need a padded second Y, therefore the pixel\n> group size is 2, and bytes necessary is 4 (as opposed to 1 and 2). YUYV\n> also has no vertical subsampling. NV12 has a pixel group size of 2\n> pixels, due to the CbCr plane. The bytes per group then, for both\n> planes, is 2. The first plane has no vertical subsampling, but the\n> second plane is subsampled by a factor of 2.\n> The IPU3 formats are also self-explanatory, as they are single-planar,\n> and have a pixel group size of 25, consuming 32 bytes. Although a\n> comment in the driver suggests that it should be 50 and 64,\n> respectively, this is an attribute of the driver, and not the format, so\n> this shall be set by the ipu3 pipeline handler.\n>\n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>\n> ---\n> Changes in v4:\n> - expanded documentation and definition of pixel group\n>\n> Changes in v3:\n> - add planes\n> - redefine the parameters for the formats\n>   - pixelsPerGroup is for whole format\n>   - add verticalSubSampling per plane\n>\n> Changes in v2:\n> - add documentation for bytesPerGroup pixelsPerGroup\n> - fix wording in commit message\n>   - bytes-per-line -> stride\n>   - buffer size -> frame size\n> - changed MJPEG todo to allowing pipeline handlers to set parameters of\n>   format infos\n> ---\n>  include/libcamera/internal/formats.h |  10 ++\n>  src/libcamera/formats.cpp            | 148 +++++++++++++++++++++++++++\n>  2 files changed, 158 insertions(+)\n>\n> diff --git a/include/libcamera/internal/formats.h b/include/libcamera/internal/formats.h\n> index f59ac8f..61e5ff5 100644\n> --- a/include/libcamera/internal/formats.h\n> +++ b/include/libcamera/internal/formats.h\n> @@ -32,6 +32,12 @@ private:\n>  \tstd::map<unsigned int, std::vector<SizeRange>> data_;\n>  };\n>\n> +struct PixelFormatPlaneInfo\n> +{\n> +\tunsigned int bytesPerGroup;\n> +\tunsigned int verticalSubSampling;\n> +};\n> +\n>  class PixelFormatInfo\n>  {\n>  public:\n> @@ -52,6 +58,10 @@ public:\n>  \tunsigned int bitsPerPixel;\n>  \tenum ColourEncoding colourEncoding;\n>  \tbool packed;\n> +\n> +\tunsigned int pixelsPerGroup;\n> +\n> +\tstd::array<PixelFormatPlaneInfo, 3> planes;\n>  };\n>\n>  } /* namespace libcamera */\n> diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp\n> index d3b722c..e6d3d3b 100644\n> --- a/src/libcamera/formats.cpp\n> +++ b/src/libcamera/formats.cpp\n> @@ -110,6 +110,22 @@ const std::map<unsigned int, std::vector<SizeRange>> &ImageFormats::data() const\n>  \treturn data_;\n>  }\n>\n> +/**\n> + * \\class PixelFormatPlaneInfo\n> + * \\brief Information about a single plane of a pixel format\n> + *\n> + * \\var PixelFormatPlaneInfo::bytesPerGroup\n> + * \\brief The number of bytes that a pixel group consumes\n> + *\n> + * \\sa PixelFormatInfo::pixelsPerGroup\n> + *\n> + * \\var PixelFormatPlaneInfo::verticalSubSampling\n> + * \\brief Vertical subsampling multiplier\n> + *\n> + * This value is the ratio between the number of rows of pixels in the frame\n> + * to the number of rows of pixels in the plane.\n> + */\n> +\n>  /**\n>   * \\class PixelFormatInfo\n>   * \\brief Information about pixel formats\n> @@ -152,6 +168,49 @@ const std::map<unsigned int, std::vector<SizeRange>> &ImageFormats::data() const\n>   * bytes. For instance, 12-bit Bayer data with two pixels stored in three bytes\n>   * is packed, while the same data stored with 4 bits of padding in two bytes\n>   * per pixel is not packed.\n> + *\n> + * \\var PixelFormatInfo::pixelsPerGroup\n> + * \\brief The number of pixels in a pixel group\n> + *\n> + * The minimum number of pixels (including padding) necessary in a row\n> + * when the frame has only one column of effective pixels.\n> + *\n> + * A pixel group is defined as the minimum number of pixels (including padding)\n> + * necessary in a row when the image has only one column of effective pixels.\n> + * pixelsPerGroup refers to this value. PixelFormatPlaneInfo::bytesPerGroup,\n> + * then, refers to the number of bytes that a pixel group consumes. This\n> + * definition of a pixel group allows simple calculation of stride, as\n> + * ceil(width / pixelsPerGroup) * bytesPerGroup. These values are determined\n> + * only in terms of a row. The ceiling accounts for padding.\n> + *\n> + * A pixel group has a second constraint, such that the pixel group\n> + * (bytesPerGroup and pixelsPerGroup) is the smallest repeatable unit.\n> + * What this means is that, for example, in the IPU3 formats, if there is only\n> + * one column of effective pixels, it looks like it could be fit in 5 bytes\n> + * with 3 padding pixels (for a total of 4 pixels over 5 bytes). However, this\n> + * unit is not repeatable, as at the 7th group in the same row, the pattern\n> + * is broken. Therefore, the pixel group for IPU3 formats must be 25 pixels\n> + * over 32 bytes.\n> + *\n> + * For example, for something simple like BGR888, it is self-explanatory:\n> + * the pixel group size is 1, and the bytes necessary is 3, and there is\n> + * only one plane with no (= 1) vertical subsampling. For YUYV, the\n> + * CbCr pair is shared between two pixels, so even if you have only one\n> + * pixel, you would still need a padded second Y sample, therefore the pixel\n> + * group size is 2, and bytes necessary is 4. YUYV also has no vertical\n> + * subsampling. NV12 has a pixel group size of 2 pixels, due to the CbCr plane.\n> + * The bytes per group then, for both planes, is 2. The first plane has no\n> + * vertical subsampling, but the second plane is subsampled by a factor of 2.\n> + * The IPU3 formats are also self-explanatory, as they are single-planar,\n> + * and have a pixel group size of 25, consuming 32 bytes. Although a\n> + * comment in the driver suggests that it should be 50 and 64,\n> + * respectively, this is an attribute of the driver, and not the format, so\n> + * this shall be set by the ipu3 pipeline handler.\n> + *\n> + * \\var PixelFormatInfo::planes\n> + * \\brief Information about pixels for each plane\n> + *\n> + * \\sa PixelFormatPlaneInfo\n>   */\n>\n>  /**\n> @@ -179,6 +238,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 24,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 1,\n> +\t\t.planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::RGB888, {\n>  \t\t.name = \"RGB888\",\n> @@ -187,6 +248,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 24,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 1,\n> +\t\t.planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::ABGR8888, {\n>  \t\t.name = \"ABGR8888\",\n> @@ -195,6 +258,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 32,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 1,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::ARGB8888, {\n>  \t\t.name = \"ARGB8888\",\n> @@ -203,6 +268,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 32,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 1,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::BGRA8888, {\n>  \t\t.name = \"BGRA8888\",\n> @@ -211,6 +278,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 32,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 1,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::RGBA8888, {\n>  \t\t.name = \"RGBA8888\",\n> @@ -219,6 +288,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 32,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 1,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>\n>  \t/* YUV packed formats. */\n> @@ -229,6 +300,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::YVYU, {\n>  \t\t.name = \"YVYU\",\n> @@ -237,6 +310,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::UYVY, {\n>  \t\t.name = \"UYVY\",\n> @@ -245,6 +320,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::VYUY, {\n>  \t\t.name = \"VYUY\",\n> @@ -253,6 +330,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>\n>  \t/* YUV planar formats. */\n> @@ -263,6 +342,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 2, 1 }, { 2, 2 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::NV21, {\n>  \t\t.name = \"NV21\",\n> @@ -271,6 +352,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 2, 1 }, { 2, 2 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::NV16, {\n>  \t\t.name = \"NV16\",\n> @@ -279,6 +362,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 2, 1 }, { 2, 1 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::NV61, {\n>  \t\t.name = \"NV61\",\n> @@ -287,6 +372,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 2, 1 }, { 2, 1 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::NV24, {\n>  \t\t.name = \"NV24\",\n> @@ -295,6 +382,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 24,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 1,\n> +\t\t.planes = {{ { 1, 1 }, { 2, 1 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::NV42, {\n>  \t\t.name = \"NV42\",\n> @@ -303,6 +392,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 24,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 1,\n> +\t\t.planes = {{ { 1, 1 }, { 2, 1 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::YUV420, {\n>  \t\t.name = \"YUV420\",\n> @@ -311,6 +402,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 2, 1 }, { 1, 2 }, { 1, 2 } }},\n>  \t} },\n>  \t{ formats::YUV422, {\n>  \t\t.name = \"YUV422\",\n> @@ -319,6 +412,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 2, 1 }, { 1, 1 }, { 1, 1 } }},\n>  \t} },\n>\n>  \t/* Greyscale formats. */\n> @@ -329,6 +424,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 8,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 1,\n> +\t\t.planes = {{ { 1, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>\n>  \t/* Bayer formats. */\n> @@ -339,6 +436,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 8,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGBRG8, {\n>  \t\t.name = \"SGBRG8\",\n> @@ -347,6 +446,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 8,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGRBG8, {\n>  \t\t.name = \"SGRBG8\",\n> @@ -355,6 +456,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 8,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SRGGB8, {\n>  \t\t.name = \"SRGGB8\",\n> @@ -363,6 +466,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 8,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SBGGR10, {\n>  \t\t.name = \"SBGGR10\",\n> @@ -371,6 +476,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGBRG10, {\n>  \t\t.name = \"SGBRG10\",\n> @@ -379,6 +486,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGRBG10, {\n>  \t\t.name = \"SGRBG10\",\n> @@ -387,6 +496,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SRGGB10, {\n>  \t\t.name = \"SRGGB10\",\n> @@ -395,6 +506,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SBGGR10_CSI2P, {\n>  \t\t.name = \"SBGGR10_CSI2P\",\n> @@ -403,6 +516,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t.pixelsPerGroup = 4,\n> +\t\t.planes = {{ { 5, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGBRG10_CSI2P, {\n>  \t\t.name = \"SGBRG10_CSI2P\",\n> @@ -411,6 +526,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t.pixelsPerGroup = 4,\n> +\t\t.planes = {{ { 5, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGRBG10_CSI2P, {\n>  \t\t.name = \"SGRBG10_CSI2P\",\n> @@ -419,6 +536,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t.pixelsPerGroup = 4,\n> +\t\t.planes = {{ { 5, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SRGGB10_CSI2P, {\n>  \t\t.name = \"SRGGB10_CSI2P\",\n> @@ -427,6 +546,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t.pixelsPerGroup = 4,\n> +\t\t.planes = {{ { 5, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SBGGR12, {\n>  \t\t.name = \"SBGGR12\",\n> @@ -435,6 +556,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGBRG12, {\n>  \t\t.name = \"SGBRG12\",\n> @@ -443,6 +566,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGRBG12, {\n>  \t\t.name = \"SGRBG12\",\n> @@ -451,6 +576,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SRGGB12, {\n>  \t\t.name = \"SRGGB12\",\n> @@ -459,6 +586,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SBGGR12_CSI2P, {\n>  \t\t.name = \"SBGGR12_CSI2P\",\n> @@ -467,6 +596,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGBRG12_CSI2P, {\n>  \t\t.name = \"SGBRG12_CSI2P\",\n> @@ -475,6 +606,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGRBG12_CSI2P, {\n>  \t\t.name = \"SGRBG12_CSI2P\",\n> @@ -483,6 +616,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SRGGB12_CSI2P, {\n>  \t\t.name = \"SRGGB12_CSI2P\",\n> @@ -491,6 +626,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SBGGR10_IPU3, {\n>  \t\t.name = \"SBGGR10_IPU3\",\n> @@ -499,6 +636,9 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t/* \\todo remember to double this in the ipu3 pipeline handler */\n> +\t\t.pixelsPerGroup = 25,\n> +\t\t.planes = {{ { 32, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGBRG10_IPU3, {\n>  \t\t.name = \"SGBRG10_IPU3\",\n> @@ -507,6 +647,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t.pixelsPerGroup = 25,\n> +\t\t.planes = {{ { 32, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGRBG10_IPU3, {\n>  \t\t.name = \"SGRBG10_IPU3\",\n> @@ -515,6 +657,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t.pixelsPerGroup = 25,\n> +\t\t.planes = {{ { 32, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SRGGB10_IPU3, {\n>  \t\t.name = \"SRGGB10_IPU3\",\n> @@ -523,6 +667,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t.pixelsPerGroup = 25,\n> +\t\t.planes = {{ { 32, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>\n>  \t/* Compressed formats. */\n> @@ -533,6 +679,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 0,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 1,\n> +\t\t.planes = {{ { 1, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  };\n>\n> --\n> 2.27.0\n>\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","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 024AEBD792\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  8 Jul 2020 20:18:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8A24A6115B;\n\tWed,  8 Jul 2020 22:18:21 +0200 (CEST)","from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net\n\t[217.70.183.194])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E50506113A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  8 Jul 2020 22:18:20 +0200 (CEST)","from uno.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 387694000A;\n\tWed,  8 Jul 2020 20:18:19 +0000 (UTC)"],"X-Originating-IP":"2.224.242.101","Date":"Wed, 8 Jul 2020 22:21:54 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<20200708202154.bjjxihuugj76ddvf@uno.localdomain>","References":"<20200708134417.67747-1-paul.elder@ideasonboard.com>\n\t<20200708134417.67747-3-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200708134417.67747-3-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v4 02/21] libcamera: formats: Add\n\tfields to info to ease calculating stride","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","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":11278,"web_url":"https://patchwork.libcamera.org/comment/11278/","msgid":"<ce5fd908-3025-d759-8af3-2aab5e6870e0@ideasonboard.com>","date":"2020-07-09T08:57:42","subject":"Re: [libcamera-devel] [PATCH v4 02/21] libcamera: formats: Add\n\tfields to info to ease calculating stride","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Paul,\n\nOn 08/07/2020 14:43, Paul Elder wrote:\n> Packed formats make it difficult to calculate stride as well as\n> frame size with the fields that PixelFormatInfo currently has.\n> bitsPerPixel is defined as the average number of bits per pixel, and\n> only counts effective bits, so it is not useful for calculating\n> stride and frame size.\n> \n> To fix this, we introduce a concept of a \"pixel group\". The size of this\n> group is defined as the minimum number of pixels (including padding)\n> necessary in a row when the image has only one column of effective\n> pixels. The pixel group has one more attribute, that is the \"bytes per\n> group\". This determines how many bytes one pixel group consumes. These\n> are the fields pixelsPerGroup and bytesPerGroup that are defined in this\n> patch. Defining these two values makes it really simple to calculate\n> bytes-per-line, as ceil(width / pixelsPerGroup) * bytesPerGroup, where\n> width is measured in number of pixels. The ceiling accounts for padding.\n> \n> The pixel group has another contraint, which is that the pixel group\n> (bytesPerGroup and pixelsPerGroup) is the smallest repeatable unit. What\n> this means is that, for example, in the IPU3 formats, if there is only\n> one column of effective pixels, it looks like it could be fit in 5 bytes\n> with 3 padding pixels (for a total of 4 pixels over 5 bytes). However,\n> this unit is not repeatable, as at the 7th group in the same row, the\n> pattern is broken. Therefore, the pixel group for IPU3 formats must be\n> 25 pixels over 32 bytes.\n> \n> Clearly, pixelsPerGroup must be constant for all planes in the format.\n> The bytesPerGroup then, must be a per-plane attribute. There is one more\n> field, verticalSubSampling, that is per-plane. This is simply a divider,\n> to divide the number of rows of pixels by the sub-sampling value, to\n> obtain the number of rows of pixels for the subsampled plane.\n> \n> For example, for something simple like BGR888, it is self-explanatory:\n> the pixel group size is 1, and the bytes necessary is 3, and there is\n> only one plane with no (= 1) vertical subsampling. For YUYV, the\n> CbCr pair is shared between two pixels, so even if you have only one\n> pixel, you would still need a padded second Y, therefore the pixel\n> group size is 2, and bytes necessary is 4 (as opposed to 1 and 2). YUYV\n> also has no vertical subsampling. NV12 has a pixel group size of 2\n> pixels, due to the CbCr plane. The bytes per group then, for both\n> planes, is 2. The first plane has no vertical subsampling, but the\n> second plane is subsampled by a factor of 2.\n> The IPU3 formats are also self-explanatory, as they are single-planar,\n> and have a pixel group size of 25, consuming 32 bytes. Although a\n> comment in the driver suggests that it should be 50 and 64,\n> respectively, this is an attribute of the driver, and not the format, so\n> this shall be set by the ipu3 pipeline handler.\n> \n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> ---\n> Changes in v4:\n> - expanded documentation and definition of pixel group\n> \n> Changes in v3:\n> - add planes\n> - redefine the parameters for the formats\n>   - pixelsPerGroup is for whole format\n>   - add verticalSubSampling per plane\n> \n> Changes in v2:\n> - add documentation for bytesPerGroup pixelsPerGroup\n> - fix wording in commit message\n>   - bytes-per-line -> stride\n>   - buffer size -> frame size\n> - changed MJPEG todo to allowing pipeline handlers to set parameters of\n>   format infos\n> ---\n>  include/libcamera/internal/formats.h |  10 ++\n>  src/libcamera/formats.cpp            | 148 +++++++++++++++++++++++++++\n>  2 files changed, 158 insertions(+)\n> \n> diff --git a/include/libcamera/internal/formats.h b/include/libcamera/internal/formats.h\n> index f59ac8f..61e5ff5 100644\n> --- a/include/libcamera/internal/formats.h\n> +++ b/include/libcamera/internal/formats.h\n> @@ -32,6 +32,12 @@ private:\n>  \tstd::map<unsigned int, std::vector<SizeRange>> data_;\n>  };\n>  \n> +struct PixelFormatPlaneInfo\n> +{\n> +\tunsigned int bytesPerGroup;\n> +\tunsigned int verticalSubSampling;\n> +};\n> +\n>  class PixelFormatInfo\n>  {\n>  public:\n> @@ -52,6 +58,10 @@ public:\n>  \tunsigned int bitsPerPixel;\n>  \tenum ColourEncoding colourEncoding;\n>  \tbool packed;\n> +\n> +\tunsigned int pixelsPerGroup;\n> +\n> +\tstd::array<PixelFormatPlaneInfo, 3> planes;\n\n\nBuilding this on Chrome gets quite unhappy here:\n\n\n../../../../../../../../mnt/host/source/src/third_party/libcamera/include/libcamera/internal/formats.h:71:38:\nerror: implicit instantiation of undefined template\n'std::__1::array<libcamera::PixelFormatPlaneInfo, 3>'\n        std::array<PixelFormatPlaneInfo, 3> planes;\n                                            ^\n/usr/bin/../include/c++/v1/__tuple:219:64: note: template is declared here\ntemplate <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;\n                                                               ^\n\n\nAdding #include <array> in this formats.h resolves it.\n\nWith that,\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n\n\n>  };\n>  \n>  } /* namespace libcamera */\n> diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp\n> index d3b722c..e6d3d3b 100644\n> --- a/src/libcamera/formats.cpp\n> +++ b/src/libcamera/formats.cpp\n> @@ -110,6 +110,22 @@ const std::map<unsigned int, std::vector<SizeRange>> &ImageFormats::data() const\n>  \treturn data_;\n>  }\n>  \n> +/**\n> + * \\class PixelFormatPlaneInfo\n> + * \\brief Information about a single plane of a pixel format\n> + *\n> + * \\var PixelFormatPlaneInfo::bytesPerGroup\n> + * \\brief The number of bytes that a pixel group consumes\n> + *\n> + * \\sa PixelFormatInfo::pixelsPerGroup\n> + *\n> + * \\var PixelFormatPlaneInfo::verticalSubSampling\n> + * \\brief Vertical subsampling multiplier\n> + *\n> + * This value is the ratio between the number of rows of pixels in the frame\n> + * to the number of rows of pixels in the plane.\n> + */\n> +\n>  /**\n>   * \\class PixelFormatInfo\n>   * \\brief Information about pixel formats\n> @@ -152,6 +168,49 @@ const std::map<unsigned int, std::vector<SizeRange>> &ImageFormats::data() const\n>   * bytes. For instance, 12-bit Bayer data with two pixels stored in three bytes\n>   * is packed, while the same data stored with 4 bits of padding in two bytes\n>   * per pixel is not packed.\n> + *\n> + * \\var PixelFormatInfo::pixelsPerGroup\n> + * \\brief The number of pixels in a pixel group\n> + *\n> + * The minimum number of pixels (including padding) necessary in a row\n> + * when the frame has only one column of effective pixels.\n> + *\n> + * A pixel group is defined as the minimum number of pixels (including padding)\n> + * necessary in a row when the image has only one column of effective pixels.\n> + * pixelsPerGroup refers to this value. PixelFormatPlaneInfo::bytesPerGroup,\n> + * then, refers to the number of bytes that a pixel group consumes. This\n> + * definition of a pixel group allows simple calculation of stride, as\n> + * ceil(width / pixelsPerGroup) * bytesPerGroup. These values are determined\n> + * only in terms of a row. The ceiling accounts for padding.\n> + *\n> + * A pixel group has a second constraint, such that the pixel group\n> + * (bytesPerGroup and pixelsPerGroup) is the smallest repeatable unit.\n> + * What this means is that, for example, in the IPU3 formats, if there is only\n> + * one column of effective pixels, it looks like it could be fit in 5 bytes\n> + * with 3 padding pixels (for a total of 4 pixels over 5 bytes). However, this\n> + * unit is not repeatable, as at the 7th group in the same row, the pattern\n> + * is broken. Therefore, the pixel group for IPU3 formats must be 25 pixels\n> + * over 32 bytes.\n> + *\n> + * For example, for something simple like BGR888, it is self-explanatory:\n> + * the pixel group size is 1, and the bytes necessary is 3, and there is\n> + * only one plane with no (= 1) vertical subsampling. For YUYV, the\n> + * CbCr pair is shared between two pixels, so even if you have only one\n> + * pixel, you would still need a padded second Y sample, therefore the pixel\n> + * group size is 2, and bytes necessary is 4. YUYV also has no vertical\n> + * subsampling. NV12 has a pixel group size of 2 pixels, due to the CbCr plane.\n> + * The bytes per group then, for both planes, is 2. The first plane has no\n> + * vertical subsampling, but the second plane is subsampled by a factor of 2.\n> + * The IPU3 formats are also self-explanatory, as they are single-planar,\n> + * and have a pixel group size of 25, consuming 32 bytes. Although a\n> + * comment in the driver suggests that it should be 50 and 64,\n> + * respectively, this is an attribute of the driver, and not the format, so\n> + * this shall be set by the ipu3 pipeline handler.\n> + *\n> + * \\var PixelFormatInfo::planes\n> + * \\brief Information about pixels for each plane\n> + *\n> + * \\sa PixelFormatPlaneInfo\n>   */\n>  \n>  /**\n> @@ -179,6 +238,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 24,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 1,\n> +\t\t.planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::RGB888, {\n>  \t\t.name = \"RGB888\",\n> @@ -187,6 +248,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 24,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 1,\n> +\t\t.planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::ABGR8888, {\n>  \t\t.name = \"ABGR8888\",\n> @@ -195,6 +258,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 32,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 1,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::ARGB8888, {\n>  \t\t.name = \"ARGB8888\",\n> @@ -203,6 +268,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 32,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 1,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::BGRA8888, {\n>  \t\t.name = \"BGRA8888\",\n> @@ -211,6 +278,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 32,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 1,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::RGBA8888, {\n>  \t\t.name = \"RGBA8888\",\n> @@ -219,6 +288,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 32,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 1,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \n>  \t/* YUV packed formats. */\n> @@ -229,6 +300,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::YVYU, {\n>  \t\t.name = \"YVYU\",\n> @@ -237,6 +310,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::UYVY, {\n>  \t\t.name = \"UYVY\",\n> @@ -245,6 +320,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::VYUY, {\n>  \t\t.name = \"VYUY\",\n> @@ -253,6 +330,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \n>  \t/* YUV planar formats. */\n> @@ -263,6 +342,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 2, 1 }, { 2, 2 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::NV21, {\n>  \t\t.name = \"NV21\",\n> @@ -271,6 +352,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 2, 1 }, { 2, 2 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::NV16, {\n>  \t\t.name = \"NV16\",\n> @@ -279,6 +362,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 2, 1 }, { 2, 1 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::NV61, {\n>  \t\t.name = \"NV61\",\n> @@ -287,6 +372,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 2, 1 }, { 2, 1 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::NV24, {\n>  \t\t.name = \"NV24\",\n> @@ -295,6 +382,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 24,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 1,\n> +\t\t.planes = {{ { 1, 1 }, { 2, 1 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::NV42, {\n>  \t\t.name = \"NV42\",\n> @@ -303,6 +392,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 24,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 1,\n> +\t\t.planes = {{ { 1, 1 }, { 2, 1 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::YUV420, {\n>  \t\t.name = \"YUV420\",\n> @@ -311,6 +402,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 2, 1 }, { 1, 2 }, { 1, 2 } }},\n>  \t} },\n>  \t{ formats::YUV422, {\n>  \t\t.name = \"YUV422\",\n> @@ -319,6 +412,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 16,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 2, 1 }, { 1, 1 }, { 1, 1 } }},\n>  \t} },\n>  \n>  \t/* Greyscale formats. */\n> @@ -329,6 +424,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 8,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 1,\n> +\t\t.planes = {{ { 1, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \n>  \t/* Bayer formats. */\n> @@ -339,6 +436,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 8,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGBRG8, {\n>  \t\t.name = \"SGBRG8\",\n> @@ -347,6 +446,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 8,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGRBG8, {\n>  \t\t.name = \"SGRBG8\",\n> @@ -355,6 +456,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 8,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SRGGB8, {\n>  \t\t.name = \"SRGGB8\",\n> @@ -363,6 +466,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 8,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SBGGR10, {\n>  \t\t.name = \"SBGGR10\",\n> @@ -371,6 +476,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGBRG10, {\n>  \t\t.name = \"SGBRG10\",\n> @@ -379,6 +486,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGRBG10, {\n>  \t\t.name = \"SGRBG10\",\n> @@ -387,6 +496,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SRGGB10, {\n>  \t\t.name = \"SRGGB10\",\n> @@ -395,6 +506,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SBGGR10_CSI2P, {\n>  \t\t.name = \"SBGGR10_CSI2P\",\n> @@ -403,6 +516,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t.pixelsPerGroup = 4,\n> +\t\t.planes = {{ { 5, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGBRG10_CSI2P, {\n>  \t\t.name = \"SGBRG10_CSI2P\",\n> @@ -411,6 +526,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t.pixelsPerGroup = 4,\n> +\t\t.planes = {{ { 5, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGRBG10_CSI2P, {\n>  \t\t.name = \"SGRBG10_CSI2P\",\n> @@ -419,6 +536,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t.pixelsPerGroup = 4,\n> +\t\t.planes = {{ { 5, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SRGGB10_CSI2P, {\n>  \t\t.name = \"SRGGB10_CSI2P\",\n> @@ -427,6 +546,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t.pixelsPerGroup = 4,\n> +\t\t.planes = {{ { 5, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SBGGR12, {\n>  \t\t.name = \"SBGGR12\",\n> @@ -435,6 +556,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGBRG12, {\n>  \t\t.name = \"SGBRG12\",\n> @@ -443,6 +566,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGRBG12, {\n>  \t\t.name = \"SGRBG12\",\n> @@ -451,6 +576,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SRGGB12, {\n>  \t\t.name = \"SRGGB12\",\n> @@ -459,6 +586,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SBGGR12_CSI2P, {\n>  \t\t.name = \"SBGGR12_CSI2P\",\n> @@ -467,6 +596,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGBRG12_CSI2P, {\n>  \t\t.name = \"SGBRG12_CSI2P\",\n> @@ -475,6 +606,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGRBG12_CSI2P, {\n>  \t\t.name = \"SGRBG12_CSI2P\",\n> @@ -483,6 +616,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SRGGB12_CSI2P, {\n>  \t\t.name = \"SRGGB12_CSI2P\",\n> @@ -491,6 +626,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 12,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t.pixelsPerGroup = 2,\n> +\t\t.planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SBGGR10_IPU3, {\n>  \t\t.name = \"SBGGR10_IPU3\",\n> @@ -499,6 +636,9 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t/* \\todo remember to double this in the ipu3 pipeline handler */\n> +\t\t.pixelsPerGroup = 25,\n> +\t\t.planes = {{ { 32, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGBRG10_IPU3, {\n>  \t\t.name = \"SGBRG10_IPU3\",\n> @@ -507,6 +647,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t.pixelsPerGroup = 25,\n> +\t\t.planes = {{ { 32, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SGRBG10_IPU3, {\n>  \t\t.name = \"SGRBG10_IPU3\",\n> @@ -515,6 +657,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t.pixelsPerGroup = 25,\n> +\t\t.planes = {{ { 32, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \t{ formats::SRGGB10_IPU3, {\n>  \t\t.name = \"SRGGB10_IPU3\",\n> @@ -523,6 +667,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 10,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingRAW,\n>  \t\t.packed = true,\n> +\t\t.pixelsPerGroup = 25,\n> +\t\t.planes = {{ { 32, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n>  \n>  \t/* Compressed formats. */\n> @@ -533,6 +679,8 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.bitsPerPixel = 0,\n>  \t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>  \t\t.packed = false,\n> +\t\t.pixelsPerGroup = 1,\n> +\t\t.planes = {{ { 1, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\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 2C8D8BD792\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  9 Jul 2020 08:57:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A53296118C;\n\tThu,  9 Jul 2020 10:57:49 +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 1896861186\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  9 Jul 2020 10:57:48 +0200 (CEST)","from [192.168.0.20]\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4EA33289;\n\tThu,  9 Jul 2020 10:57:47 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"ZjS/Rarz\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1594285067;\n\tbh=eOZKCv/fx2nrWkEEMGCwipfMBB5ORKQrTPT/pyxjOqc=;\n\th=Reply-To:Subject:To:References:From:Date:In-Reply-To:From;\n\tb=ZjS/RarzcXzadRIU8F9mpHUHSRUbVijQANtOjPxDisuB9EMAJjUVyaWWtWtXItmlI\n\ty/I6rbRO3H2auhKfDYnvFyl7Ntoy874M6SPJuADr+QDMHXMmtv/2hhF+c9dwPU9Y1b\n\t2sWHPfIT2ivBl7Cy+QPj/2b/FnlIR2q955wkFhZc=","To":"Paul Elder <paul.elder@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20200708134417.67747-1-paul.elder@ideasonboard.com>\n\t<20200708134417.67747-3-paul.elder@ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\t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\n\tWZw01QYHU/GUV/zHJSFk","Organization":"Ideas on Board","Message-ID":"<ce5fd908-3025-d759-8af3-2aab5e6870e0@ideasonboard.com>","Date":"Thu, 9 Jul 2020 09:57:42 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n\tThunderbird/68.8.0","MIME-Version":"1.0","In-Reply-To":"<20200708134417.67747-3-paul.elder@ideasonboard.com>","Content-Language":"en-GB","Subject":"Re: [libcamera-devel] [PATCH v4 02/21] libcamera: formats: Add\n\tfields to info to ease calculating stride","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>","Reply-To":"kieran.bingham@ideasonboard.com","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]