]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/deinterlace.c
subdir build fix
[vlc] / modules / video_filter / deinterlace.c
index 3665ed5957fa2555036e9b3553493d0fca872868..23f9ad9b3ddccfd184c442e36f0e19382f273c45 100644 (file)
  * Preamble
  *****************************************************************************/
 #include <errno.h>
-#include <stdlib.h>                                      /* malloc(), free() */
-#include <string.h>
 
 #include <vlc/vlc.h>
-#include <vlc/vout.h>
-#include <vlc/sout.h>
+#include <vlc_vout.h>
+#include <vlc_sout.h>
 #include "vlc_filter.h"
 
 #ifdef HAVE_ALTIVEC_H
@@ -113,13 +111,13 @@ static int FilterCallback ( vlc_object_t *, char const *,
 
 #define FILTER_CFG_PREFIX "sout-deinterlace-"
 
-static char *mode_list[] = { "discard", "blend", "mean", "bob", "linear", "x" };
-static char *mode_list_text[] = { N_("Discard"), N_("Blend"), N_("Mean"),
+static const char *mode_list[] = { "discard", "blend", "mean", "bob", "linear", "x" };
+static const char *mode_list_text[] = { N_("Discard"), N_("Blend"), N_("Mean"),
                                   N_("Bob"), N_("Linear"), "X" };
 
 vlc_module_begin();
     set_description( _("Deinterlacing video filter") );
-    set_shortname( N_("Deinterlace" ));
+    set_shortname( _("Deinterlace" ));
     set_capability( "video filter", 0 );
     set_category( CAT_VIDEO );
     set_subcategory( SUBCAT_VIDEO_VFILTER );
@@ -207,7 +205,7 @@ static int Create( vlc_object_t *p_this )
     vlc_mutex_init( p_vout, &p_vout->p_sys->filter_lock );
 
 #if defined(CAN_COMPILE_C_ALTIVEC)
-    if( p_vout->p_libvlc_global->i_cpu & CPU_CAPABILITY_ALTIVEC )
+    if( vlc_CPU() & CPU_CAPABILITY_ALTIVEC )
     {
         p_vout->p_sys->pf_merge = MergeAltivec;
         p_vout->p_sys->pf_end_merge = NULL;
@@ -215,7 +213,7 @@ static int Create( vlc_object_t *p_this )
     else
 #endif
 #if defined(CAN_COMPILE_SSE)
-    if( p_vout->p_libvlc_global->i_cpu & CPU_CAPABILITY_SSE2 )
+    if( vlc_CPU() & CPU_CAPABILITY_SSE2 )
     {
         p_vout->p_sys->pf_merge = MergeSSE2;
         p_vout->p_sys->pf_end_merge = EndMMX;
@@ -223,7 +221,7 @@ static int Create( vlc_object_t *p_this )
     else
 #endif
 #if defined(CAN_COMPILE_MMXEXT)
-    if( p_vout->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMXEXT )
+    if( vlc_CPU() & CPU_CAPABILITY_MMXEXT )
     {
         p_vout->p_sys->pf_merge = MergeMMXEXT;
         p_vout->p_sys->pf_end_merge = EndMMX;
@@ -231,7 +229,7 @@ static int Create( vlc_object_t *p_this )
     else
 #endif
 #if defined(CAN_COMPILE_3DNOW)
-    if( p_vout->p_libvlc_global->i_cpu & CPU_CAPABILITY_3DNOW )
+    if( vlc_CPU() & CPU_CAPABILITY_3DNOW )
     {
         p_vout->p_sys->pf_merge = Merge3DNow;
         p_vout->p_sys->pf_end_merge = End3DNow;
@@ -369,7 +367,8 @@ static int Init( vout_thread_t *p_vout )
 static vout_thread_t *SpawnRealVout( vout_thread_t *p_vout )
 {
     vout_thread_t *p_real_vout = NULL;
-    video_format_t fmt = {0};
+    video_format_t fmt;
+    memset( &fmt, 0, sizeof( video_format_t ) );
 
     msg_Dbg( p_vout, "spawning the real video output" );
 
@@ -1964,7 +1963,7 @@ static void RenderX( vout_thread_t *p_vout,
             uint8_t *src = &p_pic->p[i_plane].p_pixels[8*y*i_src];
 
 #ifdef CAN_COMPILE_MMXEXT
-            if( p_vout->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMXEXT )
+            if( vlc_CPU() & CPU_CAPABILITY_MMXEXT )
                 XDeintBand8x8MMXEXT( dst, i_dst, src, i_src, i_mbx, i_modx );
             else
 #endif
@@ -1991,7 +1990,7 @@ static void RenderX( vout_thread_t *p_vout,
     }
 
 #ifdef CAN_COMPILE_MMXEXT
-    if( p_vout->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMXEXT )
+    if( vlc_CPU() & CPU_CAPABILITY_MMXEXT )
         emms();
 #endif
 }