Make use of Clang's integrated assembler to build the x86 ASM support within x264 so as to use MMX / MMXEXT / SSE / SSE2 / SSSE3 and if there is kernel support added also AVX / AVX2. This can have quite an impact on performance improving encoding speed by 2 - 3 times.
Index: Makefile =================================================================== RCS file: /home/cvs/ports/multimedia/x264/Makefile,v retrieving revision 1.26 diff -u -p -u -p -r1.26 Makefile --- Makefile 6 Oct 2013 20:38:52 -0000 1.26 +++ Makefile 14 Dec 2013 05:34:38 -0000 @@ -5,6 +5,7 @@ COMMENT= free H.264/MPEG-4 AVC encoder V= 20131002 DISTNAME= x264-snapshot-${V}-2245 PKGNAME= x264-${V} +REVISION= 0 CATEGORIES= multimedia MASTER_SITES= http://downloads.videolan.org/pub/videolan/x264/snapshots/ EXTRACT_SUFX= .tar.bz2 @@ -21,16 +22,28 @@ PERMIT_PACKAGE_FTP= Yes WANTLIB= c m pthread +MODULES= lang/clang + +MODCLANG_ARCHS= amd64 i386 +MODCLANG_LANGS= c + +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +BUILD_DEPENDS+= devel/yasm +.endif + USE_GMAKE= Yes CONFIGURE_STYLE= simple CONFIGURE_ENV= API=${LIBx264_VERSION} -CONFIGURE_ARGS+=--disable-asm \ - --disable-ffms \ +CONFIGURE_ARGS+=--disable-ffms \ --disable-gpac \ --disable-lavf \ --disable-swscale \ --enable-static \ --prefix=${PREFIX} + +.if ${MACHINE_ARCH} != "amd64" && ${MACHINE_ARCH} != "i386" +CONFIGURE_ARGS+=--disable-asm +.endif NO_TEST= Yes -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.