Use separate capabilities for video filters and converters
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 12 Dec 2016 18:39:32 +0000 (20:39 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 12 Dec 2016 18:51:54 +0000 (20:51 +0200)
26 files changed:
modules/arm_neon/chroma_yuv.c
modules/arm_neon/yuv_rgb.c
modules/codec/avcodec/d3d11va.c
modules/codec/avcodec/dxva2.c
modules/hw/vdpau/chroma.c
modules/video_chroma/chain.c
modules/video_chroma/cvpx_i420.c
modules/video_chroma/d3d11_surface.c
modules/video_chroma/dxa9.c
modules/video_chroma/grey_yuv.c
modules/video_chroma/i420_10_p010.c
modules/video_chroma/i420_nv12.c
modules/video_chroma/i420_rgb.c
modules/video_chroma/i420_yuy2.c
modules/video_chroma/i422_i420.c
modules/video_chroma/i422_yuy2.c
modules/video_chroma/omxdl.c
modules/video_chroma/rv32.c
modules/video_chroma/swscale.c
modules/video_chroma/yuvp.c
modules/video_chroma/yuy2_i420.c
modules/video_chroma/yuy2_i422.c
modules/video_filter/scale.c
src/misc/filter_chain.c
src/misc/image.c
src/video_output/vout_subpictures.c

index b8f0e2e..f790770 100644 (file)
@@ -33,7 +33,7 @@ static int Open (vlc_object_t *);
 
 vlc_module_begin ()
     set_description (N_("ARM NEON video chroma conversions"))
-    set_capability ("video filter", 250)
+    set_capability ("video converter", 250)
     set_callbacks (Open, NULL)
 vlc_module_end ()
 
index ee382f1..d710d30 100644 (file)
@@ -34,7 +34,7 @@ static int Open (vlc_object_t *);
 
 vlc_module_begin ()
     set_description (N_("ARM NEON video chroma YUV->RGBA"))
-    set_capability ("video filter", 250)
+    set_capability ("video converter", 250)
     set_callbacks (Open, NULL)
 vlc_module_end ()
 
index e7ffbb0..b139b8a 100644 (file)
@@ -233,11 +233,11 @@ static filter_t *CreateFilter( vlc_object_t *p_this, const es_format_t *p_fmt_in
     es_format_InitFromVideo( &p_filter->fmt_out, &p_fmt_in->video );
     p_filter->fmt_in.i_codec  = p_filter->fmt_in.video.i_chroma  = src_chroma;
     p_filter->fmt_out.i_codec = p_filter->fmt_out.video.i_chroma = fmt_out;
-    p_filter->p_module = module_need( p_filter, "video filter", NULL, false );
+    p_filter->p_module = module_need( p_filter, "video converter", NULL, false );
 
     if( !p_filter->p_module )
     {
-        msg_Dbg( p_filter, "no video filter found" );
+        msg_Dbg( p_filter, "no video converter found" );
         DeleteFilter( p_filter );
         return NULL;
     }
index 2b6a1fc..d609ce0 100644 (file)
@@ -203,11 +203,11 @@ static filter_t *CreateFilter( vlc_object_t *p_this, const es_format_t *p_fmt_in
     es_format_InitFromVideo( &p_filter->fmt_out, &p_fmt_in->video );
     p_filter->fmt_in.i_codec  = p_filter->fmt_in.video.i_chroma  = src_chroma;
     p_filter->fmt_out.i_codec = p_filter->fmt_out.video.i_chroma = fmt_out;
-    p_filter->p_module = module_need( p_filter, "video filter", NULL, false );
+    p_filter->p_module = module_need( p_filter, "video converter", NULL, false );
 
     if( !p_filter->p_module )
     {
-        msg_Dbg( p_filter, "no video filter found" );
+        msg_Dbg( p_filter, "no video converter found" );
         DeleteFilter( p_filter );
         return NULL;
     }
index 5d76541..ae0d3eb 100644 (file)
@@ -810,7 +810,7 @@ static const char *const algo_names[] = {
 vlc_module_begin()
     set_shortname(N_("VDPAU"))
     set_description(N_("VDPAU surface conversions"))
-    set_capability("video filter", 10)
+    set_capability("video converter", 10)
     set_category(CAT_VIDEO)
     set_subcategory(SUBCAT_VIDEO_VFILTER)
     set_callbacks(OutputOpen, OutputClose)
index 55623e2..198c88e 100644 (file)
@@ -42,7 +42,7 @@ static void      Destroy    ( vlc_object_t * );
 
 vlc_module_begin ()
     set_description( N_("Video filtering using a chain of video filter modules") )
-    set_capability( "video filter", 1 )
+    set_capability( "video converter", 1 )
     set_callbacks( Activate, Destroy )
 vlc_module_end ()
 
index 1abff9d..26e8c2e 100644 (file)
@@ -44,7 +44,7 @@ static picture_t *CVPX_I420_Filter( filter_t *, picture_t * );
 
 vlc_module_begin ()
 set_description( N_("Conversions from CoreVideo buffers to I420") )
-set_capability( "video filter", 10 )
+set_capability( "video converter", 10 )
 set_callbacks( Activate, NULL )
 vlc_module_end ()
 
index f4a27a8..92c1fe7 100644 (file)
@@ -44,7 +44,7 @@ static void CloseConverter( vlc_object_t * );
  *****************************************************************************/
 vlc_module_begin ()
     set_description( N_("Conversions from D3D11 to YUV") )
-    set_capability( "video filter", 10 )
+    set_capability( "video converter", 10 )
     set_callbacks( OpenConverter, CloseConverter )
 vlc_module_end ()
 
index ddaa379..6a41545 100644 (file)
@@ -44,7 +44,7 @@ static void CloseConverter( vlc_object_t * );
  *****************************************************************************/
 vlc_module_begin ()
     set_description( N_("Conversions from DxVA2 to YUV") )
-    set_capability( "video filter", 10 )
+    set_capability( "video converter", 10 )
     set_callbacks( OpenConverter, CloseConverter )
 vlc_module_end ()
 
index 0d522d4..b6ca084 100644 (file)
@@ -53,7 +53,7 @@ static picture_t *GREY_YUY2_Filter( filter_t *, picture_t * );
  *****************************************************************************/
 vlc_module_begin ()
     set_description( N_("Conversions from " SRC_FOURCC " to " DEST_FOURCC) )
-    set_capability( "video filter", 80 )
+    set_capability( "video converter", 80 )
     set_callbacks( Activate, NULL )
 vlc_module_end ()
 
index f73c4d5..33768bc 100644 (file)
@@ -128,6 +128,6 @@ static void I420_10_P010( filter_t *p_filter, picture_t *p_src,
  *****************************************************************************/
 vlc_module_begin ()
     set_description( N_("YUV 10-bits planar to semiplanar 10-bits conversions") )
-    set_capability( "video filter", 160 )
+    set_capability( "video converter", 160 )
     set_callbacks( Create, Delete )
 vlc_module_end ()
index 996b372..19bfb1c 100644 (file)
@@ -160,6 +160,6 @@ static void YV12_NV12( filter_t *p_filter, picture_t *p_src,
  *****************************************************************************/
 vlc_module_begin ()
     set_description( N_("YUV planar to semiplanar conversions") )
-    set_capability( "video filter", 160 )
+    set_capability( "video converter", 160 )
     set_callbacks( Create, Delete )
 vlc_module_end ()
index 515cbf4..a1942e3 100644 (file)
@@ -78,7 +78,7 @@ vlc_module_begin ()
 #if defined (SSE2)
     set_description( N_( "SSE2 I420,IYUV,YV12 to "
                         "RV15,RV16,RV24,RV32 conversions") )
-    set_capability( "video filter", 120 )
+    set_capability( "video converter", 120 )
 # define vlc_CPU_capable() vlc_CPU_SSE2()
 #elif defined (MMX)
     set_description( N_( "MMX I420,IYUV,YV12 to "
index cf3b8fb..3fd5e2c 100644 (file)
@@ -90,20 +90,20 @@ static const uint64_t i_80w   = 0x0000000080808080ULL;
 vlc_module_begin ()
 #if defined (MODULE_NAME_IS_i420_yuy2)
     set_description( N_("Conversions from " SRC_FOURCC " to " DEST_FOURCC) )
-    set_capability( "video filter", 80 )
+    set_capability( "video converter", 80 )
 # define vlc_CPU_capable() (true)
 #elif defined (MODULE_NAME_IS_i420_yuy2_mmx)
     set_description( N_("MMX conversions from " SRC_FOURCC " to " DEST_FOURCC) )
-    set_capability( "video filter", 160 )
+    set_capability( "video converter", 160 )
 # define vlc_CPU_capable() vlc_CPU_MMX()
 #elif defined (MODULE_NAME_IS_i420_yuy2_sse2)
     set_description( N_("SSE2 conversions from " SRC_FOURCC " to " DEST_FOURCC) )
-    set_capability( "video filter", 250 )
+    set_capability( "video converter", 250 )
 # define vlc_CPU_capable() vlc_CPU_SSE2()
 #elif defined (MODULE_NAME_IS_i420_yuy2_altivec)
     set_description(
             _("AltiVec conversions from " SRC_FOURCC " to " DEST_FOURCC) );
-    set_capability( "video filter", 250 )
+    set_capability( "video converter", 250 )
 # define vlc_CPU_capable() vlc_CPU_ALTIVEC()
 #endif
     set_callbacks( Activate, NULL )
index 28912b8..5993098 100644 (file)
@@ -55,7 +55,7 @@ static picture_t *I422_YUVA_Filter( filter_t *, picture_t * );
  *****************************************************************************/
 vlc_module_begin ()
     set_description( N_("Conversions from " SRC_FOURCC " to " DEST_FOURCC) )
-    set_capability( "video filter", 60 )
+    set_capability( "video converter", 60 )
     set_callbacks( Activate, NULL )
 vlc_module_end ()
 
index 9ca5e78..f71c942 100644 (file)
@@ -69,17 +69,17 @@ static picture_t *I422_Y211_Filter  ( filter_t *, picture_t * );
 vlc_module_begin ()
 #if defined (MODULE_NAME_IS_i422_yuy2)
     set_description( N_("Conversions from " SRC_FOURCC " to " DEST_FOURCC) )
-    set_capability( "video filter", 80 )
+    set_capability( "video converter", 80 )
 # define vlc_CPU_capable() (true)
 # define VLC_TARGET
 #elif defined (MODULE_NAME_IS_i422_yuy2_mmx)
     set_description( N_("MMX conversions from " SRC_FOURCC " to " DEST_FOURCC) )
-    set_capability( "video filter", 100 )
+    set_capability( "video converter", 100 )
 # define vlc_CPU_capable() vlc_CPU_MMX()
 # define VLC_TARGET VLC_MMX
 #elif defined (MODULE_NAME_IS_i422_yuy2_sse2)
     set_description( N_("SSE2 conversions from " SRC_FOURCC " to " DEST_FOURCC) )
-    set_capability( "video filter", 120 )
+    set_capability( "video converter", 120 )
 # define vlc_CPU_capable() vlc_CPU_SSE2()
 # define VLC_TARGET VLC_SSE
 #endif
index 5964551..f590290 100644 (file)
@@ -34,7 +34,7 @@ static int OpenScaler (vlc_object_t *);
 
 vlc_module_begin ()
     set_description (N_("OpenMAX DL image processing"))
-    set_capability ("video filter", 90)
+    set_capability ("video converter", 90)
     set_callbacks (Open, NULL)
 vlc_module_end ()
 
index 5b8e315..cd8eaa4 100644 (file)
@@ -44,7 +44,7 @@ static picture_t *Filter( filter_t *, picture_t * );
  *****************************************************************************/
 vlc_module_begin ()
     set_description( N_("RV32 conversion filter") )
-    set_capability( "video filter", 1 )
+    set_capability( "video converter", 1 )
     set_callbacks( OpenFilter, NULL )
 vlc_module_end ()
 
index 1741eef..bacb157 100644 (file)
@@ -68,7 +68,7 @@ const char *const ppsz_mode_descriptions[] =
 vlc_module_begin ()
     set_description( N_("Video scaling filter") )
     set_shortname( N_("Swscale" ) )
-    set_capability( "video filter", 150 )
+    set_capability( "video converter", 150 )
     set_category( CAT_VIDEO )
     set_subcategory( SUBCAT_VIDEO_VFILTER )
     set_callbacks( OpenScaler, CloseScaler )
index a48322a..cecb13d 100644 (file)
@@ -46,7 +46,7 @@ static void Close( vlc_object_t * );
 
 vlc_module_begin ()
     set_description( N_("YUVP converter") )
-    set_capability( "video filter", 10 )
+    set_capability( "video converter", 10 )
     set_callbacks( Open, Close )
 vlc_module_end ()
 
index 40c548b..20df9cb 100644 (file)
@@ -55,7 +55,7 @@ static picture_t *UYVY_I420_Filter    ( filter_t *, picture_t * );
  *****************************************************************************/
 vlc_module_begin ()
     set_description( N_("Conversions from " SRC_FOURCC " to " DEST_FOURCC) )
-    set_capability( "video filter", 80 )
+    set_capability( "video converter", 80 )
     set_callbacks( Activate, NULL )
 vlc_module_end ()
 
index 524b489..169e431 100644 (file)
@@ -54,7 +54,7 @@ static picture_t *UYVY_I422_Filter    ( filter_t *, picture_t * );
  *****************************************************************************/
 vlc_module_begin ()
     set_description( N_("Conversions from " SRC_FOURCC " to " DEST_FOURCC) )
-    set_capability( "video filter", 80 )
+    set_capability( "video converter", 80 )
     set_callbacks( Activate, NULL )
 vlc_module_end ()
 
index 9156bc9..003369e 100644 (file)
@@ -46,7 +46,7 @@ static picture_t *Filter( filter_t *, picture_t * );
  *****************************************************************************/
 vlc_module_begin ()
     set_description( N_("Video scaling filter") )
-    set_capability( "video filter", 10 )
+    set_capability( "video converter", 10 )
     set_callbacks( OpenFilter, NULL )
 vlc_module_end ()
 
@@ -72,6 +72,7 @@ static int OpenFilter( vlc_object_t *p_this )
     if( p_filter->fmt_in.video.orientation != p_filter->fmt_out.video.orientation )
         return VLC_EGENERIC;
 
+#warning Converter cannot (really) change output format.
     video_format_ScaleCropAr( &p_filter->fmt_out.video, &p_filter->fmt_in.video );
     p_filter->pf_video_filter = Filter;
 
@@ -91,6 +92,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
 
     if( !p_pic ) return NULL;
 
+#warning Converter cannot (really) change output format.
     video_format_ScaleCropAr( &p_filter->fmt_out.video, &p_filter->fmt_in.video );
 
     /* Request output picture */
index 4591f2f..ae0316a 100644 (file)
@@ -140,8 +140,8 @@ filter_chain_t *filter_chain_NewVideo( vlc_object_t *obj, bool allow_change,
         },
     };
 
-    return filter_chain_NewInner( &callbacks, "video filter", "video filter",
-                                  allow_change, owner );
+    return filter_chain_NewInner( &callbacks, "video filter",
+                                  "video converter", allow_change, owner );
 }
 
 /**
index 6c814c8..9e0fd71 100644 (file)
@@ -740,11 +740,11 @@ static filter_t *CreateFilter( vlc_object_t *p_this, es_format_t *p_fmt_in,
     p_filter->fmt_out = *p_fmt_in;
     p_filter->fmt_out.i_codec = p_fmt_out->i_chroma;
     p_filter->fmt_out.video = *p_fmt_out;
-    p_filter->p_module = module_need( p_filter, "video filter", NULL, false );
+    p_filter->p_module = module_need( p_filter, "video converter", NULL, false );
 
     if( !p_filter->p_module )
     {
-        msg_Dbg( p_filter, "no video filter found" );
+        msg_Dbg( p_filter, "no video converter found" );
         DeleteFilter( p_filter );
         return NULL;
     }
index 6a40092..bbccaf4 100644 (file)
@@ -236,7 +236,7 @@ static filter_t *SpuRenderCreateAndLoadScale(vlc_object_t *object,
 
     scale->owner.video.buffer_new = spu_new_video_buffer;
 
-    scale->p_module = module_need(scale, "video filter", NULL, false);
+    scale->p_module = module_need(scale, "video converter", NULL, false);
 
     return scale;
 }