[vlc-devel] [PATCH 3/4] swscale: use function video_format_IsSimilar.

Felix Abecassis felix.abecassis at gmail.com
Tue Nov 26 14:21:32 CET 2013


---
 modules/video_chroma/swscale.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/modules/video_chroma/swscale.c b/modules/video_chroma/swscale.c
index a34b769..1d76d38 100644
--- a/modules/video_chroma/swscale.c
+++ b/modules/video_chroma/swscale.c
@@ -247,12 +247,6 @@ static int GetSwsCpuMask(void)
 
     return i_sws_cpu;
 }
-static bool IsFmtSimilar( const video_format_t *p_fmt1, const video_format_t *p_fmt2 )
-{
-    return p_fmt1->i_chroma == p_fmt2->i_chroma &&
-           p_fmt1->i_width  == p_fmt2->i_width &&
-           p_fmt1->i_height == p_fmt2->i_height;
-}
 
 static void FixParameters( int *pi_fmt, bool *pb_has_a, bool *pb_swap_uv, vlc_fourcc_t fmt )
 {
@@ -351,8 +345,8 @@ static int Init( filter_t *p_filter )
     const video_format_t *p_fmti = &p_filter->fmt_in.video;
     video_format_t       *p_fmto = &p_filter->fmt_out.video;
 
-    if( IsFmtSimilar( p_fmti, &p_sys->fmt_in ) &&
-        IsFmtSimilar( p_fmto, &p_sys->fmt_out ) &&
+    if( video_format_IsSimilar( p_fmti, &p_sys->fmt_in ) &&
+        video_format_IsSimilar( p_fmto, &p_sys->fmt_out ) &&
         p_sys->ctx )
     {
         return VLC_SUCCESS;
-- 
1.8.3.2




More information about the vlc-devel mailing list