Commit b6e1a1b9 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Use separate capabilities for video filters and converters

parent d86be2d1
......@@ -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 ()
......
......@@ -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 ()
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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)
......
......@@ -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 ()
......
......@@ -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 ()
......
......@@ -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 ()
......
......@@ -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 ()
......
......@@ -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 ()
......
......@@ -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 ()
......@@ -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 ()
......@@ -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 "
......
......@@ -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 )
......
......@@ -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 ()
......
......@@ -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
......
......@@ -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 ()
......
......@@ -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 ()
......
......@@ -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 )
......
......@@ -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 ()
......
......@@ -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 ()
......
......@@ -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 ()
......
......@@ -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 */
......
......@@ -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 );
}
/**
......
......@@ -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;
}
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment