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>
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Laurent Pinchart
2021-11-01 09:15:01 +00:00
committed by Kieran Bingham
parent dc2f47e6e5
commit 264a673d28
3 changed files with 34 additions and 0 deletions

View File

@@ -117,6 +117,10 @@ const std::map<V4L2PixelFormat, V4L2PixelFormat::Info> vpf2pf{
/* Greyscale formats. */
{ V4L2PixelFormat(V4L2_PIX_FMT_GREY),
{ formats::R8, "8-bit Greyscale" } },
{ V4L2PixelFormat(V4L2_PIX_FMT_Y10),
{ formats::R10, "10-bit Greyscale" } },
{ V4L2PixelFormat(V4L2_PIX_FMT_Y12),
{ formats::R12, "12-bit Greyscale" } },
/* Bayer formats. */
{ V4L2PixelFormat(V4L2_PIX_FMT_SBGGR8),