[FFmpeg-cvslog] r19352 - in branches/0.5: configure libswscale/swscale.c libswscale/yuv2rgb.c
diego
subversion
Sun Jul 5 22:35:02 CEST 2009
Author: diego
Date: Sun Jul 5 22:35:02 2009
New Revision: 19352
Log:
Merge remaining changes to make libswscale usable in LGPL mode from trunk.
Modified:
branches/0.5/configure
branches/0.5/libswscale/swscale.c
branches/0.5/libswscale/yuv2rgb.c
Modified: branches/0.5/configure
==============================================================================
--- branches/0.5/configure Sun Jul 5 20:27:39 2009 (r19351)
+++ branches/0.5/configure Sun Jul 5 22:35:02 2009 (r19352)
@@ -1699,7 +1699,6 @@ die_license_disabled gpl libfaad2
die_license_disabled gpl libx264
die_license_disabled gpl libxvid
die_license_disabled gpl postproc
-die_license_disabled gpl swscale
die_license_disabled gpl x11grab
die_license_disabled nonfree libamr_nb
Modified: branches/0.5/libswscale/swscale.c
==============================================================================
--- branches/0.5/libswscale/swscale.c Sun Jul 5 20:27:39 2009 (r19351)
+++ branches/0.5/libswscale/swscale.c Sun Jul 5 22:35:02 2009 (r19352)
@@ -955,13 +955,12 @@ static inline void yuv2rgbXinC_full(SwsC
//Note: we have C, X86, MMX, MMX2, 3DNOW versions, there is no 3DNOW+MMX2 one
//Plain C versions
-#if !HAVE_MMX || defined (RUNTIME_CPUDETECT) || !CONFIG_GPL
+#if ((!HAVE_MMX || !CONFIG_GPL) && !HAVE_ALTIVEC) || defined (RUNTIME_CPUDETECT)
#define COMPILE_C
#endif
#if ARCH_PPC
-#if (HAVE_ALTIVEC || defined (RUNTIME_CPUDETECT)) && CONFIG_GPL
-#undef COMPILE_C
+#if HAVE_ALTIVEC || defined (RUNTIME_CPUDETECT)
#define COMPILE_ALTIVEC
#endif
#endif //ARCH_PPC
@@ -1637,8 +1636,8 @@ static void globalInit(void){
static SwsFunc getSwsFunc(int flags){
-#if defined(RUNTIME_CPUDETECT) && CONFIG_GPL
-#if ARCH_X86
+#if defined(RUNTIME_CPUDETECT)
+#if ARCH_X86 && CONFIG_GPL
// ordered per speed fastest first
if (flags & SWS_CPU_CAPS_MMX2)
return swScale_MMX2;
@@ -1657,7 +1656,7 @@ static SwsFunc getSwsFunc(int flags){
return swScale_C;
#endif
return swScale_C;
-#endif /* ARCH_X86 */
+#endif /* ARCH_X86 && CONFIG_GPL */
#else //RUNTIME_CPUDETECT
#if HAVE_MMX2
return swScale_MMX2;
@@ -2194,7 +2193,7 @@ SwsContext *sws_getContext(int srcW, int
__asm__ volatile("emms\n\t"::: "memory");
#endif
-#if !defined(RUNTIME_CPUDETECT) || !CONFIG_GPL //ensure that the flags match the compiled variant if cpudetect is off
+#if !defined(RUNTIME_CPUDETECT) //ensure that the flags match the compiled variant if cpudetect is off
flags &= ~(SWS_CPU_CAPS_MMX|SWS_CPU_CAPS_MMX2|SWS_CPU_CAPS_3DNOW|SWS_CPU_CAPS_ALTIVEC|SWS_CPU_CAPS_BFIN);
#if HAVE_MMX2
flags |= SWS_CPU_CAPS_MMX|SWS_CPU_CAPS_MMX2;
Modified: branches/0.5/libswscale/yuv2rgb.c
==============================================================================
--- branches/0.5/libswscale/yuv2rgb.c Sun Jul 5 20:27:39 2009 (r19351)
+++ branches/0.5/libswscale/yuv2rgb.c Sun Jul 5 22:35:02 2009 (r19352)
@@ -453,7 +453,7 @@ SwsFunc sws_yuv2rgb_get_func_ptr(SwsCont
#if CONFIG_MLIB
t = sws_yuv2rgb_init_mlib(c);
#endif
-#if HAVE_ALTIVEC && CONFIG_GPL
+#if HAVE_ALTIVEC
if (c->flags & SWS_CPU_CAPS_ALTIVEC)
t = sws_yuv2rgb_init_altivec(c);
#endif
More information about the ffmpeg-cvslog
mailing list