Commit ca47e719 authored by Stefan Muenzel's avatar Stefan Muenzel Committed by Mauro Carvalho Chehab

[media] uvcvideo: Support 10bit, 12bit and alternate 8bit greyscale formats

The SPCAM SP620U camera uses the alternate "Y8  " GUID for the 8-bit
greyscale format, and supports a 12-bit greyscale format. Add support
for those in the driver, as well as for 10-bit greyscale formats.
Signed-off-by: default avatarStefan Muenzel <stefanmuenzel@googlemail.com>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 6fd90db8
...@@ -95,12 +95,27 @@ static struct uvc_format_desc uvc_fmts[] = { ...@@ -95,12 +95,27 @@ static struct uvc_format_desc uvc_fmts[] = {
.fcc = V4L2_PIX_FMT_UYVY, .fcc = V4L2_PIX_FMT_UYVY,
}, },
{ {
.name = "Greyscale (8-bit)", .name = "Greyscale 8-bit (Y800)",
.guid = UVC_GUID_FORMAT_Y800, .guid = UVC_GUID_FORMAT_Y800,
.fcc = V4L2_PIX_FMT_GREY, .fcc = V4L2_PIX_FMT_GREY,
}, },
{ {
.name = "Greyscale (16-bit)", .name = "Greyscale 8-bit (Y8 )",
.guid = UVC_GUID_FORMAT_Y8,
.fcc = V4L2_PIX_FMT_GREY,
},
{
.name = "Greyscale 10-bit (Y10 )",
.guid = UVC_GUID_FORMAT_Y10,
.fcc = V4L2_PIX_FMT_Y10,
},
{
.name = "Greyscale 12-bit (Y12 )",
.guid = UVC_GUID_FORMAT_Y12,
.fcc = V4L2_PIX_FMT_Y12,
},
{
.name = "Greyscale 16-bit (Y16 )",
.guid = UVC_GUID_FORMAT_Y16, .guid = UVC_GUID_FORMAT_Y16,
.fcc = V4L2_PIX_FMT_Y16, .fcc = V4L2_PIX_FMT_Y16,
}, },
......
...@@ -79,6 +79,15 @@ ...@@ -79,6 +79,15 @@
#define UVC_GUID_FORMAT_Y800 \ #define UVC_GUID_FORMAT_Y800 \
{ 'Y', '8', '0', '0', 0x00, 0x00, 0x10, 0x00, \ { 'Y', '8', '0', '0', 0x00, 0x00, 0x10, 0x00, \
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
#define UVC_GUID_FORMAT_Y8 \
{ 'Y', '8', ' ', ' ', 0x00, 0x00, 0x10, 0x00, \
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
#define UVC_GUID_FORMAT_Y10 \
{ 'Y', '1', '0', ' ', 0x00, 0x00, 0x10, 0x00, \
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
#define UVC_GUID_FORMAT_Y12 \
{ 'Y', '1', '2', ' ', 0x00, 0x00, 0x10, 0x00, \
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
#define UVC_GUID_FORMAT_Y16 \ #define UVC_GUID_FORMAT_Y16 \
{ 'Y', '1', '6', ' ', 0x00, 0x00, 0x10, 0x00, \ { 'Y', '1', '6', ' ', 0x00, 0x00, 0x10, 0x00, \
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment