summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libcamera/formats.cpp10
-rw-r--r--src/libcamera/formats.yaml2
-rw-r--r--src/libcamera/v4l2_pixelformat.cpp1
3 files changed, 13 insertions, 0 deletions
diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp
index 3f895a7c..8f9bdafe 100644
--- a/src/libcamera/formats.cpp
+++ b/src/libcamera/formats.cpp
@@ -407,6 +407,16 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
.pixelsPerGroup = 2,
.planes = {{ { 2, 1 }, { 1, 2 }, { 1, 2 } }},
} },
+ { formats::YVU420, {
+ .name = "YVU420",
+ .format = PixelFormat(formats::YVU420),
+ .v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_YVU420),
+ .bitsPerPixel = 12,
+ .colourEncoding = PixelFormatInfo::ColourEncodingYUV,
+ .packed = false,
+ .pixelsPerGroup = 2,
+ .planes = {{ { 2, 1 }, { 1, 2 }, { 1, 2 } }},
+ } },
{ formats::YUV422, {
.name = "YUV422",
.format = PixelFormat(formats::YUV422),
diff --git a/src/libcamera/formats.yaml b/src/libcamera/formats.yaml
index ce06dbc4..6b5f084b 100644
--- a/src/libcamera/formats.yaml
+++ b/src/libcamera/formats.yaml
@@ -55,6 +55,8 @@ formats:
- YUV420:
fourcc: DRM_FORMAT_YUV420
+ - YVU420:
+ fourcc: DRM_FORMAT_YVU420
- YUV422:
fourcc: DRM_FORMAT_YUV422
diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp
index 6745d17d..2ebc1f18 100644
--- a/src/libcamera/v4l2_pixelformat.cpp
+++ b/src/libcamera/v4l2_pixelformat.cpp
@@ -64,6 +64,7 @@ const std::map<V4L2PixelFormat, PixelFormat> vpf2pf{
{ V4L2PixelFormat(V4L2_PIX_FMT_NV12), formats::NV12 },
{ V4L2PixelFormat(V4L2_PIX_FMT_NV21), formats::NV21 },
{ V4L2PixelFormat(V4L2_PIX_FMT_YUV420), formats::YUV420 },
+ { V4L2PixelFormat(V4L2_PIX_FMT_YVU420), formats::YVU420 },
{ V4L2PixelFormat(V4L2_PIX_FMT_YUV422P), formats::YUV422 },
/* Greyscale formats. */