[V4L] V4L/V4L2 packed YUV format names

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



For the sake of consistency and correctness, I'd like to propose a
couple of changes for the YUV packed modes, and would like to hear if
anyone has any objections.

V4L2
----
Currently has two packed YUV modes:

V4L2_PIX_FMT_YUYV "YUY2"
V4L2_PIX_FMT_UYVY "UYVY"

These are documnented as being 4:2:2 modes, with UYVY only differing
from YUYV in terms of the component ordering. These are therefore well
defined, and correspond to the AVI "FourCC" names I have indicated.

I would like to suggest that V4L2 adds an additional mode:

V4L2_PIX_FMT_Y41P "Y41P"

Which is the 4:1:1 "Y41P" AVI format, otherwise known as the BtYUV
format that the Bt848 can generate (macro pixel component order
UYVYUYVYYYYY).

Additionally, to be explicit (although there can be no confusion about
this), the V4L2 documentation should add that V4L2_PIX_FMT_YUYV
corresponds to the "YUY2" AVI format.

V4L
---
Currently has five packed YUV modes:

VIDEO_PALETTE_YUV422  -> bttv.c YUY2
VIDEO_PALETTE_YUYV    -> bttv.c Y41P
VIDEO_PALETTE_UYVY
VIDEO_PALETTE_YUV420
VIDEO_PALETTE_YUV411

There is no documentation as to what these modes are meant to be, other
than that implied by the names themselves.

The bttv.c driver maps two of these names onto it's YUY2, Y41P
capabilities as indicated (I've tested these - they work), and doesn't
implement the other threee. The YUV422 = YUY2 mapping is reasonable,
although it would be less ambiguous (there are many 4:2:2 modes) if it
was YUYV = YUY2. The YUYV = Y41P (aka BtYUV) mapping is simply wrong!

I'd therefore like to suggest that we change/document the meaning of the
V4L packed YUV formats as follows:

VIDEO_PALETTE_YUV422 "YUY2" (deprecated)
VIDEO_PALETTE_YUYV   "YUY2" (4:2:2)
VIDEO_PALETTE_UYVY   "UYVY" (4:2:2) - not supported by bttv.c
VIDEO_PALETTE_YUV420  ????
VIDEO_PALETTE_YUV411 "Y41P" (4:1:1)

If noone has a problem with this, I'll submit the required table change
for bttv.c. The only potential problem I see would be if any other
drivers have chosen to interpret the ambiguous "YUV411" differently.

Ben

P.S. The definitive format reference is: http://www.webartz.com/fourcc/





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux