--- ffmpeg-0.5.1.orig/debian/libswscale0.install
+++ ffmpeg-0.5.1/debian/libswscale0.install
@@ -0,0 +1 @@
+usr/lib/{,*/,*/*/}libswscale.so.*
--- ffmpeg-0.5.1.orig/debian/libavformat52.lintian-overrides
+++ ffmpeg-0.5.1/debian/libavformat52.lintian-overrides
@@ -0,0 +1,3 @@
+# Overriding these fpic lintian errors. Please see bug #528080.
+libavformat52: shlib-with-non-pic-code usr/lib/i686/cmov/libavformat.so.52.31.0
+libavformat52: shlib-with-non-pic-code usr/lib/libavformat.so.52.31.0
--- ffmpeg-0.5.1.orig/debian/libswscale0.lintian-overrides
+++ ffmpeg-0.5.1/debian/libswscale0.lintian-overrides
@@ -0,0 +1,3 @@
+# Overriding these fpic lintian errors. Please see bug #528080.
+libswscale0: shlib-with-non-pic-code usr/lib/i686/cmov/libswscale.so.0.7.1
+libswscale0: shlib-with-non-pic-code usr/lib/libswscale.so.0.7.1
--- ffmpeg-0.5.1.orig/debian/README.Source
+++ ffmpeg-0.5.1/debian/README.Source
@@ -0,0 +1,48 @@
+
+In the past, Debian used to ship "stripped" ffmpeg packages, i.e. the
+source code of the ffmpeg-debian package has been modified to disable
+specific codecs (mostly encoders like H263, H264, MPEG2 video, MPEG4 and
+MS-MPEG4) whose usage may represent patent infringement in certain
+jurisdictions. To serve the purpose to remain free of patented encoding
+technologies, the modifications to the ffmpeg source code have been done
+in a "non-reversible" way by removing several lines from the source code
+before packaging the release tarball. To reflect this divergence from
+upstream ffmpeg, the Debian package has been renamed to ffmpeg-debian.
+However, please note that only the code calling the affected codecs was
+removed in previous versions to make them unavailable to the resulting
+ffmpeg libraries. No encoder code was actually ever removed from the
+Debian packages!
+
+Several complications have come along with the aforementioned measures:
+* Further packaging hacks (e.g. debian/fixup-config.sh) have become
+  necessary in order to build the source code without the stripped
+  encoders.
+* It was impossible to rebuild unstripped packages for private usage
+  from the ffmpeg-debian source code
+* Ffmpeg upstream was not very happy about Debian redistributing a
+  stripped fork of their code, to say the least.
+
+Nowadays, while the situation remains pretty unchanged with regard to
+the patent threat, the ffmpeg build system has seen a lot of
+improvements. It now provides the possibility to explicitly disable
+specific codecs from the libraries at configure time, allowing disabling
+some patent encumbered codecs without the need to strip the source code.
+The effect on the resulting binary packages would remain the same as
+before.
+
+Regarding the source code, however, this would mean some significant
+improvements:
+* There is no more need to strip the source code in order to disable the
+  codecs and to apply further Debian-specific hacks to still make it
+  compile cleanly.
+* In order to rebuild unstripped ffmpeg libraries for private usage, it
+  would be sufficient to comment out a few configure flags.
+* Debian would not need to fork the ffmpeg source code anymore and call
+  their packages by a different name.
+
+Therefore, the pkg-multimedia-maintainers (the maintainers of the ffmpeg
+packages in Debian) decided to not strip the ffmpeg source code in
+further releases anymore but disable the patent encumbered codecs during
+the configure phase of the packages as intended upstream. We are sure
+this is the right thing to do with regard to the aforementioned
+advantages for both our users and ourselves as maintainers.
--- ffmpeg-0.5.1.orig/debian/libavfilter-dev.install
+++ ffmpeg-0.5.1/debian/libavfilter-dev.install
@@ -0,0 +1,4 @@
+usr/include/libavfilter
+usr/lib/libavfilter.a
+usr/lib/{,*/,*/*/}libavfilter.so
+usr/lib/pkgconfig/libavfilter.pc
--- ffmpeg-0.5.1.orig/debian/copyright
+++ ffmpeg-0.5.1/debian/copyright
@@ -0,0 +1,96 @@
+SVN snapshots are downloaded with subversion from the ffmpeg SVN at:
+    <svn://svn.ffmpeg.org/ffmpeg/>
+
+Upstream Authors: Fabrice Bellard
+                  Alex Beregszaszi
+                  BERO
+                  Mario Brito
+                  Ronald Bultje
+                  Tim Ferguson
+                  Brian Foley
+                  Arpad Gereoffy
+                  Philip Gladstone
+                  Vladimir Gneushev
+                  Wolfgang Hesseler
+                  Falk Hueffner
+                  Zdenek Kabelac
+                  Robin Kay
+                  Todd Kirby
+                  Nick Kurshev
+                  Mike Melanson
+                  Michael Niedermayer
+                  François Revol
+                  Roman Shaposhnik
+                  Dieter Shirley
+                  Juan J. Sierralta
+                  Ewald Snel
+                  Leon van Stuivenberg
+                  Roberto Togni
+                  Lionel Ulmer
+
+Copyright (c) 2000-2004 Fabrice Bellard et al.
+
+The following files are licensed under the GNU GPL, as clarified below:
+
+ * ffmpeg.c
+ * libavcodec:
+   + dtsdec.c
+   + i386/idct_mmx.c
+   + liba52/*.[ch]
+ * libavformat:
+   + x11grab.c
+   + gxfenc.c
+ * libpostproc:
+   + postprocess_internal.h
+   + postprocess_altivec_template.c
+   + postprocess.h
+   + postprocess_template.c
+   + postprocess.c
+   + mangle.h
+ * libswscale:
+   + swscale.c
+   + swscale-example.c
+   + yuv2rgb_template.c
+   + swscale_altivec_template.c
+   + yuv2rgb_altivec.c
+   + swscale_template.c
+   + rgb2rgb_template.c
+   + rgb2rgb.c
+   + cs_test.c
+   + yuv2rgb_mlib.c
+   + yuv2rgb.c
+
+ | This library is free software; you can redistribute it and/or
+ | modify it under the terms of the GNU General Public License as
+ | published by the Free Software Foundation; either version 2 of
+ | the License, or (at your option) any later version.
+ |
+ | This library is distributed in the hope that it will be useful,
+ | but WITHOUT ANY WARRANTY; without even the implied warranty of
+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ | Lesser General Public License for more details.
+ |
+ | You should have received a copy of the GNU General Public License
+ | along with this program; if not, write to the Free Software
+ | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+The rest of the code is licensed under the GNU LGPL:
+
+ | This library is free software; you can redistribute it and/or
+ | modify it under the terms of the GNU Lesser General Public License as
+ | published by the Free Software Foundation; either version 2.1 of
+ | the License, or (at your option) any later version.
+ |
+ | This library is distributed in the hope that it will be useful,
+ | but WITHOUT ANY WARRANTY; without even the implied warranty of
+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ | Lesser General Public License for more details.
+ |
+ | You should have received a copy of the GNU General Public License
+ | along with this program; if not, write to the Free Software
+ | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian GNU/Linux systems, the complete text of the GNU General Public
+License can be found in `/usr/share/common-licenses/GPL' and the text of the
+GNU Lesser General Public License is in `/usr/share/common-licenses/LGPL'.
+
--- ffmpeg-0.5.1.orig/debian/libavcodec-dev.install
+++ ffmpeg-0.5.1/debian/libavcodec-dev.install
@@ -0,0 +1,4 @@
+usr/include/libavcodec
+usr/lib/libavcodec.a
+usr/lib/{,*/,*/*/}libavcodec.so
+usr/lib/pkgconfig/libavcodec.pc
--- ffmpeg-0.5.1.orig/debian/qt-faststart.1
+++ ffmpeg-0.5.1/debian/qt-faststart.1
@@ -0,0 +1,36 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH QT-FASTSTART 1 "May 10, 2009"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+qt-faststart \- utility for Quicktime files
+.SH SYNOPSIS
+.B qt-faststart
+.br
+.SH DESCRIPTION
+\fBqt-faststart\fP is a utility that rearranges a Quicktime file such that the
+moov atom is in front of the data, thus facilitating network streaming.
+.SH OPTIONS
+Options processed by the executable:
+.TP
+\fB\<infile.mov>\fR
+The source Quicktime file.
+.TP
+\fB\<outfile.mov>\fR
+The destination Quicktime file.
+.SH AUTHOR
+This manual page was written by Andres Mejia <mcitadel@gmail.com>
+for the Debian GNU/Linux system, but may be used by others.
--- ffmpeg-0.5.1.orig/debian/README.upstream-upgrade
+++ ffmpeg-0.5.1/debian/README.upstream-upgrade
@@ -0,0 +1,42 @@
+
+Checklist and howto for ffmpeg upstream upgrades:
+
+Needed packages:
+
+  apt-get install devscripts git-buildpackage pristine-tar
+
+Stage in a tmp directory:
+
+  mkdir /tmp/f ; cd /tmp/f
+  git clone git://git.debian.org/git/pkg-multimedia/ffmpeg-debian.git
+  cd ffmpeg-debian
+  branches="master.unstripped pristine-tar upstream upstream.unstripped"
+  for b in $branches; do git checkout -b $b origin/$b ; done
+
+Prepare the environment:
+
+  SVNDATE=`date +%Y%m%d`
+  git checkout master
+
+Fetch and commit the new upstream version:
+
+  debian/rules get-orig-source SVN_VERSION=${SVNDATE}
+  git-import-orig \
+	    --no-dch \
+            --upstream-tag=upstream/0.5+svn${SVNDATE} \
+            --upstream-version=0.5+svn${SVNDATE} \
+            ../ffmpeg_0.5+svn${SVNDATE}.orig.tar.gz
+
+Check and note the svn revision numbers from
+ffmpeg/{libswscale,}.svnrevision in debian/changelog
+
+  git diff upstream^ Changelog libavcodec/allcodecs.c libavformat/allformats.c
+
+Document new formats additions in debian/changelog
+
+Build, test, and compare against the the version already in the archive:
+  - headers in the -dev packages with 
+  - soname in the libraries
+  - formats.txt in the libavcodecs package
+
+Finialize debian/changelog, package should be upload ready now
--- ffmpeg-0.5.1.orig/debian/libavutil49.install
+++ ffmpeg-0.5.1/debian/libavutil49.install
@@ -0,0 +1 @@
+usr/lib/{,*/,*/*/}libavutil.so.*
--- ffmpeg-0.5.1.orig/debian/control
+++ ffmpeg-0.5.1/debian/control
@@ -0,0 +1,252 @@
+Source: ffmpeg
+Section: libs
+Priority: optional
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Debian multimedia packages maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>
+Uploaders: Sam Hocevar (Debian packages) <sam+deb@zoy.org>,
+           Loic Minier <lool@dooz.org>,
+           Reinhard Tartler <siretart@tauware.de>,
+           Fabian Greffrath <fabian+debian@greffrath.com>,
+           Andres Mejia <mcitadel@gmail.com>
+DM-Upload-Allowed: yes
+Standards-Version: 3.8.3
+Vcs-Git: git://git.debian.org/git/pkg-multimedia/ffmpeg.git
+Vcs-Browser: http://git.debian.org/?p=pkg-multimedia/ffmpeg.git;a=summary
+Homepage: http://ffmpeg.org/
+Build-Depends-Indep: doxygen
+Build-Depends: debhelper (>= 7),
+               libasound2-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386],
+               libbz2-dev,
+               libdc1394-22-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386],
+               libfreetype6-dev,
+               libgsm1-dev,
+               libimlib2-dev,
+               libraw1394-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386],
+               libschroedinger-dev,
+               libsdl1.2-dev,
+               libspeex-dev,
+               libtheora-dev (>> 0.0.0.alpha4),
+               libvorbis-dev,
+               libx11-dev,
+               libxext-dev,
+               libvdpau-dev,
+               libxvmc-dev,
+               quilt,
+               texi2html,
+               yasm [i386 amd64],
+               zlib1g-dev
+
+Package: ffmpeg
+Section: video
+Architecture: any
+Depends: ${shlibs:Depends},
+         ${misc:Depends}
+Description: multimedia player, server and encoder
+ This package contains the ffplay multimedia player, the ffserver streaming
+ server and the ffmpeg audio and video encoder. They support most existing
+ file formats (AVI, MPEG, OGG, Matroska, ASF...) and encoding formats (MPEG,
+ DivX, MPEG4, AC3, DV...).
+
+Package: ffmpeg-dbg
+Section: debug
+Priority: extra
+Architecture: any
+Depends: libavutil49 (= ${binary:Version}),
+         libavcodec52 (= ${binary:Version}),
+         libavdevice52 (= ${binary:Version}),
+         libpostproc51 (= ${binary:Version}),
+         libavformat52 (= ${binary:Version}),
+         libswscale0 (= ${binary:Version}),
+         ffmpeg (= ${binary:Version}),
+         ${misc:Depends}
+Description: Debug symbols for ffmpeg related packages
+ This package contains debug data of the ffmpeg related shared libraries.
+ .
+ Most people will not need this package. Please install it to produce useful
+ stacktraces to help debugging the ffmpeg library.
+
+Package: ffmpeg-doc
+Section: doc
+Architecture: all
+Depends: ${misc:Depends}
+Description: documentation of the ffmpeg API
+ This package contains the html doxygen documentation of the ffmpeg API.
+
+Package: libavutil49
+Architecture: any
+Depends: ${shlibs:Depends},
+         ${misc:Depends}
+Description: ffmpeg utility library
+ This is the common utility library from the ffmpeg project. It is required
+ by all other ffmpeg libraries.
+ .
+ This package contains a Debian-specific version of the libavutil shared
+ object that should only be used by Debian packages.
+
+Package: libavcodec52
+Architecture: any
+Depends: ${shlibs:Depends},
+         ${misc:Depends}
+Replaces: ffmpeg (<< 4:0.5.1-1)
+Description: ffmpeg codec library
+ This is the codec library from the ffmpeg project. It supports most existing
+ encoding formats (MPEG, DivX, MPEG4, AC3, DV...).
+ .
+ This package contains a Debian-specific version of the libavcodec shared
+ object that should only be used by Debian packages.
+
+Package: libavdevice52
+Architecture: any
+Depends: ${shlibs:Depends},
+         ${misc:Depends}
+Description: ffmpeg device handling library
+ This is the device handling library from the ffmpeg project.
+ .
+ This package contains a Debian-specific version of the libavdevice shared
+ object that should only be used by Debian packages.
+
+Package: libavformat52
+Architecture: any
+Depends: ${shlibs:Depends},
+         ${misc:Depends}
+Breaks: libavcodec51 (<< 3:0.svn20090303-1)
+Description: ffmpeg file format library
+ This is the demuxer library from the ffmpeg project. It supports most
+ existing file formats (AVI, MPEG, OGG, Matroska, ASF...).
+ .
+ This package contains a Debian-specific version of the libavformat shared
+ object that should only be used by Debian packages.
+
+Package: libavfilter0
+Architecture: any
+Depends: ${shlibs:Depends},
+         ${misc:Depends}
+Description: ffmpeg video filtering library
+ This is the video filtering library from the ffmpeg project.
+ .
+ This package contains a Debian-specific version of the libavfilter shared
+ object that should only be used by Debian packages.
+
+Package: libpostproc51
+Architecture: any
+Depends: ${shlibs:Depends},
+         ${misc:Depends}
+Description: ffmpeg video postprocessing library
+ This is the video postprocessing library from the ffmpeg project.
+ .
+ This package contains a Debian-specific version of the libpostproc shared
+ object that should only be used by Debian packages.
+
+Package: libswscale0
+Architecture: any
+Depends: ${shlibs:Depends},
+         ${misc:Depends}
+Description: ffmpeg video scaling library
+ This is the video scaling library from the ffmpeg project.
+ .
+ This package contains a Debian-specific version of the libswscale shared
+ object that should only be used by Debian packages.
+
+Package: libavutil-dev
+Section: libdevel
+Architecture: any
+Depends: libavutil49 (>= ${binary:Version}) | libavutil-extra-49 (>= ${source:Upstream-Version}),
+         libavutil49 (<= ${source:Upstream-Version}-99) | libavutil-extra-49 (<= ${source:Upstream-Version}-99),
+         ${misc:Depends}
+Description: development files for libavutil
+ This is the common utility library from the ffmpeg project. It is required
+ by all other ffmpeg libraries.
+ .
+ This package contains the header files and static libraries needed to
+ compile applications or shared objects that use libavutil.
+
+Package: libavcodec-dev
+Section: libdevel
+Architecture: any
+Depends: libavcodec52 (>= ${binary:Version}) | libavcodec-extra-52 (>= ${source:Upstream-Version}),
+         libavcodec52 (<= ${source:Upstream-Version}-99) | libavcodec-extra-52 (<= ${source:Upstream-Version}-99),
+         libavutil-dev (= ${binary:Version}),
+         ${misc:Depends}
+Suggests: libfaad-dev,
+          libgsm1-dev,
+          libogg-dev,
+          libschroedinger-dev,
+          libspeex-dev,
+          libtheora-dev (>> 0.0.0.alpha4),
+          libvorbis-dev,
+          libx11-dev,
+          libxext-dev,
+          zlib1g-dev,
+          ${lib1394-dev}
+Description: development files for libavcodec
+ This is the codec library from the ffmpeg project. It supports most existing
+ encoding formats (MPEG, DivX, MPEG4, AC3, DV...).
+ .
+ This package contains the header files and static libraries needed to
+ compile applications or shared objects that use libavcodec.
+
+Package: libavdevice-dev
+Section: libdevel
+Architecture: any
+Depends: libavdevice52 (>= ${binary:Version}) | libavdevice-extra-52 (>= ${source:Upstream-Version}),
+         libavdevice52 (<= ${source:Upstream-Version}-99) | libavdevice-extra-52 (<= ${source:Upstream-Version}-99),
+         libavformat-dev (= ${binary:Version}),
+         ${misc:Depends}
+Description: development files for libavdevice
+ This is the device handling library from the ffmpeg project.
+ .
+ This package contains the header files and static libraries needed to
+ compile applications or shared objects that use libavdevice.
+
+Package: libavformat-dev
+Section: libdevel
+Architecture: any
+Depends: libavformat52 (>= ${binary:Version}) | libavformat-extra-52 (>= ${source:Upstream-Version}),
+         libavformat52 (<= ${source:Upstream-Version}-99) | libavformat-extra-52 (<= ${source:Upstream-Version}-99),
+         libavcodec-dev (= ${binary:Version}),
+         ${misc:Depends}
+Description: development files for libavformat
+ This is the demuxer library from the ffmpeg project. It supports most
+ existing file formats (AVI, MPEG, OGG, Matroska, ASF...).
+ .
+ This package contains the header files and static libraries needed to
+ compile applications or shared objects that use libavformat.
+
+Package: libavfilter-dev
+Section: libdevel
+Architecture: any
+Depends: libavfilter0 (>= ${binary:Version}) | libavfilter-extra-0 (>= ${source:Upstream-Version}),
+         libavfilter0 (<= ${source:Upstream-Version}-99) | libavfilter-extra-0 (<= ${source:Upstream-Version}-99),
+         libavcodec-dev (= ${binary:Version}),
+         ${misc:Depends}
+Description: development files for libavfilter
+ This is the video filtering library from the ffmpeg project.
+ .
+ This package contains the header files and static libraries needed to
+ compile applications or shared objects that use libavfilter.
+
+Package: libpostproc-dev
+Section: libdevel
+Architecture: any
+Depends: libpostproc51 (>= ${binary:Version}) | libpostproc-extra-51 (>= ${source:Upstream-Version}),
+         libpostproc51 (<= ${source:Upstream-Version}-99) | libpostproc-extra-51 (<= ${source:Upstream-Version}-99),
+         libavutil-dev (= ${binary:Version}),
+         ${misc:Depends}
+Description: development files for libpostproc
+ This is the video postprocessing library from the ffmpeg project.
+ .
+ This package contains the header files and static libraries needed to
+ compile applications or shared objects that use libpostproc.
+
+Package: libswscale-dev
+Section: libdevel
+Architecture: any
+Depends: libswscale0 (>= ${binary:Version}) | libswscale-extra-0 (>= ${source:Upstream-Version}),
+         libswscale0 (<= ${source:Upstream-Version}-99) | libswscale-extra-0 (<= ${source:Upstream-Version}-99),
+         libavutil-dev (= ${binary:Version}),
+         ${misc:Depends}
+Description: development files for libswscale
+ This is the video scaling library from the ffmpeg project.
+ .
+ This package contains the header files and static libraries needed to
+ compile applications or shared objects that use libswscale.
--- ffmpeg-0.5.1.orig/debian/libavdevice52.lintian-overrides
+++ ffmpeg-0.5.1/debian/libavdevice52.lintian-overrides
@@ -0,0 +1,3 @@
+# Overriding these fpic lintian errors. Please see bug #528080.
+libavdevice52: shlib-with-non-pic-code usr/lib/i686/cmov/libavdevice.so.52.1.0
+libavdevice52: shlib-with-non-pic-code usr/lib/libavdevice.so.52.1.0
--- ffmpeg-0.5.1.orig/debian/rules
+++ ffmpeg-0.5.1/debian/rules
@@ -0,0 +1,148 @@
+#!/usr/bin/make -f
+
+include /usr/share/quilt/quilt.make
+
+EPOCH=4:
+DEB_SOURCE := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
+DEB_VERSION := $(shell dpkg-parsechangelog | sed -n 's/^Version: //p')
+UPSTREAM_VERSION := $(shell echo $(DEB_VERSION) | sed -r 's/[^:]+://; s/-[^-]+$$//')
+SHLIBS_VERSION := 4:0.5.1-1
+
+
+LIB_PKGS := $(shell sed -nr 's/^Package:[[:space:]]*(lib(avutil|avcodec|avdevice|avformat|avfilter|postproc|swscale)(-extra-)?[0-9]+)[[:space:]]*$$/\1/p' debian/control)
+
+# Support multiple makes at once
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+NUMJOBS = -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+else
+# on i386 and amd64, we query the system unless overriden by DEB_BUILD_OPTIONS
+ifeq      ($(DEB_HOST_ARCH),i386)
+NUMJOBS := -j$(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)
+else ifeq ($(DEB_HOST_ARCH),amd64)
+NUMJOBS := -j$(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)
+endif
+endif
+
+include debian/confflags
+
+$(info FLAVORS = $(FLAVORS))
+$(info DEB_BUILD_OPTIONS = $(DEB_BUILD_OPTIONS))
+$(info CFLAGS = $(CFLAGS))
+
+configure-%: configure-stamp-%
+configure-stamp-%: $(QUILT_STAMPFN)
+	dh_testdir
+	mkdir -p debian-$*
+	echo $(UPSTREAM_VERSION) > debian-$*/snapshot_version
+	cd debian-$* && CFLAGS="$(CFLAGS)" $(CURDIR)/configure \
+		$($*_build_confflags) $(extra_$*_build_confflags)
+	touch $@
+
+build-%: build-stamp-%
+build-stamp-%: configure-stamp-%
+	dh_testdir
+	$(MAKE) -C debian-$* $(NUMJOBS)
+	touch $@
+
+debian-shared/tools/qt-faststart: build-stamp-shared
+	$(MAKE) -C debian-shared tools/qt-faststart
+
+build-doxy: build-doxy-stamp
+build-doxy-stamp: $(QUILT_STAMPFN)
+	dh_testdir
+	doxygen
+	touch $@
+
+build: build-stamp
+build-stamp: $(addprefix build-stamp-, $(FLAVORS)) debian-shared/tools/qt-faststart
+	touch $@
+
+clean: clean-real unpatch
+clean-real:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp $(addprefix build-stamp-, $(FLAVORS)) \
+	    $(addprefix configure-stamp-, $(FLAVORS)) patch-stamp \
+	    build-doxy-stamp
+	rm -rf $(addprefix debian-, $(FLAVORS)) doxy
+	dh_clean
+
+# The trailing newline is important!
+define install_flavor
+	$(MAKE) -C debian-$(1) install DESTDIR=$(CURDIR)/debian/tmp \
+	    mandir=$(CURDIR)/debian/tmp/usr/share/man
+
+endef
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_prep
+	dh_installdirs -ptmp usr/share/doc/ffmpeg/html etc
+	dh_installdirs -ptmp usr/share/doc/ffmpeg-doc/html
+	$(foreach flavor,$(FLAVORS),$(call install_flavor,$(flavor)))
+	install -m 644 -D debian-shared/doc/*.html debian/tmp/usr/share/doc/ffmpeg/html/
+	# don't fail on binary-indep only builds.
+	[ ! -d doxy ] || cp doxy/html/* debian/tmp/usr/share/doc/ffmpeg-doc/html
+	install -m 644 -D doc/ffserver.conf debian/tmp/etc/
+	install -m 644 -D debian-shared/tools/qt-faststart debian/tmp/usr/bin/qt-faststart
+	dh_install -Xusr/share/doc/ffmpeg-doc -Xusr/share/doc/ffmpeg \
+		--fail-missing --sourcedir=debian/tmp
+
+formats.txt: install
+	env LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$(CURDIR)/debian/tmp/usr/lib" \
+	debian/tmp/usr/bin/ffmpeg -formats | tee $@
+
+binary-indep: build-doxy install
+
+binary-arch: build install formats.txt
+	dh_testdir
+	dh_testroot
+	dh_installman -pffmpeg debian/qt-faststart.1
+	dh_installdocs $(extradoc) doc/optimization.txt
+	dh_installdocs -A MAINTAINERS CREDITS doc/TODO
+	dh_installdocs -A debian/README.Debian
+	dh_installdocs RELEASE
+	dh_installdocs -p libavcodec52 formats.txt
+	dh_installexamples -pffmpeg doc/ffserver.conf debian/recordshow.sh
+	dh_installexamples -plibavcodec-dev libavcodec/apiexample.c
+	dh_installchangelogs Changelog
+	dh_lintian
+	dh_link
+	dh_compress
+	dh_fixperms
+	dh_strip --dbg-package=ffmpeg-dbg
+
+# We generate the shlibs file twice: First time for the internal
+# dependencies, and then we regenerate them for inclusion in the
+# packages. The point of this excercice is to have the 'internal'
+# dependencies more strict than 'external' ones. We have implemented this
+# so that mixing ffmpeg libraries with the unofficial ones from
+# debian-multimedia.org will be harder.
+
+# strict internal dependencies
+	for pkg in $(LIB_PKGS); do \
+	    upkg=$$(echo "$$pkg" | sed -r 's/([0-9]+)$$/-extra-\1/'); \
+	    dh_makeshlibs -p"$$pkg" -V"$$pkg (>= $(DEB_VERSION)) | $$upkg (>= $(DEB_VERSION)), $$pkg (<< $(EPOCH)$(UPSTREAM_VERSION)-99) | $$upkg (<< $(EPOCH)$(UPSTREAM_VERSION)-99)"; \
+	done
+	env LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$(CURDIR)/debian/tmp/usr/lib" \
+	dh_shlibdeps
+# target dependencies for external packages
+	for pkg in $(LIB_PKGS); do \
+	    upkg=$$(echo "$$pkg" | sed -r 's/([0-9]+)$$/-extra-\1/'); \
+	    dh_makeshlibs -p"$$pkg" -V"$$pkg (>= $(SHLIBS_VERSION)) | $$upkg (>= $(SHLIBS_VERSION))"; \
+	done
+
+	dh_installdeb
+	dh_gencontrol -- -Vlib1394-dev="$(lib1394-dev)"
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+
+.PHONY: build $(addprefix build-, $(FLAVORS)) build-doxy \
+	clean clean-real \
+	configure $(addprefix configure-, $(FLAVORS)) \
+	binary binary-indep binary-arch \
+	install \
+	get-orig-source
--- ffmpeg-0.5.1.orig/debian/libswscale-dev.install
+++ ffmpeg-0.5.1/debian/libswscale-dev.install
@@ -0,0 +1,4 @@
+usr/include/libswscale
+usr/lib/libswscale.a
+usr/lib/{,*/,*/*/}libswscale.so
+usr/lib/pkgconfig/libswscale.pc
--- ffmpeg-0.5.1.orig/debian/libavutil-dev.install
+++ ffmpeg-0.5.1/debian/libavutil-dev.install
@@ -0,0 +1,4 @@
+usr/include/libavutil
+usr/lib/libavutil.a
+usr/lib/{,*/,*/*/}libavutil.so
+usr/lib/pkgconfig/libavutil.pc
--- ffmpeg-0.5.1.orig/debian/libpostproc-dev.install
+++ ffmpeg-0.5.1/debian/libpostproc-dev.install
@@ -0,0 +1,4 @@
+usr/include/libpostproc
+usr/lib/libpostproc.a
+usr/lib/{,*/,*/*/}libpostproc.so
+usr/lib/pkgconfig/libpostproc.pc
--- ffmpeg-0.5.1.orig/debian/confflags
+++ ffmpeg-0.5.1/debian/confflags
@@ -0,0 +1,206 @@
+# -*- mode: makefile -*-
+# vim:syntax=make
+
+# build a static version on every architecture in the 'debian' ffmpeg package
+FLAVORS := static
+
+# shared is generic, i.e. without arch specific opcodes
+FLAVORS += shared
+
+export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+export DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+
+SVNREVISION=$(shell cat .svnrevision 2>/dev/null || echo "UNKNOWN")
+
+# this is only used for the check_asm macro
+ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+    CC := gcc
+else
+    CC := $(DEB_HOST_GNU_TYPE)-gcc
+endif
+
+# this outputs 0 or 1 depending on whether a piece of assembly can be compiled
+# with the *default* gcc flags; this is used to test the toolchain *default*
+# configuration
+check_asm = $(shell echo 'void foo(void) { __asm__ volatile("$(1)"); }' | $(CC) -x c -c - -o /dev/null 2>/dev/null && echo 1 || echo 0)
+
+# the other flavors always build dynamic versions
+# Also, disable architecture-specific optimizations for default shared build
+ifeq ($(DEB_HOST_ARCH),armel)
+    # whether the toolchain *default* configuration includes vfp and neon
+    vfp_asm := fadds s0, s0, s0
+    has_vfp := $(call check_asm, $(vfp_asm))
+    neon_asm := vadd.i16 q0, q0, q0
+    has_neon := $(call check_asm, $(neon_asm))
+
+    # only build 
+    ifneq ($(has_vfp),1)
+    FLAVORS += vfp
+    endif
+    ifneq ($(has_neon),1)
+    FLAVORS += neon
+    endif
+else ifeq ($(DEB_HOST_ARCH),i386)
+    FLAVORS += cmov
+else ifeq ($(DEB_HOST_ARCH),powerpc)
+    FLAVORS += altivec
+    nooptflags += --disable-altivec
+else ifeq ($(DEB_HOST_ARCH),sparc)
+    FLAVORS += vis
+    nooptflags += --disable-vis
+endif
+
+$(info Building FLAVORS=$(FLAVORS))
+
+define cond_enable
+	$(shell test -r $(1) && echo --enable-$(2) )
+endef
+
+# variant that also require --enable-version3
+define cond_enable_v3
+	$(shell test -r $(1) && echo --enable-$(2) --enable-version3 )
+endef
+
+# variant that also require --enable-nonfree
+define cond_enable_nf
+	$(shell test -r $(1) && echo --enable-$(2) --enable-nonfree )
+endef
+
+# Configuration flags causing the libs to be GPL tainted
+gpl_confflags += --enable-gpl
+gpl_confflags += --enable-postproc
+gpl_confflags += --enable-swscale
+gpl_confflags += --enable-x11grab
+
+# there is no libfaad in ubuntu/main, on in ubuntu/multiverse
+gpl_confflags += $(call cond_enable,/usr/include/faad.h,libfaad)
+
+# Common configuration flags
+confflags += --extra-version='$(DEB_VERSION)'
+confflags += --prefix=/usr
+confflags += --enable-avfilter
+confflags += --enable-avfilter-lavf
+confflags += --enable-vdpau
+confflags += --enable-bzlib
+confflags += --enable-libgsm
+confflags += --enable-libschroedinger
+confflags += --enable-libspeex
+confflags += --enable-libtheora
+confflags += --enable-libvorbis
+confflags += --enable-pthreads
+confflags += --enable-zlib
+confflags += --disable-stripping
+confflags += --disable-vhook
+confflags += --enable-runtime-cpudetect
+ifeq      ($(DEB_HOST_ARCH),armel)
+# this is required on Ubuntu lucid as it defaults to thumb2 and ffmpeg has
+# plenty of incompatible assembly; not sure how to detect that properly
+confflags += --extra-cflags="-marm -fPIC -DPIC"
+endif
+confflags += $(extra_common_confflags)
+
+# this part below is intended for the 'ffmpeg' package in ubuntu/multiverse
+gpl_confflags += $(call cond_enable,/usr/include/xvid.h,libxvid)
+confflags += $(call cond_enable,/usr/include/lame/lame.h,libmp3lame)
+gpl_confflags += $(call cond_enable,/usr/include/x264.h,libx264)
+
+confflags += $(call cond_enable,/usr/include/lame/lame.h,libmp3lame)
+confflags += $(call cond_enable_nf,/usr/include/amrnb/sp_dec.h,libamr-nb)
+confflags += $(call cond_enable_nf,/usr/include/amrwb/dec.h,libamr-wb)
+
+# Opencore-amr requires GPL v3
+v3_confflags += $(call cond_enable_v3,/usr/include/opencore-amrnb/interf_dec.h,libopencore-amrnb)
+v3_confflags += $(call cond_enable_v3,/usr/include/opencore-amrwb/dec_if.h,libopencore-amrwb)
+
+# AAC is considered non-free upstream
+confflags += $(call cond_enable_nf,/usr/include/faac.h,libfaac)
+
+# comment out following line for LGPL versions of the libraries
+confflags += $(gpl_confflags)
+confflags += $(v3_confflags)
+
+# Enable IEEE 1394 (FireWire) support on Linux only
+ifneq (,$(findstring linux,$(DEB_HOST_GNU_TYPE)))
+  confflags += --enable-libdc1394
+  lib1394-dev += libraw1394-dev, libdc1394-22-dev
+endif
+
+# XXX this probably needs fixing
+CFLAGS :=
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+# Various parts of ffmpeg (and swscale) FTBFS when compiling with -fPIC
+# and with mmx code enabled.
+  confflags += --disable-optimizations
+  confflags += --disable-mmx
+endif
+
+# Configuration flags for the static libraries
+static_build_confflags += $(confflags)
+
+# Configuration flags for the non-optimized shared libraries
+shared_build_confflags += $(confflags)
+# amd64 has no problems with optimized shared libs. i386 and arm do.
+ifneq      ($(DEB_HOST_ARCH),amd64)
+shared_build_confflags += $(nooptflags)
+endif
+shared_build_confflags += --enable-shared
+shared_build_confflags += --disable-static
+
+## armel architecture specific
+# Configuration flags for the optimised shared libraries
+vfp_build_confflags += $(confflags)
+vfp_build_confflags += --shlibdir=/usr/lib/vfp
+vfp_build_confflags += --enable-shared
+vfp_build_confflags += --disable-static
+vfp_build_confflags += --extra-cflags="-mfpu=vfp -mfloat-abi=softfp"
+vfp_build_confflags += --disable-ffmpeg
+vfp_build_confflags += --disable-ffplay
+# NB: NEON always implies v7+ and ffmpeg's NEON implementation requires VFP
+neon_build_confflags += $(confflags)
+neon_build_confflags += --shlibdir=/usr/lib/neon/vfp
+neon_build_confflags += --extra-cflags="-mfpu=neon -mfloat-abi=softfp -fPIC -DPIC"
+neon_build_confflags += --enable-shared
+neon_build_confflags += --disable-static
+neon_build_confflags += --disable-ffmpeg
+neon_build_confflags += --disable-ffplay
+
+## i386 architecture specific
+# Configuration flags for the optimized shared libraries
+cmov_build_confflags += $(confflags)
+cmov_build_confflags += $(nooptflags)
+cmov_build_confflags += --shlibdir=/usr/lib/i686/cmov
+cmov_build_confflags += --cpu='i686'
+cmov_build_confflags += --enable-shared
+cmov_build_confflags += --disable-static
+cmov_build_confflags += --disable-ffmpeg
+cmov_build_confflags += --disable-ffplay
+
+## powerpc architecture specific
+# Configuration flags for the optimized shared libraries
+altivec_build_confflags += $(confflags)
+altivec_build_confflags += --shlibdir=/usr/lib/altivec
+altivec_build_confflags += --cpu='g4'
+altivec_build_confflags += --enable-shared
+altivec_build_confflags += --disable-static
+altivec_build_confflags += --enable-altivec
+altivec_build_confflags += --disable-ffmpeg
+altivec_build_confflags += --disable-ffplay
+
+## sparc architecture specific
+# Configuration flags for the optimized shared libraries
+vis_build_confflags += $(confflags)
+vis_build_confflags += --shlibdir=/usr/lib/v9
+vis_build_confflags += --cpu='sparc64'
+vis_build_confflags += --enable-shared
+vis_build_confflags += --disable-static
+vis_build_confflags += --extra-cflags="-fPIC -DPIC"
+vis_build_confflags += --disable-ffmpeg
+vis_build_confflags += --disable-ffplay
+
+# Additional documentation for PowerPC
+ifneq (,$(findstring powerpc,$(DEB_BUILD_GNU_TYPE)))
+  extradoc := doc/ffmpeg_powerpc_performance_evaluation_howto.txt
+endif
+
--- ffmpeg-0.5.1.orig/debian/ffmpeg.docs
+++ ffmpeg-0.5.1/debian/ffmpeg.docs
@@ -0,0 +1 @@
+debian/tmp/usr/share/doc/ffmpeg/html
--- ffmpeg-0.5.1.orig/debian/libavformat52.install
+++ ffmpeg-0.5.1/debian/libavformat52.install
@@ -0,0 +1 @@
+usr/lib/{,*/,*/*/}libavformat.so.*
--- ffmpeg-0.5.1.orig/debian/libavcodec52.install
+++ ffmpeg-0.5.1/debian/libavcodec52.install
@@ -0,0 +1,2 @@
+usr/lib/{,*/,*/*/}libavcodec.so.*
+usr/share/ffmpeg/*.ffpreset
--- ffmpeg-0.5.1.orig/debian/watch
+++ ffmpeg-0.5.1/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts="uversionmangle=s/.*-snapshot//i" \
+http://www.ffmpeg.org/releases/ffmpeg-(.*)\.tar\.bz2
--- ffmpeg-0.5.1.orig/debian/README.source
+++ ffmpeg-0.5.1/debian/README.source
@@ -0,0 +1,5 @@
+This package uses quilt to manage all modifications to the upstream
+source.  Changes are stored in the source package as diffs in
+debian/patches and applied during the build.
+
+For more information about quilt, see /usr/share/doc/quilt/README.source
--- ffmpeg-0.5.1.orig/debian/ffmpeg-doc.docs
+++ ffmpeg-0.5.1/debian/ffmpeg-doc.docs
@@ -0,0 +1 @@
+debian/tmp/usr/share/doc/ffmpeg-doc/html
--- ffmpeg-0.5.1.orig/debian/ffmpeg.install
+++ ffmpeg-0.5.1/debian/ffmpeg.install
@@ -0,0 +1,3 @@
+etc
+usr/bin
+usr/share/man
--- ffmpeg-0.5.1.orig/debian/libavdevice52.install
+++ ffmpeg-0.5.1/debian/libavdevice52.install
@@ -0,0 +1 @@
+usr/lib/{,*/,*/*/}libavdevice.so.*
--- ffmpeg-0.5.1.orig/debian/libavdevice-dev.install
+++ ffmpeg-0.5.1/debian/libavdevice-dev.install
@@ -0,0 +1,4 @@
+usr/include/libavdevice
+usr/lib/libavdevice.a
+usr/lib/{,*/,*/*/}libavdevice.so
+usr/lib/pkgconfig/libavdevice.pc
--- ffmpeg-0.5.1.orig/debian/changelog
+++ ffmpeg-0.5.1/debian/changelog
@@ -0,0 +1,1642 @@
+ffmpeg (4:0.5.1-1ubuntu1.1) lucid-security; urgency=low
+
+  * SECURITY UPDATE: arbitrary code execution via crafted flic file
+    - debian/patches/CVE-2010-3429.patch: add checks to
+      libavcodec/flicvideo.c.
+    - CVE-2010-3429
+  * SECURITY UPDATE: arbitrary code execution via crafted wmv file
+    (LP: #690169)
+    - debian/patches/CVE-2010-3908.patch: properly calculate size in
+      libavcodec/utils.c.
+    - CVE-2010-3908
+  * SECURITY UPDATE: denial of service via crafted .ogg file
+    - debian/patches/CVE-2010-4704.patch: validate codebook in
+      libavcodec/vorbis_dec.c.
+    - CVE-2010-4704
+  * SECURITY UPDATE: denial of service and possible code execution via
+    crafted WebM file
+    - debian/patches/CVE-2011-0480.patch: check rangebits in
+      libavcodec/vorbis_dec.c.
+    - CVE-2011-0480
+  * SECURITY UPDATE: arbitrary code execution via crafted RealMedia file
+    (LP: #690169)
+    - debian/patches/CVE-2011-0722.patch: set dimensions in
+      libavcodec/rv34.c.
+    - CVE-2011-0722
+  * SECURITY UPDATE: denial of service and possible code execution via
+    crafted VC1 file (LP: #690169)
+    - debian/patches/CVE-2011-0723.patch: fix invalid reads in
+      libavcodec/vc1dec.c.
+    - CVE-2011-0723
+
+ -- Marc Deslauriers <marc.deslauriers@ubuntu.com>  Thu, 31 Mar 2011 10:59:31 -0400
+
+ffmpeg (4:0.5.1-1ubuntu1) lucid; urgency=low
+
+  * merge from debian. remaining changes:
+    - don't disable encoders
+    - don't build against libfaad, libdirac and libopenjpeg (all in universe)
+
+ -- Reinhard Tartler <siretart@tauware.de>  Thu, 04 Mar 2010 10:34:37 +0100
+
+ffmpeg (4:0.5.1-1) unstable; urgency=low
+
+  * new upstream release:
+    - clarifies documentation on metadata, Closes: #570050, LP: #501729
+    - further security backports, Closes: #570713
+  * adapt to new versioning scheme
+  * use '<<' instead of '<' relationship for internal shlib file
+  * merge changes from ubuntu packaging
+  * drop wmapro backport again as discussed with upstream. The unrelated
+    changes seem too risky for a stable release.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Wed, 03 Mar 2010 22:28:24 +0100
+
+ffmpeg (4:0.5+svn20090706-6) unstable; urgency=low
+
+  [ Fabian Greffrath ]
+  * debian/patches/901-fix-misc-typos.patch: New patch taken from
+    upstream GIT (slightly modified) to fix some spelling errors.
+  * Document our calling of debhelper programs in an odd order in
+    debian/rules.
+
+  [ Reinhard Tartler ]
+  * document some unattributed patches
+  * enable cpu autodetection in libswscale, Closes: #567725, LP: #386397
+
+  [ Christopher Martin ]
+  * backport wmapro codec from ffmpeg trunk
+
+ -- Reinhard Tartler <siretart@tauware.de>  Sun, 31 Jan 2010 16:53:47 +0100
+
+ffmpeg (4:0.5+svn20090706-5ubuntu2) lucid; urgency=low
+
+  * tighten build dependency on new x264 package
+  * add x264 backport for ffmpeg 0.5
+  * install presets in 'libavcodec package' instead of 'ffmpeg' binary,
+    see git history for rationale of this change
+
+ -- Reinhard Tartler <siretart@tauware.de>  Wed, 17 Feb 2010 08:37:17 +0100
+
+ffmpeg (4:0.5+svn20090706-5ubuntu1) lucid; urgency=low
+
+  * merge from debian, remaining changes:
+    - dont disable internal encoders
+    - disabled extra depedencies (come with ffmpeg-extra)
+       - libdirac
+       - libopenjpeg
+
+ -- Reinhard Tartler <siretart@tauware.de>  Sat, 16 Jan 2010 10:12:15 +0100
+
+ffmpeg (4:0.5+svn20090706-5) unstable; urgency=medium
+
+  * Upload to unstable
+  * Urgency medium because of fixed RC bugs (security issues)
+
+ -- Reinhard Tartler <siretart@tauware.de>  Fri, 22 Jan 2010 16:04:39 +0000
+
+ffmpeg (4:0.5+svn20090706-4) experimental; urgency=low
+
+  [ Loïc Minier ]
+  * Use default toolchain setup on ARM flavors for noopt and only add FPU
+    CFLAGS in the VFP and NEON flavors; this is ok since internally, cpu will
+    be set to "generic" but -march=generic or -mcpu=generic will NOT be added
+    to the build flags.
+  * Build all armel flavours with -marm since ffmpeg has a lot of hand crafted
+    assembly which doesn't build in the new lucid default mode (Thumb 2);
+    LP: #488267
+  * Build all armel flavours with -fPIC -DPIC instead of just the neon flavour
+    as the new flags/toolchain require this in Ubuntu lucid.
+  * Build some assembly test code -- just like configure -- to decide whether
+    the *default* toolchain uses vfp or neon to decided whether to build the
+    vfp and neon flavors.
+  * Drop --disable/--enable opt flags such as --disable-neon or
+    --enable-armvfp on ARM since the upstream configure script will do the
+    right thing when the proper flags are set.
+
+ -- Loïc Minier <lool@dooz.org>  Wed, 13 Jan 2010 12:57:32 +0100
+
+ffmpeg (4:0.5+svn20090706-3) experimental; urgency=low
+
+  [ Loïc Minier ]
+  * Disable more autodetecter ARM arch features
+  * Enable neon flavour
+  * Update NEON confflags to assume v7 and VFP
+  * Add backported NEON patches from ffmpeg trunk
+  * Pass proper --cpu and --extra-flags on armel
+  * Pass -fPIC -DPIC to neon pass
+
+  [ Fabian Greffrath ]
+  * Initialize the FLAVORS variable to static instead of appending to
+    it. Also, we do not support the internalencoders variable anymore.
+
+  [ Andres Mejia ]
+  * Remove unused patches from packaging.
+  * Update Vcs-* entries to new location.
+  * Bump Standards-Version to 3.8.3.
+
+  [ Reinhard Tartler ]
+  * change shlibs file to make applications depend on the -extra- packages
+  * loosen dependencies further, so that the -dev packages remain
+    installable even if ffmpeg-extra is 'out-of-date'
+  * add patch for issue1245: Make arguments of av_set_pts_info() unsigned.
+  * Support constant-quant encoding for libtheora, LP: #356322
+  * increase swscale compile time width (VOF/VOFW), LP: #443264
+  * Backports of various security patches, Closes: #550442, including:
+     - backport fixes for vorbis_dec
+     - backport oggparsevorbis fix
+     - backport vp3 fixes
+     - backport ffv1 fix
+     - libavcodec/mpegaudiodec.c backports
+     - h264 security backports
+     - backported libavformat/mov.c security fixes
+     - backported libavformat/oggdec.c security fixes
+     - backport svn r18016 aka 'MOV-Support-stz2-Compact-Sample-Size-Box'
+       to fix FTBFS
+  * enable symbol versioning
+  * bump shlibs version
+  * add README.source describing how this source package manages patches
+  * make sure the ${misc:Depends} substvar is used for each binary package
+
+ -- Reinhard Tartler <siretart@tauware.de>  Wed, 06 Jan 2010 16:27:40 +0100
+  
+ffmpeg (4:0.5+svn20090706-2ubuntu5~ppa2) lucid; urgency=low
+
+  * export *all* symbols of libswscale, fixes FTBFS in mplayer
+
+ -- Reinhard Tartler <siretart@tauware.de>  Sat, 02 Jan 2010 23:37:21 +0100
+
+ffmpeg (4:0.5+svn20090706-2ubuntu5~ppa1) lucid; urgency=low
+
+  * Imported Debian patch 0.5+svn20090706-2ubuntu4
+  * revert gbp.conf to point to lucid branch
+  * enable symbol versioning
+  * bump shlibs version
+
+ -- Reinhard Tartler <siretart@tauware.de>  Sat, 02 Jan 2010 15:03:09 +0100
+
+ffmpeg (4:0.5+svn20090706-2ubuntu4) lucid; urgency=low
+
+  * add build dependency on 'yasm', since it is now moved to main.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Mon, 21 Dec 2009 23:57:34 +0100
+
+ffmpeg (4:0.5+svn20090706-2ubuntu3) lucid; urgency=low
+
+  * security backports from ffmpeg trunk (Closes: #550442)
+   - libavcodec/mpegaudiodec
+   - libavcodec/vorbis_dec
+   - libavcodec/ffv1
+   - libavcodec/vp3
+   - libavcodec/h264
+   - libavformat/mov
+   - libavformat/oggdec
+   - libavformat/oggparsevorbis
+
+ -- Reinhard Tartler <siretart@tauware.de>  Thu, 05 Nov 2009 20:31:29 +0100
+
+ffmpeg (4:0.5+svn20090706-2ubuntu2) karmic; urgency=low
+
+  [ Reinhard Tartler ]
+  * Make arguments of av_set_pts_info() unsigned.
+  * update debian/changelog
+  * use patch for issue1245 from git.ffmpeg.org
+  * Support constant-quant encoding for libtheora, LP: #356322
+  * increase swscale compile time width (VOF/VOFW), LP: #443264
+
+  [ Loïc Minier ]
+  * Update config for karmic's armel toolchain.
+  * Enable neon flavour; LP: #383240.
+  * Update NEON confflags to assume v7 and VFP.
+  * Add backported NEON patches from ffmpeg trunk; see debian/patches/neon/.
+  * Pass proper --cpu and --extra-flags on armel.
+  * Pass -fPIC -DPIC to neon pass.
+
+ -- Loïc Minier <loic.minier@ubuntu.com>  Tue, 13 Oct 2009 23:56:04 +0200
+
+ffmpeg (4:0.5+svn20090706-2ubuntu1) karmic; urgency=low
+
+  * merge from debian. Remaining changes:
+    - disabled output decoders: faad, openjpeg, dirac (all not in main)
+    - build arm vfp variant
+    - don't build depend on yasm.
+  * fix dependencies on -extra packages: LP: #418705, #416348
+  * no need to remove mpeg encoders in the ubuntu package, unless we hear
+    otherwise from some patent owner. This brings back the mpeg2video
+    encoder is available. cf. formats.txt.gz LP: #416585
+
+ -- Reinhard Tartler <siretart@tauware.de>  Wed, 26 Aug 2009 11:20:03 +0200
+
+ffmpeg (4:0.5+svn20090706-2) unstable; urgency=low
+
+  [ Fabian Greffrath ]
+  * Enable support for libdirac, now that it has entered Debian.
+
+  [ Andres Mejia ]
+  * Fix ordering of FLAVORS that are installed. (Closes: #543595)
+
+  [ Reinhard Tartler ]
+  * prepare new upload
+  * simply debian/confflags by removing the case of renaming the source
+    package
+
+ -- Reinhard Tartler <siretart@tauware.de>  Wed, 26 Aug 2009 09:12:49 +0200
+
+ffmpeg (4:0.5+svn20090706-1ubuntu3) karmic; urgency=low
+
+  * update the dependencies of the -dev packages for the
+    unstripped -> extra renaming
+
+ -- Reinhard Tartler <siretart@tauware.de>  Tue, 25 Aug 2009 16:37:23 +0200
+
+ffmpeg (4:0.5+svn20090706-1ubuntu2) karmic; urgency=low
+
+  * really drop libopenjpeg from build depends.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Tue, 25 Aug 2009 08:17:17 +0200
+
+ffmpeg (4:0.5+svn20090706-1ubuntu1) karmic; urgency=low
+
+  * merge from debian. Remaining changes:
+    - don't build-depend on libfaad-dev, disabling faad decoder.
+    - build arm vfp variant
+    - don't build libopenjpeg support (not in main)
+  * change shlibs file to make applications depend on the -extra- packages.
+  * don't build depend on yasm.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Sat, 15 Aug 2009 18:18:23 +0200
+
+ffmpeg (4:0.5+svn20090706-1) unstable; urgency=low
+
+  * preparing new upstream version, 0.5 release branch, rev 19352
+    - this version is capable of compiling swscale in LGPL mode
+  * rename source package back
+    - The replacement package with the 'missing bits' will be called
+      'ffmpeg-extra'
+    - simplify README.upstream-upgrade
+    - rename the source package from 'ffmpeg-debian' -> 'ffmpeg'
+  * fix aac playback regression, thanks to Matthew Wakeling for reporting
+     (Closes: #540729)
+  * fix seeking in DIF (DV) movies
+     Thanks to Dan Dennedy for identifying the patch! (Closes: #540424)
+  * debian/rules:
+    - merge cond_enable_nf macro from master.extra branch
+    - don't disable ffserver in various optimized variants
+    - don't disable building of statically linked helper binaries
+    - simply by removing the case of renaming the source package
+    - change the shlibs file: s/-unstripped-/-extra-/
+
+ -- Reinhard Tartler <siretart@tauware.de>  Thu, 13 Aug 2009 12:48:27 +0200
+
+ffmpeg-debian (4:0.5+svn20090609-2) unstable; urgency=low
+
+  [ Fabian Greffrath ]
+  * Remove .install files for unstripped packages that we do not build
+    from this branch anyway.
+  * Remove debian/fixup-config.sh which was only a hack needed to repair
+    the crippled config.h
+  * Finally remove strip.sh.
+
+  [ Andres Mejia ]
+  * Add vdpau support by including vdpau headers in deb packaging.
+    (Closes: #511544)
+  * Don't disable encoders if internalencoders is set in
+    DEB_BUILD_OPTIONS.
+  * Enable yasm for i386 and amd64.
+
+  [ Reinhard Tartler ]
+  * clarifications suggested by upstream in README.Source
+  * refresh patches
+
+  [ Fabian Greffrath ]
+  * Document the copyright notice and license for the VDPAU headers in
+    debian/copyright.
+  * Remove parallel make support from debian/confflags, it's overridden
+    in debian/rules anyway.
+  * Quote opts in debian/watch.
+  * Bump debhelper compat to 7.
+  * Clean up clean target in debian/rules in favour of debian/clean.
+  * Replace "dh_clean -k" by dh_prep.
+
+  [ Reinhard Tartler ]
+  * remove duplicated libxvmc-dev build dependency
+  * sort build dependencies alphabetically
+  * remove section numbering from README.Debian
+  * add note about the lintian override
+
+ -- Reinhard Tartler <siretart@tauware.de>  Thu, 13 Aug 2009 12:46:46 +0200
+
+ffmpeg-debian (4:0.5+svn20090609-1ubuntu3) karmic; urgency=low
+
+  * do not forcefully enable objenjpeg, it is not avaiable in this build
+    anyway
+  * don't build against faac in any case, it is deemed non-free
+
+ -- Reinhard Tartler <siretart@tauware.de>  Sat, 25 Jul 2009 09:15:12 +0200
+
+ffmpeg-debian (4:0.5+svn20090609-1ubuntu2) karmic; urgency=low
+
+  * remove libopenjpeg-dev from build depends (fixes FTBFS)
+  * remove duplicate libxvmc-dev build-dependency
+
+ -- Reinhard Tartler <siretart@tauware.de>  Fri, 24 Jul 2009 21:53:47 +0200
+
+ffmpeg-debian (4:0.5+svn20090609-1ubuntu1) karmic; urgency=low
+
+  * merge from debian. Remaining changes:
+    - don't build-depend on libfaad-dev, disabling faad decoder.
+    - build arm vfp variant
+  * update gbp.conf
+  * move gbp.conf to debian/
+
+ -- Reinhard Tartler <siretart@tauware.de>  Sat, 18 Jul 2009 10:55:24 +0200
+
+ffmpeg-debian (4:0.5+svn20090609-1) unstable; urgency=low
+
+  [ Andres Mejia ]
+  * Add myself to Uploaders list.
+  * Reorder when dh_strip is done so qt-faststart is also
+    stripped.
+  * Update to control files.
+  * Add new confflags for new build dependencies.
+  * Use <package>.docs files to add ffmpeg and ffmpeg-doc documentation.
+  * Use <package>.docs files for installing documentation.
+  * Add comment to 900_doxyfile patch.
+  * Add man page for qt-faststart.
+  * Bump version in changelog to prepare new release
+  * Fix FTBFS for ffmpeg source package with -dev packages (Closes: #527761)
+  * Use dh_lintian to install lintian overrides
+  * Update comment on fpic-* patches
+  * Build-Depend on debhelper (>= 6.0.7~) for dh_lintian.
+  * Add lintian overrides for remaining fpic lintian errors.
+  * Shorten comment on lintian-overrides.
+  * Allow passing in extra confflags, removes the need for fix-fpic
+    DEB_BUILD_OPTIONS.
+  * Fix FTBFS on kfreebsd. (Closes: #528591)
+  * Include patches to allow us to use opencore-amr libraries.
+
+  [ Reinhard Tartler ]
+  * remove debian/control.* mechanism
+  * improve patch description for debian/patches/100_kfreebsd
+
+  [ Andres Mejia ]
+  * Add lintian overrides for ffmpeg-debian source warnings.
+  * Only use .svnrevision if it's readable.
+  * Update source lintian-overrides for modifications to debian/rules.
+  * Add fix for FTBFS for GNU Hurd OS. Thanks Marc Dequènes.
+    (Closes: #530436)
+
+  [ Felipe Sateler ]
+  * Don't add -unstripped to the unstripped variant version number
+    in debian/README.upstream-upgrade.
+  * In the same file, pass explicit version to git-import-orig
+
+  [ Fabian Greffrath ]
+  * Cleaned up debian/watch file.
+  * Add notes why we no longer strip the orig.tar.gz.
+
+  [ Andres Mejia ]
+  * Fix watch file to ignore daily snapshots.
+  * Make get-orig-source.sh executable.
+
+  [ Reinhard Tartler ]
+  * add patch for qtrle encoding (Closes: #530016)
+  * Enable xvmc support by adding libxvmc-dev to build dependencies
+  * really add libopenjpeg-dev to build depends, actually enabling
+    the openjpeg decoder.
+  * reorganise README.Debian for the new plan [tm]
+  * no longer strip the source on upstream upgrades
+  * Imported Upstream version 0.5+svn20090609
+  * adjust notes in README.upstream-upgrade for the now unstripped
+    debian source package
+  * remove hack to build with stripped sources
+  * bump standards version, no changes needed
+
+ -- Reinhard Tartler <siretart@tauware.de>  Sun, 05 Jul 2009 22:52:43 +0200
+
+ffmpeg-debian (4:0.5+svn20090420-2) unstable; urgency=low
+
+  * debian/control: fix dependencies for libavutil-dev and libavfilter-dev
+    so that they can be used with the unstripped variants properly.
+  * debian/rules: set nooptflags only for relevant architectures.
+  * explicitly disable 'dangerous' encoders on the --configure line.
+  * fix SHLIBS_VERSION in debian/rules (Closes: #527350).
+
+ -- Reinhard Tartler <siretart@tauware.de>  Mon, 04 May 2009 07:41:19 +0200
+
+ffmpeg-debian (4:0.5+svn20090420-1) unstable; urgency=low
+
+  [ Fabian Greffrath ]
+  * Merge the contents of patents.txt into README.Debian and change some
+    paragraphs to (hopefully) add some more clarity on the removed encoders
+    and the package naming scheme. Based on suggestions by Xavier Douville
+    <debian@douville.org>, thank you very much for the review. (Closes: #519025)
+  * Reorder some confflags to account for GPL licensed libraries.
+  * Remove patents.txt
+  * Explicitely mention that no decoders are disabled in our packages.
+  
+  [ Loïc Minier ]
+  * Disable more autodetecter ARM arch features
+  * Add neon and vfp flavors to armel disabled for now
+  * vfp CFLAGS: add "-mfpu=vfp -mfloat-abi=softfp"
+
+  [ Reinhard Tartler ]
+  * New Upstream Version (svn revision 18630)
+  * bump epoch as 0.5 was released. Future version will use '+' to indicate 
+    that the package is based on a release branch and '~' to indicate that
+    the package is based on the 'trunk' branch.
+  * update from the upstream release branch to generate a new upstream
+    tarball.
+  * add a git-buildpackage config file at debian/gbp.conf
+  * beautify identification string
+  * debian/rules: bump epoch to '4'
+  * update section names in control file
+  * update upstream svn server url
+  * fixup get-orig-source rules in debian/rules
+  * create right filenames for the orig.tar.gz files
+  * update README.upstream-upgrate for new versioning scheme
+  * remove debian/005_release_branch_changes.diff
+  * remove reference to 020_visibility_patch
+  * install the upstream license file and release notes
+  * allow -dev packages be installed with the unstripped variants
+    Closes: #526007, LP: #312898
+  * be more careful with svn:externals in debian/get-orig-source.sh.
+    (Closes: #525348)
+  
+ -- Reinhard Tartler <siretart@tauware.de>  Sat, 02 May 2009 09:09:54 +0200
+
+ffmpeg-debian (3:0.svn20090303-1ubuntu6) jaunty; urgency=low
+
+  * vfp CFLAGS: add "-mfpu=vfp -mfloat-abi=softfp".
+
+ -- Loic Minier <lool@dooz.org>  Fri, 10 Apr 2009 21:34:29 +0200
+
+ffmpeg-debian (3:0.svn20090303-1ubuntu5) jaunty; urgency=low
+
+  * Disable more autodetected ARM arch features.
+  * Add neon and vfp flavors to armel disabled for now.
+  * Enable vfp pass on armel; leave the neon disabled.
+
+ -- Loïc Minier <lool@dooz.org>  Fri, 10 Apr 2009 17:58:52 +0200
+
+ffmpeg-debian (3:0.svn20090303-1ubuntu4) jaunty; urgency=low
+
+  * brown paperbag upload. Actually include the patch intended for the
+    last upload.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Sat, 21 Mar 2009 14:55:46 +0100
+
+ffmpeg-debian (3:0.svn20090303-1ubuntu3) jaunty; urgency=low
+
+  * don't disable ffserver in specialised flavors. Fixes LP: #345370
+
+ -- Reinhard Tartler <siretart@tauware.de>  Sat, 21 Mar 2009 14:52:25 +0100
+
+ffmpeg-debian (3:0.svn20090303-1ubuntu2) jaunty; urgency=low
+
+  * No-change rebuild to fix lpia shared library dependencies.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Thu, 19 Mar 2009 17:26:36 +0000
+
+ffmpeg-debian (3:0.svn20090303-1ubuntu1) jaunty; urgency=low
+
+  * FFE granted in LP: #340303.
+
+  * merge from debian/unstable.
+  * remaining changes to debian:
+    - don't build-depend on libfaad-dev, disabling faad decoder.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Fri, 13 Mar 2009 08:54:33 +0100
+
+ffmpeg-debian (3:0.svn20090303-1) unstable; urgency=low
+
+  * New Upstream Version (svn revision 17737 libswscale revision 28799)
+    - Electronic Arts TQI decoder
+    - OpenJPEG based JPEG 2000 decoder
+    - NC (NC4600) camera file demuxer
+    - Gopher client support
+    - MXF D-10 muxer
+    - generic metadata API
+  * debian/get-orig-source.sh: Track the version 0.5 release branch. The
+    version number does not really reflect this, but this package is
+    actually very close to the 0.5 release branch.
+  * various cleanups to improve get-orig-source.sh
+  * Remove liba52 from the suggests field in debian/control.ffmpeg, as
+    ffmpeg does no longer use it since upload 0.svn20080206-10.
+  * Fix the Vcs-Git urls to the correct locations.
+  * The libavformat52 now links against libavcodec52, which breaks
+    applications that *ALSO* link against libavcodec51. Adding a
+    Breaks: libavcodec51 should prevent this and (hopefully) Closes: #516885.
+  * improve parallel builds on SMP/multicores by supporting the parallel
+    flag in DEB_BUILD_OPTIONS, and default to the number of available CPUs
+    on i386 and amd64.
+  * Drop unapplied patches from debian/patches.
+  * bump shlibs version.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Tue, 03 Mar 2009 21:01:25 +0100
+
+ffmpeg-debian (3:0.svn20090204-3) unstable; urgency=low
+
+  [ Fabian Greffrath ]
+  * remove libasound2-dev from build-depends on non-Linux archs
+
+  [ Reinhard Tartler ]
+  * fix postinst generation by calling dh_installdeb after dh_makeshlibs
+  * upload to unstable
+
+ -- Reinhard Tartler <siretart@tauware.de>  Sun, 22 Feb 2009 09:32:49 +0100
+
+ffmpeg-debian (3:0.svn20090204-2ubuntu1) jaunty; urgency=low
+
+  * merge from debian. Remaining changes:
+    - don't build depend on libfaad-dev
+
+ -- Reinhard Tartler <siretart@tauware.de>  Thu, 05 Feb 2009 21:22:01 +0100
+
+ffmpeg-debian (3:0.svn20090204-2) experimental; urgency=low
+
+  * add libxvmc-dev to build-depends in the 'ffmpeg' variant
+  * add libasound2-dev to build-depends. This means that ffplay is now able to
+    actually play using alsa directly instead only via libsdl
+  * add epochs for the "internal" shlibs dependencies
+
+ -- Reinhard Tartler <siretart@tauware.de>  Thu, 05 Feb 2009 20:30:05 +0100
+
+ffmpeg-debian (3:0.svn20090204-1) experimental; urgency=low
+
+  [ Reinhard Tartler ]
+  * New Upstream Version (svn revision 16978 libswscale revision 28461)
+
+  Upstream Changes:
+    - R3D REDCODE demuxer
+    - ALSA support for playback and record
+
+  * strighten internal dependencies by using a shlibs.local file
+    Closes: #512844, #512466
+  * New upstream version reintroduces a compatibility symbol ff_gcd
+    Closes: #512946
+  * Bump shlibs because of changes of the Metadata API in libavformat.
+    Actually no other package should use them yet, but let's better play safe
+    here...
+  * no longer install dsputil.h. It exposes lots of function that are private
+    to ffmpeg and may change on any new upstream revision. Please get in touch
+    with the ffmpeg maintainers if you maintain packages that rely on that
+    ffmpeg internal headers like this.
+  * simplify debian/confflags by doing autodetection of headers:
+     - xvid.h
+     - lame/lame.h
+     - faac.h
+     - x264.h
+     - vdpau/vdpau.h
+    Also remove the setting externalcodecs from DEB_BUILD_OPTIONS. The codecs
+    will be enabled as soon as the headers are installed on the filesystem,
+    so there is no need in enabling that separately.
+  * install ffpresets in /usr/share/ffmpeg/. Currently only presets for
+    x264 are avaiable, so a libx264 enabled libavcodec (like
+    libavcodec-unstripped-52) is needed to actually use them.
+
+  [ Fabian Greffrath ]
+  * Enabled Speex decoding via libspeex.
+  * Use an alternative approach to achieve strict internal dependencies
+    by calling dh_makeshlibs twice in debian/rules instead of a
+    debian/shlibs.local file.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Sun, 01 Feb 2009 19:54:27 +0100
+
+ffmpeg-debian (3:0.svn20090119-1ubuntu1) jaunty; urgency=low
+
+  * merge from debian. LP: #318501
+  * new version fixes CVE-2008-3230, LP: #253767
+
+ -- Reinhard Tartler <siretart@tauware.de>  Tue, 20 Jan 2009 09:20:53 +0100
+
+ffmpeg-debian (3:0.svn20090119-1) experimental; urgency=low
+
+  * New Upstream Version (svn revision 16681 libswscale revision 28341)
+  * update Vcs-Git tags. Packaging has now moved to git
+  * updates to packaging that faciliate building the unstripped and ubuntu
+    variants of this package
+  * enable xvmc support
+
+  Upstream Changes:
+   - SVQ3 watermark decoding support
+   - hybrid WavPack support
+
+ -- Reinhard Tartler <siretart@tauware.de>  Tue, 20 Jan 2009 00:55:26 +0100
+
+ffmpeg-debian (3:0.svn20090110-1) experimental; urgency=low
+
+  * new upstream svn snapshot (svn revision 16508, libswscale revision 28286)
+  
+  Upstream Changes:
+   - RV30 and RV40 decoder
+   - QCELP / PureVoice decoder
+  
+  * removed patch 050_fix_pkgconfig_files.patch. Merged upstream
+  * disabled patch 020_visibility_patch. It needs to be adapted to the new
+    upstream changes. Hopefully it will get merged into ffmpeg properly.
+  * install formats.txt in the libavcodec52 package to document what
+    formats this version of ffmpeg has enabled.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Sun, 11 Jan 2009 20:55:48 +0100
+
+ffmpeg-debian (3:0.svn20081115-1ubuntu1) jaunty; urgency=low
+
+  * merge from debian.
+  * keep myself in the maintainer field. If you are touching this or the
+    'ffmpeg' package in multiverse, please get in touch with me. Both
+    source packages come from the same packaging branch.
+  * drop dependency on faad.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Sat, 15 Nov 2008 19:44:29 +0100
+
+ffmpeg-debian (3:0.svn20081115-1) experimental; urgency=low
+
+  * new upstream svn snapshot (svn revision 15824, libswscale revision 27910)
+  * bump standards version to version 3.8.0, no changes needed
+  * Adjust pkg-files to no longer put unnecessary dependencies in the generated
+    .pc files. Closes: #504220
+
+ -- Reinhard Tartler <siretart@tauware.de>  Mon, 10 Nov 2008 21:37:16 +0100
+
+ffmpeg-debian (3:0.svn20081108-1ubuntu3) jaunty; urgency=low
+
+  * really disable faad support completely.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Mon, 10 Nov 2008 10:58:01 +0100
+
+ffmpeg-debian (3:0.svn20081108-1ubuntu2) jaunty; urgency=low
+
+  * drop the patch to dlopen faad at runtime for now. it needs more
+    polishing, and we can have that functionality easier with the 'ffmpeg'
+    source package that will appear in multiverse.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Mon, 10 Nov 2008 10:31:47 +0100
+
+ffmpeg-debian (3:0.svn20081108-1ubuntu1) jaunty; urgency=low
+
+  * merge from debian.
+  * keep myself in the maintainer field. If you are touching this or the
+    'ffmpeg' package in multiverse, please get in touch with me. Both
+    source packages come from the same packaging branch.
+  * drop dependency on faad.
+  * import patches from old packaging to dlopen libfaad at runtime.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Mon, 10 Nov 2008 07:31:16 +0100
+
+ffmpeg-debian (3:0.svn20081108-1) experimental; urgency=low
+
+  * upstream svn snapshot (svn revision 15786, libswscale revision 27900).
+  * apply visibility patch from ffmpeg-devel mailing list. This reduces the 
+    number of symbols that are exposed to other applications. Please file
+    bugs if applications fail to link against ffmpeg because of that.
+  * remove 001_fixup_version.diff patch and use upstream --extra-version
+    configure flag instead.
+  * now really remove 015_img_convert.patch from source package.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Sat, 08 Nov 2008 16:38:23 +0100
+
+ffmpeg-debian (3:0.svn20080925-1) experimental; urgency=low
+
+  [ Loic Minier ]
+  * Tweak sed versions regexps to deal with epochs and upstream revisions with
+    dashes and be generally stricter.
+  * Large cleanup to rules logic: drop some cruft, rewrite some small chunks
+    in a slightly more readable manner, whitespaces, .PHONY fixes,
+    internalencoders handling, shlibs logic...
+  * Rename SRC_VERSION to UPSTREAM_VERSION in rules.
+  * Use DEB_SOURCE from the Source: field of dpkg-parsechangelog's output
+    instead of hardcoding the name of the source.
+
+  [ Reinhard Tartler ]
+  * new svn snapshot (svn revision 15404, libswscale revision 27636).
+  * SONAME change: libavcodec51 -> libavcodec52
+  * drop old scaler (imgres/imgconvert). Upstream is about to remove it
+    completely.
+    - reporter claims that a newer snapshot fixes a crash in the dca decoder.
+      Thanks to "Alexander E. Patrakov" <patrakov@gmail.com> (Closes: #496612)
+  * reenable h261 encoder (Closes: #459073)
+
+  [ Fabian Greffrath ]
+  * debian/{ffmpeg,lib*-dev}.install:
+    + Simplified, e.g. install the whole /usr/include/ sub-directory for each
+      particular library instead of single header files one by one.
+  * debian/control, debian/confflags:
+    + Enabled Dirac support via libschroedinger. (Closes: #499785)
+  * debian/changelog:
+    + Added an epoch needed for Ubuntu.
+  * debian/control:
+    + Removed Conflicts and Replaces against packages that either aren't even
+      in Debian 4.0 "Etch" anymore or that use the deprecated naming scheme
+      from <http://www.debian-multimedia.org>.
+    + Since ffmpeg-config has been removed from our packages, all inter-package
+      Conflicts and Replaces may be removed, too.
+    + Removed Build-Conflicts against libdc1394-13-dev, because
+      libdc1394-22-dev already does this for us.
+    + Updated inter-package dependencies and demoted Depends on external
+      library packages to Suggests, since we shouldn't encourage package
+      maintainers to link statically against libav*.
+  * debian/confflags, debian/control, debian/rules, debian/libavfilter*:
+    + Built libavfilter and disabled vhook in turn (Closes: #499787).
+
+  [ Loic Minier ]
+  * Remove debug echo which broke shlibs, sorry.
+  * Fix Vcs-* control fields; thanks Gerfried Fuchs.
+  * Mention upstream SVN in debian/copyright; thanks Gerfried Fuchs;
+    closes: #499914.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Sat, 06 Sep 2008 20:07:01 +0200
+
+ffmpeg-debian (0.svn20080206-12) unstable; urgency=low
+
+  * enable vhook in all flavors. (Closes: #490272, LP: #260296)
+  * make ffmpeg output a proper version number. (Closes: #496133, #483923)
+
+ -- Reinhard Tartler <siretart@tauware.de>  Sat, 23 Aug 2008 10:49:10 +0200
+
+ffmpeg-debian (0.svn20080206-11) unstable; urgency=low
+
+  [ Reinhard Tartler ]
+  * new patch: patches/010_fix_ftbfs_hppa.diff: On hppa shared objects
+    do required object files to be build "-fPIC -DPIC". Patch taken
+    from upstream svn.
+  * bugfix: libraries linked with libX11 on GNU/kFreeBSD. Thanks to
+    Aurelien Jarno for the patch. (Closes: #487252)
+
+  [ Fabian Greffrath ]
+  * debian/confflags, debian/control:
+    + Build-Depend on libdc1394-22-dev explicitely and add
+      Build-Conflicts on libdc1394-13-dev (Closes: #490319).
+
+ -- Reinhard Tartler <siretart@tauware.de>  Wed, 16 Jul 2008 10:41:49 +0200
+
+ffmpeg-debian (0.svn20080206-10) unstable; urgency=high
+
+  * enable mmx and sse3 in builds. These CPU features are autodetected 
+    at runtime on amd64 and i386 using the 'cpuid' instrcution.
+    (Closes: #489732)
+  * disable support for liba52-dev. ffmpeg has its own implementation.
+  * don't add -fPIC -DPIC forcefully to ./configure. upstream claim that
+    the configure script gets this right on all architectures itself.
+  * Add patch 020_bug489965_bufferoverflow_str_demuxer.diff. Fixes a
+    buffer overflow in the STR demuxer. Thanks to Moritz Muehlenhoff for
+    reporting the issue. (Closes: #489965)
+  * Raising severity to high because of security issue.
+  * rework the shlibs file. Make applications linking against libraries
+    produced by this source package generate an alternate dependency on
+    the 'unstripped' variants of this package. They actually do not exist
+    yet at this point, but this way reverse dependencies are enabled to
+    use them when they eventually appear.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Wed, 09 Jul 2008 14:04:06 +0200
+
+ffmpeg-debian (0.svn20080206-9) unstable; urgency=low
+
+  [ Reinhard Tartler ]
+  * cleanup 010_proper_rpath.diff: remove spurious linker search paths.
+  * debian/strip.sh: no need to remove the glue code for x264 and xvid.
+    However, since that code is not built in debian anyway, the orig.tar.gz
+    was not rebuilt with this change.
+  * provide mmx-enabled shared objects on amd64. AFAIK all amd64 machines
+    do support MMX.
+  * Provide optimized versions of the libraries along the unoptimized
+    ones. They are installed in machines and architecture specific
+    directories. Optimized for further target will be added per request,
+    please file bugs to request them.
+  * rename the source package (again), this time on upstream's request.
+    The former name was considered insulting by upstream, because it
+    somewhat indicated the original source was somehow 'non-free', which is
+    not the case. The new name now represents that we modified the package
+    so that it becomes acceptable for debian.
+  * Cleanups in debian/rules file.
+  * Add verbose explanations about the renaming in README.Debian.
+
+  [ Fabian Greffrath ]
+  * debian/control:
+    + Added Conflicts and Replaces against obsolete library packages from
+      <http://debian-multimedia.org/> wearing the 'cvs' suffix in their names
+      (Closes: #484585, #484586, #484587, #484776, #484778).
+    + Added doxygen to Build-Depends.
+    + Introduced new package 'ffmpeg-doc' that contains html doxygen
+      documentation of the ffmpeg API (Closes: #438369).
+    + Changed Build-Depends from libdc1394-13-dev to libdc1394-22-dev,
+      which is supported upstream since r11501.
+  * debian/ffmpeg-doc.install:
+    + Added.
+  * debian/rules:
+    + Build and install html doxygen documentation.
+    + Avoid dependency of build-stamp rule on phony targets.
+  * debian/libavutil-dev.install, debian/rules,
+    debian/patches/010_ffmpeg-config.diff:
+    + Removed ffmpeg-config, use pkg-config instead (maintainers of affected
+      packages have been informed, see #487917 to #487922).
+
+  [ Darren Salt ]
+  * Added patch 900_doxyfile: tell doxyfile to ignore debian* directories.
+  * debian/rules:
+    - Reworked building so that separate source & build directories are
+      used. This makes cleanup simpler and speeds up maintenance by avoiding
+      complete rebuilds when using "debuild binary".
+    - Removed some file installation 'cp' commands, made unnecessary due to
+      the build reworking.
+    - Unpatching is now done *after* cleaning.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Mon, 30 Jun 2008 15:27:50 +0200
+
+ffmpeg-free (0.svn20080206-8) unstable; urgency=low
+
+  [ Fabian Greffrath ]
+
+  * debian/control:
+    + Added Conflicts and Replaces on libavutil-dev (<< 0.svn20080206-7)
+      to libavcodec-dev (Closes: #483548).
+
+  [ Reinhard Tartler ]
+
+  * remove patches from the debian package as disussed with upstream:
+    - 005_runtime_cpudetect.diff: it is supposed to fix runtime cpu detection
+      on i386. The code (and the define) has undergone large refactoring wrt.
+      the define RUNTIME_CPUDETECT. It is very likely to have undisired
+      side-effects with this version of ffmpeg. It therefore seem more safe
+      to me to actually remove this patch for now, and reinvestigate the
+      problems that occur, if they do.  (Related to: #482717)
+    - 005_m68k_workaround.diff: works around bugs in gcc for m68k.
+    - 006_mips_pthreads.diff: was an workaround for (now fixed) #428741.
+    - 020_fix_sws_scale_crash: patch has been rejected upstream:
+      http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-May/047846.html
+    - 054_h264_mmx_chroma_mc_crash.diff. According to upstream, this has
+      been fixed in a different way and is not reproducible. Verified that
+      the file referenced in bug #404176 does not crash anymore even
+      without this patch.
+  * new patch: 015_reenable-img_convert.diff.  Unlike previous version of this
+    patch, this uses a more lightweight approach. With building imgresample, a
+    few symbol clashes occur with libswscale. We therefore strip off symbols
+    that are already provided by libswscale. (Closes: #483960).
+  * remove 011_link_plugins.diff. It is completely unnecessary now.
+  * refactor quilt usage: use /usr/share/quilt/quilt.make.
+  * support building in paralell. make snippet taken from the qemu package.
+  * cleanups in debian/rules.
+  * Move ffmpeg-config back to libavutil. This way we can avoid a circular
+    dependency between libavutil-dev and libavcodec-dev. (Closes: #484132).
+    libavcodec uses libavutil internally, so this dependency cannot be avoided.
+  * disable altivec, at least for now. (Closes: #482717)
+  * always compile with --disable-strip. We strip the binaries afterwards using
+    dh_strip anyways.
+  * Remove depdency substitutions ${shlibs:Depends} and ${misc:Depends} from the
+    -dev packages.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Wed, 04 Jun 2008 00:04:08 +0200
+
+ffmpeg-free (0.svn20080206-7) unstable; urgency=low
+
+  * debian/control:
+    + Removed unnecessary Conflicts and Replaces from libswscale0
+      (Closes: #481908), thanks Guillem Jover.
+    + Made libavutil-dev depend on libavcodec-dev.
+  * debian/libavcodec.install, debian/libavutil.install:
+    + Moved ffmpeg-config (script and manpage) from libavutil-dev to
+      libavcodec-dev (really Closes: #482213, #482214).
+
+ -- Fabian Greffrath <fabian@debian-unofficial.org>  Tue, 28 May 2008 16:02:03 +0200
+
+ffmpeg-free (0.svn20080206-6) unstable; urgency=low
+
+  * Bug fix: "libavg: FTBFS: ld: cannot find -ldts", thanks to Lucas
+    Nussbaum (Closes: #482213, 482214). Fixed by removing -ldts from
+    ffmpeg-config.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Tue, 27 May 2008 12:45:10 +0200
+
+ffmpeg-free (0.svn20080206-5) unstable; urgency=low
+
+  [ Fabian Greffrath ]
+  * debian/control:
+    + Fixed dependency typo, libswscale0 conflicts with libswsacle1d but not
+      libswscale1d (Closes: #481908).
+
+  [ Reinhard Tartler ]
+  * disable 015_build_imgresample.diff. Please port all applications
+    needing the symbols sws_{scale,getContext},
+    sws_{getCachedContext,freeContext} to use libswscale instead.
+  * downgrade debhelper depencency to level 5. We don't use any of the
+    level 6 features, and level 5 faciliates backporting to earlier
+    releases massively.
+  * remove unapplied patches from source to reduce the size of the
+    .diff.gz. The old patches can be retrieved from branches in our svn.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Thu, 22 May 2008 09:26:06 +0200
+
+ffmpeg-free (0.svn20080206-4) unstable; urgency=low
+
+  * debian/rules:
+    + Moved confflags, that result in GPL versions of the libraries, into a
+      dedicated variable gpl_confflags. Add this to the common confflags.
+    + Moved --prefix=/usr to the common confflags.
+    + Added some comments and whitespace (nothing special).
+    + Renamed the "risky" keyword to "internalencoders". Set this in
+      DEB_BUILD_OPTIONS in order to create and build from an unstripped tarball
+      in the get-orig-source and build rules (Closes: #478010).
+    + Introduced the "externalcodecs" keyword. Set this in DEB_BUILD_OPTIONS to
+      enable support for additional codecs via external libraries.
+    + Commented out the amr?b codecs among the external codecs, because the
+      resulting packages will be unredistributable.
+
+ -- Fabian Greffrath <fabian@debian-unofficial.org>  Tue, 29 Apr 2008 09:07:11 +0100
+
+ffmpeg-free (0.svn20080206-3) experimental; urgency=low
+
+  * install qt-faststart. Thanks Stefan Hermann for the patch from ubuntu.
+    (Closes: #470484)
+  * Reenable 020_fix_libswscale_pic_code, fixes FTBFS on amd64.
+  * Reenable altivec, fixes FTBFS on powerpc.
+  * Add some notes about the removed mpeg encoders (Closes: #440702)
+
+ -- Reinhard Tartler <siretart@tauware.de>  Fri, 18 Apr 2008 23:02:24 +0200
+
+ffmpeg-free (0.svn20080206-2) experimental; urgency=low
+
+  [ Reinhard Tartler ]
+  * patches/020_fix_sws_scale_crash: if sws_scale is given an invalid context
+    (e.g. a null pointer), the function will crash because of a null pointer
+    dereference. Add a check for that here.
+  * add Conflicts/Replaces for libswscale1d.
+  * Due to the fact that we no longer build the shared version of ffmpeg with
+    mmx optimisations, the following patches have been dropped:
+      - 020_mmx_optims.diff
+      - 020_mmx_pic_code.diff
+      - 020_disable_snow_mmx_in_pic.diff
+      - 020_fix_libswscale_pic_code
+
+  [ Fabian Greffrath ]
+  * debian/control:
+    + Added libx11-dev and libxext-dev to Build-Depends.
+  * debian/rules:
+    + Build with --enable-x11grab (Closes: #441983).
+    + Build ffmpeg and shared libraries with --extra-cflags="-fPIC -DPIC"
+      (feeling confident that this closes: #472613) and "drop the surgery
+      regarding Makefile.pic and config.mak.pic".
+    + In this context, cleaned up build rule: Run '$(MAKE)' and '$(MAKE) clean'
+      from the top source directory instead of diving into the library
+      directories; force move during backup and recovery of the static
+      libraries; let the build rule itself depend on config-extra-includes.h
+      (instead of build-stamp) to avoid being run again from the binary rule;
+      some more minor changes of cosmetic type.
+    + Renamed config-extra-includes rule to config-extra-includes.h to
+      reflect the file name of the created file (also changed to override it
+      instead of appending) and to avoid the rule to be run twice.
+    + Disabled all architecture-specific optimizations for the time being.
+
+ -- Fabian Greffrath <fabian@debian-unofficial.org>  Fri, 1 Apr 2008 17:22:00 +0100
+
+ffmpeg-free (0.svn20080206-1) experimental; urgency=low
+
+  [ Reinhard Tartler ]
+  * new upstream release (Closes: #471136)
+  * refreshed patches
+  * libogg was dropped upstream
+  * no longer install integer.h, as it is not part of the public API (see
+    upstream r11642).
+  * no longer install rtp.h, as it is not part of the public API (see
+    upstream r11505).
+  * install crc.h and sha1.h to libavutil-dev, since it is part of the
+    public API now.
+  * introduce new package: libavdevice52 and libavdevice-dev.
+  * Implemented debian/get-orig-source.sh and adjusted the get-orig-source
+    target in debian/rules to use that.
+  * fix invocation of the testsuite.
+  * bump standards version to 3.7.3 (no changes needed).
+  * add script recordshow.sh (Closes: 461434). Thanks to
+    Daniel Dickinson <cshore@wightman.ca>
+  * Introdcue binary package ffmpeg-dbg, which contains debugging symbols
+    of the shared library packages.
+
+  [ Fabian Greffrath ]
+  * debian/changelog:
+    + Source is exported from SVN, not CVS. Reflect this in the versioning
+      scheme (Closes: #468319).
+  * debian/control:
+    + Changed Build-Depends to liba52-0.7.4-dev | liba52-dev.
+    + Improved descriptions and dependencies for libavdevice packages.
+  * debian/control, debian/compat:
+    + Bumped debhelper Build-Depends to (>= 6.0.0).
+  * debian/control, debian/*.install:
+    + Adopted shared library package names to upstream SONAMEs.
+  * debian/README.Debian:
+    + Updated, since AAC decoding (through FAAD) is now enabled.
+    + Updated URL for unofficial ffmpeg packages.
+  * debian/rules:
+    + Reordered confflags to optionally build LGPL versions of the libraries.
+    + Removed trailing whitespace.
+    + Removed unused strip rule.
+    + Added libxvidcore4-dev to weak-build-deps and fixed confflags
+      in DEB_BUILD_OPTIONS=risky accordingly.
+    + Added a get-orig-source rule to reproduce the source tarball. Produce an
+      unstripped tarball if DEB_BUILD_OPTIONS=risky.
+    + Do not run debian/fixup-config.sh if DEB_BUILD_OPTIONS=risky.
+  * debian/patches/011_link_plugins.diff:
+    + Updated to link all plugins against libavutil since they all use symbols
+      from this library. Resolves "symbols found in none of the libraries"
+      warnings from dpkg-shlibdeps.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Thu, 20 Mar 2008 17:57:21 +0100
+
+ffmpeg-free (0.cvs20071007-4) experimental; urgency=low
+
+  [ Fabian Greffrath ]
+  * debian/control:
+    + Wrapped Uploaders, Build-Depends and Depends,
+      Conflicts and Replaces fields.
+    + Added libfaad-dev to Build-Depends.
+    + Added Homepage field.
+    + Added ${misc:Depends} to all Depends.
+  * debian/rules:
+    + Enabled faad support via libfaad
+      (Closes: #400094, #418230, #447089, #448068, #449387).
+    + Added libmp3lame-dev to weak-build-deps in DEB_BUILD_OPTIONS=risky.
+    + Added support for amrnb, amrwb and x264 (Closes: #432170) in
+      DEB_BUILD_OPTIONS=risky.
+
+  [ Reinhard Tartler ]
+  * added Fabian Greffrath to Uploaders
+
+ -- Reinhard Tartler <siretart@tauware.de>  Thu, 20 Mar 2008 15:55:11 +0100
+
+ffmpeg-free (0.cvs20071007-3) experimental; urgency=low
+
+  * disable armv6 code generation. Thanks to Joey Hess for the patch
+    (Closes: #438923).
+
+ -- Reinhard Tartler <siretart@tauware.de>  Sun, 13 Jan 2008 23:28:25 +0100
+
+ffmpeg-free (0.cvs20071007-2) experimental; urgency=low
+
+  * restore soname on libavutil. got dropped on previous upload.
+  * Bug fix: "needs libavutil-dev headers but doesn't depend on it",
+    thanks to rmh@aybabtu.com (Closes: #434494). This was actually already
+    fixed in a previous upload.
+  * build dependencies in debian/control are now multiline.
+  * Drop the XS- from the Vcs-Browser and Vcs-Svn field.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Sun, 16 Dec 2007 21:36:49 +0100
+
+ffmpeg-free (0.cvs20071007-1) experimental; urgency=low
+
+  * new upstream snapshot, using the same day as the mplayer release
+  * Refreshing patches:
+    -005_altivec_flags.diff: dropped, merged upstream
+    -005_m68k_workaround.diff: refreshed
+    -005_runtime_cpudetect.diff: refreshed
+    -006_mips_pthreads.diff: refreshed
+    -010_proper_rpath.diff: refreshed
+    -010_shared_library_versioning.diff: refreshed
+    -011_link_plugins.diff: refreshed (moved to top level makefile)
+    -015_build_imgresample.diff: refreshed
+    -020_disable_snow_mmx_in_pic.diff: refreshed
+    -020_fix_libswscale_pic_code.diff: refreshed
+    -020_mmx_optims.diff: refreshed
+    -020_mmx_pic_code.diff: refreshed
+    -040_early_altivec_detection.diff: disabled, doesn't apply anymore
+    -040_only_use_maltivec_when_needed.diff disabled, (causes ftbfs, needs revising)
+    -040_only_use_maltivec_when_needed.diff: refresh
+    -051_mjpeg_gray_support.diff, removed applied upstream
+    -053_rm_demux_crash.diff removed, applied upstream.
+    -060_fix_avi_skip.diff removed, does not apply anymore
+  * remove --enable-libdts. ffmpeg now has an internal dts decoder since
+    r9051 (2007-05-17). It seems that at least some packages link to libdts and
+    rely on the transitive dependency via ffmpeg. Please add explicit dependencies
+    on libdts instead!
+  * Don't ignore errors in upstream Makefile. Bug found via lintian.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Wed, 05 Dec 2007 17:33:34 +0100
+
+ffmpeg-free (0.cvs20070307-7) UNRELEASED; urgency=low
+
+  * debian/patches/051_mjpeg_gray_support.diff:
+    + Support grayscale MJPEG streams as sent by Axis cameras.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Tue, 31 Jul 2007 18:55:31 +0200
+
+ffmpeg-free (0.cvs20070307-6) unstable; urgency=low
+
+  * Rename the source package. We are (again) no longer shipping the
+    'real' upstream source of ffmpeg.
+  * Add debian/strip.sh to strip ffmpeg upstream source disabling mpeg
+    based encoders as discussed with ftp-master at debconf7
+  * update XS-Vcs tags in debian/control.
+  * make ffmpeg binNMU-able by using ${binary:Version} rather than
+    ${Source-Version}
+
+ -- Reinhard Tartler <siretart@tauware.de>  Sat, 23 Jun 2007 15:11:21 +0100
+
+ffmpeg (0.cvs20070307-5) unstable; urgency=low
+
+  * upload to unstable
+  * remove x264 support, as it has been removed from unstable
+
+ -- Reinhard Tartler <siretart@tauware.de>  Wed, 30 May 2007 15:19:20 +0200
+
+ffmpeg (0.cvs20070307-4) experimental; urgency=low
+
+  * added myself to uploaders
+  
+  * 020_fix_libswscale_pic_code:
+    + added, avoid some MMX code to avoid PIC code
+
+  [ Sam Hocevar ]
+  
+  * fixed path in library installation.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Wed, 11 Apr 2007 23:17:47 +0200
+
+ffmpeg (0.cvs20070307-3) experimental; urgency=low
+
+  * debian/patches/015_build_imgresample.diff:
+    + Build imgresample functions even with swscaler activated, or legacy
+      applications will stop working.
+
+  * debian/patches/053_rm_demux_crash.diff:
+    + New patch: fix a double free with corrupted rm files (Closes: #379922).
+
+  * debian/patches/054_h264_mmx_chroma_mc_crash.diff:
+    + New patch: workaround for a buffer overflow in the MMX H264 chroma
+      motion compensation until upstream fixes it properly (Closes: #404176).
+
+  * debian/patches/300_c++_compliant_headers.diff:
+    + Define INT64_C() when the system headers don't provide it, for instance
+      when building C++ code.
+
+  * debian/control:
+    + Set pkg-multimedia-maintainers as main maintainer.
+    + Updated VCS fields.
+  * debian/rules:
+    + Huge cleanup.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Wed, 14 Mar 2007 19:40:42 +0100
+
+ffmpeg (0.cvs20070307-2) experimental; urgency=low
+
+  * debian/rules:
+    + Activate x264 support now that it is in unstable.
+  * debian/control:
+    + Build-depend on libx264-dev.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Mon, 12 Mar 2007 21:10:45 +0100
+
+ffmpeg (0.cvs20070307-1) experimental; urgency=low
+
+  [ Sam Hocevar ]
+
+  * New upstream snapshot (Closes: #403330, #404788).
+  * This snapshot fixes numerous file parsing crashes (Closes: #404176,
+    Closes: #407003, #396282, #365006, #403398).
+
+  * debian/patches/010_proper_rpath.diff:
+    + New patch. Link objects with the libraries that we generate, not the
+      ones installed on the system.
+
+  * debian/patches/010_shared_library_versioning.diff:
+    + Strip unneeded prefix from .pc files (Closes: #404758).
+
+  * debian/patches/011_link_plugins.diff:
+    + New patch. Link vhook plugins with the appropriate libraries.
+
+  * debian/patches/013_strip_unneeded_linker_flags.diff:
+    + Remove unneeded -l flags from .pc files (Closes: #373986).
+
+  * debian/patches/020_mmx_optims.diff:
+  * debian/patches/020_disable_snow_mmx_in_pic.diff:
+    + Sync patches.
+
+  * debian/patches/020_really_use_liba52.diff:
+  * debian/patches/050_h264-misc-security-fixes.diff:
+  * debian/patches/051_asf-misc-security-fixes.diff:
+    + Drop patches, applied upstream or no longer relevant.
+
+  * debian/patches/040_only_use_maltivec_when_needed.diff:
+    + Upgraded patch to cover libswscale.
+
+  * debian/libavcodec-dev.install:
+    + Ship lzo.h and random.h.
+
+  * debian/rules:
+    + Fix syntax for a few --enable flags.
+    + Only ship ffmpeg_powerpc_performance_evaluation_howto.txt.gz on
+      powerpc machines (Closes: #385079). 
+    + Readded --enable-libtheora, it's here again.
+    + Activate --enable-swscaler (Closes: #399141, #398442).
+
+  [ Reinhard Tartler ]
+
+  * debian/rules:
+    + Ignore libswscale.pc and rgb2rgb.h.
+
+  * debian/libavcodec-dev.install:
+    + Ship fifo.h and opt.h.
+
+  * debian/patches/005_altivec_flags.diff:
+  * debian/patches/005_m68k_workaround.diff:
+  * debian/patches/005_runtime_cpudetect.diff:
+  * debian/patches/006_mips_pthreads.diff:
+  * debian/patches/020_really_use_liba52.diff:
+    + Sync patches.
+
+  * debian/patches/007_disable_ffmpeg_option.diff:
+  * debian/patches/030_arm_cpu_detect.diff:
+  * debian/patches/030_arm_workaround.diff:
+    + Drop patches, applied upstream or no longer relevant.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Fri,  9 Mar 2007 15:13:16 +0100
+
+ffmpeg (0.cvs20060823-7) unstable; urgency=high
+
+  * debian/patches/040_only_use_maltivec_when_needed.diff:
+    + Fix a static function prototype that prevented programs using libpostproc
+      from working on PowerPC (Closes: #412214).
+
+  * debian/control:
+    + Added Xs-Vcs-Browser and XS-Vcs-Svn fields.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Thu,  8 Mar 2007 17:51:37 +0100
+
+ffmpeg (0.cvs20060823-6) unstable; urgency=high
+
+  * Upload to unstable.
+
+ -- Loic Minier <lool@dooz.org>  Thu,  1 Feb 2007 21:36:47 +0100
+
+ffmpeg (0.cvs20060823-5) testing-proposed-updates; urgency=high
+
+  [ Loïc Minier ]
+  * Add myself to Uploaders.
+  * Exclude firewire libs from ffmpeg-config under kFreeBSD; based on a patch
+    by Petr Salinger; closes: #399701.
+  * Fix handling of debug in DEB_BUILD_OPTIONS; thanks Andreas Henriksson;
+    closes: #406474.
+  * SECURITY: New patch, 050_h264-misc-security-fixes, to properly check the
+    sps and pps ids before use and to check more bitstram values and fix
+    potential security holes; from upstream SVN r7585, r7586, and r7591.
+  * SECURITY: New patch, 051_asf-misc-security-fixes, to properly check
+    packet sizes, chunk sizes, and fragment positions; from upstream SVN r7640
+    and r7650.
+
+  [ Sam Hocevar ]
+  * debian/copyright:
+    + Fix typo and clarify licensing terms (Closes: #398235).
+  * debian/README.Debian:
+    + Removed mention of ffmpeg-config now that we ship .pc files.
+  * debian/patches/020_mmx_optims.diff:
+    + New patch, fix FTBFS with DEB_BUILD_OPTIONS=debug.
+  * debian/patches/040_early_altivec_detection.diff:
+    + New patch, detect AltiVec earlier on and only once so that we don't
+      risk using signal handlers in a multithreaded environment or when
+      the caller already installed a SIGILL handler.
+  * debian/patches/040_only_use_maltivec_when_needed.diff:
+    + New patch, only use -maltivec with files that use AltiVec intrinsics,
+      and make sure no codepath leads to these files on a non-AltiVec
+      machine (Closes: #405926).
+  * debian/patches/060_fix_avi_skip.diff:
+    + New patch, courtesy of Ben Hutchings: do not attempt to skip the ODML
+      if the current seek offset is already beyond it (Closes: #383734).
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Mon, 29 Jan 2007 16:58:44 +0100
+
+ffmpeg (0.cvs20060823-4) unstable; urgency=high
+
+  * Maintainer upload.
+  * Acknowledging NMU (Closes: #386458).
+
+  * High urgency because of FTBFS fix.
+
+  * debian/patches/030_arm_workaround.diff:
+    + New patch courtesy of Aurélien Jarno: disable the broken ARM assembly
+      code in libavcodec/mpegaudiodec.c.
+
+  * debian/patches/030_arm_cpu_detect.diff:
+    + New patch courtesy of Aurélien Jarno: correctly detect the newer ARM
+      CPUs.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Sun, 24 Sep 2006 23:38:29 +0200
+
+ffmpeg (0.cvs20060823-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix variable substitution trick in debian/rules (Closes: #386458).
+
+ -- Luk Claes <luk@debian.org>  Fri, 15 Sep 2006 21:29:07 +0200
+
+ffmpeg (0.cvs20060823-3) unstable; urgency=low
+
+  * debian/rules:
+    + Take local packages into account when computing shlibs dependencies, so
+      that ffplay/ffserver depend on the proper libraries (Closes: #386029).
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Tue,  5 Sep 2006 17:44:00 +0200
+
+ffmpeg (0.cvs20060823-2) unstable; urgency=low
+
+  * debian/patches/020_really_use_liba52.diff:
+    + New patch: link with the shared liba52 instead of the built-in one.
+
+  * debian/patches/006_mips_pthreads.diff:
+    + New patch: link libraries with -lpthreads on Linux MIPS because of a
+      known ld bug.
+
+  * debian/patches/007_disable_ffmpeg_option.diff:
+    + New patch: add a --disable-ffmpeg option.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Wed, 30 Aug 2006 18:36:52 +0200
+
+ffmpeg (0.cvs20060823-1) unstable; urgency=low
+
+  * New SVN snapshot (Closes: #368904).
+  * debian/control:
+    + Set policy to 3.7.2.
+    + Do not build 1394 support on GNU/kFreeBSD or Hurd. Patch courtesy of
+      Petr Salinger (Closes: #372290).
+  * debian/rules:
+    + Minor cleanup.
+    + Removed --enable-theora, upstream dropped that option.
+
+  * debian/patches/020_mmx_intrinsics.diff:
+    + Disabled intrinsics workaround because it is no longer necessary and it
+      causes trouble with some codecs such as H264 (Closes: #373765).
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Wed, 23 Aug 2006 12:09:58 +0200
+
+ffmpeg (0.cvs20060329-4) unstable; urgency=low
+
+  * debian/control:
+    + Make each -dev package depend on the corresponding shared library
+      package (Closes: #361348).
+    + Moved libavutil files from libavformat-dev to libavcodec-dev which is
+      the real common dependency (Closes: #361269).
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Sun,  9 Apr 2006 15:23:37 +0200
+
+ffmpeg (0.cvs20060329-3) unstable; urgency=low
+
+  * debian/rules: that build system is hopeless. We now run configure and
+    make twice, backup static libraries inbetween, then update timestamps
+    to fool make. That should fix the FTBFS (Closes: #361215).
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Fri,  7 Apr 2006 11:33:15 +0200
+
+ffmpeg (0.cvs20060329-2) unstable; urgency=low
+
+  * debian/rules: fixed Makefile.pic generation.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Thu,  6 Apr 2006 16:37:05 +0200
+
+ffmpeg (0.cvs20060329-1) unstable; urgency=low
+
+  * New CVS snapshot.
+  * Upstream fixed a double free in img.c (Closes: #351455).
+  * Upstream fixed the libvorbisenc dependency in libavcodec.pc
+    (Closes: #357352).
+
+  * debian/rules:
+    + Activated threading support (Closes: #335677).
+    + Manually reinstall dsputil.h.
+
+  * debian/README.Debian:
+    + Removed mention of --plugin-libs.
+    + Added a note about the unofficial packages (Closes: #306752).
+
+  * 020_disable_snow_mmx_in_pic.diff: (new patch) disable MMX acceleration in
+    the Snow encoder in PIC mode.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Thu, 30 Mar 2006 10:41:17 +0200
+
+ffmpeg (0.cvs20060306-3) unstable; urgency=low
+
+  * Switched patch system to quilt.
+  * debian/control:
+    + Build-depend on quilt.
+
+  * 005_altivec_flags.diff: (new patch from old diff.gz) proper gcc flags to
+    only generate AltiVec code when explicitely asked.
+
+  * 005_m68k_workaround.diff: (new patch from old diff.gz) use -O2 instead of
+    -O3 on m68k.
+
+  * 005_runtime_cpudetect.diff: (new patch from old diff.gz) fix runtime CPU
+    detection on m68k and x86.
+
+  * 010_ffmpeg-config.diff: (new patch from old diff.gz) the ffmpeg-config
+    script and associated manpage (legacy).
+
+  * 010_shared_library_versioning.diff: (new patch from old diff.gz) use a
+    Debian-specific scheme for shared library versioning to avoid spreading
+    libraries incompatible with every other version.
+
+  * 020_mmx_intrinsics.diff: (new patch from old diff.gz) use MMX intrinsics
+    in dsputil_mmx.c because gcc is unable to compute some register constraints
+    in PIC mode.
+
+  * 020_mmx_pic_code.diff: (new patch from old diff.gz) ported some MMX code
+    to be PIC.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Wed, 29 Mar 2006 18:53:35 +0200
+
+ffmpeg (0.cvs20060306-2) unstable; urgency=low
+
+  * ffmpeg-config.in: removed references to _pic libraries.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Fri, 17 Mar 2006 20:08:29 +0100
+
+ffmpeg (0.cvs20060306-1) unstable; urgency=low
+
+  * New CVS snapshot.
+  * Upstream now properly installs dsputil.h (Closes: #354391).
+  * debian/control:
+    + Distribute shared versions of the libraries with a Debian-specific
+      soname.
+  * debian/rules:
+    + Removed all custom PIC rules.
+    + Moved ffmpeg-config to libavformat-dev instead of libavcodec-dev so that
+      it is present by default (Closes: #350750).
+    + Include apiexample.c in libavcodec-dev (Closes: #350027).
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Mon,  6 Mar 2006 11:05:26 +0100
+
+ffmpeg (0.cvs20050918-6) unstable; urgency=low
+
+  * Developer upload.
+  * Acknowledge NMU. Thanks to Samuel Mimram (Closes: #342207).
+  * configure:
+    + Set RUNTIME_CPUDETECT (except on m68k where it ICEs and on x86 where it
+      fails to build some asm constructs) (Closes: #337846).
+  * debian/rules:
+    + Make the build process aware of DEB_BUILD_OPTIONS, thanks to Timo
+      Lindfors (Closes: #338895).
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Sat, 21 Jan 2006 16:51:26 +0100
+
+ffmpeg (0.cvs20050918-5.1) unstable; urgency=low
+
+  * NMU.
+  * Fix exploitable heap overflow in libavcodec's handling of images with
+    PIX_FMT_PAL8 pixel formats (CVE-2005-4048), closes: #342207.
+
+ -- Samuel Mimram <smimram@debian.org>  Sun, 15 Jan 2006 14:44:36 +0100
+
+ffmpeg (0.cvs20050918-5) unstable; urgency=low
+
+  * ffmpeg-config.1: fixed the examples and added a note that static libraries
+    should be put after the objects that refer to them (Closes: #339803).
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Fri, 18 Nov 2005 23:58:16 +0100
+
+ffmpeg (0.cvs20050918-4) unstable; urgency=low
+
+  * configure:
+    + Tell the configure script about m68k, ia64 and others.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Thu, 22 Sep 2005 14:43:59 +0200
+
+ffmpeg (0.cvs20050918-3) unstable; urgency=low
+
+  * configure:
+    + Use -O2 instead of -O3 on m68k to avoid ICEs.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Tue, 20 Sep 2005 17:33:14 +0200
+
+ffmpeg (0.cvs20050918-2) unstable; urgency=low
+
+  * libavcodec/i386/dsputil_mmx.c:
+    + Reworked the MMX intrinsics.
+  * tests/libav.regression.ref:
+    + Minor cosmetic fix to use double-digit numbers in test sequences.
+  * debian/control:
+    + PowerPC no longer needs to use gcc-3.4, since 4.x is the default.
+  * libavcodec/Makefile:
+    + Removed special compilation case for HPPA now that we use 4.x.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Sun, 18 Sep 2005 17:43:48 +0200
+
+ffmpeg (0.cvs20050918-1) unstable; urgency=low
+
+  * New CVS snapshot.
+  * Upstream applied most Debian patches.
+  * configure:
+    + Do not use -mabi=altivec (-maltivec is enough for our AltiVec code) so
+      that our code still runs on a G3 computer (Closes: #319151).
+  * debian/rules:
+    + When not cross-compiling, run the regression tests (Closes: #292102).
+  * debian/changelog:
+    + Updated the FSF address.
+  * ffmpeg-config.in:
+    + Fixed avcodec linkage (Closes: #328505).
+  * libavcodec/i386/mpegvideo_mmx_template.c:
+    + Applied patch from Tobias Grimm to fix the PIC MMX code for MPEG
+      encoding (Closes: #318493).
+  * libavcodec/i386/dsputil_mmx.c:
+    + Applied patch from Joshua Kwan to fix the AMD64 build (Closes: #324026).
+    + Reworked that patch so that it still compiles on x86.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Fri, 16 Sep 2005 13:03:47 +0200
+
+ffmpeg (0.cvs20050811-2) unstable; urgency=low
+
+  * ffmpeg-config.in: added a missing -lgsm.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Mon, 22 Aug 2005 19:51:53 +0200
+
+ffmpeg (0.cvs20050811-1) unstable; urgency=low
+
+  * New CVS snapshot.
+  * Upstream fixed an integer overflow in the MPEG encoder (Closes: #320150).
+  * debian/rules:
+    + Activated libgsm support.
+    + Fixed theora support.
+    + Switched installation method to dh_install.
+  * Applied patch from Christian Aichinger and others to fix the clobbering
+    of the %ebx register during build (Closes: #319563).
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Thu, 11 Aug 2005 14:22:03 +0200
+
+ffmpeg (0.cvs20050626-2) unstable; urgency=low
+
+  * ffmpeg-config.in: fixed the theora link that caused FTBFS.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Fri,  1 Jul 2005 17:20:59 +0200
+
+ffmpeg (0.cvs20050626-1) unstable; urgency=low
+
+  * New CVS snapshot.
+  * debian/control:
+    + Set policy to 3.6.2.1.
+  * debian/rules:
+    + Fixed Vorbis support (Closes: #306023).
+    + Patch by Jonas Smedegaard <dr@jones.dk>: conditionally enable these
+      unofficial libraries if DEB_BUILD_OPTIONS includes "risky":
+      o Mpeg2 layer 3 / MP3 (liblame-dev).
+      o FAAD (libfaad2-dev).
+      o FAAC (libfaac-dev).
+      o XviD (libxvidcore-dev).
+    + Activated theora support.
+    + Activated IEEE 1394 support (Closes: #296737).
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Sun, 26 Jun 2005 15:46:54 +0200
+
+ffmpeg (0.cvs20050313-2) unstable; urgency=low
+
+  * libavcodec/libpostproc/postprocess_template.c
+    libavcodec/i386/mpegvideo_mmx_template.c: fixed my PIC MMX code (Closes: #299700).
+  * debian/rules: use gcc-3.4 on PowerPC (Closes: #300686).
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Mon, 21 Mar 2005 23:38:46 +0100
+
+ffmpeg (0.cvs20050313-1) unstable; urgency=low
+
+  * New CVS snapshot.
+  * configure: fixed the builtin vector test (Closes: #293284), thanks
+    to Jacob L. Anawalt.
+  * libavcodec/libpostproc/postprocess_template.c
+    libavcodec/i386/mpegvideo_mmx_template.c: fixed MMX code so that it can
+    be compiled in PIC mode, and reactivated MMX (Closes: #290447, #290358).
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Sat, 12 Mar 2005 18:34:29 +0100
+
+ffmpeg (0.cvs20050121-1) unstable; urgency=low
+
+  * New CVS snapshot.
+  * This snapshot fixes integer overflows that may lead to arbitrary code
+    execution (Closes: #291566).
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Fri, 21 Jan 2005 17:41:47 +0100
+
+ffmpeg (0.cvs20050108-1) unstable; urgency=low
+
+  * Re-done tarball snapshot so that it does not contain binaries.
+  * ffmpeg-config.in:
+    + Added missing -lvorbisenc (Closes: #289030).
+  * debian/rules:
+    + Install missing headers that are not in the install rule: bwswap.h,
+      dsputil.h, os_support.h (Closes: #289033).
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Sat,  8 Jan 2005 11:30:58 +0100
+
+ffmpeg (0.cvs20050106-1) unstable; urgency=low
+
+  * New upstream snapshot.
+  * The extern/static declaration conflict was fixed upstream (Closes: #288906).
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Thu,  6 Jan 2005 15:44:49 +0100
+
+ffmpeg (0.cvs20040716-2) unstable; urgency=low
+
+  * debian/rules:
+    + Include missing rtp.h / rtsp.h in libavformat-dev.
+  * ffmpeg-config.in:
+    + Added -lz to the libavcodec linking flags.
+    + Added -ldts / -ldts_pic, -la52, -lvorbis to the libavcodec linking flags.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Tue, 17 Aug 2004 13:27:41 +0200
+
+ffmpeg (0.cvs20040716-1) unstable; urgency=low
+
+  * Initial release (Closes: #199266).
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Fri, 16 Jul 2004 12:47:27 +0200
+
--- ffmpeg-0.5.1.orig/debian/libavfilter0.install
+++ ffmpeg-0.5.1/debian/libavfilter0.install
@@ -0,0 +1 @@
+usr/lib/{,*/,*/*/}libavfilter.so.*
--- ffmpeg-0.5.1.orig/debian/recordshow.sh
+++ ffmpeg-0.5.1/debian/recordshow.sh
@@ -0,0 +1,58 @@
+#!/bin/bash
+
+# Copyright 2008, Daniel Dickinson <cshore@wightman.ca>
+#
+# This script script (which depends on xawtv for the v4lctl command to
+# select channel) and crontab show how one can record tv shows using
+# ffmpeg.
+
+STATION="$1"
+TODAY=$(date +"%A %B %d %Y")
+SHOWLENGTH="$2"
+SHOWDIR="$3"
+SHOWNAME="$4"
+
+function err_exit {
+	EXITCODE=$1
+	shift
+	echo $* 1>&2
+	exit $EXITCODE
+}
+
+BADPARAM=FALSE
+
+if [ -z "STATION" ]; then
+	BADPARAM=TRUE
+fi
+
+if [ -z "$SHOWDIR" ]; then
+	BADPARAM=TRUE
+fi
+
+if [ -z "$SHOWLENGTH" ]; then
+	BADPARAM=TRUE
+fi
+
+if [ "$BADPARAM" != "FALSE" ]; then
+	err_exit 2 "Usage: recordshow.sh station show-length show-dir [show-name]"
+fi
+
+if [ -z "$SHOWNAME" ]; then
+	BASEFILENAME="$SHOWDIR/$TODAY"
+else
+	BASEFILENAME="$SHOWDIR/$SHOWNAME-$TODAY"
+fi
+
+SECONDS=$(echo $SHOWLENGTH | cut -f3 -d:)
+MINUTES=$(echo $SHOWLENGTH | cut -f2 -d:)
+HOURS=$(echo $SHOWLENGTH | cut -f1 -d:)
+
+TOTALSECONDS=0
+
+TOTALSECONDS=$(expr $(expr $(expr $HOURS '*' 3600) + $(expr $MINUTES '*' 60)) + $SECONDS) 
+
+/usr/bin/v4lctl setstation $1 >/dev/null || err_exit 1 "Unable to set station (channel) $STATION"
+/usr/bin/v4lctl volume mute off >/dev/null || err_exit 4 "Unable to unmute audio"
+/usr/bin/ffmpeg -y -tvstd ntsc -t "$TOTALSECONDS" -s 480x352 -re -deinterlace -f video4linux2 -i /dev/video0 -f audio_device -i /dev/dsp -ac 2 -s 768x576 -f mpegts -acodec mp2 -vcodec mpeg1video "$BASEFILENAME.mpegts" >/dev/null 2>&1 || err_exit 3 "Error recording show $BASEFILENAME to mpeg2 transport stream"
+/usr/bin/v4lctl volume mute on >/dev/null || err_exit 5 "Unable to mute audio"
+
--- ffmpeg-0.5.1.orig/debian/libavutil49.lintian-overrides
+++ ffmpeg-0.5.1/debian/libavutil49.lintian-overrides
@@ -0,0 +1,3 @@
+# Overriding these fpic lintian errors. Please see bug #528080.
+libavutil49: shlib-with-non-pic-code usr/lib/i686/cmov/libavutil.so.49.15.0
+libavutil49: shlib-with-non-pic-code usr/lib/libavutil.so.49.15.0
--- ffmpeg-0.5.1.orig/debian/ffmpeg-doc.doc-base
+++ ffmpeg-0.5.1/debian/ffmpeg-doc.doc-base
@@ -0,0 +1,9 @@
+Document: ffmpeg-doc
+Title: ffmpeg API Documentation
+Author: FFmpeg Developers
+Abstract: This is the main documentation for the ffmpeg API.
+Section: Programming
+
+Format: HTML
+Index: /usr/share/doc/ffmpeg-doc/html/index.html
+Files: /usr/share/doc/ffmpeg-doc/html/*.html
--- ffmpeg-0.5.1.orig/debian/libpostproc51.lintian-overrides
+++ ffmpeg-0.5.1/debian/libpostproc51.lintian-overrides
@@ -0,0 +1,3 @@
+# Overriding these fpic lintian errors. Please see bug #528080.
+libpostproc51: shlib-with-non-pic-code usr/lib/i686/cmov/libpostproc.so.51.2.0
+libpostproc51: shlib-with-non-pic-code usr/lib/libpostproc.so.51.2.0
--- ffmpeg-0.5.1.orig/debian/compat
+++ ffmpeg-0.5.1/debian/compat
@@ -0,0 +1 @@
+7
--- ffmpeg-0.5.1.orig/debian/get-orig-source.sh
+++ ffmpeg-0.5.1/debian/get-orig-source.sh
@@ -0,0 +1,88 @@
+#!/bin/sh
+#
+#  Script to create a 'pristine' tarball for the debian ffmpeg source package
+#  Copyright (C) 2008, 2009, 2010 Reinhard Tartler
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License along
+#  with this program; if not, write to the Free Software Foundation, Inc.,
+#  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+set -eu
+
+usage() {
+	cat >&2 <<EOF
+usage: $0 [-dh]
+  -h : display help
+  -d : date of svn snapshot
+  -o : output tarball name
+  -c : path to cleanup script
+EOF
+}
+
+debug () {
+	$DEBUG && echo "DEBUG: $*" >&2
+}
+
+error () {
+	echo "$1" >&2
+	exit 1;
+}
+
+set +e
+PARAMS=`getopt hd: "$@"`
+if test $? -ne 0; then usage; exit 1; fi;
+set -e
+
+eval set -- "$PARAMS"
+
+DEBUG=false
+SVNDATE=
+
+while test $# -gt 0
+do
+	case $1 in
+		-h) usage; exit 1 ;;
+		-d) SVNDATE=$2; shift ;;
+		--) shift ; break ;;
+		*)  echo "Internal error!" ; exit 1 ;;
+	esac
+	shift
+done
+
+# sanity checks now
+dh_testdir
+
+if [ -z $SVNDATE ]; then
+	error "you need to specify an svn date. e.g. 20081230 for Dec 29. 2008"
+fi
+
+TARBALL=../ffmpeg_0.5+svn${SVNDATE}.orig.tar.gz
+PACKAGENAME=ffmpeg
+
+TMPDIR=`mktemp -d`
+trap 'rm -rf ${TMPDIR}'  EXIT
+
+baseurl="svn://svn.ffmpeg.org/ffmpeg/branches/0.5"
+
+svn export -r{${SVNDATE}} \
+	--ignore-externals \
+	${baseurl}  \
+	${TMPDIR}/${PACKAGENAME}
+
+svn info -r{${SVNDATE}} \
+	${baseurl} \
+	| awk '/^Revision/ {print $2}' \
+	> ${TMPDIR}/${PACKAGENAME}/.svnrevision
+
+tar czf ${TARBALL} -C ${TMPDIR} ${PACKAGENAME}
+
--- ffmpeg-0.5.1.orig/debian/libpostproc51.install
+++ ffmpeg-0.5.1/debian/libpostproc51.install
@@ -0,0 +1 @@
+usr/lib/{,*/,*/*/}libpostproc.so.*
--- ffmpeg-0.5.1.orig/debian/gbp.conf
+++ ffmpeg-0.5.1/debian/gbp.conf
@@ -0,0 +1,6 @@
+[DEFAULT]
+upstream-branch = upstream-0.5
+debian-branch = ubuntu
+upstream-tag = upstream/%(version)s
+debian-tag = debian/%(version)s
+pristine-tar = True
--- ffmpeg-0.5.1.orig/debian/libavfilter0.lintian-overrides
+++ ffmpeg-0.5.1/debian/libavfilter0.lintian-overrides
@@ -0,0 +1,3 @@
+# Overriding these fpic lintian errors. Please see bug #528080.
+libavfilter0: shlib-with-non-pic-code usr/lib/i686/cmov/libavfilter.so.0.4.0
+libavfilter0: shlib-with-non-pic-code usr/lib/libavfilter.so.0.4.0
--- ffmpeg-0.5.1.orig/debian/README.Debian
+++ ffmpeg-0.5.1/debian/README.Debian
@@ -0,0 +1,235 @@
+lintian override shlib-with-non-pic-codeshlib-with-non-pic-code
+==================================================================
+
+The lintian overrides for the non-pic shared libs error messages is not
+really a matter of silencing lintian. The general idea is that the
+override would serve as an indication that we know about the error
+message and we're avoiding any bug reports or complaints by others about
+the errors.
+
+We are aware that this override is too strict. It should only cover the
+i386 architecture, as we know that the upstream build system will
+produce PIC libraries where necessary. Only architectures like i386 will
+be built non-PIC, mainly for performance reasons.
+
+ -- Reinhard Tartler <siretart@tauware.de>, Mon, 27 Jul 2009 12:08:55 +0200
+
+FFmpeg package names
+====================
+
+The ffmpeg packaging has seen many renames in the course of its history.
+Looking for more stable names, the ffmpeg maintainers agreed on moving to
+a naming scheme which would fit known use cases and avoid confusion.
+
+Some of the constraints and proposed solutions on the new names follow:
+
+ 1. Distributions such as Debian and Ubuntu want to carry multiple version of
+    the package to fit component divisions and please users; e.g. an
+    Ubuntu/universe and an Ubuntu/multiverse version, or a Debian/main and a
+    Debian/non-free version.  It is conceived that there are usually two
+    variants of the ffmpeg package in these distributions: a) the vanilla
+    version shipped in the most permissible component if possible and b) a
+    'stripped' package suitable for the most constrained component.
+
+    For details why such a stripping is necessary in the first place, please
+    look further below in this document ("Disabled MPEG encoders").
+
+ 2. Packages from distributions and third party repositories such as the popular
+    debian-multimedia.org shouldn't interfere but coexist nicely.  If these
+    repositories want to provide an alternate version of the source package,
+    they could do so with their own source and binary package names.  It is
+    hoped that providing the vanilla source in one of the source packages will
+    remove the need to fork ffmpeg in these third party repositories.
+
+ 3. The libraries built by various source packages shall be ABI compatible as
+    to allow packages built against the most constrained component to run
+    against the more permissible components; for instance vlc if built against
+    ffmpeg in main shall be able to run against the ffmpeg libraries from
+    non-free.  The plan here is to use shlibs tricks to allow to install one
+    lib or the other.  The shlibs would look like:
+      lib-name-in-main-99 (>= 1.2.3) | lib-name-in-non-free-99 (>= 1.2.3)
+    This scheme can be extended for third party repositories if it still needs
+    to be.
+
+For consistency at this date, Debian is missing a ffmpeg-extra source
+package and Ubuntu had two source packages in the same component for a
+short time.  The binary package names are not unified and shlibs do not
+allow to install one or the other library.
+
+To avoid gratuitous package renames, the proposed changes against the above
+packages are:
+
+  * For Debian and Ubuntu the binary packages in the 'main' component will
+    keep their original names without any additional marker.
+
+  * The extra (unstripped) replacement packages in the 'non-free'
+    (Debian) and 'multiverse' (ubuntu) component will be built from a
+    source package named 'ffmpeg-extra'. The resulting binary packages
+    carry an '-extra-' marker in the name right between the library name
+    and its SONAME.
+
+  * Ubuntu will track the ffmpeg packages in Debian and tries to minimize the
+    diff for maintenance reason.
+
+  * If you disagree with the naming, please speak up on
+    pkg-multimedia-maintainers@lists.alioth.debian.org
+
+ -- Reinhard Tartler <siretart@tauware.de>, Sun, 26 Jul 2009 10:38:10 +0200
+
+
+Disabled MPEG encoders
+======================
+
+On Debconf 7, the ffmpeg maintainers had a conversation with James Troup
+from the ftpteam about mpeg encoders in the ffmpeg package. The ftpteam
+was pretty surprised about the accepted encoders, and admitted that they
+were accepted by accident. We therefore had no choice but removing
+them. We agreed on a plan that rather disables than removes the
+encoders, for details see debian/strip.sh, rendering those encoders
+unusable.
+
+Currently the following video encoders are disabled in the ffmpeg
+package: H263, H264, MPEG2 video, MPEG4 and MS-MPEG4. No *decoders* are
+disabled in any the ffmpeg package!
+
+The plan is to provide a source package called 'ffmpeg-extra', which builds
+drop-in replacement binary package with the mpeg encoders enabled. Ideally, we
+would be allowed to include those mpeg encoders enabled in non-free, but we
+haven't heared back from the ftpteam about that idea.
+
+
+ -- Reinhard Tartler <siretart@tauware.de>, Sun, 20 Apr 2008 08:43:23 +0200
+
+
+Further patent issues with ffmpeg
+=================================
+
+In addition to the aforementioned MPEG encoders, some patents related to
+ffmpeg which seem to be enforced against open source software cover the
+following codec technologies and file formats:
+
+   * MP3 encoding
+   * AAC encoding
+   * the ASF file format
+
+   I did not activate MP3 encoding (through LAME) in libavcodec, nor AAC
+encoding (through FAAC). However, since I have found no real enforcement
+of the mysterious ASF file format patents, I did not deactivate ASF support in
+libavformat. More details on these three issues are given in the following
+paragraphs:
+
+
+The MP3 audio coding format
+===========================
+
+   Much has already been said about MP3 and the huge patent portfolio of
+the MPEG members, especially the Fraunhofer institute. Eric Scheirer's
+MPEG, Patents, and Audio Coding FAQ [1.1] is an attempt to "inject
+some sanity in what is becoming an increasingly heated discussion
+about patent rights surrounding MPEG technology, especially for audio
+compression". It also has a few words about other patented products
+covered in this document.
+
+[1.1] http://web.media.mit.edu/~eds/mpeg-patents-faq
+
+
+The AAC audio coding format
+===========================
+
+   Dolby's AAC (Advanced Audio Coding) is covered by patents owned by
+Dolby Laboratories, AT&T Laboratories, Fraunhofer Institute and Sony
+Corp.
+
+   The FAAC project was threatened by the AAC license consortium. Press
+report about how "an opensource project was closed down due to pressures
+from the AAC license consortium which requires a lumpsum payment of
+10,000 USD plus a per-copy payment of 1.35 USD, thus effectively banning
+free software implementations. The policies surrounding AAC also harm
+interoperability [2.2]." This was related by Heise [2.3] and FFII has
+a page about the Dolby threat [2.1] as well as additional information
+about MPEG-related patents [2.4].
+
+   The author stopped distributing the FAAC binaries, but still provides
+full source code and CVS access. To my knowledge he has not been
+threatened again. I also read on a web forum [2.5] that Cisco's lawyers
+claim that their LGPL distribution of AAC software in MPEG4IP is
+completely legal and that Dolby cannot forbid such distribution.
+
+[2.1] http://swpat.ffii.org/patents/effects/dolby/index.en.html
+[2.2] http://www.xiph.org/archives/vorbis-dev/200011/0286.html
+[2.3] http://www.heise.de/newsticker/data/vza-20.11.00-000/
+[2.4] http://swpat.ffii.org/patents/effects/mpeg/index.en.html
+[2.5] http://www.hydrogenaudio.org/index.php?showtopic=310&
+
+
+The ASF file encapsulation format
+=================================
+
+   Microsoft obtained a patent on the ASF (Active Stream Format) audio
+file format on March 21, 2000:
+
+  | United States Patent 6,041,345 Levi , et al. March 21, 2000
+  |
+  | Active stream format for holding multiple media streams
+  |
+  |  Abstract An active stream format is defined and adopted for a
+  | logical structure that encapsulates multiple data streams. The data
+  | streams may be of different media. The data of the data streams
+  | is partitioned into packets that are suitable for transmission
+  | over a transport medium. The packets may include error correcting
+  | information. The packets may also include clock licenses for
+  | dictating the advancement of a clock when the data streams are
+  | rendered. The format of ASF facilitates flexibility and choice
+  | of packet size and in specifying maximum bit rate at which data
+  | may be rendered. Error concealment strategies may be employed in
+  | the packetization of data to distribute portions of samples to
+  | multiple packets. Property information may be replicated and stored
+  | in separate packets to enhance its error tolerance. The format
+  | facilitates dynamic definition of media types and the packetization
+  | of data in such dynamically defined data types within the format.
+
+   This patent is rumoured to have been enforced at least once, though
+only through what I'd call non-hostile intimidation. Avery Lee, the
+VirtualDub author, removed ASF support from his software after a phone
+call from a Microsoft employee that he relates in his 5/12/2000 news
+[3.1].
+
+   However I could not find evidence of an official threat: all I could
+find on the web seemed to be interpretations of the VirtualDub author's
+article, for instance on Advogato [3.2], CPT [3.3] or FFII [3.4]. Avery
+Lee states that the phone call was from a programmer, not from the
+legal department. There does not seem to be an official statement from
+Microsoft.
+
+[3.1] http://web.archive.org/web/20000817222620/http://www.geocities.com/virtualdub/virtualdub_news.html
+[3.2] http://www.advogato.com/article/101.html
+[3.3] http://www.cptech.org/ip/business/software/audio.html
+[3.4] http://swpat.ffii.org/patents/effects/asf/index.en.html
+
+
+License of the Debian ffmpeg packages
+=====================================
+
+The license for the whole work is the GPL, not the LGPL, because GPL-only
+parts of ffmpeg were activated -- namely libpostproc, libswscale, x11grab and
+(optionally) libfaad2. If you need LGPL versions of the libraries, please
+comment out the appropriate line in debian/confflags.
+
+
+Differences with unofficial ffmpeg packages
+===========================================
+
+   There are popular unofficial ffmpeg packages at the following URL:
+
+     http://www.debian-multimedia.org/
+
+   I have nothing to do with these packages and it would be very tedious
+for me to track their changes. Given that my official packages use a
+Debian-specific naming scheme for libraries, you should be able to
+install at least the shared library packages together.
+
+   Before submitting a bug report, please make sure it is related to the
+Debian packages and not those unofficial packages.
+
+
+ -- Sam Hocevar <sam@zoy.org>  Thu, 30 Mar 2006 10:23:16 +0200
--- ffmpeg-0.5.1.orig/debian/clean
+++ ffmpeg-0.5.1/debian/clean
@@ -0,0 +1,3 @@
+config-extra-includes.h
+EXTRA
+formats.txt
--- ffmpeg-0.5.1.orig/debian/source.lintian-overrides
+++ ffmpeg-0.5.1/debian/source.lintian-overrides
@@ -0,0 +1,4 @@
+# The dependencies for packages within ffmpeg are different than the
+# dependencies for packages that depend on the ffmpeg libraries.
+ffmpeg-debian source: debian-rules-calls-debhelper-in-odd-order dh_makeshlibs (line 174)
+ffmpeg-debian source: debian-rules-calls-debhelper-in-odd-order dh_makeshlibs (line 178)
--- ffmpeg-0.5.1.orig/debian/libavcodec52.lintian-overrides
+++ ffmpeg-0.5.1/debian/libavcodec52.lintian-overrides
@@ -0,0 +1,3 @@
+# Overriding these fpic lintian errors. Please see bug #528080.
+libavcodec52: shlib-with-non-pic-code usr/lib/i686/cmov/libavcodec.so.52.20.0
+libavcodec52: shlib-with-non-pic-code usr/lib/libavcodec.so.52.20.0
--- ffmpeg-0.5.1.orig/debian/libavformat-dev.install
+++ ffmpeg-0.5.1/debian/libavformat-dev.install
@@ -0,0 +1,4 @@
+usr/include/libavformat
+usr/lib/libavformat.a
+usr/lib/{,*/,*/*/}libavformat.so
+usr/lib/pkgconfig/libavformat.pc
--- ffmpeg-0.5.1.orig/debian/patches/900_doxyfile
+++ ffmpeg-0.5.1/debian/patches/900_doxyfile
@@ -0,0 +1,16 @@
+Author: Reinhard Tartler <siretart@tauware.de>
+
+Exclude some directories we use for packaging.
+
+==========================================================================
+--- a/Doxyfile
++++ b/Doxyfile
+@@ -359,7 +359,7 @@
+ # excluded from the INPUT source files. This way you can easily exclude a
+ # subdirectory from a directory tree whose root is specified with the INPUT tag.
+ 
+-EXCLUDE                =
++EXCLUDE                = debian debian-shared debian-static debian-cmov .pc .git
+ 
+ # The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories
+ # that are symbolic links (a Unix filesystem feature) are excluded from the input.
--- ffmpeg-0.5.1.orig/debian/patches/CVE-2010-4704.patch
+++ ffmpeg-0.5.1/debian/patches/CVE-2010-4704.patch
@@ -0,0 +1,89 @@
+Description: fix denial of service via crafted .ogg file
+Origin: upstream, http://git.videolan.org/?p=ffmpeg.git;a=commit;h=d6860fb653ed42a9d35e134f843f03cc049b74f1
+Bug: https://roundup.ffmpeg.org/issue2322
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=611495
+
+diff -Nur ffmpeg-0.5.1/libavcodec/vorbis_dec.c ffmpeg-0.5.1.new/libavcodec/vorbis_dec.c
+--- ffmpeg-0.5.1/libavcodec/vorbis_dec.c	2010-02-09 14:59:11.000000000 -0500
++++ ffmpeg-0.5.1.new/libavcodec/vorbis_dec.c	2011-03-31 10:58:37.872468050 -0400
+@@ -60,8 +60,8 @@
+ typedef struct vorbis_floor1_s vorbis_floor1;
+ struct vorbis_context_s;
+ typedef
+-uint_fast8_t (* vorbis_floor_decode_func)
+-             (struct vorbis_context_s *, vorbis_floor_data *, float *);
++int (* vorbis_floor_decode_func)
++    (struct vorbis_context_s *, vorbis_floor_data *, float *);
+ typedef struct {
+     uint_fast8_t floor_type;
+     vorbis_floor_decode_func decode;
+@@ -443,14 +443,14 @@
+ 
+ // Process floors part
+ 
+-static uint_fast8_t vorbis_floor0_decode(vorbis_context *vc,
++static int vorbis_floor0_decode(vorbis_context *vc,
+                                          vorbis_floor_data *vfu, float *vec);
+ static void create_map( vorbis_context * vc, uint_fast8_t floor_number );
+-static uint_fast8_t vorbis_floor1_decode(vorbis_context *vc,
++static int vorbis_floor1_decode(vorbis_context *vc,
+                                          vorbis_floor_data *vfu, float *vec);
+ static int vorbis_parse_setup_hdr_floors(vorbis_context *vc) {
+     GetBitContext *gb=&vc->gb;
+-    uint_fast16_t i,j,k;
++    int i,j,k;
+ 
+     vc->floor_count=get_bits(gb, 6)+1;
+ 
+@@ -1030,7 +1030,7 @@
+ 
+ // Read and decode floor
+ 
+-static uint_fast8_t vorbis_floor0_decode(vorbis_context *vc,
++static int vorbis_floor0_decode(vorbis_context *vc,
+                                          vorbis_floor_data *vfu, float *vec) {
+     vorbis_floor0 * vf=&vfu->t0;
+     float * lsp=vf->lsp;
+@@ -1054,6 +1054,9 @@
+         }
+         AV_DEBUG( "floor0 dec: booknumber: %u\n", book_idx );
+         codebook=vc->codebooks[vf->book_list[book_idx]];
++        /* Invalid codebook! */
++        if (!codebook.codevectors)
++            return -1;
+ 
+         while (lsp_len<vf->order) {
+             int vec_off;
+@@ -1143,7 +1146,7 @@
+     return 0;
+ }
+ 
+-static uint_fast8_t vorbis_floor1_decode(vorbis_context *vc, vorbis_floor_data *vfu, float *vec) {
++static int vorbis_floor1_decode(vorbis_context *vc, vorbis_floor_data *vfu, float *vec) {
+     vorbis_floor1 * vf=&vfu->t1;
+     GetBitContext *gb=&vc->gb;
+     uint_fast16_t range_v[4]={ 256, 128, 86, 64 };
+@@ -1519,14 +1522,21 @@
+ 
+     for(i=0;i<vc->audio_channels;++i) {
+         vorbis_floor *floor;
++        int ret;
+         if (mapping->submaps>1) {
+             floor=&vc->floors[mapping->submap_floor[mapping->mux[i]]];
+         } else {
+             floor=&vc->floors[mapping->submap_floor[0]];
+         }
+ 
+-        no_residue[i]=floor->decode(vc, &floor->data, ch_floor_ptr);
+-        ch_floor_ptr+=blocksize/2;
++        ret = floor->decode(vc, &floor->data, ch_floor_ptr);
++
++        if (ret < 0) {
++            av_log(vc->avccontext, AV_LOG_ERROR, "Invalid codebook in vorbis_floor_decode.\n");
++            return -1;
++        }
++        no_residue[i] = ret;
++        ch_floor_ptr += blocksize / 2;
+     }
+ 
+ // Nonzero vector propagate
--- ffmpeg-0.5.1.orig/debian/patches/fix-dv-seeking.patch
+++ ffmpeg-0.5.1/debian/patches/fix-dv-seeking.patch
@@ -0,0 +1,67 @@
+Author: Reinhard Tartler <siretart@tauware.de>
+
+fix seeking in DIF (DV) movies, closes Bug: #540424
+
+Thanks to Dan Dennedy <dan@dennedy.org> for identifying the patch!
+
+------------------------------------------------------------------------
+r19192 | bcoudurier | 2009-06-15 00:34:28 +0200 (Mo, 15. Jun 2009) | 1 line
+
+check if frame size matches old sys and assumes corrupted input, fixes #1192
+------------------------------------------------------------------------
+
+--- a/libavcodec/dv.c
++++ b/libavcodec/dv.c
+@@ -1115,7 +1115,7 @@ static int dvvideo_decode_frame(AVCodecC
+ {
+     DVVideoContext *s = avctx->priv_data;
+ 
+-    s->sys = dv_frame_profile(buf);
++    s->sys = dv_frame_profile(s->sys, buf, buf_size);
+     if (!s->sys || buf_size < s->sys->frame_size || dv_init_dynamic_tables(s->sys))
+         return -1; /* NOTE: we only accept several full frames */
+ 
+--- a/libavcodec/dvdata.h
++++ b/libavcodec/dvdata.h
+@@ -698,7 +698,9 @@ enum dv_pack_type {
+  */
+ #define DV_MAX_BPM 8
+ 
+-static inline const DVprofile* dv_frame_profile(const uint8_t* frame)
++static inline
++const DVprofile* dv_frame_profile(const DVprofile *sys,
++                                  const uint8_t* frame, unsigned buf_size)
+ {
+    int i;
+ 
+@@ -715,6 +717,10 @@ static inline const DVprofile* dv_frame_
+        if (dsf == dv_profiles[i].dsf && stype == dv_profiles[i].video_stype)
+            return &dv_profiles[i];
+ 
++   /* check if old sys matches and assumes corrupted input */
++   if (sys && buf_size == sys->frame_size)
++       return sys;
++
+    return NULL;
+ }
+ 
+--- a/libavformat/dv.c
++++ b/libavformat/dv.c
+@@ -322,7 +322,7 @@ int dv_produce_packet(DVDemuxContext *c,
+     uint8_t *ppcm[4] = {0};
+ 
+     if (buf_size < DV_PROFILE_BYTES ||
+-        !(c->sys = dv_frame_profile(buf)) ||
++        !(c->sys = dv_frame_profile(c->sys, buf, buf_size)) ||
+         buf_size < c->sys->frame_size) {
+           return -1;   /* Broken frame, or not enough data */
+     }
+@@ -421,7 +421,7 @@ static int dv_read_header(AVFormatContex
+         url_fseek(s->pb, -DV_PROFILE_BYTES, SEEK_CUR) < 0)
+         return AVERROR(EIO);
+ 
+-    c->dv_demux->sys = dv_frame_profile(c->buf);
++    c->dv_demux->sys = dv_frame_profile(c->dv_demux->sys, c->buf, DV_PROFILE_BYTES);
+     if (!c->dv_demux->sys) {
+         av_log(s, AV_LOG_ERROR, "Can't determine profile of DV input stream.\n");
+         return -1;
--- ffmpeg-0.5.1.orig/debian/patches/series
+++ ffmpeg-0.5.1/debian/patches/series
@@ -0,0 +1,40 @@
+fix-qtrle-encoding-when-previous-frame-linesize.patch
+fix-dv-seeking.patch
+fix-constant-quant-encoding.patch
+increase-VOFW-on-x86.patch
+use-normal-check_func-test-for-math-functions.patch
+900_doxyfile
+901-fix-misc-typos.patch
+# fpic-ftbfs-fix.patch
+# fpic-libpostproc-fix.patch
+# fpic-libswscale-fix.patch
+
+# NEON backport
+neon/0001-ARM-NEON-optimised-add_pixels_clamped.patch
+neon/0002-ARM-NEON-optimized-put_signed_pixels_clamped.patch
+neon/0003-Add-guaranteed-alignment-for-loading-dest-pixels-in-.patch
+neon/0004-Reorganise-intreadwrite.h.patch
+neon/0005-ARM-asm-for-AV_RN.patch
+neon/0006-ARM-NEON-put_pixels_clamped.patch
+neon/0007-ARM-Use-fewer-register-in-NEON-put_pixels-_y2-and-_x.patch
+neon/0008-ARM-NEON-VP3-Loop-Filter.patch
+neon/0009-ARM-actually-add-VP3-loop-filter.patch
+neon/0010-ARM-add-some-PLD-in-NEON-IDCT.patch
+neon/0011-ARM-slightly-faster-NEON-H264-horizontal-loop-filter.patch
+neon/0012-ARM-enable-fast_unaligned-when-cpu-armv-67-is-specif.patch
+neon/0013-ARM-NEON-VP3-IDCT.patch
+neon/0014-ARM-NEON-optimised-vorbis_inverse_coupling.patch
+neon/0015-ARM-handle-VFP-register-arguments-in-ff_vector_fmul_.patch
+neon/0016-ARM-NEON-optimised-FFT-and-MDCT.patch
+neon/0017-ARM-faster-NEON-IMDCT.patch
+neon/0018-Prepare-for-optimised-forward-MDCT-implementations.patch
+neon/0019-ARM-NEON-optimised-MDCT.patch
+neon/0020-ARM-remove-unnecessary-.fpu-neon-directives.patch
+neon/0021-ARM-check-for-VFP-register-arguments.patch
+
+CVE-2010-3429.patch
+CVE-2010-3908.patch
+CVE-2010-4704.patch
+CVE-2011-0480.patch
+CVE-2011-0722.patch
+CVE-2011-0723.patch
--- ffmpeg-0.5.1.orig/debian/patches/fix-qtrle-encoding-when-previous-frame-linesize.patch
+++ ffmpeg-0.5.1/debian/patches/fix-qtrle-encoding-when-previous-frame-linesize.patch
@@ -0,0 +1,72 @@
+From: Peter Fritzsche <peter.fritzsche@gmx.de>
+Date: Sat, 23 May 2009 05:55:29 +0000
+Subject: [PATCH] fix qtrle encoding when previous frame linesize differs
+
+Applied upstream as revision 18908:
+
+------------------------------------------------------------------------
+r18908 | bcoudurier | 2009-05-23 07:55:29 +0200 (Sa, 23. Mai 2009) | 1 line
+
+fix qtrle encoding when previous frame linesize differs, fix #998
+
+
+diff --git a/libavcodec/qtrleenc.c b/libavcodec/qtrleenc.c
+index 171ac25..46bb573 100644
+--- a/libavcodec/qtrleenc.c
++++ b/libavcodec/qtrleenc.c
+@@ -121,18 +121,20 @@ static void qtrle_encode_line(QtrleEncContext *s, AVFrame *p, int line, uint8_t
+     /* The cost of the three different possibilities */
+     int total_bulk_cost;
+     int total_skip_cost;
+     int total_repeat_cost;
+ 
+     int temp_cost;
+     int j;
+ 
+-    uint8_t *this_line = p->               data[0] + line*p->linesize[0] + (width - 1)*s->pixel_size;
+-    uint8_t *prev_line = s->previous_frame.data[0] + line*p->linesize[0] + (width - 1)*s->pixel_size;
++    uint8_t *this_line = p->               data[0] + line*p->               linesize[0] +
++        (width - 1)*s->pixel_size;
++    uint8_t *prev_line = s->previous_frame.data[0] + line*s->previous_frame.linesize[0] +
++        (width - 1)*s->pixel_size;
+ 
+     s->length_table[width] = 0;
+     skipcount = 0;
+ 
+     for (i = width - 1; i >= 0; i--) {
+ 
+         if (!s->frame.key_frame && !memcmp(this_line, prev_line, s->pixel_size))
+             skipcount = FFMIN(skipcount + 1, MAX_RLE_SKIP);
+@@ -235,26 +237,27 @@ static void qtrle_encode_line(QtrleEncContext *s, AVFrame *p, int line, uint8_t
+ static int encode_frame(QtrleEncContext *s, AVFrame *p, uint8_t *buf)
+ {
+     int i;
+     int start_line = 0;
+     int end_line = s->avctx->height;
+     uint8_t *orig_buf = buf;
+ 
+     if (!s->frame.key_frame) {
++        unsigned line_size = s->avctx->width * s->pixel_size;
+         for (start_line = 0; start_line < s->avctx->height; start_line++)
+             if (memcmp(p->data[0] + start_line*p->linesize[0],
+-                       s->previous_frame.data[0] + start_line*p->linesize[0],
+-                       p->linesize[0]))
++                       s->previous_frame.data[0] + start_line*s->previous_frame.linesize[0],
++                       line_size))
+                 break;
+ 
+         for (end_line=s->avctx->height; end_line > start_line; end_line--)
+             if (memcmp(p->data[0] + (end_line - 1)*p->linesize[0],
+-                       s->previous_frame.data[0] + (end_line - 1)*p->linesize[0],
+-                       p->linesize[0]))
++                       s->previous_frame.data[0] + (end_line - 1)*s->previous_frame.linesize[0],
++                       line_size))
+                 break;
+     }
+ 
+     bytestream_put_be32(&buf, 0);                         // CHUNK SIZE, patched later
+ 
+     if ((start_line == 0 && end_line == s->avctx->height) || start_line == s->avctx->height)
+         bytestream_put_be16(&buf, 0);                     // header
+     else {
+
--- ffmpeg-0.5.1.orig/debian/patches/CVE-2011-0723.patch
+++ ffmpeg-0.5.1/debian/patches/CVE-2011-0723.patch
@@ -0,0 +1,47 @@
+Description: fix denial of service and possible code execution via
+ crafted VC1 file
+Origin: upstream, http://git.videolan.org/?p=ffmpeg.git;a=commit;h=44511b17cbbb524602c91a198e7314fa57a7062a
+Origin: upstream, http://git.videolan.org/?p=ffmpeg.git;a=commit;h=808f9ce727fb05058a43de8d64539eddf5fa74d6
+Bug: https://roundup.ffmpeg.org/issue2584
+Bug: https://bugs.launchpad.net/ubuntu/+source/vlc/+bug/690169
+
+diff -Nur ffmpeg-0.5.1/libavcodec/bitstream.h ffmpeg-0.5.1.new/libavcodec/bitstream.h
+--- ffmpeg-0.5.1/libavcodec/bitstream.h	2009-02-05 13:25:01.000000000 -0500
++++ ffmpeg-0.5.1.new/libavcodec/bitstream.h	2011-03-31 10:59:23.442468039 -0400
+@@ -946,4 +946,9 @@
+         return 2 - get_bits1(gb);
+ }
+ 
++static inline int get_bits_left(GetBitContext *gb)
++{
++    return gb->size_in_bits - get_bits_count(gb);
++}
++
+ #endif /* AVCODEC_BITSTREAM_H */
+diff -Nur ffmpeg-0.5.1/libavcodec/dv.c ffmpeg-0.5.1.new/libavcodec/dv.c
+--- ffmpeg-0.5.1/libavcodec/dv.c	2011-03-31 10:59:19.042468040 -0400
++++ ffmpeg-0.5.1.new/libavcodec/dv.c	2011-03-31 10:59:23.442468039 -0400
+@@ -414,11 +414,6 @@
+ /* see dv_88_areas and dv_248_areas for details */
+ static const int mb_area_start[5] = { 1, 6, 21, 43, 64 };
+ 
+-static inline int get_bits_left(GetBitContext *s)
+-{
+-    return s->size_in_bits - get_bits_count(s);
+-}
+-
+ static inline int put_bits_left(PutBitContext* s)
+ {
+     return (s->buf_end - s->buf) * 8 - put_bits_count(s);
+diff -Nur ffmpeg-0.5.1/libavcodec/vc1.c ffmpeg-0.5.1.new/libavcodec/vc1.c
+--- ffmpeg-0.5.1/libavcodec/vc1.c	2009-02-25 18:58:52.000000000 -0500
++++ ffmpeg-0.5.1.new/libavcodec/vc1.c	2011-03-31 10:59:27.162468039 -0400
+@@ -2366,7 +2366,7 @@
+     if (index != vc1_ac_sizes[codingset] - 1) {
+         run = vc1_index_decode_table[codingset][index][0];
+         level = vc1_index_decode_table[codingset][index][1];
+-        lst = index >= vc1_last_decode_table[codingset];
++        lst = index >= vc1_last_decode_table[codingset] || get_bits_left(gb) < 0;
+         if(get_bits1(gb))
+             level = -level;
+     } else {
--- ffmpeg-0.5.1.orig/debian/patches/CVE-2010-3429.patch
+++ ffmpeg-0.5.1/debian/patches/CVE-2010-3429.patch
@@ -0,0 +1,99 @@
+Description: fix arbitrary code execution via crafted flic file
+Origin: upstream, http://git.videolan.org/?p=ffmpeg.git;a=commit;h=2f504d7a90605b77d1a9ac43a8d1efa208e0f515
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=598590
+
+diff -Nur ffmpeg-0.5.1/libavcodec/flicvideo.c ffmpeg-0.5.1.new/libavcodec/flicvideo.c
+--- ffmpeg-0.5.1/libavcodec/flicvideo.c	2009-01-31 21:00:19.000000000 -0500
++++ ffmpeg-0.5.1.new/libavcodec/flicvideo.c	2011-03-31 10:58:01.652468060 -0400
+@@ -160,7 +160,7 @@
+     int pixel_skip;
+     int pixel_countdown;
+     unsigned char *pixels;
+-    int pixel_limit;
++    unsigned int pixel_limit;
+ 
+     s->frame.reference = 1;
+     s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE;
+@@ -254,10 +254,13 @@
+                     av_log(avctx, AV_LOG_ERROR, "Undefined opcode (%x) in DELTA_FLI\n", line_packets);
+                 } else if ((line_packets & 0xC000) == 0x8000) {
+                     // "last byte" opcode
+-                    pixels[y_ptr + s->frame.linesize[0] - 1] = line_packets & 0xff;
++                    pixel_ptr= y_ptr + s->frame.linesize[0] - 1;
++                    CHECK_PIXEL_PTR(0);
++                    pixels[pixel_ptr] = line_packets & 0xff;
+                 } else {
+                     compressed_lines--;
+                     pixel_ptr = y_ptr;
++                    CHECK_PIXEL_PTR(0);
+                     pixel_countdown = s->avctx->width;
+                     for (i = 0; i < line_packets; i++) {
+                         /* account for the skip bytes */
+@@ -269,7 +272,7 @@
+                             byte_run = -byte_run;
+                             palette_idx1 = buf[stream_ptr++];
+                             palette_idx2 = buf[stream_ptr++];
+-                            CHECK_PIXEL_PTR(byte_run);
++                            CHECK_PIXEL_PTR(byte_run * 2);
+                             for (j = 0; j < byte_run; j++, pixel_countdown -= 2) {
+                                 pixels[pixel_ptr++] = palette_idx1;
+                                 pixels[pixel_ptr++] = palette_idx2;
+@@ -299,6 +302,7 @@
+             stream_ptr += 2;
+             while (compressed_lines > 0) {
+                 pixel_ptr = y_ptr;
++                CHECK_PIXEL_PTR(0);
+                 pixel_countdown = s->avctx->width;
+                 line_packets = buf[stream_ptr++];
+                 if (line_packets > 0) {
+@@ -454,7 +458,7 @@
+     int pixel_countdown;
+     unsigned char *pixels;
+     int pixel;
+-    int pixel_limit;
++    unsigned int pixel_limit;
+ 
+     s->frame.reference = 1;
+     s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE;
+@@ -504,6 +508,7 @@
+                 } else {
+                     compressed_lines--;
+                     pixel_ptr = y_ptr;
++                    CHECK_PIXEL_PTR(0);
+                     pixel_countdown = s->avctx->width;
+                     for (i = 0; i < line_packets; i++) {
+                         /* account for the skip bytes */
+@@ -515,13 +520,13 @@
+                             byte_run = -byte_run;
+                             pixel    = AV_RL16(&buf[stream_ptr]);
+                             stream_ptr += 2;
+-                            CHECK_PIXEL_PTR(byte_run);
++                            CHECK_PIXEL_PTR(2 * byte_run);
+                             for (j = 0; j < byte_run; j++, pixel_countdown -= 2) {
+                                 *((signed short*)(&pixels[pixel_ptr])) = pixel;
+                                 pixel_ptr += 2;
+                             }
+                         } else {
+-                            CHECK_PIXEL_PTR(byte_run);
++                            CHECK_PIXEL_PTR(2 * byte_run);
+                             for (j = 0; j < byte_run; j++, pixel_countdown--) {
+                                 *((signed short*)(&pixels[pixel_ptr])) = AV_RL16(&buf[stream_ptr]);
+                                 stream_ptr += 2;
+@@ -612,7 +617,7 @@
+                     if (byte_run > 0) {
+                         pixel    = AV_RL16(&buf[stream_ptr]);
+                         stream_ptr += 2;
+-                        CHECK_PIXEL_PTR(byte_run);
++                        CHECK_PIXEL_PTR(2 * byte_run);
+                         for (j = 0; j < byte_run; j++) {
+                             *((signed short*)(&pixels[pixel_ptr])) = pixel;
+                             pixel_ptr += 2;
+@@ -623,7 +628,7 @@
+                         }
+                     } else {  /* copy pixels if byte_run < 0 */
+                         byte_run = -byte_run;
+-                        CHECK_PIXEL_PTR(byte_run);
++                        CHECK_PIXEL_PTR(2 * byte_run);
+                         for (j = 0; j < byte_run; j++) {
+                             *((signed short*)(&pixels[pixel_ptr])) = AV_RL16(&buf[stream_ptr]);
+                             stream_ptr += 2;
--- ffmpeg-0.5.1.orig/debian/patches/increase-VOFW-on-x86.patch
+++ ffmpeg-0.5.1/debian/patches/increase-VOFW-on-x86.patch
@@ -0,0 +1,30 @@
+From: michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>
+Date: Tue, 5 May 2009 01:34:16 +0000 (+0000)
+Subject: Change VOFW for x86 to 5120, it allows larger images to be scaled and was
+X-Git-Url: http://git.ffmpeg.org/?p=libswscale;a=commitdiff_plain;h=c9d08ac2f27b3c7a18db9d2ef417673f77be405f
+
+Change VOFW for x86 to 5120, it allows larger images to be scaled and was
+not slower. Other archs are not changed as the larger VOFW was slower on PPC.
+
+
+git-svn-id: file:///var/local/repositories/mplayer/trunk/libswscale@29256 b3059339-0415-0410-9bf9-f77b7e298cf2
+---
+
+diff --git a/swscale_internal.h b/swscale_internal.h
+index 3995887..eb11166 100644
+--- a/libswscale/swscale_internal.h
++++ b/libswscale/swscale_internal.h
+@@ -33,7 +33,12 @@
+ 
+ #define MAX_FILTER_SIZE 256
+ 
+-#define VOFW 2048
++#if ARCH_X86
++#define VOFW 5120
++#else
++#define VOFW 2048 // faster on PPC and not tested on others
++#endif
++
+ #define VOF  (VOFW*2)
+ 
+ #ifdef WORDS_BIGENDIAN
--- ffmpeg-0.5.1.orig/debian/patches/fix-constant-quant-encoding.patch
+++ ffmpeg-0.5.1/debian/patches/fix-constant-quant-encoding.patch
@@ -0,0 +1,47 @@
+From: conrad <conrad@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Wed, 30 Sep 2009 22:25:49 +0000 (+0000)
+Subject: Support constant-quant encoding for libtheora
+X-Git-Url: http://git.ffmpeg.org/?p=ffmpeg;a=commitdiff_plain;h=a5ac197b1e60ca44cbc1ea0f64e25af977f7dae5
+
+Support constant-quant encoding for libtheora
+Based on a patch by j f (gonzaz-z # operamail (d) com)
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20109 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+---
+
+diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c
+index 9da0d19..f028595 100644
+--- a/libavcodec/libtheoraenc.c
++++ b/libavcodec/libtheoraenc.c
+@@ -106,11 +106,9 @@ static av_cold int encode_init(AVCodecContext* avc_context)
+     }
+     t_info.colorspace = OC_CS_UNSPECIFIED;
+     t_info.pixelformat = OC_PF_420;
+-    t_info.target_bitrate = avc_context->bit_rate;
+     t_info.keyframe_frequency = avc_context->gop_size;
+     t_info.keyframe_frequency_force = avc_context->gop_size;
+     t_info.keyframe_mindistance = avc_context->keyint_min;
+-    t_info.quality = 0;
+ 
+     t_info.quick_p = 1;
+     t_info.dropframes_p = 0;
+@@ -120,6 +118,19 @@ static av_cold int encode_init(AVCodecContext* avc_context)
+     t_info.noise_sensitivity = 1;
+     t_info.sharpness = 0;
+ 
++    if (avc_context->flags & CODEC_FLAG_QSCALE) {
++        /* to be constant with the libvorbis implementation, clip global_quality to 0 - 10
++           Theora accepts a quality parameter p, which is:
++                * 0 <= p <=63
++                * an int value
++         */
++        t_info.quality = av_clip(avc_context->global_quality / (float)FF_QP2LAMBDA, 0, 10) * 6.3;
++        t_info.target_bitrate = 0;
++    } else {
++        t_info.target_bitrate = avc_context->bit_rate;
++        t_info.quality = 0;
++    }
++
+     /* Now initialise libtheora */
+     if (theora_encode_init( &(h->t_state), &t_info ) != 0) {
+         av_log(avc_context, AV_LOG_ERROR, "theora_encode_init failed\n");
--- ffmpeg-0.5.1.orig/debian/patches/CVE-2011-0480.patch
+++ ffmpeg-0.5.1/debian/patches/CVE-2011-0480.patch
@@ -0,0 +1,35 @@
+Description: fix denial of service and possible code execution via
+ crafted WebM file
+Origin: upstream, http://git.videolan.org/?p=ffmpeg.git;a=commit;h=329e816ed7903cf078c52aecd32a3be3b5dabbee
+Bug: https://roundup.ffmpeg.org/issue2548
+Bug: https://roundup.ffmpeg.org/issue2550
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=610550
+
+diff -Nur ffmpeg-0.5.1/libavcodec/vorbis_dec.c ffmpeg-0.5.1.new/libavcodec/vorbis_dec.c
+--- ffmpeg-0.5.1/libavcodec/vorbis_dec.c	2011-03-31 10:58:53.342468046 -0400
++++ ffmpeg-0.5.1.new/libavcodec/vorbis_dec.c	2011-03-31 10:58:58.002468046 -0400
+@@ -466,6 +466,7 @@
+         if (floor_setup->floor_type==1) {
+             uint_fast8_t maximum_class=0;
+             uint_fast8_t rangebits;
++            uint_fast32_t rangemax;
+             uint_fast16_t floor1_values=2;
+ 
+             floor_setup->decode=vorbis_floor1_decode;
+@@ -526,8 +527,15 @@
+ 
+ 
+             rangebits=get_bits(gb, 4);
++            rangemax = (1 << rangebits);
++            if (rangemax > vc->blocksize[1] / 2) {
++                av_log(vc->avccontext, AV_LOG_ERROR,
++                       "Floor value is too large for blocksize: %d (%d)\n",
++                       rangemax, vc->blocksize[1] / 2);
++                return -1;
++            }
+             floor_setup->data.t1.list[0].x = 0;
+-            floor_setup->data.t1.list[1].x = (1<<rangebits);
++            floor_setup->data.t1.list[1].x = rangemax;
+ 
+             for(j=0;j<floor_setup->data.t1.partitions;++j) {
+                 for(k=0;k<floor_setup->data.t1.class_dimensions[floor_setup->data.t1.partition_class[j]];++k,++floor1_values) {
--- ffmpeg-0.5.1.orig/debian/patches/use-normal-check_func-test-for-math-functions.patch
+++ ffmpeg-0.5.1/debian/patches/use-normal-check_func-test-for-math-functions.patch
@@ -0,0 +1,48 @@
+From: mru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Wed, 15 Jul 2009 08:22:06 +0000 (+0000)
+Subject: Use normal check_func test for math functions
+X-Git-Url: http://git.ffmpeg.org/?p=ffmpeg;a=commitdiff_plain;h=9899a2f3353c19bebf6d1e94eaa526a2a1fece95
+
+Use normal check_func test for math functions
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19434 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+
+This patch avoid a funny FTBFS on armel machines that do not have a FPU:
+The check_exec function tries to execute the binary to check for their
+functioning. On armel, llrint (and only that function) is implemented
+using FPU instruction, which makes this test fail and causes HAVE_LLRINT
+to be not defined. Since it is defined in math.h anyways, the build fails with:
+
+gcc -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I. -I"/tmp/buildd/ffmpeg-0.5+svn20090706" -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -I/tmp/buildd/ffmpeg-0.5+svn20090706/debian/include -mfpu=neon -mfloat-abi=softfp -fPIC -DPIC -std=c99 -fomit-frame-pointer -march=armv7-a -pthread -I/usr/include/dirac -I/usr/include/schroedinger-1.0 -I/usr/include/liboil-0.3 -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -O3 -fno-math-errno -fno-signed-zeros          -c -o libavfilter/allfilters.o /tmp/buildd/ffmpeg-0.5+svn20090706/libavfilter/allfilters.c
+In file included from /tmp/buildd/ffmpeg-0.5+svn20090706/libavutil/common.h:283,
+                 from /tmp/buildd/ffmpeg-0.5+svn20090706/libavutil/avutil.h:56,
+                 from /tmp/buildd/ffmpeg-0.5+svn20090706/libavcodec/avcodec.h:30,
+                 from /tmp/buildd/ffmpeg-0.5+svn20090706/libavfilter/avfilter.h:38,
+                 from /tmp/buildd/ffmpeg-0.5+svn20090706/libavfilter/allfilters.c:22:
+/tmp/buildd/ffmpeg-0.5+svn20090706/libavutil/internal.h:276: error: static declaration of 'llrint' follows non-static declaration
+make[1]: *** [libavfilter/allfilters.o] Error 1
+
+---
+
+--- a/configure
++++ b/configure
+@@ -1984,13 +1984,12 @@ done
+ 
+ check_lib math.h sin -lm
+ 
+-# test for C99 functions in math.h
+-for func in llrint lrint lrintf round roundf truncf; do
+-    check_exec <<EOF && enable $func || disable $func
+-#include <math.h>
+-int main(void) { return ($func(3.999f) > 0)?0:1; }
+-EOF
+-done
++check_func llrint
++check_func lrint
++check_func lrintf
++check_func round
++check_func roundf
++check_func truncf
+ 
+ # these are off by default, so fail if requested and not available
+ enabled avisynth   && require2 vfw32 "windows.h vfw.h" AVIFileInit -lvfw32
--- ffmpeg-0.5.1.orig/debian/patches/CVE-2010-3908.patch
+++ ffmpeg-0.5.1/debian/patches/CVE-2010-3908.patch
@@ -0,0 +1,16 @@
+Description: fix arbitrary code execution via crafted wmv file
+Origin: upstream, http://git.videolan.org/?p=ffmpeg.git;a=commit;h=48b086b0efa40799ace96bcec010b6b72a9490d6
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/vlc/+bug/690169
+
+diff -Nur ffmpeg-0.5.1/libavcodec/utils.c ffmpeg-0.5.1.new/libavcodec/utils.c
+--- ffmpeg-0.5.1/libavcodec/utils.c	2010-02-09 15:28:42.000000000 -0500
++++ ffmpeg-0.5.1.new/libavcodec/utils.c	2011-03-31 10:58:13.302468057 -0400
+@@ -189,7 +189,7 @@
+ }
+ 
+ int avcodec_check_dimensions(void *av_log_ctx, unsigned int w, unsigned int h){
+-    if((int)w>0 && (int)h>0 && (w+128)*(uint64_t)(h+128) < INT_MAX/4)
++    if((int)w>0 && (int)h>0 && (w+128)*(uint64_t)(h+128) < INT_MAX/8)
+         return 0;
+ 
+     av_log(av_log_ctx, AV_LOG_ERROR, "picture size invalid (%ux%u)\n", w, h);
--- ffmpeg-0.5.1.orig/debian/patches/901-fix-misc-typos.patch
+++ ffmpeg-0.5.1/debian/patches/901-fix-misc-typos.patch
@@ -0,0 +1,45 @@
+From: stefano <stefano@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Wed, 27 Jan 2010 00:31:52 +0000 (+0000)
+Subject: Fix misc typos, patch by
+X-Git-Url: http://git.ffmpeg.org/?p=ffmpeg;a=commitdiff_plain;h=ba4f92903641af2f11d47d1ee845a62abfd5dd38
+
+Fix misc typos, patch by
+Fabian Greffrath base64_decode(PGZhYmlhbkBncmVmZnJhdGguY29tPg==).
+
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21473 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+---
+
+--- ffmpeg.orig/libavcodec/mjpegdec.c
++++ ffmpeg/libavcodec/mjpegdec.c
+@@ -967,7 +967,7 @@
+     }
+ 
+     if(s->avctx->debug & FF_DEBUG_PICT_INFO)
+-        av_log(s->avctx, AV_LOG_DEBUG, "%s %s p:%d >>:%d ilv:%d bits:%d %s\n", s->lossless ? "lossless" : "sequencial DCT", s->rgb ? "RGB" : "",
++        av_log(s->avctx, AV_LOG_DEBUG, "%s %s p:%d >>:%d ilv:%d bits:%d %s\n", s->lossless ? "lossless" : "sequential DCT", s->rgb ? "RGB" : "",
+                predictor, point_transform, ilv, s->bits,
+                s->pegasus_rct ? "PRCT" : (s->rct ? "RCT" : ""));
+ 
+--- ffmpeg.orig/libavcodec/opt.c
++++ ffmpeg/libavcodec/opt.c
+@@ -424,7 +424,7 @@
+             break;
+             case FF_OPT_TYPE_INT64:
+                 if((double)(opt->default_val+0.6) == opt->default_val)
+-                    av_log(s, AV_LOG_DEBUG, "loss of precission in default of %s\n", opt->name);
++                    av_log(s, AV_LOG_DEBUG, "loss of precision in default of %s\n", opt->name);
+                 av_set_int(s, opt->name, opt->default_val);
+             break;
+             case FF_OPT_TYPE_FLOAT: {
+--- ffmpeg.orig/libavcodec/options.c
++++ ffmpeg/libavcodec/options.c
+@@ -156,7 +156,7 @@
+ {"very", "strictly conform to a older more strict version of the spec or reference software", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_VERY_STRICT, INT_MIN, INT_MAX, V|D|E, "strict"},
+ {"strict", "strictly conform to all the things in the spec no matter what consequences", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_STRICT, INT_MIN, INT_MAX, V|D|E, "strict"},
+ {"normal", NULL, 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_NORMAL, INT_MIN, INT_MAX, V|D|E, "strict"},
+-{"inofficial", "allow inofficial extensions", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_INOFFICIAL, INT_MIN, INT_MAX, V|D|E, "strict"},
++{"inofficial", "allow unofficial extensions", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_INOFFICIAL, INT_MIN, INT_MAX, V|D|E, "strict"},
+ {"experimental", "allow non standardized experimental things", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_EXPERIMENTAL, INT_MIN, INT_MAX, V|D|E, "strict"},
+ {"b_qoffset", "qp offset between P and B frames", OFFSET(b_quant_offset), FF_OPT_TYPE_FLOAT, 1.25, -FLT_MAX, FLT_MAX, V|E},
+ {"er", "set error detection aggressivity", OFFSET(error_recognition), FF_OPT_TYPE_INT, FF_ER_CAREFUL, INT_MIN, INT_MAX, A|V|D, "er"},
--- ffmpeg-0.5.1.orig/debian/patches/CVE-2011-0722.patch
+++ ffmpeg-0.5.1/debian/patches/CVE-2011-0722.patch
@@ -0,0 +1,16 @@
+Description: fix arbitrary code execution via crafted RealMedia file
+Origin: upstream, http://git.videolan.org/?p=ffmpeg.git;a=commit;h=44511b17cbbb524602c91a198e7314fa57a7062a
+Origin: upstream, http://git.videolan.org/?p=ffmpeg.git;a=commit;h=808f9ce727fb05058a43de8d64539eddf5fa74d6
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/vlc/+bug/690169
+
+diff -Nur ffmpeg-0.5.1/libavcodec/rv34.c ffmpeg-0.5.1.new/libavcodec/rv34.c
+--- ffmpeg-0.5.1/libavcodec/rv34.c	2009-02-25 03:36:00.000000000 -0500
++++ ffmpeg-0.5.1.new/libavcodec/rv34.c	2011-03-31 10:59:14.992468042 -0400
+@@ -1249,6 +1249,7 @@
+             MPV_common_end(s);
+             s->width  = r->si.width;
+             s->height = r->si.height;
++            avcodec_set_dimensions(s->avctx, s->width, s->height);
+             if(MPV_common_init(s) < 0)
+                 return -1;
+             r->intra_types_hist = av_realloc(r->intra_types_hist, s->b4_stride * 4 * 2 * sizeof(*r->intra_types_hist));
--- ffmpeg-0.5.1.orig/debian/patches/neon/0015-ARM-handle-VFP-register-arguments-in-ff_vector_fmul_.patch
+++ ffmpeg-0.5.1/debian/patches/neon/0015-ARM-handle-VFP-register-arguments-in-ff_vector_fmul_.patch
@@ -0,0 +1,31 @@
+From e965241fea3348a8205bd38f91efbfcd13e8cd31 Mon Sep 17 00:00:00 2001
+From: mru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Mon, 20 Jul 2009 22:30:27 +0000
+Subject: [PATCH 15/27] ARM: handle VFP register arguments in ff_vector_fmul_window_neon()
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19475 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+---
+ libavcodec/arm/dsputil_neon_s.S |    6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/libavcodec/arm/dsputil_neon_s.S b/libavcodec/arm/dsputil_neon_s.S
+index 2bc07fa..71d09c6 100644
+--- a/libavcodec/arm/dsputil_neon_s.S
++++ b/libavcodec/arm/dsputil_neon_s.S
+@@ -746,9 +746,11 @@ function ff_vector_fmul_neon, export=1
+         .endfunc
+ 
+ function ff_vector_fmul_window_neon, export=1
+-        vld1.32         {d16[],d17[]}, [sp,:32]
++VFP     vdup.32         q8,  d0[0]
++NOVFP   vld1.32         {d16[],d17[]}, [sp,:32]
+         push            {r4,r5,lr}
+-        ldr             lr,  [sp, #16]
++VFP     ldr             lr,  [sp, #12]
++NOVFP   ldr             lr,  [sp, #16]
+         sub             r2,  r2,  #8
+         sub             r5,  lr,  #2
+         add             r2,  r2,  r5, lsl #2
+-- 
+1.6.3.3
+
--- ffmpeg-0.5.1.orig/debian/patches/neon/0002-ARM-NEON-optimized-put_signed_pixels_clamped.patch
+++ ffmpeg-0.5.1/debian/patches/neon/0002-ARM-NEON-optimized-put_signed_pixels_clamped.patch
@@ -0,0 +1,82 @@
+From 5bf2745fa3bdc996f2201c06eeff1d242d81cc2a Mon Sep 17 00:00:00 2001
+From: conrad <conrad@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Sat, 4 Apr 2009 21:02:48 +0000
+Subject: [PATCH 02/27] ARM: NEON optimized put_signed_pixels_clamped
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18333 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+---
+ libavcodec/arm/dsputil_neon.c   |    2 ++
+ libavcodec/arm/dsputil_neon_s.S |   37 +++++++++++++++++++++++++++++++++++++
+ 2 files changed, 39 insertions(+), 0 deletions(-)
+
+diff --git a/libavcodec/arm/dsputil_neon.c b/libavcodec/arm/dsputil_neon.c
+index 2e56308..37425a3 100644
+--- a/libavcodec/arm/dsputil_neon.c
++++ b/libavcodec/arm/dsputil_neon.c
+@@ -42,6 +42,7 @@ void ff_put_pixels8_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
+ void ff_avg_pixels16_neon(uint8_t *, const uint8_t *, int, int);
+ 
+ void ff_add_pixels_clamped_neon(const DCTELEM *, uint8_t *, int);
++void ff_put_signed_pixels_clamped_neon(const DCTELEM *, uint8_t *, int);
+ 
+ void ff_put_h264_qpel16_mc00_neon(uint8_t *, uint8_t *, int);
+ void ff_put_h264_qpel16_mc10_neon(uint8_t *, uint8_t *, int);
+@@ -179,6 +180,7 @@ void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx)
+     c->avg_pixels_tab[0][0] = ff_avg_pixels16_neon;
+ 
+     c->add_pixels_clamped = ff_add_pixels_clamped_neon;
++    c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_neon;
+ 
+     c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_neon;
+     c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_neon;
+diff --git a/libavcodec/arm/dsputil_neon_s.S b/libavcodec/arm/dsputil_neon_s.S
+index c305210..5b95717 100644
+--- a/libavcodec/arm/dsputil_neon_s.S
++++ b/libavcodec/arm/dsputil_neon_s.S
+@@ -273,6 +273,43 @@ function ff_put_h264_qpel8_mc00_neon, export=1
+         pixfunc2 put_ pixels8_y2,   _no_rnd, vhadd.u8
+         pixfunc2 put_ pixels8_xy2,  _no_rnd, vshrn.u16, 1
+ 
++function ff_put_signed_pixels_clamped_neon, export=1
++        vmov.u8         d31, #128
++        vld1.64         {d16-d17}, [r0,:128]!
++        vqmovn.s16      d0, q8
++        vld1.64         {d18-d19}, [r0,:128]!
++        vqmovn.s16      d1, q9
++        vld1.64         {d16-d17}, [r0,:128]!
++        vqmovn.s16      d2, q8
++        vld1.64         {d18-d19}, [r0,:128]!
++        vadd.u8         d0, d0, d31
++        vld1.64         {d20-d21}, [r0,:128]!
++        vadd.u8         d1, d1, d31
++        vld1.64         {d22-d23}, [r0,:128]!
++        vadd.u8         d2, d2, d31
++        vst1.64         {d0},      [r1,:64], r2
++        vqmovn.s16      d3, q9
++        vst1.64         {d1},      [r1,:64], r2
++        vqmovn.s16      d4, q10
++        vst1.64         {d2},      [r1,:64], r2
++        vqmovn.s16      d5, q11
++        vld1.64         {d24-d25}, [r0,:128]!
++        vadd.u8         d3, d3, d31
++        vld1.64         {d26-d27}, [r0,:128]!
++        vadd.u8         d4, d4, d31
++        vadd.u8         d5, d5, d31
++        vst1.64         {d3},      [r1,:64], r2
++        vqmovn.s16      d6, q12
++        vst1.64         {d4},      [r1,:64], r2
++        vqmovn.s16      d7, q13
++        vst1.64         {d5},      [r1,:64], r2
++        vadd.u8         d6, d6, d31
++        vadd.u8         d7, d7, d31
++        vst1.64         {d6},      [r1,:64], r2
++        vst1.64         {d7},      [r1,:64], r2
++        bx              lr
++        .endfunc
++
+ function ff_add_pixels_clamped_neon, export=1
+         mov             r3, r1
+         vld1.64         {d16},   [r1,:64], r2
+-- 
+1.6.3.3
+
--- ffmpeg-0.5.1.orig/debian/patches/neon/0018-Prepare-for-optimised-forward-MDCT-implementations.patch
+++ ffmpeg-0.5.1/debian/patches/neon/0018-Prepare-for-optimised-forward-MDCT-implementations.patch
@@ -0,0 +1,86 @@
+From 696f65e4e5d92a8777d922269558cc9f03ca1145 Mon Sep 17 00:00:00 2001
+From: mru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Fri, 11 Sep 2009 02:24:19 +0000
+Subject: [PATCH 18/27] Prepare for optimised forward MDCT implementations
+
+This adds a function pointer for forward MDCT to FFTContext and
+initialises it with the existing C function.  ff_calc_mdct() is
+changed to an inline function calling the selected version as
+done for other fft/mdct functions.
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19818 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+---
+ libavcodec/dsputil.h |    9 ++++++++-
+ libavcodec/fft.c     |    1 +
+ libavcodec/mdct.c    |    2 +-
+ 3 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
+index c4abd14..e299ade 100644
+--- a/libavcodec/dsputil.h
++++ b/libavcodec/dsputil.h
+@@ -680,6 +680,7 @@ typedef struct FFTContext {
+     void (*fft_calc)(struct FFTContext *s, FFTComplex *z);
+     void (*imdct_calc)(struct MDCTContext *s, FFTSample *output, const FFTSample *input);
+     void (*imdct_half)(struct MDCTContext *s, FFTSample *output, const FFTSample *input);
++    void (*mdct_calc)(struct MDCTContext *s, FFTSample *output, const FFTSample *input);
+ } FFTContext;
+ 
+ extern FFTSample* ff_cos_tabs[13];
+@@ -737,6 +738,12 @@ static inline void ff_imdct_half(MDCTContext *s, FFTSample *output, const FFTSam
+     s->fft.imdct_half(s, output, input);
+ }
+ 
++static inline void ff_mdct_calc(MDCTContext *s, FFTSample *output,
++                                const FFTSample *input)
++{
++    s->fft.mdct_calc(s, output, input);
++}
++
+ /**
+  * Generate a Kaiser-Bessel Derived Window.
+  * @param   window  pointer to half window
+@@ -762,6 +769,7 @@ extern float *ff_sine_windows[6];
+ int ff_mdct_init(MDCTContext *s, int nbits, int inverse);
+ void ff_imdct_calc_c(MDCTContext *s, FFTSample *output, const FFTSample *input);
+ void ff_imdct_half_c(MDCTContext *s, FFTSample *output, const FFTSample *input);
++void ff_mdct_calc_c(MDCTContext *s, FFTSample *output, const FFTSample *input);
+ void ff_imdct_calc_3dn(MDCTContext *s, FFTSample *output, const FFTSample *input);
+ void ff_imdct_half_3dn(MDCTContext *s, FFTSample *output, const FFTSample *input);
+ void ff_imdct_calc_3dn2(MDCTContext *s, FFTSample *output, const FFTSample *input);
+@@ -770,7 +778,6 @@ void ff_imdct_calc_sse(MDCTContext *s, FFTSample *output, const FFTSample *input
+ void ff_imdct_half_sse(MDCTContext *s, FFTSample *output, const FFTSample *input);
+ void ff_imdct_calc_neon(MDCTContext *s, FFTSample *output, const FFTSample *input);
+ void ff_imdct_half_neon(MDCTContext *s, FFTSample *output, const FFTSample *input);
+-void ff_mdct_calc(MDCTContext *s, FFTSample *out, const FFTSample *input);
+ void ff_mdct_end(MDCTContext *s);
+ 
+ /* Real Discrete Fourier Transform */
+diff --git a/libavcodec/fft.c b/libavcodec/fft.c
+index b05ddda..655acd3 100644
+--- a/libavcodec/fft.c
++++ b/libavcodec/fft.c
+@@ -86,6 +86,7 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse)
+     s->fft_calc    = ff_fft_calc_c;
+     s->imdct_calc  = ff_imdct_calc_c;
+     s->imdct_half  = ff_imdct_half_c;
++    s->mdct_calc   = ff_mdct_calc_c;
+     s->exptab1     = NULL;
+ 
+ #if HAVE_MMX && HAVE_YASM
+diff --git a/libavcodec/mdct.c b/libavcodec/mdct.c
+index cb3388f..b0816b0 100644
+--- a/libavcodec/mdct.c
++++ b/libavcodec/mdct.c
+@@ -179,7 +179,7 @@ void ff_imdct_calc_c(MDCTContext *s, FFTSample *output, const FFTSample *input)
+  * @param input N samples
+  * @param out N/2 samples
+  */
+-void ff_mdct_calc(MDCTContext *s, FFTSample *out, const FFTSample *input)
++void ff_mdct_calc_c(MDCTContext *s, FFTSample *out, const FFTSample *input)
+ {
+     int i, j, n, n8, n4, n2, n3;
+     FFTSample re, im;
+-- 
+1.6.3.3
+
--- ffmpeg-0.5.1.orig/debian/patches/neon/0012-ARM-enable-fast_unaligned-when-cpu-armv-67-is-specif.patch
+++ ffmpeg-0.5.1/debian/patches/neon/0012-ARM-enable-fast_unaligned-when-cpu-armv-67-is-specif.patch
@@ -0,0 +1,28 @@
+From 8f934d1aa05a5db078dc732b37f2d46faa92e866 Mon Sep 17 00:00:00 2001
+From: mru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Tue, 30 Jun 2009 12:46:09 +0000
+Subject: [PATCH 12/27] ARM: enable fast_unaligned when --cpu=armv[67] is specified
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19308 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+---
+ configure |    4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/configure b/configure
+index fd11501..7459215 100755
+--- a/configure
++++ b/configure
+@@ -1792,6 +1792,10 @@ if test $cpu != "generic"; then
+             add_cflags -mcpu=$cpu
+             enable fast_unaligned
+         ;;
++        armv[67]*)
++            add_cflags -march=$cpu
++            enable fast_unaligned
++        ;;
+         armv*)
+             add_cflags -march=$cpu
+         ;;
+-- 
+1.6.3.3
+
--- ffmpeg-0.5.1.orig/debian/patches/neon/0004-Reorganise-intreadwrite.h.patch
+++ ffmpeg-0.5.1/debian/patches/neon/0004-Reorganise-intreadwrite.h.patch
@@ -0,0 +1,312 @@
+From f4bfca647b7228833d0e102f68d0726594c502b1 Mon Sep 17 00:00:00 2001
+From: mru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Sat, 18 Apr 2009 00:00:22 +0000
+Subject: [PATCH 04/27] Reorganise intreadwrite.h
+
+This changes intreadwrite.h to support per-arch implementations of the
+various macros allowing us to take advantage of special instructions
+or other properties the compiler does not know about.
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18600 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+---
+ libavutil/intreadwrite.h |  213 ++++++++++++++++++++++++++++++----------------
+ 1 files changed, 141 insertions(+), 72 deletions(-)
+
+diff --git a/libavutil/intreadwrite.h b/libavutil/intreadwrite.h
+index 7c5909e..b1c5c2a 100644
+--- a/libavutil/intreadwrite.h
++++ b/libavutil/intreadwrite.h
+@@ -23,119 +23,88 @@
+ #include "config.h"
+ #include "bswap.h"
+ 
+-#ifdef __GNUC__
++/*
++ * Arch-specific headers can provide any combination of
++ * AV_[RW][BLN](16|32|64) macros.  Preprocessor symbols must be
++ * defined, even if these are implemented as inline functions.
++ */
++
++
++/*
++ * Define AV_[RW]N helper macros to simplify definitions not provided
++ * by per-arch headers.
++ */
++
++#if   defined(__GNUC__)
+ 
+ struct unaligned_64 { uint64_t l; } __attribute__((packed));
+ struct unaligned_32 { uint32_t l; } __attribute__((packed));
+ struct unaligned_16 { uint16_t l; } __attribute__((packed));
+ 
+-#define AV_RN16(a) (((const struct unaligned_16 *) (a))->l)
+-#define AV_RN32(a) (((const struct unaligned_32 *) (a))->l)
+-#define AV_RN64(a) (((const struct unaligned_64 *) (a))->l)
+-
+-#define AV_WN16(a, b) (((struct unaligned_16 *) (a))->l) = (b)
+-#define AV_WN32(a, b) (((struct unaligned_32 *) (a))->l) = (b)
+-#define AV_WN64(a, b) (((struct unaligned_64 *) (a))->l) = (b)
++#   define AV_RN(s, p) (((const struct unaligned_##s *) (p))->l)
++#   define AV_WN(s, p, v) (((struct unaligned_##s *) (p))->l) = (v)
+ 
+ #elif defined(__DECC)
+ 
+-#define AV_RN16(a) (*((const __unaligned uint16_t*)(a)))
+-#define AV_RN32(a) (*((const __unaligned uint32_t*)(a)))
+-#define AV_RN64(a) (*((const __unaligned uint64_t*)(a)))
+-
+-#define AV_WN16(a, b) *((__unaligned uint16_t*)(a)) = (b)
+-#define AV_WN32(a, b) *((__unaligned uint32_t*)(a)) = (b)
+-#define AV_WN64(a, b) *((__unaligned uint64_t*)(a)) = (b)
+-
+-#else
+-
+-#define AV_RN16(a) (*((const uint16_t*)(a)))
+-#define AV_RN32(a) (*((const uint32_t*)(a)))
+-#define AV_RN64(a) (*((const uint64_t*)(a)))
+-
+-#define AV_WN16(a, b) *((uint16_t*)(a)) = (b)
+-#define AV_WN32(a, b) *((uint32_t*)(a)) = (b)
+-#define AV_WN64(a, b) *((uint64_t*)(a)) = (b)
+-
+-#endif /* !__GNUC__ */
+-
+-/* endian macros */
+-#define AV_RB8(x)     (((const uint8_t*)(x))[0])
+-#define AV_WB8(p, d)  do { ((uint8_t*)(p))[0] = (d); } while(0)
+-
+-#define AV_RL8(x)     AV_RB8(x)
+-#define AV_WL8(p, d)  AV_WB8(p, d)
+-
+-#if HAVE_FAST_UNALIGNED
+-# ifdef WORDS_BIGENDIAN
+-#  define AV_RB16(x)    AV_RN16(x)
+-#  define AV_WB16(p, d) AV_WN16(p, d)
+-
+-#  define AV_RL16(x)    bswap_16(AV_RN16(x))
+-#  define AV_WL16(p, d) AV_WN16(p, bswap_16(d))
+-
+-#  define AV_RB32(x)    AV_RN32(x)
+-#  define AV_WB32(p, d) AV_WN32(p, d)
++#   define AV_RN(s, p) (*((const __unaligned uint##s##_t*)(p)))
++#   define AV_WN(s, p, v) *((__unaligned uint##s##_t*)(p)) = (v)
+ 
+-#  define AV_RL32(x)    bswap_32(AV_RN32(x))
+-#  define AV_WL32(p, d) AV_WN32(p, bswap_32(d))
++#elif HAVE_FAST_UNALIGNED
+ 
+-#  define AV_RB64(x)    AV_RN64(x)
+-#  define AV_WB64(p, d) AV_WN64(p, d)
++#   define AV_RN(s, p) (*((const uint##s##_t*)(p)))
++#   define AV_WN(s, p, v) *((uint##s##_t*)(p)) = (v)
+ 
+-#  define AV_RL64(x)    bswap_64(AV_RN64(x))
+-#  define AV_WL64(p, d) AV_WN64(p, bswap_64(d))
+-# else /* WORDS_BIGENDIAN */
+-#  define AV_RB16(x)    bswap_16(AV_RN16(x))
+-#  define AV_WB16(p, d) AV_WN16(p, bswap_16(d))
+-
+-#  define AV_RL16(x)    AV_RN16(x)
+-#  define AV_WL16(p, d) AV_WN16(p, d)
+-
+-#  define AV_RB32(x)    bswap_32(AV_RN32(x))
+-#  define AV_WB32(p, d) AV_WN32(p, bswap_32(d))
+-
+-#  define AV_RL32(x)    AV_RN32(x)
+-#  define AV_WL32(p, d) AV_WN32(p, d)
+-
+-#  define AV_RB64(x)    bswap_64(AV_RN64(x))
+-#  define AV_WB64(p, d) AV_WN64(p, bswap_64(d))
++#else
+ 
+-#  define AV_RL64(x)    AV_RN64(x)
+-#  define AV_WL64(p, d) AV_WN64(p, d)
+-# endif
+-#else /* HAVE_FAST_UNALIGNED */
+-#define AV_RB16(x)  ((((const uint8_t*)(x))[0] << 8) | ((const uint8_t*)(x))[1])
++#ifndef AV_RB16
++#define AV_RB16(x)  ((((const uint8_t*)(x))[0] << 8) | \
++                      ((const uint8_t*)(x))[1])
++#endif
++#ifndef AV_WB16
+ #define AV_WB16(p, d) do { \
+                     ((uint8_t*)(p))[1] = (d); \
+                     ((uint8_t*)(p))[0] = (d)>>8; } while(0)
++#endif
+ 
++#ifndef AV_RL16
+ #define AV_RL16(x)  ((((const uint8_t*)(x))[1] << 8) | \
+                       ((const uint8_t*)(x))[0])
++#endif
++#ifndef AV_WL16
+ #define AV_WL16(p, d) do { \
+                     ((uint8_t*)(p))[0] = (d); \
+                     ((uint8_t*)(p))[1] = (d)>>8; } while(0)
++#endif
+ 
++#ifndef AV_RB32
+ #define AV_RB32(x)  ((((const uint8_t*)(x))[0] << 24) | \
+                      (((const uint8_t*)(x))[1] << 16) | \
+                      (((const uint8_t*)(x))[2] <<  8) | \
+                       ((const uint8_t*)(x))[3])
++#endif
++#ifndef AV_WB32
+ #define AV_WB32(p, d) do { \
+                     ((uint8_t*)(p))[3] = (d); \
+                     ((uint8_t*)(p))[2] = (d)>>8; \
+                     ((uint8_t*)(p))[1] = (d)>>16; \
+                     ((uint8_t*)(p))[0] = (d)>>24; } while(0)
++#endif
+ 
++#ifndef AV_RL32
+ #define AV_RL32(x) ((((const uint8_t*)(x))[3] << 24) | \
+                     (((const uint8_t*)(x))[2] << 16) | \
+                     (((const uint8_t*)(x))[1] <<  8) | \
+                      ((const uint8_t*)(x))[0])
++#endif
++#ifndef AV_WL32
+ #define AV_WL32(p, d) do { \
+                     ((uint8_t*)(p))[0] = (d); \
+                     ((uint8_t*)(p))[1] = (d)>>8; \
+                     ((uint8_t*)(p))[2] = (d)>>16; \
+                     ((uint8_t*)(p))[3] = (d)>>24; } while(0)
++#endif
+ 
++#ifndef AV_RB64
+ #define AV_RB64(x)  (((uint64_t)((const uint8_t*)(x))[0] << 56) | \
+                      ((uint64_t)((const uint8_t*)(x))[1] << 48) | \
+                      ((uint64_t)((const uint8_t*)(x))[2] << 40) | \
+@@ -144,6 +113,8 @@ struct unaligned_16 { uint16_t l; } __attribute__((packed));
+                      ((uint64_t)((const uint8_t*)(x))[5] << 16) | \
+                      ((uint64_t)((const uint8_t*)(x))[6] <<  8) | \
+                       (uint64_t)((const uint8_t*)(x))[7])
++#endif
++#ifndef AV_WB64
+ #define AV_WB64(p, d) do { \
+                     ((uint8_t*)(p))[7] = (d);     \
+                     ((uint8_t*)(p))[6] = (d)>>8;  \
+@@ -153,7 +124,9 @@ struct unaligned_16 { uint16_t l; } __attribute__((packed));
+                     ((uint8_t*)(p))[2] = (d)>>40; \
+                     ((uint8_t*)(p))[1] = (d)>>48; \
+                     ((uint8_t*)(p))[0] = (d)>>56; } while(0)
++#endif
+ 
++#ifndef AV_RL64
+ #define AV_RL64(x)  (((uint64_t)((const uint8_t*)(x))[7] << 56) | \
+                      ((uint64_t)((const uint8_t*)(x))[6] << 48) | \
+                      ((uint64_t)((const uint8_t*)(x))[5] << 40) | \
+@@ -162,6 +135,8 @@ struct unaligned_16 { uint16_t l; } __attribute__((packed));
+                      ((uint64_t)((const uint8_t*)(x))[2] << 16) | \
+                      ((uint64_t)((const uint8_t*)(x))[1] <<  8) | \
+                       (uint64_t)((const uint8_t*)(x))[0])
++#endif
++#ifndef AV_WL64
+ #define AV_WL64(p, d) do { \
+                     ((uint8_t*)(p))[0] = (d);     \
+                     ((uint8_t*)(p))[1] = (d)>>8;  \
+@@ -171,7 +146,101 @@ struct unaligned_16 { uint16_t l; } __attribute__((packed));
+                     ((uint8_t*)(p))[5] = (d)>>40; \
+                     ((uint8_t*)(p))[6] = (d)>>48; \
+                     ((uint8_t*)(p))[7] = (d)>>56; } while(0)
+-#endif  /* HAVE_FAST_UNALIGNED */
++#endif
++
++#ifdef WORDS_BIGENDIAN
++#   define AV_RN(s, p)    AV_RB##s(p)
++#   define AV_WN(s, p, v) AV_WB##s(p, v)
++#else
++#   define AV_RN(s, p)    AV_RL##s(p)
++#   define AV_WN(s, p, v) AV_WL##s(p, v)
++#endif
++
++#endif /* HAVE_FAST_UNALIGNED */
++
++#ifndef AV_RN16
++#   define AV_RN16(p) AV_RN(16, p)
++#endif
++
++#ifndef AV_RN32
++#   define AV_RN32(p) AV_RN(32, p)
++#endif
++
++#ifndef AV_RN64
++#   define AV_RN64(p) AV_RN(64, p)
++#endif
++
++#ifndef AV_WN16
++#   define AV_WN16(p, v) AV_WN(16, p, v)
++#endif
++
++#ifndef AV_WN32
++#   define AV_WN32(p, v) AV_WN(32, p, v)
++#endif
++
++#ifndef AV_WN64
++#   define AV_WN64(p, v) AV_WN(64, p, v)
++#endif
++
++#ifdef WORDS_BIGENDIAN
++#   define AV_RB(s, p)    AV_RN(s, p)
++#   define AV_WB(s, p, v) AV_WN(s, p, v)
++#   define AV_RL(s, p)    bswap_##s(AV_RN(s, p))
++#   define AV_WL(s, p, v) AV_WN(s, p, bswap_##s(v))
++#else
++#   define AV_RB(s, p)    bswap_##s(AV_RN(s, p))
++#   define AV_WB(s, p, v) AV_WN(s, p, bswap_##s(v))
++#   define AV_RL(s, p)    AV_RN(s, p)
++#   define AV_WL(s, p, v) AV_WN(s, p, v)
++#endif
++
++#define AV_RB8(x)     (((const uint8_t*)(x))[0])
++#define AV_WB8(p, d)  do { ((uint8_t*)(p))[0] = (d); } while(0)
++
++#define AV_RL8(x)     AV_RB8(x)
++#define AV_WL8(p, d)  AV_WB8(p, d)
++
++#ifndef AV_RB16
++#   define AV_RB16(p)    AV_RB(16, p)
++#endif
++#ifndef AV_WB16
++#   define AV_WB16(p, v) AV_WB(16, p, v)
++#endif
++
++#ifndef AV_RL16
++#   define AV_RL16(p)    AV_RL(16, p)
++#endif
++#ifndef AV_WL16
++#   define AV_WL16(p, v) AV_WL(16, p, v)
++#endif
++
++#ifndef AV_RB32
++#   define AV_RB32(p)    AV_RB(32, p)
++#endif
++#ifndef AV_WB32
++#   define AV_WB32(p, v) AV_WB(32, p, v)
++#endif
++
++#ifndef AV_RL32
++#   define AV_RL32(p)    AV_RL(32, p)
++#endif
++#ifndef AV_WL32
++#   define AV_WL32(p, v) AV_WL(32, p, v)
++#endif
++
++#ifndef AV_RB64
++#   define AV_RB64(p)    AV_RB(64, p)
++#endif
++#ifndef AV_WB64
++#   define AV_WB64(p, v) AV_WB(64, p, v)
++#endif
++
++#ifndef AV_RL64
++#   define AV_RL64(p)    AV_RL(64, p)
++#endif
++#ifndef AV_WL64
++#   define AV_WL64(p, v) AV_WL(64, p, v)
++#endif
+ 
+ #define AV_RB24(x)  ((((const uint8_t*)(x))[0] << 16) | \
+                      (((const uint8_t*)(x))[1] <<  8) | \
+-- 
+1.6.3.3
+
--- ffmpeg-0.5.1.orig/debian/patches/neon/0011-ARM-slightly-faster-NEON-H264-horizontal-loop-filter.patch
+++ ffmpeg-0.5.1/debian/patches/neon/0011-ARM-slightly-faster-NEON-H264-horizontal-loop-filter.patch
@@ -0,0 +1,85 @@
+From 56f78a98e66f1bd2bc29b00a048421e2f1760785 Mon Sep 17 00:00:00 2001
+From: mru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Wed, 17 Jun 2009 22:33:04 +0000
+Subject: [PATCH 11/27] ARM: slightly faster NEON H264 horizontal loop filter
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19216 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+---
+ libavcodec/arm/h264dsp_neon.S |   49 +++++++++++++++++++++--------------------
+ 1 files changed, 25 insertions(+), 24 deletions(-)
+
+diff --git a/libavcodec/arm/h264dsp_neon.S b/libavcodec/arm/h264dsp_neon.S
+index 44a1373..03e21f1 100644
+--- a/libavcodec/arm/h264dsp_neon.S
++++ b/libavcodec/arm/h264dsp_neon.S
+@@ -37,6 +37,13 @@
+         vtrn.8          \r6, \r7
+         .endm
+ 
++        .macro transpose_4x4 r0 r1 r2 r3
++        vtrn.16         \r0, \r2
++        vtrn.16         \r1, \r3
++        vtrn.8          \r0, \r1
++        vtrn.8          \r2, \r3
++        .endm
++
+         .macro swap4 r0 r1 r2 r3 r4 r5 r6 r7
+         vswp            \r0, \r4
+         vswp            \r1, \r5
+@@ -469,35 +476,29 @@ function ff_h264_h_loop_filter_luma_neon, export=1
+         transpose_8x8   q3, q10, q9, q8, q0, q1, q2, q13
+ 
+         align_push_regs
+-        sub             sp,  sp,  #16
+-        vst1.64         {d4, d5},  [sp,:128]
+-        sub             sp,  sp,  #16
+-        vst1.64         {d20,d21}, [sp,:128]
+ 
+         h264_loop_filter_luma
+ 
+-        vld1.64         {d20,d21}, [sp,:128]!
+-        vld1.64         {d4, d5},  [sp,:128]!
+-
+-        transpose_8x8   q3, q10, q4, q8, q0, q5, q2, q13
++        transpose_4x4   q4, q8, q0, q5
+ 
+         sub             r0,  r0,  r1, lsl #4
+-        vst1.64         {d6},  [r0], r1
+-        vst1.64         {d20}, [r0], r1
+-        vst1.64         {d8},  [r0], r1
+-        vst1.64         {d16}, [r0], r1
+-        vst1.64         {d0},  [r0], r1
+-        vst1.64         {d10}, [r0], r1
+-        vst1.64         {d4},  [r0], r1
+-        vst1.64         {d26}, [r0], r1
+-        vst1.64         {d7},  [r0], r1
+-        vst1.64         {d21}, [r0], r1
+-        vst1.64         {d9},  [r0], r1
+-        vst1.64         {d17}, [r0], r1
+-        vst1.64         {d1},  [r0], r1
+-        vst1.64         {d11}, [r0], r1
+-        vst1.64         {d5},  [r0], r1
+-        vst1.64         {d27}, [r0], r1
++        add             r0,  r0,  #2
++        vst1.32         {d8[0]},  [r0], r1
++        vst1.32         {d16[0]}, [r0], r1
++        vst1.32         {d0[0]},  [r0], r1
++        vst1.32         {d10[0]}, [r0], r1
++        vst1.32         {d8[1]},  [r0], r1
++        vst1.32         {d16[1]}, [r0], r1
++        vst1.32         {d0[1]},  [r0], r1
++        vst1.32         {d10[1]}, [r0], r1
++        vst1.32         {d9[0]},  [r0], r1
++        vst1.32         {d17[0]}, [r0], r1
++        vst1.32         {d1[0]},  [r0], r1
++        vst1.32         {d11[0]}, [r0], r1
++        vst1.32         {d9[1]},  [r0], r1
++        vst1.32         {d17[1]}, [r0], r1
++        vst1.32         {d1[1]},  [r0], r1
++        vst1.32         {d11[1]}, [r0], r1
+ 
+         align_pop_regs
+         bx              lr
+-- 
+1.6.3.3
+
--- ffmpeg-0.5.1.orig/debian/patches/neon/0006-ARM-NEON-put_pixels_clamped.patch
+++ ffmpeg-0.5.1/debian/patches/neon/0006-ARM-NEON-put_pixels_clamped.patch
@@ -0,0 +1,69 @@
+From 9744978dd7b9ca9dda0846fa82faf6fa264a52a7 Mon Sep 17 00:00:00 2001
+From: conrad <conrad@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Wed, 29 Apr 2009 11:31:43 +0000
+Subject: [PATCH 06/27] ARM: NEON put_pixels_clamped
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18712 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+---
+ libavcodec/arm/dsputil_neon.c   |    2 ++
+ libavcodec/arm/dsputil_neon_s.S |   24 ++++++++++++++++++++++++
+ 2 files changed, 26 insertions(+), 0 deletions(-)
+
+diff --git a/libavcodec/arm/dsputil_neon.c b/libavcodec/arm/dsputil_neon.c
+index 37425a3..9b95130 100644
+--- a/libavcodec/arm/dsputil_neon.c
++++ b/libavcodec/arm/dsputil_neon.c
+@@ -42,6 +42,7 @@ void ff_put_pixels8_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
+ void ff_avg_pixels16_neon(uint8_t *, const uint8_t *, int, int);
+ 
+ void ff_add_pixels_clamped_neon(const DCTELEM *, uint8_t *, int);
++void ff_put_pixels_clamped_neon(const DCTELEM *, uint8_t *, int);
+ void ff_put_signed_pixels_clamped_neon(const DCTELEM *, uint8_t *, int);
+ 
+ void ff_put_h264_qpel16_mc00_neon(uint8_t *, uint8_t *, int);
+@@ -180,6 +181,7 @@ void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx)
+     c->avg_pixels_tab[0][0] = ff_avg_pixels16_neon;
+ 
+     c->add_pixels_clamped = ff_add_pixels_clamped_neon;
++    c->put_pixels_clamped = ff_put_pixels_clamped_neon;
+     c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_neon;
+ 
+     c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_neon;
+diff --git a/libavcodec/arm/dsputil_neon_s.S b/libavcodec/arm/dsputil_neon_s.S
+index f16293d..a55e05f 100644
+--- a/libavcodec/arm/dsputil_neon_s.S
++++ b/libavcodec/arm/dsputil_neon_s.S
+@@ -273,6 +273,30 @@ function ff_put_h264_qpel8_mc00_neon, export=1
+         pixfunc2 put_ pixels8_y2,   _no_rnd, vhadd.u8
+         pixfunc2 put_ pixels8_xy2,  _no_rnd, vshrn.u16, 1
+ 
++function ff_put_pixels_clamped_neon, export=1
++        vld1.64         {d16-d19}, [r0,:128]!
++        vqmovun.s16     d0, q8
++        vld1.64         {d20-d23}, [r0,:128]!
++        vqmovun.s16     d1, q9
++        vld1.64         {d24-d27}, [r0,:128]!
++        vqmovun.s16     d2, q10
++        vld1.64         {d28-d31}, [r0,:128]!
++        vqmovun.s16     d3, q11
++        vst1.64         {d0},      [r1,:64], r2
++        vqmovun.s16     d4, q12
++        vst1.64         {d1},      [r1,:64], r2
++        vqmovun.s16     d5, q13
++        vst1.64         {d2},      [r1,:64], r2
++        vqmovun.s16     d6, q14
++        vst1.64         {d3},      [r1,:64], r2
++        vqmovun.s16     d7, q15
++        vst1.64         {d4},      [r1,:64], r2
++        vst1.64         {d5},      [r1,:64], r2
++        vst1.64         {d6},      [r1,:64], r2
++        vst1.64         {d7},      [r1,:64], r2
++        bx              lr
++        .endfunc
++
+ function ff_put_signed_pixels_clamped_neon, export=1
+         vmov.u8         d31, #128
+         vld1.64         {d16-d17}, [r0,:128]!
+-- 
+1.6.3.3
+
--- ffmpeg-0.5.1.orig/debian/patches/neon/0017-ARM-faster-NEON-IMDCT.patch
+++ ffmpeg-0.5.1/debian/patches/neon/0017-ARM-faster-NEON-IMDCT.patch
@@ -0,0 +1,103 @@
+From d49bcbe5ba20f6130b2dcad078b0ee27b2660a8f Mon Sep 17 00:00:00 2001
+From: mru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Fri, 11 Sep 2009 02:01:18 +0000
+Subject: [PATCH 17/27] ARM: faster NEON IMDCT
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19817 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+---
+ libavcodec/arm/mdct_neon.S |   46 ++++++++++++++++---------------------------
+ 1 files changed, 17 insertions(+), 29 deletions(-)
+
+diff --git a/libavcodec/arm/mdct_neon.S b/libavcodec/arm/mdct_neon.S
+index 6d1dcfd..d84eccd 100644
+--- a/libavcodec/arm/mdct_neon.S
++++ b/libavcodec/arm/mdct_neon.S
+@@ -38,30 +38,28 @@ function ff_imdct_half_neon, export=1
+         mov             r12,  #-16
+         sub             r7,  r7,  #16
+ 
+-        vld1.32         {d16-d17},[r7,:128],r12 @ d16=x,n1 d17=x,n0
+-        vld1.32         {d0-d1},  [r2,:128]!    @ d0 =m0,x d1 =m1,x
++        vld2.32         {d16-d17},[r7,:128],r12 @ d16=x,n1 d17=x,n0
++        vld2.32         {d0-d1},  [r2,:128]!    @ d0 =m0,x d1 =m1,x
++        vrev64.32       d17, d17
+         vld1.32         {d2},     [r4,:64]!     @ d2=c0,c1
++        vmul.f32        d6,  d17, d2
+         vld1.32         {d3},     [r5,:64]!     @ d3=s0,s1
+-        vuzp.32         d17, d16
+-        vuzp.32         d0,  d1
+-        vmul.f32        d6,  d16, d2
+         vmul.f32        d7,  d0,  d2
+ 1:
+         subs            lr,  lr,  #2
+         ldr             r6,  [r3], #4
+         vmul.f32        d4,  d0,  d3
+-        vmul.f32        d5,  d16, d3
++        vmul.f32        d5,  d17, d3
+         vsub.f32        d4,  d6,  d4
+         vadd.f32        d5,  d5,  d7
+         uxtah           r8,  r1,  r6,  ror #16
+         uxtah           r6,  r1,  r6
+         beq             1f
+-        vld1.32         {d16-d17},[r7,:128],r12
+-        vld1.32         {d0-d1},  [r2,:128]!
+-        vuzp.32         d17, d16
++        vld2.32         {d16-d17},[r7,:128],r12
++        vld2.32         {d0-d1},  [r2,:128]!
++        vrev64.32       d17, d17
+         vld1.32         {d2},     [r4,:64]!
+-        vuzp.32         d0,  d1
+-        vmul.f32        d6,  d16, d2
++        vmul.f32        d6,  d17, d2
+         vld1.32         {d3},     [r5,:64]!
+         vmul.f32        d7,  d0,  d2
+         vst2.32         {d4[0],d5[0]}, [r6,:64]
+@@ -95,11 +93,9 @@ function ff_imdct_half_neon, export=1
+         mov             r8,  r6
+         mov             r0,  r3
+ 
+-        vld1.32         {d0-d1},  [r3,:128], r7 @ d0 =i1,r1 d1 =i0,r0
+-        vld1.32         {d20-d21},[r6,:128]!    @ d20=i2,r2 d21=i3,r3
++        vld2.32         {d0-d1},  [r3,:128], r7 @ d0 =i1,r1 d1 =i0,r0
++        vld2.32         {d20-d21},[r6,:128]!    @ d20=i2,r2 d21=i3,r3
+         vld1.32         {d18},    [r2,:64], r12 @ d18=s1,s0
+-        vuzp.32         d20, d21
+-        vuzp.32         d0,  d1
+ 1:
+         subs            lr,  lr,  #2
+         vmul.f32        d7,  d0,  d18
+@@ -118,25 +114,17 @@ function ff_imdct_half_neon, export=1
+         vsub.f32        d4,  d4,  d24
+         vsub.f32        d5,  d5,  d25
+         beq             1f
+-        vld1.32         {d0-d1},  [r3,:128], r7
+-        vld1.32         {d20-d21},[r6,:128]!
++        vld2.32         {d0-d1},  [r3,:128], r7
++        vld2.32         {d20-d21},[r6,:128]!
+         vld1.32         {d18},    [r2,:64], r12
+-        vuzp.32         d20, d21
+-        vuzp.32         d0,  d1
+         vrev64.32       q3,  q3
+-        vtrn.32         d4,  d6
+-        vtrn.32         d5,  d7
+-        vswp            d5,  d6
+-        vst1.32         {d4-d5},  [r0,:128], r7
+-        vst1.32         {d6-d7},  [r8,:128]!
++        vst2.32         {d4,d6},  [r0,:128], r7
++        vst2.32         {d5,d7},  [r8,:128]!
+         b               1b
+ 1:
+         vrev64.32       q3,  q3
+-        vtrn.32         d4,  d6
+-        vtrn.32         d5,  d7
+-        vswp            d5,  d6
+-        vst1.32         {d4-d5},  [r0,:128]
+-        vst1.32         {d6-d7},  [r8,:128]
++        vst2.32         {d4,d6},  [r0,:128]
++        vst2.32         {d5,d7},  [r8,:128]
+ 
+         pop             {r4-r8,pc}
+ .endfunc
+-- 
+1.6.3.3
+
--- ffmpeg-0.5.1.orig/debian/patches/neon/0013-ARM-NEON-VP3-IDCT.patch
+++ ffmpeg-0.5.1/debian/patches/neon/0013-ARM-NEON-VP3-IDCT.patch
@@ -0,0 +1,340 @@
+From 2056fee95d5b017aad91df30e68d1cec96ddfeb6 Mon Sep 17 00:00:00 2001
+From: conrad <conrad@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Sat, 4 Jul 2009 20:41:11 +0000
+Subject: [PATCH 13/27] ARM: NEON VP3 IDCT
+ 15% faster VP3/Theora, 10% faster VP6
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19345 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+---
+ libavcodec/arm/dsputil_arm.c |   10 ++
+ libavcodec/arm/vp3dsp_neon.S |  282 ++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 292 insertions(+), 0 deletions(-)
+
+diff --git a/libavcodec/arm/dsputil_arm.c b/libavcodec/arm/dsputil_arm.c
+index c8a277e..c0ab0c9 100644
+--- a/libavcodec/arm/dsputil_arm.c
++++ b/libavcodec/arm/dsputil_arm.c
+@@ -43,6 +43,10 @@ void ff_simple_idct_neon(DCTELEM *data);
+ void ff_simple_idct_put_neon(uint8_t *dest, int line_size, DCTELEM *data);
+ void ff_simple_idct_add_neon(uint8_t *dest, int line_size, DCTELEM *data);
+ 
++void ff_vp3_idct_neon(DCTELEM *data);
++void ff_vp3_idct_put_neon(uint8_t *dest, int line_size, DCTELEM *data);
++void ff_vp3_idct_add_neon(uint8_t *dest, int line_size, DCTELEM *data);
++
+ /* XXX: local hack */
+ static void (*ff_put_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size);
+ static void (*ff_add_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size);
+@@ -180,6 +184,12 @@ void dsputil_init_arm(DSPContext* c, AVCodecContext *avctx)
+             c->idct_add= ff_simple_idct_add_neon;
+             c->idct    = ff_simple_idct_neon;
+             c->idct_permutation_type = FF_PARTTRANS_IDCT_PERM;
++        } else if ((CONFIG_VP3_DECODER || CONFIG_VP5_DECODER || CONFIG_VP6_DECODER || CONFIG_THEORA_DECODER) &&
++                   idct_algo==FF_IDCT_VP3){
++            c->idct_put= ff_vp3_idct_put_neon;
++            c->idct_add= ff_vp3_idct_add_neon;
++            c->idct    = ff_vp3_idct_neon;
++            c->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM;
+ #endif
+         }
+     }
+diff --git a/libavcodec/arm/vp3dsp_neon.S b/libavcodec/arm/vp3dsp_neon.S
+index cce80dd..b2e16f4 100644
+--- a/libavcodec/arm/vp3dsp_neon.S
++++ b/libavcodec/arm/vp3dsp_neon.S
+@@ -20,6 +20,22 @@
+ 
+ #include "asm.S"
+ 
++.section .rodata
++.align 4
++
++vp3_idct_constants:
++.short 64277, 60547, 54491, 46341, 36410, 25080, 12785
++
++#define xC1S7 d0[0]
++#define xC2S6 d0[1]
++#define xC3S5 d0[2]
++#define xC4S4 d0[3]
++#define xC5S3 d1[0]
++#define xC6S2 d1[1]
++#define xC7S1 d1[2]
++
++.text
++
+ .macro vp3_loop_filter
+     vsubl.u8        q3,  d18, d17
+     vsubl.u8        q2,  d16, d19
+@@ -92,3 +108,269 @@ function ff_vp3_h_loop_filter_neon, export=1
+     vst1.16         {d1[3]}, [ip], r1
+     bx              lr
+ .endfunc
++
++
++function vp3_idct_start_neon
++    vpush           {d8-d15}
++    movrel          r3,  vp3_idct_constants
++    vld1.64         {d0-d1},   [r3,:128]
++    vld1.64         {d16-d19}, [r2,:128]!
++    vld1.64         {d20-d23}, [r2,:128]!
++    vld1.64         {d24-d27}, [r2,:128]!
++    vadd.s16        q1,  q8,  q12
++    vsub.s16        q8,  q8,  q12
++    vld1.64         {d28-d31}, [r2,:128]!
++.endfunc
++
++function vp3_idct_core_neon
++    vmull.s16       q2,  d18, xC1S7     // (ip[1] * C1) << 16
++    vmull.s16       q3,  d19, xC1S7
++    vmull.s16       q4,  d2,  xC4S4     // ((ip[0] + ip[4]) * C4) << 16
++    vmull.s16       q5,  d3,  xC4S4
++    vmull.s16       q6,  d16, xC4S4     // ((ip[0] - ip[4]) * C4) << 16
++    vmull.s16       q7,  d17, xC4S4
++    vshrn.s32       d4,  q2,  #16
++    vshrn.s32       d5,  q3,  #16
++    vshrn.s32       d6,  q4,  #16
++    vshrn.s32       d7,  q5,  #16
++    vshrn.s32       d8,  q6,  #16
++    vshrn.s32       d9,  q7,  #16
++    vadd.s16        q12, q1,  q3        // E = (ip[0] + ip[4]) * C4
++    vadd.s16        q8,  q8,  q4        // F = (ip[0] - ip[4]) * C4
++    vadd.s16        q1,  q2,  q9        // ip[1] * C1
++
++    vmull.s16       q2,  d30, xC1S7     // (ip[7] * C1) << 16
++    vmull.s16       q3,  d31, xC1S7
++    vmull.s16       q4,  d30, xC7S1     // (ip[7] * C7) << 16
++    vmull.s16       q5,  d31, xC7S1
++    vmull.s16       q6,  d18, xC7S1     // (ip[1] * C7) << 16
++    vmull.s16       q7,  d19, xC7S1
++    vshrn.s32       d4,  q2,  #16
++    vshrn.s32       d5,  q3,  #16
++    vshrn.s32       d6,  q4,  #16       // ip[7] * C7
++    vshrn.s32       d7,  q5,  #16
++    vshrn.s32       d8,  q6,  #16       // ip[1] * C7
++    vshrn.s32       d9,  q7,  #16
++    vadd.s16        q2,  q2,  q15       // ip[7] * C1
++    vadd.s16        q9,  q1,  q3        // A = ip[1] * C1 + ip[7] * C7
++    vsub.s16        q15, q4,  q2        // B = ip[1] * C7 - ip[7] * C1
++
++    vmull.s16       q2,  d22, xC5S3     // (ip[3] * C5) << 16
++    vmull.s16       q3,  d23, xC5S3
++    vmull.s16       q4,  d22, xC3S5     // (ip[3] * C3) << 16
++    vmull.s16       q5,  d23, xC3S5
++    vmull.s16       q6,  d26, xC5S3     // (ip[5] * C5) << 16
++    vmull.s16       q7,  d27, xC5S3
++    vshrn.s32       d4,  q2,  #16
++    vshrn.s32       d5,  q3,  #16
++    vshrn.s32       d6,  q4,  #16
++    vshrn.s32       d7,  q5,  #16
++    vshrn.s32       d8,  q6,  #16
++    vshrn.s32       d9,  q7,  #16
++    vadd.s16        q3,  q3,  q11       // ip[3] * C3
++    vadd.s16        q4,  q4,  q13       // ip[5] * C5
++    vadd.s16        q1,  q2,  q11       // ip[3] * C5
++    vadd.s16        q11, q3,  q4        // C = ip[3] * C3 + ip[5] * C5
++
++    vmull.s16       q2,  d26, xC3S5     // (ip[5] * C3) << 16
++    vmull.s16       q3,  d27, xC3S5
++    vmull.s16       q4,  d20, xC2S6     // (ip[2] * C2) << 16
++    vmull.s16       q5,  d21, xC2S6
++    vmull.s16       q6,  d28, xC6S2     // (ip[6] * C6) << 16
++    vmull.s16       q7,  d29, xC6S2
++    vshrn.s32       d4,  q2,  #16
++    vshrn.s32       d5,  q3,  #16
++    vshrn.s32       d6,  q4,  #16
++    vshrn.s32       d7,  q5,  #16
++    vshrn.s32       d8,  q6,  #16       // ip[6] * C6
++    vshrn.s32       d9,  q7,  #16
++    vadd.s16        q2,  q2,  q13       // ip[5] * C3
++    vadd.s16        q3,  q3,  q10       // ip[2] * C2
++    vsub.s16        q13, q2,  q1        // D = ip[5] * C3 - ip[3] * C5
++    vsub.s16        q1,  q9,  q11       // (A - C)
++    vadd.s16        q11, q9,  q11       // Cd = A + C
++    vsub.s16        q9,  q15, q13       // (B - D)
++    vadd.s16        q13, q15, q13       // Dd = B + D
++    vadd.s16        q15, q3,  q4        // G = ip[2] * C2 + ip[6] * C6
++
++    vmull.s16       q2,  d2,  xC4S4     // ((A - C) * C4) << 16
++    vmull.s16       q3,  d3,  xC4S4
++    vmull.s16       q4,  d28, xC2S6     // (ip[6] * C2) << 16
++    vmull.s16       q5,  d29, xC2S6
++    vmull.s16       q6,  d20, xC6S2     // (ip[2] * C6) << 16
++    vmull.s16       q7,  d21, xC6S2
++    vshrn.s32       d4,  q2,  #16
++    vshrn.s32       d5,  q3,  #16
++    vshrn.s32       d6,  q4,  #16
++    vshrn.s32       d7,  q5,  #16
++    vshrn.s32       d8,  q6,  #16       // ip[2] * C6
++    vmull.s16       q5,  d18, xC4S4     // ((B - D) * C4) << 16
++    vmull.s16       q6,  d19, xC4S4
++    vshrn.s32       d9,  q7,  #16
++    vadd.s16        q3,  q3,  q14       // ip[6] * C2
++    vadd.s16        q10, q1,  q2        // Ad = (A - C) * C4
++    vsub.s16        q14, q4,  q3        // H = ip[2] * C6 - ip[6] * C2
++    bx              lr
++.endfunc
++
++.macro VP3_IDCT_END type
++function vp3_idct_end_\type\()_neon
++.ifc \type, col
++    vdup.16         q0,  r3
++    vadd.s16        q12, q12, q0
++    vadd.s16        q8,  q8,  q0
++.endif
++
++    vshrn.s32       d2,  q5,  #16
++    vshrn.s32       d3,  q6,  #16
++    vadd.s16        q2,  q12, q15       // Gd  = E + G
++    vadd.s16        q9,  q1,  q9        // (B - D) * C4
++    vsub.s16        q12, q12, q15       // Ed  = E - G
++    vsub.s16        q3,  q8,  q10       // Fd  = F - Ad
++    vadd.s16        q10, q8,  q10       // Add = F + Ad
++    vadd.s16        q4,  q9,  q14       // Hd  = Bd + H
++    vsub.s16        q14, q9,  q14       // Bdd = Bd - H
++    vadd.s16        q8,  q2,  q11       // [0] = Gd + Cd
++    vsub.s16        q15, q2,  q11       // [7] = Gd - Cd
++    vadd.s16        q9,  q10, q4        // [1] = Add + Hd
++    vsub.s16        q10, q10, q4        // [2] = Add - Hd
++    vadd.s16        q11, q12, q13       // [3] = Ed + Dd
++    vsub.s16        q12, q12, q13       // [4] = Ed - Dd
++.ifc \type, row
++    vtrn.16         q8,  q9
++.endif
++    vadd.s16        q13, q3,  q14       // [5] = Fd + Bdd
++    vsub.s16        q14, q3,  q14       // [6] = Fd - Bdd
++
++.ifc \type, row
++    // 8x8 transpose
++    vtrn.16         q10, q11
++    vtrn.16         q12, q13
++    vtrn.16         q14, q15
++    vtrn.32         q8,  q10
++    vtrn.32         q9,  q11
++    vtrn.32         q12, q14
++    vtrn.32         q13, q15
++    vswp            d17, d24
++    vswp            d19, d26
++    vadd.s16        q1,  q8,  q12
++    vswp            d21, d28
++    vsub.s16        q8,  q8,  q12
++    vswp            d23, d30
++.endif
++    bx              lr
++.endfunc
++.endm
++
++VP3_IDCT_END row
++VP3_IDCT_END col
++
++function ff_vp3_idct_neon, export=1
++    mov             ip,  lr
++    mov             r2,  r0
++    bl              vp3_idct_start_neon
++    bl              vp3_idct_end_row_neon
++    mov             r3,  #8
++    bl              vp3_idct_core_neon
++    bl              vp3_idct_end_col_neon
++    mov             lr,  ip
++    vpop            {d8-d15}
++
++    vshr.s16        q8,  q8,  #4
++    vshr.s16        q9,  q9,  #4
++    vshr.s16        q10, q10, #4
++    vshr.s16        q11, q11, #4
++    vshr.s16        q12, q12, #4
++    vst1.64         {d16-d19}, [r0,:128]!
++    vshr.s16        q13, q13, #4
++    vshr.s16        q14, q14, #4
++    vst1.64         {d20-d23}, [r0,:128]!
++    vshr.s16        q15, q15, #4
++    vst1.64         {d24-d27}, [r0,:128]!
++    vst1.64         {d28-d31}, [r0,:128]!
++    bx              lr
++.endfunc
++
++function ff_vp3_idct_put_neon, export=1
++    mov             ip,  lr
++    bl              vp3_idct_start_neon
++    bl              vp3_idct_end_row_neon
++    mov             r3,  #8
++    add             r3,  r3,  #2048         // convert signed pixel to unsigned
++    bl              vp3_idct_core_neon
++    bl              vp3_idct_end_col_neon
++    mov             lr,  ip
++    vpop            {d8-d15}
++
++    vqshrun.s16     d0,  q8,  #4
++    vqshrun.s16     d1,  q9,  #4
++    vqshrun.s16     d2,  q10, #4
++    vqshrun.s16     d3,  q11, #4
++    vst1.64         {d0}, [r0,:64], r1
++    vqshrun.s16     d4,  q12, #4
++    vst1.64         {d1}, [r0,:64], r1
++    vqshrun.s16     d5,  q13, #4
++    vst1.64         {d2}, [r0,:64], r1
++    vqshrun.s16     d6,  q14, #4
++    vst1.64         {d3}, [r0,:64], r1
++    vqshrun.s16     d7,  q15, #4
++    vst1.64         {d4}, [r0,:64], r1
++    vst1.64         {d5}, [r0,:64], r1
++    vst1.64         {d6}, [r0,:64], r1
++    vst1.64         {d7}, [r0,:64], r1
++    bx              lr
++.endfunc
++
++function ff_vp3_idct_add_neon, export=1
++    mov             ip,  lr
++    bl              vp3_idct_start_neon
++    bl              vp3_idct_end_row_neon
++    mov             r3,  #8
++    bl              vp3_idct_core_neon
++    bl              vp3_idct_end_col_neon
++    mov             lr,  ip
++    vpop            {d8-d15}
++    mov             r2,  r0
++
++    vld1.64         {d0}, [r0,:64], r1
++    vshr.s16        q8,  q8,  #4
++    vld1.64         {d1}, [r0,:64], r1
++    vshr.s16        q9,  q9,  #4
++    vld1.64         {d2}, [r0,:64], r1
++    vaddw.u8        q8,  q8,  d0
++    vld1.64         {d3}, [r0,:64], r1
++    vaddw.u8        q9,  q9,  d1
++    vld1.64         {d4}, [r0,:64], r1
++    vshr.s16        q10, q10, #4
++    vld1.64         {d5}, [r0,:64], r1
++    vshr.s16        q11, q11, #4
++    vld1.64         {d6}, [r0,:64], r1
++    vqmovun.s16     d0,  q8
++    vld1.64         {d7}, [r0,:64], r1
++    vqmovun.s16     d1,  q9
++    vaddw.u8        q10, q10, d2
++    vaddw.u8        q11, q11, d3
++    vshr.s16        q12, q12, #4
++    vshr.s16        q13, q13, #4
++    vqmovun.s16     d2,  q10
++    vqmovun.s16     d3,  q11
++    vaddw.u8        q12, q12, d4
++    vaddw.u8        q13, q13, d5
++    vshr.s16        q14, q14, #4
++    vshr.s16        q15, q15, #4
++    vst1.64         {d0}, [r2,:64], r1
++    vqmovun.s16     d4,  q12
++    vst1.64         {d1}, [r2,:64], r1
++    vqmovun.s16     d5,  q13
++    vst1.64         {d2}, [r2,:64], r1
++    vaddw.u8        q14, q14, d6
++    vst1.64         {d3}, [r2,:64], r1
++    vaddw.u8        q15, q15, d7
++    vst1.64         {d4}, [r2,:64], r1
++    vqmovun.s16     d6,  q14
++    vst1.64         {d5}, [r2,:64], r1
++    vqmovun.s16     d7,  q15
++    vst1.64         {d6}, [r2,:64], r1
++    vst1.64         {d7}, [r2,:64], r1
++    bx              lr
++.endfunc
+-- 
+1.6.3.3
+
--- ffmpeg-0.5.1.orig/debian/patches/neon/0014-ARM-NEON-optimised-vorbis_inverse_coupling.patch
+++ ffmpeg-0.5.1/debian/patches/neon/0014-ARM-NEON-optimised-vorbis_inverse_coupling.patch
@@ -0,0 +1,116 @@
+From d32e115cb8c43fe4531567b1c668dba6dc76274d Mon Sep 17 00:00:00 2001
+From: mru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Fri, 14 Aug 2009 01:02:06 +0000
+Subject: [PATCH 14/27] ARM: NEON optimised vorbis_inverse_coupling
+
+12% faster Vorbis decoding on Cortex-A8.
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19637 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+---
+ libavcodec/arm/dsputil_neon.c   |    5 +++
+ libavcodec/arm/dsputil_neon_s.S |   64 +++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 69 insertions(+), 0 deletions(-)
+
+diff --git a/libavcodec/arm/dsputil_neon.c b/libavcodec/arm/dsputil_neon.c
+index 20425c1..eb9aba1 100644
+--- a/libavcodec/arm/dsputil_neon.c
++++ b/libavcodec/arm/dsputil_neon.c
+@@ -161,6 +161,8 @@ void ff_vector_fmul_window_neon(float *dst, const float *src0,
+ void ff_float_to_int16_neon(int16_t *, const float *, long);
+ void ff_float_to_int16_interleave_neon(int16_t *, const float **, long, int);
+ 
++void ff_vorbis_inverse_coupling_neon(float *mag, float *ang, int blocksize);
++
+ void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx)
+ {
+     c->put_pixels_tab[0][0] = ff_put_pixels16_neon;
+@@ -270,4 +272,7 @@ void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx)
+         c->float_to_int16 = ff_float_to_int16_neon;
+         c->float_to_int16_interleave = ff_float_to_int16_interleave_neon;
+     }
++
++    if (CONFIG_VORBIS_DECODER)
++        c->vorbis_inverse_coupling = ff_vorbis_inverse_coupling_neon;
+ }
+diff --git a/libavcodec/arm/dsputil_neon_s.S b/libavcodec/arm/dsputil_neon_s.S
+index 303b11c..2bc07fa 100644
+--- a/libavcodec/arm/dsputil_neon_s.S
++++ b/libavcodec/arm/dsputil_neon_s.S
+@@ -19,6 +19,7 @@
+  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+  */
+ 
++#include "config.h"
+ #include "asm.S"
+ 
+         preserve8
+@@ -793,3 +794,66 @@ function ff_vector_fmul_window_neon, export=1
+         vst1.64         {d22,d23},[ip,:128], r5
+         pop             {r4,r5,pc}
+         .endfunc
++
++#if CONFIG_VORBIS_DECODER
++function ff_vorbis_inverse_coupling_neon, export=1
++        vmov.i32        q10, #1<<31
++        subs            r2,  r2,  #4
++        tst             r2,  #4
++        mov             r3,  r0
++        mov             r12, r1
++        beq             3f
++
++        vld1.32         {d24-d25},[r1,:128]!
++        vld1.32         {d22-d23},[r0,:128]!
++        vcle.s32        q8,  q12, #0
++        vand            q9,  q11, q10
++        veor            q12, q12, q9
++        vand            q2,  q12, q8
++        vbic            q3,  q12, q8
++        vadd.f32        q12, q11, q2
++        vsub.f32        q11, q11, q3
++1:      vld1.32         {d2-d3},  [r1,:128]!
++        vld1.32         {d0-d1},  [r0,:128]!
++        vcle.s32        q8,  q1,  #0
++        vand            q9,  q0,  q10
++        veor            q1,  q1,  q9
++        vst1.32         {d24-d25},[r3, :128]!
++        vst1.32         {d22-d23},[r12,:128]!
++        vand            q2,  q1,  q8
++        vbic            q3,  q1,  q8
++        vadd.f32        q1,  q0,  q2
++        vsub.f32        q0,  q0,  q3
++        subs            r2,  r2,  #8
++        ble             2f
++        vld1.32         {d24-d25},[r1,:128]!
++        vld1.32         {d22-d23},[r0,:128]!
++        vcle.s32        q8,  q12, #0
++        vand            q9,  q11, q10
++        veor            q12, q12, q9
++        vst1.32         {d2-d3},  [r3, :128]!
++        vst1.32         {d0-d1},  [r12,:128]!
++        vand            q2,  q12, q8
++        vbic            q3,  q12, q8
++        vadd.f32        q12, q11, q2
++        vsub.f32        q11, q11, q3
++        b               1b
++
++2:      vst1.32         {d2-d3},  [r3, :128]!
++        vst1.32         {d0-d1},  [r12,:128]!
++        bxlt            lr
++
++3:      vld1.32         {d2-d3},  [r1,:128]
++        vld1.32         {d0-d1},  [r0,:128]
++        vcle.s32        q8,  q1,  #0
++        vand            q9,  q0,  q10
++        veor            q1,  q1,  q9
++        vand            q2,  q1,  q8
++        vbic            q3,  q1,  q8
++        vadd.f32        q1,  q0,  q2
++        vsub.f32        q0,  q0,  q3
++        vst1.32         {d2-d3},  [r0,:128]!
++        vst1.32         {d0-d1},  [r1,:128]!
++        bx              lr
++        .endfunc
++#endif
+-- 
+1.6.3.3
+
--- ffmpeg-0.5.1.orig/debian/patches/neon/0019-ARM-NEON-optimised-MDCT.patch
+++ ffmpeg-0.5.1/debian/patches/neon/0019-ARM-NEON-optimised-MDCT.patch
@@ -0,0 +1,207 @@
+From 2b3356ebb1f7b4b69d922e0bdfc9f5e631cf4793 Mon Sep 17 00:00:00 2001
+From: mru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Fri, 11 Sep 2009 02:24:22 +0000
+Subject: [PATCH 19/27] ARM: NEON optimised MDCT
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19819 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+---
+ libavcodec/arm/mdct_neon.S |  160 ++++++++++++++++++++++++++++++++++++++++++++
+ libavcodec/dsputil.h       |    1 +
+ libavcodec/fft.c           |    1 +
+ 3 files changed, 162 insertions(+), 0 deletions(-)
+
+diff --git a/libavcodec/arm/mdct_neon.S b/libavcodec/arm/mdct_neon.S
+index d84eccd..26ac199 100644
+--- a/libavcodec/arm/mdct_neon.S
++++ b/libavcodec/arm/mdct_neon.S
+@@ -164,3 +164,163 @@ function ff_imdct_calc_neon, export=1
+ 
+         pop             {r4-r6,pc}
+ .endfunc
++
++function ff_mdct_calc_neon, export=1
++        push            {r4-r10,lr}
++
++        mov             r12, #1
++        ldr             lr,  [r0, #4]           @ nbits
++        ldr             r4,  [r0, #8]           @ tcos
++        ldr             r5,  [r0, #12]          @ tsin
++        ldr             r3,  [r0, #24]          @ revtab
++        lsl             lr,  r12, lr            @ n  = 1 << nbits
++        add             r7,  r2,  lr            @ in4u
++        sub             r9,  r7,  #16           @ in4d
++        add             r2,  r7,  lr,  lsl #1   @ in3u
++        add             r8,  r9,  lr,  lsl #1   @ in3d
++        mov             r12, #-16
++
++        vld2.32         {d16,d18},[r9,:128],r12 @ x,x in4d1,in4d0
++        vld2.32         {d17,d19},[r8,:128],r12 @ x,x in3d1,in3d0
++        vld2.32         {d20,d21},[r7,:128]!    @ in4u0,in4u1 x,x
++        vrev64.32       q9,  q9                 @ in4d0,in4d1 in3d0,in3d1
++        vld2.32         {d0, d1}, [r2,:128]!    @ in3u0,in3u1 x,x
++        vsub.f32        d20, d18, d20           @ in4d-in4u      I
++        vld1.32         {d2},     [r4,:64]!     @ c0,c1
++        vadd.f32        d0,  d0,  d19           @ in3u+in3d     -R
++        vld1.32         {d3},     [r5,:64]!     @ s0,s1
++1:
++        vmul.f32        d7,  d20, d3            @  I*s
++        vmul.f32        d6,  d0,  d2            @ -R*c
++        ldr             r6,  [r3], #4
++        vmul.f32        d4,  d0,  d3            @ -R*s
++        vmul.f32        d5,  d20, d2            @  I*c
++        subs            lr,  lr,  #16
++        vsub.f32        d6,  d6,  d7            @ -R*c-I*s
++        vadd.f32        d7,  d4,  d5            @ -R*s+I*c
++        uxtah           r10, r1,  r6,  ror #16
++        uxtah           r6,  r1,  r6
++        beq             1f
++        vld2.32         {d16,d18},[r9,:128],r12 @ x,x in4d1,in4d0
++        vld2.32         {d17,d19},[r8,:128],r12 @ x,x in3d1,in3d0
++        vneg.f32        d7,  d7                 @  R*s-I*c
++        vld2.32         {d20,d21},[r7,:128]!    @ in4u0,in4u1 x,x
++        vrev64.32       q9,  q9                 @ in4d0,in4d1 in3d0,in3d1
++        vld2.32         {d0, d1}, [r2,:128]!    @ in3u0,in3u1 x,x
++        vsub.f32        d20, d18, d20           @ in4d-in4u      I
++        vld1.32         {d2},     [r4,:64]!     @ c0,c1
++        vadd.f32        d0,  d0,  d19           @ in3u+in3d     -R
++        vld1.32         {d3},     [r5,:64]!     @ s0,s1
++        vst2.32         {d6[0],d7[0]}, [r6,:64]
++        vst2.32         {d6[1],d7[1]}, [r10,:64]
++        b               1b
++1:
++        vneg.f32        d7,  d7                 @  R*s-I*c
++        vst2.32         {d6[0],d7[0]}, [r6,:64]
++        vst2.32         {d6[1],d7[1]}, [r10,:64]
++
++        mov             r12, #1
++        ldr             lr,  [r0, #4]           @ nbits
++        lsl             lr,  r12, lr            @ n  = 1 << nbits
++        sub             r8,  r2,  #16           @ in1d
++        add             r2,  r9,  #16           @ in0u
++        sub             r9,  r7,  #16           @ in2d
++        mov             r12, #-16
++
++        vld2.32         {d16,d18},[r9,:128],r12 @ x,x in2d1,in2d0
++        vld2.32         {d17,d19},[r8,:128],r12 @ x,x in1d1,in1d0
++        vld2.32         {d20,d21},[r7,:128]!    @ in2u0,in2u1 x,x
++        vrev64.32       q9,  q9                 @ in2d0,in2d1 in1d0,in1d1
++        vld2.32         {d0, d1}, [r2,:128]!    @ in0u0,in0u1 x,x
++        vsub.f32        d0,  d0,  d18           @ in0u-in2d      R
++        vld1.32         {d2},     [r4,:64]!     @ c0,c1
++        vadd.f32        d20, d20, d19           @ in2u+in1d     -I
++        vld1.32         {d3},     [r5,:64]!     @ s0,s1
++1:
++        vmul.f32        d6,  d0,  d2            @  R*c
++        vmul.f32        d7,  d20, d3            @ -I*s
++        ldr             r6,  [r3], #4
++        vmul.f32        d4,  d0,  d3            @ R*s
++        vmul.f32        d5,  d20, d2            @ I*c
++        subs            lr,  lr,  #16
++        vsub.f32        d6,  d7,  d6            @ I*s-R*c
++        vadd.f32        d7,  d4,  d5            @ R*s-I*c
++        uxtah           r10, r1,  r6,  ror #16
++        uxtah           r6,  r1,  r6
++        beq             1f
++        vld2.32         {d16,d18},[r9,:128],r12 @ x,x in2d1,in2d0
++        vld2.32         {d17,d19},[r8,:128],r12 @ x,x in1d1,in1d0
++        vld2.32         {d20,d21},[r7,:128]!    @ in2u0,in2u1 x,x
++        vrev64.32       q9,  q9                 @ in2d0,in2d1 in1d0,in1d1
++        vld2.32         {d0, d1}, [r2,:128]!    @ in0u0,in0u1 x,x
++        vsub.f32        d0,  d0,  d18           @ in0u-in2d      R
++        vld1.32         {d2},     [r4,:64]!     @ c0,c1
++        vadd.f32        d20, d20, d19           @ in2u+in1d     -I
++        vld1.32         {d3},     [r5,:64]!     @ s0,s1
++        vst2.32         {d6[0],d7[0]}, [r6,:64]
++        vst2.32         {d6[1],d7[1]}, [r10,:64]
++        b               1b
++1:
++        vst2.32         {d6[0],d7[0]}, [r6,:64]
++        vst2.32         {d6[1],d7[1]}, [r10,:64]
++
++        mov             r4,  r0
++        mov             r6,  r1
++        add             r0,  r0,  #16
++        bl              ff_fft_calc_neon
++
++        mov             r12, #1
++        ldr             lr,  [r4, #4]           @ nbits
++        ldr             r5,  [r4, #12]          @ tsin
++        ldr             r4,  [r4, #8]           @ tcos
++        lsl             r12, r12, lr            @ n  = 1 << nbits
++        lsr             lr,  r12, #3            @ n8 = n >> 3
++
++        add             r4,  r4,  lr,  lsl #2
++        add             r5,  r5,  lr,  lsl #2
++        add             r6,  r6,  lr,  lsl #3
++        sub             r1,  r4,  #8
++        sub             r2,  r5,  #8
++        sub             r3,  r6,  #16
++
++        mov             r7,  #-16
++        mov             r12, #-8
++        mov             r8,  r6
++        mov             r0,  r3
++
++        vld2.32         {d0-d1},  [r3,:128], r7 @ d0 =r1,i1 d1 =r0,i0
++        vld2.32         {d20-d21},[r6,:128]!    @ d20=r2,i2 d21=r3,i3
++        vld1.32         {d18},    [r2,:64], r12 @ d18=s1,s0
++1:
++        subs            lr,  lr,  #2
++        vmul.f32        d7,  d0,  d18           @ r1*s1,r0*s0
++        vld1.32         {d19},    [r5,:64]!     @ s2,s3
++        vmul.f32        d4,  d1,  d18           @ i1*s1,i0*s0
++        vld1.32         {d16},    [r1,:64], r12 @ c1,c0
++        vmul.f32        d5,  d21, d19           @ i2*s2,i3*s3
++        vld1.32         {d17},    [r4,:64]!     @ c2,c3
++        vmul.f32        d6,  d20, d19           @ r2*s2,r3*s3
++        vmul.f32        d24, d0,  d16           @ r1*c1,r0*c0
++        vmul.f32        d25, d20, d17           @ r2*c2,r3*c3
++        vmul.f32        d22, d21, d17           @ i2*c2,i3*c3
++        vmul.f32        d23, d1,  d16           @ i1*c1,i0*c0
++        vadd.f32        d4,  d4,  d24           @ i1*s1+r1*c1,i0*s0+r0*c0
++        vadd.f32        d5,  d5,  d25           @ i2*s2+r2*c2,i3*s3+r3*c3
++        vsub.f32        d6,  d22, d6            @ i2*c2-r2*s2,i3*c3-r3*s3
++        vsub.f32        d7,  d23, d7            @ i1*c1-r1*s1,i0*c0-r0*s0
++        vneg.f32        q2,  q2
++        beq             1f
++        vld2.32         {d0-d1},  [r3,:128], r7
++        vld2.32         {d20-d21},[r6,:128]!
++        vld1.32         {d18},    [r2,:64], r12
++        vrev64.32       q3,  q3
++        vst2.32         {d4,d6},  [r0,:128], r7
++        vst2.32         {d5,d7},  [r8,:128]!
++        b               1b
++1:
++        vrev64.32       q3,  q3
++        vst2.32         {d4,d6},  [r0,:128]
++        vst2.32         {d5,d7},  [r8,:128]
++
++        pop             {r4-r10,pc}
++.endfunc
+diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
+index e299ade..f89013c 100644
+--- a/libavcodec/dsputil.h
++++ b/libavcodec/dsputil.h
+@@ -778,6 +778,7 @@ void ff_imdct_calc_sse(MDCTContext *s, FFTSample *output, const FFTSample *input
+ void ff_imdct_half_sse(MDCTContext *s, FFTSample *output, const FFTSample *input);
+ void ff_imdct_calc_neon(MDCTContext *s, FFTSample *output, const FFTSample *input);
+ void ff_imdct_half_neon(MDCTContext *s, FFTSample *output, const FFTSample *input);
++void ff_mdct_calc_neon(MDCTContext *s, FFTSample *output, const FFTSample *input);
+ void ff_mdct_end(MDCTContext *s);
+ 
+ /* Real Discrete Fourier Transform */
+diff --git a/libavcodec/fft.c b/libavcodec/fft.c
+index 655acd3..69feb44 100644
+--- a/libavcodec/fft.c
++++ b/libavcodec/fft.c
+@@ -119,6 +119,7 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse)
+     s->fft_calc    = ff_fft_calc_neon;
+     s->imdct_calc  = ff_imdct_calc_neon;
+     s->imdct_half  = ff_imdct_half_neon;
++    s->mdct_calc   = ff_mdct_calc_neon;
+     revtab_shift = 3;
+ #endif
+ 
+-- 
+1.6.3.3
+
--- ffmpeg-0.5.1.orig/debian/patches/neon/0003-Add-guaranteed-alignment-for-loading-dest-pixels-in-.patch
+++ ffmpeg-0.5.1/debian/patches/neon/0003-Add-guaranteed-alignment-for-loading-dest-pixels-in-.patch
@@ -0,0 +1,35 @@
+From ce7bbcc96ff94b2fdfbcff35f517f03512bc147b Mon Sep 17 00:00:00 2001
+From: conrad <conrad@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Thu, 16 Apr 2009 08:39:13 +0000
+Subject: [PATCH 03/27] Add guaranteed alignment for loading dest pixels in avg_pixels16_neon
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18535 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+---
+ libavcodec/arm/dsputil_neon_s.S |    8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libavcodec/arm/dsputil_neon_s.S b/libavcodec/arm/dsputil_neon_s.S
+index 5b95717..f16293d 100644
+--- a/libavcodec/arm/dsputil_neon_s.S
++++ b/libavcodec/arm/dsputil_neon_s.S
+@@ -38,13 +38,13 @@
+         pld             [r1, r2]
+         pld             [r1, r2, lsl #1]
+ .if \avg
+-        vld1.64         {d16,d17}, [ip], r2
++        vld1.64         {d16,d17}, [ip,:128], r2
+         vrhadd.u8       q0,  q0,  q8
+-        vld1.64         {d18,d19}, [ip], r2
++        vld1.64         {d18,d19}, [ip,:128], r2
+         vrhadd.u8       q1,  q1,  q9
+-        vld1.64         {d20,d21}, [ip], r2
++        vld1.64         {d20,d21}, [ip,:128], r2
+         vrhadd.u8       q2,  q2,  q10
+-        vld1.64         {d22,d23}, [ip], r2
++        vld1.64         {d22,d23}, [ip,:128], r2
+         vrhadd.u8       q3,  q3,  q11
+ .endif
+         subs            r3,  r3,  #4
+-- 
+1.6.3.3
+
--- ffmpeg-0.5.1.orig/debian/patches/neon/0020-ARM-remove-unnecessary-.fpu-neon-directives.patch
+++ ffmpeg-0.5.1/debian/patches/neon/0020-ARM-remove-unnecessary-.fpu-neon-directives.patch
@@ -0,0 +1,80 @@
+From cf79e9ce120293a3d8fd6887298283c27ee866d4 Mon Sep 17 00:00:00 2001
+From: mru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Fri, 2 Oct 2009 19:35:12 +0000
+Subject: [PATCH 20/20] ARM: remove unnecessary .fpu neon directives
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20151 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+---
+ libavcodec/arm/dsputil_neon_s.S   |    1 -
+ libavcodec/arm/h264dsp_neon.S     |    2 --
+ libavcodec/arm/h264idct_neon.S    |    2 --
+ libavcodec/arm/mdct_neon.S        |    1 -
+ libavcodec/arm/simple_idct_neon.S |    2 --
+ 5 files changed, 0 insertions(+), 8 deletions(-)
+
+diff --git a/libavcodec/arm/dsputil_neon_s.S b/libavcodec/arm/dsputil_neon_s.S
+index 71d09c6..f039349 100644
+--- a/libavcodec/arm/dsputil_neon_s.S
++++ b/libavcodec/arm/dsputil_neon_s.S
+@@ -23,7 +23,6 @@
+ #include "asm.S"
+ 
+         preserve8
+-        .fpu neon
+         .text
+ 
+         .macro pixels16 avg=0
+diff --git a/libavcodec/arm/h264dsp_neon.S b/libavcodec/arm/h264dsp_neon.S
+index 03e21f1..78f312d 100644
+--- a/libavcodec/arm/h264dsp_neon.S
++++ b/libavcodec/arm/h264dsp_neon.S
+@@ -20,8 +20,6 @@
+ 
+ #include "asm.S"
+ 
+-        .fpu neon
+-
+         .macro transpose_8x8 r0 r1 r2 r3 r4 r5 r6 r7
+         vtrn.32         \r0, \r4
+         vtrn.32         \r1, \r5
+diff --git a/libavcodec/arm/h264idct_neon.S b/libavcodec/arm/h264idct_neon.S
+index 6527390..d30e703 100644
+--- a/libavcodec/arm/h264idct_neon.S
++++ b/libavcodec/arm/h264idct_neon.S
+@@ -21,8 +21,6 @@
+ #include "asm.S"
+ 
+         preserve8
+-        .fpu neon
+-
+         .text
+ 
+ function ff_h264_idct_add_neon, export=1
+diff --git a/libavcodec/arm/mdct_neon.S b/libavcodec/arm/mdct_neon.S
+index 5cd4647..f089519 100644
+--- a/libavcodec/arm/mdct_neon.S
++++ b/libavcodec/arm/mdct_neon.S
+@@ -21,7 +21,6 @@
+ 
+ #include "asm.S"
+ 
+-        .fpu neon
+         .text
+ 
+ function ff_imdct_half_neon, export=1
+diff --git a/libavcodec/arm/simple_idct_neon.S b/libavcodec/arm/simple_idct_neon.S
+index 0882481..4c329d8 100644
+--- a/libavcodec/arm/simple_idct_neon.S
++++ b/libavcodec/arm/simple_idct_neon.S
+@@ -45,8 +45,6 @@
+ #define w7 d1[2]
+ #define w4c d1[3]
+ 
+-        .fpu neon
+-
+         .macro idct_col4_top
+         vmull.s16       q7,  d6,  w2    /* q9   = W2 * col[2] */
+         vmull.s16       q8,  d6,  w6    /* q10  = W6 * col[2] */
+-- 
+1.6.3.3
+
--- ffmpeg-0.5.1.orig/debian/patches/neon/0001-ARM-NEON-optimised-add_pixels_clamped.patch
+++ ffmpeg-0.5.1/debian/patches/neon/0001-ARM-NEON-optimised-add_pixels_clamped.patch
@@ -0,0 +1,94 @@
+From 75eadd829625f3ef75fad613846ff98773e547ca Mon Sep 17 00:00:00 2001
+From: mru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Sat, 4 Apr 2009 20:18:58 +0000
+Subject: [PATCH 01/27] ARM: NEON optimised add_pixels_clamped
+
+Based on patch by David Conrad.
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18332 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+---
+ libavcodec/arm/dsputil_neon.c   |    4 +++
+ libavcodec/arm/dsputil_neon_s.S |   45 +++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 49 insertions(+), 0 deletions(-)
+
+diff --git a/libavcodec/arm/dsputil_neon.c b/libavcodec/arm/dsputil_neon.c
+index e18a487..2e56308 100644
+--- a/libavcodec/arm/dsputil_neon.c
++++ b/libavcodec/arm/dsputil_neon.c
+@@ -41,6 +41,8 @@ void ff_put_pixels8_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
+ 
+ void ff_avg_pixels16_neon(uint8_t *, const uint8_t *, int, int);
+ 
++void ff_add_pixels_clamped_neon(const DCTELEM *, uint8_t *, int);
++
+ void ff_put_h264_qpel16_mc00_neon(uint8_t *, uint8_t *, int);
+ void ff_put_h264_qpel16_mc10_neon(uint8_t *, uint8_t *, int);
+ void ff_put_h264_qpel16_mc20_neon(uint8_t *, uint8_t *, int);
+@@ -176,6 +178,8 @@ void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx)
+ 
+     c->avg_pixels_tab[0][0] = ff_avg_pixels16_neon;
+ 
++    c->add_pixels_clamped = ff_add_pixels_clamped_neon;
++
+     c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_neon;
+     c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_neon;
+ 
+diff --git a/libavcodec/arm/dsputil_neon_s.S b/libavcodec/arm/dsputil_neon_s.S
+index 3b39d2e..c305210 100644
+--- a/libavcodec/arm/dsputil_neon_s.S
++++ b/libavcodec/arm/dsputil_neon_s.S
+@@ -273,6 +273,51 @@ function ff_put_h264_qpel8_mc00_neon, export=1
+         pixfunc2 put_ pixels8_y2,   _no_rnd, vhadd.u8
+         pixfunc2 put_ pixels8_xy2,  _no_rnd, vshrn.u16, 1
+ 
++function ff_add_pixels_clamped_neon, export=1
++        mov             r3, r1
++        vld1.64         {d16},   [r1,:64], r2
++        vld1.64         {d0-d1}, [r0,:128]!
++        vaddw.u8        q0, q0, d16
++        vld1.64         {d17},   [r1,:64], r2
++        vld1.64         {d2-d3}, [r0,:128]!
++        vqmovun.s16     d0, q0
++        vld1.64         {d18},   [r1,:64], r2
++        vaddw.u8        q1, q1, d17
++        vld1.64         {d4-d5}, [r0,:128]!
++        vaddw.u8        q2, q2, d18
++        vst1.64         {d0},    [r3,:64], r2
++        vqmovun.s16     d2, q1
++        vld1.64         {d19},   [r1,:64], r2
++        vld1.64         {d6-d7}, [r0,:128]!
++        vaddw.u8        q3, q3, d19
++        vqmovun.s16     d4, q2
++        vst1.64         {d2},    [r3,:64], r2
++        vld1.64         {d16},   [r1,:64], r2
++        vqmovun.s16     d6, q3
++        vld1.64         {d0-d1}, [r0,:128]!
++        vaddw.u8        q0, q0, d16
++        vst1.64         {d4},    [r3,:64], r2
++        vld1.64         {d17},   [r1,:64], r2
++        vld1.64         {d2-d3}, [r0,:128]!
++        vaddw.u8        q1, q1, d17
++        vst1.64         {d6},    [r3,:64], r2
++        vqmovun.s16     d0, q0
++        vld1.64         {d18},   [r1,:64], r2
++        vld1.64         {d4-d5}, [r0,:128]!
++        vaddw.u8        q2, q2, d18
++        vst1.64         {d0},    [r3,:64], r2
++        vqmovun.s16     d2, q1
++        vld1.64         {d19},   [r1,:64], r2
++        vqmovun.s16     d4, q2
++        vld1.64         {d6-d7}, [r0,:128]!
++        vaddw.u8        q3, q3, d19
++        vst1.64         {d2},    [r3,:64], r2
++        vqmovun.s16     d6, q3
++        vst1.64         {d4},    [r3,:64], r2
++        vst1.64         {d6},    [r3,:64], r2
++        bx              lr
++        .endfunc
++
+ function ff_float_to_int16_neon, export=1
+         subs            r2,  r2,  #8
+         vld1.64         {d0-d1},  [r1,:128]!
+-- 
+1.6.3.3
+
--- ffmpeg-0.5.1.orig/debian/patches/neon/0016-ARM-NEON-optimised-FFT-and-MDCT.patch
+++ ffmpeg-0.5.1/debian/patches/neon/0016-ARM-NEON-optimised-FFT-and-MDCT.patch
@@ -0,0 +1,664 @@
+From 2d316e271f8837e0888b664ae45f6174f827a982 Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Lo=C3=AFc=20Minier?= <lool@dooz.org>
+Date: Sat, 10 Oct 2009 12:58:17 +0200
+Subject: [PATCH 16/27] ARM: NEON optimised FFT and MDCT
+
+Vorbis and AC3 ~3x faster.
+
+Parts by Naotoshi Nojiri, naonoj gmail
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19806 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+
+Conflicts:
+
+	libavcodec/Makefile
+---
+ libavcodec/Makefile        |    5 +
+ libavcodec/arm/fft_neon.S  |  369 ++++++++++++++++++++++++++++++++++++++++++++
+ libavcodec/arm/mdct_neon.S |  178 +++++++++++++++++++++
+ libavcodec/dsputil.h       |    4 +
+ libavcodec/fft.c           |   10 +-
+ 5 files changed, 565 insertions(+), 1 deletions(-)
+ create mode 100644 libavcodec/arm/fft_neon.S
+ create mode 100644 libavcodec/arm/mdct_neon.S
+
+diff --git a/libavcodec/Makefile b/libavcodec/Makefile
+index a213309..02e0e8a 100644
+--- a/libavcodec/Makefile
++++ b/libavcodec/Makefile
+@@ -480,6 +480,11 @@ OBJS-$(HAVE_IWMMXT)                    += arm/dsputil_iwmmxt.o          \
+                                           arm/mpegvideo_iwmmxt.o        \
+ 
+ NEON-OBJS-$(CONFIG_THEORA_DECODER)     += arm/vp3dsp_neon.o
++
++NEON-OBJS-$(CONFIG_FFT)                += arm/fft_neon.o                \
++
++NEON-OBJS-$(CONFIG_MDCT)               += arm/mdct_neon.o               \
++
+ NEON-OBJS-$(CONFIG_VP3_DECODER)        += arm/vp3dsp_neon.o
+ 
+ OBJS-$(HAVE_NEON)                      += arm/dsputil_neon.o            \
+diff --git a/libavcodec/arm/fft_neon.S b/libavcodec/arm/fft_neon.S
+new file mode 100644
+index 0000000..6ed5789
+--- /dev/null
++++ b/libavcodec/arm/fft_neon.S
+@@ -0,0 +1,369 @@
++/*
++ * ARM NEON optimised FFT
++ *
++ * Copyright (c) 2009 Mans Rullgard <mans@mansr.com>
++ * Copyright (c) 2009 Naotoshi Nojiri
++ *
++ * This file is part of FFmpeg.
++ *
++ * FFmpeg is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * FFmpeg is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with FFmpeg; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++#include "asm.S"
++
++#define M_SQRT1_2 0.70710678118654752440
++
++        .text
++
++function fft4_neon
++        vld1.32         {d0-d3}, [r0,:128]
++
++        vext.32         q8,  q1,  q1,  #1       @ i2,r3 d3=i3,r2
++        vsub.f32        d6,  d0,  d1            @ r0-r1,i0-i1
++        vsub.f32        d7,  d16, d17           @ r3-r2,i2-i3
++        vadd.f32        d4,  d0,  d1            @ r0+r1,i0+i1
++        vadd.f32        d5,  d2,  d3            @ i2+i3,r2+r3
++        vadd.f32        d1,  d6,  d7
++        vsub.f32        d3,  d6,  d7
++        vadd.f32        d0,  d4,  d5
++        vsub.f32        d2,  d4,  d5
++
++        vst1.32         {d0-d3}, [r0,:128]
++
++        bx              lr
++.endfunc
++
++function fft8_neon
++        mov             r1,  r0
++        vld1.32         {d0-d3},   [r1,:128]!
++        vld1.32         {d16-d19}, [r1,:128]
++
++        movw            r2,  #0x04f3            @ sqrt(1/2)
++        movt            r2,  #0x3f35
++        eor             r3,  r2,  #1<<31
++        vdup.32         d31, r2
++
++        vext.32         q11, q1,  q1,  #1       @ i2,r3,i3,r2
++        vadd.f32        d4,  d16, d17           @ r4+r5,i4+i5
++        vmov            d28, r3,  r2
++        vadd.f32        d5,  d18, d19           @ r6+r7,i6+i7
++        vsub.f32        d17, d16, d17           @ r4-r5,i4-i5
++        vsub.f32        d19, d18, d19           @ r6-r7,i6-i7
++        vrev64.32       d29, d28
++        vadd.f32        d20, d0,  d1            @ r0+r1,i0+i1
++        vadd.f32        d21, d2,  d3            @ r2+r3,i2+i3
++        vmul.f32        d26, d17, d28           @ -a2r*w,a2i*w
++        vext.32         q3,  q2,  q2,  #1
++        vmul.f32        d27, d19, d29           @ a3r*w,-a3i*w
++        vsub.f32        d23, d22, d23           @ i2-i3,r3-r2
++        vsub.f32        d22, d0,  d1            @ r0-r1,i0-i1
++        vmul.f32        d24, d17, d31           @ a2r*w,a2i*w
++        vmul.f32        d25, d19, d31           @ a3r*w,a3i*w
++        vadd.f32        d0,  d20, d21
++        vsub.f32        d2,  d20, d21
++        vadd.f32        d1,  d22, d23
++        vrev64.32       q13, q13
++        vsub.f32        d3,  d22, d23
++        vsub.f32        d6,  d6,  d7
++        vadd.f32        d24, d24, d26           @ a2r+a2i,a2i-a2r   t1,t2
++        vadd.f32        d25, d25, d27           @ a3r-a3i,a3i+a3r   t5,t6
++        vadd.f32        d7,  d4,  d5
++        vsub.f32        d18, d2,  d6
++        vext.32         q13, q12, q12, #1
++        vadd.f32        d2,  d2,  d6
++        vsub.f32        d16, d0,  d7
++        vadd.f32        d5,  d25, d24
++        vsub.f32        d4,  d26, d27
++        vadd.f32        d0,  d0,  d7
++        vsub.f32        d17, d1,  d5
++        vsub.f32        d19, d3,  d4
++        vadd.f32        d3,  d3,  d4
++        vadd.f32        d1,  d1,  d5
++
++        vst1.32         {d16-d19}, [r1,:128]
++        vst1.32         {d0-d3},   [r0,:128]
++
++        bx              lr
++.endfunc
++
++function fft16_neon
++        movrel          r1, mppm
++        vld1.32         {d16-d19}, [r0,:128]!   @ q8{r0,i0,r1,i1} q9{r2,i2,r3,i3}
++        pld             [r0, #32]
++        vld1.32         {d2-d3}, [r1,:128]
++        vext.32         q13, q9,  q9,  #1
++        vld1.32         {d22-d25}, [r0,:128]!   @ q11{r4,i4,r5,i5} q12{r6,i5,r7,i7}
++        vadd.f32        d4,  d16, d17
++        vsub.f32        d5,  d16, d17
++        vadd.f32        d18, d18, d19
++        vsub.f32        d19, d26, d27
++
++        vadd.f32        d20, d22, d23
++        vsub.f32        d22, d22, d23
++        vsub.f32        d23, d24, d25
++        vadd.f32        q8,  q2,  q9            @ {r0,i0,r1,i1}
++        vadd.f32        d21, d24, d25
++        vmul.f32        d24, d22, d2
++        vsub.f32        q9,  q2,  q9            @ {r2,i2,r3,i3}
++        vmul.f32        d25, d23, d3
++        vuzp.32         d16, d17                @ {r0,r1,i0,i1}
++        vmul.f32        q1,  q11, d2[1]
++        vuzp.32         d18, d19                @ {r2,r3,i2,i3}
++        vrev64.32       q12, q12
++        vadd.f32        q11, q12, q1            @ {t1a,t2a,t5,t6}
++        vld1.32         {d24-d27}, [r0,:128]!   @ q12{r8,i8,r9,i9} q13{r10,i10,r11,i11}
++        vzip.32         q10, q11
++        vld1.32         {d28-d31}, [r0,:128]    @ q14{r12,i12,r13,i13} q15{r14,i14,r15,i15}
++        vadd.f32        d0,  d22, d20
++        vadd.f32        d1,  d21, d23
++        vsub.f32        d2,  d21, d23
++        vsub.f32        d3,  d22, d20
++        sub             r0,  r0,  #96
++        vext.32         q13, q13, q13, #1
++        vsub.f32        q10, q8,  q0            @ {r4,r5,i4,i5}
++        vadd.f32        q8,  q8,  q0            @ {r0,r1,i0,i1}
++        vext.32         q15, q15, q15, #1
++        vsub.f32        q11, q9,  q1            @ {r6,r7,i6,i7}
++        vswp            d25, d26                @ q12{r8,i8,i10,r11} q13{r9,i9,i11,r10}
++        vadd.f32        q9,  q9,  q1            @ {r2,r3,i2,i3}
++        vswp            d29, d30                @ q14{r12,i12,i14,r15} q15{r13,i13,i15,r14}
++        vadd.f32        q0,  q12, q13           @ {t1,t2,t5,t6}
++        vadd.f32        q1,  q14, q15           @ {t1a,t2a,t5a,t6a}
++        movrel          r2,  ff_cos_16
++        vsub.f32        q13, q12, q13           @ {t3,t4,t7,t8}
++        vrev64.32       d1,  d1
++        vsub.f32        q15, q14, q15           @ {t3a,t4a,t7a,t8a}
++        vrev64.32       d3,  d3
++        movrel          r3,  pmmp
++        vswp            d1,  d26                @ q0{t1,t2,t3,t4} q13{t6,t5,t7,t8}
++        vswp            d3,  d30                @ q1{t1a,t2a,t3a,t4a} q15{t6a,t5a,t7a,t8a}
++        vadd.f32        q12, q0,  q13           @ {r8,i8,r9,i9}
++        vadd.f32        q14, q1,  q15           @ {r12,i12,r13,i13}
++        vld1.32         {d4-d5},  [r2,:64]
++        vsub.f32        q13, q0,  q13           @ {r10,i10,r11,i11}
++        vsub.f32        q15, q1,  q15           @ {r14,i14,r15,i15}
++        vswp            d25, d28                @ q12{r8,i8,r12,i12} q14{r9,i9,r13,i13}
++        vld1.32         {d6-d7},  [r3,:128]
++        vrev64.32       q1,  q14
++        vmul.f32        q14, q14, d4[1]
++        vmul.f32        q1,  q1,  q3
++        vmla.f32        q14, q1,  d5[1]         @ {t1a,t2a,t5a,t6a}
++        vswp            d27, d30                @ q13{r10,i10,r14,i14} q15{r11,i11,r15,i15}
++        vzip.32         q12, q14
++        vadd.f32        d0,  d28, d24
++        vadd.f32        d1,  d25, d29
++        vsub.f32        d2,  d25, d29
++        vsub.f32        d3,  d28, d24
++        vsub.f32        q12, q8,  q0            @ {r8,r9,i8,i9}
++        vadd.f32        q8,  q8,  q0            @ {r0,r1,i0,i1}
++        vsub.f32        q14, q10, q1            @ {r12,r13,i12,i13}
++        mov             r1,  #32
++        vadd.f32        q10, q10, q1            @ {r4,r5,i4,i5}
++        vrev64.32       q0,  q13
++        vmul.f32        q13, q13, d5[0]
++        vrev64.32       q1,  q15
++        vmul.f32        q15, q15, d5[1]
++        vst2.32         {d16-d17},[r0,:128], r1
++        vmul.f32        q0,  q0,  q3
++        vst2.32         {d20-d21},[r0,:128], r1
++        vmul.f32        q1,  q1,  q3
++        vmla.f32        q13, q0,  d5[0]         @ {t1,t2,t5,t6}
++        vmla.f32        q15, q1,  d4[1]         @ {t1a,t2a,t5a,t6a}
++        vst2.32         {d24-d25},[r0,:128], r1
++        vst2.32         {d28-d29},[r0,:128]
++        vzip.32         q13, q15
++        sub             r0, r0, #80
++        vadd.f32        d0,  d30, d26
++        vadd.f32        d1,  d27, d31
++        vsub.f32        d2,  d27, d31
++        vsub.f32        d3,  d30, d26
++        vsub.f32        q13, q9,  q0            @ {r10,r11,i10,i11}
++        vadd.f32        q9,  q9,  q0            @ {r2,r3,i2,i3}
++        vsub.f32        q15, q11, q1            @ {r14,r15,i14,i15}
++        vadd.f32        q11, q11, q1            @ {r6,r7,i6,i7}
++        vst2.32         {d18-d19},[r0,:128], r1
++        vst2.32         {d22-d23},[r0,:128], r1
++        vst2.32         {d26-d27},[r0,:128], r1
++        vst2.32         {d30-d31},[r0,:128]
++        bx              lr
++.endfunc
++
++function fft_pass_neon
++        push            {r4-r6,lr}
++        mov             r6,  r2                 @ n
++        lsl             r5,  r2,  #3            @ 2 * n * sizeof FFTSample
++        lsl             r4,  r2,  #4            @ 2 * n * sizeof FFTComplex
++        lsl             r2,  r2,  #5            @ 4 * n * sizeof FFTComplex
++        add             r3,  r2,  r4
++        add             r4,  r4,  r0            @ &z[o1]
++        add             r2,  r2,  r0            @ &z[o2]
++        add             r3,  r3,  r0            @ &z[o3]
++        vld1.32         {d20-d21},[r2,:128]     @ {z[o2],z[o2+1]}
++        movrel          r12, pmmp
++        vld1.32         {d22-d23},[r3,:128]     @ {z[o3],z[o3+1]}
++        add             r5,  r5,  r1            @ wim
++        vld1.32         {d6-d7},  [r12,:128]    @ pmmp
++        vswp            d21, d22
++        vld1.32         {d4},     [r1,:64]!     @ {wre[0],wre[1]}
++        sub             r5,  r5,  #4            @ wim--
++        vrev64.32       q1,  q11
++        vmul.f32        q11, q11, d4[1]
++        vmul.f32        q1,  q1,  q3
++        vld1.32         {d5[0]},  [r5,:32]      @ d5[0] = wim[-1]
++        vmla.f32        q11, q1,  d5[0]         @ {t1a,t2a,t5a,t6a}
++        vld2.32         {d16-d17},[r0,:128]     @ {z[0],z[1]}
++        sub             r6, r6, #1              @ n--
++        vld2.32         {d18-d19},[r4,:128]     @ {z[o1],z[o1+1]}
++        vzip.32         q10, q11
++        vadd.f32        d0,  d22, d20
++        vadd.f32        d1,  d21, d23
++        vsub.f32        d2,  d21, d23
++        vsub.f32        d3,  d22, d20
++        vsub.f32        q10, q8,  q0
++        vadd.f32        q8,  q8,  q0
++        vsub.f32        q11, q9,  q1
++        vadd.f32        q9,  q9,  q1
++        vst2.32         {d20-d21},[r2,:128]!    @ {z[o2],z[o2+1]}
++        vst2.32         {d16-d17},[r0,:128]!    @ {z[0],z[1]}
++        vst2.32         {d22-d23},[r3,:128]!    @ {z[o3],z[o3+1]}
++        vst2.32         {d18-d19},[r4,:128]!    @ {z[o1],z[o1+1]}
++        sub             r5,  r5,  #8            @ wim -= 2
++1:
++        vld1.32         {d20-d21},[r2,:128]     @ {z[o2],z[o2+1]}
++        vld1.32         {d22-d23},[r3,:128]     @ {z[o3],z[o3+1]}
++        vswp            d21, d22
++        vld1.32         {d4}, [r1]!             @ {wre[0],wre[1]}
++        vrev64.32       q0,  q10
++        vmul.f32        q10, q10, d4[0]
++        vrev64.32       q1,  q11
++        vmul.f32        q11, q11, d4[1]
++        vld1.32         {d5}, [r5]              @ {wim[-1],wim[0]}
++        vmul.f32        q0,  q0,  q3
++        sub             r5,  r5,  #8            @ wim -= 2
++        vmul.f32        q1,  q1,  q3
++        vmla.f32        q10, q0,  d5[1]         @ {t1,t2,t5,t6}
++        vmla.f32        q11, q1,  d5[0]         @ {t1a,t2a,t5a,t6a}
++        vld2.32         {d16-d17},[r0,:128]     @ {z[0],z[1]}
++        subs            r6,  r6,  #1            @ n--
++        vld2.32         {d18-d19},[r4,:128]     @ {z[o1],z[o1+1]}
++        vzip.32         q10, q11
++        vadd.f32        d0,  d22, d20
++        vadd.f32        d1,  d21, d23
++        vsub.f32        d2,  d21, d23
++        vsub.f32        d3,  d22, d20
++        vsub.f32        q10, q8,  q0
++        vadd.f32        q8,  q8,  q0
++        vsub.f32        q11, q9,  q1
++        vadd.f32        q9,  q9,  q1
++        vst2.32         {d20-d21}, [r2,:128]!   @ {z[o2],z[o2+1]}
++        vst2.32         {d16-d17}, [r0,:128]!   @ {z[0],z[1]}
++        vst2.32         {d22-d23}, [r3,:128]!   @ {z[o3],z[o3+1]}
++        vst2.32         {d18-d19}, [r4,:128]!   @ {z[o1],z[o1+1]}
++        bne             1b
++
++        pop             {r4-r6,pc}
++.endfunc
++
++.macro  def_fft n, n2, n4
++        .align 6
++function fft\n\()_neon
++        push            {r4, lr}
++        mov             r4,  r0
++        bl              fft\n2\()_neon
++        add             r0,  r4,  #\n4*2*8
++        bl              fft\n4\()_neon
++        add             r0,  r4,  #\n4*3*8
++        bl              fft\n4\()_neon
++        mov             r0,  r4
++        pop             {r4, lr}
++        movrel          r1,  ff_cos_\n
++        mov             r2,  #\n4/2
++        b               fft_pass_neon
++.endfunc
++.endm
++
++        def_fft    32,    16,     8
++        def_fft    64,    32,    16
++        def_fft   128,    64,    32
++        def_fft   256,   128,    64
++        def_fft   512,   256,   128
++        def_fft  1024,   512,   256
++        def_fft  2048,  1024,   512
++        def_fft  4096,  2048,  1024
++        def_fft  8192,  4096,  2048
++        def_fft 16384,  8192,  4096
++        def_fft 32768, 16384,  8192
++        def_fft 65536, 32768, 16384
++
++function ff_fft_calc_neon, export=1
++        ldr             r2,  [r0]
++        sub             r2,  r2,  #2
++        movrel          r3,  fft_tab_neon
++        ldr             r3,  [r3, r2, lsl #2]
++        mov             r0,  r1
++        bx              r3
++.endfunc
++
++function ff_fft_permute_neon, export=1
++        push            {r4,lr}
++        mov             r12, #1
++        ldr             r2,  [r0]       @ nbits
++        ldr             r3,  [r0, #20]  @ tmp_buf
++        ldr             r0,  [r0, #8]   @ revtab
++        lsl             r12, r12, r2
++        mov             r2,  r12
++1:
++        vld1.32         {d0-d1}, [r1,:128]!
++        ldr             r4,  [r0], #4
++        uxtah           lr,  r3,  r4
++        uxtah           r4,  r3,  r4,  ror #16
++        vst1.32         {d0}, [lr,:64]
++        vst1.32         {d1}, [r4,:64]
++        subs            r12, r12, #2
++        bgt             1b
++
++        sub             r1,  r1,  r2,  lsl #3
++1:
++        vld1.32         {d0-d3}, [r3,:128]!
++        vst1.32         {d0-d3}, [r1,:128]!
++        subs            r2,  r2,  #4
++        bgt             1b
++
++        pop             {r4,pc}
++.endfunc
++
++        .section .rodata
++        .align 4
++fft_tab_neon:
++        .word fft4_neon
++        .word fft8_neon
++        .word fft16_neon
++        .word fft32_neon
++        .word fft64_neon
++        .word fft128_neon
++        .word fft256_neon
++        .word fft512_neon
++        .word fft1024_neon
++        .word fft2048_neon
++        .word fft4096_neon
++        .word fft8192_neon
++        .word fft16384_neon
++        .word fft32768_neon
++        .word fft65536_neon
++        .size fft_tab_neon, . - fft_tab_neon
++
++        .align 4
++pmmp:   .float  +1.0, -1.0, -1.0, +1.0
++mppm:   .float  -M_SQRT1_2, M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2
+diff --git a/libavcodec/arm/mdct_neon.S b/libavcodec/arm/mdct_neon.S
+new file mode 100644
+index 0000000..6d1dcfd
+--- /dev/null
++++ b/libavcodec/arm/mdct_neon.S
+@@ -0,0 +1,178 @@
++/*
++ * ARM NEON optimised MDCT
++ * Copyright (c) 2009 Mans Rullgard <mans@mansr.com>
++ *
++ * This file is part of FFmpeg.
++ *
++ * FFmpeg is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * FFmpeg is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with FFmpeg; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++#include "asm.S"
++
++        .fpu neon
++        .text
++
++function ff_imdct_half_neon, export=1
++        push            {r4-r8,lr}
++
++        mov             r12, #1
++        ldr             lr,  [r0, #4]           @ nbits
++        ldr             r4,  [r0, #8]           @ tcos
++        ldr             r5,  [r0, #12]          @ tsin
++        ldr             r3,  [r0, #24]          @ revtab
++        lsl             r12, r12, lr            @ n  = 1 << nbits
++        lsr             lr,  r12, #2            @ n4 = n >> 2
++        add             r7,  r2,  r12,  lsl #1
++        mov             r12,  #-16
++        sub             r7,  r7,  #16
++
++        vld1.32         {d16-d17},[r7,:128],r12 @ d16=x,n1 d17=x,n0
++        vld1.32         {d0-d1},  [r2,:128]!    @ d0 =m0,x d1 =m1,x
++        vld1.32         {d2},     [r4,:64]!     @ d2=c0,c1
++        vld1.32         {d3},     [r5,:64]!     @ d3=s0,s1
++        vuzp.32         d17, d16
++        vuzp.32         d0,  d1
++        vmul.f32        d6,  d16, d2
++        vmul.f32        d7,  d0,  d2
++1:
++        subs            lr,  lr,  #2
++        ldr             r6,  [r3], #4
++        vmul.f32        d4,  d0,  d3
++        vmul.f32        d5,  d16, d3
++        vsub.f32        d4,  d6,  d4
++        vadd.f32        d5,  d5,  d7
++        uxtah           r8,  r1,  r6,  ror #16
++        uxtah           r6,  r1,  r6
++        beq             1f
++        vld1.32         {d16-d17},[r7,:128],r12
++        vld1.32         {d0-d1},  [r2,:128]!
++        vuzp.32         d17, d16
++        vld1.32         {d2},     [r4,:64]!
++        vuzp.32         d0,  d1
++        vmul.f32        d6,  d16, d2
++        vld1.32         {d3},     [r5,:64]!
++        vmul.f32        d7,  d0,  d2
++        vst2.32         {d4[0],d5[0]}, [r6,:64]
++        vst2.32         {d4[1],d5[1]}, [r8,:64]
++        b               1b
++1:
++        vst2.32         {d4[0],d5[0]}, [r6,:64]
++        vst2.32         {d4[1],d5[1]}, [r8,:64]
++
++        mov             r4,  r0
++        mov             r6,  r1
++        add             r0,  r0,  #16
++        bl              ff_fft_calc_neon
++
++        mov             r12, #1
++        ldr             lr,  [r4, #4]           @ nbits
++        ldr             r5,  [r4, #12]          @ tsin
++        ldr             r4,  [r4, #8]           @ tcos
++        lsl             r12, r12, lr            @ n  = 1 << nbits
++        lsr             lr,  r12, #3            @ n8 = n >> 3
++
++        add             r4,  r4,  lr,  lsl #2
++        add             r5,  r5,  lr,  lsl #2
++        add             r6,  r6,  lr,  lsl #3
++        sub             r1,  r4,  #8
++        sub             r2,  r5,  #8
++        sub             r3,  r6,  #16
++
++        mov             r7,  #-16
++        mov             r12, #-8
++        mov             r8,  r6
++        mov             r0,  r3
++
++        vld1.32         {d0-d1},  [r3,:128], r7 @ d0 =i1,r1 d1 =i0,r0
++        vld1.32         {d20-d21},[r6,:128]!    @ d20=i2,r2 d21=i3,r3
++        vld1.32         {d18},    [r2,:64], r12 @ d18=s1,s0
++        vuzp.32         d20, d21
++        vuzp.32         d0,  d1
++1:
++        subs            lr,  lr,  #2
++        vmul.f32        d7,  d0,  d18
++        vld1.32         {d19},    [r5,:64]!     @ d19=s2,s3
++        vmul.f32        d4,  d1,  d18
++        vld1.32         {d16},    [r1,:64], r12 @ d16=c1,c0
++        vmul.f32        d5,  d21, d19
++        vld1.32         {d17},    [r4,:64]!     @ d17=c2,c3
++        vmul.f32        d6,  d20, d19
++        vmul.f32        d22, d1,  d16
++        vmul.f32        d23, d21, d17
++        vmul.f32        d24, d0,  d16
++        vmul.f32        d25, d20, d17
++        vadd.f32        d7,  d7,  d22
++        vadd.f32        d6,  d6,  d23
++        vsub.f32        d4,  d4,  d24
++        vsub.f32        d5,  d5,  d25
++        beq             1f
++        vld1.32         {d0-d1},  [r3,:128], r7
++        vld1.32         {d20-d21},[r6,:128]!
++        vld1.32         {d18},    [r2,:64], r12
++        vuzp.32         d20, d21
++        vuzp.32         d0,  d1
++        vrev64.32       q3,  q3
++        vtrn.32         d4,  d6
++        vtrn.32         d5,  d7
++        vswp            d5,  d6
++        vst1.32         {d4-d5},  [r0,:128], r7
++        vst1.32         {d6-d7},  [r8,:128]!
++        b               1b
++1:
++        vrev64.32       q3,  q3
++        vtrn.32         d4,  d6
++        vtrn.32         d5,  d7
++        vswp            d5,  d6
++        vst1.32         {d4-d5},  [r0,:128]
++        vst1.32         {d6-d7},  [r8,:128]
++
++        pop             {r4-r8,pc}
++.endfunc
++
++function ff_imdct_calc_neon, export=1
++        push            {r4-r6,lr}
++
++        ldr             r3,  [r0, #4]
++        mov             r4,  #1
++        mov             r5,  r1
++        lsl             r4,  r4,  r3
++        add             r1,  r1,  r4
++
++        bl              ff_imdct_half_neon
++
++        add             r0,  r5,  r4,  lsl #2
++        add             r1,  r5,  r4,  lsl #1
++        sub             r0,  r0,  #8
++        sub             r2,  r1,  #16
++        mov             r3,  #-16
++        mov             r6,  #-8
++        vmov.i32        d30, #1<<31
++1:
++        vld1.32         {d0-d1},  [r2,:128], r3
++        pld             [r0, #-16]
++        vrev64.32       q0,  q0
++        vld1.32         {d2-d3},  [r1,:128]!
++        veor            d4,  d1,  d30
++        pld             [r2, #-16]
++        vrev64.32       q1,  q1
++        veor            d5,  d0,  d30
++        vst1.32         {d2},     [r0,:64], r6
++        vst1.32         {d3},     [r0,:64], r6
++        vst1.32         {d4-d5},  [r5,:128]!
++        subs            r4,  r4,  #16
++        bgt             1b
++
++        pop             {r4-r6,pc}
++.endfunc
+diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
+index e9c2bfc..c4abd14 100644
+--- a/libavcodec/dsputil.h
++++ b/libavcodec/dsputil.h
+@@ -692,11 +692,13 @@ extern FFTSample* ff_cos_tabs[13];
+ int ff_fft_init(FFTContext *s, int nbits, int inverse);
+ void ff_fft_permute_c(FFTContext *s, FFTComplex *z);
+ void ff_fft_permute_sse(FFTContext *s, FFTComplex *z);
++void ff_fft_permute_neon(FFTContext *s, FFTComplex *z);
+ void ff_fft_calc_c(FFTContext *s, FFTComplex *z);
+ void ff_fft_calc_sse(FFTContext *s, FFTComplex *z);
+ void ff_fft_calc_3dn(FFTContext *s, FFTComplex *z);
+ void ff_fft_calc_3dn2(FFTContext *s, FFTComplex *z);
+ void ff_fft_calc_altivec(FFTContext *s, FFTComplex *z);
++void ff_fft_calc_neon(FFTContext *s, FFTComplex *z);
+ 
+ /**
+  * Do the permutation needed BEFORE calling ff_fft_calc().
+@@ -766,6 +768,8 @@ void ff_imdct_calc_3dn2(MDCTContext *s, FFTSample *output, const FFTSample *inpu
+ void ff_imdct_half_3dn2(MDCTContext *s, FFTSample *output, const FFTSample *input);
+ void ff_imdct_calc_sse(MDCTContext *s, FFTSample *output, const FFTSample *input);
+ void ff_imdct_half_sse(MDCTContext *s, FFTSample *output, const FFTSample *input);
++void ff_imdct_calc_neon(MDCTContext *s, FFTSample *output, const FFTSample *input);
++void ff_imdct_half_neon(MDCTContext *s, FFTSample *output, const FFTSample *input);
+ void ff_mdct_calc(MDCTContext *s, FFTSample *out, const FFTSample *input);
+ void ff_mdct_end(MDCTContext *s);
+ 
+diff --git a/libavcodec/fft.c b/libavcodec/fft.c
+index 296f634..b05ddda 100644
+--- a/libavcodec/fft.c
++++ b/libavcodec/fft.c
+@@ -64,6 +64,7 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse)
+     float alpha, c1, s1, s2;
+     int split_radix = 1;
+     int av_unused has_vectors;
++    int revtab_shift = 0;
+ 
+     if (nbits < 2 || nbits > 16)
+         goto fail;
+@@ -112,6 +113,12 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse)
+         s->fft_calc = ff_fft_calc_altivec;
+         split_radix = 0;
+     }
++#elif HAVE_NEON
++    s->fft_permute = ff_fft_permute_neon;
++    s->fft_calc    = ff_fft_calc_neon;
++    s->imdct_calc  = ff_imdct_calc_neon;
++    s->imdct_half  = ff_imdct_half_neon;
++    revtab_shift = 3;
+ #endif
+ 
+     if (split_radix) {
+@@ -125,7 +132,8 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse)
+                 tab[m/2-i] = tab[i];
+         }
+         for(i=0; i<n; i++)
+-            s->revtab[-split_radix_permutation(i, n, s->inverse) & (n-1)] = i;
++            s->revtab[-split_radix_permutation(i, n, s->inverse) & (n-1)] =
++                i << revtab_shift;
+         s->tmp_buf = av_malloc(n * sizeof(FFTComplex));
+     } else {
+         int np, nblocks, np2, l;
+-- 
+1.6.3.3
+
--- ffmpeg-0.5.1.orig/debian/patches/neon/0008-ARM-NEON-VP3-Loop-Filter.patch
+++ ffmpeg-0.5.1/debian/patches/neon/0008-ARM-NEON-VP3-Loop-Filter.patch
@@ -0,0 +1,60 @@
+From 91dafadca2744957e6cc3ae13688c9033ec3c330 Mon Sep 17 00:00:00 2001
+From: conrad <conrad@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Sat, 23 May 2009 18:36:20 +0000
+Subject: [PATCH 08/27] ARM: NEON VP3 Loop Filter
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18916 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+---
+ libavcodec/Makefile           |    4 ++++
+ libavcodec/arm/dsputil_neon.c |    8 ++++++++
+ 2 files changed, 12 insertions(+), 0 deletions(-)
+
+diff --git a/libavcodec/Makefile b/libavcodec/Makefile
+index cf742d1..a213309 100644
+--- a/libavcodec/Makefile
++++ b/libavcodec/Makefile
+@@ -479,11 +479,15 @@ OBJS-$(HAVE_ARMVFP)                    += arm/dsputil_vfp.o             \
+ OBJS-$(HAVE_IWMMXT)                    += arm/dsputil_iwmmxt.o          \
+                                           arm/mpegvideo_iwmmxt.o        \
+ 
++NEON-OBJS-$(CONFIG_THEORA_DECODER)     += arm/vp3dsp_neon.o
++NEON-OBJS-$(CONFIG_VP3_DECODER)        += arm/vp3dsp_neon.o
++
+ OBJS-$(HAVE_NEON)                      += arm/dsputil_neon.o            \
+                                           arm/dsputil_neon_s.o          \
+                                           arm/h264dsp_neon.o            \
+                                           arm/h264idct_neon.o           \
+                                           arm/simple_idct_neon.o        \
++					  $(NEON-OBJS-yes)
+ 
+ OBJS-$(ARCH_BFIN)                      += bfin/dsputil_bfin.o           \
+                                           bfin/fdct_bfin.o              \
+diff --git a/libavcodec/arm/dsputil_neon.c b/libavcodec/arm/dsputil_neon.c
+index 9b95130..20425c1 100644
+--- a/libavcodec/arm/dsputil_neon.c
++++ b/libavcodec/arm/dsputil_neon.c
+@@ -150,6 +150,9 @@ void ff_h264_idct_add8_neon(uint8_t **dest, const int *block_offset,
+                             DCTELEM *block, int stride,
+                             const uint8_t nnzc[6*8]);
+ 
++void ff_vp3_v_loop_filter_neon(uint8_t *, int, int *);
++void ff_vp3_h_loop_filter_neon(uint8_t *, int, int *);
++
+ void ff_vector_fmul_neon(float *dst, const float *src, int len);
+ void ff_vector_fmul_window_neon(float *dst, const float *src0,
+                                 const float *src1, const float *win,
+@@ -255,6 +258,11 @@ void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx)
+     c->h264_idct_add16intra = ff_h264_idct_add16intra_neon;
+     c->h264_idct_add8       = ff_h264_idct_add8_neon;
+ 
++    if (CONFIG_VP3_DECODER || CONFIG_THEORA_DECODER) {
++        c->vp3_v_loop_filter = ff_vp3_v_loop_filter_neon;
++        c->vp3_h_loop_filter = ff_vp3_h_loop_filter_neon;
++    }
++
+     c->vector_fmul = ff_vector_fmul_neon;
+     c->vector_fmul_window = ff_vector_fmul_window_neon;
+ 
+-- 
+1.6.3.3
+
--- ffmpeg-0.5.1.orig/debian/patches/neon/0005-ARM-asm-for-AV_RN.patch
+++ ffmpeg-0.5.1/debian/patches/neon/0005-ARM-asm-for-AV_RN.patch
@@ -0,0 +1,124 @@
+From 8e2336d4b05585ed3a533b388751bff4f3cfef05 Mon Sep 17 00:00:00 2001
+From: mru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Sat, 18 Apr 2009 00:00:28 +0000
+Subject: [PATCH 05/27] ARM asm for AV_RN*()
+
+ARMv6 and later support unaligned loads and stores for single
+word/halfword but not double/multiple.  GCC is ignorant of this and
+will always use bytewise accesses for unaligned data.  Casting to an
+int32_t pointer is dangerous since a load/store double or multiple
+instruction might be used (this happens with some code in FFmpeg).
+Implementing the AV_[RW]* macros with inline asm using only supported
+instructions gives fast and safe unaligned accesses.  ARM RVCT does
+the right thing with generic code.
+
+This gives an overall speedup of up to 10%.
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18601 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+---
+ libavutil/arm/intreadwrite.h |   78 ++++++++++++++++++++++++++++++++++++++++++
+ libavutil/intreadwrite.h     |    3 ++
+ 2 files changed, 81 insertions(+), 0 deletions(-)
+ create mode 100644 libavutil/arm/intreadwrite.h
+
+diff --git a/libavutil/arm/intreadwrite.h b/libavutil/arm/intreadwrite.h
+new file mode 100644
+index 0000000..de2e553
+--- /dev/null
++++ b/libavutil/arm/intreadwrite.h
+@@ -0,0 +1,78 @@
++/*
++ * This file is part of FFmpeg.
++ *
++ * FFmpeg is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * FFmpeg is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with FFmpeg; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++#ifndef AVUTIL_ARM_INTREADWRITE_H
++#define AVUTIL_ARM_INTREADWRITE_H
++
++#include <stdint.h>
++#include "config.h"
++
++#if HAVE_FAST_UNALIGNED && HAVE_INLINE_ASM
++
++#define AV_RN16 AV_RN16
++static inline uint16_t AV_RN16(const void *p)
++{
++    uint16_t v;
++    __asm__ ("ldrh %0, %1" : "=r"(v) : "m"(*(const uint16_t *)p));
++    return v;
++}
++
++#define AV_WN16 AV_WN16
++static inline void AV_WN16(void *p, uint16_t v)
++{
++    __asm__ ("strh %1, %0" : "=m"(*(uint16_t *)p) : "r"(v));
++}
++
++#define AV_RN32 AV_RN32
++static inline uint32_t AV_RN32(const void *p)
++{
++    uint32_t v;
++    __asm__ ("ldr  %0, %1" : "=r"(v) : "m"(*(const uint32_t *)p));
++    return v;
++}
++
++#define AV_WN32 AV_WN32
++static inline void AV_WN32(void *p, uint32_t v)
++{
++    __asm__ ("str  %1, %0" : "=m"(*(uint32_t *)p) : "r"(v));
++}
++
++#define AV_RN64 AV_RN64
++static inline uint64_t AV_RN64(const void *p)
++{
++    union { uint64_t v; uint32_t hl[2]; } v;
++    __asm__ ("ldr   %0, %2  \n\t"
++             "ldr   %1, %3  \n\t"
++             : "=r"(v.hl[0]), "=r"(v.hl[1])
++             : "m"(*(const uint32_t*)p), "m"(*((const uint32_t*)p+1)));
++    return v.v;
++}
++
++#define AV_WN64 AV_WN64
++static inline void AV_WN64(void *p, uint64_t v)
++{
++    union { uint64_t v; uint32_t hl[2]; } vv = { v };
++    __asm__ ("str  %2, %0  \n\t"
++             "str  %3, %1  \n\t"
++             : "=m"(*(uint32_t*)p), "=m"(*((uint32_t*)p+1))
++             : "r"(vv.hl[0]), "r"(vv.hl[1]));
++}
++
++#endif /* HAVE_INLINE_ASM */
++
++#endif /* AVUTIL_ARM_INTREADWRITE_H */
+diff --git a/libavutil/intreadwrite.h b/libavutil/intreadwrite.h
+index b1c5c2a..42fb890 100644
+--- a/libavutil/intreadwrite.h
++++ b/libavutil/intreadwrite.h
+@@ -29,6 +29,9 @@
+  * defined, even if these are implemented as inline functions.
+  */
+ 
++#if   ARCH_ARM
++#   include "arm/intreadwrite.h"
++#endif
+ 
+ /*
+  * Define AV_[RW]N helper macros to simplify definitions not provided
+-- 
+1.6.3.3
+
--- ffmpeg-0.5.1.orig/debian/patches/neon/0009-ARM-actually-add-VP3-loop-filter.patch
+++ ffmpeg-0.5.1/debian/patches/neon/0009-ARM-actually-add-VP3-loop-filter.patch
@@ -0,0 +1,114 @@
+From 2ca1dc1b533f6916ac593d435e1af8a299944d2c Mon Sep 17 00:00:00 2001
+From: conrad <conrad@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Sat, 23 May 2009 18:47:26 +0000
+Subject: [PATCH 09/27] ARM: actually add VP3 loop filter
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18917 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+---
+ libavcodec/arm/vp3dsp_neon.S |   94 ++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 94 insertions(+), 0 deletions(-)
+ create mode 100644 libavcodec/arm/vp3dsp_neon.S
+
+diff --git a/libavcodec/arm/vp3dsp_neon.S b/libavcodec/arm/vp3dsp_neon.S
+new file mode 100644
+index 0000000..cce80dd
+--- /dev/null
++++ b/libavcodec/arm/vp3dsp_neon.S
+@@ -0,0 +1,94 @@
++/*
++ * Copyright (c) 2009 David Conrad
++ *
++ * This file is part of FFmpeg.
++ *
++ * FFmpeg is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * FFmpeg is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with FFmpeg; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++#include "asm.S"
++
++.macro vp3_loop_filter
++    vsubl.u8        q3,  d18, d17
++    vsubl.u8        q2,  d16, d19
++    vadd.i16        q1,  q3,  q3
++    vadd.i16        q2,  q2,  q3
++    vadd.i16        q0,  q1,  q2
++    vrshr.s16       q0,  q0,  #3
++    vmovl.u8        q9,  d18
++    vdup.u16        q15, r2
++
++    vabs.s16        q1,  q0
++    vshr.s16        q0,  q0,  #15
++    vqsub.u16       q2,  q15, q1
++    vqsub.u16       q3,  q2,  q1
++    vsub.i16        q1,  q2,  q3
++    veor            q1,  q1,  q0
++    vsub.i16        q0,  q1,  q0
++
++    vaddw.u8        q2,  q0,  d17
++    vsub.i16        q3,  q9,  q0
++    vqmovun.s16     d0,  q2
++    vqmovun.s16     d1,  q3
++.endm
++
++function ff_vp3_v_loop_filter_neon, export=1
++    sub             ip,  r0,  r1
++    sub             r0,  r0,  r1,  lsl #1
++    vld1.64         {d16}, [r0,:64], r1
++    vld1.64         {d17}, [r0,:64], r1
++    vld1.64         {d18}, [r0,:64], r1
++    vld1.64         {d19}, [r0,:64], r1
++    ldrb            r2,    [r2, #129*4]
++
++    vp3_loop_filter
++
++    vst1.64         {d0},  [ip,:64], r1
++    vst1.64         {d1},  [ip,:64], r1
++    bx              lr
++.endfunc
++
++function ff_vp3_h_loop_filter_neon, export=1
++    sub             ip,  r0,  #1
++    sub             r0,  r0,  #2
++    vld1.32         {d16[]},  [r0], r1
++    vld1.32         {d17[]},  [r0], r1
++    vld1.32         {d18[]},  [r0], r1
++    vld1.32         {d19[]},  [r0], r1
++    vld1.32         {d16[1]}, [r0], r1
++    vld1.32         {d17[1]}, [r0], r1
++    vld1.32         {d18[1]}, [r0], r1
++    vld1.32         {d19[1]}, [r0], r1
++    ldrb            r2,  [r2, #129*4]
++
++    vtrn.8          d16, d17
++    vtrn.8          d18, d19
++    vtrn.16         d16, d18
++    vtrn.16         d17, d19
++
++    vp3_loop_filter
++
++    vtrn.8          d0,  d1
++
++    vst1.16         {d0[0]}, [ip], r1
++    vst1.16         {d1[0]}, [ip], r1
++    vst1.16         {d0[1]}, [ip], r1
++    vst1.16         {d1[1]}, [ip], r1
++    vst1.16         {d0[2]}, [ip], r1
++    vst1.16         {d1[2]}, [ip], r1
++    vst1.16         {d0[3]}, [ip], r1
++    vst1.16         {d1[3]}, [ip], r1
++    bx              lr
++.endfunc
+-- 
+1.6.3.3
+
--- ffmpeg-0.5.1.orig/debian/patches/neon/0007-ARM-Use-fewer-register-in-NEON-put_pixels-_y2-and-_x.patch
+++ ffmpeg-0.5.1/debian/patches/neon/0007-ARM-Use-fewer-register-in-NEON-put_pixels-_y2-and-_x.patch
@@ -0,0 +1,168 @@
+From dcd9d80a563a1877e1e5f9182d1bf0ac08ccc7d4 Mon Sep 17 00:00:00 2001
+From: conrad <conrad@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Wed, 29 Apr 2009 11:38:09 +0000
+Subject: [PATCH 07/27] ARM: Use fewer register in NEON put_pixels _y2 and _xy2
+ Approved by Mans on IRC
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18713 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+---
+ libavcodec/arm/dsputil_neon_s.S |   64 ++++++++++++++++-----------------------
+ 1 files changed, 26 insertions(+), 38 deletions(-)
+
+diff --git a/libavcodec/arm/dsputil_neon_s.S b/libavcodec/arm/dsputil_neon_s.S
+index a55e05f..303b11c 100644
+--- a/libavcodec/arm/dsputil_neon_s.S
++++ b/libavcodec/arm/dsputil_neon_s.S
+@@ -73,35 +73,29 @@
+         .endm
+ 
+         .macro pixels16_y2 vhadd=vrhadd.u8
+-        push            {lr}
+-        add             ip,  r1,  r2
+-        lsl             lr,  r2,  #1
+-        vld1.64         {d0, d1},  [r1], lr
+-        vld1.64         {d2, d3},  [ip], lr
++        vld1.64         {d0, d1},  [r1], r2
++        vld1.64         {d2, d3},  [r1], r2
+ 1:      subs            r3,  r3,  #2
+         \vhadd          q2,  q0,  q1
+-        vld1.64         {d0, d1},  [r1],      lr
++        vld1.64         {d0, d1},  [r1], r2
+         \vhadd          q3,  q0,  q1
+-        vld1.64         {d2, d3},  [ip],      lr
++        vld1.64         {d2, d3},  [r1], r2
+         pld             [r1]
+-        pld             [ip]
++        pld             [r1, r2]
+         vst1.64         {d4, d5},  [r0,:128], r2
+         vst1.64         {d6, d7},  [r0,:128], r2
+         bne             1b
+-        pop             {pc}
++        bx              lr
+         .endm
+ 
+         .macro pixels16_xy2 vshrn=vrshrn.u16 no_rnd=0
+-        push            {lr}
+-        lsl             lr,  r2,  #1
+-        add             ip,  r1,  r2
+-        vld1.64         {d0-d2},   [r1], lr
+-        vld1.64         {d4-d6},   [ip], lr
++        vld1.64         {d0-d2},   [r1], r2
++        vld1.64         {d4-d6},   [r1], r2
+ .if \no_rnd
+         vmov.i16        q13, #1
+ .endif
+         pld             [r1]
+-        pld             [ip]
++        pld             [r1, r2]
+         vext.8          q1,  q0,  q1,  #1
+         vext.8          q3,  q2,  q3,  #1
+         vaddl.u8        q8,  d0,  d2
+@@ -109,7 +103,7 @@
+         vaddl.u8        q9,  d4,  d6
+         vaddl.u8        q11, d5,  d7
+ 1:      subs            r3,  r3,  #2
+-        vld1.64         {d0-d2},   [r1], lr
++        vld1.64         {d0-d2},   [r1], r2
+         vadd.u16        q12, q8,  q9
+         pld             [r1]
+ .if \no_rnd
+@@ -123,11 +117,11 @@
+ .endif
+         \vshrn          d29, q1,  #2
+         vaddl.u8        q8,  d0,  d30
+-        vld1.64         {d2-d4},   [ip], lr
++        vld1.64         {d2-d4},   [r1], r2
+         vaddl.u8        q10, d1,  d31
+         vst1.64         {d28,d29}, [r0,:128], r2
+         vadd.u16        q12, q8,  q9
+-        pld             [ip]
++        pld             [r1, r2]
+ .if \no_rnd
+         vadd.u16        q12, q12, q13
+ .endif
+@@ -142,7 +136,7 @@
+         vaddl.u8        q11, d3,  d5
+         vst1.64         {d30,d31}, [r0,:128], r2
+         bgt             1b
+-        pop             {pc}
++        bx              lr
+         .endm
+ 
+         .macro pixels8
+@@ -180,41 +174,35 @@
+         .endm
+ 
+         .macro pixels8_y2 vhadd=vrhadd.u8
+-        push            {lr}
+-        add             ip,  r1,  r2
+-        lsl             lr,  r2,  #1
+-        vld1.64         {d0},      [r1], lr
+-        vld1.64         {d1},      [ip], lr
++        vld1.64         {d0},      [r1], r2
++        vld1.64         {d1},      [r1], r2
+ 1:      subs            r3,  r3,  #2
+         \vhadd          d4,  d0,  d1
+-        vld1.64         {d0},      [r1],     lr
++        vld1.64         {d0},      [r1], r2
+         \vhadd          d5,  d0,  d1
+-        vld1.64         {d1},      [ip],     lr
++        vld1.64         {d1},      [r1], r2
+         pld             [r1]
+-        pld             [ip]
++        pld             [r1, r2]
+         vst1.64         {d4},      [r0,:64], r2
+         vst1.64         {d5},      [r0,:64], r2
+         bne             1b
+-        pop             {pc}
++        bx              lr
+         .endm
+ 
+         .macro pixels8_xy2 vshrn=vrshrn.u16 no_rnd=0
+-        push            {lr}
+-        lsl             lr,  r2,  #1
+-        add             ip,  r1,  r2
+-        vld1.64         {d0, d1},  [r1], lr
+-        vld1.64         {d2, d3},  [ip], lr
++        vld1.64         {d0, d1},  [r1], r2
++        vld1.64         {d2, d3},  [r1], r2
+ .if \no_rnd
+         vmov.i16        q11, #1
+ .endif
+         pld             [r1]
+-        pld             [ip]
++        pld             [r1, r2]
+         vext.8          d4,  d0,  d1,  #1
+         vext.8          d6,  d2,  d3,  #1
+         vaddl.u8        q8,  d0,  d4
+         vaddl.u8        q9,  d2,  d6
+ 1:      subs            r3,  r3,  #2
+-        vld1.64         {d0, d1},  [r1], lr
++        vld1.64         {d0, d1},  [r1], r2
+         pld             [r1]
+         vadd.u16        q10, q8,  q9
+         vext.8          d4,  d0,  d1,  #1
+@@ -223,9 +211,9 @@
+ .endif
+         vaddl.u8        q8,  d0,  d4
+         \vshrn          d5,  q10, #2
+-        vld1.64         {d2, d3},  [ip], lr
++        vld1.64         {d2, d3},  [r1], r2
+         vadd.u16        q10, q8,  q9
+-        pld             [ip]
++        pld             [r1, r2]
+ .if \no_rnd
+         vadd.u16        q10, q10, q11
+ .endif
+@@ -235,7 +223,7 @@
+         vaddl.u8        q9,  d2,  d6
+         vst1.64         {d7},      [r0,:64], r2
+         bgt             1b
+-        pop             {pc}
++        bx              lr
+         .endm
+ 
+         .macro pixfunc pfx name suf rnd_op args:vararg
+-- 
+1.6.3.3
+
--- ffmpeg-0.5.1.orig/debian/patches/neon/0021-ARM-check-for-VFP-register-arguments.patch
+++ ffmpeg-0.5.1/debian/patches/neon/0021-ARM-check-for-VFP-register-arguments.patch
@@ -0,0 +1,55 @@
+From 2062a3d147ea6123eb0aa2b010be6c662e58f291 Mon Sep 17 00:00:00 2001
+From: mru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Mon, 20 Jul 2009 22:30:24 +0000
+Subject: [PATCH] ARM: check for VFP register arguments
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19474 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+---
+ configure            |    6 ++++++
+ libavcodec/arm/asm.S |    9 +++++++++
+ 2 files changed, 15 insertions(+), 0 deletions(-)
+
+diff --git a/configure b/configure
+index 7459215..d0c7096 100755
+--- a/configure
++++ b/configure
+@@ -917,6 +917,7 @@ HAVE_LIST="
+     termios_h
+     threads
+     truncf
++    vfp_args
+     winsock2_h
+     yasm
+ "
+@@ -1866,6 +1867,11 @@ fi
+ 
+ # check for assembler specific support
+ 
++enabled arm && check_ld <<EOF && enable vfp_args
++__asm__ (".eabi_attribute 28, 1");
++int main(void) { return 0; }
++EOF
++
+ enabled ppc && check_asm dcbzl '"dcbzl 0, 1"'
+ enabled ppc && check_asm ppc4xx '"maclhw r10, r11, r12"'
+ 
+diff --git a/libavcodec/arm/asm.S b/libavcodec/arm/asm.S
+index 69d8348..087b279 100644
+--- a/libavcodec/arm/asm.S
++++ b/libavcodec/arm/asm.S
+@@ -45,3 +45,12 @@
+         ldr             \rd, =\val
+ #endif
+         .endm
++
++#if HAVE_VFP_ARGS
++        .eabi_attribute 28, 1
++#   define VFP
++#   define NOVFP @
++#else
++#   define VFP   @
++#   define NOVFP
++#endif
+-- 
+1.6.3.3
+
--- ffmpeg-0.5.1.orig/debian/patches/neon/0010-ARM-add-some-PLD-in-NEON-IDCT.patch
+++ ffmpeg-0.5.1/debian/patches/neon/0010-ARM-add-some-PLD-in-NEON-IDCT.patch
@@ -0,0 +1,55 @@
+From 8d8bd2247af043b8b61af8bbc4c131524182531a Mon Sep 17 00:00:00 2001
+From: mru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Thu, 28 May 2009 17:19:28 +0000
+Subject: [PATCH 10/27] ARM: add some PLD in NEON IDCT
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18972 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+---
+ libavcodec/arm/simple_idct_neon.S |   17 +++++++++++++++--
+ 1 files changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/libavcodec/arm/simple_idct_neon.S b/libavcodec/arm/simple_idct_neon.S
+index e7099a2..0882481 100644
+--- a/libavcodec/arm/simple_idct_neon.S
++++ b/libavcodec/arm/simple_idct_neon.S
+@@ -68,6 +68,19 @@
+         .text
+         .align 6
+ 
++function idct_row4_pld_neon
++        pld             [r0]
++        add             r3,  r0,  r1,  lsl #2
++        pld             [r0, r1]
++        pld             [r0, r1, lsl #1]
++        pld             [r3, -r1]
++        pld             [r3]
++        pld             [r3, r1]
++        add             r3,  r3,  r1,  lsl #1
++        pld             [r3]
++        pld             [r3, r1]
++        .endfunc
++
+ function idct_row4_neon
+         vmov.i32        q15, #(1<<(ROW_SHIFT-1))
+         vld1.64         {d2-d5},  [r2,:128]!
+@@ -252,7 +265,7 @@ idct_coeff_neon:
+ function ff_simple_idct_put_neon, export=1
+         idct_start      r2
+ 
+-        bl              idct_row4_neon
++        bl              idct_row4_pld_neon
+         bl              idct_row4_neon
+         add             r2,  r2,  #-128
+         bl              idct_col4_neon
+@@ -307,7 +320,7 @@ function idct_col4_add8_neon
+ function ff_simple_idct_add_neon, export=1
+         idct_start      r2
+ 
+-        bl              idct_row4_neon
++        bl              idct_row4_pld_neon
+         bl              idct_row4_neon
+         add             r2,  r2,  #-128
+         bl              idct_col4_neon
+-- 
+1.6.3.3
+
