Re: API.html bug? (VIDEO_PALETTE YUV names again)

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



FUKUCHI Kentarou wrote:
> 
> Hi all,
> 
> V4L Kernel API reference (/usr/src/linux/Documentation/video4linux/API.html)
> claims that VIDEO_PALETTE_YUV422 is a format that packs YUV values into 8 bits.
> But bttv-driver maps YUV422 to BT848_COLOR_FMT_YUY2, and thats format is
> different from the description of API reference.
> 
> Why? In which way should I implement v4l driver?

IMO you should follow bttv to avoid breaking applications, but we should
deprecate the bad V4L_PALETTE names (the two below) and replace them
with correct ones.

There are two packed YUV formats whose V4L names are wrong:

VIDEO_PALETTE_YUV422 --> bttv YUY2
VIDEO_PALETTE_YUYV   --> bttv Y41P

VIDEO_PALETTE_YUV422 as a name is ambiguous as there are many possible
4:2:2 planar Y,U.V component orderings (and of course they're all 16
bpp, as 4:2:2 implies). YUY2 is only one of the possible 4:2:2 formats
(which, adding to the confusion, has component order Y,U,Y,V!),

VIDEO_PALETTE_YUYV as a mapping to Y41P is obviously wrong, but that's
the way bttv has always been, and AFAIK this is a Bt848 only mode anyway
(although other drivers could create it in software, I guess).

So... I'd recomment you follow bttv, but that we should also introduce
synonyms VIDEO_PALETTE_YUY2 and VIDEO_PALETTE_Y41P and deprecate the old
names. I believe V4L2 already uses these names (or at least
non-ambiguous ones that make sense).

Ben





[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