]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/swscale.c
macosx: fix copy/paste error
[vlc] / modules / video_filter / swscale.c
index 3cc5236ac6227409dade3b21093c7f007efe5f6f..67a4eb90d95f135243bde9dd1397b0f162165d42 100644 (file)
 
 #ifdef HAVE_LIBSWSCALE_SWSCALE_H
 #   include <libswscale/swscale.h>
+#   include <libavcodec/avcodec.h>
 #elif defined(HAVE_FFMPEG_SWSCALE_H)
 #   include <ffmpeg/swscale.h>
+#   include <ffmpeg/avcodec.h>
 #endif
 
 /* Gruikkkkkkkkkk!!!!! */
-#include "../codec/avcodec/chroma.h"
+#include "../codec/avcodec/avcodec.h"
+#undef AVPALETTE_SIZE
 
 #define AVPALETTE_SIZE (256 * sizeof(uint32_t))
 
@@ -61,15 +64,16 @@ const char *const ppsz_mode_descriptions[] =
   N_("Area"), N_("Luma bicubic / chroma bilinear"), N_("Gauss"),
   N_("SincR"), N_("Lanczos"), N_("Bicubic spline") };
 
-vlc_module_begin();
-    set_description( N_("Video scaling filter") );
-    set_capability( "video filter2", 150 );
-    set_category( CAT_VIDEO );
-    set_subcategory( SUBCAT_VIDEO_VFILTER );
-    set_callbacks( OpenScaler, CloseScaler );
-    add_integer( "swscale-mode", 2, NULL, SCALEMODE_TEXT, SCALEMODE_LONGTEXT, true );
-        change_integer_list( pi_mode_values, ppsz_mode_descriptions, NULL );
-vlc_module_end();
+vlc_module_begin ()
+    set_description( N_("Video scaling filter") )
+    set_shortname( N_("Swscale" ) )
+    set_capability( "video filter2", 150 )
+    set_category( CAT_VIDEO )
+    set_subcategory( SUBCAT_VIDEO_VFILTER )
+    set_callbacks( OpenScaler, CloseScaler )
+    add_integer( "swscale-mode", 2, NULL, SCALEMODE_TEXT, SCALEMODE_LONGTEXT, true )
+        change_integer_list( pi_mode_values, ppsz_mode_descriptions, NULL )
+vlc_module_end ()
 
 /* Version checking */
 #if LIBSWSCALE_VERSION_INT >= ((0<<16)+(5<<8)+0)
@@ -142,10 +146,6 @@ static int OpenScaler( vlc_object_t *p_this )
 
     int i_sws_mode;
 
-    float sws_lum_gblur = 0.0, sws_chr_gblur = 0.0;
-    int sws_chr_vshift = 0, sws_chr_hshift = 0;
-    float sws_chr_sharpen = 0.0, sws_lum_sharpen = 0.0;
-
     if( GetParameters( NULL,
                        &p_filter->fmt_in.video,
                        &p_filter->fmt_out.video, 0 ) )
@@ -181,10 +181,7 @@ static int OpenScaler( vlc_object_t *p_this )
     default: p_sys->i_sws_flags = SWS_BICUBIC; i_sws_mode = 2; break;
     }
 
-    p_sys->p_src_filter =
-        sws_getDefaultFilter( sws_lum_gblur, sws_chr_gblur,
-                              sws_lum_sharpen, sws_chr_sharpen,
-                              sws_chr_hshift, sws_chr_vshift, 0 );
+    p_sys->p_src_filter = NULL;
     p_sys->p_dst_filter = NULL;
 
     /* Misc init */
@@ -310,7 +307,7 @@ static int GetParameters( ScalerConfiguration *p_cfg,
         p_cfg->i_fmto = i_fmto;
         p_cfg->b_has_a = b_has_ai && b_has_ao;
         p_cfg->b_add_a = (!b_has_ai) && b_has_ao;
-        p_cfg->b_copy = i_fmti == i_fmto && p_fmti->i_width == p_fmto->i_width && p_fmti->i_width && p_fmto->i_height;
+        p_cfg->b_copy = i_fmti == i_fmto && p_fmti->i_width == p_fmto->i_width && p_fmti->i_height == p_fmto->i_height;
         p_cfg->i_sws_flags = i_sws_flags;
     }