[vlc-commits] Use separate capabilities for video filters and converters
Rémi Denis-Courmont
git at videolan.org
Mon Dec 12 19:53:40 CET 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Dec 12 20:39:32 2016 +0200| [b6e1a1b95cccf6f61a3933869962a02874e503a7] | committer: Rémi Denis-Courmont
Use separate capabilities for video filters and converters
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b6e1a1b95cccf6f61a3933869962a02874e503a7
---
modules/arm_neon/chroma_yuv.c | 2 +-
modules/arm_neon/yuv_rgb.c | 2 +-
modules/codec/avcodec/d3d11va.c | 4 ++--
modules/codec/avcodec/dxva2.c | 4 ++--
modules/hw/vdpau/chroma.c | 2 +-
modules/video_chroma/chain.c | 2 +-
modules/video_chroma/cvpx_i420.c | 2 +-
modules/video_chroma/d3d11_surface.c | 2 +-
modules/video_chroma/dxa9.c | 2 +-
modules/video_chroma/grey_yuv.c | 2 +-
modules/video_chroma/i420_10_p010.c | 2 +-
modules/video_chroma/i420_nv12.c | 2 +-
modules/video_chroma/i420_rgb.c | 2 +-
modules/video_chroma/i420_yuy2.c | 8 ++++----
modules/video_chroma/i422_i420.c | 2 +-
modules/video_chroma/i422_yuy2.c | 6 +++---
modules/video_chroma/omxdl.c | 2 +-
modules/video_chroma/rv32.c | 2 +-
modules/video_chroma/swscale.c | 2 +-
modules/video_chroma/yuvp.c | 2 +-
modules/video_chroma/yuy2_i420.c | 2 +-
modules/video_chroma/yuy2_i422.c | 2 +-
modules/video_filter/scale.c | 4 +++-
src/misc/filter_chain.c | 4 ++--
src/misc/image.c | 4 ++--
src/video_output/vout_subpictures.c | 2 +-
26 files changed, 37 insertions(+), 35 deletions(-)
diff --git a/modules/arm_neon/chroma_yuv.c b/modules/arm_neon/chroma_yuv.c
index b8f0e2e..f790770 100644
--- a/modules/arm_neon/chroma_yuv.c
+++ b/modules/arm_neon/chroma_yuv.c
@@ -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 ()
diff --git a/modules/arm_neon/yuv_rgb.c b/modules/arm_neon/yuv_rgb.c
index ee382f1..d710d30 100644
--- a/modules/arm_neon/yuv_rgb.c
+++ b/modules/arm_neon/yuv_rgb.c
@@ -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 ()
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index e7ffbb0..b139b8a 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -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;
}
diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index 2b6a1fc..d609ce0 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -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;
}
diff --git a/modules/hw/vdpau/chroma.c b/modules/hw/vdpau/chroma.c
index 5d76541..ae0d3eb 100644
--- a/modules/hw/vdpau/chroma.c
+++ b/modules/hw/vdpau/chroma.c
@@ -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)
diff --git a/modules/video_chroma/chain.c b/modules/video_chroma/chain.c
index 55623e2..198c88e 100644
--- a/modules/video_chroma/chain.c
+++ b/modules/video_chroma/chain.c
@@ -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 ()
diff --git a/modules/video_chroma/cvpx_i420.c b/modules/video_chroma/cvpx_i420.c
index 1abff9d..26e8c2e 100644
--- a/modules/video_chroma/cvpx_i420.c
+++ b/modules/video_chroma/cvpx_i420.c
@@ -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 ()
diff --git a/modules/video_chroma/d3d11_surface.c b/modules/video_chroma/d3d11_surface.c
index f4a27a8..92c1fe7 100644
--- a/modules/video_chroma/d3d11_surface.c
+++ b/modules/video_chroma/d3d11_surface.c
@@ -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 ()
diff --git a/modules/video_chroma/dxa9.c b/modules/video_chroma/dxa9.c
index ddaa379..6a41545 100644
--- a/modules/video_chroma/dxa9.c
+++ b/modules/video_chroma/dxa9.c
@@ -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 ()
diff --git a/modules/video_chroma/grey_yuv.c b/modules/video_chroma/grey_yuv.c
index 0d522d4..b6ca084 100644
--- a/modules/video_chroma/grey_yuv.c
+++ b/modules/video_chroma/grey_yuv.c
@@ -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 ()
diff --git a/modules/video_chroma/i420_10_p010.c b/modules/video_chroma/i420_10_p010.c
index f73c4d5..33768bc 100644
--- a/modules/video_chroma/i420_10_p010.c
+++ b/modules/video_chroma/i420_10_p010.c
@@ -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 ()
diff --git a/modules/video_chroma/i420_nv12.c b/modules/video_chroma/i420_nv12.c
index 996b372..19bfb1c 100644
--- a/modules/video_chroma/i420_nv12.c
+++ b/modules/video_chroma/i420_nv12.c
@@ -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 ()
diff --git a/modules/video_chroma/i420_rgb.c b/modules/video_chroma/i420_rgb.c
index 515cbf4..a1942e3 100644
--- a/modules/video_chroma/i420_rgb.c
+++ b/modules/video_chroma/i420_rgb.c
@@ -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 "
diff --git a/modules/video_chroma/i420_yuy2.c b/modules/video_chroma/i420_yuy2.c
index cf3b8fb..3fd5e2c 100644
--- a/modules/video_chroma/i420_yuy2.c
+++ b/modules/video_chroma/i420_yuy2.c
@@ -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 )
diff --git a/modules/video_chroma/i422_i420.c b/modules/video_chroma/i422_i420.c
index 28912b8..5993098 100644
--- a/modules/video_chroma/i422_i420.c
+++ b/modules/video_chroma/i422_i420.c
@@ -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 ()
diff --git a/modules/video_chroma/i422_yuy2.c b/modules/video_chroma/i422_yuy2.c
index 9ca5e78..f71c942 100644
--- a/modules/video_chroma/i422_yuy2.c
+++ b/modules/video_chroma/i422_yuy2.c
@@ -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
diff --git a/modules/video_chroma/omxdl.c b/modules/video_chroma/omxdl.c
index 5964551..f590290 100644
--- a/modules/video_chroma/omxdl.c
+++ b/modules/video_chroma/omxdl.c
@@ -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 ()
diff --git a/modules/video_chroma/rv32.c b/modules/video_chroma/rv32.c
index 5b8e315..cd8eaa4 100644
--- a/modules/video_chroma/rv32.c
+++ b/modules/video_chroma/rv32.c
@@ -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 ()
diff --git a/modules/video_chroma/swscale.c b/modules/video_chroma/swscale.c
index 1741eef..bacb157 100644
--- a/modules/video_chroma/swscale.c
+++ b/modules/video_chroma/swscale.c
@@ -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 )
diff --git a/modules/video_chroma/yuvp.c b/modules/video_chroma/yuvp.c
index a48322a..cecb13d 100644
--- a/modules/video_chroma/yuvp.c
+++ b/modules/video_chroma/yuvp.c
@@ -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 ()
diff --git a/modules/video_chroma/yuy2_i420.c b/modules/video_chroma/yuy2_i420.c
index 40c548b..20df9cb 100644
--- a/modules/video_chroma/yuy2_i420.c
+++ b/modules/video_chroma/yuy2_i420.c
@@ -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 ()
diff --git a/modules/video_chroma/yuy2_i422.c b/modules/video_chroma/yuy2_i422.c
index 524b489..169e431 100644
--- a/modules/video_chroma/yuy2_i422.c
+++ b/modules/video_chroma/yuy2_i422.c
@@ -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 ()
diff --git a/modules/video_filter/scale.c b/modules/video_filter/scale.c
index 9156bc9..003369e 100644
--- a/modules/video_filter/scale.c
+++ b/modules/video_filter/scale.c
@@ -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 */
diff --git a/src/misc/filter_chain.c b/src/misc/filter_chain.c
index 4591f2f..ae0316a 100644
--- a/src/misc/filter_chain.c
+++ b/src/misc/filter_chain.c
@@ -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 );
}
/**
diff --git a/src/misc/image.c b/src/misc/image.c
index 6c814c8..9e0fd71 100644
--- a/src/misc/image.c
+++ b/src/misc/image.c
@@ -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;
}
diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index 6a40092..bbccaf4 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -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;
}
More information about the vlc-commits
mailing list