Index: multimedia/libx264/Makefile =================================================================== --- multimedia/libx264/Makefile +++ multimedia/libx264/Makefile @@ -13,10 +13,14 @@ USES= pathfix -OPTIONS_DEFINE= HI10P OPENCL -OPTIONS_DEFAULT= OPENCL +OPTIONS_DEFINE= ASM HI10P OPENCL +OPTIONS_DEFAULT= ASM OPENCL OPTIONS_EXCLUDE= FFMS GPAC LAVF LSMASH SWSCALE +ASM_BUILD_DEPENDS= ${ASM_BUILD_DEPENDS_${ARCH}} +ASM_BUILD_DEPENDS_amd64=${ASM_BUILD_DEPENDS_i386} +ASM_BUILD_DEPENDS_i386= yasm>=1.2.0:devel/yasm + HI10P_DESC= Enable High 10 Profile 10-bit encoding HI10P_CONFIGURE_ON= --bit-depth=10 Index: multimedia/x264/Makefile =================================================================== --- multimedia/x264/Makefile +++ multimedia/x264/Makefile @@ -34,15 +34,14 @@ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING -BUILD_DEPENDS= yasm>=1.2.0:devel/yasm \ - bash:shells/bash +BUILD_DEPENDS+= bash:shells/bash LIB_DEPENDS?= libx264.so:multimedia/libx264 X264_BUILD= 148 -X264_REV= 2768 -X264_COMMIT= d32d7bf1c6923a42cbd5ac2fd540ecbb009ba681 +X264_REV= 2795 +X264_COMMIT= aaa9aa83a111ed6f1db253d5afa91c5fc844583f X264_GITVER= ${X264_COMMIT:C/^(.......).*$/\1/g} -X264_SNAPSHOT= 20170522 +X264_SNAPSHOT= 20170626 USES?= pkgconfig USES+= gmake localbase shebangfix tar:bzip2 @@ -51,10 +50,10 @@ SHEBANG_FILES= configure PLIST_FILES?= bin/x264 -OPTIONS_DEFINE+= ASM DEBUG FFMS GCC LAVF PGO SWSCALE +OPTIONS_DEFINE+= DEBUG FFMS GCC LAVF PGO SWSCALE OPTIONS_RADIO+= MP4 OPTIONS_RADIO_MP4+= GPAC LSMASH -OPTIONS_DEFAULT+= ASM LSMASH +OPTIONS_DEFAULT+= FFMS LAVF LSMASH SWSCALE FFMS_DESC= FFmpeg Source input support GPAC_DESC= GPAC library support Index: multimedia/x264/distinfo =================================================================== --- multimedia/x264/distinfo +++ multimedia/x264/distinfo @@ -1,5 +1,5 @@ TIMESTAMP = 1495485905 -SHA256 (x264/x264-snapshot-20170522-2245-stable.tar.bz2) = f73d5006d69024d11ef457e430ea046966deb908670a183b93ba1866d4afcb20 -SIZE (x264/x264-snapshot-20170522-2245-stable.tar.bz2) = 735558 +SHA256 (x264/x264-snapshot-20170626-2245-stable.tar.bz2) = 0fe3e49eb8861b8fc429436070fb2dd525d141904a44487c48d1c2d6ad778eae +SIZE (x264/x264-snapshot-20170626-2245-stable.tar.bz2) = 736446 SHA256 (x264/example.y4m.bz2) = a5bec9d37362bd9d7773fbd0644643f9ec096d654d20823004e88d5df32bbff7 SIZE (x264/example.y4m.bz2) = 4910029 Index: multimedia/x264/files/patch-armv6 =================================================================== --- multimedia/x264/files/patch-armv6 +++ /dev/null @@ -1,45 +0,0 @@ -Downgrade SIMD usage to real armv6 (like Raspberry Pi) - ---- common/arm/quant-a.S.orig 2016-09-21 20:45:06 UTC -+++ common/arm/quant-a.S -@@ -316,6 +316,7 @@ dequant_4x4_dc_rshift: - bx lr - endfunc - -+#if ARCH_AARCH64 || HAVE_ARMV6T2 - .macro decimate_score_1x size - function x264_decimate_score\size\()_neon - vld1.16 {q0, q1}, [r0, :128] -@@ -361,6 +362,7 @@ endfunc - - decimate_score_1x 15 - decimate_score_1x 16 -+#endif - - function x264_decimate_score64_neon - push {lr} ---- common/quant.c.orig 2016-09-21 20:45:06 UTC -+++ common/quant.c -@@ -761,8 +761,10 @@ void x264_quant_init( x264_t *h, int cpu - pf->coeff_last[DCT_LUMA_4x4] = x264_coeff_last16_neon; - pf->coeff_last[DCT_LUMA_8x8] = x264_coeff_last64_neon; - pf->denoise_dct = x264_denoise_dct_neon; -+#if ARCH_AARCH64 || HAVE_ARMV6T2 - pf->decimate_score15 = x264_decimate_score15_neon; - pf->decimate_score16 = x264_decimate_score16_neon; -+#endif - pf->decimate_score64 = x264_decimate_score64_neon; - } - #endif ---- configure.orig 2016-09-21 20:45:06 UTC -+++ configure -@@ -874,9 +874,6 @@ if [ $asm = auto -a \( $ARCH = X86 -o $A - fi - - if [ $asm = auto -a $ARCH = ARM ] ; then -- # set flags so neon is built by default -- echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon" -- - if cc_check '' '' '__asm__("rev ip, ip");' ; then define HAVE_ARMV6 - cc_check '' '' '__asm__("movt r0, #0");' && define HAVE_ARMV6T2 - cc_check '' '' '__asm__("vadd.i16 q0, q0, q0");' && define HAVE_NEON Index: multimedia/x264/files/patch-configure =================================================================== --- multimedia/x264/files/patch-configure +++ multimedia/x264/files/patch-configure @@ -1,6 +1,6 @@ ---- configure.orig 2015-06-29 20:45:09 UTC +--- configure.orig 2017-06-26 20:45:05 UTC +++ configure -@@ -677,12 +677,6 @@ case $host_cpu in +@@ -682,12 +682,6 @@ case $host_cpu in AS_EXT=".asm" ASFLAGS="$ASFLAGS -DARCH_X86_64=0 -I\$(SRCPATH)/common/x86/" if [ $compiler = GNU ]; then @@ -13,16 +13,16 @@ CFLAGS="-m32 $CFLAGS" LDFLAGS="-m32 $LDFLAGS" fi -@@ -697,7 +691,7 @@ case $host_cpu in +@@ -702,7 +696,7 @@ case $host_cpu in ASFLAGS="$ASFLAGS -f elf32" fi ;; - x86_64) -+ x86_64|amd64) ++ amd64|x86_64) ARCH="X86_64" AS="${AS-yasm}" AS_EXT=".asm" -@@ -761,7 +755,7 @@ case $host_cpu in +@@ -776,7 +770,7 @@ case $host_cpu in AS="${AS-${CC}}" fi ;; @@ -30,32 +30,51 @@ + aarch64|arm64) ARCH="AARCH64" stack_alignment=16 - if [ "$SYS" = MACOSX ] ; then -@@ -882,9 +876,8 @@ if [ $asm = auto -a $ARCH = ARM ] ; then + AS="${AS-${CC}}" +@@ -875,7 +869,7 @@ elif [ $compiler = ICC -a $ARCH = X86 ]; then + fi + fi + +-if [ $asm = auto -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] ; then ++if [ $cli_libx264 != system -a $asm = auto -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] ; then + if ! as_check "vpmovzxwd ymm0, xmm0" ; then + VER=`($AS --version || echo no assembler) 2>/dev/null | head -n 1` + echo "Found $VER" +@@ -889,9 +883,6 @@ if [ $asm = auto -a \( $ARCH = X86 -o $ARCH = X86_64 \ + fi + + if [ $asm = auto -a $ARCH = ARM ] ; then +- # set flags so neon is built by default +- [ $compiler == CL ] || echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon" +- + cc_check '' '' '__asm__("add r0, r1, r2");' && define HAVE_ARM_INLINE_ASM + if [ $compiler = CL ] && cpp_check '' '' 'defined(_M_ARM) && _M_ARM >= 7' ; then + define HAVE_ARMV6 +@@ -902,9 +893,8 @@ if [ $asm = auto -a $ARCH = ARM ] ; then cc_check '' '' '__asm__("vadd.i16 q0, q0, q0");' && define HAVE_NEON ASFLAGS="$ASFLAGS -c" else - echo "You specified a pre-ARMv6 or Thumb-1 CPU in your CFLAGS." - echo "If you really want to run on such a CPU, configure with --disable-asm." - exit 1 -+ echo "No usable SIMD found, adding --disable-asm." ++ echo "No usable SIMD found, assuming --disable-asm." + asm="no" fi fi -@@ -911,9 +904,8 @@ if [ $asm = auto -a $ARCH = MIPS ] ; the +@@ -931,9 +921,8 @@ if [ $asm = auto -a $ARCH = MIPS ] ; then if cc_check '' '' '__asm__("addvi.b $w0, $w1, 1");' ; then define HAVE_MSA else - echo "You specified a pre-MSA CPU in your CFLAGS." - echo "If you really want to run on such a CPU, configure with --disable-asm." - exit 1 -+ echo "No usable SIMD found, adding --disable-asm." ++ echo "No usable SIMD found, assuming --disable-asm." + asm="no" fi fi -@@ -1225,10 +1217,6 @@ if cc_check '' -Wshadow ; then +@@ -1245,10 +1234,6 @@ if cc_check '' -Wshadow ; then CFLAGS="-Wshadow $CFLAGS" fi @@ -66,7 +85,7 @@ if [ $compiler = ICC -o $compiler = ICL ] ; then if cc_check 'extras/intel_dispatcher.h' '' 'x264_intel_dispatcher_override();' ; then define HAVE_INTEL_DISPATCHER -@@ -1128,6 +1118,9 @@ if [ "$opencl" = "yes" ]; then +@@ -1284,6 +1269,9 @@ if [ "$opencl" = "yes" ]; then opencl="yes" define HAVE_OPENCL libdl="-ldl"