diff --git a/graphics/ffmpeg/Makefile b/graphics/ffmpeg/Makefile index dc447926cb0..936da3c4607 100644 --- a/graphics/ffmpeg/Makefile +++ b/graphics/ffmpeg/Makefile @@ -1,10 +1,11 @@ -# $OpenBSD: Makefile,v 1.71 2011/06/04 09:20:36 sthen Exp $ +# $OpenBSD: Makefile,v 1.72 2011/06/22 08:10:26 dcoppa Exp $ COMMENT= audio/video converter and streamer V= 20110408 DISTNAME= ffmpeg-git-${V} PKGNAME= ffmpeg-${V} +REVISION= 0 CATEGORIES= graphics multimedia MASTER_SITES= http://comstyle.com/source/ diff --git a/graphics/ffmpeg/patches/patch-libswscale_rgb2rgb_c b/graphics/ffmpeg/patches/patch-libswscale_rgb2rgb_c new file mode 100644 index 00000000000..afbb09ce55e --- /dev/null +++ b/graphics/ffmpeg/patches/patch-libswscale_rgb2rgb_c @@ -0,0 +1,12 @@ +$OpenBSD: patch-libswscale_rgb2rgb_c,v 1.1 2011/06/22 08:10:26 dcoppa Exp $ +--- libswscale/rgb2rgb.c.orig Tue Mar 29 01:23:17 2011 ++++ libswscale/rgb2rgb.c Tue Jun 21 14:17:21 2011 +@@ -201,7 +201,7 @@ DECLARE_ASM_CONST(8, uint64_t, blue_15mask) = 0x00000 + + void sws_rgb2rgb_init(int flags) + { +-#if HAVE_MMX2 || HAVE_AMD3DNOW || HAVE_MMX ++#if HAVE_SSE2 || HAVE_MMX2 || HAVE_AMD3DNOW || HAVE_MMX + if (flags & SWS_CPU_CAPS_SSE2) + rgb2rgb_init_SSE2(); + else if (flags & SWS_CPU_CAPS_MMX2) diff --git a/graphics/ffmpeg/patches/patch-libswscale_swscale_c b/graphics/ffmpeg/patches/patch-libswscale_swscale_c new file mode 100644 index 00000000000..7144ecd17bc --- /dev/null +++ b/graphics/ffmpeg/patches/patch-libswscale_swscale_c @@ -0,0 +1,24 @@ +$OpenBSD: patch-libswscale_swscale_c,v 1.1 2011/06/22 08:10:26 dcoppa Exp $ +--- libswscale/swscale.c.orig Wed Apr 6 01:28:59 2011 ++++ libswscale/swscale.c Tue Jun 21 14:17:21 2011 +@@ -62,7 +62,6 @@ untested special converters + #include "rgb2rgb.h" + #include "libavutil/intreadwrite.h" + #include "libavutil/x86_cpu.h" +-#include "libavutil/cpu.h" + #include "libavutil/avutil.h" + #include "libavutil/mathematics.h" + #include "libavutil/bswap.h" +@@ -1315,12 +1314,6 @@ SwsFunc ff_getSwsFunc(SwsContext *c) + { + #if CONFIG_RUNTIME_CPUDETECT + int flags = c->flags; +- +- int cpuflags = av_get_cpu_flags(); +- +- flags |= (cpuflags & AV_CPU_FLAG_MMX ? SWS_CPU_CAPS_MMX : 0); +- flags |= (cpuflags & AV_CPU_FLAG_MMX2 ? SWS_CPU_CAPS_MMX2 : 0); +- flags |= (cpuflags & AV_CPU_FLAG_3DNOW ? SWS_CPU_CAPS_3DNOW : 0); + + #if ARCH_X86 + // ordered per speed fastest first diff --git a/graphics/ffmpeg/patches/patch-libswscale_utils_c b/graphics/ffmpeg/patches/patch-libswscale_utils_c new file mode 100644 index 00000000000..cebd21568fa --- /dev/null +++ b/graphics/ffmpeg/patches/patch-libswscale_utils_c @@ -0,0 +1,25 @@ +$OpenBSD: patch-libswscale_utils_c,v 1.1 2011/06/22 08:10:26 dcoppa Exp $ +--- libswscale/utils.c.orig Tue Mar 29 01:23:17 2011 ++++ libswscale/utils.c Tue Jun 21 14:17:21 2011 +@@ -41,6 +41,7 @@ + #include "rgb2rgb.h" + #include "libavutil/intreadwrite.h" + #include "libavutil/x86_cpu.h" ++#include "libavutil/cpu.h" + #include "libavutil/avutil.h" + #include "libavutil/bswap.h" + #include "libavutil/opt.h" +@@ -740,6 +741,13 @@ static int update_flags_cpu(int flags) + |SWS_CPU_CAPS_ALTIVEC + |SWS_CPU_CAPS_BFIN); + flags |= ff_hardcodedcpuflags(); ++#else /* !CONFIG_RUNTIME_CPUDETECT */ ++ int cpuflags = av_get_cpu_flags(); ++ ++ flags |= (cpuflags & AV_CPU_FLAG_SSE2 ? SWS_CPU_CAPS_SSE2 : 0); ++ flags |= (cpuflags & AV_CPU_FLAG_MMX ? SWS_CPU_CAPS_MMX : 0); ++ flags |= (cpuflags & AV_CPU_FLAG_MMX2 ? SWS_CPU_CAPS_MMX2 : 0); ++ flags |= (cpuflags & AV_CPU_FLAG_3DNOW ? SWS_CPU_CAPS_3DNOW : 0); + #endif /* CONFIG_RUNTIME_CPUDETECT */ + return flags; + }