Skip to content

Commit 1b8dc32

Browse files
wmanleymchehab
authored andcommitted
[media] uvcvideo: Add GUID for BGR 8:8:8
The Magewell XI100DUSB-HDMI[1] video capture device reports the pixel format "e436eb7d-524f-11ce-9f53-0020af0ba770". This is its GUID for BGR 8:8:8. The UVC 1.5 spec[2] only defines GUIDs for YUY2, NV12, M420 and I420. This seems to be an extension documented in the Microsoft Windows Media Format SDK[3] - or at least the Media Format SDK was the only hit that Google gave when searching for the GUID. This Media Format SDK defines this GUID as corresponding to `MEDIASUBTYPE_RGB24`. Note though, the XI100DUSB outputs BGR e.g. byte-reversed. I don't know if its the capture device in error or Microsoft mean BGR when they say RGB. [1]: http://www.magewell.com/hardware/dongles/xi100dusb-hdmi/xi100dusb-hdmi_features.html?lang=en [2]: http://www.usb.org/developers/docs/devclass_docs/USB_Video_Class_1_5.zip [3]: http://msdn.microsoft.com/en-gb/library/windows/desktop/dd757532(v=vs.85).aspx Signed-off-by: William Manley <will@williammanley.net> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
1 parent 5fb3f55 commit 1b8dc32

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

drivers/media/usb/uvc/uvc_driver.c

+5
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ static struct uvc_format_desc uvc_fmts[] = {
137137
.guid = UVC_GUID_FORMAT_RGBP,
138138
.fcc = V4L2_PIX_FMT_RGB565,
139139
},
140+
{
141+
.name = "BGR 8:8:8 (BGR3)",
142+
.guid = UVC_GUID_FORMAT_BGR3,
143+
.fcc = V4L2_PIX_FMT_BGR24,
144+
},
140145
{
141146
.name = "H.264",
142147
.guid = UVC_GUID_FORMAT_H264,

drivers/media/usb/uvc/uvcvideo.h

+3
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@
109109
#define UVC_GUID_FORMAT_RGBP \
110110
{ 'R', 'G', 'B', 'P', 0x00, 0x00, 0x10, 0x00, \
111111
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
112+
#define UVC_GUID_FORMAT_BGR3 \
113+
{ 0x7d, 0xeb, 0x36, 0xe4, 0x4f, 0x52, 0xce, 0x11, \
114+
0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}
112115
#define UVC_GUID_FORMAT_M420 \
113116
{ 'M', '4', '2', '0', 0x00, 0x00, 0x10, 0x00, \
114117
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}

0 commit comments

Comments
 (0)