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
This commit is contained in:
parent
ca126a8dbe
commit
d606359235
12 changed files with 157 additions and 176 deletions
|
@ -1,6 +1,6 @@
|
|||
# $NetBSD: Makefile,v 1.25 2010/08/11 19:11:55 tsutsui Exp $
|
||||
# $NetBSD: Makefile,v 1.26 2011/01/17 16:46:42 drochner Exp $
|
||||
|
||||
SNAPSHOT_DATE= 20090920
|
||||
SNAPSHOT_DATE= 20110101
|
||||
|
||||
DISTNAME= x264-snapshot-${SNAPSHOT_DATE}-2245
|
||||
PKGNAME= x264-devel-${SNAPSHOT_DATE}
|
||||
|
@ -21,19 +21,17 @@ CFLAGS+= -DHAVE_STDLIB_H
|
|||
.endif
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
. if ${OPSYS} == "Darwin" || ${OPSYS} == "SunOS" || \
|
||||
(${OPSYS} == "NetBSD" && \
|
||||
(!empty(OS_VERSION:M[1-5].*) && empty(OS_VERSION:M5.99.*)))
|
||||
. if ${OPSYS} == "SunOS" || (${OPSYS} == "NetBSD" && \
|
||||
(!empty(OS_VERSION:M[1-5].*) && empty(OS_VERSION:M5.99.*)))
|
||||
CONFIGURE_ARGS+= --disable-asm
|
||||
. else
|
||||
BUILD_DEPENDS+= yasm>=0.4.0:../../devel/yasm
|
||||
BUILD_DEPENDS+= yasm>=0.4.0:../../devel/yasm
|
||||
. endif
|
||||
.elif ${MACHINE_ARCH} == "x86_64"
|
||||
BUILD_DEPENDS+= yasm>=0.4.0:../../devel/yasm
|
||||
.elif ${MACHINE_ARCH} == "arm" && ${OPSYS} == "NetBSD"
|
||||
# pre-ARMv6 is default on NetBSD/arm
|
||||
CONFIGURE_ARGS+= --disable-asm
|
||||
.elif ${MACHINE_ARCH} == "arm"
|
||||
. if ${OPSYS} == "NetBSD" # pre-ARMv6 is default on NetBSD/arm
|
||||
CONFIGURE_ARGS+= --disable-asm
|
||||
. endif
|
||||
.endif
|
||||
|
||||
USE_TOOLS+= gmake bash
|
||||
|
@ -42,8 +40,7 @@ USE_LIBTOOL= yes
|
|||
HAS_CONFIGURE= yes
|
||||
CONFIG_SHELL= ${BASH}
|
||||
CONFIGURE_ARGS+= --enable-pic # uses libtool's -prefer-pic
|
||||
CONFIGURE_ARGS+= --prefix=${PREFIX:Q}
|
||||
CONFIGURE_ARGS+= --disable-mp4-output # needs GPAC, not in pkgsrc
|
||||
CONFIGURE_ARGS+= --prefix=${PREFIX}
|
||||
MAKE_ENV+= SH=${SH:Q}
|
||||
|
||||
BUILD_TARGET= default
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
@comment $NetBSD: PLIST,v 1.2 2008/03/10 11:59:26 drochner Exp $
|
||||
@comment $NetBSD: PLIST,v 1.3 2011/01/17 16:46:42 drochner Exp $
|
||||
bin/x264
|
||||
include/x264.h
|
||||
include/x264_config.h
|
||||
lib/libx264.la
|
||||
lib/pkgconfig/x264.pc
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: buildlink3.mk,v 1.9 2009/03/20 19:25:06 joerg Exp $
|
||||
# $NetBSD: buildlink3.mk,v 1.10 2011/01/17 16:46:42 drochner Exp $
|
||||
|
||||
BUILDLINK_TREE+= x264-devel
|
||||
|
||||
|
@ -12,8 +12,9 @@ X264_DEVEL_BUILDLINK3_MK:=
|
|||
### into the version number and/or pkg-config file?
|
||||
###
|
||||
### Prior specification: x264-devel>=20060127 # X264_BUILD 44
|
||||
### Prior specification: x264-devel>=20081217 # X264_BUILD 65
|
||||
###
|
||||
BUILDLINK_API_DEPENDS.x264-devel+= x264-devel>=20081217 # X264_BUILD 65
|
||||
BUILDLINK_API_DEPENDS.x264-devel+= x264-devel>=20110101 # X264_BUILD 112
|
||||
BUILDLINK_PKGSRCDIR.x264-devel?= ../../multimedia/x264-devel
|
||||
pkgbase:= x264-devel
|
||||
. include "../../mk/pkg-build-options.mk"
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
$NetBSD: distinfo,v 1.21 2010/05/07 09:34:43 drochner Exp $
|
||||
$NetBSD: distinfo,v 1.22 2011/01/17 16:46:42 drochner Exp $
|
||||
|
||||
SHA1 (x264-snapshot-20090920-2245.tar.bz2) = de37c75bdcbfb4e16fba006afd932020b93d8a66
|
||||
RMD160 (x264-snapshot-20090920-2245.tar.bz2) = c0303b906f4de285eb4c9460882e6df4cf92f4a3
|
||||
Size (x264-snapshot-20090920-2245.tar.bz2) = 2736477 bytes
|
||||
SHA1 (patch-aa) = e77e346640cb0512f9ca5b678bf325f915a69da7
|
||||
SHA1 (patch-ab) = 6db45e7995b7986d8b0bf95a777eff71527a189d
|
||||
SHA1 (patch-ac) = b3c91319b287278dd98c822dd7e35e273a238f70
|
||||
SHA1 (patch-ak) = d8362f3beadcc5cc19684a12b3794d542f502f14
|
||||
SHA1 (patch-am) = 07418547d05fd6c6e1703725a4cc5f1ddc36dca1
|
||||
SHA1 (patch-an) = 69e2a8f6167fd2410c69e4df3e3a071c8c0c835f
|
||||
SHA1 (patch-ba) = a80323251ccb1434e4154e9736462ddf39e04c1d
|
||||
SHA1 (x264-snapshot-20110101-2245.tar.bz2) = 8798a3d20cb6c80f40f21aee44d4e85d842435bd
|
||||
RMD160 (x264-snapshot-20110101-2245.tar.bz2) = 642d69d6265d6486ceee014d56ca91d07c5c2bb0
|
||||
Size (x264-snapshot-20110101-2245.tar.bz2) = 477314 bytes
|
||||
SHA1 (patch-aa) = eb4d91e897197586215f9915d2f83008d0613bc7
|
||||
SHA1 (patch-ab) = 3cd899d5306c2b3024c9117e801f39a1b62f920b
|
||||
SHA1 (patch-ac) = a1bd65058559ec1704e2b64dade9f5a84066e67a
|
||||
SHA1 (patch-ak) = 3c8d6650147ad6a0043d705464267a5d947da488
|
||||
SHA1 (patch-am) = c34f02fae14236d95ba027aa8942e463f80c878d
|
||||
SHA1 (patch-an) = ac9522d86b9ce7d2689f21cff3c504f2f300c08a
|
||||
SHA1 (patch-ba) = eef8e69f33420dc8ec2c7aeec24debb80caa7090
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: options.mk,v 1.2 2008/12/18 22:23:36 bjs Exp $
|
||||
# $NetBSD: options.mk,v 1.3 2011/01/17 16:46:42 drochner Exp $
|
||||
|
||||
PKG_OPTIONS_VAR= PKG_OPTIONS.x264-devel
|
||||
PKG_SUPPORTED_OPTIONS= debug threads
|
||||
|
@ -10,7 +10,6 @@ PKG_SUGGESTED_OPTIONS+= threads
|
|||
.include "../../mk/bsd.options.mk"
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mthreads)
|
||||
CONFIGURE_ARGS+= --enable-pthread
|
||||
. include "../../mk/pthread.buildlink3.mk"
|
||||
.else
|
||||
CONFIGURE_ARGS+= --disable-pthread
|
||||
|
|
|
@ -1,78 +1,53 @@
|
|||
$NetBSD: patch-aa,v 1.10 2010/05/07 09:34:43 drochner Exp $
|
||||
$NetBSD: patch-aa,v 1.11 2011/01/17 16:46:42 drochner Exp $
|
||||
|
||||
--- configure.orig 2009-09-20 20:45:09.000000000 +0000
|
||||
+++ configure
|
||||
@@ -117,7 +117,7 @@ for opt do
|
||||
LDFLAGS="$LDFLAGS ${opt#--extra-ldflags=}"
|
||||
;;
|
||||
--enable-pthread)
|
||||
- pthread="auto" # can't skip detection, since it differs by OS
|
||||
+ pthread="yes"
|
||||
;;
|
||||
--disable-pthread)
|
||||
pthread="no"
|
||||
@@ -137,7 +137,7 @@ for opt do
|
||||
shared="yes"
|
||||
;;
|
||||
--enable-visualize)
|
||||
- LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
|
||||
+ LDFLAGS="$LDFLAGS -lX11"
|
||||
CFLAGS="$CFLAGS -DVISUALIZE=1"
|
||||
vis="yes"
|
||||
;;
|
||||
@@ -187,6 +187,10 @@ case $host_os in
|
||||
SYS="FREEBSD"
|
||||
LDFLAGS="$LDFLAGS -lm"
|
||||
;;
|
||||
+ dragonfly*)
|
||||
+ SYS="DRAGONFLY"
|
||||
+ LDFLAGS="$LDFLAGS -lm"
|
||||
+ ;;
|
||||
kfreebsd*-gnu)
|
||||
SYS="FREEBSD"
|
||||
CFLAGS="$CFLAGS -DHAVE_MALLOC_H"
|
||||
@@ -250,7 +254,7 @@ case $host_cpu in
|
||||
ASFLAGS="$ASFLAGS -f elf"
|
||||
fi
|
||||
;;
|
||||
- x86_64)
|
||||
+ x86_64|amd64)
|
||||
ARCH="X86_64"
|
||||
AS="yasm"
|
||||
if [ "$SYS" = MACOSX ];then
|
||||
@@ -264,11 +268,11 @@ case $host_cpu in
|
||||
fi
|
||||
;;
|
||||
powerpc|powerpc64)
|
||||
- ARCH="PPC"
|
||||
if [ $SYS = MACOSX ]
|
||||
then
|
||||
- ALTIVECFLAGS="$ALTIVECFLAGS -faltivec -fastf -mcpu=G4"
|
||||
+ ARCH="POWERPC"
|
||||
else
|
||||
+ ARCH="PPC"
|
||||
ALTIVECFLAGS="$ALTIVECFLAGS -maltivec -mabi=altivec -DHAVE_ALTIVEC_H"
|
||||
fi
|
||||
;;
|
||||
@@ -354,7 +358,7 @@ grep -q BIGE conftest.o && CFLAGS="$CFLA
|
||||
|
||||
# autodetect options that weren't forced nor disabled
|
||||
--- configure.orig 2011-01-02 06:45:05.000000000 +0900
|
||||
+++ configure 2011-01-09 21:33:08.000000000 +0900
|
||||
@@ -306,6 +306,10 @@
|
||||
SYS="FREEBSD"
|
||||
LDFLAGS="$LDFLAGS -lm"
|
||||
;;
|
||||
+ dragonfly*)
|
||||
+ SYS="DRAGONFLY"
|
||||
+ LDFLAGS="$LDFLAGS -lm"
|
||||
+ ;;
|
||||
kfreebsd*-gnu)
|
||||
SYS="FREEBSD"
|
||||
define HAVE_MALLOC_H
|
||||
@@ -369,7 +373,7 @@
|
||||
ASFLAGS="$ASFLAGS -f elf"
|
||||
fi
|
||||
;;
|
||||
- x86_64)
|
||||
+ x86_64|amd64)
|
||||
ARCH="X86_64"
|
||||
AS="yasm"
|
||||
if [ "$SYS" = MACOSX ]; then
|
||||
@@ -386,13 +390,14 @@
|
||||
fi
|
||||
;;
|
||||
powerpc|powerpc64)
|
||||
- ARCH="PPC"
|
||||
if [ $asm = auto ] ; then
|
||||
define HAVE_ALTIVEC
|
||||
AS="${AS-${cross_prefix}gcc}"
|
||||
if [ $SYS = MACOSX ] ; then
|
||||
+ ARCH="POWERPC"
|
||||
CFLAGS="$CFLAGS -faltivec -fastf -mcpu=G4"
|
||||
else
|
||||
+ ARCH="PPC"
|
||||
CFLAGS="$CFLAGS -maltivec -mabi=altivec"
|
||||
define HAVE_ALTIVEC_H
|
||||
fi
|
||||
@@ -522,7 +527,7 @@
|
||||
# pthread-win32 is lgpl, prevent its use if --disable-gpl is specified and targeting windows
|
||||
[ "$SYS" = "MINGW" -a "$gpl" = "no" -a "$thread" = "auto" ] && thread="win32"
|
||||
|
||||
-libpthread=""
|
||||
+libpthread="$PTHREAD_LDFLAGS $PTHREAD_LIBS"
|
||||
if test "$pthread" = "auto" ; then
|
||||
pthread="no"
|
||||
if [ "$thread" = "auto" ]; then
|
||||
thread="no"
|
||||
case $SYS in
|
||||
@@ -387,7 +391,7 @@ if test "$pthread" = "auto" ; then
|
||||
esac
|
||||
fi
|
||||
if test "$pthread" = "yes" ; then
|
||||
- CFLAGS="$CFLAGS -DHAVE_PTHREAD"
|
||||
+ CFLAGS="$CFLAGS -DHAVE_PTHREAD $PTHREAD_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $libpthread"
|
||||
fi
|
||||
|
||||
@@ -424,7 +428,8 @@ if [ "$avis_input" = "yes" ] ; then
|
||||
@@ -712,7 +717,8 @@
|
||||
fi
|
||||
|
||||
if [ "$pic" = "yes" ] ; then
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
$NetBSD: patch-ab,v 1.12 2010/05/04 18:18:57 drochner Exp $
|
||||
$NetBSD: patch-ab,v 1.13 2011/01/17 16:46:42 drochner Exp $
|
||||
|
||||
--- Makefile.orig 2009-09-20 20:45:09.000000000 +0000
|
||||
--- Makefile.orig 2011-01-01 21:45:05.000000000 +0000
|
||||
+++ Makefile
|
||||
@@ -40,9 +40,9 @@ endif
|
||||
@@ -86,9 +86,9 @@ endif
|
||||
ifdef ARCH_X86
|
||||
ASFLAGS += -Icommon/x86/
|
||||
SRCS += common/x86/mc-c.c common/x86/predict-c.c
|
||||
|
@ -14,16 +14,7 @@ $NetBSD: patch-ab,v 1.12 2010/05/04 18:18:57 drochner Exp $
|
|||
endif
|
||||
endif
|
||||
|
||||
@@ -52,7 +52,7 @@ ALTIVECSRC += common/ppc/mc.c common/ppc
|
||||
common/ppc/quant.c common/ppc/deblock.c \
|
||||
common/ppc/predict.c
|
||||
SRCS += $(ALTIVECSRC)
|
||||
-$(ALTIVECSRC:%.c=%.o): CFLAGS += $(ALTIVECFLAGS)
|
||||
+$(ALTIVECSRC:%.c=%.lo): CFLAGS += $(ALTIVECFLAGS)
|
||||
endif
|
||||
|
||||
# NEON optims
|
||||
@@ -62,44 +62,49 @@ ASMSRC += common/arm/cpu-a.S common/arm/
|
||||
@@ -108,7 +108,7 @@ ASMSRC += common/arm/cpu-a.S common/arm/
|
||||
common/arm/dct-a.S common/arm/quant-a.S common/arm/deblock-a.S \
|
||||
common/arm/predict-a.S
|
||||
SRCS += common/arm/mc-c.c common/arm/predict-c.c
|
||||
|
@ -32,24 +23,27 @@ $NetBSD: patch-ab,v 1.12 2010/05/04 18:18:57 drochner Exp $
|
|||
endif
|
||||
endif
|
||||
|
||||
# VIS optims
|
||||
ifeq ($(ARCH),UltraSparc)
|
||||
@@ -116,7 +116,7 @@ endif
|
||||
ifeq ($(ARCH),UltraSPARC)
|
||||
ifeq ($(findstring HIGH_BIT_DEPTH, $(CONFIG)),)
|
||||
ASMSRC += common/sparc/pixel.asm
|
||||
-OBJASM = $(ASMSRC:%.asm=%.o)
|
||||
+OBJASM = $(ASMSRC:%.asm=%.lo)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(HAVE_GETOPT_LONG),1)
|
||||
SRCS += extras/getopt.c
|
||||
@@ -130,8 +130,8 @@ SRCSO += x264dll.c
|
||||
endif
|
||||
endif
|
||||
|
||||
-OBJS = $(SRCS:%.c=%.o)
|
||||
-OBJCLI = $(SRCCLI:%.c=%.o)
|
||||
+OBJS = $(SRCS:%.c=%.lo)
|
||||
+OBJCLI = $(SRCCLI:%.c=%.lo)
|
||||
OBJSO = $(SRCSO:%.c=%.o)
|
||||
DEP = depend
|
||||
|
||||
.PHONY: all default fprofiled clean distclean install uninstall dox test testclean
|
||||
@@ -139,22 +139,26 @@ DEP = depend
|
||||
|
||||
default: $(DEP) x264$(EXE)
|
||||
|
||||
|
@ -64,13 +58,13 @@ $NetBSD: patch-ab,v 1.12 2010/05/04 18:18:57 drochner Exp $
|
|||
+ ${CC} -o libx264.la -rpath ${PREFIX}/lib -version-info 0 \
|
||||
+ $(OBJS) $(OBJASM) ${LDFLAGS}
|
||||
|
||||
$(SONAME): .depend $(OBJS) $(OBJASM)
|
||||
$(CC) -shared -o $@ $(OBJS) $(OBJASM) $(SOFLAGS) $(LDFLAGS)
|
||||
$(SONAME): .depend $(OBJS) $(OBJASM) $(OBJSO)
|
||||
$(CC) -shared -o $@ $(OBJS) $(OBJASM) $(OBJSO) $(SOFLAGS) $(LDFLAGS)
|
||||
|
||||
-x264$(EXE): $(OBJCLI) libx264.a
|
||||
- $(CC) -o $@ $+ $(LDFLAGS)
|
||||
+x264$(EXE): $(OBJCLI) libx264.la
|
||||
+ ${LIBTOOL} --mode=link $(CC) -o $@ $+ $(LDFLAGS)
|
||||
-x264$(EXE): $(OBJCLI) libx264.a
|
||||
- $(CC) -o $@ $+ $(LDFLAGSCLI) $(LDFLAGS)
|
||||
+x264$(EXE): $(OBJCLI) libx264.la
|
||||
+ ${LIBTOOL} --mode=link $(CC) -o $@ $+ $(LDFLAGSCLI) $(LDFLAGS)
|
||||
|
||||
-checkasm: tools/checkasm.o libx264.a
|
||||
- $(CC) -o $@ $+ $(LDFLAGS)
|
||||
|
@ -83,19 +77,23 @@ $NetBSD: patch-ab,v 1.12 2010/05/04 18:18:57 drochner Exp $
|
|||
+%.lo: %.asm
|
||||
+ ${LIBTOOL} --mode=compile --tag=CC \
|
||||
+ ./strip_fopt.sh $(AS) $(ASFLAGS) -o $@ $<
|
||||
+ -@ $(STRIP) -x $(@:.lo=.o) # delete local/anonymous symbols, so they don't show up in oprofile
|
||||
|
||||
%.o: %.S
|
||||
$(AS) $(ASFLAGS) -o $@ $<
|
||||
@@ -156,21 +161,16 @@ distclean: clean
|
||||
rm -f config.mak config.h x264.pc
|
||||
@@ -212,24 +216,17 @@ distclean: clean
|
||||
rm -f config.mak x264_config.h config.h config.log x264.pc
|
||||
rm -rf test/
|
||||
|
||||
-install: x264$(EXE) $(SONAME)
|
||||
- install -d $(DESTDIR)$(bindir)
|
||||
- install -d $(DESTDIR)$(includedir)
|
||||
- install -d $(DESTDIR)$(libdir)
|
||||
- install -d $(DESTDIR)$(libdir)/pkgconfig
|
||||
+install: x264$(EXE) libx264.la
|
||||
install -d $(DESTDIR)$(bindir) $(DESTDIR)$(includedir)
|
||||
install -d $(DESTDIR)$(libdir) $(DESTDIR)$(libdir)/pkgconfig
|
||||
+ install -d $(DESTDIR)$(bindir) $(DESTDIR)$(includedir)
|
||||
+ install -d $(DESTDIR)$(libdir) $(DESTDIR)$(libdir)/pkgconfig
|
||||
install -m 644 x264.h $(DESTDIR)$(includedir)
|
||||
install -m 644 x264_config.h $(DESTDIR)$(includedir)
|
||||
- install -m 644 libx264.a $(DESTDIR)$(libdir)
|
||||
+ ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} libx264.la $(DESTDIR)$(libdir)
|
||||
install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
|
||||
|
@ -105,10 +103,10 @@ $NetBSD: patch-ab,v 1.12 2010/05/04 18:18:57 drochner Exp $
|
|||
ifeq ($(SYS),MINGW)
|
||||
$(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(bindir))
|
||||
-else
|
||||
- $(if $(SONAME), ln -sf $(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX))
|
||||
- $(if $(SONAME), ln -f -s $(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX))
|
||||
- $(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(libdir))
|
||||
endif
|
||||
- $(if $(IMPLIBNAME), install -m 644 $(IMPLIBNAME) $(DESTDIR)$(libdir))
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(includedir)/x264.h $(DESTDIR)$(libdir)/libx264.a
|
||||
rm -f $(DESTDIR)$(includedir)/x264.h $(DESTDIR)$(includedir)/x264_config.h $(DESTDIR)$(libdir)/libx264.a
|
||||
|
|
|
@ -1,29 +1,38 @@
|
|||
$NetBSD: patch-ac,v 1.6 2010/05/04 18:18:57 drochner Exp $
|
||||
$NetBSD: patch-ac,v 1.7 2011/01/17 16:46:42 drochner Exp $
|
||||
|
||||
--- common/cpu.c.orig 2010-04-22 20:45:07.000000000 +0000
|
||||
+++ common/cpu.c
|
||||
@@ -36,7 +36,7 @@
|
||||
--- common/cpu.c.orig 2010-11-02 06:45:07.000000000 +0900
|
||||
+++ common/cpu.c 2011-01-09 21:05:03.000000000 +0900
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
-#ifdef SYS_OPENBSD
|
||||
-#if SYS_OPENBSD
|
||||
+#if defined(SYS_OPENBSD) || defined(SYS_NETBSD)
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <machine/cpu.h>
|
||||
@@ -226,13 +226,13 @@ uint32_t x264_cpu_detect( void )
|
||||
@@ -237,13 +237,13 @@
|
||||
|
||||
#elif defined( ARCH_PPC )
|
||||
#elif ARCH_PPC
|
||||
|
||||
-#if defined(SYS_MACOSX) || defined(SYS_OPENBSD)
|
||||
-#if SYS_MACOSX || SYS_OPENBSD
|
||||
+#if defined(SYS_MACOSX) || defined(SYS_OPENBSD) || defined(SYS_NETBSD)
|
||||
#include <sys/sysctl.h>
|
||||
uint32_t x264_cpu_detect( void )
|
||||
{
|
||||
/* Thank you VLC */
|
||||
uint32_t cpu = 0;
|
||||
-#ifdef SYS_OPENBSD
|
||||
-#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 };
|
||||
@@ -361,7 +361,7 @@
|
||||
#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,14 +1,14 @@
|
|||
$NetBSD: patch-ak,v 1.1 2008/12/18 16:19:08 bjs Exp $
|
||||
$NetBSD: patch-ak,v 1.2 2011/01/17 16:46:42 drochner Exp $
|
||||
|
||||
--- common/display-x11.c.orig 2008-12-12 16:45:07.000000000 -0500
|
||||
+++ common/display-x11.c
|
||||
@@ -22,6 +22,9 @@
|
||||
--- common/display-x11.c~ 2011-01-09 17:35:14.000000000 +0900
|
||||
+++ common/display-x11.c 2011-01-09 17:44:27.000000000 +0900
|
||||
@@ -21,7 +21,9 @@
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
+#ifdef HAVE_STDLIB_H
|
||||
+#include <stdlib.h>
|
||||
#include <stdlib.h>
|
||||
+#endif
|
||||
#include <string.h>
|
||||
|
||||
#include "display.h"
|
||||
|
||||
#include "common.h"
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
$NetBSD: patch-am,v 1.1 2008/12/18 16:19:08 bjs Exp $
|
||||
$NetBSD: patch-am,v 1.2 2011/01/17 16:46:42 drochner Exp $
|
||||
|
||||
--- common/x86/mc-a.asm.orig 2008-12-12 16:45:07.000000000 -0500
|
||||
+++ common/x86/mc-a.asm
|
||||
@@ -512,12 +512,12 @@ AVG_CACHELINE_CHECK 8, 32, mmxext
|
||||
--- common/x86/mc-a.asm.orig 2010-11-02 06:45:07.000000000 +0900
|
||||
+++ common/x86/mc-a.asm 2011-01-09 21:09:29.000000000 +0900
|
||||
@@ -746,13 +746,13 @@
|
||||
AVG_CACHELINE_CHECK 8, 64, mmxext
|
||||
AVG_CACHELINE_CHECK 12, 64, mmxext
|
||||
%ifndef ARCH_X86_64
|
||||
-AVG_CACHELINE_CHECK 16, 64, mmxext
|
||||
-AVG_CACHELINE_CHECK 20, 64, mmxext
|
||||
AVG_CACHELINE_CHECK 8, 32, mmxext
|
||||
AVG_CACHELINE_CHECK 12, 32, mmxext
|
||||
AVG_CACHELINE_CHECK 16, 32, mmxext
|
||||
AVG_CACHELINE_CHECK 20, 32, mmxext
|
||||
-AVG_CACHELINE_CHECK 16, 64, mmxext
|
||||
-AVG_CACHELINE_CHECK 20, 64, mmxext
|
||||
%endif
|
||||
|
||||
AVG_CACHELINE_CHECK 8, 64, mmxext
|
||||
AVG_CACHELINE_CHECK 12, 64, mmxext
|
||||
+AVG_CACHELINE_CHECK 16, 64, mmxext
|
||||
+AVG_CACHELINE_CHECK 20, 64, mmxext
|
||||
AVG_CACHELINE_CHECK 16, 64, sse2
|
||||
|
|
|
@ -1,40 +1,40 @@
|
|||
$NetBSD: patch-an,v 1.1 2009/05/25 20:56:38 drochner Exp $
|
||||
$NetBSD: patch-an,v 1.2 2011/01/17 16:46:42 drochner Exp $
|
||||
|
||||
--- common/x86/predict-c.c.orig 2009-04-05 21:31:54.000000000 +0200
|
||||
+++ common/x86/predict-c.c
|
||||
@@ -110,7 +110,7 @@ PREDICT_16x16_P( mmxext )
|
||||
--- common/x86/predict-c.c.orig 2011-01-02 06:45:05.000000000 +0900
|
||||
+++ common/x86/predict-c.c 2011-01-09 21:38:53.000000000 +0900
|
||||
@@ -155,7 +155,7 @@
|
||||
#endif
|
||||
PREDICT_16x16_P( sse2 )
|
||||
|
||||
-#ifdef __GNUC__
|
||||
+#if 0
|
||||
static void predict_16x16_p_ssse3( uint8_t *src )
|
||||
static void x264_predict_16x16_p_ssse3( uint8_t *src )
|
||||
{
|
||||
int a, b, c, i00;
|
||||
@@ -170,7 +170,7 @@ PREDICT_8x8_P( mmxext )
|
||||
@@ -215,7 +215,7 @@
|
||||
#endif
|
||||
PREDICT_8x8_P( sse2 )
|
||||
|
||||
-#ifdef __GNUC__
|
||||
+#if 0
|
||||
static void predict_8x8c_p_ssse3( uint8_t *src )
|
||||
static void x264_predict_8x8c_p_ssse3( uint8_t *src )
|
||||
{
|
||||
int a, b, c, i00;
|
||||
@@ -394,7 +394,7 @@ void x264_predict_16x16_init_mmx( int cp
|
||||
@@ -418,7 +418,7 @@
|
||||
if( !(cpu&X264_CPU_SSSE3) )
|
||||
return;
|
||||
pf[I_PRED_16x16_H] = predict_16x16_h_ssse3;
|
||||
pf[I_PRED_16x16_H] = x264_predict_16x16_h_ssse3;
|
||||
-#ifdef __GNUC__
|
||||
+#if 0
|
||||
pf[I_PRED_16x16_P] = predict_16x16_p_ssse3;
|
||||
pf[I_PRED_16x16_P] = x264_predict_16x16_p_ssse3;
|
||||
#endif
|
||||
}
|
||||
@@ -421,7 +421,7 @@ void x264_predict_8x8c_init_mmx( int cpu
|
||||
#endif // HIGH_BIT_DEPTH
|
||||
@@ -447,7 +447,7 @@
|
||||
if( !(cpu&X264_CPU_SSSE3) )
|
||||
return;
|
||||
pf[I_PRED_CHROMA_H] = predict_8x8c_h_ssse3;
|
||||
pf[I_PRED_CHROMA_H] = x264_predict_8x8c_h_ssse3;
|
||||
-#ifdef __GNUC__
|
||||
+#if 0
|
||||
pf[I_PRED_CHROMA_P] = predict_8x8c_p_ssse3;
|
||||
pf[I_PRED_CHROMA_P] = x264_predict_8x8c_p_ssse3;
|
||||
#endif
|
||||
}
|
||||
#endif // !HIGH_BIT_DEPTH
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
$NetBSD: patch-ba,v 1.1 2010/05/04 18:18:57 drochner Exp $
|
||||
$NetBSD: patch-ba,v 1.2 2011/01/17 16:46:42 drochner Exp $
|
||||
|
||||
--- encoder/analyse.c.orig 2009-09-20 20:45:09.000000000 +0000
|
||||
+++ encoder/analyse.c
|
||||
@@ -252,7 +252,7 @@ int x264_analyse_init_costs( x264_t *h,
|
||||
for( i = 0; i <= 2*4*2048; i++ )
|
||||
--- encoder/analyse.c~ 2011-01-09 17:35:15.000000000 +0900
|
||||
+++ encoder/analyse.c 2011-01-09 17:46:47.000000000 +0900
|
||||
@@ -252,7 +252,7 @@
|
||||
for( int i = 0; i <= 2*4*2048; i++ )
|
||||
{
|
||||
h->cost_mv[lambda][-i] =
|
||||
- h->cost_mv[lambda][i] = lambda * (log2f(i+1)*2 + 0.718f + !!i) + .5f;
|
||||
+ h->cost_mv[lambda][i] = lambda * (logf(i+1)*2.88539f + 0.718f + !!i) + .5f;
|
||||
}
|
||||
x264_pthread_mutex_lock( &cost_ref_mutex );
|
||||
for( i = 0; i < 3; i++ )
|
||||
for( int i = 0; i < 3; i++ )
|
||||
|
|
Loading…
Reference in a new issue