[vlc-commits] swscale: use function video_format_IsSimilar.

Felix Abecassis git at videolan.org
Sun Dec 8 13:48:34 CET 2013


vlc | branch: master | Felix Abecassis <felix.abecassis at gmail.com> | Tue Nov 26 14:21:32 2013 +0100| [454654e22bff408c512b279d3e6c2568dd106ec6] | committer: Jean-Baptiste Kempf

swscale: use function video_format_IsSimilar.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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;



More information about the vlc-commits mailing list