[vlc-devel] commit: This can work on all the planar YUV formats. (Antoine Cellerier )

git version control git at videolan.org
Sat May 31 17:18:03 CEST 2008


vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Sat May 31 17:04:01 2008 +0200| [0c6b8c406c486d06087dfe7a470174dc8cbe83ad]

This can work on all the planar YUV formats.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0c6b8c406c486d06087dfe7a470174dc8cbe83ad
---

 modules/video_filter/colorthres.c |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/modules/video_filter/colorthres.c b/modules/video_filter/colorthres.c
index 5092ce7..07c3279 100644
--- a/modules/video_filter/colorthres.c
+++ b/modules/video_filter/colorthres.c
@@ -37,6 +37,7 @@
 #include <vlc_vout.h>
 
 #include "vlc_filter.h"
+#include "filter_picture.h"
 
 /*****************************************************************************
  * Local prototypes
@@ -98,18 +99,15 @@ static int Create( vlc_object_t *p_this )
 {
     filter_t *p_filter = (filter_t *)p_this;
 
-    /* XXX: we might need to add/remove some FOURCCs ... */
-    if(   p_filter->fmt_in.video.i_chroma != VLC_FOURCC('I','4','2','0')
-       && p_filter->fmt_in.video.i_chroma != VLC_FOURCC('I','Y','U','V')
-       && p_filter->fmt_in.video.i_chroma != VLC_FOURCC('J','4','2','0')
-       && p_filter->fmt_in.video.i_chroma != VLC_FOURCC('Y','V','1','2')
-
-       && p_filter->fmt_in.video.i_chroma != VLC_FOURCC('I','4','2','2')
-       && p_filter->fmt_in.video.i_chroma != VLC_FOURCC('J','4','2','2') )
+    switch( p_filter->fmt_in.video.i_chroma )
     {
-        msg_Err( p_filter, "Unsupported input chroma (%4s)",
-                 (char*)&(p_filter->fmt_in.video.i_chroma) );
-        return VLC_EGENERIC;
+        CASE_PLANAR_YUV
+            break;
+
+        default:
+            msg_Err( p_filter, "Unsupported input chroma (%4s)",
+                     (char*)&(p_filter->fmt_in.video.i_chroma) );
+            return VLC_EGENERIC;
     }
 
     if( p_filter->fmt_in.video.i_chroma != p_filter->fmt_out.video.i_chroma )




More information about the vlc-devel mailing list