libcamera: formats: Add NV24 and NV42, and reorder NV formats
Add formats for NV24 and NV42. While at it, reorder the NV formats so that NV12 and NV21 come first, followed by NV16, NV61, NV24, and NV42. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
@@ -256,6 +256,22 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
|
||||
} },
|
||||
|
||||
/* YUV planar formats. */
|
||||
{ formats::NV12, {
|
||||
.name = "NV12",
|
||||
.format = formats::NV12,
|
||||
.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_NV12),
|
||||
.bitsPerPixel = 12,
|
||||
.colourEncoding = PixelFormatInfo::ColourEncodingYUV,
|
||||
.packed = false,
|
||||
} },
|
||||
{ formats::NV21, {
|
||||
.name = "NV21",
|
||||
.format = formats::NV21,
|
||||
.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_NV21),
|
||||
.bitsPerPixel = 12,
|
||||
.colourEncoding = PixelFormatInfo::ColourEncodingYUV,
|
||||
.packed = false,
|
||||
} },
|
||||
{ formats::NV16, {
|
||||
.name = "NV16",
|
||||
.format = formats::NV16,
|
||||
@@ -272,19 +288,19 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
|
||||
.colourEncoding = PixelFormatInfo::ColourEncodingYUV,
|
||||
.packed = false,
|
||||
} },
|
||||
{ formats::NV12, {
|
||||
.name = "NV12",
|
||||
.format = formats::NV12,
|
||||
.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_NV12),
|
||||
.bitsPerPixel = 12,
|
||||
{ formats::NV24, {
|
||||
.name = "NV24",
|
||||
.format = formats::NV24,
|
||||
.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_NV24),
|
||||
.bitsPerPixel = 24,
|
||||
.colourEncoding = PixelFormatInfo::ColourEncodingYUV,
|
||||
.packed = false,
|
||||
} },
|
||||
{ formats::NV21, {
|
||||
.name = "NV21",
|
||||
.format = formats::NV21,
|
||||
.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_NV21),
|
||||
.bitsPerPixel = 12,
|
||||
{ formats::NV42, {
|
||||
.name = "NV42",
|
||||
.format = formats::NV42,
|
||||
.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_NV42),
|
||||
.bitsPerPixel = 24,
|
||||
.colourEncoding = PixelFormatInfo::ColourEncodingYUV,
|
||||
.packed = false,
|
||||
} },
|
||||
|
||||
Reference in New Issue
Block a user