r209 - / feisty feisty/ffmpeg feisty/ffmpeg/debian
feisty/ffmpeg/debian/patches
siretart at alioth.debian.org
siretart at alioth.debian.org
Fri Mar 16 23:51:34 CET 2007
Author: siretart
Date: 2007-03-16 17:23:41 +0000 (Fri, 16 Mar 2007)
New Revision: 209
Added:
feisty/
feisty/ffmpeg/
feisty/ffmpeg/debian/
feisty/ffmpeg/debian/README.Debian
feisty/ffmpeg/debian/changelog
feisty/ffmpeg/debian/compat
feisty/ffmpeg/debian/control
feisty/ffmpeg/debian/copyright
feisty/ffmpeg/debian/ffmpeg.install
feisty/ffmpeg/debian/libavcodec-dev.install
feisty/ffmpeg/debian/libavcodec1d.install
feisty/ffmpeg/debian/libavformat-dev.install
feisty/ffmpeg/debian/libavformat1d.install
feisty/ffmpeg/debian/libavutil-dev.install
feisty/ffmpeg/debian/libavutil1d.install
feisty/ffmpeg/debian/libpostproc-dev.install
feisty/ffmpeg/debian/libpostproc1d.install
feisty/ffmpeg/debian/libswscale-dev.install
feisty/ffmpeg/debian/libswscale1d.install
feisty/ffmpeg/debian/patches/
feisty/ffmpeg/debian/patches/005_altivec_flags.diff
feisty/ffmpeg/debian/patches/005_m68k_workaround.diff
feisty/ffmpeg/debian/patches/005_runtime_cpudetect.diff
feisty/ffmpeg/debian/patches/006_mips_pthreads.diff
feisty/ffmpeg/debian/patches/010_ffmpeg-config.diff
feisty/ffmpeg/debian/patches/010_proper_rpath.diff
feisty/ffmpeg/debian/patches/010_shared_library_versioning.diff
feisty/ffmpeg/debian/patches/011_link_plugins.diff
feisty/ffmpeg/debian/patches/013_strip_unneeded_linker_flags.diff
feisty/ffmpeg/debian/patches/020_disable_snow_mmx_in_pic.diff
feisty/ffmpeg/debian/patches/020_mmx_intrinsics.diff
feisty/ffmpeg/debian/patches/020_mmx_optims.diff
feisty/ffmpeg/debian/patches/020_mmx_pic_code.diff
feisty/ffmpeg/debian/patches/040_early_altivec_detection.diff
feisty/ffmpeg/debian/patches/040_only_use_maltivec_when_needed.diff
feisty/ffmpeg/debian/patches/060_fix_avi_skip.diff
feisty/ffmpeg/debian/patches/series
feisty/ffmpeg/debian/patents.txt
feisty/ffmpeg/debian/rules
Log:
branch 1:1 from debian/experimental branch in same repo
Added: feisty/ffmpeg/debian/README.Debian
===================================================================
--- feisty/ffmpeg/debian/README.Debian 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/README.Debian 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,41 @@
+Notes for the Debian ffmpeg packages
+====================================
+
+ The license for the whole work is the GPL, not the LGPL, because GPL-only
+parts of ffmpeg were activated. If you need LGPL versions of the libraries,
+please contact me.
+
+
+Summary of the patent issues with ffmpeg
+========================================
+
+ The only patents related to ffmpeg which seem to be enforced against open
+source software cover the following codec technologies and file formats:
+
+ * MP3 encoding
+ * AAC decoding and encoding
+ * the ASF file format
+
+ I did not activate MP3 encoding (through LAME) in libavcodec, nor AAC
+support (through FAAC/FAAD). However, since I have found no real enforcement
+of the mysterious ASF file format patents, I did not deactivate ASF support in
+libavformat. See more details in the patents.txt file.
+
+
+Differences with unofficial ffmpeg packages
+===========================================
+
+ There are popular unofficial ffmpeg packages at the following URL:
+
+ ftp://ftp.nerim.net/debian-marillat/index.html
+
+ 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 at zoy.org> Thu, 30 Mar 2006 10:23:16 +0200
Added: feisty/ffmpeg/debian/changelog
===================================================================
--- feisty/ffmpeg/debian/changelog 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/changelog 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,475 @@
+ffmpeg (0.cvs20070307-3) UNRELEASED; urgency=low
+
+ * debian/control:
+ + Set pkg-multimedia-maintainers as main maintainer.
+ + Updated VCS fields.
+
+ -- Sam Hocevar (Debian packages) <sam+deb at 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 at 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 at 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 at zoy.org> Thu, 8 Mar 2007 17:51:37 +0100
+
+ffmpeg (0.cvs20060823-6) unstable; urgency=high
+
+ * Upload to unstable.
+
+ -- Loic Minier <lool at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at zoy.org> Fri, 16 Jul 2004 12:47:27 +0200
+
Added: feisty/ffmpeg/debian/compat
===================================================================
--- feisty/ffmpeg/debian/compat 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/compat 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1 @@
+4
Added: feisty/ffmpeg/debian/control
===================================================================
--- feisty/ffmpeg/debian/control 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/control 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,132 @@
+Source: ffmpeg
+Section: libs
+Priority: optional
+Maintainer: Debian multimedia packages maintainers <pkg-multimedia-maintainers at lists.alioth.debian.org>
+Uploaders: Sam Hocevar (Debian packages) <sam+deb at zoy.org>, Loic Minier <lool at dooz.org>
+Build-Depends: debhelper (>= 4.0), quilt, libogg-dev, libvorbis-dev, liba52-dev, libdts-dev, zlib1g-dev, libsdl1.2-dev, libfreetype6-dev, libimlib2-dev, texi2html, libraw1394-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], libdc1394-13-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], libtheora-dev (>> 0.0.0.alpha4), libgsm1-dev, libx264-dev
+Standards-Version: 3.7.2
+XS-Vcs-Svn: svn://svn.debian.org/pkg-multimedia/experimental/ffmpeg
+XS-Vcs-Browser: http://svn.debian.org/wsvn/pkg-multimedia/experimental/ffmpeg/
+
+Package: ffmpeg
+Section: graphics
+Architecture: any
+Depends: ${shlibs: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: libavutil1d
+Section: libs
+Architecture: any
+Depends: ${shlibs: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 libswscale shared
+ object that should only be used by Debian packages.
+
+Package: libavcodec1d
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+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: libpostproc1d
+Section: libs
+Architecture: any
+Depends: ${shlibs: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: libavformat1d
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+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: libswscale1d
+Section: libs
+Architecture: any
+Depends: ${shlibs: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: libavutil1d (= ${Source-Version}), ${shlibs:Depends}
+Conflicts: libavformat-dev (<< 0.cvs20060329-4), libavcodec-dev (<< 0.cvs20070307-1)
+Replaces: libavformat-dev (<< 0.cvs20060329-4), libavcodec-dev (<< 0.cvs20070307-1)
+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: libavcodec1d (= ${Source-Version}), libavutil-dev (= ${Source-Version}), libvorbis-dev, libogg-dev, libdts-dev, liba52-dev, zlib1g-dev, ${lib1394-dev}, libtheora-dev (>> 0.0.0.alpha4), libgsm1-dev, ${shlibs:Depends}
+Conflicts: libavformat-dev (<< 0.cvs20060329-4)
+Replaces: libavformat-dev (<< 0.cvs20060329-4)
+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: libpostproc-dev
+Section: libdevel
+Architecture: any
+Depends: libpostproc1d (= ${Source-Version}), libavcodec-dev (= ${Source-Version}), ${shlibs: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: libavformat-dev
+Section: libdevel
+Architecture: any
+Depends: libavformat1d (= ${Source-Version}), libavcodec-dev (= ${Source-Version}), ${shlibs:Depends}
+Conflicts: libavcodec-dev (<< 0.cvs20060306-1)
+Replaces: libavcodec-dev (<< 0.cvs20060306-1)
+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: libswscale-dev
+Section: libdevel
+Architecture: any
+Depends: libswscale1d (= ${Source-Version}), libavutil-dev (= ${Source-Version}), ${shlibs: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.
+
Added: feisty/ffmpeg/debian/copyright
===================================================================
--- feisty/ffmpeg/debian/copyright 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/copyright 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,95 @@
+This package was downloaded from the ffmpeg CVS by Sam Hocevar <sam at zoy.org>.
+
+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'.
+
Added: feisty/ffmpeg/debian/ffmpeg.install
===================================================================
--- feisty/ffmpeg/debian/ffmpeg.install 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/ffmpeg.install 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,9 @@
+etc/ffserver.conf
+usr/lib/vhook
+usr/bin/ffmpeg
+usr/bin/ffserver
+usr/bin/ffplay
+usr/share/doc/ffmpeg
+usr/share/man/man1/ffmpeg.1
+usr/share/man/man1/ffserver.1
+usr/share/man/man1/ffplay.1
Added: feisty/ffmpeg/debian/libavcodec-dev.install
===================================================================
--- feisty/ffmpeg/debian/libavcodec-dev.install 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/libavcodec-dev.install 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,5 @@
+usr/lib/pkgconfig/libavcodec.pc
+usr/include/ffmpeg/avcodec.h
+usr/include/ffmpeg/dsputil.h
+usr/lib/libavcodec.a
+usr/lib/libavcodec.so
Added: feisty/ffmpeg/debian/libavcodec1d.install
===================================================================
--- feisty/ffmpeg/debian/libavcodec1d.install 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/libavcodec1d.install 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1 @@
+usr/lib/libavcodec.so.*
Added: feisty/ffmpeg/debian/libavformat-dev.install
===================================================================
--- feisty/ffmpeg/debian/libavformat-dev.install 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/libavformat-dev.install 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,8 @@
+usr/lib/pkgconfig/libavformat.pc
+usr/include/ffmpeg/avformat.h
+usr/include/ffmpeg/avio.h
+usr/include/ffmpeg/rtp.h
+usr/include/ffmpeg/rtsp.h
+usr/include/ffmpeg/rtspcodes.h
+usr/lib/libavformat.a
+usr/lib/libavformat.so
Added: feisty/ffmpeg/debian/libavformat1d.install
===================================================================
--- feisty/ffmpeg/debian/libavformat1d.install 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/libavformat1d.install 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1 @@
+usr/lib/libavformat.so.*
Added: feisty/ffmpeg/debian/libavutil-dev.install
===================================================================
--- feisty/ffmpeg/debian/libavutil-dev.install 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/libavutil-dev.install 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,18 @@
+usr/bin/ffmpeg-config
+usr/share/man/man1/ffmpeg-config.1
+usr/lib/pkgconfig/libavutil.pc
+usr/include/ffmpeg/avutil.h
+usr/include/ffmpeg/adler32.h
+usr/include/ffmpeg/common.h
+usr/include/ffmpeg/fifo.h
+usr/include/ffmpeg/integer.h
+usr/include/ffmpeg/intfloat_readwrite.h
+usr/include/ffmpeg/log.h
+usr/include/ffmpeg/lzo.h
+usr/include/ffmpeg/mathematics.h
+usr/include/ffmpeg/md5.h
+usr/include/ffmpeg/opt.h
+usr/include/ffmpeg/random.h
+usr/include/ffmpeg/rational.h
+usr/lib/libavutil.a
+usr/lib/libavutil.so
Added: feisty/ffmpeg/debian/libavutil1d.install
===================================================================
--- feisty/ffmpeg/debian/libavutil1d.install 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/libavutil1d.install 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1 @@
+usr/lib/libavutil.so.*
Added: feisty/ffmpeg/debian/libpostproc-dev.install
===================================================================
--- feisty/ffmpeg/debian/libpostproc-dev.install 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/libpostproc-dev.install 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,4 @@
+usr/lib/pkgconfig/libpostproc.pc
+usr/include/postproc/postprocess.h
+usr/lib/libpostproc.a
+usr/lib/libpostproc.so
Added: feisty/ffmpeg/debian/libpostproc1d.install
===================================================================
--- feisty/ffmpeg/debian/libpostproc1d.install 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/libpostproc1d.install 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1 @@
+usr/lib/libpostproc.so.*
Added: feisty/ffmpeg/debian/libswscale-dev.install
===================================================================
--- feisty/ffmpeg/debian/libswscale-dev.install 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/libswscale-dev.install 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,5 @@
+usr/lib/pkgconfig/libswscale.pc
+usr/include/ffmpeg/swscale.h
+usr/include/ffmpeg/rgb2rgb.h
+usr/lib/libswscale.a
+usr/lib/libswscale.so
Added: feisty/ffmpeg/debian/libswscale1d.install
===================================================================
--- feisty/ffmpeg/debian/libswscale1d.install 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/libswscale1d.install 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1 @@
+usr/lib/libswscale.so.*
Added: feisty/ffmpeg/debian/patches/005_altivec_flags.diff
===================================================================
--- feisty/ffmpeg/debian/patches/005_altivec_flags.diff 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/patches/005_altivec_flags.diff 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,13 @@
+Index: ffmpeg.svn/configure
+===================================================================
+--- ffmpeg.svn.orig/configure 2007-03-05 20:57:28.000000000 +0100
++++ ffmpeg.svn/configure 2007-03-05 20:57:34.000000000 +0100
+@@ -1446,7 +1446,7 @@
+ if test -n "`$cc -v 2>&1 | grep version | grep Apple`"; then
+ add_cflags "-faltivec"
+ else
+- add_cflags "-maltivec -mabi=altivec"
++ add_cflags "-maltivec"
+ fi
+ fi
+ fi
Added: feisty/ffmpeg/debian/patches/005_m68k_workaround.diff
===================================================================
--- feisty/ffmpeg/debian/patches/005_m68k_workaround.diff 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/patches/005_m68k_workaround.diff 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,13 @@
+Index: ffmpeg.svn/configure
+===================================================================
+--- ffmpeg.svn.orig/configure 2007-03-05 20:57:08.000000000 +0100
++++ ffmpeg.svn/configure 2007-03-05 20:57:28.000000000 +0100
+@@ -1827,6 +1827,8 @@
+ if test -n "`$cc -v 2>&1 | grep xlc`"; then
+ add_cflags "-O5"
+ add_ldflags "-O5"
++ elif test "$cpu" = "m68k" ; then
++ add_cflags "-O2"
+ else
+ add_cflags "-O3"
+ fi
Added: feisty/ffmpeg/debian/patches/005_runtime_cpudetect.diff
===================================================================
--- feisty/ffmpeg/debian/patches/005_runtime_cpudetect.diff 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/patches/005_runtime_cpudetect.diff 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,15 @@
+Index: ffmpeg.svn/configure
+===================================================================
+--- ffmpeg.svn.orig/configure 2007-03-05 20:45:57.000000000 +0100
++++ ffmpeg.svn/configure 2007-03-05 20:49:10.000000000 +0100
+@@ -2012,6 +2012,10 @@
+ echo "#define __CPU__ 586" >> $TMPH
+ fi
+
++if test "$cpu" != "m68k" -a "$cpu" != "x86" ; then
++ echo "#define RUNTIME_CPUDETECT 1" >> $TMPH
++fi
++
+ if enabled sdl; then
+ echo "SDL_LIBS=`"${SDL_CONFIG}" --libs`" >> config.mak
+ echo "SDL_CFLAGS=`"${SDL_CONFIG}" --cflags`" >> config.mak
Added: feisty/ffmpeg/debian/patches/006_mips_pthreads.diff
===================================================================
--- feisty/ffmpeg/debian/patches/006_mips_pthreads.diff 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/patches/006_mips_pthreads.diff 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,15 @@
+Index: ffmpeg.svn/configure
+===================================================================
+--- ffmpeg.svn.orig/configure 2007-03-05 20:57:37.000000000 +0100
++++ ffmpeg.svn/configure 2007-03-05 20:57:39.000000000 +0100
+@@ -1551,6 +1551,10 @@
+ # check for some common methods of building with pthread support
+ # do this before the optional library checks as some of them require pthreads
+ if enabled pthreads; then
++ if test "$targetos" = "Linux" -a \
++ "$cpu" = "mips" ; then
++ add_ldflags -lpthread
++ fi
+ if check_func pthread_create; then
+ :
+ elif check_func pthread_create -pthread; then
Added: feisty/ffmpeg/debian/patches/010_ffmpeg-config.diff
===================================================================
--- feisty/ffmpeg/debian/patches/010_ffmpeg-config.diff 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/patches/010_ffmpeg-config.diff 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,154 @@
+Index: ffmpeg-0.cvs20060625/ffmpeg-config.in
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ffmpeg-0.cvs20060625/ffmpeg-config.in 2006-06-25 20:22:31.000000000 +0200
+@@ -0,0 +1,92 @@
++#!/bin/sh
++
++# ffmpeg-config
++
++prefix="/usr"
++exec_prefix="/usr/bin"
++version="@VERSION@"
++
++include_dir="/usr/include/ffmpeg"
++lib_dir="/usr/lib"
++
++link_libs=""
++
++usage()
++{
++ cat <<EOF
++Usage: ffmpeg-config [OPTIONS]
++Options:
++ [--prefix]
++ [--cflags]
++ [--libs [avcodec] [avformat] [postproc]]
++ [--plugin-libs [avcodec] [avformat] [postproc]]
++ [--version]
++EOF
++ exit $1
++}
++
++if test $# -eq 0; then
++ usage 1 1>&2
++fi
++
++while test $# -gt 0; do
++ case $1 in
++ --prefix)
++ echo_prefix=yes
++ ;;
++
++ --cflags)
++ echo_cflags=yes
++ ;;
++
++ --libs | --plugin-libs)
++ echo_libs=yes
++ ;;
++
++ --version)
++ echo_version=yes
++ ;;
++
++ avcodec|avformat|postproc)
++ if test "$echo_libs" = "yes"; then
++ link_libs="$link_libs -l$1"
++ if test "$1" != "avcodec"; then
++ link_libs="$link_libs -lavcodec"
++ fi
++ link_libs="$link_libs -lavutil"
++ else
++ usage 1 1>&2
++ fi
++ ;;
++
++ *)
++ usage 1 1>&2
++ ;;
++ esac
++ shift
++done
++
++if test "$echo_prefix" = "yes"; then
++ echo $prefix
++fi
++
++cflags="-I$include_dir"
++link_libs="$link_libs -lvorbis -lvorbisenc -ltheora -logg -ldts -la52 @FIREWIRELIBS@ -lgsm -lz -lm"
++
++if test "$lib_dir" != "/usr/lib"; then
++ libs="-L$lib_dir"
++else
++ libs=""
++fi
++
++if test "$echo_cflags" = "yes"; then
++ echo $cflags
++fi
++
++if test "$echo_libs" = "yes"; then
++ echo $libs $link_libs
++fi
++
++if test "$echo_version" = "yes"; then
++ echo $version
++fi
+Index: ffmpeg-0.cvs20060625/ffmpeg-config.1
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ffmpeg-0.cvs20060625/ffmpeg-config.1 2006-06-25 20:22:31.000000000 +0200
+@@ -0,0 +1,52 @@
++.TH ffmpeg-config 1 "2004-07-16" "ffmpeg"
++.SH NAME
++ffmpeg-config \- script to get information about the installed version of ffmpeg
++.SH SYNOPSIS
++.B ffmpeg-config
++[ --prefix=
++.IR DIR ]
++[ --version ] [ --libs [<extensions>]] [ --plugin-libs [<extensions>]] [ --cflags ]
++.SH DESCRIPTION
++.B ffmpeg-config
++is a tool that is used to configure and determine the compiler and linker
++flags that should be used to compile and link progams, libraries, and
++plugins that use ffmpeg.
++.SH OPTIONS
++.TP
++.B --cflags
++Print the C compiler flags that are necessary to compile a program or library
++that uses ffmpeg.
++.TP
++.B --libs { avcodec | avformat | postproc }
++Print the linker flags that are necessary to link a program that uses
++libavcodec, libavformat or libpostproc.
++.TP
++.B --plugin-libs { avcodec | avformat | postproc }
++Print the linker flags that are necessary to link a shared object (such as a
++plugin for a program) that uses libavcodec, libavformat or libpostproc.
++.TP
++.BI --prefix= DIR
++If specified, use PREFIX instead of the installation prefix that ffmpeg
++was built with when computing the output for the --cflags, --libs and
++--plugin-libs options. This option must be specified before any of the
++--cflags, --libs and --plugin-libs options.
++.TP
++.B --version
++Prints the currently installed version of ffmpeg on standard output.
++.SH EXAMPLES
++.TP
++gcc -c main.c $(ffmpeg-config --cflags) -o main.o
++is how you might use
++.B ffmpeg-config
++to compile a C source file for an executable program.
++.TP
++gcc main.o util.o $(ffmpeg-config --libs avcodec) -o my_app
++is how you might use
++.B ffmpeg-config
++to link compiled objects into an executable program that uses libavcodec.
++Always make sure to mention libraries in the command line after objects
++referring to them.
++.SH AUTHOR
++This manual page was written for sdl-config by Branden Robinson, originally
++for Progeny Linux Systems, Inc., and the Debian Project. It was adapted to
++ffmpeg by Sam Hocevar.
Added: feisty/ffmpeg/debian/patches/010_proper_rpath.diff
===================================================================
--- feisty/ffmpeg/debian/patches/010_proper_rpath.diff 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/patches/010_proper_rpath.diff 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,13 @@
+Index: ffmpeg-0.cvs20070307/configure
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/configure 2007-03-09 15:42:57.000000000 +0100
++++ ffmpeg-0.cvs20070307/configure 2007-03-09 15:44:13.000000000 +0100
+@@ -820,7 +820,7 @@
+ VHOOKSHFLAGS='$(SHFLAGS)'
+ LIBOBJFLAGS=""
+ FFLDFLAGS=-Wl,--warn-common
+-LDLATEFLAGS='-Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil'
++LDLATEFLAGS='-L\$(BUILD_ROOT)/libavcodec -L\$(BUILD_ROOT)/libavformat -L\$(BUILD_ROOT)/libavutil -L\$(BUILD_ROOT)/libswscale -Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil -Wl,-rpath-link,\$(BUILD_ROOT)/libswscale'
+ FFSERVERLDFLAGS=-Wl,-E
+ LDCONFIG="ldconfig"
+ LIBPREF="lib"
Added: feisty/ffmpeg/debian/patches/010_shared_library_versioning.diff
===================================================================
--- feisty/ffmpeg/debian/patches/010_shared_library_versioning.diff 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/patches/010_shared_library_versioning.diff 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,123 @@
+Index: ffmpeg-0.cvs20070307/configure
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/configure 2007-03-09 17:07:42.000000000 +0100
++++ ffmpeg-0.cvs20070307/configure 2007-03-09 17:18:29.000000000 +0100
+@@ -1924,11 +1924,11 @@
+ echo "BUILD_DOC=yes" >> config.mak
+ fi
+
+-sws_version=`grep '#define LIBSWSCALE_VERSION ' "$source_path/libswscale/swscale.h" | sed 's/[^0-9\.]//g'`
+-pp_version=`grep '#define LIBPOSTPROC_VERSION ' "$source_path/libpostproc/postprocess.h" | sed 's/[^0-9\.]//g'`
+-lavc_version=`grep '#define LIBAVCODEC_VERSION ' "$source_path/libavcodec/avcodec.h" | sed 's/[^0-9\.]//g'`
+-lavf_version=`grep '#define LIBAVFORMAT_VERSION ' "$source_path/libavformat/avformat.h" | sed 's/[^0-9\.]//g'`
+-lavu_version=`grep '#define LIBAVUTIL_VERSION ' "$source_path/libavutil/avutil.h" | sed 's/[^0-9\.]//g'`
++sws_version=`grep '#define LIBSWSCALE_VERSION ' "$source_path/libswscale/swscale.h" | sed 's/[^0-9\.]*//'`
++pp_version=`grep '#define LIBPOSTPROC_VERSION ' "$source_path/libpostproc/postprocess.h" | sed 's/[^0-9\.]*//'`
++lavc_version=`grep '#define LIBAVCODEC_VERSION ' "$source_path/libavcodec/avcodec.h" | sed 's/[^0-9\.]*//'`
++lavf_version=`grep '#define LIBAVFORMAT_VERSION ' "$source_path/libavformat/avformat.h" | sed 's/[^0-9\.]*//'`
++lavu_version=`grep '#define LIBAVUTIL_VERSION ' "$source_path/libavutil/avutil.h" | sed 's/[^0-9\.]*//'`
+
+
+
+@@ -2057,9 +2057,9 @@
+ pkgconfig_generate(){
+ name=$1
+ comment=$2
+-version=$3
++version=$(echo $3 | sed 's/\<[0-9][0-9]*d[.]//g')
+ libs=$4
+-requires=$5
++requires=$(echo $5 | sed 's/\<[0-9][0-9]*d[.]//g')
+ include=$6
+ cat <<EOF >$name.pc
+ prefix=$PREFIX
+@@ -2081,9 +2081,9 @@
+ name=$1
+ shortname=${name#lib}
+ comment=$2
+-version=$3
++version=$(echo $3 | sed 's/\<[0-9][0-9]*d[.]//g')
+ libs=$4
+-requires=$5
++requires=$(echo $5 | sed 's/\<[0-9][0-9]*d[.]//g')
+ cat <<EOF >$name-uninstalled.pc
+ prefix=
+ exec_prefix=
+Index: ffmpeg-0.cvs20070307/libavutil/avutil.h
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/libavutil/avutil.h 2007-03-07 14:37:01.000000000 +0100
++++ ffmpeg-0.cvs20070307/libavutil/avutil.h 2007-03-09 17:07:44.000000000 +0100
+@@ -35,7 +35,7 @@
+ #define AV_TOSTRING(s) #s
+
+ #define LIBAVUTIL_VERSION_INT ((49<<16)+(3<<8)+0)
+-#define LIBAVUTIL_VERSION 49.3.0
++#define LIBAVUTIL_VERSION 1d.49.3.0
+ #define LIBAVUTIL_BUILD LIBAVUTIL_VERSION_INT
+
+ #define LIBAVUTIL_IDENT "Lavu" AV_STRINGIFY(LIBAVUTIL_VERSION)
+Index: ffmpeg-0.cvs20070307/libavcodec/avcodec.h
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/libavcodec/avcodec.h 2007-03-07 14:37:04.000000000 +0100
++++ ffmpeg-0.cvs20070307/libavcodec/avcodec.h 2007-03-09 17:07:44.000000000 +0100
+@@ -38,7 +38,7 @@
+ #define AV_TOSTRING(s) #s
+
+ #define LIBAVCODEC_VERSION_INT ((51<<16)+(38<<8)+0)
+-#define LIBAVCODEC_VERSION 51.38.0
++#define LIBAVCODEC_VERSION 1d.51.38.0
+ #define LIBAVCODEC_BUILD LIBAVCODEC_VERSION_INT
+
+ #define LIBAVCODEC_IDENT "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION)
+Index: ffmpeg-0.cvs20070307/libavformat/avformat.h
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/libavformat/avformat.h 2007-03-07 14:37:06.000000000 +0100
++++ ffmpeg-0.cvs20070307/libavformat/avformat.h 2007-03-09 17:07:44.000000000 +0100
+@@ -26,7 +26,7 @@
+ #endif
+
+ #define LIBAVFORMAT_VERSION_INT ((51<<16)+(10<<8)+0)
+-#define LIBAVFORMAT_VERSION 51.10.0
++#define LIBAVFORMAT_VERSION 1d.51.10.0
+ #define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT
+
+ #define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION)
+Index: ffmpeg-0.cvs20070307/common.mak
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/common.mak 2007-03-07 14:37:06.000000000 +0100
++++ ffmpeg-0.cvs20070307/common.mak 2007-03-09 17:07:44.000000000 +0100
+@@ -68,7 +68,7 @@
+ cd "$(shlibdir)" && \
+ ln -sf $(SLIBNAME_WITH_VERSION) $(SLIBNAME_WITH_MAJOR)
+ cd "$(shlibdir)" && \
+- ln -sf $(SLIBNAME_WITH_VERSION) $(SLIBNAME)
++ ln -sf $(SLIBNAME_WITH_MAJOR) $(SLIBNAME)
+ $(SLIB_INSTALL_EXTRA_CMD)
+
+ install-lib-static: $(LIB)
+Index: ffmpeg-0.cvs20070307/libpostproc/postprocess.h
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/libpostproc/postprocess.h 2007-03-07 11:17:32.000000000 +0100
++++ ffmpeg-0.cvs20070307/libpostproc/postprocess.h 2007-03-09 17:07:44.000000000 +0100
+@@ -32,7 +32,7 @@
+ #endif
+
+ #define LIBPOSTPROC_VERSION_INT ((51<<16)+(1<<8)+0)
+-#define LIBPOSTPROC_VERSION 51.1.0
++#define LIBPOSTPROC_VERSION 1d.51.1.0
+ #define LIBPOSTPROC_BUILD LIBPOSTPROC_VERSION_INT
+
+ #define LIBPOSTPROC_IDENT "postproc" AV_STRINGIFY(LIBPOSTPROC_VERSION)
+Index: ffmpeg-0.cvs20070307/libswscale/swscale.h
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/libswscale/swscale.h 2007-03-07 11:17:32.000000000 +0100
++++ ffmpeg-0.cvs20070307/libswscale/swscale.h 2007-03-09 17:07:44.000000000 +0100
+@@ -37,7 +37,7 @@
+ #define AV_TOSTRING(s) #s
+
+ #define LIBSWSCALE_VERSION_INT ((0<<16)+(5<<8)+0)
+-#define LIBSWSCALE_VERSION 0.5.0
++#define LIBSWSCALE_VERSION 1d.0.5.0
+ #define LIBSWSCALE_BUILD LIBSWSCALE_VERSION_INT
+
+ #define LIBSWSCALE_IDENT "SwS" AV_STRINGIFY(LIBSWSCALE_VERSION)
Added: feisty/ffmpeg/debian/patches/011_link_plugins.diff
===================================================================
--- feisty/ffmpeg/debian/patches/011_link_plugins.diff 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/patches/011_link_plugins.diff 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,28 @@
+Index: ffmpeg-0.cvs20070307/vhook/Makefile
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/vhook/Makefile 2007-03-09 15:15:49.000000000 +0100
++++ ffmpeg-0.cvs20070307/vhook/Makefile 2007-03-09 15:42:19.000000000 +0100
+@@ -9,16 +9,21 @@
+ HOOKS=null$(SLIBSUF) fish$(SLIBSUF) ppm$(SLIBSUF) watermark$(SLIBSUF)
+ ALLHOOKS=$(HOOKS) imlib2$(SLIBSUF) drawtext$(SLIBSUF)
+
++LIBS_fish$(SLIBSUF) += -lavcodec -lswscale -lavformat
++LIBS_null$(SLIBSUF) += -lavcodec -lswscale
++LIBS_ppm$(SLIBSUF) += -lavcodec -lswscale -lavformat
++LIBS_watermark$(SLIBSUF) += -lavcodec -lswscale -lavformat
++
+ ifeq ($(HAVE_IMLIB2),yes)
+ HOOKS += imlib2$(SLIBSUF)
+ CFLAGS += `imlib2-config --cflags`
+- LIBS_imlib2$(SLIBSUF) = `imlib2-config --libs`
++ LIBS_imlib2$(SLIBSUF) = `imlib2-config --libs` -lswscale -lavcodec
+ endif
+
+ ifeq ($(HAVE_FREETYPE2),yes)
+ HOOKS += drawtext$(SLIBSUF)
+ CFLAGS += `freetype-config --cflags`
+- LIBS_drawtext$(SLIBSUF) = `freetype-config --libs`
++ LIBS_drawtext$(SLIBSUF) = `freetype-config --libs` -lavutil
+ endif
+
+ SRCS := $(HOOKS:$(SLIBSUF)=.c)
Added: feisty/ffmpeg/debian/patches/013_strip_unneeded_linker_flags.diff
===================================================================
--- feisty/ffmpeg/debian/patches/013_strip_unneeded_linker_flags.diff 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/patches/013_strip_unneeded_linker_flags.diff 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,20 @@
+Index: ffmpeg-0.cvs20070307/configure
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/configure 2007-03-09 17:23:30.000000000 +0100
++++ ffmpeg-0.cvs20070307/configure 2007-03-09 17:25:58.000000000 +0100
+@@ -2103,11 +2103,11 @@
+ pkgconfig_generate libavutil "FFmpeg utility library" "$lavu_version" -lavutil "" ffmpeg
+ pkgconfig_generate_uninstalled libavutil "FFmpeg utility library" "$lavu_version"
+
+-pkgconfig_generate libavcodec "FFmpeg codec library" "$lavc_version" "-lavcodec $extralibs" "$pkg_requires libavutil = $lavu_version" ffmpeg
+-pkgconfig_generate_uninstalled libavcodec "FFmpeg codec library" "$lavc_version" "$extralibs" "$pkg_requires libavutil = $lavu_version"
++pkgconfig_generate libavcodec "FFmpeg codec library" "$lavc_version" "-lavcodec" "$pkg_requires libavutil = $lavu_version" ffmpeg
++pkgconfig_generate_uninstalled libavcodec "FFmpeg codec library" "$lavc_version" "" "$pkg_requires libavutil = $lavu_version"
+
+-pkgconfig_generate libavformat "FFmpeg container format library" "$lavf_version" "-lavformat $extralibs" "$pkg_requires libavcodec = $lavc_version" ffmpeg
+-pkgconfig_generate_uninstalled libavformat "FFmpeg container format library" "$lavf_version" "$extralibs" "$pkg_requires libavcodec = $lavc_version"
++pkgconfig_generate libavformat "FFmpeg container format library" "$lavf_version" "-lavformat" "$pkg_requires libavcodec = $lavc_version" ffmpeg
++pkgconfig_generate_uninstalled libavformat "FFmpeg container format library" "$lavf_version" "" "$pkg_requires libavcodec = $lavc_version"
+
+ if enabled pp; then
+ pkgconfig_generate libpostproc "FFmpeg post processing library" "$pp_version" -lpostproc "" postproc
Added: feisty/ffmpeg/debian/patches/020_disable_snow_mmx_in_pic.diff
===================================================================
--- feisty/ffmpeg/debian/patches/020_disable_snow_mmx_in_pic.diff 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/patches/020_disable_snow_mmx_in_pic.diff 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,30 @@
+Index: ffmpeg-0.cvs20060724/libavcodec/i386/dsputil_mmx.c
+===================================================================
+--- ffmpeg-0.cvs20060724.orig/libavcodec/i386/dsputil_mmx.c 2006-07-24 17:22:05.000000000 +0200
++++ ffmpeg-0.cvs20060724/libavcodec/i386/dsputil_mmx.c 2006-07-24 17:22:11.000000000 +0200
+@@ -3095,7 +3095,7 @@
+ c->avg_h264_chroma_pixels_tab[1]= avg_h264_chroma_mc4_3dnow;
+ }
+
+-#ifdef CONFIG_SNOW_DECODER
++#if defined(CONFIG_SNOW_DECODER) && (defined(ARCH_X86_64) || !defined(PIC))
+ if(mm_flags & MM_SSE2){
+ c->horizontal_compose97i = ff_snow_horizontal_compose97i_sse2;
+ c->vertical_compose97i = ff_snow_vertical_compose97i_sse2;
+Index: ffmpeg-0.cvs20060724/libavcodec/i386/snowdsp_mmx.c
+===================================================================
+--- ffmpeg-0.cvs20060724.orig/libavcodec/i386/snowdsp_mmx.c 2006-07-24 17:11:17.000000000 +0200
++++ ffmpeg-0.cvs20060724/libavcodec/i386/snowdsp_mmx.c 2006-07-24 17:22:11.000000000 +0200
+@@ -21,6 +21,7 @@
+ #include "../snow.h"
+ #include "x86_cpu.h"
+
++#if defined(ARCH_X86_64) || !defined(PIC)
+ void ff_snow_horizontal_compose97i_sse2(DWTELEM *b, int width){
+ const int w2= (width+1)>>1;
+ // SSE2 code runs faster with pointers aligned on a 32-byte boundary.
+@@ -915,3 +916,4 @@
+ else
+ ff_snow_inner_add_yblock(obmc, obmc_stride, block, b_w, b_h, src_x,src_y, src_stride, sb, add, dst8);
+ }
++#endif
Added: feisty/ffmpeg/debian/patches/020_mmx_intrinsics.diff
===================================================================
--- feisty/ffmpeg/debian/patches/020_mmx_intrinsics.diff 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/patches/020_mmx_intrinsics.diff 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,75 @@
+Index: ffmpeg-0.cvs20060724/libavcodec/Makefile
+===================================================================
+--- ffmpeg-0.cvs20060724.orig/libavcodec/Makefile 2006-07-24 17:11:20.000000000 +0200
++++ ffmpeg-0.cvs20060724/libavcodec/Makefile 2006-07-24 17:22:05.000000000 +0200
+@@ -285,6 +285,8 @@
+ i386/idct_mmx.o i386/motion_est_mmx.o \
+ i386/simple_idct_mmx.o i386/fft_sse.o i386/vp3dsp_mmx.o \
+ i386/vp3dsp_sse2.o i386/fft_3dn.o i386/fft_3dn2.o i386/snowdsp_mmx.o
++i386/dsputil_mmx.o: CFLAGS+= -mmmx
++depend: CFLAGS+= -mmmx
+ ifeq ($(CONFIG_GPL),yes)
+ OBJS += i386/idct_mmx_xvid.o
+ endif
+Index: ffmpeg-0.cvs20060724/libavcodec/i386/dsputil_mmx.c
+===================================================================
+--- ffmpeg-0.cvs20060724.orig/libavcodec/i386/dsputil_mmx.c 2006-07-24 17:11:16.000000000 +0200
++++ ffmpeg-0.cvs20060724/libavcodec/i386/dsputil_mmx.c 2006-07-24 17:22:05.000000000 +0200
+@@ -26,6 +26,8 @@
+ #include "x86_cpu.h"
+ #include "mmx.h"
+
++#include <mmintrin.h>
++
+ //#undef NDEBUG
+ //#include <assert.h>
+
+@@ -624,32 +626,22 @@
+ }
+
+ static inline void transpose4x4(uint8_t *dst, uint8_t *src, int dst_stride, int src_stride){
+- asm volatile( //FIXME could save 1 instruction if done as 8x4 ...
+- "movd %4, %%mm0 \n\t"
+- "movd %5, %%mm1 \n\t"
+- "movd %6, %%mm2 \n\t"
+- "movd %7, %%mm3 \n\t"
+- "punpcklbw %%mm1, %%mm0 \n\t"
+- "punpcklbw %%mm3, %%mm2 \n\t"
+- "movq %%mm0, %%mm1 \n\t"
+- "punpcklwd %%mm2, %%mm0 \n\t"
+- "punpckhwd %%mm2, %%mm1 \n\t"
+- "movd %%mm0, %0 \n\t"
+- "punpckhdq %%mm0, %%mm0 \n\t"
+- "movd %%mm0, %1 \n\t"
+- "movd %%mm1, %2 \n\t"
+- "punpckhdq %%mm1, %%mm1 \n\t"
+- "movd %%mm1, %3 \n\t"
+-
+- : "=m" (*(uint32_t*)(dst + 0*dst_stride)),
+- "=m" (*(uint32_t*)(dst + 1*dst_stride)),
+- "=m" (*(uint32_t*)(dst + 2*dst_stride)),
+- "=m" (*(uint32_t*)(dst + 3*dst_stride))
+- : "m" (*(uint32_t*)(src + 0*src_stride)),
+- "m" (*(uint32_t*)(src + 1*src_stride)),
+- "m" (*(uint32_t*)(src + 2*src_stride)),
+- "m" (*(uint32_t*)(src + 3*src_stride))
+- );
++ __v8qi mm0, mm1, mm2, mm3;
++ mm0 = (__v8qi)(uint64_t)*(uint32_t*)(src + 0*src_stride);
++ mm1 = (__v8qi)(uint64_t)*(uint32_t*)(src + 1*src_stride);
++ mm2 = (__v8qi)(uint64_t)*(uint32_t*)(src + 2*src_stride);
++ mm3 = (__v8qi)(uint64_t)*(uint32_t*)(src + 3*src_stride);
++ mm0 = __builtin_ia32_punpcklbw(mm1, mm0);
++ mm2 = __builtin_ia32_punpcklbw(mm3, mm2);
++ mm1 = mm0;
++ mm0 = __builtin_ia32_punpckhwd(mm2, mm0);
++ mm1 = __builtin_ia32_punpckhwd(mm2, mm1);
++ *(uint32_t*)(dst + 0*dst_stride) = (uint64_t)mm0;
++ mm0 = __builtin_ia32_punpckhdq(mm0, mm0);
++ *(uint32_t*)(dst + 1*dst_stride) = (uint64_t)mm0;
++ *(uint32_t*)(dst + 2*dst_stride) = (uint64_t)mm1;
++ mm1 = __builtin_ia32_punpckhdq(mm1, mm1);
++ *(uint32_t*)(dst + 3*dst_stride) = (uint64_t)mm1;
+ }
+
+ static void h263_h_loop_filter_mmx(uint8_t *src, int stride, int qscale){
Added: feisty/ffmpeg/debian/patches/020_mmx_optims.diff
===================================================================
--- feisty/ffmpeg/debian/patches/020_mmx_optims.diff 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/patches/020_mmx_optims.diff 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,12 @@
+Index: ffmpeg-0.cvs20060724/libavcodec/Makefile
+===================================================================
+--- ffmpeg-0.cvs20060724.orig/libavcodec/Makefile 2006-07-24 17:11:20.000000000 +0200
++++ ffmpeg-0.cvs20060724/libavcodec/Makefile 2006-07-24 17:22:05.000000000 +0200
+@@ -285,6 +285,7 @@
+ i386/fft_3dn.o \
+ i386/fft_3dn2.o \
+
++i386/dsputil_mmx.o: CFLAGS+= -O3 # "-O2" isn't enough, nor is "-O2 -finline-functions -frename-registers" (so long for gcc documentation)
+ OBJS-$(CONFIG_GPL) += i386/idct_mmx.o
+ OBJS-$(CONFIG_CAVS_DECODER) += i386/cavsdsp_mmx.o
+ OBJS-$(CONFIG_SNOW_DECODER) += i386/snowdsp_mmx.o
Added: feisty/ffmpeg/debian/patches/020_mmx_pic_code.diff
===================================================================
--- feisty/ffmpeg/debian/patches/020_mmx_pic_code.diff 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/patches/020_mmx_pic_code.diff 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,172 @@
+Index: ffmpeg-0.cvs20060724/libavcodec/i386/mpegvideo_mmx_template.c
+===================================================================
+--- ffmpeg-0.cvs20060724.orig/libavcodec/i386/mpegvideo_mmx_template.c 2006-07-24 17:11:17.000000000 +0200
++++ ffmpeg-0.cvs20060724/libavcodec/i386/mpegvideo_mmx_template.c 2006-07-24 17:22:08.000000000 +0200
+@@ -108,7 +108,12 @@
+ SPREADW(%%mm3)
+ "pxor %%mm7, %%mm7 \n\t" // 0
+ "pxor %%mm4, %%mm4 \n\t" // 0
++#if defined(PIC) && !defined(ARCH_X86_64)
++ "movl %2, %%"REG_a" \n\t"
++ "movq (%%"REG_a"), %%mm5 \n\t" // qmat[0]
++#else
+ "movq (%2), %%mm5 \n\t" // qmat[0]
++#endif
+ "pxor %%mm6, %%mm6 \n\t"
+ "psubw (%3), %%mm6 \n\t" // -bias[0]
+ "mov $-128, %%"REG_a" \n\t"
+@@ -136,7 +141,11 @@
+ "movd %%mm3, %%"REG_a" \n\t"
+ "movzb %%al, %%"REG_a" \n\t" // last_non_zero_p1
+ : "+a" (last_non_zero_p1)
++#if defined(PIC) && !defined(ARCH_X86_64)
++ : "r" (block+64), "m" (qmat), "r" (bias),
++#else
+ : "r" (block+64), "r" (qmat), "r" (bias),
++#endif
+ "r" (inv_zigzag_direct16+64), "r" (temp_block+64)
+ );
+ // note the asm is split cuz gcc doesnt like that many operands ...
+@@ -150,6 +159,7 @@
+ : "g" (s->max_qcoeff)
+ );
+ }else{ // FMT_H263
++ const uint16_t *qmat_64 = qmat + 64;
+ asm volatile(
+ "movd %%"REG_a", %%mm3 \n\t" // last_non_zero_p1
+ SPREADW(%%mm3)
+@@ -165,7 +175,13 @@
+ "psubw %%mm1, %%mm0 \n\t" // ABS(block[i])
+ "movq (%3, %%"REG_a"), %%mm6 \n\t" // bias[0]
+ "paddusw %%mm6, %%mm0 \n\t" // ABS(block[i]) + bias[0]
++#if defined(PIC) && !defined(ARCH_X86_64)
++ "addl %2, %%"REG_a" \n\t"
++ "movq (%%"REG_a"), %%mm5 \n\t" // qmat[i]
++ "subl %2, %%"REG_a" \n\t"
++#else
+ "movq (%2, %%"REG_a"), %%mm5 \n\t" // qmat[i]
++#endif
+ "pmulhw %%mm5, %%mm0 \n\t" // (ABS(block[i])*qmat[0] + bias[0]*qmat[0])>>16
+ "por %%mm0, %%mm4 \n\t"
+ "pxor %%mm1, %%mm0 \n\t"
+@@ -182,7 +198,11 @@
+ "movd %%mm3, %%"REG_a" \n\t"
+ "movzb %%al, %%"REG_a" \n\t" // last_non_zero_p1
+ : "+a" (last_non_zero_p1)
++#if defined(PIC) && !defined(ARCH_X86_64)
++ : "r" (block+64), "m" (qmat_64), "r" (bias+64),
++#else
+ : "r" (block+64), "r" (qmat+64), "r" (bias+64),
++#endif
+ "r" (inv_zigzag_direct16+64), "r" (temp_block+64)
+ );
+ // note the asm is split cuz gcc doesnt like that many operands ...
+Index: ffmpeg-0.cvs20060724/libpostproc/postprocess_template.c
+===================================================================
+--- ffmpeg-0.cvs20060724.orig/libpostproc/postprocess_template.c 2006-06-11 14:17:36.000000000 +0200
++++ ffmpeg-0.cvs20060724/libpostproc/postprocess_template.c 2006-07-24 17:22:08.000000000 +0200
+@@ -33,9 +33,11 @@
+ # define ALIGN_MASK "$0xFFFFFFFFFFFFFFF8"
+ #else
+ # define REGa eax
++# define REGb ebx
+ # define REGc ecx
+ # define REGd edx
+ # define REG_a "eax"
++# define REG_b "ebx"
+ # define REG_c "ecx"
+ # define REG_d "edx"
+ # define REG_SP "esp"
+@@ -3201,7 +3203,12 @@
+ "movq (%%"REG_a"), %%mm2 \n\t" // packedYOffset
+ "movq 8(%%"REG_a"), %%mm3 \n\t" // packedYScale
+ "lea (%2,%4), %%"REG_a" \n\t"
++#if defined(PIC) && !defined(ARCH_X86_64)
++ "push %%"REG_b" \n\t"
++ "lea (%3,%5), %%"REG_b" \n\t"
++#else
+ "lea (%3,%5), %%"REG_d" \n\t"
++#endif
+ "pxor %%mm4, %%mm4 \n\t"
+ #ifdef HAVE_MMX2
+ #define REAL_SCALED_CPY(src1, src2, dst1, dst2) \
+@@ -3257,12 +3264,22 @@
+ #define SCALED_CPY(src1, src2, dst1, dst2)\
+ REAL_SCALED_CPY(src1, src2, dst1, dst2)
+
++#if defined(PIC) && !defined(ARCH_X86_64)
++SCALED_CPY((%2) , (%2, %4) , (%3) , (%3, %5))
++SCALED_CPY((%2, %4, 2), (%%REGa, %4, 2), (%3, %5, 2), (%%REGb, %5, 2))
++SCALED_CPY((%2, %4, 4), (%%REGa, %4, 4), (%3, %5, 4), (%%REGb, %5, 4))
++ "lea (%%"REG_a",%4,4), %%"REG_a" \n\t"
++ "lea (%%"REG_b",%5,4), %%"REG_b" \n\t"
++SCALED_CPY((%%REGa, %4), (%%REGa, %4, 2), (%%REGb, %5), (%%REGb, %5, 2))
++ "pop %%"REG_b" \n\t"
++#else
+ SCALED_CPY((%2) , (%2, %4) , (%3) , (%3, %5))
+ SCALED_CPY((%2, %4, 2), (%%REGa, %4, 2), (%3, %5, 2), (%%REGd, %5, 2))
+ SCALED_CPY((%2, %4, 4), (%%REGa, %4, 4), (%3, %5, 4), (%%REGd, %5, 4))
+ "lea (%%"REG_a",%4,4), %%"REG_a" \n\t"
+ "lea (%%"REG_d",%5,4), %%"REG_d" \n\t"
+ SCALED_CPY((%%REGa, %4), (%%REGa, %4, 2), (%%REGd, %5), (%%REGd, %5, 2))
++#endif
+
+
+ : "=&a" (packedOffsetAndScale)
+@@ -3271,7 +3288,10 @@
+ "r"(dst),
+ "r" ((long)srcStride),
+ "r" ((long)dstStride)
++#if defined(PIC) && !defined(ARCH_X86_64)
++#else
+ : "%"REG_d
++#endif
+ );
+ #else //HAVE_MMX
+ for(i=0; i<8; i++)
+@@ -3284,7 +3304,12 @@
+ #ifdef HAVE_MMX
+ asm volatile(
+ "lea (%0,%2), %%"REG_a" \n\t"
++#if defined(PIC) && !defined(ARCH_X86_64)
++ "push %%"REG_b" \n\t"
++ "lea (%1,%3), %%"REG_b" \n\t"
++#else
+ "lea (%1,%3), %%"REG_d" \n\t"
++#endif
+
+ #define REAL_SIMPLE_CPY(src1, src2, dst1, dst2) \
+ "movq " #src1 ", %%mm0 \n\t"\
+@@ -3295,18 +3320,32 @@
+ #define SIMPLE_CPY(src1, src2, dst1, dst2)\
+ REAL_SIMPLE_CPY(src1, src2, dst1, dst2)
+
++#if defined(PIC) && !defined(ARCH_X86_64)
++SIMPLE_CPY((%0) , (%0, %2) , (%1) , (%1, %3))
++SIMPLE_CPY((%0, %2, 2), (%%REGa, %2, 2), (%1, %3, 2), (%%REGb, %3, 2))
++SIMPLE_CPY((%0, %2, 4), (%%REGa, %2, 4), (%1, %3, 4), (%%REGb, %3, 4))
++ "lea (%%"REG_a",%2,4), %%"REG_a" \n\t"
++ "lea (%%"REG_b",%3,4), %%"REG_b" \n\t"
++SIMPLE_CPY((%%REGa, %2), (%%REGa, %2, 2), (%%REGb, %3), (%%REGb, %3, 2))
++ "pop %%"REG_b" \n\t"
++#else
+ SIMPLE_CPY((%0) , (%0, %2) , (%1) , (%1, %3))
+ SIMPLE_CPY((%0, %2, 2), (%%REGa, %2, 2), (%1, %3, 2), (%%REGd, %3, 2))
+ SIMPLE_CPY((%0, %2, 4), (%%REGa, %2, 4), (%1, %3, 4), (%%REGd, %3, 4))
+ "lea (%%"REG_a",%2,4), %%"REG_a" \n\t"
+ "lea (%%"REG_d",%3,4), %%"REG_d" \n\t"
+ SIMPLE_CPY((%%REGa, %2), (%%REGa, %2, 2), (%%REGd, %3), (%%REGd, %3, 2))
++#endif
+
+ : : "r" (src),
+ "r" (dst),
+ "r" ((long)srcStride),
+ "r" ((long)dstStride)
++#if defined(PIC) && !defined(ARCH_X86_64)
++ : "%"REG_a
++#else
+ : "%"REG_a, "%"REG_d
++#endif
+ );
+ #else //HAVE_MMX
+ for(i=0; i<8; i++)
Added: feisty/ffmpeg/debian/patches/040_early_altivec_detection.diff
===================================================================
--- feisty/ffmpeg/debian/patches/040_early_altivec_detection.diff 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/patches/040_early_altivec_detection.diff 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,55 @@
+Index: ffmpeg-0.cvs20070307/libavcodec/ppc/dsputil_altivec.c
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/libavcodec/ppc/dsputil_altivec.c 2007-03-07 11:17:31.000000000 +0100
++++ ffmpeg-0.cvs20070307/libavcodec/ppc/dsputil_altivec.c 2007-03-07 15:04:26.000000000 +0100
+@@ -1419,7 +1419,7 @@
+ return score;
+ }
+
+-int has_altivec(void)
++static int has_altivec_inner(void)
+ {
+ #ifdef __AMIGAOS4__
+ ULONG result = 0;
+@@ -1463,6 +1463,15 @@
+ #endif /* __AMIGAOS4__ */
+ }
+
++int has_altivec(void)
++{
++ static int has_it = -1;
++ if (has_it < 0) {
++ has_it = has_altivec_inner();
++ }
++ return has_it;
++}
++
+ static void vorbis_inverse_coupling_altivec(float *mag, float *ang,
+ int blocksize)
+ {
+Index: ffmpeg-0.cvs20070307/libavcodec/dsputil.c
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/libavcodec/dsputil.c 2007-03-07 14:37:04.000000000 +0100
++++ ffmpeg-0.cvs20070307/libavcodec/dsputil.c 2007-03-07 15:05:47.000000000 +0100
+@@ -34,6 +34,11 @@
+ #include "faandct.h"
+ #include "snow.h"
+
++/* For PPC Use */
++#if HAVE_ALTIVEC==1
++extern int has_altivec(void);
++#endif
++
+ /* snow.c */
+ void ff_spatial_dwt(int *buffer, int width, int height, int stride, int type, int decomposition_count);
+
+@@ -3793,6 +3798,9 @@
+ {
+ int i;
+
++#if HAVE_ALTIVEC==1
++ (void)has_altivec();
++#endif
+ for(i=0;i<256;i++) ff_cropTbl[i + MAX_NEG_CROP] = i;
+ for(i=0;i<MAX_NEG_CROP;i++) {
+ ff_cropTbl[i] = 0;
Added: feisty/ffmpeg/debian/patches/040_only_use_maltivec_when_needed.diff
===================================================================
--- feisty/ffmpeg/debian/patches/040_only_use_maltivec_when_needed.diff 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/patches/040_only_use_maltivec_when_needed.diff 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,1954 @@
+Index: ffmpeg-0.cvs20070307/configure
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/configure 2007-03-09 14:28:38.000000000 +0100
++++ ffmpeg-0.cvs20070307/configure 2007-03-09 14:28:38.000000000 +0100
+@@ -1410,11 +1410,13 @@
+ if test -n "`$cc -v 2>&1 | grep version | grep Apple`"; then
+ add_cflags "-faltivec"
+ else
+- add_cflags "-maltivec"
++ ALTIVECFLAGS="$ALTIVECFLAGS -maltivec"
+ fi
+ fi
+ fi
+
++save_flags
++temp_cflags $ALTIVECFLAGS
+ check_header altivec.h
+
+ # check if our compiler supports Motorola AltiVec C API
+@@ -1461,6 +1463,7 @@
+ }
+ EOF
+ fi
++restore_flags
+
+ # mmi only available on mips
+ if test $mmi = "default"; then
+@@ -1862,6 +1865,7 @@
+ fi
+
+ echo "OPTFLAGS=$CFLAGS" >> config.mak
++echo "ALTIVECFLAGS=$ALTIVECFLAGS" >> config.mak
+ echo "VHOOKCFLAGS=$VHOOKCFLAGS">>config.mak
+ echo "LDFLAGS=$LDFLAGS" >> config.mak
+ echo "LDCONFIG=$LDCONFIG" >> config.mak
+Index: ffmpeg-0.cvs20070307/libavcodec/Makefile
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/libavcodec/Makefile 2007-03-09 14:28:38.000000000 +0100
++++ ffmpeg-0.cvs20070307/libavcodec/Makefile 2007-03-09 14:28:38.000000000 +0100
+@@ -311,7 +311,8 @@
+ OBJS-$(HAVE_XVMC_ACCEL) += xvmcvideo.o
+
+ ifneq ($(CONFIG_SWSCALER),yes)
+-OBJS += imgresample.o
++OBJS += imgresample.o imgresample_altivec.o
++imgresample_altivec.o: CFLAGS+= $(ALTIVECFLAGS)
+ endif
+
+ # i386 mmx specific stuff
+@@ -387,11 +388,22 @@
+ ppc/fdct_altivec.o \
+ ppc/float_altivec.o \
+
++ppc/dsputil_altivec.o: CFLAGS+= $(ALTIVECFLAGS)
++ppc/mpegvideo_altivec.o: CFLAGS+= $(ALTIVECFLAGS)
++ppc/idct_altivec.o: CFLAGS+= $(ALTIVECFLAGS)
++ppc/fft_altivec.o: CFLAGS+= $(ALTIVECFLAGS)
++ppc/gmc_altivec.o: CFLAGS+= $(ALTIVECFLAGS)
++ppc/fdct_altivec.o: CFLAGS+= $(ALTIVECFLAGS)
++ppc/float_altivec.o: CFLAGS+= $(ALTIVECFLAGS)
++
+ ifeq ($(TARGET_ALTIVEC),yes)
+ OBJS-$(CONFIG_H264_DECODER) += ppc/h264_altivec.o
+ OBJS-$(CONFIG_SNOW_DECODER) += ppc/snow_altivec.o
+ OBJS-$(CONFIG_VC1_DECODER) += ppc/vc1dsp_altivec.o
+ OBJS-$(CONFIG_WMV3_DECODER) += ppc/vc1dsp_altivec.o
++ppc/h264_altivec.o: CFLAGS+= $(ALTIVECFLAGS)
++ppc/snow_altivec.o: CFLAGS+= $(ALTIVECFLAGS)
++ppc/vc1dsp_altivec.o: CFLAGS+= $(ALTIVECFLAGS)
+ endif
+
+ OBJS-$(TARGET_ARCH_BFIN) += bfin/dsputil_bfin.o \
+Index: ffmpeg-0.cvs20070307/libavcodec/dsputil.h
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/libavcodec/dsputil.h 2007-03-07 14:37:04.000000000 +0100
++++ ffmpeg-0.cvs20070307/libavcodec/dsputil.h 2007-03-09 14:28:38.000000000 +0100
+@@ -556,12 +556,6 @@
+
+ extern int mm_flags;
+
+-#if defined(HAVE_ALTIVEC) && !defined(CONFIG_DARWIN)
+-#define pixel altivec_pixel
+-#include <altivec.h>
+-#undef pixel
+-#endif
+-
+ #define DECLARE_ALIGNED_8(t,v) t v __attribute__ ((aligned (16)))
+ #define STRIDE_ALIGN 16
+
+Index: ffmpeg-0.cvs20070307/libavcodec/imgresample.c
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/libavcodec/imgresample.c 2007-03-07 14:37:04.000000000 +0100
++++ ffmpeg-0.cvs20070307/libavcodec/imgresample.c 2007-03-09 14:28:38.000000000 +0100
+@@ -284,133 +284,6 @@
+ }
+ #endif
+
+-#ifdef HAVE_ALTIVEC
+-typedef union {
+- vector unsigned char v;
+- unsigned char c[16];
+-} vec_uc_t;
+-
+-typedef union {
+- vector signed short v;
+- signed short s[8];
+-} vec_ss_t;
+-
+-void v_resample16_altivec(uint8_t *dst, int dst_width, const uint8_t *src,
+- int wrap, int16_t *filter)
+-{
+- int sum, i;
+- const uint8_t *s;
+- vector unsigned char *tv, tmp, dstv, zero;
+- vec_ss_t srchv[4], srclv[4], fv[4];
+- vector signed short zeros, sumhv, sumlv;
+- s = src;
+-
+- for(i=0;i<4;i++)
+- {
+- /*
+- The vec_madds later on does an implicit >>15 on the result.
+- Since FILTER_BITS is 8, and we have 15 bits of magnitude in
+- a signed short, we have just enough bits to pre-shift our
+- filter constants <<7 to compensate for vec_madds.
+- */
+- fv[i].s[0] = filter[i] << (15-FILTER_BITS);
+- fv[i].v = vec_splat(fv[i].v, 0);
+- }
+-
+- zero = vec_splat_u8(0);
+- zeros = vec_splat_s16(0);
+-
+-
+- /*
+- When we're resampling, we'd ideally like both our input buffers,
+- and output buffers to be 16-byte aligned, so we can do both aligned
+- reads and writes. Sadly we can't always have this at the moment, so
+- we opt for aligned writes, as unaligned writes have a huge overhead.
+- To do this, do enough scalar resamples to get dst 16-byte aligned.
+- */
+- i = (-(int)dst) & 0xf;
+- while(i>0) {
+- sum = s[0 * wrap] * filter[0] +
+- s[1 * wrap] * filter[1] +
+- s[2 * wrap] * filter[2] +
+- s[3 * wrap] * filter[3];
+- sum = sum >> FILTER_BITS;
+- if (sum<0) sum = 0; else if (sum>255) sum=255;
+- dst[0] = sum;
+- dst++;
+- s++;
+- dst_width--;
+- i--;
+- }
+-
+- /* Do our altivec resampling on 16 pixels at once. */
+- while(dst_width>=16) {
+- /*
+- Read 16 (potentially unaligned) bytes from each of
+- 4 lines into 4 vectors, and split them into shorts.
+- Interleave the multipy/accumulate for the resample
+- filter with the loads to hide the 3 cycle latency
+- the vec_madds have.
+- */
+- tv = (vector unsigned char *) &s[0 * wrap];
+- tmp = vec_perm(tv[0], tv[1], vec_lvsl(0, &s[i * wrap]));
+- srchv[0].v = (vector signed short) vec_mergeh(zero, tmp);
+- srclv[0].v = (vector signed short) vec_mergel(zero, tmp);
+- sumhv = vec_madds(srchv[0].v, fv[0].v, zeros);
+- sumlv = vec_madds(srclv[0].v, fv[0].v, zeros);
+-
+- tv = (vector unsigned char *) &s[1 * wrap];
+- tmp = vec_perm(tv[0], tv[1], vec_lvsl(0, &s[1 * wrap]));
+- srchv[1].v = (vector signed short) vec_mergeh(zero, tmp);
+- srclv[1].v = (vector signed short) vec_mergel(zero, tmp);
+- sumhv = vec_madds(srchv[1].v, fv[1].v, sumhv);
+- sumlv = vec_madds(srclv[1].v, fv[1].v, sumlv);
+-
+- tv = (vector unsigned char *) &s[2 * wrap];
+- tmp = vec_perm(tv[0], tv[1], vec_lvsl(0, &s[2 * wrap]));
+- srchv[2].v = (vector signed short) vec_mergeh(zero, tmp);
+- srclv[2].v = (vector signed short) vec_mergel(zero, tmp);
+- sumhv = vec_madds(srchv[2].v, fv[2].v, sumhv);
+- sumlv = vec_madds(srclv[2].v, fv[2].v, sumlv);
+-
+- tv = (vector unsigned char *) &s[3 * wrap];
+- tmp = vec_perm(tv[0], tv[1], vec_lvsl(0, &s[3 * wrap]));
+- srchv[3].v = (vector signed short) vec_mergeh(zero, tmp);
+- srclv[3].v = (vector signed short) vec_mergel(zero, tmp);
+- sumhv = vec_madds(srchv[3].v, fv[3].v, sumhv);
+- sumlv = vec_madds(srclv[3].v, fv[3].v, sumlv);
+-
+- /*
+- Pack the results into our destination vector,
+- and do an aligned write of that back to memory.
+- */
+- dstv = vec_packsu(sumhv, sumlv) ;
+- vec_st(dstv, 0, (vector unsigned char *) dst);
+-
+- dst+=16;
+- s+=16;
+- dst_width-=16;
+- }
+-
+- /*
+- If there are any leftover pixels, resample them
+- with the slow scalar method.
+- */
+- while(dst_width>0) {
+- sum = s[0 * wrap] * filter[0] +
+- s[1 * wrap] * filter[1] +
+- s[2 * wrap] * filter[2] +
+- s[3 * wrap] * filter[3];
+- sum = sum >> FILTER_BITS;
+- if (sum<0) sum = 0; else if (sum>255) sum=255;
+- dst[0] = sum;
+- dst++;
+- s++;
+- dst_width--;
+- }
+-}
+-#endif
+-
+ /* slow version to handle limit cases. Does not need optimisation */
+ static void h_resample_slow(uint8_t *dst, int dst_width,
+ const uint8_t *src, int src_width,
+Index: ffmpeg-0.cvs20070307/libavcodec/imgresample_altivec.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ffmpeg-0.cvs20070307/libavcodec/imgresample_altivec.c 2007-03-09 14:28:38.000000000 +0100
+@@ -0,0 +1,164 @@
++/*
++ * High quality image resampling with polyphase filters
++ * Copyright (c) 2001 Fabrice Bellard.
++ *
++ * 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 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 Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++/**
++ * @file imgresample_altivec.c
++ * High quality image resampling with polyphase filters, AltiVec version.
++ */
++
++#include "avcodec.h"
++#include "swscale.h"
++#include "dsputil.h"
++
++#if defined(HAVE_ALTIVEC) && !defined(CONFIG_DARWIN)
++#define pixel altivec_pixel
++#include <altivec.h>
++#undef pixel
++#endif
++
++/* 6 bits precision is needed for MMX */
++#define FILTER_BITS 8
++
++#ifdef HAVE_ALTIVEC
++typedef union {
++ vector unsigned char v;
++ unsigned char c[16];
++} vec_uc_t;
++
++typedef union {
++ vector signed short v;
++ signed short s[8];
++} vec_ss_t;
++
++void v_resample16_altivec(uint8_t *dst, int dst_width, const uint8_t *src,
++ int wrap, int16_t *filter)
++{
++ int sum, i;
++ const uint8_t *s;
++ vector unsigned char *tv, tmp, dstv, zero;
++ vec_ss_t srchv[4], srclv[4], fv[4];
++ vector signed short zeros, sumhv, sumlv;
++ s = src;
++
++ for(i=0;i<4;i++)
++ {
++ /*
++ The vec_madds later on does an implicit >>15 on the result.
++ Since FILTER_BITS is 8, and we have 15 bits of magnitude in
++ a signed short, we have just enough bits to pre-shift our
++ filter constants <<7 to compensate for vec_madds.
++ */
++ fv[i].s[0] = filter[i] << (15-FILTER_BITS);
++ fv[i].v = vec_splat(fv[i].v, 0);
++ }
++
++ zero = vec_splat_u8(0);
++ zeros = vec_splat_s16(0);
++
++
++ /*
++ When we're resampling, we'd ideally like both our input buffers,
++ and output buffers to be 16-byte aligned, so we can do both aligned
++ reads and writes. Sadly we can't always have this at the moment, so
++ we opt for aligned writes, as unaligned writes have a huge overhead.
++ To do this, do enough scalar resamples to get dst 16-byte aligned.
++ */
++ i = (-(int)dst) & 0xf;
++ while(i>0) {
++ sum = s[0 * wrap] * filter[0] +
++ s[1 * wrap] * filter[1] +
++ s[2 * wrap] * filter[2] +
++ s[3 * wrap] * filter[3];
++ sum = sum >> FILTER_BITS;
++ if (sum<0) sum = 0; else if (sum>255) sum=255;
++ dst[0] = sum;
++ dst++;
++ s++;
++ dst_width--;
++ i--;
++ }
++
++ /* Do our altivec resampling on 16 pixels at once. */
++ while(dst_width>=16) {
++ /*
++ Read 16 (potentially unaligned) bytes from each of
++ 4 lines into 4 vectors, and split them into shorts.
++ Interleave the multipy/accumulate for the resample
++ filter with the loads to hide the 3 cycle latency
++ the vec_madds have.
++ */
++ tv = (vector unsigned char *) &s[0 * wrap];
++ tmp = vec_perm(tv[0], tv[1], vec_lvsl(0, &s[i * wrap]));
++ srchv[0].v = (vector signed short) vec_mergeh(zero, tmp);
++ srclv[0].v = (vector signed short) vec_mergel(zero, tmp);
++ sumhv = vec_madds(srchv[0].v, fv[0].v, zeros);
++ sumlv = vec_madds(srclv[0].v, fv[0].v, zeros);
++
++ tv = (vector unsigned char *) &s[1 * wrap];
++ tmp = vec_perm(tv[0], tv[1], vec_lvsl(0, &s[1 * wrap]));
++ srchv[1].v = (vector signed short) vec_mergeh(zero, tmp);
++ srclv[1].v = (vector signed short) vec_mergel(zero, tmp);
++ sumhv = vec_madds(srchv[1].v, fv[1].v, sumhv);
++ sumlv = vec_madds(srclv[1].v, fv[1].v, sumlv);
++
++ tv = (vector unsigned char *) &s[2 * wrap];
++ tmp = vec_perm(tv[0], tv[1], vec_lvsl(0, &s[2 * wrap]));
++ srchv[2].v = (vector signed short) vec_mergeh(zero, tmp);
++ srclv[2].v = (vector signed short) vec_mergel(zero, tmp);
++ sumhv = vec_madds(srchv[2].v, fv[2].v, sumhv);
++ sumlv = vec_madds(srclv[2].v, fv[2].v, sumlv);
++
++ tv = (vector unsigned char *) &s[3 * wrap];
++ tmp = vec_perm(tv[0], tv[1], vec_lvsl(0, &s[3 * wrap]));
++ srchv[3].v = (vector signed short) vec_mergeh(zero, tmp);
++ srclv[3].v = (vector signed short) vec_mergel(zero, tmp);
++ sumhv = vec_madds(srchv[3].v, fv[3].v, sumhv);
++ sumlv = vec_madds(srclv[3].v, fv[3].v, sumlv);
++
++ /*
++ Pack the results into our destination vector,
++ and do an aligned write of that back to memory.
++ */
++ dstv = vec_packsu(sumhv, sumlv) ;
++ vec_st(dstv, 0, (vector unsigned char *) dst);
++
++ dst+=16;
++ s+=16;
++ dst_width-=16;
++ }
++
++ /*
++ If there are any leftover pixels, resample them
++ with the slow scalar method.
++ */
++ while(dst_width>0) {
++ sum = s[0 * wrap] * filter[0] +
++ s[1 * wrap] * filter[1] +
++ s[2 * wrap] * filter[2] +
++ s[3 * wrap] * filter[3];
++ sum = sum >> FILTER_BITS;
++ if (sum<0) sum = 0; else if (sum>255) sum=255;
++ dst[0] = sum;
++ dst++;
++ s++;
++ dst_width--;
++ }
++}
++#endif
++
+Index: ffmpeg-0.cvs20070307/libpostproc/Makefile
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/libpostproc/Makefile 2007-03-07 14:37:04.000000000 +0100
++++ ffmpeg-0.cvs20070307/libpostproc/Makefile 2007-03-09 14:28:38.000000000 +0100
+@@ -10,8 +10,10 @@
+ LIBVERSION=$(SPPVERSION)
+ LIBMAJOR=$(SPPMAJOR)
+
+-STATIC_OBJS=postprocess.o
+-SHARED_OBJS=postprocess_pic.o
++STATIC_OBJS=postprocess.o postprocess_altivec.o
++SHARED_OBJS=postprocess_pic.o postprocess_altivec_pic.o
++postprocess_altivec.o: CFLAGS+= $(ALTIVECFLAGS)
++postprocess_altivec_pic.o: CFLAGS+= $(ALTIVECFLAGS)
+
+ HEADERS = postprocess.h
+
+@@ -21,4 +23,6 @@
+
+ postprocess_pic.o: postprocess.c
+ $(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -o $@ $<
++postprocess_altivec_pic.o: postprocess_altivec.c
++ $(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -o $@ $<
+
+Index: ffmpeg-0.cvs20070307/libpostproc/postprocess.c
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/libpostproc/postprocess.c 2007-03-07 11:17:32.000000000 +0100
++++ ffmpeg-0.cvs20070307/libpostproc/postprocess.c 2007-03-09 14:28:38.000000000 +0100
+@@ -95,10 +95,6 @@
+
+ #include "mangle.h" //FIXME should be supressed
+
+-#ifdef HAVE_ALTIVEC_H
+-#include <altivec.h>
+-#endif
+-
+ #define GET_MODE_BUFFER_SIZE 500
+ #define OPTIONS_ARRAY_SIZE 10
+ #define BLOCK_SIZE 8
+@@ -614,8 +610,9 @@
+ #undef RENAME
+ #define HAVE_ALTIVEC
+ #define RENAME(a) a ## _altivec
+-#include "postprocess_altivec_template.c"
+-#include "postprocess_template.c"
++//#include "postprocess_altivec_template.c"
++//#include "postprocess_template.c"
++void RENAME(postProcess)(uint8_t src[], int srcStride, uint8_t dst[], int dstStride, int width, int height, QP_STORE_T QPs[], int QPStride, int isColor, PPContext *c);
+ #endif
+ #endif //ARCH_POWERPC
+
+Index: ffmpeg-0.cvs20070307/libpostproc/postprocess_altivec.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ffmpeg-0.cvs20070307/libpostproc/postprocess_altivec.c 2007-03-09 14:28:38.000000000 +0100
+@@ -0,0 +1,614 @@
++/*
++ Copyright (C) 2001-2003 Michael Niedermayer (michaelni at gmx.at)
++
++ AltiVec optimizations (C) 2004 Romain Dolbeau <romain at dolbeau.org>
++
++ 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
++*/
++
++/**
++ * @file postprocess.c
++ * postprocessing.
++ */
++
++/*
++ C MMX MMX2 3DNow AltiVec
++isVertDC Ec Ec Ec
++isVertMinMaxOk Ec Ec Ec
++doVertLowPass E e e Ec
++doVertDefFilter Ec Ec e e Ec
++isHorizDC Ec Ec Ec
++isHorizMinMaxOk a E Ec
++doHorizLowPass E e e Ec
++doHorizDefFilter Ec Ec e e Ec
++do_a_deblock Ec E Ec E
++deRing E e e* Ecp
++Vertical RKAlgo1 E a a
++Horizontal RKAlgo1 a a
++Vertical X1# a E E
++Horizontal X1# a E E
++LinIpolDeinterlace e E E*
++CubicIpolDeinterlace a e e*
++LinBlendDeinterlace e E E*
++MedianDeinterlace# E Ec Ec
++TempDeNoiser# E e e Ec
++
++* i dont have a 3dnow CPU -> its untested, but noone said it doesnt work so it seems to work
++# more or less selfinvented filters so the exactness isnt too meaningfull
++E = Exact implementation
++e = allmost exact implementation (slightly different rounding,...)
++a = alternative / approximate impl
++c = checked against the other implementations (-vo md5)
++p = partially optimized, still some work to do
++*/
++
++/*
++TODO:
++reduce the time wasted on the mem transfer
++unroll stuff if instructions depend too much on the prior one
++move YScale thing to the end instead of fixing QP
++write a faster and higher quality deblocking filter :)
++make the mainloop more flexible (variable number of blocks at once
++ (the if/else stuff per block is slowing things down)
++compare the quality & speed of all filters
++split this huge file
++optimize c versions
++try to unroll inner for(x=0 ... loop to avoid these damn if(x ... checks
++...
++*/
++
++//Changelog: use the Subversion log
++
++#include "config.h"
++#include <inttypes.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#ifdef HAVE_MALLOC_H
++#include <malloc.h>
++#endif
++//#undef HAVE_MMX2
++//#define HAVE_3DNOW
++//#undef HAVE_MMX
++//#undef ARCH_X86
++//#define DEBUG_BRIGHTNESS
++#ifdef USE_FASTMEMCPY
++#include "libvo/fastmemcpy.h"
++#endif
++#include "postprocess.h"
++#include "postprocess_internal.h"
++
++#include "mangle.h" //FIXME should be supressed
++
++#ifdef HAVE_ALTIVEC_H
++#include <altivec.h>
++#endif
++
++#ifndef HAVE_MEMALIGN
++#define memalign(a,b) malloc(b)
++#endif
++
++#define MIN(a,b) ((a) > (b) ? (b) : (a))
++#define MAX(a,b) ((a) < (b) ? (b) : (a))
++#define ABS(a) ((a) > 0 ? (a) : (-(a)))
++#define SIGN(a) ((a) > 0 ? 1 : -1)
++
++#define GET_MODE_BUFFER_SIZE 500
++#define OPTIONS_ARRAY_SIZE 10
++#define BLOCK_SIZE 8
++#define TEMP_STRIDE 8
++//#define NUM_BLOCKS_AT_ONCE 16 //not used yet
++
++#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
++# define attribute_used __attribute__((used))
++# define always_inline __attribute__((always_inline)) inline
++#else
++# define attribute_used
++# define always_inline inline
++#endif
++
++#if defined(ARCH_X86) || defined(ARCH_X86_64)
++static uint64_t __attribute__((aligned(8))) attribute_used w05= 0x0005000500050005LL;
++static uint64_t __attribute__((aligned(8))) attribute_used w04= 0x0004000400040004LL;
++static uint64_t __attribute__((aligned(8))) attribute_used w20= 0x0020002000200020LL;
++static uint64_t __attribute__((aligned(8))) attribute_used b00= 0x0000000000000000LL;
++static uint64_t __attribute__((aligned(8))) attribute_used b01= 0x0101010101010101LL;
++static uint64_t __attribute__((aligned(8))) attribute_used b02= 0x0202020202020202LL;
++static uint64_t __attribute__((aligned(8))) attribute_used b08= 0x0808080808080808LL;
++static uint64_t __attribute__((aligned(8))) attribute_used b80= 0x8080808080808080LL;
++#endif
++
++static uint8_t clip_table[3*256];
++static uint8_t * const clip_tab= clip_table + 256;
++
++static const int verbose= 0;
++
++static const int attribute_used deringThreshold= 20;
++
++
++static struct PPFilter filters[]=
++{
++ {"hb", "hdeblock", 1, 1, 3, H_DEBLOCK},
++ {"vb", "vdeblock", 1, 2, 4, V_DEBLOCK},
++/* {"hr", "rkhdeblock", 1, 1, 3, H_RK1_FILTER},
++ {"vr", "rkvdeblock", 1, 2, 4, V_RK1_FILTER},*/
++ {"h1", "x1hdeblock", 1, 1, 3, H_X1_FILTER},
++ {"v1", "x1vdeblock", 1, 2, 4, V_X1_FILTER},
++ {"ha", "ahdeblock", 1, 1, 3, H_A_DEBLOCK},
++ {"va", "avdeblock", 1, 2, 4, V_A_DEBLOCK},
++ {"dr", "dering", 1, 5, 6, DERING},
++ {"al", "autolevels", 0, 1, 2, LEVEL_FIX},
++ {"lb", "linblenddeint", 1, 1, 4, LINEAR_BLEND_DEINT_FILTER},
++ {"li", "linipoldeint", 1, 1, 4, LINEAR_IPOL_DEINT_FILTER},
++ {"ci", "cubicipoldeint", 1, 1, 4, CUBIC_IPOL_DEINT_FILTER},
++ {"md", "mediandeint", 1, 1, 4, MEDIAN_DEINT_FILTER},
++ {"fd", "ffmpegdeint", 1, 1, 4, FFMPEG_DEINT_FILTER},
++ {"l5", "lowpass5", 1, 1, 4, LOWPASS5_DEINT_FILTER},
++ {"tn", "tmpnoise", 1, 7, 8, TEMP_NOISE_FILTER},
++ {"fq", "forcequant", 1, 0, 0, FORCE_QUANT},
++ {NULL, NULL,0,0,0,0} //End Marker
++};
++
++static const char *replaceTable[]=
++{
++ "default", "hdeblock:a,vdeblock:a,dering:a",
++ "de", "hdeblock:a,vdeblock:a,dering:a",
++ "fast", "x1hdeblock:a,x1vdeblock:a,dering:a",
++ "fa", "x1hdeblock:a,x1vdeblock:a,dering:a",
++ "ac", "ha:a:128:7,va:a,dering:a",
++ NULL //End Marker
++};
++
++
++#if defined(ARCH_X86) || defined(ARCH_X86_64)
++static inline void prefetchnta(void *p)
++{
++ asm volatile( "prefetchnta (%0)\n\t"
++ : : "r" (p)
++ );
++}
++
++static inline void prefetcht0(void *p)
++{
++ asm volatile( "prefetcht0 (%0)\n\t"
++ : : "r" (p)
++ );
++}
++
++static inline void prefetcht1(void *p)
++{
++ asm volatile( "prefetcht1 (%0)\n\t"
++ : : "r" (p)
++ );
++}
++
++static inline void prefetcht2(void *p)
++{
++ asm volatile( "prefetcht2 (%0)\n\t"
++ : : "r" (p)
++ );
++}
++#endif
++
++// The horizontal Functions exist only in C cuz the MMX code is faster with vertical filters and transposing
++
++/**
++ * Check if the given 8x8 Block is mostly "flat"
++ */
++static inline int isHorizDC_C(uint8_t src[], int stride, PPContext *c)
++{
++ int numEq= 0;
++ int y;
++ const int dcOffset= ((c->nonBQP*c->ppMode.baseDcDiff)>>8) + 1;
++ const int dcThreshold= dcOffset*2 + 1;
++
++ for(y=0; y<BLOCK_SIZE; y++)
++ {
++ if(((unsigned)(src[0] - src[1] + dcOffset)) < dcThreshold) numEq++;
++ if(((unsigned)(src[1] - src[2] + dcOffset)) < dcThreshold) numEq++;
++ if(((unsigned)(src[2] - src[3] + dcOffset)) < dcThreshold) numEq++;
++ if(((unsigned)(src[3] - src[4] + dcOffset)) < dcThreshold) numEq++;
++ if(((unsigned)(src[4] - src[5] + dcOffset)) < dcThreshold) numEq++;
++ if(((unsigned)(src[5] - src[6] + dcOffset)) < dcThreshold) numEq++;
++ if(((unsigned)(src[6] - src[7] + dcOffset)) < dcThreshold) numEq++;
++ src+= stride;
++ }
++ return numEq > c->ppMode.flatnessThreshold;
++}
++
++/**
++ * Check if the middle 8x8 Block in the given 8x16 block is flat
++ */
++static inline int isVertDC_C(uint8_t src[], int stride, PPContext *c){
++ int numEq= 0;
++ int y;
++ const int dcOffset= ((c->nonBQP*c->ppMode.baseDcDiff)>>8) + 1;
++ const int dcThreshold= dcOffset*2 + 1;
++
++ src+= stride*4; // src points to begin of the 8x8 Block
++ for(y=0; y<BLOCK_SIZE-1; y++)
++ {
++ if(((unsigned)(src[0] - src[0+stride] + dcOffset)) < dcThreshold) numEq++;
++ if(((unsigned)(src[1] - src[1+stride] + dcOffset)) < dcThreshold) numEq++;
++ if(((unsigned)(src[2] - src[2+stride] + dcOffset)) < dcThreshold) numEq++;
++ if(((unsigned)(src[3] - src[3+stride] + dcOffset)) < dcThreshold) numEq++;
++ if(((unsigned)(src[4] - src[4+stride] + dcOffset)) < dcThreshold) numEq++;
++ if(((unsigned)(src[5] - src[5+stride] + dcOffset)) < dcThreshold) numEq++;
++ if(((unsigned)(src[6] - src[6+stride] + dcOffset)) < dcThreshold) numEq++;
++ if(((unsigned)(src[7] - src[7+stride] + dcOffset)) < dcThreshold) numEq++;
++ src+= stride;
++ }
++ return numEq > c->ppMode.flatnessThreshold;
++}
++
++static inline int isHorizMinMaxOk_C(uint8_t src[], int stride, int QP)
++{
++ int i;
++#if 1
++ for(i=0; i<2; i++){
++ if((unsigned)(src[0] - src[5] + 2*QP) > 4*QP) return 0;
++ src += stride;
++ if((unsigned)(src[2] - src[7] + 2*QP) > 4*QP) return 0;
++ src += stride;
++ if((unsigned)(src[4] - src[1] + 2*QP) > 4*QP) return 0;
++ src += stride;
++ if((unsigned)(src[6] - src[3] + 2*QP) > 4*QP) return 0;
++ src += stride;
++ }
++#else
++ for(i=0; i<8; i++){
++ if((unsigned)(src[0] - src[7] + 2*QP) > 4*QP) return 0;
++ src += stride;
++ }
++#endif
++ return 1;
++}
++
++static inline int isVertMinMaxOk_C(uint8_t src[], int stride, int QP)
++{
++#if 1
++#if 1
++ int x;
++ src+= stride*4;
++ for(x=0; x<BLOCK_SIZE; x+=4)
++ {
++ if((unsigned)(src[ x + 0*stride] - src[ x + 5*stride] + 2*QP) > 4*QP) return 0;
++ if((unsigned)(src[1+x + 2*stride] - src[1+x + 7*stride] + 2*QP) > 4*QP) return 0;
++ if((unsigned)(src[2+x + 4*stride] - src[2+x + 1*stride] + 2*QP) > 4*QP) return 0;
++ if((unsigned)(src[3+x + 6*stride] - src[3+x + 3*stride] + 2*QP) > 4*QP) return 0;
++ }
++#else
++ int x;
++ src+= stride*3;
++ for(x=0; x<BLOCK_SIZE; x++)
++ {
++ if((unsigned)(src[x + stride] - src[x + (stride<<3)] + 2*QP) > 4*QP) return 0;
++ }
++#endif
++ return 1;
++#else
++ int x;
++ src+= stride*4;
++ for(x=0; x<BLOCK_SIZE; x++)
++ {
++ int min=255;
++ int max=0;
++ int y;
++ for(y=0; y<8; y++){
++ int v= src[x + y*stride];
++ if(v>max) max=v;
++ if(v<min) min=v;
++ }
++ if(max-min > 2*QP) return 0;
++ }
++ return 1;
++#endif
++}
++
++static inline int horizClassify_C(uint8_t src[], int stride, PPContext *c){
++ if( isHorizDC_C(src, stride, c) ){
++ if( isHorizMinMaxOk_C(src, stride, c->QP) )
++ return 1;
++ else
++ return 0;
++ }else{
++ return 2;
++ }
++}
++
++static inline int vertClassify_C(uint8_t src[], int stride, PPContext *c){
++ if( isVertDC_C(src, stride, c) ){
++ if( isVertMinMaxOk_C(src, stride, c->QP) )
++ return 1;
++ else
++ return 0;
++ }else{
++ return 2;
++ }
++}
++
++static inline void doHorizDefFilter_C(uint8_t dst[], int stride, PPContext *c)
++{
++ int y;
++ for(y=0; y<BLOCK_SIZE; y++)
++ {
++ const int middleEnergy= 5*(dst[4] - dst[3]) + 2*(dst[2] - dst[5]);
++
++ if(ABS(middleEnergy) < 8*c->QP)
++ {
++ const int q=(dst[3] - dst[4])/2;
++ const int leftEnergy= 5*(dst[2] - dst[1]) + 2*(dst[0] - dst[3]);
++ const int rightEnergy= 5*(dst[6] - dst[5]) + 2*(dst[4] - dst[7]);
++
++ int d= ABS(middleEnergy) - MIN( ABS(leftEnergy), ABS(rightEnergy) );
++ d= MAX(d, 0);
++
++ d= (5*d + 32) >> 6;
++ d*= SIGN(-middleEnergy);
++
++ if(q>0)
++ {
++ d= d<0 ? 0 : d;
++ d= d>q ? q : d;
++ }
++ else
++ {
++ d= d>0 ? 0 : d;
++ d= d<q ? q : d;
++ }
++
++ dst[3]-= d;
++ dst[4]+= d;
++ }
++ dst+= stride;
++ }
++}
++
++/**
++ * Do a horizontal low pass filter on the 10x8 block (dst points to middle 8x8 Block)
++ * using the 9-Tap Filter (1,1,2,2,4,2,2,1,1)/16 (C version)
++ */
++static inline void doHorizLowPass_C(uint8_t dst[], int stride, PPContext *c)
++{
++ int y;
++ for(y=0; y<BLOCK_SIZE; y++)
++ {
++ const int first= ABS(dst[-1] - dst[0]) < c->QP ? dst[-1] : dst[0];
++ const int last= ABS(dst[8] - dst[7]) < c->QP ? dst[8] : dst[7];
++
++ int sums[10];
++ sums[0] = 4*first + dst[0] + dst[1] + dst[2] + 4;
++ sums[1] = sums[0] - first + dst[3];
++ sums[2] = sums[1] - first + dst[4];
++ sums[3] = sums[2] - first + dst[5];
++ sums[4] = sums[3] - first + dst[6];
++ sums[5] = sums[4] - dst[0] + dst[7];
++ sums[6] = sums[5] - dst[1] + last;
++ sums[7] = sums[6] - dst[2] + last;
++ sums[8] = sums[7] - dst[3] + last;
++ sums[9] = sums[8] - dst[4] + last;
++
++ dst[0]= (sums[0] + sums[2] + 2*dst[0])>>4;
++ dst[1]= (sums[1] + sums[3] + 2*dst[1])>>4;
++ dst[2]= (sums[2] + sums[4] + 2*dst[2])>>4;
++ dst[3]= (sums[3] + sums[5] + 2*dst[3])>>4;
++ dst[4]= (sums[4] + sums[6] + 2*dst[4])>>4;
++ dst[5]= (sums[5] + sums[7] + 2*dst[5])>>4;
++ dst[6]= (sums[6] + sums[8] + 2*dst[6])>>4;
++ dst[7]= (sums[7] + sums[9] + 2*dst[7])>>4;
++
++ dst+= stride;
++ }
++}
++
++/**
++ * Experimental Filter 1 (Horizontal)
++ * will not damage linear gradients
++ * Flat blocks should look like they where passed through the (1,1,2,2,4,2,2,1,1) 9-Tap filter
++ * can only smooth blocks at the expected locations (it cant smooth them if they did move)
++ * MMX2 version does correct clipping C version doesnt
++ * not identical with the vertical one
++ */
++static inline void horizX1Filter(uint8_t *src, int stride, int QP)
++{
++ int y;
++ static uint64_t *lut= NULL;
++ if(lut==NULL)
++ {
++ int i;
++ lut= (uint64_t*)memalign(8, 256*8);
++ for(i=0; i<256; i++)
++ {
++ int v= i < 128 ? 2*i : 2*(i-256);
++/*
++//Simulate 112242211 9-Tap filter
++ uint64_t a= (v/16) & 0xFF;
++ uint64_t b= (v/8) & 0xFF;
++ uint64_t c= (v/4) & 0xFF;
++ uint64_t d= (3*v/8) & 0xFF;
++*/
++//Simulate piecewise linear interpolation
++ uint64_t a= (v/16) & 0xFF;
++ uint64_t b= (v*3/16) & 0xFF;
++ uint64_t c= (v*5/16) & 0xFF;
++ uint64_t d= (7*v/16) & 0xFF;
++ uint64_t A= (0x100 - a)&0xFF;
++ uint64_t B= (0x100 - b)&0xFF;
++ uint64_t C= (0x100 - c)&0xFF;
++ uint64_t D= (0x100 - c)&0xFF;
++
++ lut[i] = (a<<56) | (b<<48) | (c<<40) | (d<<32) |
++ (D<<24) | (C<<16) | (B<<8) | (A);
++ //lut[i] = (v<<32) | (v<<24);
++ }
++ }
++
++ for(y=0; y<BLOCK_SIZE; y++)
++ {
++ int a= src[1] - src[2];
++ int b= src[3] - src[4];
++ int c= src[5] - src[6];
++
++ int d= MAX(ABS(b) - (ABS(a) + ABS(c))/2, 0);
++
++ if(d < QP)
++ {
++ int v = d * SIGN(-b);
++
++ src[1] +=v/8;
++ src[2] +=v/4;
++ src[3] +=3*v/8;
++ src[4] -=3*v/8;
++ src[5] -=v/4;
++ src[6] -=v/8;
++
++ }
++ src+=stride;
++ }
++}
++
++/**
++ * accurate deblock filter
++ */
++static always_inline void do_a_deblock_C(uint8_t *src, int step, int stride, PPContext *c){
++ int y;
++ const int QP= c->QP;
++ const int dcOffset= ((c->nonBQP*c->ppMode.baseDcDiff)>>8) + 1;
++ const int dcThreshold= dcOffset*2 + 1;
++//START_TIMER
++ src+= step*4; // src points to begin of the 8x8 Block
++ for(y=0; y<8; y++){
++ int numEq= 0;
++
++ if(((unsigned)(src[-1*step] - src[0*step] + dcOffset)) < dcThreshold) numEq++;
++ if(((unsigned)(src[ 0*step] - src[1*step] + dcOffset)) < dcThreshold) numEq++;
++ if(((unsigned)(src[ 1*step] - src[2*step] + dcOffset)) < dcThreshold) numEq++;
++ if(((unsigned)(src[ 2*step] - src[3*step] + dcOffset)) < dcThreshold) numEq++;
++ if(((unsigned)(src[ 3*step] - src[4*step] + dcOffset)) < dcThreshold) numEq++;
++ if(((unsigned)(src[ 4*step] - src[5*step] + dcOffset)) < dcThreshold) numEq++;
++ if(((unsigned)(src[ 5*step] - src[6*step] + dcOffset)) < dcThreshold) numEq++;
++ if(((unsigned)(src[ 6*step] - src[7*step] + dcOffset)) < dcThreshold) numEq++;
++ if(((unsigned)(src[ 7*step] - src[8*step] + dcOffset)) < dcThreshold) numEq++;
++ if(numEq > c->ppMode.flatnessThreshold){
++ int min, max, x;
++
++ if(src[0] > src[step]){
++ max= src[0];
++ min= src[step];
++ }else{
++ max= src[step];
++ min= src[0];
++ }
++ for(x=2; x<8; x+=2){
++ if(src[x*step] > src[(x+1)*step]){
++ if(src[x *step] > max) max= src[ x *step];
++ if(src[(x+1)*step] < min) min= src[(x+1)*step];
++ }else{
++ if(src[(x+1)*step] > max) max= src[(x+1)*step];
++ if(src[ x *step] < min) min= src[ x *step];
++ }
++ }
++ if(max-min < 2*QP){
++ const int first= ABS(src[-1*step] - src[0]) < QP ? src[-1*step] : src[0];
++ const int last= ABS(src[8*step] - src[7*step]) < QP ? src[8*step] : src[7*step];
++
++ int sums[10];
++ sums[0] = 4*first + src[0*step] + src[1*step] + src[2*step] + 4;
++ sums[1] = sums[0] - first + src[3*step];
++ sums[2] = sums[1] - first + src[4*step];
++ sums[3] = sums[2] - first + src[5*step];
++ sums[4] = sums[3] - first + src[6*step];
++ sums[5] = sums[4] - src[0*step] + src[7*step];
++ sums[6] = sums[5] - src[1*step] + last;
++ sums[7] = sums[6] - src[2*step] + last;
++ sums[8] = sums[7] - src[3*step] + last;
++ sums[9] = sums[8] - src[4*step] + last;
++
++ src[0*step]= (sums[0] + sums[2] + 2*src[0*step])>>4;
++ src[1*step]= (sums[1] + sums[3] + 2*src[1*step])>>4;
++ src[2*step]= (sums[2] + sums[4] + 2*src[2*step])>>4;
++ src[3*step]= (sums[3] + sums[5] + 2*src[3*step])>>4;
++ src[4*step]= (sums[4] + sums[6] + 2*src[4*step])>>4;
++ src[5*step]= (sums[5] + sums[7] + 2*src[5*step])>>4;
++ src[6*step]= (sums[6] + sums[8] + 2*src[6*step])>>4;
++ src[7*step]= (sums[7] + sums[9] + 2*src[7*step])>>4;
++ }
++ }else{
++ const int middleEnergy= 5*(src[4*step] - src[3*step]) + 2*(src[2*step] - src[5*step]);
++
++ if(ABS(middleEnergy) < 8*QP)
++ {
++ const int q=(src[3*step] - src[4*step])/2;
++ const int leftEnergy= 5*(src[2*step] - src[1*step]) + 2*(src[0*step] - src[3*step]);
++ const int rightEnergy= 5*(src[6*step] - src[5*step]) + 2*(src[4*step] - src[7*step]);
++
++ int d= ABS(middleEnergy) - MIN( ABS(leftEnergy), ABS(rightEnergy) );
++ d= MAX(d, 0);
++
++ d= (5*d + 32) >> 6;
++ d*= SIGN(-middleEnergy);
++
++ if(q>0)
++ {
++ d= d<0 ? 0 : d;
++ d= d>q ? q : d;
++ }
++ else
++ {
++ d= d>0 ? 0 : d;
++ d= d<q ? q : d;
++ }
++
++ src[3*step]-= d;
++ src[4*step]+= d;
++ }
++ }
++
++ src += stride;
++ }
++/*if(step==16){
++ STOP_TIMER("step16")
++}else{
++ STOP_TIMER("stepX")
++}*/
++}
++
++//Note: we have C, MMX, MMX2, 3DNOW version there is no 3DNOW+MMX2 one
++//Plain C versions
++#if !defined (HAVE_MMX) || defined (RUNTIME_CPUDETECT)
++#define COMPILE_C
++#endif
++
++#ifdef ARCH_POWERPC
++#ifdef HAVE_ALTIVEC
++#define COMPILE_ALTIVEC
++#endif //HAVE_ALTIVEC
++#endif //ARCH_POWERPC
++
++#undef HAVE_MMX
++#undef HAVE_MMX2
++#undef HAVE_3DNOW
++#undef HAVE_ALTIVEC
++
++#ifdef ARCH_POWERPC
++#ifdef COMPILE_ALTIVEC
++#undef RENAME
++#define HAVE_ALTIVEC
++#define RENAME(a) a ## _altivec
++#include "postprocess_altivec_template.c"
++#include "postprocess_template.c"
++#endif
++#endif //ARCH_POWERPC
++
+Index: ffmpeg-0.cvs20070307/libpostproc/postprocess_template.c
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/libpostproc/postprocess_template.c 2007-03-09 14:28:38.000000000 +0100
++++ ffmpeg-0.cvs20070307/libpostproc/postprocess_template.c 2007-03-09 14:28:38.000000000 +0100
+@@ -3181,7 +3181,10 @@
+ }
+ #endif //HAVE_MMX
+
+-static void RENAME(postProcess)(uint8_t src[], int srcStride, uint8_t dst[], int dstStride, int width, int height,
++#ifndef HAVE_ALTIVEC
++static
++#endif
++void RENAME(postProcess)(uint8_t src[], int srcStride, uint8_t dst[], int dstStride, int width, int height,
+ QP_STORE_T QPs[], int QPStride, int isColor, PPContext *c);
+
+ /**
+@@ -3384,7 +3387,10 @@
+ /**
+ * Filters array of bytes (Y or U or V values)
+ */
+-static void RENAME(postProcess)(uint8_t src[], int srcStride, uint8_t dst[], int dstStride, int width, int height,
++#ifndef HAVE_ALTIVEC
++static
++#endif
++void RENAME(postProcess)(uint8_t src[], int srcStride, uint8_t dst[], int dstStride, int width, int height,
+ QP_STORE_T QPs[], int QPStride, int isColor, PPContext *c2)
+ {
+ PPContext __attribute__((aligned(8))) c= *c2; //copy to stack for faster access
+Index: ffmpeg-0.cvs20070307/libswscale/swscale.c
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/libswscale/swscale.c 2007-03-07 14:37:07.000000000 +0100
++++ ffmpeg-0.cvs20070307/libswscale/swscale.c 2007-03-09 14:28:38.000000000 +0100
+@@ -849,7 +849,10 @@
+ #undef RENAME
+ #define HAVE_ALTIVEC
+ #define RENAME(a) a ## _altivec
+-#include "swscale_template.c"
++//#include "swscale_template.c"
++int yv12toyuy2_unscaled_altivec(SwsContext *, uint8_t*[], int[], int, int, uint8_t*[], int[]);
++int yv12touyvy_unscaled_altivec(SwsContext *, uint8_t*[], int[], int, int, uint8_t*[], int[]);
++int RENAME(swScale)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]);
+ #endif
+ #endif //ARCH_POWERPC
+
+@@ -2241,8 +2244,8 @@
+ srcFilter->chrV, dstFilter->chrV, c->param);
+
+ #ifdef HAVE_ALTIVEC
+- c->vYCoeffsBank = av_malloc(sizeof (vector signed short)*c->vLumFilterSize*c->dstH);
+- c->vCCoeffsBank = av_malloc(sizeof (vector signed short)*c->vChrFilterSize*c->chrDstH);
++ c->vYCoeffsBank = av_malloc(16*c->vLumFilterSize*c->dstH);
++ c->vCCoeffsBank = av_malloc(16*c->vChrFilterSize*c->chrDstH);
+
+ for (i=0;i<c->vLumFilterSize*c->dstH;i++) {
+ int j;
+Index: ffmpeg-0.cvs20070307/libswscale/swscale_altivec.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ffmpeg-0.cvs20070307/libswscale/swscale_altivec.c 2007-03-09 14:58:04.000000000 +0100
+@@ -0,0 +1,729 @@
++/*
++ * Copyright (C) 2001-2003 Michael Niedermayer <michaelni at gmx.at>
++ *
++ * This file is part of FFmpeg.
++ *
++ * FFmpeg 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.
++ *
++ * 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 General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with FFmpeg; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
++ *
++ * the C code (not assembly, mmx, ...) of this file can be used
++ * under the LGPL license too
++ */
++
++/*
++ supported Input formats: YV12, I420/IYUV, YUY2, UYVY, BGR32, BGR24, BGR16, BGR15, RGB32, RGB24, Y8/Y800, YVU9/IF09, PAL8
++ supported output formats: YV12, I420/IYUV, YUY2, UYVY, {BGR,RGB}{1,4,8,15,16,24,32}, Y8/Y800, YVU9/IF09
++ {BGR,RGB}{1,4,8,15,16} support dithering
++
++ unscaled special converters (YV12=I420=IYUV, Y800=Y8)
++ YV12 -> {BGR,RGB}{1,4,8,15,16,24,32}
++ x -> x
++ YUV9 -> YV12
++ YUV9/YV12 -> Y800
++ Y800 -> YUV9/YV12
++ BGR24 -> BGR32 & RGB24 -> RGB32
++ BGR32 -> BGR24 & RGB32 -> RGB24
++ BGR15 -> BGR16
++*/
++
++/*
++tested special converters (most are tested actually but i didnt write it down ...)
++ YV12 -> BGR16
++ YV12 -> YV12
++ BGR15 -> BGR16
++ BGR16 -> BGR16
++ YVU9 -> YV12
++
++untested special converters
++ YV12/I420 -> BGR15/BGR24/BGR32 (its the yuv2rgb stuff, so it should be ok)
++ YV12/I420 -> YV12/I420
++ YUY2/BGR15/BGR24/BGR32/RGB24/RGB32 -> same format
++ BGR24 -> BGR32 & RGB24 -> RGB32
++ BGR32 -> BGR24 & RGB32 -> RGB24
++ BGR24 -> YV12
++*/
++
++#include <inttypes.h>
++#include <string.h>
++#include <math.h>
++#include <stdio.h>
++#include <unistd.h>
++#include "config.h"
++#include <assert.h>
++#ifdef HAVE_SYS_MMAN_H
++#include <sys/mman.h>
++#if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)
++#define MAP_ANONYMOUS MAP_ANON
++#endif
++#endif
++#include "swscale.h"
++#include "swscale_internal.h"
++#include "x86_cpu.h"
++#include "bswap.h"
++#include "rgb2rgb.h"
++#ifdef USE_FASTMEMCPY
++#include "libvo/fastmemcpy.h"
++#endif
++
++#undef MOVNTQ
++#undef PAVGB
++
++//#undef HAVE_MMX2
++//#define HAVE_3DNOW
++//#undef HAVE_MMX
++//#undef ARCH_X86
++//#define WORDS_BIGENDIAN
++#define DITHER1XBPP
++
++#define FAST_BGR2YV12 // use 7 bit coeffs instead of 15bit
++
++#define RET 0xC3 //near return opcode for X86
++
++#ifdef MP_DEBUG
++#define ASSERT(x) assert(x);
++#else
++#define ASSERT(x) ;
++#endif
++
++#ifdef M_PI
++#define PI M_PI
++#else
++#define PI 3.14159265358979323846
++#endif
++
++#define isSupportedIn(x) ((x)==PIX_FMT_YUV420P || (x)==PIX_FMT_YUYV422 || (x)==PIX_FMT_UYVY422\
++ || (x)==PIX_FMT_RGB32|| (x)==PIX_FMT_BGR24|| (x)==PIX_FMT_BGR565|| (x)==PIX_FMT_BGR555\
++ || (x)==PIX_FMT_BGR32|| (x)==PIX_FMT_RGB24|| (x)==PIX_FMT_RGB565|| (x)==PIX_FMT_RGB555\
++ || (x)==PIX_FMT_GRAY8 || (x)==PIX_FMT_YUV410P\
++ || (x)==PIX_FMT_GRAY16BE || (x)==PIX_FMT_GRAY16LE\
++ || (x)==PIX_FMT_YUV444P || (x)==PIX_FMT_YUV422P || (x)==PIX_FMT_YUV411P\
++ || (x)==PIX_FMT_PAL8 || (x)==PIX_FMT_BGR8 || (x)==PIX_FMT_RGB8\
++ || (x)==PIX_FMT_BGR4_BYTE || (x)==PIX_FMT_RGB4_BYTE)
++#define isSupportedOut(x) ((x)==PIX_FMT_YUV420P || (x)==PIX_FMT_YUYV422 || (x)==PIX_FMT_UYVY422\
++ || (x)==PIX_FMT_YUV444P || (x)==PIX_FMT_YUV422P || (x)==PIX_FMT_YUV411P\
++ || isRGB(x) || isBGR(x)\
++ || (x)==PIX_FMT_NV12 || (x)==PIX_FMT_NV21\
++ || (x)==PIX_FMT_GRAY16BE || (x)==PIX_FMT_GRAY16LE\
++ || (x)==PIX_FMT_GRAY8 || (x)==PIX_FMT_YUV410P)
++#define isPacked(x) ((x)==PIX_FMT_YUYV422 || (x)==PIX_FMT_UYVY422 ||isRGB(x) || isBGR(x))
++
++#define RGB2YUV_SHIFT 16
++#define BY ((int)( 0.098*(1<<RGB2YUV_SHIFT)+0.5))
++#define BV ((int)(-0.071*(1<<RGB2YUV_SHIFT)+0.5))
++#define BU ((int)( 0.439*(1<<RGB2YUV_SHIFT)+0.5))
++#define GY ((int)( 0.504*(1<<RGB2YUV_SHIFT)+0.5))
++#define GV ((int)(-0.368*(1<<RGB2YUV_SHIFT)+0.5))
++#define GU ((int)(-0.291*(1<<RGB2YUV_SHIFT)+0.5))
++#define RY ((int)( 0.257*(1<<RGB2YUV_SHIFT)+0.5))
++#define RV ((int)( 0.439*(1<<RGB2YUV_SHIFT)+0.5))
++#define RU ((int)(-0.148*(1<<RGB2YUV_SHIFT)+0.5))
++
++extern const int32_t Inverse_Table_6_9[8][4];
++
++/*
++NOTES
++Special versions: fast Y 1:1 scaling (no interpolation in y direction)
++
++TODO
++more intelligent missalignment avoidance for the horizontal scaler
++write special vertical cubic upscale version
++Optimize C code (yv12 / minmax)
++add support for packed pixel yuv input & output
++add support for Y8 output
++optimize bgr24 & bgr32
++add BGR4 output support
++write special BGR->BGR scaler
++*/
++
++#if defined(ARCH_X86) && defined (CONFIG_GPL)
++static uint64_t attribute_used __attribute__((aligned(8))) bF8= 0xF8F8F8F8F8F8F8F8LL;
++static uint64_t attribute_used __attribute__((aligned(8))) bFC= 0xFCFCFCFCFCFCFCFCLL;
++static uint64_t __attribute__((aligned(8))) w10= 0x0010001000100010LL;
++static uint64_t attribute_used __attribute__((aligned(8))) w02= 0x0002000200020002LL;
++static uint64_t attribute_used __attribute__((aligned(8))) bm00001111=0x00000000FFFFFFFFLL;
++static uint64_t attribute_used __attribute__((aligned(8))) bm00000111=0x0000000000FFFFFFLL;
++static uint64_t attribute_used __attribute__((aligned(8))) bm11111000=0xFFFFFFFFFF000000LL;
++static uint64_t attribute_used __attribute__((aligned(8))) bm01010101=0x00FF00FF00FF00FFLL;
++
++static volatile uint64_t attribute_used __attribute__((aligned(8))) b5Dither;
++static volatile uint64_t attribute_used __attribute__((aligned(8))) g5Dither;
++static volatile uint64_t attribute_used __attribute__((aligned(8))) g6Dither;
++static volatile uint64_t attribute_used __attribute__((aligned(8))) r5Dither;
++
++static uint64_t __attribute__((aligned(8))) dither4[2]={
++ 0x0103010301030103LL,
++ 0x0200020002000200LL,};
++
++static uint64_t __attribute__((aligned(8))) dither8[2]={
++ 0x0602060206020602LL,
++ 0x0004000400040004LL,};
++
++static uint64_t __attribute__((aligned(8))) b16Mask= 0x001F001F001F001FLL;
++static uint64_t attribute_used __attribute__((aligned(8))) g16Mask= 0x07E007E007E007E0LL;
++static uint64_t attribute_used __attribute__((aligned(8))) r16Mask= 0xF800F800F800F800LL;
++static uint64_t __attribute__((aligned(8))) b15Mask= 0x001F001F001F001FLL;
++static uint64_t attribute_used __attribute__((aligned(8))) g15Mask= 0x03E003E003E003E0LL;
++static uint64_t attribute_used __attribute__((aligned(8))) r15Mask= 0x7C007C007C007C00LL;
++
++static uint64_t attribute_used __attribute__((aligned(8))) M24A= 0x00FF0000FF0000FFLL;
++static uint64_t attribute_used __attribute__((aligned(8))) M24B= 0xFF0000FF0000FF00LL;
++static uint64_t attribute_used __attribute__((aligned(8))) M24C= 0x0000FF0000FF0000LL;
++
++#ifdef FAST_BGR2YV12
++static const uint64_t bgr2YCoeff attribute_used __attribute__((aligned(8))) = 0x000000210041000DULL;
++static const uint64_t bgr2UCoeff attribute_used __attribute__((aligned(8))) = 0x0000FFEEFFDC0038ULL;
++static const uint64_t bgr2VCoeff attribute_used __attribute__((aligned(8))) = 0x00000038FFD2FFF8ULL;
++#else
++static const uint64_t bgr2YCoeff attribute_used __attribute__((aligned(8))) = 0x000020E540830C8BULL;
++static const uint64_t bgr2UCoeff attribute_used __attribute__((aligned(8))) = 0x0000ED0FDAC23831ULL;
++static const uint64_t bgr2VCoeff attribute_used __attribute__((aligned(8))) = 0x00003831D0E6F6EAULL;
++#endif /* FAST_BGR2YV12 */
++static const uint64_t bgr2YOffset attribute_used __attribute__((aligned(8))) = 0x1010101010101010ULL;
++static const uint64_t bgr2UVOffset attribute_used __attribute__((aligned(8)))= 0x8080808080808080ULL;
++static const uint64_t w1111 attribute_used __attribute__((aligned(8))) = 0x0001000100010001ULL;
++#endif /* defined(ARCH_X86) */
++
++// clipping helper table for C implementations:
++static unsigned char clip_table[768];
++
++static SwsVector *sws_getConvVec(SwsVector *a, SwsVector *b);
++
++extern const uint8_t dither_2x2_4[2][8];
++extern const uint8_t dither_2x2_8[2][8];
++extern const uint8_t dither_8x8_32[8][8];
++extern const uint8_t dither_8x8_73[8][8];
++extern const uint8_t dither_8x8_220[8][8];
++
++static const char * sws_context_to_name(void * ptr) {
++ return "swscaler";
++}
++
++static AVClass sws_context_class = { "SWScaler", sws_context_to_name, NULL };
++
++#if defined(ARCH_X86) && defined (CONFIG_GPL)
++void in_asm_used_var_warning_killer()
++{
++ volatile int i= bF8+bFC+w10+
++ bm00001111+bm00000111+bm11111000+b16Mask+g16Mask+r16Mask+b15Mask+g15Mask+r15Mask+
++ M24A+M24B+M24C+w02 + b5Dither+g5Dither+r5Dither+g6Dither+dither4[0]+dither8[0]+bm01010101;
++ if(i) i=0;
++}
++#endif
++
++static inline void yuv2yuvXinC(int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize,
++ int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize,
++ uint8_t *dest, uint8_t *uDest, uint8_t *vDest, int dstW, int chrDstW)
++{
++ //FIXME Optimize (just quickly writen not opti..)
++ int i;
++ for(i=0; i<dstW; i++)
++ {
++ int val=1<<18;
++ int j;
++ for(j=0; j<lumFilterSize; j++)
++ val += lumSrc[j][i] * lumFilter[j];
++
++ dest[i]= av_clip_uint8(val>>19);
++ }
++
++ if(uDest != NULL)
++ for(i=0; i<chrDstW; i++)
++ {
++ int u=1<<18;
++ int v=1<<18;
++ int j;
++ for(j=0; j<chrFilterSize; j++)
++ {
++ u += chrSrc[j][i] * chrFilter[j];
++ v += chrSrc[j][i + 2048] * chrFilter[j];
++ }
++
++ uDest[i]= av_clip_uint8(u>>19);
++ vDest[i]= av_clip_uint8(v>>19);
++ }
++}
++
++static inline void yuv2nv12XinC(int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize,
++ int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize,
++ uint8_t *dest, uint8_t *uDest, int dstW, int chrDstW, int dstFormat)
++{
++ //FIXME Optimize (just quickly writen not opti..)
++ int i;
++ for(i=0; i<dstW; i++)
++ {
++ int val=1<<18;
++ int j;
++ for(j=0; j<lumFilterSize; j++)
++ val += lumSrc[j][i] * lumFilter[j];
++
++ dest[i]= av_clip_uint8(val>>19);
++ }
++
++ if(uDest == NULL)
++ return;
++
++ if(dstFormat == PIX_FMT_NV12)
++ for(i=0; i<chrDstW; i++)
++ {
++ int u=1<<18;
++ int v=1<<18;
++ int j;
++ for(j=0; j<chrFilterSize; j++)
++ {
++ u += chrSrc[j][i] * chrFilter[j];
++ v += chrSrc[j][i + 2048] * chrFilter[j];
++ }
++
++ uDest[2*i]= av_clip_uint8(u>>19);
++ uDest[2*i+1]= av_clip_uint8(v>>19);
++ }
++ else
++ for(i=0; i<chrDstW; i++)
++ {
++ int u=1<<18;
++ int v=1<<18;
++ int j;
++ for(j=0; j<chrFilterSize; j++)
++ {
++ u += chrSrc[j][i] * chrFilter[j];
++ v += chrSrc[j][i + 2048] * chrFilter[j];
++ }
++
++ uDest[2*i]= av_clip_uint8(v>>19);
++ uDest[2*i+1]= av_clip_uint8(u>>19);
++ }
++}
++
++#define YSCALE_YUV_2_PACKEDX_C(type) \
++ for(i=0; i<(dstW>>1); i++){\
++ int j;\
++ int Y1=1<<18;\
++ int Y2=1<<18;\
++ int U=1<<18;\
++ int V=1<<18;\
++ type attribute_unused *r, *b, *g;\
++ const int i2= 2*i;\
++ \
++ for(j=0; j<lumFilterSize; j++)\
++ {\
++ Y1 += lumSrc[j][i2] * lumFilter[j];\
++ Y2 += lumSrc[j][i2+1] * lumFilter[j];\
++ }\
++ for(j=0; j<chrFilterSize; j++)\
++ {\
++ U += chrSrc[j][i] * chrFilter[j];\
++ V += chrSrc[j][i+2048] * chrFilter[j];\
++ }\
++ Y1>>=19;\
++ Y2>>=19;\
++ U >>=19;\
++ V >>=19;\
++ if((Y1|Y2|U|V)&256)\
++ {\
++ if(Y1>255) Y1=255;\
++ else if(Y1<0)Y1=0;\
++ if(Y2>255) Y2=255;\
++ else if(Y2<0)Y2=0;\
++ if(U>255) U=255;\
++ else if(U<0) U=0;\
++ if(V>255) V=255;\
++ else if(V<0) V=0;\
++ }
++
++#define YSCALE_YUV_2_RGBX_C(type) \
++ YSCALE_YUV_2_PACKEDX_C(type)\
++ r = (type *)c->table_rV[V];\
++ g = (type *)(c->table_gU[U] + c->table_gV[V]);\
++ b = (type *)c->table_bU[U];\
++
++#define YSCALE_YUV_2_PACKED2_C \
++ for(i=0; i<(dstW>>1); i++){\
++ const int i2= 2*i;\
++ int Y1= (buf0[i2 ]*yalpha1+buf1[i2 ]*yalpha)>>19;\
++ int Y2= (buf0[i2+1]*yalpha1+buf1[i2+1]*yalpha)>>19;\
++ int U= (uvbuf0[i ]*uvalpha1+uvbuf1[i ]*uvalpha)>>19;\
++ int V= (uvbuf0[i+2048]*uvalpha1+uvbuf1[i+2048]*uvalpha)>>19;\
++
++#define YSCALE_YUV_2_RGB2_C(type) \
++ YSCALE_YUV_2_PACKED2_C\
++ type *r, *b, *g;\
++ r = (type *)c->table_rV[V];\
++ g = (type *)(c->table_gU[U] + c->table_gV[V]);\
++ b = (type *)c->table_bU[U];\
++
++#define YSCALE_YUV_2_PACKED1_C \
++ for(i=0; i<(dstW>>1); i++){\
++ const int i2= 2*i;\
++ int Y1= buf0[i2 ]>>7;\
++ int Y2= buf0[i2+1]>>7;\
++ int U= (uvbuf1[i ])>>7;\
++ int V= (uvbuf1[i+2048])>>7;\
++
++#define YSCALE_YUV_2_RGB1_C(type) \
++ YSCALE_YUV_2_PACKED1_C\
++ type *r, *b, *g;\
++ r = (type *)c->table_rV[V];\
++ g = (type *)(c->table_gU[U] + c->table_gV[V]);\
++ b = (type *)c->table_bU[U];\
++
++#define YSCALE_YUV_2_PACKED1B_C \
++ for(i=0; i<(dstW>>1); i++){\
++ const int i2= 2*i;\
++ int Y1= buf0[i2 ]>>7;\
++ int Y2= buf0[i2+1]>>7;\
++ int U= (uvbuf0[i ] + uvbuf1[i ])>>8;\
++ int V= (uvbuf0[i+2048] + uvbuf1[i+2048])>>8;\
++
++#define YSCALE_YUV_2_RGB1B_C(type) \
++ YSCALE_YUV_2_PACKED1B_C\
++ type *r, *b, *g;\
++ r = (type *)c->table_rV[V];\
++ g = (type *)(c->table_gU[U] + c->table_gV[V]);\
++ b = (type *)c->table_bU[U];\
++
++#define YSCALE_YUV_2_ANYRGB_C(func, func2)\
++ switch(c->dstFormat)\
++ {\
++ case PIX_FMT_RGB32:\
++ case PIX_FMT_BGR32:\
++ func(uint32_t)\
++ ((uint32_t*)dest)[i2+0]= r[Y1] + g[Y1] + b[Y1];\
++ ((uint32_t*)dest)[i2+1]= r[Y2] + g[Y2] + b[Y2];\
++ } \
++ break;\
++ case PIX_FMT_RGB24:\
++ func(uint8_t)\
++ ((uint8_t*)dest)[0]= r[Y1];\
++ ((uint8_t*)dest)[1]= g[Y1];\
++ ((uint8_t*)dest)[2]= b[Y1];\
++ ((uint8_t*)dest)[3]= r[Y2];\
++ ((uint8_t*)dest)[4]= g[Y2];\
++ ((uint8_t*)dest)[5]= b[Y2];\
++ dest+=6;\
++ }\
++ break;\
++ case PIX_FMT_BGR24:\
++ func(uint8_t)\
++ ((uint8_t*)dest)[0]= b[Y1];\
++ ((uint8_t*)dest)[1]= g[Y1];\
++ ((uint8_t*)dest)[2]= r[Y1];\
++ ((uint8_t*)dest)[3]= b[Y2];\
++ ((uint8_t*)dest)[4]= g[Y2];\
++ ((uint8_t*)dest)[5]= r[Y2];\
++ dest+=6;\
++ }\
++ break;\
++ case PIX_FMT_RGB565:\
++ case PIX_FMT_BGR565:\
++ {\
++ const int dr1= dither_2x2_8[y&1 ][0];\
++ const int dg1= dither_2x2_4[y&1 ][0];\
++ const int db1= dither_2x2_8[(y&1)^1][0];\
++ const int dr2= dither_2x2_8[y&1 ][1];\
++ const int dg2= dither_2x2_4[y&1 ][1];\
++ const int db2= dither_2x2_8[(y&1)^1][1];\
++ func(uint16_t)\
++ ((uint16_t*)dest)[i2+0]= r[Y1+dr1] + g[Y1+dg1] + b[Y1+db1];\
++ ((uint16_t*)dest)[i2+1]= r[Y2+dr2] + g[Y2+dg2] + b[Y2+db2];\
++ }\
++ }\
++ break;\
++ case PIX_FMT_RGB555:\
++ case PIX_FMT_BGR555:\
++ {\
++ const int dr1= dither_2x2_8[y&1 ][0];\
++ const int dg1= dither_2x2_8[y&1 ][1];\
++ const int db1= dither_2x2_8[(y&1)^1][0];\
++ const int dr2= dither_2x2_8[y&1 ][1];\
++ const int dg2= dither_2x2_8[y&1 ][0];\
++ const int db2= dither_2x2_8[(y&1)^1][1];\
++ func(uint16_t)\
++ ((uint16_t*)dest)[i2+0]= r[Y1+dr1] + g[Y1+dg1] + b[Y1+db1];\
++ ((uint16_t*)dest)[i2+1]= r[Y2+dr2] + g[Y2+dg2] + b[Y2+db2];\
++ }\
++ }\
++ break;\
++ case PIX_FMT_RGB8:\
++ case PIX_FMT_BGR8:\
++ {\
++ const uint8_t * const d64= dither_8x8_73[y&7];\
++ const uint8_t * const d32= dither_8x8_32[y&7];\
++ func(uint8_t)\
++ ((uint8_t*)dest)[i2+0]= r[Y1+d32[(i2+0)&7]] + g[Y1+d32[(i2+0)&7]] + b[Y1+d64[(i2+0)&7]];\
++ ((uint8_t*)dest)[i2+1]= r[Y2+d32[(i2+1)&7]] + g[Y2+d32[(i2+1)&7]] + b[Y2+d64[(i2+1)&7]];\
++ }\
++ }\
++ break;\
++ case PIX_FMT_RGB4:\
++ case PIX_FMT_BGR4:\
++ {\
++ const uint8_t * const d64= dither_8x8_73 [y&7];\
++ const uint8_t * const d128=dither_8x8_220[y&7];\
++ func(uint8_t)\
++ ((uint8_t*)dest)[i]= r[Y1+d128[(i2+0)&7]] + g[Y1+d64[(i2+0)&7]] + b[Y1+d128[(i2+0)&7]]\
++ + ((r[Y2+d128[(i2+1)&7]] + g[Y2+d64[(i2+1)&7]] + b[Y2+d128[(i2+1)&7]])<<4);\
++ }\
++ }\
++ break;\
++ case PIX_FMT_RGB4_BYTE:\
++ case PIX_FMT_BGR4_BYTE:\
++ {\
++ const uint8_t * const d64= dither_8x8_73 [y&7];\
++ const uint8_t * const d128=dither_8x8_220[y&7];\
++ func(uint8_t)\
++ ((uint8_t*)dest)[i2+0]= r[Y1+d128[(i2+0)&7]] + g[Y1+d64[(i2+0)&7]] + b[Y1+d128[(i2+0)&7]];\
++ ((uint8_t*)dest)[i2+1]= r[Y2+d128[(i2+1)&7]] + g[Y2+d64[(i2+1)&7]] + b[Y2+d128[(i2+1)&7]];\
++ }\
++ }\
++ break;\
++ case PIX_FMT_MONOBLACK:\
++ {\
++ const uint8_t * const d128=dither_8x8_220[y&7];\
++ uint8_t *g= c->table_gU[128] + c->table_gV[128];\
++ for(i=0; i<dstW-7; i+=8){\
++ int acc;\
++ acc = g[((buf0[i ]*yalpha1+buf1[i ]*yalpha)>>19) + d128[0]];\
++ acc+= acc + g[((buf0[i+1]*yalpha1+buf1[i+1]*yalpha)>>19) + d128[1]];\
++ acc+= acc + g[((buf0[i+2]*yalpha1+buf1[i+2]*yalpha)>>19) + d128[2]];\
++ acc+= acc + g[((buf0[i+3]*yalpha1+buf1[i+3]*yalpha)>>19) + d128[3]];\
++ acc+= acc + g[((buf0[i+4]*yalpha1+buf1[i+4]*yalpha)>>19) + d128[4]];\
++ acc+= acc + g[((buf0[i+5]*yalpha1+buf1[i+5]*yalpha)>>19) + d128[5]];\
++ acc+= acc + g[((buf0[i+6]*yalpha1+buf1[i+6]*yalpha)>>19) + d128[6]];\
++ acc+= acc + g[((buf0[i+7]*yalpha1+buf1[i+7]*yalpha)>>19) + d128[7]];\
++ ((uint8_t*)dest)[0]= acc;\
++ dest++;\
++ }\
++\
++/*\
++((uint8_t*)dest)-= dstW>>4;\
++{\
++ int acc=0;\
++ int left=0;\
++ static int top[1024];\
++ static int last_new[1024][1024];\
++ static int last_in3[1024][1024];\
++ static int drift[1024][1024];\
++ int topLeft=0;\
++ int shift=0;\
++ int count=0;\
++ const uint8_t * const d128=dither_8x8_220[y&7];\
++ int error_new=0;\
++ int error_in3=0;\
++ int f=0;\
++ \
++ for(i=dstW>>1; i<dstW; i++){\
++ int in= ((buf0[i ]*yalpha1+buf1[i ]*yalpha)>>19);\
++ int in2 = (76309 * (in - 16) + 32768) >> 16;\
++ int in3 = (in2 < 0) ? 0 : ((in2 > 255) ? 255 : in2);\
++ int old= (left*7 + topLeft + top[i]*5 + top[i+1]*3)/20 + in3\
++ + (last_new[y][i] - in3)*f/256;\
++ int new= old> 128 ? 255 : 0;\
++\
++ error_new+= FFABS(last_new[y][i] - new);\
++ error_in3+= FFABS(last_in3[y][i] - in3);\
++ f= error_new - error_in3*4;\
++ if(f<0) f=0;\
++ if(f>256) f=256;\
++\
++ topLeft= top[i];\
++ left= top[i]= old - new;\
++ last_new[y][i]= new;\
++ last_in3[y][i]= in3;\
++\
++ acc+= acc + (new&1);\
++ if((i&7)==6){\
++ ((uint8_t*)dest)[0]= acc;\
++ ((uint8_t*)dest)++;\
++ }\
++ }\
++}\
++*/\
++ }\
++ break;\
++ case PIX_FMT_YUYV422:\
++ func2\
++ ((uint8_t*)dest)[2*i2+0]= Y1;\
++ ((uint8_t*)dest)[2*i2+1]= U;\
++ ((uint8_t*)dest)[2*i2+2]= Y2;\
++ ((uint8_t*)dest)[2*i2+3]= V;\
++ } \
++ break;\
++ case PIX_FMT_UYVY422:\
++ func2\
++ ((uint8_t*)dest)[2*i2+0]= U;\
++ ((uint8_t*)dest)[2*i2+1]= Y1;\
++ ((uint8_t*)dest)[2*i2+2]= V;\
++ ((uint8_t*)dest)[2*i2+3]= Y2;\
++ } \
++ break;\
++ }\
++
++
++static inline void yuv2packedXinC(SwsContext *c, int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize,
++ int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize,
++ uint8_t *dest, int dstW, int y)
++{
++ int i;
++ switch(c->dstFormat)
++ {
++ case PIX_FMT_BGR32:
++ case PIX_FMT_RGB32:
++ YSCALE_YUV_2_RGBX_C(uint32_t)
++ ((uint32_t*)dest)[i2+0]= r[Y1] + g[Y1] + b[Y1];
++ ((uint32_t*)dest)[i2+1]= r[Y2] + g[Y2] + b[Y2];
++ }
++ break;
++ case PIX_FMT_RGB24:
++ YSCALE_YUV_2_RGBX_C(uint8_t)
++ ((uint8_t*)dest)[0]= r[Y1];
++ ((uint8_t*)dest)[1]= g[Y1];
++ ((uint8_t*)dest)[2]= b[Y1];
++ ((uint8_t*)dest)[3]= r[Y2];
++ ((uint8_t*)dest)[4]= g[Y2];
++ ((uint8_t*)dest)[5]= b[Y2];
++ dest+=6;
++ }
++ break;
++ case PIX_FMT_BGR24:
++ YSCALE_YUV_2_RGBX_C(uint8_t)
++ ((uint8_t*)dest)[0]= b[Y1];
++ ((uint8_t*)dest)[1]= g[Y1];
++ ((uint8_t*)dest)[2]= r[Y1];
++ ((uint8_t*)dest)[3]= b[Y2];
++ ((uint8_t*)dest)[4]= g[Y2];
++ ((uint8_t*)dest)[5]= r[Y2];
++ dest+=6;
++ }
++ break;
++ case PIX_FMT_RGB565:
++ case PIX_FMT_BGR565:
++ {
++ const int dr1= dither_2x2_8[y&1 ][0];
++ const int dg1= dither_2x2_4[y&1 ][0];
++ const int db1= dither_2x2_8[(y&1)^1][0];
++ const int dr2= dither_2x2_8[y&1 ][1];
++ const int dg2= dither_2x2_4[y&1 ][1];
++ const int db2= dither_2x2_8[(y&1)^1][1];
++ YSCALE_YUV_2_RGBX_C(uint16_t)
++ ((uint16_t*)dest)[i2+0]= r[Y1+dr1] + g[Y1+dg1] + b[Y1+db1];
++ ((uint16_t*)dest)[i2+1]= r[Y2+dr2] + g[Y2+dg2] + b[Y2+db2];
++ }
++ }
++ break;
++ case PIX_FMT_RGB555:
++ case PIX_FMT_BGR555:
++ {
++ const int dr1= dither_2x2_8[y&1 ][0];
++ const int dg1= dither_2x2_8[y&1 ][1];
++ const int db1= dither_2x2_8[(y&1)^1][0];
++ const int dr2= dither_2x2_8[y&1 ][1];
++ const int dg2= dither_2x2_8[y&1 ][0];
++ const int db2= dither_2x2_8[(y&1)^1][1];
++ YSCALE_YUV_2_RGBX_C(uint16_t)
++ ((uint16_t*)dest)[i2+0]= r[Y1+dr1] + g[Y1+dg1] + b[Y1+db1];
++ ((uint16_t*)dest)[i2+1]= r[Y2+dr2] + g[Y2+dg2] + b[Y2+db2];
++ }
++ }
++ break;
++ case PIX_FMT_RGB8:
++ case PIX_FMT_BGR8:
++ {
++ const uint8_t * const d64= dither_8x8_73[y&7];
++ const uint8_t * const d32= dither_8x8_32[y&7];
++ YSCALE_YUV_2_RGBX_C(uint8_t)
++ ((uint8_t*)dest)[i2+0]= r[Y1+d32[(i2+0)&7]] + g[Y1+d32[(i2+0)&7]] + b[Y1+d64[(i2+0)&7]];
++ ((uint8_t*)dest)[i2+1]= r[Y2+d32[(i2+1)&7]] + g[Y2+d32[(i2+1)&7]] + b[Y2+d64[(i2+1)&7]];
++ }
++ }
++ break;
++ case PIX_FMT_RGB4:
++ case PIX_FMT_BGR4:
++ {
++ const uint8_t * const d64= dither_8x8_73 [y&7];
++ const uint8_t * const d128=dither_8x8_220[y&7];
++ YSCALE_YUV_2_RGBX_C(uint8_t)
++ ((uint8_t*)dest)[i]= r[Y1+d128[(i2+0)&7]] + g[Y1+d64[(i2+0)&7]] + b[Y1+d128[(i2+0)&7]]
++ +((r[Y2+d128[(i2+1)&7]] + g[Y2+d64[(i2+1)&7]] + b[Y2+d128[(i2+1)&7]])<<4);
++ }
++ }
++ break;
++ case PIX_FMT_RGB4_BYTE:
++ case PIX_FMT_BGR4_BYTE:
++ {
++ const uint8_t * const d64= dither_8x8_73 [y&7];
++ const uint8_t * const d128=dither_8x8_220[y&7];
++ YSCALE_YUV_2_RGBX_C(uint8_t)
++ ((uint8_t*)dest)[i2+0]= r[Y1+d128[(i2+0)&7]] + g[Y1+d64[(i2+0)&7]] + b[Y1+d128[(i2+0)&7]];
++ ((uint8_t*)dest)[i2+1]= r[Y2+d128[(i2+1)&7]] + g[Y2+d64[(i2+1)&7]] + b[Y2+d128[(i2+1)&7]];
++ }
++ }
++ break;
++ case PIX_FMT_MONOBLACK:
++ {
++ const uint8_t * const d128=dither_8x8_220[y&7];
++ uint8_t *g= c->table_gU[128] + c->table_gV[128];
++ int acc=0;
++ for(i=0; i<dstW-1; i+=2){
++ int j;
++ int Y1=1<<18;
++ int Y2=1<<18;
++
++ for(j=0; j<lumFilterSize; j++)
++ {
++ Y1 += lumSrc[j][i] * lumFilter[j];
++ Y2 += lumSrc[j][i+1] * lumFilter[j];
++ }
++ Y1>>=19;
++ Y2>>=19;
++ if((Y1|Y2)&256)
++ {
++ if(Y1>255) Y1=255;
++ else if(Y1<0)Y1=0;
++ if(Y2>255) Y2=255;
++ else if(Y2<0)Y2=0;
++ }
++ acc+= acc + g[Y1+d128[(i+0)&7]];
++ acc+= acc + g[Y2+d128[(i+1)&7]];
++ if((i&7)==6){
++ ((uint8_t*)dest)[0]= acc;
++ dest++;
++ }
++ }
++ }
++ break;
++ case PIX_FMT_YUYV422:
++ YSCALE_YUV_2_PACKEDX_C(void)
++ ((uint8_t*)dest)[2*i2+0]= Y1;
++ ((uint8_t*)dest)[2*i2+1]= U;
++ ((uint8_t*)dest)[2*i2+2]= Y2;
++ ((uint8_t*)dest)[2*i2+3]= V;
++ }
++ break;
++ case PIX_FMT_UYVY422:
++ YSCALE_YUV_2_PACKEDX_C(void)
++ ((uint8_t*)dest)[2*i2+0]= U;
++ ((uint8_t*)dest)[2*i2+1]= Y1;
++ ((uint8_t*)dest)[2*i2+2]= V;
++ ((uint8_t*)dest)[2*i2+3]= Y2;
++ }
++ break;
++ }
++}
++
++
++#undef RENAME
++#define HAVE_ALTIVEC
++#define RENAME(a) a ## _altivec
++#include "swscale_template.c"
++
+Index: ffmpeg-0.cvs20070307/libswscale/swscale_altivec_template.c
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/libswscale/swscale_altivec_template.c 2007-03-07 14:37:07.000000000 +0100
++++ ffmpeg-0.cvs20070307/libswscale/swscale_altivec_template.c 2007-03-09 14:28:38.000000000 +0100
+@@ -390,7 +390,7 @@
+ }
+ }
+
+-static inline int yv12toyuy2_unscaled_altivec(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
++int yv12toyuy2_unscaled_altivec(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
+ int srcSliceH, uint8_t* dstParam[], int dstStride_a[]) {
+ uint8_t *dst=dstParam[0] + dstStride_a[0]*srcSliceY;
+ // yv12toyuy2( src[0],src[1],src[2],dst,c->srcW,srcSliceH,srcStride[0],srcStride[1],dstStride[0] );
+@@ -469,7 +469,7 @@
+ return srcSliceH;
+ }
+
+-static inline int yv12touyvy_unscaled_altivec(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
++int yv12touyvy_unscaled_altivec(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
+ int srcSliceH, uint8_t* dstParam[], int dstStride_a[]) {
+ uint8_t *dst=dstParam[0] + dstStride_a[0]*srcSliceY;
+ // yv12toyuy2( src[0],src[1],src[2],dst,c->srcW,srcSliceH,srcStride[0],srcStride[1],dstStride[0] );
+Index: ffmpeg-0.cvs20070307/libswscale/swscale_internal.h
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/libswscale/swscale_internal.h 2007-03-07 14:37:07.000000000 +0100
++++ ffmpeg-0.cvs20070307/libswscale/swscale_internal.h 2007-03-09 14:28:38.000000000 +0100
+@@ -21,9 +21,11 @@
+ #ifndef SWSCALE_INTERNAL_H
+ #define SWSCALE_INTERNAL_H
+
++#ifdef ABI_ALTIVEC
+ #ifdef HAVE_ALTIVEC_H
+ #include <altivec.h>
+ #endif
++#endif
+
+ #include "avutil.h"
+
+@@ -150,15 +152,20 @@
+ uint64_t v_temp __attribute__((aligned(8)));
+
+ #ifdef HAVE_ALTIVEC
++#ifdef ABI_ALTIVEC
++#define VEC(x) vector x
++#else
++#define VEC(x) union { char c[16]; }
++#endif
+
+- vector signed short CY;
+- vector signed short CRV;
+- vector signed short CBU;
+- vector signed short CGU;
+- vector signed short CGV;
+- vector signed short OY;
+- vector unsigned short CSHIFT;
+- vector signed short *vYCoeffsBank, *vCCoeffsBank;
++ VEC(signed short) CY;
++ VEC(signed short) CRV;
++ VEC(signed short) CBU;
++ VEC(signed short) CGU;
++ VEC(signed short) CGV;
++ VEC(signed short) OY;
++ VEC(unsigned short) CSHIFT;
++ VEC(signed short) *vYCoeffsBank, *vCCoeffsBank;
+
+ #endif
+
+Index: ffmpeg-0.cvs20070307/libswscale/Makefile
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/libswscale/Makefile 2007-03-07 14:37:07.000000000 +0100
++++ ffmpeg-0.cvs20070307/libswscale/Makefile 2007-03-09 14:28:38.000000000 +0100
+@@ -9,8 +9,10 @@
+
+ OBJS= swscale.o rgb2rgb.o
+
+-OBJS-$(TARGET_ALTIVEC) += yuv2rgb_altivec.o
++OBJS-$(TARGET_ALTIVEC) += swscale_altivec.o yuv2rgb_altivec.o
+ OBJS-$(CONFIG_GPL) += yuv2rgb.o
++swscale_altivec.o: CFLAGS+= $(ALTIVECFLAGS) -DABI_ALTIVEC
++yuv2rgb_altivec.o: CFLAGS+= $(ALTIVECFLAGS) -DABI_ALTIVEC
+
+ HEADERS = swscale.h rgb2rgb.h
+
+Index: ffmpeg-0.cvs20070307/libswscale/swscale_template.c
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/libswscale/swscale_template.c 2007-03-09 15:00:41.000000000 +0100
++++ ffmpeg-0.cvs20070307/libswscale/swscale_template.c 2007-03-09 15:01:16.000000000 +0100
+@@ -2936,7 +2936,10 @@
+ }
+ }
+
+-static int RENAME(swScale)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
++#ifndef HAVE_ALTIVEC
++static
++#endif
++int RENAME(swScale)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
+ int srcSliceH, uint8_t* dst[], int dstStride[]){
+
+ /* load a few things into local vars to make the code more readable? and faster */
Added: feisty/ffmpeg/debian/patches/060_fix_avi_skip.diff
===================================================================
--- feisty/ffmpeg/debian/patches/060_fix_avi_skip.diff 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/patches/060_fix_avi_skip.diff 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,12 @@
+--- ffmpeg-0.cvs20060329.orig/libavformat/avidec.c
++++ ffmpeg-0.cvs20060329/libavformat/avidec.c
+@@ -594,7 +594,8 @@
+
+ if (i >= avi->movi_end) {
+ if (avi->is_odml) {
+- url_fskip(pb, avi->riff_end - i);
++ if (i < avi->riff_end)
++ url_fskip(pb, avi->riff_end - i);
+ avi->riff_end = avi->movi_end = url_fsize(pb);
+ } else
+ break;
Added: feisty/ffmpeg/debian/patches/series
===================================================================
--- feisty/ffmpeg/debian/patches/series 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/patches/series 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,16 @@
+005_m68k_workaround.diff
+005_altivec_flags.diff
+005_runtime_cpudetect.diff
+006_mips_pthreads.diff
+010_proper_rpath.diff
+010_ffmpeg-config.diff
+010_shared_library_versioning.diff
+#020_mmx_intrinsics.diff
+011_link_plugins.diff
+013_strip_unneeded_linker_flags.diff
+020_mmx_optims.diff
+020_mmx_pic_code.diff
+020_disable_snow_mmx_in_pic.diff
+040_early_altivec_detection.diff
+040_only_use_maltivec_when_needed.diff
+060_fix_avi_skip.diff
Added: feisty/ffmpeg/debian/patents.txt
===================================================================
--- feisty/ffmpeg/debian/patents.txt 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/patents.txt 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,88 @@
+
+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
+
Added: feisty/ffmpeg/debian/rules
===================================================================
--- feisty/ffmpeg/debian/rules 2007-03-16 17:03:47 UTC (rev 208)
+++ feisty/ffmpeg/debian/rules 2007-03-16 17:23:41 UTC (rev 209)
@@ -0,0 +1,205 @@
+#!/usr/bin/make -f
+
+#export DH_VERBOSE=1
+export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+confflags += --enable-gpl --enable-pp --enable-swscaler --enable-pthreads
+confflags += --enable-libvorbis --enable-libtheora --enable-libogg --enable-liba52 --enable-libdts --enable-libgsm --enable-x264
+
+DEB_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: //p')
+
+ifneq (,$(findstring linux,$(DEB_HOST_GNU_TYPE)))
+ confflags += --enable-dc1394
+ lib1394-dev = libraw1394-dev, libdc1394-13-dev
+ FIREWIRELIBS="-lraw1394 -ldc1394_control"
+else
+ lib1394-dev =
+ FIREWIRELIBS=""
+endif
+ifneq (,$(findstring powerpc,$(DEB_BUILD_GNU_TYPE)))
+ extradoc = doc/ffmpeg_powerpc_performance_evaluation_howto.txt
+endif
+
+ifeq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+ confflags += --disable-debug
+endif
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ # This hack is necessary because GCC won't build fdct_mmx.c with -O0
+ confflags += --extra-cflags="-O1"
+endif
+ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+ confflags += --disable-strip
+endif
+
+ifneq (,$(findstring risky,$(DEB_BUILD_OPTIONS)))
+weak-build-deps += liblame-dev
+confflags += --enable-libmp3lame
+weak-build-deps += libfaad2-dev
+confflags += --enable-libfaadbin --enable-libfaad
+weak-build-deps += libfaac-dev
+confflags += --enable-libfaac
+weak-build-deps += libxvidcore-dev
+confflags += --enable-xvid
+$(warning Make sure these packages are installed: $(weak-build-deps))
+endif
+
+build: build-stamp
+build-stamp:
+ dh_testdir
+ QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
+
+ # Build static libraries
+ ./configure $(confflags) --disable-ffmpeg --disable-vhook --disable-ffserver --disable-ffplay --prefix=/usr
+ cd doc && $(MAKE)
+ $(MAKE)
+
+ # Backup static libraries
+ mv libavutil/libavutil.a libavutil/libavutil.a.bak
+ mv libpostproc/libpostproc.a libpostproc/libpostproc.a.bak
+ mv libavcodec/libavcodec.a libavcodec/libavcodec.a.bak
+ mv libavformat/libavformat.a libavformat/libavformat.a.bak
+ mv libswscale/libswscale.a libswscale/libswscale.a.bak
+
+ # Build ffmpeg and shared libraries
+ ./configure $(confflags) --enable-shared --prefix=/usr
+
+ sed 's/ldts/ldts_pic/' <config.mak >config.mak.pic
+ echo 'CFLAGS += -fPIC -DPIC' >> config.mak.pic
+
+ cd libavutil && \
+ $(MAKE) clean && \
+ rm -f Makefile.pic && \
+ sed 's/config.mak/config.mak.pic/' <Makefile >Makefile.pic && \
+ $(MAKE) -f Makefile.pic && \
+ rm -f Makefile.pic
+
+ cd libavcodec && \
+ $(MAKE) clean && \
+ rm -f Makefile.pic && \
+ sed 's/config.mak/config.mak.pic/' <Makefile >Makefile.pic && \
+ $(MAKE) -f Makefile.pic && \
+ rm -f Makefile.pic
+
+ cd libpostproc && \
+ $(MAKE) clean && \
+ rm -f Makefile.pic && \
+ sed 's/config.mak/config.mak.pic/' <Makefile >Makefile.pic && \
+ $(MAKE) -f Makefile.pic && \
+ rm -f Makefile.pic
+
+ cd libavformat && \
+ $(MAKE) clean && \
+ rm -f Makefile.pic && \
+ sed 's/config.mak/config.mak.pic/' <Makefile >Makefile.pic && \
+ $(MAKE) -f Makefile.pic && \
+ rm -f Makefile.pic
+
+ cd libswscale && \
+ $(MAKE) clean && \
+ rm -f Makefile.pic && \
+ sed 's/config.mak/config.mak.pic/' <Makefile >Makefile.pic && \
+ $(MAKE) -f Makefile.pic && \
+ rm -f Makefile.pic
+
+ rm -f config.mak.pic
+
+ # Restore static libraries
+ mv libavutil/libavutil.a.bak libavutil/libavutil.a
+ mv libpostproc/libpostproc.a.bak libpostproc/libpostproc.a
+ mv libavcodec/libavcodec.a.bak libavcodec/libavcodec.a
+ mv libavformat/libavformat.a.bak libavformat/libavformat.a
+ mv libswscale/libswscale.a.bak libswscale/libswscale.a
+
+ # Fix timestamps
+ touch libavutil/libavutil.a libpostproc/libpostproc.a
+ touch libavcodec/libavcodec.a libavformat/libavformat.a
+ touch libswscale/libswscale.a
+ touch ffmpeg ffmpeg_g ffplay ffplay_g
+
+ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
+ -cd tests && $(MAKE)
+endif
+
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp
+ -cd doc && $(MAKE) clean
+ -cd tests && $(MAKE) clean
+ -$(MAKE) distclean
+ QUILT_PATCHES=debian/patches quilt pop -a -R || test $$? = 2
+ rm -f libavutil/Makefile.pic libavcodec/Makefile.pic config.log
+ rm -f libpostproc/Makefile.pic libavformat/Makefile.pic
+ rm -f libswscale/Makefile.pic
+ rm -f libavutil/libavutil.a.bak
+ rm -f libpostproc/libpostproc.a.bak
+ rm -f libavcodec/libavcodec.a.bak
+ rm -f libavformat/libavformat.a.bak
+ rm -f libswscale/libswscale.a.bak
+ rm -f libavcodec-uninstalled.pc libavcodec.pc
+ rm -f libavutil-uninstalled.pc libavutil.pc
+ rm -f libavformat-uninstalled.pc libavformat.pc
+ rm -f libswscale-uninstalled.pc libswscale.pc
+ rm -f libpostproc-uninstalled.pc libpostproc.pc
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs -ptmp usr/share/doc/ffmpeg/html etc usr/include/ffmpeg usr/lib usr/bin usr/share/man/man1 usr/include/postproc
+
+ $(MAKE) install DESTDIR=`pwd`/debian/tmp/ mandir=`pwd`/debian/tmp/usr/share/man
+ cp libavcodec/dsputil.h debian/tmp/usr/include/ffmpeg
+ cp libpostproc/libpostproc.a debian/tmp/usr/lib
+ cp libpostproc/postprocess.h debian/tmp/usr/include/postproc
+ cp libpostproc.pc debian/tmp/usr/lib/pkgconfig/
+
+ dh_install -ptmp libavutil/libavutil.so* libavcodec/libavcodec.so* libpostproc/libpostproc.so* libavformat/libavformat.so* libswscale/libswscale.so* /usr/lib
+
+ cp doc/*.html debian/tmp/usr/share/doc/ffmpeg/html/
+ cp doc/ffserver.conf debian/tmp/etc/
+
+ sed -e s/@FIREWIRELIBS@/$(FIREWIRELIBS)/ -e s/@VERSION@/$(DEB_VERSION)/ ffmpeg-config.in > debian/tmp/usr/bin/ffmpeg-config
+ chmod 644 debian/tmp/usr/bin/ffmpeg-config
+ cp ffmpeg-config.1 debian/tmp/usr/share/man/man1/ffmpeg-config.1
+
+ dh_install --fail-missing --sourcedir=debian/tmp
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installdocs $(extradoc) doc/optimization.txt
+ dh_installdocs -A CREDITS doc/TODO debian/patents.txt debian/README.Debian
+ dh_installexamples -pffmpeg doc/ffserver.conf
+ dh_installexamples -plibavcodec-dev libavcodec/apiexample.c
+ dh_installmenu
+ dh_installcron
+ dh_installinfo
+ dh_installmime
+ dh_installchangelogs Changelog
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_makeshlibs -p libavutil1d -V 'libavutil1d (>= 0.cvs20070307)'
+ dh_makeshlibs -p libavcodec1d -V 'libavcodec1d (>= 0.cvs20070307)'
+ dh_makeshlibs -p libavformat1d -V 'libavformat1d (>= 0.cvs20070307)'
+ dh_makeshlibs -p libswscale1d -V 'libswscale1d (>= 0.cvs20070307)'
+ dh_makeshlibs -p libpostproc1d -V 'libpostproc1d (>= 0.cvs20070307)'
+ dh_installdeb
+ dh_shlibdeps -L libavutil1d -L libavcodec1d -L libpostproc1d -L libavformat1d -L libswscale1d -l debian/libavutil1d/usr/lib:debian/libavcodec1d/usr/lib:debian/libavformat1d/usr/lib:debian/libpostproc1d/usr/lib:debian/libswscale1d/usr/lib
+ dh_gencontrol -- -Vlib1394-dev="$(lib1394-dev)"
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
Property changes on: feisty/ffmpeg/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
More information about the Pkg-multimedia-commits
mailing list