r783 - in /unstable/ffmpeg/debian: ./ patches/

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sat Jun 2 13:46:53 UTC 2007


Author: siretart
Date: Sat Jun  2 13:46:53 2007
New Revision: 783

URL: http://svn.debian.org/wsvn/pkg-multimedia/?sc=1&rev=783
Log:
commit latest upload to unstable in our unstable svn branch.


Added:
    unstable/ffmpeg/debian/libavcodec1d.install
    unstable/ffmpeg/debian/libavformat1d.install
    unstable/ffmpeg/debian/libavutil-dev.install
    unstable/ffmpeg/debian/libavutil1d.install
    unstable/ffmpeg/debian/libpostproc1d.install
    unstable/ffmpeg/debian/libswscale-dev.install
    unstable/ffmpeg/debian/libswscale1d.install
    unstable/ffmpeg/debian/patches/010_proper_rpath.diff
    unstable/ffmpeg/debian/patches/011_link_plugins.diff
    unstable/ffmpeg/debian/patches/013_strip_unneeded_linker_flags.diff
    unstable/ffmpeg/debian/patches/015_build_imgresample.diff
    unstable/ffmpeg/debian/patches/020_fix_libswscale_pic_code
    unstable/ffmpeg/debian/patches/300_c++_compliant_headers.diff
Modified:
    unstable/ffmpeg/debian/changelog
    unstable/ffmpeg/debian/control
    unstable/ffmpeg/debian/libavcodec-dev.install
    unstable/ffmpeg/debian/patches/005_altivec_flags.diff
    unstable/ffmpeg/debian/patches/005_m68k_workaround.diff
    unstable/ffmpeg/debian/patches/005_runtime_cpudetect.diff
    unstable/ffmpeg/debian/patches/006_mips_pthreads.diff
    unstable/ffmpeg/debian/patches/010_shared_library_versioning.diff
    unstable/ffmpeg/debian/patches/020_disable_snow_mmx_in_pic.diff
    unstable/ffmpeg/debian/patches/020_mmx_optims.diff
    unstable/ffmpeg/debian/patches/040_early_altivec_detection.diff
    unstable/ffmpeg/debian/patches/040_only_use_maltivec_when_needed.diff
    unstable/ffmpeg/debian/patches/054_h264_mmx_chroma_mc_crash.diff
    unstable/ffmpeg/debian/patches/series
    unstable/ffmpeg/debian/rules

Modified: unstable/ffmpeg/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/changelog?rev=783&op=diff
==============================================================================
--- unstable/ffmpeg/debian/changelog (original)
+++ unstable/ffmpeg/debian/changelog Sat Jun  2 13:46:53 2007
@@ -1,7 +1,28 @@
-ffmpeg (0.cvs20060823-8) unstable; urgency=high
-
-  * debian/patches/052_base64_encode_crash.diff:
-    + New patch: fix an infinite loop in base64 encoding.
+ffmpeg (0.cvs20070307-5) unstable; urgency=low
+
+  * upload to unstable
+  * remove x264 support, as it has been removed from unstable
+
+ -- Reinhard Tartler <siretart at tauware.de>  Wed, 30 May 2007 15:19:20 +0200
+
+ffmpeg (0.cvs20070307-4) experimental; urgency=low
+
+  * added myself to uploaders
+  
+  * 020_fix_libswscale_pic_code:
+    + added, avoid some MMX code to avoid PIC code
+
+  [ Sam Hocevar ]
+  
+  * fixed path in library installation.
+
+ -- Reinhard Tartler <siretart at tauware.de>  Wed, 11 Apr 2007 23:17:47 +0200
+
+ffmpeg (0.cvs20070307-3) experimental; urgency=low
+
+  * debian/patches/015_build_imgresample.diff:
+    + Build imgresample functions even with swscaler activated, or legacy
+      applications will stop working.
 
   * debian/patches/053_rm_demux_crash.diff:
     + New patch: fix a double free with corrupted rm files (Closes: #379922).
@@ -10,22 +31,91 @@
     + New patch: workaround for a buffer overflow in the MMX H264 chroma
       motion compensation until upstream fixes it properly (Closes: #404176).
 
-  * debian/patches/070_zzuf_r7536_ogm_crash.diff:
-  * debian/patches/071_zzuf_r7537_avi_crash.diff:
-  * debian/patches/072_zzuf_r7538_mpeg_crash.diff:
-  * debian/patches/073_zzuf_r7539_asf_crash.diff:
-  * debian/patches/074_zzuf_r7561_ogm_crash.diff:
-  * debian/patches/075_zzuf_r7595_flac_crash.diff:
-  * debian/patches/076_zzuf_r7718_mpeg_infinite_loop.diff:
-  * debian/patches/077_zzuf_r7889_mpeg_crash.diff:
-    + New patches taken from upstream SVN. Fix various crashes and deadlocks
-      found with zzuf (Closes: #407003).
+  * debian/patches/300_c++_compliant_headers.diff:
+    + Define INT64_C() when the system headers don't provide it, for instance
+      when building C++ code.
 
   * debian/control:
     + Set pkg-multimedia-maintainers as main maintainer.
     + Updated VCS fields.
-
- -- Sam Hocevar (Debian packages) <sam+deb at zoy.org>  Fri, 23 Mar 2007 22:43:48 +0100
+  * debian/rules:
+    + Huge cleanup.
+
+ -- 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
 

Modified: unstable/ffmpeg/debian/control
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/control?rev=783&op=diff
==============================================================================
--- unstable/ffmpeg/debian/control (original)
+++ unstable/ffmpeg/debian/control Sat Jun  2 13:46:53 2007
@@ -2,11 +2,11 @@
 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>
+Uploaders: Sam Hocevar (Debian packages) <sam+deb at zoy.org>, Loic Minier <lool at dooz.org>, Reinhard Tartler <siretart at tauware.de>
 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
 Standards-Version: 3.7.2
-XS-Vcs-Svn: svn://svn.debian.org/pkg-multimedia/unstable/ffmpeg
-XS-Vcs-Browser: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/
+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
@@ -18,7 +18,18 @@
  file formats (AVI, MPEG, OGG, Matroska, ASF...) and encoding formats (MPEG,
  DivX, MPEG4, AC3, DV...).
 
-Package: libavcodec0d
+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}
@@ -29,7 +40,7 @@
  This package contains a Debian-specific version of the libavcodec shared
  object that should only be used by Debian packages.
 
-Package: libpostproc0d
+Package: libpostproc1d
 Section: libs
 Architecture: any
 Depends: ${shlibs:Depends}
@@ -39,7 +50,7 @@
  This package contains a Debian-specific version of the libpostproc shared
  object that should only be used by Debian packages.
 
-Package: libavformat0d
+Package: libavformat1d
 Section: libs
 Architecture: any
 Depends: ${shlibs:Depends}
@@ -50,10 +61,33 @@
  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: libavcodec0d (= ${Source-Version}), libvorbis-dev, libogg-dev, libdts-dev, liba52-dev, zlib1g-dev, ${lib1394-dev}, libtheora-dev (>> 0.0.0.alpha4), libgsm1-dev, ${shlibs:Depends}
+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
@@ -66,7 +100,7 @@
 Package: libpostproc-dev
 Section: libdevel
 Architecture: any
-Depends: libpostproc0d (= ${Source-Version}), libavcodec-dev (= ${Source-Version}), ${shlibs:Depends}
+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.
  .
@@ -76,7 +110,7 @@
 Package: libavformat-dev
 Section: libdevel
 Architecture: any
-Depends: libavformat0d (= ${Source-Version}), libavcodec-dev (= ${Source-Version}), ${shlibs:Depends}
+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
@@ -86,3 +120,13 @@
  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.
+

Modified: unstable/ffmpeg/debian/libavcodec-dev.install
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/libavcodec-dev.install?rev=783&op=diff
==============================================================================
--- unstable/ffmpeg/debian/libavcodec-dev.install (original)
+++ unstable/ffmpeg/debian/libavcodec-dev.install Sat Jun  2 13:46:53 2007
@@ -1,17 +1,3 @@
-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/integer.h
-usr/include/ffmpeg/intfloat_readwrite.h
-usr/include/ffmpeg/log.h
-usr/include/ffmpeg/mathematics.h
-usr/include/ffmpeg/md5.h
-usr/include/ffmpeg/rational.h
-usr/lib/libavutil.a
-usr/lib/libavutil.so
 usr/lib/pkgconfig/libavcodec.pc
 usr/include/ffmpeg/avcodec.h
 usr/include/ffmpeg/dsputil.h

Added: unstable/ffmpeg/debian/libavcodec1d.install
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/libavcodec1d.install?rev=783&op=file
==============================================================================
--- unstable/ffmpeg/debian/libavcodec1d.install (added)
+++ unstable/ffmpeg/debian/libavcodec1d.install Sat Jun  2 13:46:53 2007
@@ -1,0 +1,1 @@
+usr/lib/libavcodec.so.*

Added: unstable/ffmpeg/debian/libavformat1d.install
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/libavformat1d.install?rev=783&op=file
==============================================================================
--- unstable/ffmpeg/debian/libavformat1d.install (added)
+++ unstable/ffmpeg/debian/libavformat1d.install Sat Jun  2 13:46:53 2007
@@ -1,0 +1,1 @@
+usr/lib/libavformat.so.*

Added: unstable/ffmpeg/debian/libavutil-dev.install
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/libavutil-dev.install?rev=783&op=file
==============================================================================
--- unstable/ffmpeg/debian/libavutil-dev.install (added)
+++ unstable/ffmpeg/debian/libavutil-dev.install Sat Jun  2 13:46:53 2007
@@ -1,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: unstable/ffmpeg/debian/libavutil1d.install
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/libavutil1d.install?rev=783&op=file
==============================================================================
--- unstable/ffmpeg/debian/libavutil1d.install (added)
+++ unstable/ffmpeg/debian/libavutil1d.install Sat Jun  2 13:46:53 2007
@@ -1,0 +1,1 @@
+usr/lib/libavutil.so.*

Added: unstable/ffmpeg/debian/libpostproc1d.install
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/libpostproc1d.install?rev=783&op=file
==============================================================================
--- unstable/ffmpeg/debian/libpostproc1d.install (added)
+++ unstable/ffmpeg/debian/libpostproc1d.install Sat Jun  2 13:46:53 2007
@@ -1,0 +1,1 @@
+usr/lib/libpostproc.so.*

Added: unstable/ffmpeg/debian/libswscale-dev.install
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/libswscale-dev.install?rev=783&op=file
==============================================================================
--- unstable/ffmpeg/debian/libswscale-dev.install (added)
+++ unstable/ffmpeg/debian/libswscale-dev.install Sat Jun  2 13:46:53 2007
@@ -1,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: unstable/ffmpeg/debian/libswscale1d.install
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/libswscale1d.install?rev=783&op=file
==============================================================================
--- unstable/ffmpeg/debian/libswscale1d.install (added)
+++ unstable/ffmpeg/debian/libswscale1d.install Sat Jun  2 13:46:53 2007
@@ -1,0 +1,1 @@
+usr/lib/libswscale.so.*

Modified: unstable/ffmpeg/debian/patches/005_altivec_flags.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/patches/005_altivec_flags.diff?rev=783&op=diff
==============================================================================
--- unstable/ffmpeg/debian/patches/005_altivec_flags.diff (original)
+++ unstable/ffmpeg/debian/patches/005_altivec_flags.diff Sat Jun  2 13:46:53 2007
@@ -1,14 +1,13 @@
-Index: ffmpeg-0.cvs20060724/configure
+Index: ffmpeg.svn/configure
 ===================================================================
---- ffmpeg-0.cvs20060724.orig/configure	2006-07-24 17:20:01.000000000 +0200
-+++ ffmpeg-0.cvs20060724/configure	2006-07-24 17:20:05.000000000 +0200
-@@ -1132,7 +1132,8 @@
+--- 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
-             CFLAGS="$CFLAGS -faltivec"
+             add_cflags "-faltivec"
          else
--            CFLAGS="$CFLAGS -maltivec -mabi=altivec"
-+            #CFLAGS="$CFLAGS -maltivec -mabi=altivec"
-+            CFLAGS="$CFLAGS -maltivec"
+-            add_cflags "-maltivec -mabi=altivec"
++            add_cflags "-maltivec"
          fi
      fi
  fi

Modified: unstable/ffmpeg/debian/patches/005_m68k_workaround.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/patches/005_m68k_workaround.diff?rev=783&op=diff
==============================================================================
--- unstable/ffmpeg/debian/patches/005_m68k_workaround.diff (original)
+++ unstable/ffmpeg/debian/patches/005_m68k_workaround.diff Sat Jun  2 13:46:53 2007
@@ -1,13 +1,13 @@
-Index: ffmpeg-0.cvs20060724/configure
+Index: ffmpeg.svn/configure
 ===================================================================
---- ffmpeg-0.cvs20060724.orig/configure	2006-07-24 17:11:24.000000000 +0200
-+++ ffmpeg-0.cvs20060724/configure	2006-07-24 17:20:01.000000000 +0200
-@@ -1458,6 +1458,8 @@
+--- 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
-         CFLAGS="$CFLAGS -O5"
-         LDFLAGS="$LDFLAGS -O5"
+         add_cflags  "-O5"
+         add_ldflags "-O5"
 +    elif test "$cpu" = "m68k" ; then
-+        CFLAGS="-O2 $CFLAGS"
++        add_cflags "-O2"
      else
-         CFLAGS="-O3 $CFLAGS"
+         add_cflags "-O3"
      fi

Modified: unstable/ffmpeg/debian/patches/005_runtime_cpudetect.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/patches/005_runtime_cpudetect.diff?rev=783&op=diff
==============================================================================
--- unstable/ffmpeg/debian/patches/005_runtime_cpudetect.diff (original)
+++ unstable/ffmpeg/debian/patches/005_runtime_cpudetect.diff Sat Jun  2 13:46:53 2007
@@ -1,14 +1,15 @@
-Index: ffmpeg-0.cvs20060724/configure
+Index: ffmpeg.svn/configure
 ===================================================================
---- ffmpeg-0.cvs20060724.orig/configure	2006-07-24 17:20:05.000000000 +0200
-+++ ffmpeg-0.cvs20060724/configure	2006-07-24 17:20:09.000000000 +0200
-@@ -1698,6 +1698,9 @@
-     echo "#undef HAVE_ALTIVEC_H" >> $TMPH
-   fi
+--- 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 test "$gprof" = "yes" ; then
-   echo "#define HAVE_GPROF 1" >> $TMPH
- fi
++
+ if enabled sdl; then
+   echo "SDL_LIBS=`"${SDL_CONFIG}" --libs`" >> config.mak
+   echo "SDL_CFLAGS=`"${SDL_CONFIG}" --cflags`" >> config.mak

Modified: unstable/ffmpeg/debian/patches/006_mips_pthreads.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/patches/006_mips_pthreads.diff?rev=783&op=diff
==============================================================================
--- unstable/ffmpeg/debian/patches/006_mips_pthreads.diff (original)
+++ unstable/ffmpeg/debian/patches/006_mips_pthreads.diff Sat Jun  2 13:46:53 2007
@@ -1,17 +1,15 @@
-Index: ffmpeg-0.cvs20060823/configure
+Index: ffmpeg.svn/configure
 ===================================================================
---- ffmpeg-0.cvs20060823.orig/configure	2006-08-30 18:02:50.000000000 +0200
-+++ ffmpeg-0.cvs20060823/configure	2006-08-30 18:08:23.000000000 +0200
-@@ -1252,7 +1252,11 @@
+--- 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
--    { check_cflags -pthread && check_ldflags -pthread; } ||
 +    if test "$targetos" = "Linux" -a \
 +            "$cpu" = "mips" ; then
-+        pthreads_ldadd="-lpthread"
++        add_ldflags -lpthread
 +    fi
-+    { check_cflags -pthread && check_ldflags "-pthread $pthreads_ldadd"; } ||
-     { check_cflags -pthreads && check_ldflags -pthreads; } ||
-     check_lib pthread.h pthread_create -lpthread ||
-     check_func pthread_create ||
+     if check_func pthread_create; then
+         :
+     elif check_func pthread_create -pthread; then

Added: unstable/ffmpeg/debian/patches/010_proper_rpath.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/patches/010_proper_rpath.diff?rev=783&op=file
==============================================================================
--- unstable/ffmpeg/debian/patches/010_proper_rpath.diff (added)
+++ unstable/ffmpeg/debian/patches/010_proper_rpath.diff Sat Jun  2 13:46:53 2007
@@ -1,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"

Modified: unstable/ffmpeg/debian/patches/010_shared_library_versioning.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/patches/010_shared_library_versioning.diff?rev=783&op=diff
==============================================================================
--- unstable/ffmpeg/debian/patches/010_shared_library_versioning.diff (original)
+++ unstable/ffmpeg/debian/patches/010_shared_library_versioning.diff Sat Jun  2 13:46:53 2007
@@ -1,9 +1,9 @@
-Index: ffmpeg-0.cvs20060817/configure
+Index: ffmpeg-0.cvs20070307/configure
 ===================================================================
---- ffmpeg-0.cvs20060817.orig/configure	2006-08-17 12:45:30.000000000 +0200
-+++ ffmpeg-0.cvs20060817/configure	2006-08-17 12:49:18.000000000 +0200
-@@ -1744,11 +1744,11 @@
-   echo "#define HAVE_VHOOK 1" >> $TMPH
+--- 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'`
@@ -19,68 +19,105 @@
  
  
  
-Index: ffmpeg-0.cvs20060817/libavutil/avutil.h
+@@ -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.cvs20060817.orig/libavutil/avutil.h	2006-07-24 17:11:16.000000000 +0200
-+++ ffmpeg-0.cvs20060817/libavutil/avutil.h	2006-08-17 12:47:42.000000000 +0200
-@@ -15,7 +15,7 @@
+--- 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)+(0<<8)+0)
--#define LIBAVUTIL_VERSION       49.0.0
-+#define LIBAVUTIL_VERSION       0d.49.0.0
+ #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.cvs20060817/libavcodec/avcodec.h
+Index: ffmpeg-0.cvs20070307/libavcodec/avcodec.h
 ===================================================================
---- ffmpeg-0.cvs20060817.orig/libavcodec/avcodec.h	2006-08-17 12:39:27.000000000 +0200
-+++ ffmpeg-0.cvs20060817/libavcodec/avcodec.h	2006-08-17 12:49:57.000000000 +0200
-@@ -18,7 +18,7 @@
+--- 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)+(11<<8)+0)
--#define LIBAVCODEC_VERSION      51.11.0
-+#define LIBAVCODEC_VERSION      0d.51.11.0
+ #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.cvs20060817/libavformat/avformat.h
+Index: ffmpeg-0.cvs20070307/libavformat/avformat.h
 ===================================================================
---- ffmpeg-0.cvs20060817.orig/libavformat/avformat.h	2006-08-17 12:39:28.000000000 +0200
-+++ ffmpeg-0.cvs20060817/libavformat/avformat.h	2006-08-17 12:47:42.000000000 +0200
-@@ -6,7 +6,7 @@
+--- 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 ((50<<16)+(5<<8)+0)
--#define LIBAVFORMAT_VERSION     50.5.0
-+#define LIBAVFORMAT_VERSION     0d.50.5.0
+ #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.cvs20060817/common.mak
+Index: ffmpeg-0.cvs20070307/common.mak
 ===================================================================
---- ffmpeg-0.cvs20060817.orig/common.mak	2006-08-17 12:39:28.000000000 +0200
-+++ ffmpeg-0.cvs20060817/common.mak	2006-08-17 12:50:26.000000000 +0200
-@@ -64,7 +64,7 @@
+--- 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)
- 	install -d "$(libdir)"
-Index: ffmpeg-0.cvs20060817/libpostproc/postprocess.h
+Index: ffmpeg-0.cvs20070307/libpostproc/postprocess.h
 ===================================================================
---- ffmpeg-0.cvs20060817.orig/libpostproc/postprocess.h	2006-06-11 14:17:36.000000000 +0200
-+++ ffmpeg-0.cvs20060817/libpostproc/postprocess.h	2006-08-17 12:47:42.000000000 +0200
-@@ -30,7 +30,7 @@
+--- 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     0d.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: unstable/ffmpeg/debian/patches/011_link_plugins.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/patches/011_link_plugins.diff?rev=783&op=file
==============================================================================
--- unstable/ffmpeg/debian/patches/011_link_plugins.diff (added)
+++ unstable/ffmpeg/debian/patches/011_link_plugins.diff Sat Jun  2 13:46:53 2007
@@ -1,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: unstable/ffmpeg/debian/patches/013_strip_unneeded_linker_flags.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/patches/013_strip_unneeded_linker_flags.diff?rev=783&op=file
==============================================================================
--- unstable/ffmpeg/debian/patches/013_strip_unneeded_linker_flags.diff (added)
+++ unstable/ffmpeg/debian/patches/013_strip_unneeded_linker_flags.diff Sat Jun  2 13:46:53 2007
@@ -1,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: unstable/ffmpeg/debian/patches/015_build_imgresample.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/patches/015_build_imgresample.diff?rev=783&op=file
==============================================================================
--- unstable/ffmpeg/debian/patches/015_build_imgresample.diff (added)
+++ unstable/ffmpeg/debian/patches/015_build_imgresample.diff Sat Jun  2 13:46:53 2007
@@ -1,0 +1,46 @@
+Index: ffmpeg-0.cvs20070307/libavcodec/Makefile
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/libavcodec/Makefile	2007-03-07 14:37:04.000000000 +0100
++++ ffmpeg-0.cvs20070307/libavcodec/Makefile	2007-03-28 16:54:03.000000000 +0200
+@@ -310,9 +310,7 @@
+ 
+ OBJS-$(HAVE_XVMC_ACCEL)                += xvmcvideo.o
+ 
+-ifneq ($(CONFIG_SWSCALER),yes)
+ OBJS += imgresample.o
+-endif
+ 
+ # i386 mmx specific stuff
+ ifeq ($(TARGET_MMX),yes)
+Index: ffmpeg-0.cvs20070307/tests/Makefile
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/tests/Makefile	2007-03-07 14:37:04.000000000 +0100
++++ ffmpeg-0.cvs20070307/tests/Makefile	2007-03-28 16:18:43.000000000 +0200
+@@ -43,14 +43,6 @@
+ 	@echo
+ endif
+ 
+-ifeq ($(CONFIG_SWSCALER),yes)
+-test-server codectest mpeg4 mpeg ac3 snow snowll libavtest: swscale_error
+-swscale_error:
+-	@echo
+-	@echo "This regression test is incompatible with --enable-swscaler."
+-	@echo
+-	@exit 1
+-endif
+ 
+ seektest: seek_test$(EXESUF)
+ 	@$(SRC_DIR)/seek_test.sh $(SEEK_REFFILE)
+Index: ffmpeg-0.cvs20070307/libavcodec/imgconvert.c
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/libavcodec/imgconvert.c	2007-03-28 16:54:10.000000000 +0200
++++ ffmpeg-0.cvs20070307/libavcodec/imgconvert.c	2007-03-28 16:54:20.000000000 +0200
+@@ -2317,7 +2317,7 @@
+ }
+ #endif
+ 
+-#ifndef CONFIG_SWSCALER
++#if 1
+ /* XXX: always use linesize. Return -1 if not supported */
+ int img_convert(AVPicture *dst, int dst_pix_fmt,
+                 const AVPicture *src, int src_pix_fmt,

Modified: unstable/ffmpeg/debian/patches/020_disable_snow_mmx_in_pic.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/patches/020_disable_snow_mmx_in_pic.diff?rev=783&op=diff
==============================================================================
--- unstable/ffmpeg/debian/patches/020_disable_snow_mmx_in_pic.diff (original)
+++ unstable/ffmpeg/debian/patches/020_disable_snow_mmx_in_pic.diff Sat Jun  2 13:46:53 2007
@@ -6,8 +6,8 @@
              c->avg_h264_chroma_pixels_tab[1]= avg_h264_chroma_mc4_3dnow;
          }
  
--#ifdef CONFIG_SNOW_ENCODER
-+#if defined(CONFIG_SNOW_ENCODER) && (defined(ARCH_X86_64) || !defined(PIC))
+-#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;

Added: unstable/ffmpeg/debian/patches/020_fix_libswscale_pic_code
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/patches/020_fix_libswscale_pic_code?rev=783&op=file
==============================================================================
--- unstable/ffmpeg/debian/patches/020_fix_libswscale_pic_code (added)
+++ unstable/ffmpeg/debian/patches/020_fix_libswscale_pic_code Sat Jun  2 13:46:53 2007
@@ -1,0 +1,22 @@
+Index: ffmpeg.feisty/libswscale/swscale.c
+===================================================================
+--- ffmpeg.feisty.orig/libswscale/swscale.c	2007-03-16 17:40:54.000000000 +0100
++++ ffmpeg.feisty/libswscale/swscale.c	2007-03-16 17:58:05.000000000 +0100
+@@ -1289,7 +1289,7 @@
+         return 0;
+ }
+ 
+-#ifdef COMPILE_MMX2
++#if defined (COMPILE_MMX2) && !defined(ARCH_X86_64)
+ static void initMMX2HScaler(int dstW, int xInc, uint8_t *funnyCode, int16_t *filter, int32_t *filterPos, int numSplits)
+ {
+ 	uint8_t *fragmentA;
+@@ -2200,7 +2200,7 @@
+ 				 srcFilter->chrH, dstFilter->chrH, c->param);
+ 
+ #define MAX_FUNNY_CODE_SIZE 10000
+-#if defined(COMPILE_MMX2)
++#if defined (COMPILE_MMX2) && !defined(ARCH_X86_64)
+ // can't downscale !!!
+ 		if(c->canMMX2BeUsed && (flags & SWS_FAST_BILINEAR))
+ 		{

Modified: unstable/ffmpeg/debian/patches/020_mmx_optims.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/patches/020_mmx_optims.diff?rev=783&op=diff
==============================================================================
--- unstable/ffmpeg/debian/patches/020_mmx_optims.diff (original)
+++ unstable/ffmpeg/debian/patches/020_mmx_optims.diff Sat Jun  2 13:46:53 2007
@@ -3,10 +3,10 @@
 --- 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/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/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)
- ifeq ($(CONFIG_GPL),yes)
- OBJS += i386/idct_mmx_xvid.o
- endif
+ OBJS-$(CONFIG_GPL)                     += i386/idct_mmx.o
+ OBJS-$(CONFIG_CAVS_DECODER)            += i386/cavsdsp_mmx.o
+ OBJS-$(CONFIG_SNOW_DECODER)            += i386/snowdsp_mmx.o

Modified: unstable/ffmpeg/debian/patches/040_early_altivec_detection.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/patches/040_early_altivec_detection.diff?rev=783&op=diff
==============================================================================
--- unstable/ffmpeg/debian/patches/040_early_altivec_detection.diff (original)
+++ unstable/ffmpeg/debian/patches/040_early_altivec_detection.diff Sat Jun  2 13:46:53 2007
@@ -1,8 +1,8 @@
-Index: ffmpeg-0.cvs20060823/libavcodec/ppc/dsputil_altivec.c
+Index: ffmpeg-0.cvs20070307/libavcodec/ppc/dsputil_altivec.c
 ===================================================================
---- ffmpeg-0.cvs20060823.orig/libavcodec/ppc/dsputil_altivec.c	2007-01-28 13:18:29.000000000 +0100
-+++ ffmpeg-0.cvs20060823/libavcodec/ppc/dsputil_altivec.c	2007-01-28 13:40:40.000000000 +0100
-@@ -1654,7 +1654,7 @@
+--- 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;
  }
  
@@ -11,7 +11,7 @@
  {
  #ifdef __AMIGAOS4__
      ULONG result = 0;
-@@ -1698,6 +1698,15 @@
+@@ -1463,6 +1463,15 @@
  #endif /* __AMIGAOS4__ */
  }
  
@@ -27,11 +27,11 @@
  static void vorbis_inverse_coupling_altivec(float *mag, float *ang,
                                              int blocksize)
  {
-Index: ffmpeg-0.cvs20060823/libavcodec/dsputil.c
+Index: ffmpeg-0.cvs20070307/libavcodec/dsputil.c
 ===================================================================
---- ffmpeg-0.cvs20060823.orig/libavcodec/dsputil.c	2007-01-28 13:36:58.000000000 +0100
-+++ ffmpeg-0.cvs20060823/libavcodec/dsputil.c	2007-01-28 13:38:00.000000000 +0100
-@@ -32,6 +32,11 @@
+--- 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"
  
@@ -43,13 +43,13 @@
  /* snow.c */
  void ff_spatial_dwt(int *buffer, int width, int height, int stride, int type, int decomposition_count);
  
-@@ -3841,6 +3846,9 @@
+@@ -3793,6 +3798,9 @@
  {
      int i;
  
 +#if HAVE_ALTIVEC==1
 +    (void)has_altivec();
 +#endif
-     for(i=0;i<256;i++) cropTbl[i + MAX_NEG_CROP] = i;
+     for(i=0;i<256;i++) ff_cropTbl[i + MAX_NEG_CROP] = i;
      for(i=0;i<MAX_NEG_CROP;i++) {
-         cropTbl[i] = 0;
+         ff_cropTbl[i] = 0;

Modified: unstable/ffmpeg/debian/patches/040_only_use_maltivec_when_needed.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/patches/040_only_use_maltivec_when_needed.diff?rev=783&op=diff
==============================================================================
--- unstable/ffmpeg/debian/patches/040_only_use_maltivec_when_needed.diff (original)
+++ unstable/ffmpeg/debian/patches/040_only_use_maltivec_when_needed.diff Sat Jun  2 13:46:53 2007
@@ -1,12 +1,12 @@
-Index: ffmpeg-0.cvs20060823/configure
+Index: ffmpeg-0.cvs20070307/configure
 ===================================================================
---- ffmpeg-0.cvs20060823.orig/configure	2007-03-08 17:48:12.000000000 +0100
-+++ ffmpeg-0.cvs20060823/configure	2007-03-08 17:48:12.000000000 +0100
-@@ -1136,11 +1136,13 @@
-             CFLAGS="$CFLAGS -faltivec"
+--- ffmpeg-0.cvs20070307.orig/configure	2007-03-28 16:07:04.000000000 +0200
++++ ffmpeg-0.cvs20070307/configure	2007-03-28 16:17:39.000000000 +0200
+@@ -1410,11 +1410,13 @@
+         if test -n "`$cc -v 2>&1 | grep version | grep Apple`"; then
+             add_cflags "-faltivec"
          else
-             #CFLAGS="$CFLAGS -maltivec -mabi=altivec"
--            CFLAGS="$CFLAGS -maltivec"
+-            add_cflags "-maltivec"
 +            ALTIVECFLAGS="$ALTIVECFLAGS -maltivec"
          fi
      fi
@@ -14,61 +14,67 @@
  
 +save_flags
 +temp_cflags $ALTIVECFLAGS
- check_header altivec.h && _altivec_h=yes || _altivec_h=no
+ check_header altivec.h
  
  # check if our compiler supports Motorola AltiVec C API
-@@ -1159,6 +1161,7 @@
- }
+@@ -1461,6 +1463,7 @@
+         }
  EOF
  fi
 +restore_flags
  
  # mmi only available on mips
  if test $mmi = "default"; then
-@@ -1599,6 +1602,7 @@
- test "$needmdynamicnopic" = yes && add_cflags -mdynamic-no-pic
+@@ -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.cvs20060823/libavcodec/Makefile
+Index: ffmpeg-0.cvs20070307/libavcodec/Makefile
 ===================================================================
---- ffmpeg-0.cvs20060823.orig/libavcodec/Makefile	2007-03-08 17:48:12.000000000 +0100
-+++ ffmpeg-0.cvs20060823/libavcodec/Makefile	2007-03-08 17:48:12.000000000 +0100
-@@ -282,7 +282,8 @@
+--- ffmpeg-0.cvs20070307.orig/libavcodec/Makefile	2007-03-28 16:17:35.000000000 +0200
++++ ffmpeg-0.cvs20070307/libavcodec/Makefile	2007-03-28 16:17:59.000000000 +0200
+@@ -310,7 +310,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
-@@ -355,6 +356,16 @@
-                                           ppc/snow_altivec.o 	     \
-                                           ppc/vc1dsp_altivec.o       \
-                                           ppc/float_altivec.o
+ ifeq ($(TARGET_MMX),yes)
+@@ -385,11 +386,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)
-+ppc/float_altivec.o: CFLAGS+= $(ALTIVECFLAGS)
- 
- CFLAGS += $(CFLAGS-yes)
- OBJS += $(OBJS-yes)
-Index: ffmpeg-0.cvs20060823/libavcodec/dsputil.h
+ endif
+ 
+ OBJS-$(TARGET_ARCH_BFIN)               += bfin/dsputil_bfin.o \
+Index: ffmpeg-0.cvs20070307/libavcodec/dsputil.h
 ===================================================================
---- ffmpeg-0.cvs20060823.orig/libavcodec/dsputil.h	2006-08-17 12:39:27.000000000 +0200
-+++ ffmpeg-0.cvs20060823/libavcodec/dsputil.h	2007-03-08 17:48:12.000000000 +0100
-@@ -541,12 +541,6 @@
+--- ffmpeg-0.cvs20070307.orig/libavcodec/dsputil.h	2007-03-07 14:37:04.000000000 +0100
++++ ffmpeg-0.cvs20070307/libavcodec/dsputil.h	2007-03-28 16:17:39.000000000 +0200
+@@ -556,12 +556,6 @@
  
  extern int mm_flags;
  
@@ -81,11 +87,11 @@
  #define DECLARE_ALIGNED_8(t,v)    t v __attribute__ ((aligned (16)))
  #define STRIDE_ALIGN 16
  
-Index: ffmpeg-0.cvs20060823/libavcodec/imgresample.c
+Index: ffmpeg-0.cvs20070307/libavcodec/imgresample.c
 ===================================================================
---- ffmpeg-0.cvs20060823.orig/libavcodec/imgresample.c	2006-08-23 12:00:03.000000000 +0200
-+++ ffmpeg-0.cvs20060823/libavcodec/imgresample.c	2007-03-08 17:48:12.000000000 +0100
-@@ -277,133 +277,6 @@
+--- ffmpeg-0.cvs20070307.orig/libavcodec/imgresample.c	2007-03-07 14:37:04.000000000 +0100
++++ ffmpeg-0.cvs20070307/libavcodec/imgresample.c	2007-03-28 16:17:39.000000000 +0200
+@@ -284,133 +284,6 @@
  }
  #endif
  
@@ -219,10 +225,10 @@
  /* 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.cvs20060823/libavcodec/imgresample_altivec.c
+Index: ffmpeg-0.cvs20070307/libavcodec/imgresample_altivec.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ ffmpeg-0.cvs20060823/libavcodec/imgresample_altivec.c	2007-03-08 17:48:12.000000000 +0100
++++ ffmpeg-0.cvs20070307/libavcodec/imgresample_altivec.c	2007-03-28 16:17:39.000000000 +0200
 @@ -0,0 +1,164 @@
 +/*
 + * High quality image resampling with polyphase filters
@@ -388,13 +394,13 @@
 +}
 +#endif
 +
-Index: ffmpeg-0.cvs20060823/libpostproc/Makefile
+Index: ffmpeg-0.cvs20070307/libpostproc/Makefile
 ===================================================================
---- ffmpeg-0.cvs20060823.orig/libpostproc/Makefile	2006-08-23 12:00:03.000000000 +0200
-+++ ffmpeg-0.cvs20060823/libpostproc/Makefile	2007-03-08 17:48:12.000000000 +0100
+--- ffmpeg-0.cvs20070307.orig/libpostproc/Makefile	2007-03-07 14:37:04.000000000 +0100
++++ ffmpeg-0.cvs20070307/libpostproc/Makefile	2007-03-28 16:17:39.000000000 +0200
 @@ -10,8 +10,10 @@
+ LIBVERSION=$(SPPVERSION)
  LIBMAJOR=$(SPPMAJOR)
- endif
  
 -STATIC_OBJS=postprocess.o
 -SHARED_OBJS=postprocess_pic.o
@@ -405,19 +411,18 @@
  
  HEADERS = postprocess.h
  
-@@ -23,5 +25,7 @@
- ifeq ($(BUILD_SHARED),yes)
+@@ -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 $@ $<
- endif
- 
-Index: ffmpeg-0.cvs20060823/libpostproc/postprocess.c
+ 
+Index: ffmpeg-0.cvs20070307/libpostproc/postprocess.c
 ===================================================================
---- ffmpeg-0.cvs20060823.orig/libpostproc/postprocess.c	2006-08-23 12:00:03.000000000 +0200
-+++ ffmpeg-0.cvs20060823/libpostproc/postprocess.c	2007-03-08 17:48:53.000000000 +0100
-@@ -92,10 +92,6 @@
+--- ffmpeg-0.cvs20070307.orig/libpostproc/postprocess.c	2007-03-07 11:17:32.000000000 +0100
++++ ffmpeg-0.cvs20070307/libpostproc/postprocess.c	2007-03-28 16:17:39.000000000 +0200
+@@ -95,10 +95,6 @@
  
  #include "mangle.h" //FIXME should be supressed
  
@@ -425,10 +430,10 @@
 -#include <altivec.h>
 -#endif
 -
- #ifndef HAVE_MEMALIGN
- #define memalign(a,b) malloc(b)
- #endif
-@@ -630,8 +626,9 @@
+ #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
@@ -440,10 +445,10 @@
  #endif
  #endif //ARCH_POWERPC
  
-Index: ffmpeg-0.cvs20060823/libpostproc/postprocess_altivec.c
+Index: ffmpeg-0.cvs20070307/libpostproc/postprocess_altivec.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ ffmpeg-0.cvs20060823/libpostproc/postprocess_altivec.c	2007-03-08 17:48:12.000000000 +0100
++++ ffmpeg-0.cvs20070307/libpostproc/postprocess_altivec.c	2007-03-28 16:17:39.000000000 +0200
 @@ -0,0 +1,614 @@
 +/*
 +    Copyright (C) 2001-2003 Michael Niedermayer (michaelni at gmx.at)
@@ -1059,10 +1064,10 @@
 +#endif
 +#endif //ARCH_POWERPC
 +
-Index: ffmpeg-0.cvs20060823/libpostproc/postprocess_template.c
+Index: ffmpeg-0.cvs20070307/libpostproc/postprocess_template.c
 ===================================================================
---- ffmpeg-0.cvs20060823.orig/libpostproc/postprocess_template.c	2007-03-08 17:48:19.000000000 +0100
-+++ ffmpeg-0.cvs20060823/libpostproc/postprocess_template.c	2007-03-08 17:49:34.000000000 +0100
+--- ffmpeg-0.cvs20070307.orig/libpostproc/postprocess_template.c	2007-03-28 16:17:35.000000000 +0200
++++ ffmpeg-0.cvs20070307/libpostproc/postprocess_template.c	2007-03-28 16:17:39.000000000 +0200
 @@ -3181,7 +3181,10 @@
  }
  #endif //HAVE_MMX
@@ -1087,3 +1092,863 @@
          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-28 16:17:39.000000000 +0200
+@@ -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-28 16:17:39.000000000 +0200
+@@ -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-28 16:17:39.000000000 +0200
+@@ -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-28 16:17:39.000000000 +0200
+@@ -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-28 16:17:39.000000000 +0200
+@@ -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-07 14:37:07.000000000 +0100
++++ ffmpeg-0.cvs20070307/libswscale/swscale_template.c	2007-03-28 16:17:39.000000000 +0200
+@@ -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 */

Modified: unstable/ffmpeg/debian/patches/054_h264_mmx_chroma_mc_crash.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/patches/054_h264_mmx_chroma_mc_crash.diff?rev=783&op=diff
==============================================================================
--- unstable/ffmpeg/debian/patches/054_h264_mmx_chroma_mc_crash.diff (original)
+++ unstable/ffmpeg/debian/patches/054_h264_mmx_chroma_mc_crash.diff Sat Jun  2 13:46:53 2007
@@ -8,8 +8,8 @@
         || full_my < 0-extra_height
 -       || full_mx + 16/*FIXME*/ > pic_width + extra_width
 -       || full_my + 16/*FIXME*/ > pic_height + extra_height){
-+       || full_mx + 16/*FIXME*/ >= pic_width + extra_width
-+       || full_my + 16/*FIXME*/ >= pic_height + extra_height){
++       || full_mx + 18/*FIXME*/ > pic_width + extra_width
++       || full_my + 18/*FIXME*/ > pic_height + extra_height){
          ff_emulated_edge_mc(s->edge_emu_buffer, src_y - 2 - 2*h->mb_linesize, h->mb_linesize, 16+5, 16+5/*FIXME*/, full_mx-2, full_my-2, pic_width, pic_height);
              src_y= s->edge_emu_buffer + 2 + 2*h->mb_linesize;
          emu=1;

Added: unstable/ffmpeg/debian/patches/300_c++_compliant_headers.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/patches/300_c%2B%2B_compliant_headers.diff?rev=783&op=file
==============================================================================
--- unstable/ffmpeg/debian/patches/300_c++_compliant_headers.diff (added)
+++ unstable/ffmpeg/debian/patches/300_c++_compliant_headers.diff Sat Jun  2 13:46:53 2007
@@ -1,0 +1,19 @@
+Index: ffmpeg-0.cvs20070307/libavcodec/avcodec.h
+===================================================================
+--- ffmpeg-0.cvs20070307.orig/libavcodec/avcodec.h	2007-03-29 22:22:06.000000000 +0200
++++ ffmpeg-0.cvs20070307/libavcodec/avcodec.h	2007-03-29 22:23:03.000000000 +0200
+@@ -34,6 +34,14 @@
+ #include "avutil.h"
+ #include <sys/types.h> /* size_t */
+ 
++#if !defined INT64_C
++#if defined __WORDSIZE && __WORDSIZE == 64
++#define INT64_C(c) c ## L
++#else
++#define INT64_C(c) c ## LL
++#endif
++#endif
++
+ #define AV_STRINGIFY(s)         AV_TOSTRING(s)
+ #define AV_TOSTRING(s) #s
+ 

Modified: unstable/ffmpeg/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/patches/series?rev=783&op=diff
==============================================================================
--- unstable/ffmpeg/debian/patches/series (original)
+++ unstable/ffmpeg/debian/patches/series Sat Jun  2 13:46:53 2007
@@ -2,29 +2,20 @@
 005_altivec_flags.diff
 005_runtime_cpudetect.diff
 006_mips_pthreads.diff
-007_disable_ffmpeg_option.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
+015_build_imgresample.diff
 020_mmx_optims.diff
 020_mmx_pic_code.diff
 020_disable_snow_mmx_in_pic.diff
-020_really_use_liba52.diff
-030_arm_cpu_detect.diff
-030_arm_workaround.diff
+020_fix_libswscale_pic_code
 040_early_altivec_detection.diff
 040_only_use_maltivec_when_needed.diff
-050_h264-misc-security-fixes.diff
-051_asf-misc-security-fixes.diff
-052_base64_encode_crash.diff
 053_rm_demux_crash.diff
 054_h264_mmx_chroma_mc_crash.diff
 060_fix_avi_skip.diff
-070_zzuf_r7536_ogm_crash.diff
-071_zzuf_r7537_avi_crash.diff
-072_zzuf_r7538_mpeg_crash.diff
-073_zzuf_r7539_asf_crash.diff
-074_zzuf_r7561_ogm_crash.diff
-075_zzuf_r7595_flac_crash.diff
-076_zzuf_r7718_mpeg_infinite_loop.diff
-077_zzuf_r7889_mpeg_crash.diff
+300_c++_compliant_headers.diff

Modified: unstable/ffmpeg/debian/rules
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg/debian/rules?rev=783&op=diff
==============================================================================
--- unstable/ffmpeg/debian/rules (original)
+++ unstable/ffmpeg/debian/rules Sat Jun  2 13:46:53 2007
@@ -4,8 +4,9 @@
 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-pthreads
-confflags += --enable-vorbis --enable-libogg --enable-a52 --enable-dts --enable-libgsm
+LIBS = libavutil libavcodec libpostproc libavformat libswscale
+confflags += --enable-gpl --enable-pp --enable-swscaler --enable-pthreads
+confflags += --enable-libvorbis --enable-libtheora --enable-libogg --enable-liba52 --enable-libdts --enable-libgsm
 
 DEB_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: //p')
 
@@ -16,6 +17,9 @@
 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)))
@@ -31,11 +35,11 @@
 
 ifneq (,$(findstring risky,$(DEB_BUILD_OPTIONS)))
 weak-build-deps += liblame-dev
-confflags += --enable-mp3lame
+confflags += --enable-libmp3lame
 weak-build-deps += libfaad2-dev
-confflags += --enable-faadbin --enable-faad
+confflags += --enable-libfaadbin --enable-libfaad
 weak-build-deps += libfaac-dev
-confflags += --enable-faac
+confflags += --enable-libfaac
 weak-build-deps += libxvidcore-dev
 confflags += --enable-xvid
 $(warning Make sure these packages are installed: $(weak-build-deps))
@@ -46,65 +50,34 @@
 	dh_testdir
 	QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
 	
-	# Build static libraries
-	./configure $(confflags) --disable-ffmpeg --disable-ffserver --disable-ffplay --prefix=/usr
-	cd doc && $(MAKE)
+	# Build and backup static libraries
+	./configure $(confflags) --disable-ffmpeg --disable-vhook --disable-ffserver --disable-ffplay --prefix=/usr
+	$(MAKE) -C doc
 	$(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
+	for d in $(LIBS); do mv $$d/$$d.a $$d/$$d.a.bak; done
 	
 	# Build ffmpeg and shared libraries
 	./configure $(confflags) --enable-shared --prefix=/usr
-	
 	sed 's/ldts/ldts_pic/' <config.mak >config.mak.pic
-	
-	cd libavutil && \
-	  $(MAKE) clean && \
-	  rm -f Makefile.pic && \
-	  sed 's/^CFLAGS *=/&-fPIC -DPIC /; 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/^CFLAGS *=/&-fPIC -DPIC /; 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/^CFLAGS *=/&-fPIC -DPIC /; 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/^CFLAGS *=/&-fPIC -DPIC /; s/config.mak/config.mak.pic/' <Makefile >Makefile.pic && \
-	  $(MAKE) -f Makefile.pic && \
-	  rm -f Makefile.pic
-	
+	echo 'CFLAGS += -fPIC -DPIC' >> config.mak.pic
+	for d in $(LIBS); do \
+	  $(MAKE) -C $$d clean && \
+	  rm -f $$d/Makefile.pic && \
+	  sed 's/config.mak/&.pic/' <$$d/Makefile >$$d/Makefile.pic && \
+	  $(MAKE) -C $$d -f Makefile.pic && \
+	  rm -f $$d/Makefile.pic ; \
+	done
 	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
-	
-	# Fix timestamps
-	touch libavutil/libavutil.a libpostproc/libpostproc.a
-	touch libavcodec/libavcodec.a libavformat/libavformat.a
+	# Restore static libraries and fix timestamps
+	for d in $(LIBS); do \
+	  mv $$d/$$d.a.bak $$d/$$d.a ; \
+	  touch $$d/$$d.a ; \
+	done
 	touch ffmpeg ffmpeg_g ffplay ffplay_g
 	
 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
-	-cd tests && $(MAKE)
+	-$(MAKE) -C tests
 endif
 	
 	touch build-stamp
@@ -113,20 +86,14 @@
 	dh_testdir
 	dh_testroot
 	rm -f build-stamp
-	-cd doc && $(MAKE) clean
-	-cd tests && $(MAKE) clean
+	-$(MAKE) -C doc clean
+	-$(MAKE) -C tests clean
 	-$(MAKE) distclean
 	QUILT_PATCHES=debian/patches quilt pop -a -R || test $$? = 2
-	rm -f libavutil/Makefile.pic libavformat/Makefile.pic config.log
-	rm -f libpostproc/Makefile.pic libavformat/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 libavcodec-uninstalled.pc libavcodec.pc
-	rm -f libavutil-uninstalled.pc libavutil.pc
-	rm -f libavformat-uninstalled.pc libavformat.pc
-	rm -f libpostproc-uninstalled.pc libpostproc.pc
+	for d in $(LIBS); do \
+	  rm -f $$d/Makefile.pic $$d/$$d.a.bak $$d-unistalled.pc $$d.pc ; \
+	done
+	rm -f config.log
 	dh_clean
 
 install: build
@@ -136,14 +103,11 @@
 	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
-	rm -f debian/tmp/usr/include/ffmpeg/swscale.h # unused yet
 	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* /usr/lib
-	
+	for d in $(LIBS); do cp $$d/$$d.so* debian/tmp/usr/lib; done
 	cp doc/*.html debian/tmp/usr/share/doc/ffmpeg/html/
 	cp doc/ffserver.conf debian/tmp/etc/
 	
@@ -161,8 +125,8 @@
 binary-arch: build install
 	dh_testdir
 	dh_testroot
-	dh_installdocs doc/ffmpeg_powerpc_performance_evaluation_howto.txt doc/optimization.txt
-	dh_installdocs -A CREDITS doc/TODO debian/patents.txt debian/README.Debian
+	dh_installdocs $(extradoc) doc/optimization.txt
+	dh_installdocs -A MAINTAINERS CREDITS doc/TODO debian/patents.txt debian/README.Debian
 	dh_installexamples -pffmpeg doc/ffserver.conf
 	dh_installexamples -plibavcodec-dev libavcodec/apiexample.c
 	dh_installmenu
@@ -174,11 +138,11 @@
 	dh_strip
 	dh_compress
 	dh_fixperms
-	dh_makeshlibs -p libavcodec0d -V 'libavcodec0d (>= 0.cvs20060823)'
-	dh_makeshlibs -p libavformat0d -V 'libavformat0d (>= 0.cvs20060823)'
-	dh_makeshlibs -p libpostproc0d -V 'libpostproc0d (>= 0.cvs20060823)'
+	for d in $(LIBS); do \
+	  dh_makeshlibs -p $${d}1d -V "$${d}1d (>= 0.cvs20070307)" ; \
+	done
 	dh_installdeb
-	dh_shlibdeps -L libavcodec0d -L libpostproc0d -L libavformat0d -l debian/libavcodec0d/usr/lib:debian/libavformat0d/usr/lib:debian/libpostproc0d/usr/lib
+	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




More information about the pkg-multimedia-commits mailing list