Re: [PATCH] [media] uvcvideo: Add GUID for BGR 8:8:8
Hi William, On Thursday 11 December 2014 01:19:50 William Manley wrote: On 10/12/14 23:54, Laurent Pinchart wrote: On Monday 08 December 2014 18:57:58 William Manley wrote: 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. I believe Microsoft defines RGB as BGR. They do at least in BMP (https://en.wikipedia.org/wiki/BMP_file_format), probably because they consider the RGB pixel to be stored in little-endian format. Thanks, that's helpful. Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com I'll apply the patch to my tree and submit it for v3.20. Great Could you please send me the output of 'lsusb -v' for your device, if possible running as root ? lsusb output attached. Thank you. I've updated the supported devices list. -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [media] uvcvideo: Add GUID for BGR 8:8:8
Hi William, Thank you for the patch. On Monday 08 December 2014 18:57:58 William Manley wrote: 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. I believe Microsoft defines RGB as BGR. They do at least in BMP (https://en.wikipedia.org/wiki/BMP_file_format), probably because they consider the RGB pixel to be stored in little-endian format. [1]: http://www.magewell.com/hardware/dongles/xi100dusb-hdmi/xi100dusb-hdmi_feat ures.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).a spx Signed-off-by: William Manley w...@williammanley.net Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com I'll apply the patch to my tree and submit it for v3.20. Could you please send me the output of 'lsusb -v' for your device, if possible running as root ? --- drivers/media/usb/uvc/uvc_driver.c | 5 + drivers/media/usb/uvc/uvcvideo.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c index 7c8322d..dc7cff1 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -138,6 +138,11 @@ static struct uvc_format_desc uvc_fmts[] = { .fcc= V4L2_PIX_FMT_RGB565, }, { + .name = BGR 8:8:8 (BGR3), + .guid = UVC_GUID_FORMAT_BGR3, + .fcc= V4L2_PIX_FMT_BGR24, + }, + { .name = H.264, .guid = UVC_GUID_FORMAT_H264, .fcc= V4L2_PIX_FMT_H264, diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h index 864ada7..ed0210d 100644 --- a/drivers/media/usb/uvc/uvcvideo.h +++ b/drivers/media/usb/uvc/uvcvideo.h @@ -109,6 +109,9 @@ #define UVC_GUID_FORMAT_RGBP \ { 'R', 'G', 'B', 'P', 0x00, 0x00, 0x10, 0x00, \ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} +#define UVC_GUID_FORMAT_BGR3 \ + { 0x7d, 0xeb, 0x36, 0xe4, 0x4f, 0x52, 0xce, 0x11, \ + 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70} #define UVC_GUID_FORMAT_M420 \ { 'M', '4', '2', '0', 0x00, 0x00, 0x10, 0x00, \ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [media] uvcvideo: Add GUID for BGR 8:8:8
On 10/12/14 23:54, Laurent Pinchart wrote: Hi William, Thank you for the patch. On Monday 08 December 2014 18:57:58 William Manley wrote: 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. I believe Microsoft defines RGB as BGR. They do at least in BMP (https://en.wikipedia.org/wiki/BMP_file_format), probably because they consider the RGB pixel to be stored in little-endian format. Thanks, that's helpful. Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com I'll apply the patch to my tree and submit it for v3.20. Great Could you please send me the output of 'lsusb -v' for your device, if possible running as root ? lsusb output attached. Thanks Will Bus 003 Device 002: ID 2935:0001 Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 3.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 ? bDeviceProtocol 1 Interface Association bMaxPacketSize0 9 idVendor 0x2935 idProduct 0x0001 bcdDevice0.00 iManufacturer 1 Magewell iProduct2 XI100DUSB-HDMI iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 2474 bNumInterfaces 5 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 200mA Interface Association: bLength 8 bDescriptorType11 bFirstInterface 0 bInterfaceCount 2 bFunctionClass 14 Video bFunctionSubClass 3 Video Interface Collection bFunctionProtocol 0 iFunction 3 XI100DUSB-HDMI Video Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass14 Video bInterfaceSubClass 1 Video Control bInterfaceProtocol 0 iInterface 3 XI100DUSB-HDMI Video VideoControl Interface Descriptor: bLength13 bDescriptorType36 bDescriptorSubtype 1 (HEADER) bcdUVC 1.00 wTotalLength 52 dwClockFrequency 48.00MHz bInCollection 1 baInterfaceNr( 0) 1 VideoControl Interface Descriptor: bLength18 bDescriptorType36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 1 wTerminalType 0x0201 Camera Sensor bAssocTerminal 0 iTerminal 0 wObjectiveFocalLengthMin 0 wObjectiveFocalLengthMax 0 wOcularFocalLength0 bControlSize 3 bmControls 0x VideoControl Interface Descriptor: bLength12 bDescriptorType36 bDescriptorSubtype 5 (PROCESSING_UNIT) Warning: Descriptor too short bUnitID 2 bSourceID 1 wMaxMultiplier 16384 bControlSize3 bmControls 0x000f Brightness Contrast Hue Saturation iProcessing 0 bmVideoStandards 0x 9 None SECAM - 625/50 VideoControl Interface Descriptor: bLength 9 bDescriptorType36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 3 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bSourceID 2 iTerminal 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes3 Transfer TypeInterrupt Synch Type None Usage Type Data wMaxPacketSize 0x0010 1x 16 bytes bInterval 1 bMaxBurst 0 Interface Descriptor: bLength
[PATCH] [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 w...@williammanley.net --- drivers/media/usb/uvc/uvc_driver.c | 5 + drivers/media/usb/uvc/uvcvideo.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c index 7c8322d..dc7cff1 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -138,6 +138,11 @@ static struct uvc_format_desc uvc_fmts[] = { .fcc= V4L2_PIX_FMT_RGB565, }, { + .name = BGR 8:8:8 (BGR3), + .guid = UVC_GUID_FORMAT_BGR3, + .fcc= V4L2_PIX_FMT_BGR24, + }, + { .name = H.264, .guid = UVC_GUID_FORMAT_H264, .fcc= V4L2_PIX_FMT_H264, diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h index 864ada7..ed0210d 100644 --- a/drivers/media/usb/uvc/uvcvideo.h +++ b/drivers/media/usb/uvc/uvcvideo.h @@ -109,6 +109,9 @@ #define UVC_GUID_FORMAT_RGBP \ { 'R', 'G', 'B', 'P', 0x00, 0x00, 0x10, 0x00, \ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} +#define UVC_GUID_FORMAT_BGR3 \ + { 0x7d, 0xeb, 0x36, 0xe4, 0x4f, 0x52, 0xce, 0x11, \ +0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70} #define UVC_GUID_FORMAT_M420 \ { 'M', '4', '2', '0', 0x00, 0x00, 0x10, 0x00, \ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} -- 2.1.3 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html