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:
parent
271d048b2d
commit
f827c6363d
1 changed files with 26 additions and 10 deletions
|
@ -256,6 +256,22 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
|
||||||
} },
|
} },
|
||||||
|
|
||||||
/* YUV planar formats. */
|
/* 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, {
|
{ formats::NV16, {
|
||||||
.name = "NV16",
|
.name = "NV16",
|
||||||
.format = formats::NV16,
|
.format = formats::NV16,
|
||||||
|
@ -272,19 +288,19 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
|
||||||
.colourEncoding = PixelFormatInfo::ColourEncodingYUV,
|
.colourEncoding = PixelFormatInfo::ColourEncodingYUV,
|
||||||
.packed = false,
|
.packed = false,
|
||||||
} },
|
} },
|
||||||
{ formats::NV12, {
|
{ formats::NV24, {
|
||||||
.name = "NV12",
|
.name = "NV24",
|
||||||
.format = formats::NV12,
|
.format = formats::NV24,
|
||||||
.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_NV12),
|
.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_NV24),
|
||||||
.bitsPerPixel = 12,
|
.bitsPerPixel = 24,
|
||||||
.colourEncoding = PixelFormatInfo::ColourEncodingYUV,
|
.colourEncoding = PixelFormatInfo::ColourEncodingYUV,
|
||||||
.packed = false,
|
.packed = false,
|
||||||
} },
|
} },
|
||||||
{ formats::NV21, {
|
{ formats::NV42, {
|
||||||
.name = "NV21",
|
.name = "NV42",
|
||||||
.format = formats::NV21,
|
.format = formats::NV42,
|
||||||
.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_NV21),
|
.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_NV42),
|
||||||
.bitsPerPixel = 12,
|
.bitsPerPixel = 24,
|
||||||
.colourEncoding = PixelFormatInfo::ColourEncodingYUV,
|
.colourEncoding = PixelFormatInfo::ColourEncodingYUV,
|
||||||
.packed = false,
|
.packed = false,
|
||||||
} },
|
} },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue