libcamera: Add support for planar YUV422 and YUV420 formats
These formats can be helpful when downstream applications or libraries support them natively (avoiding a costly conversion). Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Tested-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
405ba5fd4a
commit
c3ed943c99
4 changed files with 24 additions and 1 deletions
|
@ -270,6 +270,20 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
|
|||
.colourEncoding = PixelFormatInfo::ColourEncodingYUV,
|
||||
.packed = false,
|
||||
} },
|
||||
{ formats::YUV420, {
|
||||
.format = PixelFormat(formats::YUV420),
|
||||
.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_YUV420),
|
||||
.bitsPerPixel = 12,
|
||||
.colourEncoding = PixelFormatInfo::ColourEncodingYUV,
|
||||
.packed = false,
|
||||
} },
|
||||
{ formats::YUV422, {
|
||||
.format = PixelFormat(formats::YUV422),
|
||||
.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_YUV422P),
|
||||
.bitsPerPixel = 16,
|
||||
.colourEncoding = PixelFormatInfo::ColourEncodingYUV,
|
||||
.packed = false,
|
||||
} },
|
||||
|
||||
/* Greyscale formats. */
|
||||
{ formats::R8, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue