[vlc-commits] commit: Contrib: quick and dirty fix to compile FFmpeg on WIn64 ( Jean-Baptiste Kempf )

git at videolan.org git at videolan.org
Wed Apr 21 23:22:03 CEST 2010


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Apr 21 23:21:52 2010 +0200| [3765f1d9469dce19b34d6d13ee2cb55354d61e9a] | committer: Jean-Baptiste Kempf 

Contrib: quick and dirty fix to compile FFmpeg on WIn64

This isn't the right way, but I don't know how to fix yet. I'll wait for ramiro

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3765f1d9469dce19b34d6d13ee2cb55354d61e9a
---

 extras/contrib/src/Makefile                   |    5 ++-
 extras/contrib/src/Patches/ffmpeg-win64.patch |   51 +++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 1 deletions(-)

diff --git a/extras/contrib/src/Makefile b/extras/contrib/src/Makefile
index 6fe27f7..d67ea1a 100644
--- a/extras/contrib/src/Makefile
+++ b/extras/contrib/src/Makefile
@@ -1036,6 +1036,9 @@ endif
 ifdef HAVE_ISA_THUMB
 	patch -p0 < Patches/ffmpeg-avcodec-no-thumb.patch
 endif
+ifdef HAVE_WIN64
+	(cd ffmpeg/libswscale; patch -p0 < ../../Patches/ffmpeg-win64.patch;)
+endif
 ifdef HAVE_UCLIBC
 	patch -p0 < Patches/ffmpeg-svn-uclibc.patch
 	patch -p0 < Patches/ffmpeg-svn-internal-define.patch
@@ -1063,7 +1066,7 @@ FFMPEGCONF += \
 	--disable-filters \
 	--disable-network
 ifdef HAVE_WIN64
-FFMPEGCONF += --disable-bzlib --disable-decoder=dca --disable-encoder=vorbis --enable-libmp3lame --enable-w32threads --disable-dxva2 --disable-bsfs
+FFMPEGCONF += --disable-bzlib --disable-decoder=dca --disable-encoder=vorbis --enable-libmp3lame --enable-w32threads --disable-dxva2 --disable-bsfs 
 else
 ifdef HAVE_WIN32
 FFMPEGCONF += --disable-bzlib --disable-decoder=dca --disable-encoder=vorbis --enable-libmp3lame --enable-w32threads --enable-dxva2 --disable-bsfs
diff --git a/extras/contrib/src/Patches/ffmpeg-win64.patch b/extras/contrib/src/Patches/ffmpeg-win64.patch
new file mode 100644
index 0000000..d1c8e7f
--- /dev/null
+++ b/extras/contrib/src/Patches/ffmpeg-win64.patch
@@ -0,0 +1,51 @@
+Index: swscale.c
+===================================================================
+--- swscale.c	(revision 31036)
++++ swscale.c	(working copy)
+@@ -994,7 +994,7 @@
+     }
+ }
+ 
+-static inline void rgb48ToY(uint8_t *dst, const uint8_t *src, int width,
++static inline void rgb48ToY(uint8_t *dst, const uint8_t *src, long width,
+                             uint32_t *unused)
+ {
+     int i;
+@@ -1009,7 +1009,7 @@
+ 
+ static inline void rgb48ToUV(uint8_t *dstU, uint8_t *dstV,
+                              const uint8_t *src1, const uint8_t *src2,
+-                             int width, uint32_t *unused)
++                             long width, uint32_t *unused)
+ {
+     int i;
+     assert(src1==src2);
+@@ -1025,7 +1025,7 @@
+ 
+ static inline void rgb48ToUV_half(uint8_t *dstU, uint8_t *dstV,
+                                   const uint8_t *src1, const uint8_t *src2,
+-                                  int width, uint32_t *unused)
++                                  long width, uint32_t *unused)
+ {
+     int i;
+     assert(src1==src2);
+Index: swscale_template.c
+===================================================================
+--- swscale_template.c	(revision 31036)
++++ swscale_template.c	(working copy)
+@@ -2466,6 +2466,7 @@
+         }
+     } else {
+ #endif /* COMPILE_TEMPLATE_MMX2 */
++#if 0
+         x86_reg xInc_shr16 = (x86_reg) (xInc >> 16);
+         uint16_t xInc_mask = xInc & 0xffff;
+         __asm__ volatile(
+@@ -2501,6 +2502,7 @@
+             "r" (src2)
+             : "%"REG_a, "%"REG_d, "%ecx", "%"REG_D, "%esi"
+         );
++#endif
+ #if COMPILE_TEMPLATE_MMX2
+     } //if MMX2 can't be used
+ #endif



More information about the vlc-commits mailing list