Import x264-20070325
x264 is a free library for encoding H264/AVC video streams. This program requires a processor with recent instructions (MMX/SSE for i386, AltiVec for powerpc). Encoder features: * CAVLC/CABAC * Multi-references * Intra: all macroblock types (16x16, 8x8, and 4x4 with all predictions) * Inter P: all partitions (from 16x16 down to 4x4) * Inter B: partitions from 16x16 down to 8x8 (including skip/direct) * Ratecontrol: constant quantizer, single or multipass ABR, optional VBV * Scene cut detection * Adaptive B-frame placement * B-frames as references / arbitrary frame order * 8x8 and 4x4 adaptive spatial transform * Lossless mode * Custom quantization matrices * Parallel encoding of multiple slices * Interlacing based on an original submission by Nikns Siankin <nikns at secure dot lv> help and ok naddy@ steven@
This commit is contained in:
parent
d712b417cc
commit
803ba42b08
42
multimedia/x264/Makefile
Normal file
42
multimedia/x264/Makefile
Normal file
@ -0,0 +1,42 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2007/04/08 17:31:01 ajacoutot Exp $
|
||||
|
||||
COMMENT= "free h264/avc encoder"
|
||||
|
||||
V= 20070325
|
||||
DISTNAME= x264-snapshot-${V}-2245
|
||||
PKGNAME= x264-${V}
|
||||
SHARED_LIBS= x264 0.0 # 5.0
|
||||
CATEGORIES= multimedia
|
||||
|
||||
HOMEPAGE= http://www.videolan.org/developers/x264.html
|
||||
|
||||
EXTRACT_SUFX= .tar.bz2
|
||||
|
||||
MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
|
||||
|
||||
# GPLv2
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
MASTER_SITES= ftp://ftp.videolan.org/pub/videolan/x264/snapshots/
|
||||
|
||||
WANTLIB= c m pthread
|
||||
|
||||
NO_REGRESS= Yes
|
||||
USE_GMAKE= Yes
|
||||
|
||||
CONFIGURE_STYLE=simple
|
||||
CONFIGURE_ENV= API=${LIBx264_VERSION}
|
||||
CONFIGURE_ARGS+=${CONFIGURE_SHARED} \
|
||||
--enable-pthread
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
BUILD_DEPENDS+= ::devel/nasm
|
||||
.endif
|
||||
|
||||
pre-configure:
|
||||
@perl -pi -e 's,!!PREFIX!!,${PREFIX},g' ${WRKSRC}/configure
|
||||
|
||||
.include <bsd.port.mk>
|
5
multimedia/x264/distinfo
Normal file
5
multimedia/x264/distinfo
Normal file
@ -0,0 +1,5 @@
|
||||
MD5 (x264-snapshot-20070325-2245.tar.bz2) = 6dd6bf315e095d5e564a5622ffd0185f
|
||||
RMD160 (x264-snapshot-20070325-2245.tar.bz2) = 10379103ae48e6e71905dfe6ef6b75cee792af6a
|
||||
SHA1 (x264-snapshot-20070325-2245.tar.bz2) = b33d2289bf6cea4360bc4a6560aa338c98b39820
|
||||
SHA256 (x264-snapshot-20070325-2245.tar.bz2) = 1e4f4b27edd9afb4505d86f7ae0d6a861662e541cd98144225c51ed6fc717c5c
|
||||
SIZE (x264-snapshot-20070325-2245.tar.bz2) = 509357
|
50
multimedia/x264/patches/patch-Makefile
Normal file
50
multimedia/x264/patches/patch-Makefile
Normal file
@ -0,0 +1,50 @@
|
||||
$OpenBSD: patch-Makefile,v 1.1.1.1 2007/04/08 17:31:01 ajacoutot Exp $
|
||||
--- Makefile.orig Sun Mar 25 22:45:02 2007
|
||||
+++ Makefile Sat Apr 7 13:58:39 2007
|
||||
@@ -47,6 +47,9 @@ ALTIVECSRC += common/ppc/mc.c common/ppc/pixel.c commo
|
||||
common/ppc/quant.c
|
||||
SRCS += $(ALTIVECSRC)
|
||||
$(ALTIVECSRC:%.c=%.o): CFLAGS += $(ALTIVECFLAGS)
|
||||
+$(ALTIVECSRC:%.c=%.so): CFLAGS += $(ALTIVECFLAGS)
|
||||
+common/cpu.o: CFLAGS += $(ALTIVECFLAGS)
|
||||
+common/cpu.so: CFLAGS += $(ALTIVECFLAGS)
|
||||
endif
|
||||
|
||||
# VIS optims
|
||||
@@ -60,6 +63,7 @@ SRCS += extras/getopt.c
|
||||
endif
|
||||
|
||||
OBJS = $(SRCS:%.c=%.o)
|
||||
+SOBJS = $(SRCS:%.c=%.so)
|
||||
OBJCLI = $(SRCCLI:%.c=%.o)
|
||||
DEP = depend
|
||||
|
||||
@@ -72,8 +76,8 @@ libx264.a: .depend $(OBJS) $(OBJASM)
|
||||
ar rc libx264.a $(OBJS) $(OBJASM)
|
||||
ranlib libx264.a
|
||||
|
||||
-$(SONAME): .depend $(OBJS) $(OBJASM)
|
||||
- $(CC) -shared -o $@ $(OBJS) $(OBJASM) -Wl,-soname,$(SONAME) $(LDFLAGS)
|
||||
+$(SONAME): .depend $(SOBJS) $(OBJASM)
|
||||
+ $(CC) -shared -o $@ $(SOBJS) $(OBJASM) -Wl,-soname,$(SONAME) $(LDFLAGS)
|
||||
|
||||
x264$(EXE): $(OBJCLI) libx264.a
|
||||
$(CC) -o $@ $+ $(LDFLAGS)
|
||||
@@ -84,6 +88,9 @@ libx264gtk.a: muxers.o libx264.a
|
||||
checkasm: tools/checkasm.o libx264.a
|
||||
$(CC) -o $@ $+ $(LDFLAGS)
|
||||
|
||||
+%.so: %.c
|
||||
+ $(CC) $(CFLAGS) -fPIC -c -o $@ $<
|
||||
+
|
||||
common/amd64/*.o: common/amd64/amd64inc.asm
|
||||
common/i386/*.o: common/i386/i386inc.asm
|
||||
%.o: %.asm
|
||||
@@ -150,7 +157,6 @@ install: x264 $(SONAME)
|
||||
install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
|
||||
install x264 $(DESTDIR)$(bindir)
|
||||
ranlib $(DESTDIR)$(libdir)/libx264.a
|
||||
- $(if $(SONAME), ln -sf $(SONAME) $(DESTDIR)$(libdir)/libx264.so)
|
||||
$(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(libdir))
|
||||
|
||||
install-gtk: libx264gtk.a
|
12
multimedia/x264/patches/patch-common_cpu_c
Normal file
12
multimedia/x264/patches/patch-common_cpu_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-common_cpu_c,v 1.1.1.1 2007/04/08 17:31:01 ajacoutot Exp $
|
||||
--- common/cpu.c.orig Sun Mar 25 22:45:02 2007
|
||||
+++ common/cpu.c Mon Mar 26 17:28:58 2007
|
||||
@@ -144,7 +144,7 @@ uint32_t x264_cpu_detect( void )
|
||||
return cpu;
|
||||
}
|
||||
|
||||
-#elif defined( SYS_LINUX )
|
||||
+#elif defined SYS_LINUX || defined SYS_OPENBSD
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
static sigjmp_buf jmpbuf;
|
12
multimedia/x264/patches/patch-common_ppc_dct_c
Normal file
12
multimedia/x264/patches/patch-common_ppc_dct_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-common_ppc_dct_c,v 1.1.1.1 2007/04/08 17:31:01 ajacoutot Exp $
|
||||
--- common/ppc/dct.c.orig Mon Mar 19 22:45:02 2007
|
||||
+++ common/ppc/dct.c Tue Mar 20 18:19:50 2007
|
||||
@@ -22,7 +22,7 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
|
||||
*****************************************************************************/
|
||||
|
||||
-#ifdef SYS_LINUX
|
||||
+#if defined SYS_LINUX || defined SYS_OPENBSD
|
||||
#include <altivec.h>
|
||||
#endif
|
||||
|
16
multimedia/x264/patches/patch-common_ppc_mc_c
Normal file
16
multimedia/x264/patches/patch-common_ppc_mc_c
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-common_ppc_mc_c,v 1.1.1.1 2007/04/08 17:31:01 ajacoutot Exp $
|
||||
--- common/ppc/mc.c.orig Mon Mar 19 22:45:02 2007
|
||||
+++ common/ppc/mc.c Tue Mar 20 18:20:12 2007
|
||||
@@ -24,10 +24,10 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
-#include <stdint.h>
|
||||
+#include <inttypes.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
-#ifdef SYS_LINUX
|
||||
+#if defined SYS_LINUX || defined SYS_OPENBSD
|
||||
#include <altivec.h>
|
||||
#endif
|
||||
|
12
multimedia/x264/patches/patch-common_ppc_pixel_c
Normal file
12
multimedia/x264/patches/patch-common_ppc_pixel_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-common_ppc_pixel_c,v 1.1.1.1 2007/04/08 17:31:01 ajacoutot Exp $
|
||||
--- common/ppc/pixel.c.orig Mon Mar 19 22:45:02 2007
|
||||
+++ common/ppc/pixel.c Tue Mar 20 18:20:28 2007
|
||||
@@ -22,7 +22,7 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
|
||||
*****************************************************************************/
|
||||
|
||||
-#ifdef SYS_LINUX
|
||||
+#if defined SYS_LINUX || defined SYS_OPENBSD
|
||||
#include <altivec.h>
|
||||
#endif
|
||||
|
12
multimedia/x264/patches/patch-common_ppc_quant_c
Normal file
12
multimedia/x264/patches/patch-common_ppc_quant_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-common_ppc_quant_c,v 1.1.1.1 2007/04/08 17:31:01 ajacoutot Exp $
|
||||
--- common/ppc/quant.c.orig Mon Mar 19 22:45:02 2007
|
||||
+++ common/ppc/quant.c Tue Mar 20 18:20:42 2007
|
||||
@@ -18,7 +18,7 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
|
||||
*****************************************************************************/
|
||||
|
||||
-#if defined SYS_LINUX
|
||||
+#if defined SYS_LINUX || defined SYS_OPENBSD
|
||||
#include <altivec.h>
|
||||
#endif
|
||||
|
38
multimedia/x264/patches/patch-configure
Normal file
38
multimedia/x264/patches/patch-configure
Normal file
@ -0,0 +1,38 @@
|
||||
$OpenBSD: patch-configure,v 1.1.1.1 2007/04/08 17:31:01 ajacoutot Exp $
|
||||
--- configure.orig Sun Mar 25 22:45:02 2007
|
||||
+++ configure Sat Apr 7 07:26:53 2007
|
||||
@@ -46,7 +46,7 @@ as_check() {
|
||||
|
||||
rm -f config.h config.mak x264.pc
|
||||
|
||||
-prefix='/usr/local'
|
||||
+prefix='!!PREFIX!!';
|
||||
exec_prefix='${prefix}'
|
||||
bindir='${exec_prefix}/bin'
|
||||
libdir='${exec_prefix}/lib'
|
||||
@@ -375,14 +375,14 @@ if [ "$pic" = "yes" ] ; then
|
||||
fi
|
||||
|
||||
if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then
|
||||
- CFLAGS="$CFLAGS -s -fomit-frame-pointer"
|
||||
- LDFLAGS="$LDFLAGS -s"
|
||||
+ CFLAGS="$CFLAGS"
|
||||
+ LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
if [ "$debug" = "yes" ]; then
|
||||
CFLAGS="-O1 -g $CFLAGS"
|
||||
else
|
||||
- CFLAGS="-O4 -ffast-math $CFLAGS"
|
||||
+ CFLAGS="-ffast-math $CFLAGS"
|
||||
fi
|
||||
|
||||
if cc_check "stdio.h" "" "fseeko(stdin,0,0);" ; then
|
||||
@@ -426,7 +426,6 @@ echo '' >> config.mak
|
||||
cp config.mak gtk/config.mak
|
||||
|
||||
if [ "$shared" = "yes" ]; then
|
||||
- API=$(grep '#define X264_BUILD' < x264.h | cut -f 3 -d ' ')
|
||||
echo "SONAME=libx264.so.$API" >> config.mak
|
||||
echo 'default: $(SONAME)' >> config.mak
|
||||
if [ "$gtk" = "yes" ]; then
|
20
multimedia/x264/pkg/DESCR
Normal file
20
multimedia/x264/pkg/DESCR
Normal file
@ -0,0 +1,20 @@
|
||||
x264 is a free library for encoding H264/AVC video streams.
|
||||
|
||||
This program requires a processor with recent instructions (MMX/SSE for
|
||||
i386, AltiVec for powerpc).
|
||||
|
||||
Encoder features:
|
||||
* CAVLC/CABAC
|
||||
* Multi-references
|
||||
* Intra: all macroblock types (16x16, 8x8, and 4x4 with all predictions)
|
||||
* Inter P: all partitions (from 16x16 down to 4x4)
|
||||
* Inter B: partitions from 16x16 down to 8x8 (including skip/direct)
|
||||
* Ratecontrol: constant quantizer, single or multipass ABR, optional VBV
|
||||
* Scene cut detection
|
||||
* Adaptive B-frame placement
|
||||
* B-frames as references / arbitrary frame order
|
||||
* 8x8 and 4x4 adaptive spatial transform
|
||||
* Lossless mode
|
||||
* Custom quantization matrices
|
||||
* Parallel encoding of multiple slices
|
||||
* Interlacing
|
2
multimedia/x264/pkg/PFRAG.shared
Normal file
2
multimedia/x264/pkg/PFRAG.shared
Normal file
@ -0,0 +1,2 @@
|
||||
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2007/04/08 17:31:01 ajacoutot Exp $
|
||||
@lib lib/libx264.so.${LIBx264_VERSION}
|
7
multimedia/x264/pkg/PLIST
Normal file
7
multimedia/x264/pkg/PLIST
Normal file
@ -0,0 +1,7 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2007/04/08 17:31:01 ajacoutot Exp $
|
||||
%%SHARED%%
|
||||
bin/x264
|
||||
include/x264.h
|
||||
lib/libx264.a
|
||||
lib/pkgconfig/
|
||||
lib/pkgconfig/x264.pc
|
Loading…
Reference in New Issue
Block a user