Commit af788e04 authored by Jean-Paul Saman's avatar Jean-Paul Saman

debian: package building for ffmpeg-mt

The rules from ffmpeg-0.5.1 debian package have been adapted for building ffmpeg-mt.
parent 7f3ba16e
This diff is collapsed.
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.
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
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
This diff is collapsed.
config-extra-includes.h
EXTRA
formats.txt
# -*- 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 += --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
Source: ffmpeg
Section: libs
Priority: optional
Maintainer: iphion BV <techlist@iphion.nl>
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.m2x.eu/ffmpeg-mt.git
Vcs-Browser: http://git.m2x.eu/git/cgi-bin/gitweb.cgi?p=ffmpeg-mt.git;a=summary
Homepage: http://gitorious.org/ffmpeg/ffmpeg-mt
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 which suports multi-threaded
decoding. 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.
Git snapshots are downloaded with git from ffmpeg-mt at:
http://gitorious.org/ffmpeg/ffmpeg-mt
or copy at
http://git.m2x.eu/git/cgi-bin/gitweb.cgi?p=ffmpeg-mt.git;a=summary
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'.
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
debian/tmp/usr/share/doc/ffmpeg-doc/html
debian/tmp/usr/share/doc/ffmpeg/html
etc
usr/bin
usr/share/man
ffmpeg_0.5.1-1ubuntu1_i386.deb video optional
ffmpeg-dbg_0.5.1-1ubuntu1_i386.deb debug extra
ffmpeg-doc_0.5.1-1ubuntu1_all.deb doc optional
libavutil49_0.5.1-1ubuntu1_i386.deb libs optional
libavcodec52_0.5.1-1ubuntu1_i386.deb libs optional
libavdevice52_0.5.1-1ubuntu1_i386.deb libs optional
libavformat52_0.5.1-1ubuntu1_i386.deb libs optional
libavfilter0_0.5.1-1ubuntu1_i386.deb libs optional
libpostproc51_0.5.1-1ubuntu1_i386.deb libs optional
libswscale0_0.5.1-1ubuntu1_i386.deb libs optional
libavutil-dev_0.5.1-1ubuntu1_i386.deb libdevel optional
libavcodec-dev_0.5.1-1ubuntu1_i386.deb libdevel optional
libavdevice-dev_0.5.1-1ubuntu1_i386.deb libdevel optional
libavformat-dev_0.5.1-1ubuntu1_i386.deb libdevel optional
libavfilter-dev_0.5.1-1ubuntu1_i386.deb libdevel optional
libpostproc-dev_0.5.1-1ubuntu1_i386.deb libdevel optional
libswscale-dev_0.5.1-1ubuntu1_i386.deb libdevel optional
[DEFAULT]
upstream-branch = upstream-0.5
debian-branch = ubuntu
upstream-tag = upstream/%(version)s
debian-tag = debian/%(version)s
pristine-tar = True
#!/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}
usr/include/libavcodec
usr/lib/libavcodec.a
usr/lib/{,*/,*/*/}libavcodec.so
usr/lib/pkgconfig/libavcodec.pc
usr/lib/{,*/,*/*/}libavcodec.so.*
usr/share/ffmpeg/*.ffpreset
# 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
usr/include/libavdevice
usr/lib/libavdevice.a
usr/lib/{,*/,*/*/}libavdevice.so
usr/lib/pkgconfig/libavdevice.pc
usr/lib/{,*/,*/*/}libavdevice.so.*
# 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
usr/include/libavfilter
usr/lib/libavfilter.a
usr/lib/{,*/,*/*/}libavfilter.so
usr/lib/pkgconfig/libavfilter.pc
usr/lib/{,*/,*/*/}libavfilter.so.*
# 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
usr/include/libavformat
usr/lib/libavformat.a
usr/lib/{,*/,*/*/}libavformat.so
usr/lib/pkgconfig/libavformat.pc
usr/lib/{,*/,*/*/}libavformat.so.*
# 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
usr/include/libavutil
usr/lib/libavutil.a
usr/lib/{,*/,*/*/}libavutil.so
usr/lib/pkgconfig/libavutil.pc
usr/lib/{,*/,*/*/}libavutil.so.*
# 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
usr/include/libpostproc
usr/lib/libpostproc.a
usr/lib/{,*/,*/*/}libpostproc.so
usr/lib/pkgconfig/libpostproc.pc
usr/lib/{,*/,*/*/}libpostproc.so.*
# 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
usr/include/libswscale
usr/lib/libswscale.a
usr/lib/{,*/,*/*/}libswscale.so
usr/lib/pkgconfig/libswscale.pc
usr/lib/{,*/,*/*/}libswscale.so.*
# 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
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.
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"},
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");
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;
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 {
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
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
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
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
This diff is collapsed.
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
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
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
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
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
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
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
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
This diff is collapsed.
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
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
This diff is collapsed.
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
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
This diff is collapsed.
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
# 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
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# 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)
version=3
opts="uversionmangle=s/.*-snapshot//i" \
http://www.ffmpeg.org/releases/ffmpeg-(.*)\.tar\.bz2
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment