Re: [PATCH] media: uvcvideo: Add GUID for BGRA/X 8:8:8:8

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/13/23 00:15, Laurent Pinchart wrote:
Hi Marek,

Hi,

Thank you for the patch.

On Tue, Jan 10, 2023 at 08:53:31PM +0100, Marek Vasut wrote:
The Cypress EZUSB FX3 UVC example can be configured to report pixel
format "e436eb7e-524f-11ce-9f53-0020af0ba770". This is its GUID for
BGRA/X 8:8:8:8.

The UVC 1.5 spec [1] only defines GUIDs for YUY2, NV12, M420 and I420.
This seems to be an extension documented in the Microsoft Windows Media
Format SDK[2]. This Media Format SDK defines this GUID as corresponding
to `MEDIASUBTYPE_RGB32`.

Note that in my case, the FX3 UVC can output either channel order,
BGR or RGB or any other mix for that matter. Since Linux commit
1b8dc32286a1a ("[media] uvcvideo: Add GUID for BGR 8:8:8")
defined a GUID for `MEDIASUBTYPE_RGB24` channel order as BGR, keep
this change consistent and define `MEDIASUBTYPE_RGB32` as BGR as well.

I'd like to see documentation of the MEDIASUBTYPE_RGB32 format that
indicates the components order precisely. While there's a high chance it
maps to a BGR (in the V4L2 nomenclature) format, there would still be
two different options for the A or X component.

Maybe this ?

https://github.com/MicrosoftDocs/win32/blob/docs/desktop-src/DirectShow/uncompressed-rgb-video-subtypes.md

"
Remarks
...
For RGB 32, every pixel is an RGBQUAD. Each color is one byte, with a value from 0 to 255, inclusive. The memory layout is:
Byte    0       1       2       3
Value   Blue    Green   Red     Alpha or Don't Care
"

Maps to

drivers/media/v4l2-core/v4l2-ioctl.c: case V4L2_PIX_FMT_BGR32: descr = "32-bit BGRA/X 8-8-8-8"; break;




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux