head 1.11; access; symbols pkgsrc-2015Q4:1.10.0.16 pkgsrc-2015Q4-base:1.10 pkgsrc-2015Q3:1.10.0.14 pkgsrc-2015Q3-base:1.10 pkgsrc-2015Q2:1.10.0.12 pkgsrc-2015Q2-base:1.10 pkgsrc-2015Q1:1.10.0.10 pkgsrc-2015Q1-base:1.10 pkgsrc-2014Q4:1.10.0.8 pkgsrc-2014Q4-base:1.10 pkgsrc-2014Q3:1.10.0.6 pkgsrc-2014Q3-base:1.10 pkgsrc-2014Q2:1.10.0.4 pkgsrc-2014Q2-base:1.10 pkgsrc-2014Q1:1.10.0.2 pkgsrc-2014Q1-base:1.10 pkgsrc-2013Q4:1.9.0.10 pkgsrc-2013Q4-base:1.9 pkgsrc-2013Q3:1.9.0.8 pkgsrc-2013Q3-base:1.9 pkgsrc-2013Q2:1.9.0.6 pkgsrc-2013Q2-base:1.9 pkgsrc-2013Q1:1.9.0.4 pkgsrc-2013Q1-base:1.9 pkgsrc-2012Q4:1.9.0.2 pkgsrc-2012Q4-base:1.9 pkgsrc-2012Q3:1.7.0.14 pkgsrc-2012Q3-base:1.7 pkgsrc-2012Q2:1.7.0.12 pkgsrc-2012Q2-base:1.7 pkgsrc-2012Q1:1.7.0.10 pkgsrc-2012Q1-base:1.7 pkgsrc-2011Q4:1.7.0.8 pkgsrc-2011Q4-base:1.7 pkgsrc-2011Q3:1.7.0.6 pkgsrc-2011Q3-base:1.7 pkgsrc-2011Q2:1.7.0.4 pkgsrc-2011Q2-base:1.7 pkgsrc-2011Q1:1.7.0.2 pkgsrc-2011Q1-base:1.7 pkgsrc-2010Q4:1.6.0.6 pkgsrc-2010Q4-base:1.6 pkgsrc-2010Q3:1.6.0.4 pkgsrc-2010Q3-base:1.6 pkgsrc-2010Q2:1.6.0.2 pkgsrc-2010Q2-base:1.6 pkgsrc-2010Q1:1.5.0.8 pkgsrc-2010Q1-base:1.5 pkgsrc-2009Q4:1.5.0.6 pkgsrc-2009Q4-base:1.5 pkgsrc-2009Q3:1.5.0.4 pkgsrc-2009Q3-base:1.5 pkgsrc-2009Q2:1.5.0.2 pkgsrc-2009Q2-base:1.5 pkgsrc-2009Q1:1.4.0.4 pkgsrc-2009Q1-base:1.4 pkgsrc-2008Q4:1.4.0.2 pkgsrc-2008Q4-base:1.4 pkgsrc-2008Q3:1.3.0.8 pkgsrc-2008Q3-base:1.3 cube-native-xorg:1.3.0.6 cube-native-xorg-base:1.3 pkgsrc-2008Q2:1.3.0.4 pkgsrc-2008Q2-base:1.3 cwrapper:1.3.0.2 pkgsrc-2008Q1:1.2.0.2 pkgsrc-2008Q1-base:1.2; locks; strict; comment @# @; 1.11 date 2015.12.28.11.37.03; author adam; state dead; branches; next 1.10; commitid 0toXJ6kB6X39WHOy; 1.10 date 2014.03.04.13.59.11; author adam; state Exp; branches; next 1.9; commitid RdfuaAEcTd4l4orx; 1.9 date 2012.11.28.16.29.53; author adam; state Exp; branches; next 1.8; 1.8 date 2012.11.08.19.55.56; author adam; state Exp; branches; next 1.7; 1.7 date 2011.01.17.16.46.42; author drochner; state Exp; branches; next 1.6; 1.6 date 2010.05.04.18.18.57; author drochner; state Exp; branches; next 1.5; 1.5 date 2009.05.25.20.56.38; author drochner; state Exp; branches; next 1.4; 1.4 date 2008.12.18.16.19.07; author bjs; state Exp; branches; next 1.3; 1.3 date 2008.07.10.15.11.53; author joerg; state Exp; branches; next 1.2; 1.2 date 2008.03.18.15.05.04; author tron; state dead; branches; next 1.1; 1.1 date 2008.03.10.11.59.26; author drochner; state Exp; branches; next ; desc @@ 1.11 log @Changes 20151227: * ppc: Add detection of AltiVec support for FreeBSD * Don't assume 16-byte stack alignment by default on x86-32 * Fix a few static analyzer performance hints * Revise the row VBV algorithm * Fix high bit depth lookahead cost compensation algorithm * Correctly update the intra row predictor in B-frames * Change the predictors update algorithm @ text @$NetBSD: patch-ac,v 1.10 2014/03/04 13:59:11 adam Exp $ --- common/cpu.c.orig 2014-03-03 21:45:04.000000000 +0000 +++ common/cpu.c @@@@ -39,7 +39,7 @@@@ #include #include #endif -#if SYS_OPENBSD +#if defined(SYS_OPENBSD) || defined(SYS_NETBSD) #include #include #include @@@@ -313,13 +313,13 @@@@ uint32_t x264_cpu_detect( void ) #elif ARCH_PPC -#if SYS_MACOSX || SYS_OPENBSD +#if defined(SYS_MACOSX) || defined(SYS_OPENBSD) || defined(SYS_NETBSD) #include uint32_t x264_cpu_detect( void ) { /* Thank you VLC */ uint32_t cpu = 0; -#if SYS_OPENBSD +#if defined(SYS_OPENBSD) || defined(SYS_NETBSD) int selectors[2] = { CTL_MACHDEP, CPU_ALTIVEC }; #else int selectors[2] = { CTL_HW, HW_VECTORUNIT }; @@@@ -447,7 +447,7 @@@@ int x264_cpu_num_processors( void ) #elif SYS_MACOSX || SYS_FREEBSD || SYS_OPENBSD int ncpu; size_t length = sizeof( ncpu ); -#if SYS_OPENBSD +#if defined(SYS_OPENBSD) || defined(SYS_NETBSD) int mib[2] = { CTL_HW, HW_NCPU }; if( sysctl(mib, 2, &ncpu, &length, NULL, 0) ) #else @ 1.10 log @Changes 20140303: Bug fixes. Enabled OpenCL for Darwin. Fix building with Clang. @ text @d1 1 a1 1 $NetBSD$ @ 1.9 log @Updated to snapshot 20121127 @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.8 2012/11/08 19:55:56 adam Exp $ d3 1 a3 1 --- common/cpu.c.orig 2012-11-07 21:45:03.000000000 +0000 d14 1 a14 1 @@@@ -293,13 +293,13 @@@@ uint32_t x264_cpu_detect( void ) d30 1 a30 1 @@@@ -427,7 +427,7 @@@@ int x264_cpu_num_processors( void ) @ 1.8 log @Changes 20121107: This is another snapshot. @ text @d1 1 a1 1 $NetBSD$ d30 1 a30 1 @@@@ -424,7 +424,7 @@@@ int x264_cpu_num_processors( void ) @ 1.7 log @update to 20110101, from Makoto Fujiwara per pkgsrc-wip (I've just put back libtool support.) needed for update of ffmpeg which in turn is needed for updates of eg vlc and gst-plugin-ffmpeg @ text @d3 2 a4 2 --- common/cpu.c.orig 2010-11-02 06:45:07.000000000 +0900 +++ common/cpu.c 2011-01-09 21:05:03.000000000 +0900 d14 1 a14 1 @@@@ -237,13 +237,13 @@@@ d30 1 a30 1 @@@@ -361,7 +361,7 @@@@ @ 1.6 log @update to the 20090920 snapshot The snapshot date is chosen for some reason: -vlc-1.0.6 (which I'll commit soon) needs an API change which was introduced on 20090813 -pkgsrc's ffmpeg can't deal with an API change which was done 20090921 (and is not easily updated) @ text @d3 3 a5 3 --- common/cpu.c.orig 2010-04-22 20:45:07.000000000 +0000 +++ common/cpu.c @@@@ -36,7 +36,7 @@@@ d9 1 a9 1 -#ifdef SYS_OPENBSD d14 1 a14 1 @@@@ -226,13 +226,13 @@@@ uint32_t x264_cpu_detect( void ) d16 1 a16 1 #elif defined( ARCH_PPC ) d18 1 a18 1 -#if defined(SYS_MACOSX) || defined(SYS_OPENBSD) d25 1 a25 1 -#ifdef SYS_OPENBSD d30 9 @ 1.5 log @update to the 20090326 snapshot. This is not absolutely new, but there was a period of relative quietness in x264 development, and I've been testing this snapshot for some weeks (on i386). There are too many changes to list here. @ text @d3 1 a3 1 --- common/cpu.c.orig 2009-04-05 21:01:48.000000000 +0200 d5 1 a5 1 @@@@ -33,7 +33,7 @@@@ d14 1 a14 1 @@@@ -200,13 +200,13 @@@@ uint32_t x264_cpu_detect( void ) a29 9 @@@@ -223,7 +223,7 @@@@ uint32_t x264_cpu_detect( void ) return cpu; } -#elif defined( SYS_LINUX ) +#elif defined(SYS_LINUX) || defined(SYS_NETBSD) #include #include static sigjmp_buf jmpbuf; @ 1.4 log @Update to 20081218 snapshot. There is no NEWS file or list of changes; please see the repository for more information. I'm doing this update our version is over a year old and some software is starting to require a newer version. @ text @d3 1 a3 1 --- common/cpu.c.orig 2008-11-15 16:45:06.000000000 -0500 d5 1 a5 1 @@@@ -32,6 +32,10 @@@@ d9 1 d11 4 a14 7 +#include +#include +#endif #include "common.h" #include "cpu.h" @@@@ -185,17 +189,28 @@@@ uint32_t x264_cpu_detect( void ) d18 1 a18 1 -#ifdef SYS_MACOSX a20 3 +#if defined(SYS_OPENBSD) || defined(SYS_NETBSD) +#include +#endif d25 1 a25 7 - int selectors[2] = { CTL_HW, HW_VECTORUNIT }; - int has_altivec = 0; + int selectors[2]; + int has_altivec = 0, error; size_t length = sizeof( has_altivec ); - int error = sysctl( selectors, 2, &has_altivec, &length, NULL, 0 ); d27 1 a27 37 + selectors[0] = CTL_MACHDEP; + selectors[1] = CPU_ALTIVEC; +#else + selectors[0] = CTL_HW; + selectors[1] = HW_VECTORUNIT; +#endif + + error = sysctl( selectors, 2, &has_altivec, &length, NULL, 0 ); if( error == 0 && has_altivec != 0 ) { cpu |= X264_CPU_ALTIVEC; @@@@ -285,7 +300,7 @@@@ int x264_cpu_num_processors( void ) get_system_info( &info ); return info.cpu_count; -#elif defined(SYS_MACOSX) || defined(SYS_FREEBSD) +#elif defined(SYS_MACOSX) || defined(SYS_FREEBSD) int numberOfCPUs; size_t length = sizeof( numberOfCPUs ); if( sysctlbyname("hw.ncpu", &numberOfCPUs, &length, NULL, 0) ) @@@@ -294,6 +309,19 @@@@ int x264_cpu_num_processors( void ) } return numberOfCPUs; +#elif defined(SYS_OPENBSD) || defined(SYS_NETBSD) + int mib[2], numberOfCPUs; + size_t length = sizeof( numberOfCPUs ); + + mib[0] = CTL_HW; + mib[1] = HW_NCPU; + + if( sysctl(mib, 2, &numberOfCPUs, &length, NULL, 0) ) + { + numberOfCPUs = 1; + } + return numberOfCPUs; + d29 10 a38 2 return 1; #endif @ 1.3 log @Fix compilation on Solaris, which lacks isinfinite as reported by Daniel Vergien. @ text @d3 5 a7 4 --- common/osdep.h.orig 2008-07-10 15:44:08.000000000 +0200 +++ common/osdep.h @@@@ -44,7 +44,7 @@@@ #define X264_VERSION "" // no configure script for msvc d9 4 d14 63 a76 3 -#ifdef SYS_OPENBSD +#if defined(SYS_OPENBSD) || defined(SYS_SunOS) #define isfinite finite a77 1 #if defined(_MSC_VER) || defined(SYS_SunOS) || defined(SYS_MACOSX) @ 1.2 log @Fix build under Mac OS X Intel by stripping out the "-fno-common" that "yasm" doesn't understand. Also improve the similar hack used under NetBSD to strip out "-fpic". @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.1 2008/03/10 11:59:26 drochner Exp $ d3 11 a13 20 --- strip_fPIC.sh.orig 2008-01-11 20:38:05.000000000 +0100 +++ strip_fPIC.sh @@@@ -0,0 +1,17 @@@@ +#!/bin/sh +# +# libtool assumes that the compiler can handle the -fPIC flag +# This isn't always true (for example, nasm can't handle it) +command="" +while [ $1 ]; do + if [ "$1" != "-fPIC" ]; then + if [ "$1" = "-DPIC" ]; then + command="$command -D__PIC__" + else + command="$command $1" + fi + fi + shift +done +echo $command +exec $command @ 1.1 log @now that that we rely on the fact that we get correct PIC from yasm we can as well use libtool, to get a proper .so which can be dynamically loaded, tested by Mihai Chelaru, bump PKGREVISION @ text @d1 1 a1 1 $NetBSD$ @