[MPlayer-cvslog] r33503 - in trunk/libmpcodecs: vf_halfpack.c vf_sab.c vf_scale.c vf_scale.h vf_smartblur.c

iive subversion at mplayerhq.hu
Wed May 25 15:46:33 CEST 2011


Author: iive
Date: Wed May 25 15:46:32 2011
New Revision: 33503

Log:
Fix build after removal of SWS_CPU_CAPS_* from libswscale in FFmpeg.
Remove the get_sws_cpuflags() and its uses across filters.

Modified:
   trunk/libmpcodecs/vf_halfpack.c
   trunk/libmpcodecs/vf_sab.c
   trunk/libmpcodecs/vf_scale.c
   trunk/libmpcodecs/vf_scale.h
   trunk/libmpcodecs/vf_smartblur.c

Modified: trunk/libmpcodecs/vf_halfpack.c
==============================================================================
--- trunk/libmpcodecs/vf_halfpack.c	Tue May 24 22:52:27 2011	(r33502)
+++ trunk/libmpcodecs/vf_halfpack.c	Wed May 25 15:46:32 2011	(r33503)
@@ -200,7 +200,7 @@ static int config(struct vf_instance *vf
 		vf->priv->ctx =
 			sws_getContext(width, height / 2, PIX_FMT_YUV422P,
 			               width, height / 2, PIX_FMT_YUYV422,
-			               SWS_POINT | SWS_PRINT_INFO | get_sws_cpuflags(),
+			               SWS_POINT | SWS_PRINT_INFO,
 			               NULL, NULL, NULL);
 	}
 	/* FIXME - also support UYVY output? */

Modified: trunk/libmpcodecs/vf_sab.c
==============================================================================
--- trunk/libmpcodecs/vf_sab.c	Tue May 24 22:52:27 2011	(r33502)
+++ trunk/libmpcodecs/vf_sab.c	Wed May 25 15:46:32 2011	(r33503)
@@ -104,7 +104,7 @@ static int allocStuff(FilterParam *f, in
     swsF.lumH= swsF.lumV= vec;
     swsF.chrH= swsF.chrV= NULL;
     f->preFilterContext= sws_getContext(
-        width, height, PIX_FMT_GRAY8, width, height, PIX_FMT_GRAY8, get_sws_cpuflags()|SWS_POINT, &swsF, NULL, NULL);
+        width, height, PIX_FMT_GRAY8, width, height, PIX_FMT_GRAY8, SWS_POINT, &swsF, NULL, NULL);
 
     sws_freeVec(vec);
     vec = sws_getGaussianVec(f->strength, 5.0);

Modified: trunk/libmpcodecs/vf_scale.c
==============================================================================
--- trunk/libmpcodecs/vf_scale.c	Tue May 24 22:52:27 2011	(r33502)
+++ trunk/libmpcodecs/vf_scale.c	Wed May 25 15:46:32 2011	(r33503)
@@ -293,13 +293,13 @@ static int config(struct vf_instance *vf
             sfmt,
                   vf->priv->w, vf->priv->h >> vf->priv->interlaced,
             dfmt,
-            int_sws_flags | get_sws_cpuflags(), srcFilter, dstFilter, vf->priv->param);
+            int_sws_flags, srcFilter, dstFilter, vf->priv->param);
     if(vf->priv->interlaced){
         vf->priv->ctx2=sws_getContext(width, height >> 1,
             sfmt,
                   vf->priv->w, vf->priv->h >> 1,
             dfmt,
-            int_sws_flags | get_sws_cpuflags(), srcFilter, dstFilter, vf->priv->param);
+            int_sws_flags, srcFilter, dstFilter, vf->priv->param);
     }
     if(!vf->priv->ctx){
         // error...
@@ -560,13 +560,6 @@ int sws_chr_hshift= 0;
 float sws_chr_sharpen= 0.0;
 float sws_lum_sharpen= 0.0;
 
-int get_sws_cpuflags(void){
-    return
-          (gCpuCaps.hasMMX   ? SWS_CPU_CAPS_MMX   : 0)
-        | (gCpuCaps.hasMMX2  ? SWS_CPU_CAPS_MMX2  : 0)
-        | (gCpuCaps.has3DNow ? SWS_CPU_CAPS_3DNOW : 0)
-        | (gCpuCaps.hasAltiVec ? SWS_CPU_CAPS_ALTIVEC : 0);
-}
 
 void sws_getFlagsAndFilterFromCmdLine(int *flags, SwsFilter **srcFilterParam, SwsFilter **dstFilterParam)
 {
@@ -623,7 +616,7 @@ struct SwsContext *sws_getContextFromCmd
         if (srcFormat == IMGFMT_RGB8 || srcFormat == IMGFMT_BGR8) sfmt = PIX_FMT_PAL8;
         sws_getFlagsAndFilterFromCmdLine(&flags, &srcFilterParam, &dstFilterParam);
 
-        return sws_getContext(srcW, srcH, sfmt, dstW, dstH, dfmt, flags | get_sws_cpuflags(), srcFilterParam, dstFilterParam, NULL);
+        return sws_getContext(srcW, srcH, sfmt, dstW, dstH, dfmt, flags, srcFilterParam, dstFilterParam, NULL);
 }
 
 /// An example of presets usage

Modified: trunk/libmpcodecs/vf_scale.h
==============================================================================
--- trunk/libmpcodecs/vf_scale.h	Tue May 24 22:52:27 2011	(r33502)
+++ trunk/libmpcodecs/vf_scale.h	Wed May 25 15:46:32 2011	(r33503)
@@ -29,7 +29,6 @@ extern float sws_lum_sharpen;
 
 extern int sws_flags;
 
-int get_sws_cpuflags(void);
 struct SwsContext *sws_getContextFromCmdLine(int srcW, int srcH, int srcFormat, int dstW, int dstH, int dstFormat);
 
 #endif /* MPLAYER_VF_SCALE_H */

Modified: trunk/libmpcodecs/vf_smartblur.c
==============================================================================
--- trunk/libmpcodecs/vf_smartblur.c	Tue May 24 22:52:27 2011	(r33502)
+++ trunk/libmpcodecs/vf_smartblur.c	Wed May 25 15:46:32 2011	(r33503)
@@ -89,7 +89,7 @@ static int allocStuff(FilterParam *f, in
     swsF.lumH= swsF.lumV= vec;
     swsF.chrH= swsF.chrV= NULL;
     f->filterContext= sws_getContext(
-        width, height, PIX_FMT_GRAY8, width, height, PIX_FMT_GRAY8, SWS_BICUBIC | get_sws_cpuflags(), &swsF, NULL, NULL);
+        width, height, PIX_FMT_GRAY8, width, height, PIX_FMT_GRAY8, SWS_BICUBIC, &swsF, NULL, NULL);
 
     sws_freeVec(vec);
 


More information about the MPlayer-cvslog mailing list