@@ -366,6 +366,26 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
.pixelsPerGroup = 2,
.planes = {{ { 2, 1 }, { 2, 2 }, { 0, 0 } }},
} },
+ { formats::NV12MT_COL128, {
+ .name = "NV12MT_COL128",
+ .format = formats::NV12MT_COL128,
+ .v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_NV12MT_COL128), },
+ .bitsPerPixel = 12,
+ .colourEncoding = PixelFormatInfo::ColourEncodingYUV,
+ .packed = false,
+ .pixelsPerGroup = 2,
+ .planes = {{ { 2, 1 }, { 2, 2 }, { 0, 0 } }},
+ } },
+ { formats::NV12MT_10_COL128, {
+ .name = "NV12MT_10_COL128",
+ .format = formats::NV12MT_10_COL128,
+ .v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_NV12MT_10_COL128), },
+ .bitsPerPixel = 15,
+ .colourEncoding = PixelFormatInfo::ColourEncodingYUV,
+ .packed = true,
+ .pixelsPerGroup = 6,
+ .planes = {{ { 8, 1 }, { 8, 2 }, { 0, 0 } }},
+ } },
{ formats::NV21, {
.name = "NV21",
.format = formats::NV21,
@@ -73,6 +73,12 @@ formats:
fourcc: DRM_FORMAT_NV24
- NV42:
fourcc: DRM_FORMAT_NV42
+ - NV12MT_COL128:
+ fourcc: DRM_FORMAT_NV12
+ mod: DRM_FORMAT_MOD_BROADCOM_SAND128
+ - NV12MT_10_COL128:
+ fourcc: DRM_FORMAT_P030
+ mod: DRM_FORMAT_MOD_BROADCOM_SAND128
- YUV420:
fourcc: DRM_FORMAT_YUV420
@@ -103,6 +103,10 @@ const std::map<V4L2PixelFormat, V4L2PixelFormat::Info> vpf2pf{
{ formats::NV12, "Y/CbCr 4:2:0" } },
{ V4L2PixelFormat(V4L2_PIX_FMT_NV12M),
{ formats::NV12, "Y/CbCr 4:2:0 (N-C)" } },
+ { V4L2PixelFormat(V4L2_PIX_FMT_NV12MT_COL128),
+ { formats::NV12MT_COL128, "Y/CbCr 4:2:0 (128 col)" } },
+ { V4L2PixelFormat(V4L2_PIX_FMT_NV12MT_10_COL128),
+ { formats::NV12MT_10_COL128, "10-bit Y/CbCr 4:2:0 (128 col)" } },
{ V4L2PixelFormat(V4L2_PIX_FMT_NV21),
{ formats::NV21, "Y/CrCb 4:2:0" } },
{ V4L2PixelFormat(V4L2_PIX_FMT_NV21M),
Add the NV12MT_COL128 (NV12 8-bit) and NV12MT_10_COL128 (P030 10-bit) column layout pixel formats available from the PiSP Backend hardware. Map the matching V4L2 FourCCs to the libcamera::formats conversion table. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> --- src/libcamera/formats.cpp | 20 ++++++++++++++++++++ src/libcamera/formats.yaml | 6 ++++++ src/libcamera/v4l2_pixelformat.cpp | 4 ++++ 3 files changed, 30 insertions(+)