[vlc-commits] video_chroma: put calls to VIDEO_FILTER_WRAPPER earlier

Steve Lhomme git at videolan.org
Mon Oct 5 16:15:04 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Sep 28 16:35:29 2020 +0200| [340b73866d9d5af03ff76bca5e52fbc15201a712] | committer: Steve Lhomme

video_chroma: put calls to VIDEO_FILTER_WRAPPER earlier

And remove unneeded declaration of functions defined by VIDEO_FILTER_WRAPPER.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=340b73866d9d5af03ff76bca5e52fbc15201a712
---

 modules/video_chroma/grey_yuv.c  |  9 +++------
 modules/video_chroma/i420_rgb.c  | 36 ++++++++++++++----------------------
 modules/video_chroma/i420_yuy2.c | 25 ++++++++++---------------
 modules/video_chroma/i422_i420.c | 10 ++++------
 modules/video_chroma/i422_yuy2.c | 22 +++++++++-------------
 modules/video_chroma/yuvp.c      |  4 ++--
 modules/video_chroma/yuy2_i420.c | 11 ++++-------
 modules/video_chroma/yuy2_i422.c | 11 ++++-------
 8 files changed, 50 insertions(+), 78 deletions(-)

diff --git a/modules/video_chroma/grey_yuv.c b/modules/video_chroma/grey_yuv.c
index 9796118241..87cb323103 100644
--- a/modules/video_chroma/grey_yuv.c
+++ b/modules/video_chroma/grey_yuv.c
@@ -44,9 +44,6 @@ static int  Activate ( vlc_object_t * );
 static void GREY_I420( filter_t *, picture_t *, picture_t * );
 static void GREY_YUY2( filter_t *, picture_t *, picture_t * );
 
-static picture_t *GREY_I420_Filter( filter_t *, picture_t * );
-static picture_t *GREY_YUY2_Filter( filter_t *, picture_t * );
-
 /*****************************************************************************
  * Module descriptor.
  *****************************************************************************/
@@ -56,6 +53,9 @@ vlc_module_begin ()
     set_callback( Activate )
 vlc_module_end ()
 
+VIDEO_FILTER_WRAPPER( GREY_I420 )
+VIDEO_FILTER_WRAPPER( GREY_YUY2 )
+
 /*****************************************************************************
  * Activate: allocate a chroma function
  *****************************************************************************
@@ -99,9 +99,6 @@ static int Activate( vlc_object_t *p_this )
     return 0;
 }
 
-VIDEO_FILTER_WRAPPER( GREY_I420 )
-VIDEO_FILTER_WRAPPER( GREY_YUY2 )
-
 /* Following functions are local */
 
 /*****************************************************************************
diff --git a/modules/video_chroma/i420_rgb.c b/modules/video_chroma/i420_rgb.c
index 24cc324731..fbb8f90e42 100644
--- a/modules/video_chroma/i420_rgb.c
+++ b/modules/video_chroma/i420_rgb.c
@@ -38,19 +38,9 @@
 #include "i420_rgb.h"
 #ifdef PLAIN
 # include "i420_rgb_c.h"
-static picture_t *I420_RGB8_Filter( filter_t *, picture_t * );
-static picture_t *I420_RGB16_Filter( filter_t *, picture_t * );
-static picture_t *I420_RGB32_Filter( filter_t *, picture_t * );
 
 static void SetYUV( filter_t *, const video_format_t * );
 static void Set8bppPalette( filter_t *, uint8_t * );
-#else
-static picture_t *I420_R5G5B5_Filter( filter_t *, picture_t * );
-static picture_t *I420_R5G6B5_Filter( filter_t *, picture_t * );
-static picture_t *I420_A8R8G8B8_Filter( filter_t *, picture_t * );
-static picture_t *I420_R8G8B8A8_Filter( filter_t *, picture_t * );
-static picture_t *I420_B8G8R8A8_Filter( filter_t *, picture_t * );
-static picture_t *I420_A8B8G8R8_Filter( filter_t *, picture_t * );
 #endif
 
 /*****************************************************************************
@@ -87,6 +77,19 @@ vlc_module_begin ()
     set_callbacks( Activate, Deactivate )
 vlc_module_end ()
 
+#ifndef PLAIN
+VIDEO_FILTER_WRAPPER( I420_R5G5B5 )
+VIDEO_FILTER_WRAPPER( I420_R5G6B5 )
+VIDEO_FILTER_WRAPPER( I420_A8R8G8B8 )
+VIDEO_FILTER_WRAPPER( I420_R8G8B8A8 )
+VIDEO_FILTER_WRAPPER( I420_B8G8R8A8 )
+VIDEO_FILTER_WRAPPER( I420_A8B8G8R8 )
+#else
+VIDEO_FILTER_WRAPPER( I420_RGB8 )
+VIDEO_FILTER_WRAPPER( I420_RGB16 )
+VIDEO_FILTER_WRAPPER( I420_RGB32 )
+#endif
+
 /*****************************************************************************
  * Activate: allocate a chroma function
  *****************************************************************************
@@ -290,18 +293,7 @@ static void Deactivate( vlc_object_t *p_this )
     free( p_sys );
 }
 
-#ifndef PLAIN
-VIDEO_FILTER_WRAPPER( I420_R5G5B5 )
-VIDEO_FILTER_WRAPPER( I420_R5G6B5 )
-VIDEO_FILTER_WRAPPER( I420_A8R8G8B8 )
-VIDEO_FILTER_WRAPPER( I420_R8G8B8A8 )
-VIDEO_FILTER_WRAPPER( I420_B8G8R8A8 )
-VIDEO_FILTER_WRAPPER( I420_A8B8G8R8 )
-#else
-VIDEO_FILTER_WRAPPER( I420_RGB8 )
-VIDEO_FILTER_WRAPPER( I420_RGB16 )
-VIDEO_FILTER_WRAPPER( I420_RGB32 )
-
+#ifdef PLAIN
 /*****************************************************************************
  * SetYUV: compute tables and set function pointers
  *****************************************************************************/
diff --git a/modules/video_chroma/i420_yuy2.c b/modules/video_chroma/i420_yuy2.c
index 966204f517..d7f23c6ea8 100644
--- a/modules/video_chroma/i420_yuy2.c
+++ b/modules/video_chroma/i420_yuy2.c
@@ -65,16 +65,11 @@ static int  Activate ( vlc_object_t * );
 static void I420_YUY2           ( filter_t *, picture_t *, picture_t * );
 static void I420_YVYU           ( filter_t *, picture_t *, picture_t * );
 static void I420_UYVY           ( filter_t *, picture_t *, picture_t * );
-static picture_t *I420_YUY2_Filter    ( filter_t *, picture_t * );
-static picture_t *I420_YVYU_Filter    ( filter_t *, picture_t * );
-static picture_t *I420_UYVY_Filter    ( filter_t *, picture_t * );
 #if !defined (MODULE_NAME_IS_i420_yuy2_altivec)
 static void I420_IUYV           ( filter_t *, picture_t *, picture_t * );
-static picture_t *I420_IUYV_Filter    ( filter_t *, picture_t * );
 #endif
 #if defined (MODULE_NAME_IS_i420_yuy2)
 static void I420_Y211           ( filter_t *, picture_t *, picture_t * );
-static picture_t *I420_Y211_Filter    ( filter_t *, picture_t * );
 #endif
 
 /*****************************************************************************
@@ -102,6 +97,16 @@ vlc_module_begin ()
     set_callback( Activate )
 vlc_module_end ()
 
+VIDEO_FILTER_WRAPPER( I420_YUY2 )
+VIDEO_FILTER_WRAPPER( I420_YVYU )
+VIDEO_FILTER_WRAPPER( I420_UYVY )
+#if !defined (MODULE_NAME_IS_i420_yuy2_altivec)
+VIDEO_FILTER_WRAPPER( I420_IUYV )
+#endif
+#if defined (MODULE_NAME_IS_i420_yuy2)
+VIDEO_FILTER_WRAPPER( I420_Y211 )
+#endif
+
 /*****************************************************************************
  * Activate: allocate a chroma function
  *****************************************************************************
@@ -177,16 +182,6 @@ static inline unsigned long long read_cycles(void)
 
 /* Following functions are local */
 
-VIDEO_FILTER_WRAPPER( I420_YUY2 )
-VIDEO_FILTER_WRAPPER( I420_YVYU )
-VIDEO_FILTER_WRAPPER( I420_UYVY )
-#if !defined (MODULE_NAME_IS_i420_yuy2_altivec)
-VIDEO_FILTER_WRAPPER( I420_IUYV )
-#endif
-#if defined (MODULE_NAME_IS_i420_yuy2)
-VIDEO_FILTER_WRAPPER( I420_Y211 )
-#endif
-
 /*****************************************************************************
  * I420_YUY2: planar YUV 4:2:0 to packed YUYV 4:2:2
  *****************************************************************************/
diff --git a/modules/video_chroma/i422_i420.c b/modules/video_chroma/i422_i420.c
index e61ffce8f0..5ac6918f85 100644
--- a/modules/video_chroma/i422_i420.c
+++ b/modules/video_chroma/i422_i420.c
@@ -45,9 +45,6 @@ static int  Activate ( vlc_object_t * );
 static void I422_I420( filter_t *, picture_t *, picture_t * );
 static void I422_YV12( filter_t *, picture_t *, picture_t * );
 static void I422_YUVA( filter_t *, picture_t *, picture_t * );
-static picture_t *I422_I420_Filter( filter_t *, picture_t * );
-static picture_t *I422_YV12_Filter( filter_t *, picture_t * );
-static picture_t *I422_YUVA_Filter( filter_t *, picture_t * );
 
 /*****************************************************************************
  * Module descriptor
@@ -58,6 +55,10 @@ vlc_module_begin ()
     set_callback( Activate )
 vlc_module_end ()
 
+VIDEO_FILTER_WRAPPER( I422_I420 )
+VIDEO_FILTER_WRAPPER( I422_YV12 )
+VIDEO_FILTER_WRAPPER( I422_YUVA )
+
 /*****************************************************************************
  * Activate: allocate a chroma function
  *****************************************************************************
@@ -109,9 +110,6 @@ static int Activate( vlc_object_t *p_this )
 }
 
 /* Following functions are local */
-VIDEO_FILTER_WRAPPER( I422_I420 )
-VIDEO_FILTER_WRAPPER( I422_YV12 )
-VIDEO_FILTER_WRAPPER( I422_YUVA )
 
 /*****************************************************************************
  * I422_I420: planar YUV 4:2:2 to planar I420 4:2:0 Y:U:V
diff --git a/modules/video_chroma/i422_yuy2.c b/modules/video_chroma/i422_yuy2.c
index 880be2cff7..0dc990f8f8 100644
--- a/modules/video_chroma/i422_yuy2.c
+++ b/modules/video_chroma/i422_yuy2.c
@@ -53,13 +53,8 @@ static void I422_YUY2               ( filter_t *, picture_t *, picture_t * );
 static void I422_YVYU               ( filter_t *, picture_t *, picture_t * );
 static void I422_UYVY               ( filter_t *, picture_t *, picture_t * );
 static void I422_IUYV               ( filter_t *, picture_t *, picture_t * );
-static picture_t *I422_YUY2_Filter  ( filter_t *, picture_t * );
-static picture_t *I422_YVYU_Filter  ( filter_t *, picture_t * );
-static picture_t *I422_UYVY_Filter  ( filter_t *, picture_t * );
-static picture_t *I422_IUYV_Filter  ( filter_t *, picture_t * );
 #if defined (MODULE_NAME_IS_i422_yuy2)
 static void I422_Y211               ( filter_t *, picture_t *, picture_t * );
-static picture_t *I422_Y211_Filter  ( filter_t *, picture_t * );
 #endif
 
 /*****************************************************************************
@@ -85,6 +80,15 @@ vlc_module_begin ()
     set_callback( Activate )
 vlc_module_end ()
 
+
+VIDEO_FILTER_WRAPPER( I422_YUY2 )
+VIDEO_FILTER_WRAPPER( I422_YVYU )
+VIDEO_FILTER_WRAPPER( I422_UYVY )
+VIDEO_FILTER_WRAPPER( I422_IUYV )
+#if defined (MODULE_NAME_IS_i422_yuy2)
+VIDEO_FILTER_WRAPPER( I422_Y211 )
+#endif
+
 /*****************************************************************************
  * Activate: allocate a chroma function
  *****************************************************************************
@@ -147,14 +151,6 @@ static int Activate( vlc_object_t *p_this )
 
 /* Following functions are local */
 
-VIDEO_FILTER_WRAPPER( I422_YUY2 )
-VIDEO_FILTER_WRAPPER( I422_YVYU )
-VIDEO_FILTER_WRAPPER( I422_UYVY )
-VIDEO_FILTER_WRAPPER( I422_IUYV )
-#if defined (MODULE_NAME_IS_i422_yuy2)
-VIDEO_FILTER_WRAPPER( I422_Y211 )
-#endif
-
 /*****************************************************************************
  * I422_YUY2: planar YUV 4:2:2 to packed YUY2 4:2:2
  *****************************************************************************/
diff --git a/modules/video_chroma/yuvp.c b/modules/video_chroma/yuvp.c
index b2eba4fda7..b6149ce165 100644
--- a/modules/video_chroma/yuvp.c
+++ b/modules/video_chroma/yuvp.c
@@ -52,10 +52,11 @@ vlc_module_end ()
 /****************************************************************************
  * Local prototypes
  ****************************************************************************/
-static picture_t *Convert_Filter( filter_t *, picture_t * );
 static void Convert( filter_t *, picture_t *, picture_t * );
 static void Yuv2Rgb( uint8_t *r, uint8_t *g, uint8_t *b, int y1, int u1, int v1 );
 
+VIDEO_FILTER_WRAPPER( Convert )
+
 /*****************************************************************************
  * Open: probe the filter and return score
  *****************************************************************************/
@@ -96,7 +97,6 @@ static void Close( vlc_object_t *p_this )
 /****************************************************************************
  * Filter: the whole thing
  ****************************************************************************/
-VIDEO_FILTER_WRAPPER( Convert )
 
 static void Convert( filter_t *p_filter, picture_t *p_source,
                                            picture_t *p_dest )
diff --git a/modules/video_chroma/yuy2_i420.c b/modules/video_chroma/yuy2_i420.c
index 93f3caaac2..cfcb2c3717 100644
--- a/modules/video_chroma/yuy2_i420.c
+++ b/modules/video_chroma/yuy2_i420.c
@@ -45,10 +45,6 @@ static void YUY2_I420           ( filter_t *, picture_t *, picture_t * );
 static void YVYU_I420           ( filter_t *, picture_t *, picture_t * );
 static void UYVY_I420           ( filter_t *, picture_t *, picture_t * );
 
-static picture_t *YUY2_I420_Filter    ( filter_t *, picture_t * );
-static picture_t *YVYU_I420_Filter    ( filter_t *, picture_t * );
-static picture_t *UYVY_I420_Filter    ( filter_t *, picture_t * );
-
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
@@ -58,6 +54,10 @@ vlc_module_begin ()
     set_callback( Activate )
 vlc_module_end ()
 
+VIDEO_FILTER_WRAPPER( YUY2_I420 )
+VIDEO_FILTER_WRAPPER( YVYU_I420 )
+VIDEO_FILTER_WRAPPER( UYVY_I420 )
+
 /*****************************************************************************
  * Activate: allocate a chroma function
  *****************************************************************************
@@ -107,9 +107,6 @@ static int Activate( vlc_object_t *p_this )
 }
 
 /* Following functions are local */
-VIDEO_FILTER_WRAPPER( YUY2_I420 )
-VIDEO_FILTER_WRAPPER( YVYU_I420 )
-VIDEO_FILTER_WRAPPER( UYVY_I420 )
 
 /*****************************************************************************
  * YUY2_I420: packed YUY2 4:2:2 to planar YUV 4:2:0
diff --git a/modules/video_chroma/yuy2_i422.c b/modules/video_chroma/yuy2_i422.c
index e1c54b3162..f8aa0b9b04 100644
--- a/modules/video_chroma/yuy2_i422.c
+++ b/modules/video_chroma/yuy2_i422.c
@@ -44,9 +44,6 @@ static int  Activate ( vlc_object_t * );
 static void YUY2_I422           ( filter_t *, picture_t *, picture_t * );
 static void YVYU_I422           ( filter_t *, picture_t *, picture_t * );
 static void UYVY_I422           ( filter_t *, picture_t *, picture_t * );
-static picture_t *YUY2_I422_Filter    ( filter_t *, picture_t * );
-static picture_t *YVYU_I422_Filter    ( filter_t *, picture_t * );
-static picture_t *UYVY_I422_Filter    ( filter_t *, picture_t * );
 
 /*****************************************************************************
  * Module descriptor
@@ -57,6 +54,10 @@ vlc_module_begin ()
     set_callback( Activate )
 vlc_module_end ()
 
+VIDEO_FILTER_WRAPPER( YUY2_I422 )
+VIDEO_FILTER_WRAPPER( YVYU_I422 )
+VIDEO_FILTER_WRAPPER( UYVY_I422 )
+
 /*****************************************************************************
  * Activate: allocate a chroma function
  *****************************************************************************
@@ -107,10 +108,6 @@ static int Activate( vlc_object_t *p_this )
 
 /* Following functions are local */
 
-VIDEO_FILTER_WRAPPER( YUY2_I422 )
-VIDEO_FILTER_WRAPPER( YVYU_I422 )
-VIDEO_FILTER_WRAPPER( UYVY_I422 )
-
 /*****************************************************************************
  * YUY2_I422: packed YUY2 4:2:2 to planar YUV 4:2:2
  *****************************************************************************/



More information about the vlc-commits mailing list