From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: William Manley <will@williammanley.net>
Cc: linux-media@vger.kernel.org, m.chehab@samsung.com
Subject: Re: [PATCH] [media] uvcvideo: Add GUID for BGR 8:8:8
Date: Thu, 11 Dec 2014 01:54:52 +0200 [thread overview]
Message-ID: <1514839.CAtLhmhmvy@avalon> (raw)
In-Reply-To: <1418065078-27791-1-git-send-email-will@williammanley.net>
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 <will@williammanley.net>
Acked-by: Laurent Pinchart <laurent.pinchart@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
next prev parent reply other threads:[~2014-12-10 23:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-08 18:57 [PATCH] [media] uvcvideo: Add GUID for BGR 8:8:8 William Manley
2014-12-10 23:54 ` Laurent Pinchart [this message]
2014-12-11 1:19 ` William Manley
2014-12-18 21:23 ` Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1514839.CAtLhmhmvy@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=m.chehab@samsung.com \
--cc=will@williammanley.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox