[media] uvcvideo: Add bayer 8-bit patterns to uvcvideo
authorEdgar Thier <info@edgarthier.net>
Thu, 20 Feb 2014 07:12:51 +0000 (04:12 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 5 Mar 2014 19:58:21 +0000 (16:58 -0300)
Add bayer 8-bit GUIDs to uvcvideo and associated them with the
corresponding V4L2 pixel formats.

Signed-off-by: Edgar Thier <info@edgarthier.net>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/uvc/uvc_driver.c
drivers/media/usb/uvc/uvcvideo.h

index b6cac17c238eb8d1f71d1184d92cfb84a6945e42..ad47c5cb539a6f56ce070180079267711c375df3 100644 (file)
@@ -108,10 +108,30 @@ static struct uvc_format_desc uvc_fmts[] = {
                .fcc            = V4L2_PIX_FMT_Y16,
        },
        {
-               .name           = "RGB Bayer",
+               .name           = "BGGR Bayer (BY8 )",
                .guid           = UVC_GUID_FORMAT_BY8,
                .fcc            = V4L2_PIX_FMT_SBGGR8,
        },
+       {
+               .name           = "BGGR Bayer (BA81)",
+               .guid           = UVC_GUID_FORMAT_BA81,
+               .fcc            = V4L2_PIX_FMT_SBGGR8,
+       },
+       {
+               .name           = "GBRG Bayer (GBRG)",
+               .guid           = UVC_GUID_FORMAT_GBRG,
+               .fcc            = V4L2_PIX_FMT_SGBRG8,
+       },
+       {
+               .name           = "GRBG Bayer (GRBG)",
+               .guid           = UVC_GUID_FORMAT_GRBG,
+               .fcc            = V4L2_PIX_FMT_SGRBG8,
+       },
+       {
+               .name           = "RGGB Bayer (RGGB)",
+               .guid           = UVC_GUID_FORMAT_RGGB,
+               .fcc            = V4L2_PIX_FMT_SRGGB8,
+       },
        {
                .name           = "RGB565",
                .guid           = UVC_GUID_FORMAT_RGBP,
index 143d5e51cb9633f432233fa37847d3c89b6b0cbf..b1f69a6d4068f1c64aec057142efcf02b9b6f82e 100644 (file)
 #define UVC_GUID_FORMAT_BY8 \
        { 'B',  'Y',  '8',  ' ', 0x00, 0x00, 0x10, 0x00, \
         0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+#define UVC_GUID_FORMAT_BA81 \
+       { 'B',  'A',  '8',  '1', 0x00, 0x00, 0x10, 0x00, \
+        0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+#define UVC_GUID_FORMAT_GBRG \
+       { 'G',  'B',  'R',  'G', 0x00, 0x00, 0x10, 0x00, \
+        0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+#define UVC_GUID_FORMAT_GRBG \
+       { 'G',  'R',  'B',  'G', 0x00, 0x00, 0x10, 0x00, \
+        0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+#define UVC_GUID_FORMAT_RGGB \
+       { 'R',  'G',  'G',  'B', 0x00, 0x00, 0x10, 0x00, \
+        0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
 #define UVC_GUID_FORMAT_RGBP \
        { 'R',  'G',  'B',  'P', 0x00, 0x00, 0x10, 0x00, \
         0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}