aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/ffmpeg-devel
diff options
context:
space:
mode:
authormm <mm@FreeBSD.org>2010-12-21 17:16:51 +0800
committermm <mm@FreeBSD.org>2010-12-21 17:16:51 +0800
commit822da29e6e5f24a1862d7f9dc76c3b3167587ef9 (patch)
treed40d96dc328520f8bce19519cea4bc629d62f6e7 /multimedia/ffmpeg-devel
parentacf11ed818b39449f839b6a4b8735bd638fd7570 (diff)
downloadfreebsd-ports-gnome-822da29e6e5f24a1862d7f9dc76c3b3167587ef9.tar.gz
freebsd-ports-gnome-822da29e6e5f24a1862d7f9dc76c3b3167587ef9.tar.zst
freebsd-ports-gnome-822da29e6e5f24a1862d7f9dc76c3b3167587ef9.zip
- Add runtime CPU detection to OPTIONS (WITH_CPUDETECT)
- Enable runtime CPU detection by default (suitable for packages) - Add MAP_ANONYMOUS libswscale patch (partially upstream) [1] Submitted by: avg [1]
Diffstat (limited to 'multimedia/ffmpeg-devel')
-rw-r--r--multimedia/ffmpeg-devel/Makefile7
-rw-r--r--multimedia/ffmpeg-devel/files/patch-libswscale-utils.h14
2 files changed, 20 insertions, 1 deletions
diff --git a/multimedia/ffmpeg-devel/Makefile b/multimedia/ffmpeg-devel/Makefile
index 45df333dfb75..6ae3deece6c0 100644
--- a/multimedia/ffmpeg-devel/Makefile
+++ b/multimedia/ffmpeg-devel/Makefile
@@ -7,7 +7,7 @@
PORTNAME= ffmpeg
DISTVERSION= 2010-11-30
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= multimedia audio ipv6 net
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= mm
@@ -32,6 +32,7 @@ WANT_SDL= yes
OPTIONS= ALSA "Enable alsa input/output device" off \
AMR_NB "AMR Narrow Band encoder (opencore)" on \
AMR_WB "AMR Wide Band decoder (opencore)" on \
+ CPUDETECT "Enable runtime CPU detection" on \
DIRAC "Dirac codec via libdirac" off \
FAAC "FAAC mp4/aac audio encoder" off \
FFSERVER "Build and install ffserver" on \
@@ -112,6 +113,10 @@ DOC_DOCFILES= APIchanges TODO avutil.txt developer.html faq.html \
snow.txt soc.txt swscale.txt tablegen.txt viterbi.txt
PORTDOCS= *
+.if !defined(WITHOUT_CPUDETECT)
+CONFIGURE_ARGS+= --enable-runtime-cpudetect
+.endif
+
.if !defined(WITHOUT_SSSE3)
BUILD_DEPENDS+= ${LOCALBASE}/bin/as:${PORTSDIR}/devel/binutils
CONFIGURE_ENV+= COMPILER_PATH=${LOCALBASE}/bin
diff --git a/multimedia/ffmpeg-devel/files/patch-libswscale-utils.h b/multimedia/ffmpeg-devel/files/patch-libswscale-utils.h
new file mode 100644
index 000000000000..c0725a5d9a22
--- /dev/null
+++ b/multimedia/ffmpeg-devel/files/patch-libswscale-utils.h
@@ -0,0 +1,14 @@
+--- libswscale/utils.c.orig 2010-12-21 01:01:42.465502681 +0100
++++ libswscale/utils.c 2010-12-21 01:01:45.816480317 +0100
+@@ -915,7 +915,11 @@
+ c->chrMmx2FilterCode = av_malloc(c->chrMmx2FilterCodeSize);
+ #endif
+
++#ifdef MAP_ANONYMOUS
++ if (c->lumMmx2FilterCode == MAP_FAILED || c->chrMmx2FilterCode == MAP_FAILED)
++#else
+ if (!c->lumMmx2FilterCode || !c->chrMmx2FilterCode)
++#endif
+ return AVERROR(ENOMEM);
+ FF_ALLOCZ_OR_GOTO(c, c->hLumFilter , (dstW /8+8)*sizeof(int16_t), fail);
+ FF_ALLOCZ_OR_GOTO(c, c->hChrFilter , (c->chrDstW /4+8)*sizeof(int16_t), fail);