]> git.sesse.net Git - vlc/commitdiff
Added I420<->J420 (422/440/444) equivalence in vout_ChromaCmp.
authorLaurent Aimar <fenrir@videolan.org>
Sun, 3 May 2009 17:06:07 +0000 (19:06 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 3 May 2009 17:08:19 +0000 (19:08 +0200)
 It will prevent a useless chroma conversion for the vout using it
(x11/xvideo at least).
 It is not perfect are they are not exactly equal, but in the current
state, I think it is the best workaround.

src/video_output/vout_pictures.c

index 625799db0067d2a3377f134f6d1f7451d0d4cbf4..d0da611c43180080ebb1bfdf89019cfe995a8111 100644 (file)
@@ -956,7 +956,16 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
 int vout_ChromaCmp( vlc_fourcc_t i_chroma, vlc_fourcc_t i_amorhc )
 {
     static const vlc_fourcc_t p_I420[] = {
-        FOURCC_I420, FOURCC_IYUV, FOURCC_YV12, 0
+        FOURCC_I420, FOURCC_IYUV, FOURCC_YV12, FOURCC_J420, 0
+    };
+    static const vlc_fourcc_t p_I422[] = {
+        FOURCC_I422, FOURCC_J422, 0
+    };
+    static const vlc_fourcc_t p_I440[] = {
+        FOURCC_I440, FOURCC_J440, 0
+    };
+    static const vlc_fourcc_t p_I444[] = {
+        FOURCC_I444, FOURCC_J444, 0
     };
     static const vlc_fourcc_t p_UYVY[] = {
         FOURCC_UYVY, FOURCC_UYNV, FOURCC_Y422, 0
@@ -968,7 +977,7 @@ int vout_ChromaCmp( vlc_fourcc_t i_chroma, vlc_fourcc_t i_amorhc )
         FOURCC_GREY, FOURCC_Y800, FOURCC_Y8, 0
     };
     static const vlc_fourcc_t *pp_fcc[] = {
-        p_I420, p_UYVY, p_YUYV, p_GREY, NULL
+        p_I420, p_I422, p_I440, p_I444, p_UYVY, p_YUYV, p_GREY, NULL
     };
 
     /* If they are the same, they are the same ! */