From 96922919331d6c0a0992cef2f7b2a740ed400a6c Mon Sep 17 00:00:00 2001 From: abs Date: Thu, 16 Feb 2006 10:26:30 +0000 Subject: Update ffmpeg to 0.4.9pre1, and add patch for libavcodec buffer overflow http://secunia.com/advisories/17892/ version 0.4.9-pre1: - DV encoder, DV muxer - Microsoft RLE video decoder - Microsoft Video-1 decoder - Apple Animation (RLE) decoder - Apple Graphics (SMC) decoder - Apple Video (RPZA) decoder - Cinepak decoder - Sega FILM (CPK) file demuxer - Westwood multimedia support (VQA & AUD files) - Id Quake II CIN playback support - 8BPS video decoder - FLIC playback support - RealVideo 2.0 (RV20) decoder - Duck TrueMotion v1 (DUCK) video decoder - Sierra VMD demuxer and video decoder - MSZH and ZLIB decoder support - SVQ1 video encoder - AMR-WB support - PPC optimisations - rate distortion optimal cbp support - rate distorted optimal ac prediction for mpeg4 - rate distorted optimal lambda->qp support - AAC encoding with libfaac - Sunplus JPEG codec (SP5X) support - use lagrange multipler instead of qp for ratecontrol - theora/VP3 decoding support - XA and ADX ADPCM codecs - export mpeg2 active display area / pan scan - Add support for configuring with IBM XLC - floating point AAN DCT - initial support for zygovideo (not complete) - rgb ffv1 support - new audio/video parser API - av_log() system - av_read_frame() and av_seek_frame() support - missing last frame fixes - seek by mouse in ffplay - noise reduction of dct coefficients - h263 OBMC & 4MV support - h263 alternative inter vlc support - h263 loop filter - h263 slice structured mode - interlaced DCT support for MPEG2 encoding - stuffing to stay above min_bitrate - mb type & qp vissualization - frame stepping for ffplay - interlaced motion estimation - alternate scantable support - SVCD scan offset support - closed gop support - SSE2 fdct - quantizer noise shaping - G.726 ADPCM audio codec - MS ADPCM encoding - multithreaded/SMP motion estimation - multithreaded/SMP encoding for MPEG1/MPEG2/MPEG4/H263 - multithreaded/SMP decoding for MPEG2 - FLAC decoder - Metrowerks CodeWarrior suppport - h263+ custom pcf support - nicer output for 'ffmpeg -formats' - matroska demuxer - SGI image format, encoding and decoding - h264 loop filter support - h264 CABAC support - nicer looking arrows for the motion vector vissualization - improved VCD support - audio timestamp drift compensation - mpeg2 YUV 422/444 support - polyphase kaiser windowed sinc and blackman nuttall windowed sinc audio resample - better image scaling - h261 support - correctly interleave packets during encoding - VIS optimized motion compensation - intra_dc_precission>0 encoding support - support reuse of motion vectors/mb types/field select values of the source video - more accurate deblock filter - padding support - many optimizations and bugfixes --- multimedia/ffmpeg/Makefile | 78 +++++++-------------------- multimedia/ffmpeg/PLIST | 10 +--- multimedia/ffmpeg/buildlink3.mk | 6 +-- multimedia/ffmpeg/distinfo | 18 +++---- multimedia/ffmpeg/options.mk | 96 +++++++++++++++++++++++++++++++++ multimedia/ffmpeg/patches/patch-aa | 20 ++----- multimedia/ffmpeg/patches/patch-ab | 2 +- multimedia/ffmpeg/patches/patch-ac | 39 ++++++++------ multimedia/ffmpeg/patches/patch-ad | 22 ++++---- multimedia/ffmpeg/patches/patch-ae | 2 +- multimedia/ffmpeg/patches/patch-af | 106 +++++++++++++++++++++++++++---------- multimedia/ffmpeg/patches/patch-ag | 10 ++-- 12 files changed, 254 insertions(+), 155 deletions(-) create mode 100644 multimedia/ffmpeg/options.mk (limited to 'multimedia/ffmpeg') diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile index 6d96358f14a..e5b6f18b03e 100644 --- a/multimedia/ffmpeg/Makefile +++ b/multimedia/ffmpeg/Makefile @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.21 2006/02/05 23:10:15 joerg Exp $ +# $NetBSD: Makefile,v 1.22 2006/02/16 10:26:30 abs Exp $ -DISTNAME= ffmpeg-0.4.8 -PKGREVISION= 4 -CATEGORIES= multimedia net +DISTNAME= ffmpeg-0.4.9-pre1 +PKGNAME= ffmpeg-0.4.9pre1 +CATEGORIES= multimedia MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ffmpeg/} -MAINTAINER= tech-pkg@NetBSD.org +MAINTAINER= zul@NetBSD-fr.org HOMEPAGE= http://ffmpeg.sourceforge.net/ COMMENT= MPEG decoding, encoding and streaming software @@ -13,46 +13,23 @@ HAS_CONFIGURE= YES USE_TOOLS+= gmake USE_LIBTOOL= YES +CONFLICTS+= ffmpeg-devel-[0-9]* + +REPLACE_PERL= doc/texi2pod.pl + CONF_FILES= ${PREFIX}/share/examples/ffmpeg/ffserver.conf \ ${PKG_SYSCONFDIR}/ffserver.conf -MAKE_ENV+= EXTRA_LIBS=${BUILDLINK_LDADD.getopt:Q} \ - FFSERVER_CONF=${PKG_SYSCONFDIR:Q}/ffserver.conf \ +MAKE_ENV+= EXTRA_LIBS=${LIBGETOPT:Q} \ + FFSERVER_CONF=${PKG_SYSCONFDIR}/ffserver.conf \ LOCALBASE=${LOCALBASE:Q} -CONFIGURE_ARGS+= --cc=${CC:Q} -CONFIGURE_ARGS+= --prefix=${PREFIX:Q} -CONFIGURE_ARGS+= --enable-pp -CONFIGURE_ARGS+= --disable-vhook -CONFIGURE_ARGS+= --disable-debug - -PKG_OPTIONS_VAR= PKG_OPTIONS.ffmpeg -PKG_SUPPORTED_OPTIONS= bktr lame mmx vorbis - -.include "../../mk/bsd.options.mk" - -.include "../../mk/bsd.prefs.mk" - -.include "../../mk/compiler.mk" +CONFIGURE_ARGS= --cc=${CC:Q} --prefix=${PREFIX:Q} +CONFIGURE_ARGS+= --enable-pp --disable-vhook --disable-debug +CONFIGURE_ARGS+= --enable-gpl +CONFIGURE_ARGS+= --enable-ffplay -.if !empty(MACHINE_ARCH:Mi386) -. if !empty(PKG_OPTIONS:Mmmx) && !empty(CC_VERSION:Mgcc*) -CFLAGS+= -fomit-frame-pointer -. else -CONFIGURE_ARGS+= --disable-mmx -. endif -.else -CONFIGURE_ARGS+= --disable-mmx -.endif - -.if !empty(PKG_OPTIONS:Mbktr) -post-extract: - ${CP} ${FILESDIR}/grab_bsdbktr.c ${WRKSRC}/libavformat - -post-patch: - ${PATCH} --quiet -d ${WRKSRC} < ${FILESDIR}/bktr.diff - ${PATCH} --quiet -d ${WRKSRC} < ${FILESDIR}/ffmpeg.1.diff -.endif +.include "options.mk" post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/ffmpeg \ @@ -62,30 +39,15 @@ post-install: ${PREFIX}/share/doc/ffmpeg ${INSTALL_DATA} ${WRKSRC}/README ${WRKSRC}/doc/TODO \ ${PREFIX}/share/doc/ffmpeg - ${INSTALL_DATA} ${WRKSRC}/doc/*.html ${WRKSRC}/doc/*.txt \ - ${PREFIX}/share/doc/ffmpeg + ${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${PREFIX}/share/doc/ffmpeg ${INSTALL_DATA} ${WRKSRC}/doc/ffserver.conf \ ${PREFIX}/share/examples/ffmpeg # ffplay not installed - ${RM} ${PREFIX}/man/man1/ffplay.1 + if [ -f ${PREFIX}/man/man1/ffplay.1 ]; then \ + ${RM} ${PREFIX}/man/man1/ffplay.1 ; \ + fi ${INSTALL_DATA} ${WRKSRC}/libavcodec/libpostproc/postprocess.h \ ${PREFIX}/include/ffmpeg/libpostproc .include "../../devel/libgetopt/buildlink3.mk" - -.if !empty(PKG_OPTIONS:Mlame) -CONFIGURE_ARGS+= --enable-mp3lame -.include "../../audio/lame/buildlink3.mk" -.else -CONFIGURE_ARGS+= --disable-mp3lame -.endif - -.if !empty(PKG_OPTIONS:Mvorbis) -CONFIGURE_ARGS+= --enable-vorbis -.include "../../audio/libvorbis/buildlink3.mk" -.else -CONFIGURE_ARGS+= --disable-vorbis -.endif - -.include "../../mk/dlopen.buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/multimedia/ffmpeg/PLIST b/multimedia/ffmpeg/PLIST index 5b01e253bab..715f2f16d02 100644 --- a/multimedia/ffmpeg/PLIST +++ b/multimedia/ffmpeg/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.4 2004/09/22 08:09:44 jlam Exp $ +@comment $NetBSD: PLIST,v 1.5 2006/02/16 10:26:30 abs Exp $ bin/ffmpeg bin/ffserver include/ffmpeg/avcodec.h @@ -6,22 +6,16 @@ include/ffmpeg/avformat.h include/ffmpeg/avio.h include/ffmpeg/common.h include/ffmpeg/libpostproc/postprocess.h +include/ffmpeg/rational.h include/ffmpeg/rtp.h include/ffmpeg/rtsp.h include/ffmpeg/rtspcodes.h lib/libavcodec.la lib/libavformat.la -man/man1/ffmpeg.1 -man/man1/ffserver.1 share/doc/ffmpeg/README share/doc/ffmpeg/TODO share/doc/ffmpeg/apiexample.c -share/doc/ffmpeg/faq.html -share/doc/ffmpeg/ffmpeg-doc.html share/doc/ffmpeg/ffmpeg_powerpc_performance_evaluation_howto.txt -share/doc/ffmpeg/ffplay-doc.html -share/doc/ffmpeg/ffserver-doc.html -share/doc/ffmpeg/hooks.html share/doc/ffmpeg/optimization.txt share/examples/ffmpeg/ffserver.conf @dirrm share/examples/ffmpeg diff --git a/multimedia/ffmpeg/buildlink3.mk b/multimedia/ffmpeg/buildlink3.mk index 56955c58185..9246e3add11 100644 --- a/multimedia/ffmpeg/buildlink3.mk +++ b/multimedia/ffmpeg/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.3 2006/02/05 23:10:15 joerg Exp $ +# $NetBSD: buildlink3.mk,v 1.4 2006/02/16 10:26:30 abs Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ FFMPEG_BUILDLINK3_MK:= ${FFMPEG_BUILDLINK3_MK}+ @@ -11,8 +11,8 @@ BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nffmpeg} BUILDLINK_PACKAGES+= ffmpeg .if !empty(FFMPEG_BUILDLINK3_MK:M+) -BUILDLINK_DEPENDS.ffmpeg+= ffmpeg>=0.4.8 -BUILDLINK_RECOMMENDED.ffmpeg+= ffmpeg>=0.4.8nb4 +BUILDLINK_DEPENDS.ffmpeg+= ffmpeg>=0.4.9pre1 +BUILDLINK_RECOMMENDED.ffmpeg?= ffmpeg>=0.4.9pre1nb1 BUILDLINK_PKGSRCDIR.ffmpeg?= ../../multimedia/ffmpeg .endif # FFMPEG_BUILDLINK3_MK diff --git a/multimedia/ffmpeg/distinfo b/multimedia/ffmpeg/distinfo index eb4d7a7a972..ffc955b3c85 100644 --- a/multimedia/ffmpeg/distinfo +++ b/multimedia/ffmpeg/distinfo @@ -1,12 +1,12 @@ -$NetBSD: distinfo,v 1.9 2005/12/28 16:20:05 joerg Exp $ +$NetBSD: distinfo,v 1.10 2006/02/16 10:26:30 abs Exp $ -SHA1 (ffmpeg-0.4.8.tar.gz) = 629a0f8f4daa3da1dedd8ba58bfdec4c47581bb4 -RMD160 (ffmpeg-0.4.8.tar.gz) = 8196b92b16506ddd848410c20407a7416011447e -Size (ffmpeg-0.4.8.tar.gz) = 1352874 bytes -SHA1 (patch-aa) = 2da10440ebe9c6280235d67bb4a3ba4cf2c95e45 +SHA1 (ffmpeg-0.4.9-pre1.tar.gz) = aad00445137520bec19e56bcb042e75a10c53bb3 +RMD160 (ffmpeg-0.4.9-pre1.tar.gz) = fd682846f97ada32951af7844e185c42783189a4 +Size (ffmpeg-0.4.9-pre1.tar.gz) = 1611332 bytes +SHA1 (patch-aa) = acc31f2c428411f912750e05703f5cad506c12bc SHA1 (patch-ab) = f596db3c555ab772eae2da5b8144c23fb4f2eaa0 -SHA1 (patch-ac) = 6f137ca14131e00c2db89cbe44657f32f3513e98 -SHA1 (patch-ad) = e058ddcb0ad4211c16d2f4c5fe0859723316b3a8 +SHA1 (patch-ac) = 2e7aa9021ddfe46cda35a9399e59f63848610d83 +SHA1 (patch-ad) = 95eea8ef74a270a0c60243eff740aa3346efaaaf SHA1 (patch-ae) = 7223978301c95de96d19610afb332f10764c4de0 -SHA1 (patch-af) = 6e245cee0c49bc9a829bc9caf5fad5f887da8e3c -SHA1 (patch-ag) = 975f7dac2488f367083cf4375b862fe8e3f4daf6 +SHA1 (patch-af) = 82f7e656ab01320235c85e98ec4c57277956ceb8 +SHA1 (patch-ag) = 69656d16d44d3321bdf9b790e6263db1529d2c99 diff --git a/multimedia/ffmpeg/options.mk b/multimedia/ffmpeg/options.mk new file mode 100644 index 00000000000..e2f1a15be00 --- /dev/null +++ b/multimedia/ffmpeg/options.mk @@ -0,0 +1,96 @@ +# $NetBSD options.mk $ + +# Global and legacy options + +PKG_OPTIONS_VAR= PKG_OPTIONS.ffmpeg +PKG_SUPPORTED_OPTIONS= bktr lame mmx vorbis faac faad a52 + +.include "../../mk/bsd.options.mk" + +.include "../../mk/bsd.prefs.mk" + +### +### MMX support +### + +.include "../../mk/compiler.mk" + +.if !empty(MACHINE_ARCH:Mi386) +. if !empty(PKG_OPTIONS:Mmmx) && !empty(CC_VERSION:Mgcc*) +CFLAGS+= -fomit-frame-pointer +. else +CONFIGURE_ARGS+= --disable-mmx +. endif +.else +CONFIGURE_ARGS+= --disable-mmx +.endif + +### +### bktr options +### + +.if !empty(PKG_OPTIONS:Mbktr) +post-extract: + ${CP} ${FILESDIR}/grab_bsdbktr.c ${WRKSRC}/libavformat + +post-patch: + ${PATCH} --quiet -d ${WRKSRC} < ${FILESDIR}/bktr.diff +#TODO +#Update the documentation +# ${PATCH} --quiet -d ${WRKSRC} < ${FILESDIR}/ffmpeg.1.diff +.endif + +### +### using lame option +### + +.if !empty(PKG_OPTIONS:Mlame) +CONFIGURE_ARGS+= --enable-mp3lame +.include "../../audio/lame/buildlink3.mk" +.else +CONFIGURE_ARGS+= --disable-mp3lame +.endif + +### +### using vorbis option +### + +.if !empty(PKG_OPTIONS:Mvorbis) +CONFIGURE_ARGS+= --enable-vorbis +.include "../../audio/libvorbis/buildlink3.mk" +.else +CONFIGURE_ARGS+= --disable-vorbis +.endif + +### +### faad option +### + +.if !empty(PKG_OPTIONS:Mfaad) +CONFIGURE_ARGS+= --enable-faad +.include "../../audio/faad2/buildlink3.mk" +.else +CONFIGURE_ARGS+= --disable-faad +.endif + +### +### faac option +### + +.if !empty(PKG_OPTIONS:Mfaac) +CONFIGURE_ARGS+= --enable-faac +.include "../../audio/faac/buildlink3.mk" +.else +CONFIGURE_ARGS+= --disable-faac +.endif + +### +### a52 option +### + +.if !empty(PKG_OPTIONS:Ma52) +CONFIGURE_ARGS+= --enable-a52 +.include "../../audio/liba52/buildlink3.mk" +.else +CONFIGURE_ARGS+= --disable-a52 +.endif diff --git a/multimedia/ffmpeg/patches/patch-aa b/multimedia/ffmpeg/patches/patch-aa index 40744a3340c..0e9bd4e7ec7 100644 --- a/multimedia/ffmpeg/patches/patch-aa +++ b/multimedia/ffmpeg/patches/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.4 2005/12/28 16:20:05 joerg Exp $ +$NetBSD: patch-aa,v 1.5 2006/02/16 10:26:30 abs Exp $ ---- configure.orig 2003-09-28 15:26:39.000000000 +0000 +--- configure.orig 2004-11-28 16:56:25.000000000 +0100 +++ configure -@@ -148,11 +148,10 @@ FFSLDFLAGS="" +@@ -224,11 +224,10 @@ FFSLDFLAGS="" need_inet_aton="yes" extralibs="$extralibs -lsocket -lnsl" ;; @@ -12,16 +12,6 @@ $NetBSD: patch-aa,v 1.4 2005/12/28 16:20:05 joerg Exp $ audio_oss="yes" dv1394="no" -make="gmake" - LDFLAGS="$LDFLAGS -export-dynamic" + CFLAGS="-pthread" + LDFLAGS="$LDFLAGS -export-dynamic -pthread" ;; - BSD/OS) -@@ -959,6 +958,9 @@ if test "$vhook" = "yes" ; then - echo "#define HAVE_VHOOK 1" >> $TMPH - extralibs="$extralibs $ldl" - fi -+if test "$ffserver" = "yes" ; then -+ extralibs="$extralibs $ldl" -+fi - if test "$lshared" = "yes" ; then - echo "BUILD_SHARED=yes" >> config.mak - echo "PIC=-fPIC" >> config.mak diff --git a/multimedia/ffmpeg/patches/patch-ab b/multimedia/ffmpeg/patches/patch-ab index 150006d66cd..6e181d87ca9 100644 --- a/multimedia/ffmpeg/patches/patch-ab +++ b/multimedia/ffmpeg/patches/patch-ab @@ -1,4 +1,4 @@ -$NetBSD: patch-ab,v 1.2 2004/05/25 21:49:26 wiz Exp $ +$NetBSD: patch-ab,v 1.3 2006/02/16 10:26:30 abs Exp $ --- ffserver.c.orig 2003-09-28 17:26:39.000000000 +0200 +++ ffserver.c diff --git a/multimedia/ffmpeg/patches/patch-ac b/multimedia/ffmpeg/patches/patch-ac index d4d665cd7df..9c171b87d07 100644 --- a/multimedia/ffmpeg/patches/patch-ac +++ b/multimedia/ffmpeg/patches/patch-ac @@ -1,18 +1,19 @@ -$NetBSD: patch-ac,v 1.2 2004/05/25 21:49:26 wiz Exp $ +$NetBSD: patch-ac,v 1.3 2006/02/16 10:26:30 abs Exp $ ---- Makefile.orig 2003-09-28 17:26:39.000000000 +0200 +--- Makefile.orig 2004-07-08 13:02:04.000000000 +0200 +++ Makefile -@@ -6,8 +6,7 @@ include config.mak +@@ -5,9 +5,7 @@ + include config.mak VPATH=$(SRC_PATH) - --CFLAGS= $(OPTFLAGS) -Wall -g -I. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavformat -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE +- +-CFLAGS=$(OPTFLAGS) -I. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavformat -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -LDFLAGS+= -g +CFLAGS= $(OPTFLAGS) -Wall -I. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavformat -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE ifeq ($(TARGET_GPROF),yes) CFLAGS+=-p -@@ -42,6 +41,8 @@ ifeq ($(CONFIG_VORBIS),yes) +@@ -46,6 +44,8 @@ ifeq ($(CONFIG_VORBIS),yes) EXTRALIBS+=-logg -lvorbis -lvorbisenc endif @@ -21,16 +22,16 @@ $NetBSD: patch-ac,v 1.2 2004/05/25 21:49:26 wiz Exp $ ifeq ($(CONFIG_FAAD),yes) ifeq ($(CONFIG_FAADBIN),yes) # no libs needed -@@ -64,7 +65,7 @@ endif +@@ -76,7 +76,7 @@ endif OBJS = ffmpeg.o ffserver.o cmdutils.o ffplay.o SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s) -FFLIBS = -L./libavformat -lavformat -L./libavcodec -lavcodec +FFLIBS = libavformat/libavformat.la libavcodec/libavcodec.la - all: lib $(PROG) $(PROGTEST) $(VHOOK) + all: lib $(PROG) $(PROGTEST) $(VHOOK) $(QTFASTSTART) $(DOC) -@@ -72,42 +73,34 @@ lib: +@@ -84,25 +84,18 @@ lib: $(MAKE) -C libavcodec all $(MAKE) -C libavformat all @@ -40,16 +41,16 @@ $NetBSD: patch-ac,v 1.2 2004/05/25 21:49:26 wiz Exp $ -ffmpeg$(EXESUF): ffmpeg_g$(EXESUF) - cp -p $< $@ - $(STRIP) $@ -- --ffserver$(EXESUF): ffserver.o .libs -- $(CC) $(LDFLAGS) $(FFSLDFLAGS) -o $@ ffserver.o $(FFLIBS) $(EXTRALIBS) +ffmpeg$(EXESUF): ffmpeg.o cmdutils.o .ffmpeglibs + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ ffmpeg.o cmdutils.o $(FFLIBS) $(EXTRALIBS) +-ffserver$(EXESUF): ffserver.o .libs +- $(CC) $(LDFLAGS) $(FFSLDFLAGS) -o $@ ffserver.o $(FFLIBS) $(EXTRALIBS) ++ffserver$(EXESUF): ffserver.o .ffmpeglibs ++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(FFSLDFLAGS) -o $@ ffserver.o $(FFLIBS) $(EXTRALIBS) + -ffplay_g$(EXESUF): ffplay.o cmdutils.o .libs - $(CC) $(LDFLAGS) -o $@ ffplay.o cmdutils.o $(FFLIBS) $(EXTRALIBS) $(SDL_LIBS) -+ffserver$(EXESUF): ffserver.o .ffmpeglibs -+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(FFSLDFLAGS) -o $@ ffserver.o $(FFLIBS) $(EXTRALIBS) -ffplay$(EXESUF): ffplay_g$(EXESUF) - cp -p $< $@ @@ -62,7 +63,9 @@ $NetBSD: patch-ac,v 1.2 2004/05/25 21:49:26 wiz Exp $ +output_example$(EXESUF): output_example.o .ffmpeglibs + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ output_example.o $(FFLIBS) $(EXTRALIBS) - ffplay.o: ffplay.c + qt-faststart$(EXESUF): qt-faststart.c + $(CC) qt-faststart.c -o qt-faststart$(EXESUF) +@@ -111,9 +104,9 @@ ffplay.o: ffplay.c $(CC) $(CFLAGS) $(SDL_CFLAGS) -c -o $@ $< %.o: %.c @@ -73,6 +76,8 @@ $NetBSD: patch-ac,v 1.2 2004/05/25 21:49:26 wiz Exp $ +videohook: .ffmpeglibs $(MAKE) -C vhook all + documentation: +@@ -122,10 +115,10 @@ documentation: .PHONY: install install: all install-man $(INSTALLVHOOK) @@ -86,9 +91,9 @@ $NetBSD: patch-ac,v 1.2 2004/05/25 21:49:26 wiz Exp $ # create the window installer wininstaller: all install -@@ -145,15 +138,15 @@ endif +@@ -159,15 +152,15 @@ endif .depend: $(SRCS) - $(CC) -MM $(CFLAGS) $^ 1>.depend + $(CC) -MM $(CFLAGS) $(SDL_CFLAGS) $^ 1>.depend -.libs: lib - @test -f .libs || touch .libs diff --git a/multimedia/ffmpeg/patches/patch-ad b/multimedia/ffmpeg/patches/patch-ad index 08bff48b34d..38fb253d916 100644 --- a/multimedia/ffmpeg/patches/patch-ad +++ b/multimedia/ffmpeg/patches/patch-ad @@ -1,8 +1,8 @@ -$NetBSD: patch-ad,v 1.3 2004/08/29 22:43:50 wiz Exp $ +$NetBSD: patch-ad,v 1.4 2006/02/16 10:26:30 abs Exp $ ---- libavformat/Makefile.orig 2003-09-28 17:26:40.000000000 +0200 -+++ libavformat/Makefile 2004-08-14 14:50:54.000000000 +0200 -@@ -60,6 +60,11 @@ +--- libavformat/Makefile.orig 2004-04-24 17:16:23.000000000 +0200 ++++ libavformat/Makefile +@@ -68,6 +68,11 @@ endif ifeq ($(CONFIG_VORBIS),yes) OBJS+= ogg.o @@ -13,8 +13,8 @@ $NetBSD: patch-ad,v 1.3 2004/08/29 22:43:50 wiz Exp $ +EXTRALIBS += -lmp3lame endif - LIB= $(LIBPREF)avformat$(LIBSUF) -@@ -69,12 +74,14 @@ + ifeq ($(TARGET_ARCH_SPARC64),yes) +@@ -81,12 +86,14 @@ endif SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp) @@ -31,7 +31,7 @@ $NetBSD: patch-ad,v 1.3 2004/08/29 22:43:50 wiz Exp $ $(SLIB): $(OBJS) ifeq ($(CONFIG_WIN32),yes) -@@ -84,9 +91,6 @@ +@@ -96,9 +103,6 @@ else $(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) endif @@ -41,17 +41,17 @@ $NetBSD: patch-ad,v 1.3 2004/08/29 22:43:50 wiz Exp $ ifeq ($(BUILD_SHARED),yes) install: all install-headers ifeq ($(CONFIG_WIN32),yes) -@@ -112,11 +116,11 @@ +@@ -124,11 +128,11 @@ install-headers: "$(prefix)/include/ffmpeg" %.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< -+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -o $@ $< ++ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -o $@ $< # BeOS: remove -Wall to get rid of all the "multibyte constant" warnings %.o: %.cpp - g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $< -+ $(LIBTOOL) --mode=compile $(CXX) $(subst -Wall,,$(CFLAGS)) -c -o $@ $< ++ $(LIBTOOL) --mode=compile $(CXX) $(subst -Wall,,$(CFLAGS)) -c -o $@ $< - clean: + distclean clean: rm -f *.o *.d .depend *~ *.a $(LIB) diff --git a/multimedia/ffmpeg/patches/patch-ae b/multimedia/ffmpeg/patches/patch-ae index 11f5083c976..5e9b11f8a26 100644 --- a/multimedia/ffmpeg/patches/patch-ae +++ b/multimedia/ffmpeg/patches/patch-ae @@ -1,4 +1,4 @@ -$NetBSD: patch-ae,v 1.3 2004/08/06 11:01:54 drochner Exp $ +$NetBSD: patch-ae,v 1.4 2006/02/16 10:26:30 abs Exp $ --- libavcodec/Makefile.orig 2003-09-28 17:26:39.000000000 +0200 +++ libavcodec/Makefile diff --git a/multimedia/ffmpeg/patches/patch-af b/multimedia/ffmpeg/patches/patch-af index 908dd87f2e6..03a7ee1bd15 100644 --- a/multimedia/ffmpeg/patches/patch-af +++ b/multimedia/ffmpeg/patches/patch-af @@ -1,28 +1,80 @@ -$NetBSD: patch-af,v 1.4 2004/07/31 11:08:47 recht Exp $ +$NetBSD: patch-af,v 1.5 2006/02/16 10:26:30 abs Exp $ ---- libavcodec/libpostproc/postprocess_template.c.orig Sun Jul 18 18:13:02 2004 -+++ libavcodec/libpostproc/postprocess_template.c Sun Jul 18 19:25:47 2004 -@@ -2614,12 +2614,12 @@ - static inline void RENAME(blockCopy)(uint8_t dst[], int dstStride, uint8_t src[], int srcStride, - int levelFix, int64_t *packedOffsetAndScale) - { --#ifndef HAVE_MMX -+#if !defined(HAVE_MMX) || (__GNUC__ < 3) - int i; - #endif - if(levelFix) - { --#ifdef HAVE_MMX -+#if defined(HAVE_MMX) && (__GNUC__ >= 3) - asm volatile( - "movq (%%eax), %%mm2 \n\t" // packedYOffset - "movq 8(%%eax), %%mm3 \n\t" // packedYScale -@@ -2702,7 +2702,7 @@ - } - else - { --#ifdef HAVE_MMX -+#if defined(HAVE_MMX) && (__GNUC__ >= 3) - asm volatile( - "leal (%0,%2), %%eax \n\t" - "leal (%1,%3), %%edx \n\t" +--- libavcodec/utils.c.orig 2006-02-06 23:52:35.000000000 +0000 ++++ libavcodec/utils.c +@@ -210,26 +210,10 @@ int avcodec_default_get_buffer(AVCodecCo + buf->last_pic_num= *picture_number; + }else{ + int h_chroma_shift, v_chroma_shift; +- int s_align, pixel_size; ++ int s_align, pixel_size, size[3]; ++ AVPicture picture; + + avcodec_get_chroma_sub_sample(s->pix_fmt, &h_chroma_shift, &v_chroma_shift); +- +- switch(s->pix_fmt){ +- case PIX_FMT_RGB555: +- case PIX_FMT_RGB565: +- case PIX_FMT_YUV422: +- pixel_size=2; +- break; +- case PIX_FMT_RGB24: +- case PIX_FMT_BGR24: +- pixel_size=3; +- break; +- case PIX_FMT_RGBA32: +- pixel_size=4; +- break; +- default: +- pixel_size=1; +- } + + avcodec_align_dimensions(s, &w, &h); + #if defined(ARCH_POWERPC) || defined(HAVE_MMI) //FIXME some cleaner check +@@ -243,20 +227,39 @@ int avcodec_default_get_buffer(AVCodecCo + h+= EDGE_WIDTH*2; + } + ++ avpicture_fill(&picture, NULL, s->pix_fmt, w, h); ++ pixel_size= picture.linesize[0]*8 / w; ++//av_log(NULL, AV_LOG_ERROR, "%d %d %d %d\n", (int)picture.data[1], w, h, s->pix_fmt); ++ assert(pixel_size>=1); ++ //FIXME next ensures that linesize= 2^x uvlinesize, thats needed because some MC code assumes it ++ if(pixel_size == 3*8) ++ w= ALIGN(w, s_align<pix_fmt, w, h); ++ size[0] = picture.linesize[0] * h; ++ size[1] -= size[0]; ++ if(picture.data[2]) ++ size[1]= size[2]= size[1]/2; ++ else ++ size[2]= 0; ++ + buf->last_pic_num= -256*256*256*64; ++ memset(buf->base, 0, sizeof(buf->base)); ++ memset(buf->data, 0, sizeof(buf->data)); + +- for(i=0; i<3; i++){ ++ for(i=0; i<3 && size[i]; i++){ + const int h_shift= i==0 ? 0 : h_chroma_shift; + const int v_shift= i==0 ? 0 : v_chroma_shift; + +- //FIXME next ensures that linesize= 2^x uvlinesize, thats needed because some MC code assumes it +- buf->linesize[i]= ALIGN(pixel_size*w>>h_shift, s_align<<(h_chroma_shift-h_shift)); ++ buf->linesize[i]= picture.linesize[i]; + +- buf->base[i]= av_mallocz((buf->linesize[i]*h>>v_shift)+16); //FIXME 16 ++ buf->base[i]= av_malloc(size[i]+16); //FIXME 16 + if(buf->base[i]==NULL) return -1; +- memset(buf->base[i], 128, buf->linesize[i]*h>>v_shift); +- +- if(s->flags&CODEC_FLAG_EMU_EDGE) ++ memset(buf->base[i], 128, size[i]); ++ ++ // no edge if EDEG EMU or not planar YUV, we check for PAL8 redundantly to protect against a exploitable bug regression ... ++ if((s->flags&CODEC_FLAG_EMU_EDGE) || (s->pix_fmt == PIX_FMT_PAL8) || !size[2]) + buf->data[i] = buf->base[i]; + else + buf->data[i] = buf->base[i] + ALIGN((buf->linesize[i]*EDGE_WIDTH>>v_shift) + (EDGE_WIDTH>>h_shift), s_align); diff --git a/multimedia/ffmpeg/patches/patch-ag b/multimedia/ffmpeg/patches/patch-ag index 14a3ec05a98..7f88193950b 100644 --- a/multimedia/ffmpeg/patches/patch-ag +++ b/multimedia/ffmpeg/patches/patch-ag @@ -1,6 +1,6 @@ -$NetBSD: patch-ag,v 1.1 2004/08/29 22:43:50 wiz Exp $ +$NetBSD: patch-ag,v 1.2 2006/02/16 10:26:30 abs Exp $ ---- libavformat/audio.c.orig 2003-09-28 17:26:40.000000000 +0200 +--- libavformat/audio.c.orig 2004-06-19 05:59:34.000000000 +0200 +++ libavformat/audio.c @@ -18,10 +18,19 @@ */ @@ -164,7 +164,7 @@ $NetBSD: patch-ag,v 1.1 2004/08/29 22:43:50 wiz Exp $ s->fd = audio_fd; return 0; -@@ -239,7 +358,11 @@ static int audio_read_packet(AVFormatCon +@@ -240,7 +359,11 @@ static int audio_read_packet(AVFormatCon AudioData *s = s1->priv_data; int ret, bdelay; int64_t cur_time; @@ -175,8 +175,8 @@ $NetBSD: patch-ag,v 1.1 2004/08/29 22:43:50 wiz Exp $ +#endif if (av_new_packet(pkt, s->frame_size) < 0) - return -EIO; -@@ -274,9 +397,15 @@ static int audio_read_packet(AVFormatCon + return AVERROR_IO; +@@ -276,9 +399,15 @@ static int audio_read_packet(AVFormatCon /* compute pts of the start of the packet */ cur_time = av_gettime(); bdelay = ret; -- cgit v1.2.3