diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-07-05 05:33:48 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-10-27 01:39:57 +0300 |
commit | 940d4df4e05794c92d6564bc6c2b874536469094 (patch) | |
tree | 8b1f313dab668c9923a09fbe02d1e3bd6b5d6d12 /src/libcamera/formats.cpp | |
parent | 26f0ce03b9dc7477d40185eaf3a173d8b2ed916c (diff) |
libcamera: formats: Add R10 and R12 formats
These new formats corresponds to the V4L2 V4L2_PIX_FMT_Y10 and
V4L2_PIX_FMT_Y12 formats, and are the little-endian version of the
DRM_FORMAT_R10 and DRM_FORMAT_R12 formats.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/formats.cpp')
-rw-r--r-- | src/libcamera/formats.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp index 1c29e1f2..9f96e9dc 100644 --- a/src/libcamera/formats.cpp +++ b/src/libcamera/formats.cpp @@ -484,6 +484,32 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{ .pixelsPerGroup = 1, .planes = {{ { 1, 1 }, { 0, 0 }, { 0, 0 } }}, } }, + { formats::R10, { + .name = "R10", + .format = formats::R10, + .v4l2Formats = { + .single = V4L2PixelFormat(V4L2_PIX_FMT_Y10), + .multi = V4L2PixelFormat(), + }, + .bitsPerPixel = 10, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .packed = false, + .pixelsPerGroup = 1, + .planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }}, + } }, + { formats::R12, { + .name = "R12", + .format = formats::R12, + .v4l2Formats = { + .single = V4L2PixelFormat(V4L2_PIX_FMT_Y12), + .multi = V4L2PixelFormat(), + }, + .bitsPerPixel = 10, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .packed = false, + .pixelsPerGroup = 1, + .planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }}, + } }, /* Bayer formats. */ { formats::SBGGR8, { |