From ed2d5ffb0bc221ae0def73811d5993456a5e83bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= Date: Thu, 11 Sep 2008 16:29:03 +0200 Subject: [PATCH] contribs: fix libswscale compilation To be back-ported --- extras/contrib/src/Makefile | 1 + .../src/Patches/ffmpeg-libswscale-head.patch | 58 +++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 extras/contrib/src/Patches/ffmpeg-libswscale-head.patch diff --git a/extras/contrib/src/Makefile b/extras/contrib/src/Makefile index 849c4d3404..540e2f6faa 100644 --- a/extras/contrib/src/Makefile +++ b/extras/contrib/src/Makefile @@ -1082,6 +1082,7 @@ ifdef HAVE_DARWIN_OS_ON_INTEL endif ifdef HAVE_DARWIN_OS (cd $@/libswscale; patch -p0 < ../../Patches/ffmpeg-fix-noaltivec.patch) + (cd $@/libswscale; patch -p0 < ../../Patches/ffmpeg-libswscale-head.patch) endif ifdef NO_TEXT_RELOCATION (cd $@; patch -p0 < ../Patches/ffmpeg-svn-mmx_removal-darwin9.patch) diff --git a/extras/contrib/src/Patches/ffmpeg-libswscale-head.patch b/extras/contrib/src/Patches/ffmpeg-libswscale-head.patch new file mode 100644 index 0000000000..a298793fa7 --- /dev/null +++ b/extras/contrib/src/Patches/ffmpeg-libswscale-head.patch @@ -0,0 +1,58 @@ +Index: swscale_template.c +=================================================================== +--- swscale_template.c (revision 27579) ++++ swscale_template.c (working copy) +@@ -1904,7 +1904,7 @@ + BGR2UV(uint16_t, rgb15ToUV, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, RU , GU<<5, BU<<10, RV , GV<<5, BV<<10, RGB2YUV_SHIFT+7) + + #ifdef HAVE_MMX +-static inline void bgr24ToY_mmx(uint8_t *dst, uint8_t *src, long width, int srcFormat) ++static inline void RENAME(bgr24ToY_mmx)(uint8_t *dst, uint8_t *src, long width, int srcFormat) + { + + if(srcFormat == PIX_FMT_BGR24){ +@@ -1957,7 +1957,7 @@ + ); + } + +-static inline void bgr24ToUV_mmx(uint8_t *dstU, uint8_t *dstV, uint8_t *src, long width, int srcFormat) ++static inline void RENAME(bgr24ToUV_mmx)(uint8_t *dstU, uint8_t *dstV, uint8_t *src, long width, int srcFormat) + { + asm volatile( + "movq 24+%4, %%mm6 \n\t" +@@ -2019,7 +2019,7 @@ + static inline void RENAME(bgr24ToY)(uint8_t *dst, uint8_t *src, long width) + { + #ifdef HAVE_MMX +- bgr24ToY_mmx(dst, src, width, PIX_FMT_BGR24); ++ RENAME(bgr24ToY_mmx)(dst, src, width, PIX_FMT_BGR24); + #else + int i; + for (i=0; i