[vlc-devel] Re: Fwd: YUY2 support in V4L

Derk-Jan Hartman hartman at videolan.org
Thu Nov 30 22:53:27 CET 2006


On 30-nov-2006, at 20:12, Mario Rossi wrote:
>> > 2) in the table v4lchroma_to_fourcc I think the pair
>> > VIDEO_PALETTE_YUV422 <-> I422
>> > should be
>> > VIDEO_PALETTE_YUV422 <-> YUY2
>> Yes I agree with this.
>> I sent a patch for this a while ago with no response.
>> http://www.via.ecp.fr/via/ml/vlc-devel/2006-10/msg00098.html

Looks reasonable. Doesn't seem to be a planar format at least.

> Indeed, i was just collecting all suggestions for v4l.c in one patch.
>>
>> > 3) in the same table the fourcc associated to VIDEO_PALETTE_YUYV
>> > (fourcc YUYV)
>> > VIDEO_PALETTE_YUYV <-> YUYV
>> > is apparently unknown to VLC (vout_initPicture does not know  
>> anything
>> > about it) ending in the error "unsupported chroma". but it seems  
>> it is
>> > equivalent to YUY2.
>> > So I thought to change it to
>> > VIDEO_PALETTE_YUYV <-> YUY2.
>> > instead of adding support for YUYV everywhere.
>> Not sure about that. Won't that affect other apps?
>
> according to Mauro
>
> https://www.redhat.com/mailman/private/video4linux-list/2006- 
> November/msg00721.html
>
> VIDEO_PALETTE_YUV422 and VIDEO_PALETTE_YUYV are just the same, so I
> think they should have the same fourcc.

Why not do the following, just to be on the safe side:

Index: modules/access/v4l.c
===================================================================
--- modules/access/v4l.c        (revision 18176)
+++ modules/access/v4l.c        (working copy)
@@ -237,7 +237,9 @@
      { VIDEO_PALETTE_RGB555, VLC_FOURCC( 'R', 'V', '1', '5' ) },
      { VIDEO_PALETTE_RGB24, VLC_FOURCC( 'R', 'V', '2', '4' ) },
      { VIDEO_PALETTE_RGB32, VLC_FOURCC( 'R', 'V', '3', '2' ) },
-    { VIDEO_PALETTE_YUV422, VLC_FOURCC( 'I', '4', '2', '2' ) },
+    { VIDEO_PALETTE_YUV422, VLC_FOURCC( 'Y', 'U', 'Y', '2' ) },
+    { VIDEO_PALETTE_YUV422, VLC_FOURCC( 'Y', 'U', 'Y', 'V' ) },
+    { VIDEO_PALETTE_YUYV, VLC_FOURCC( 'Y', 'U', 'Y', '2' ) },
      { VIDEO_PALETTE_YUYV, VLC_FOURCC( 'Y', 'U', 'Y', 'V' ) },
      { VIDEO_PALETTE_UYVY, VLC_FOURCC( 'U', 'Y', 'V', 'Y' ) },
      { VIDEO_PALETTE_YUV420, VLC_FOURCC( 'I', '4', '2', 'N' ) },

pathes applied

DJ

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list