libcamera: formats: Add YUV444 and YVU444 pixel formats
Extend planar YUV format support with 4:4:4 formats. Those formats are used by the i.MX8 ISI driver that will be supported by the simple pipeline handler. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
111f9f5af2
commit
3b9fe4ae99
3 changed files with 34 additions and 0 deletions
|
@ -495,6 +495,32 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
|
||||||
.pixelsPerGroup = 2,
|
.pixelsPerGroup = 2,
|
||||||
.planes = {{ { 2, 1 }, { 1, 1 }, { 1, 1 } }},
|
.planes = {{ { 2, 1 }, { 1, 1 }, { 1, 1 } }},
|
||||||
} },
|
} },
|
||||||
|
{ formats::YUV444, {
|
||||||
|
.name = "YUV444",
|
||||||
|
.format = formats::YUV444,
|
||||||
|
.v4l2Formats = {
|
||||||
|
.single = V4L2PixelFormat(),
|
||||||
|
.multi = V4L2PixelFormat(V4L2_PIX_FMT_YUV444M),
|
||||||
|
},
|
||||||
|
.bitsPerPixel = 24,
|
||||||
|
.colourEncoding = PixelFormatInfo::ColourEncodingYUV,
|
||||||
|
.packed = false,
|
||||||
|
.pixelsPerGroup = 1,
|
||||||
|
.planes = {{ { 1, 1 }, { 1, 1 }, { 1, 1 } }},
|
||||||
|
} },
|
||||||
|
{ formats::YVU444, {
|
||||||
|
.name = "YVU444",
|
||||||
|
.format = formats::YVU444,
|
||||||
|
.v4l2Formats = {
|
||||||
|
.single = V4L2PixelFormat(),
|
||||||
|
.multi = V4L2PixelFormat(V4L2_PIX_FMT_YVU444M),
|
||||||
|
},
|
||||||
|
.bitsPerPixel = 24,
|
||||||
|
.colourEncoding = PixelFormatInfo::ColourEncodingYUV,
|
||||||
|
.packed = false,
|
||||||
|
.pixelsPerGroup = 1,
|
||||||
|
.planes = {{ { 1, 1 }, { 1, 1 }, { 1, 1 } }},
|
||||||
|
} },
|
||||||
|
|
||||||
/* Greyscale formats. */
|
/* Greyscale formats. */
|
||||||
{ formats::R8, {
|
{ formats::R8, {
|
||||||
|
|
|
@ -71,6 +71,10 @@ formats:
|
||||||
fourcc: DRM_FORMAT_YUV422
|
fourcc: DRM_FORMAT_YUV422
|
||||||
- YVU422:
|
- YVU422:
|
||||||
fourcc: DRM_FORMAT_YVU422
|
fourcc: DRM_FORMAT_YVU422
|
||||||
|
- YUV444:
|
||||||
|
fourcc: DRM_FORMAT_YUV444
|
||||||
|
- YVU444:
|
||||||
|
fourcc: DRM_FORMAT_YVU444
|
||||||
|
|
||||||
- MJPEG:
|
- MJPEG:
|
||||||
fourcc: DRM_FORMAT_MJPEG
|
fourcc: DRM_FORMAT_MJPEG
|
||||||
|
|
|
@ -117,6 +117,10 @@ const std::map<V4L2PixelFormat, V4L2PixelFormat::Info> vpf2pf{
|
||||||
{ formats::YUV422, "Planar YUV 4:2:2 (N-C)" } },
|
{ formats::YUV422, "Planar YUV 4:2:2 (N-C)" } },
|
||||||
{ V4L2PixelFormat(V4L2_PIX_FMT_YVU422M),
|
{ V4L2PixelFormat(V4L2_PIX_FMT_YVU422M),
|
||||||
{ formats::YVU422, "Planar YVU 4:2:2 (N-C)" } },
|
{ formats::YVU422, "Planar YVU 4:2:2 (N-C)" } },
|
||||||
|
{ V4L2PixelFormat(V4L2_PIX_FMT_YUV444M),
|
||||||
|
{ formats::YUV444, "Planar YUV 4:4:4 (N-C)" } },
|
||||||
|
{ V4L2PixelFormat(V4L2_PIX_FMT_YUV444M),
|
||||||
|
{ formats::YVU444, "Planar YVU 4:4:4 (N-C)" } },
|
||||||
|
|
||||||
/* Greyscale formats. */
|
/* Greyscale formats. */
|
||||||
{ V4L2PixelFormat(V4L2_PIX_FMT_GREY),
|
{ V4L2PixelFormat(V4L2_PIX_FMT_GREY),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue