diff options
author | Markos Chandras <hwoarang@gentoo.org> | 2010-06-18 13:47:49 +0000 |
---|---|---|
committer | Markos Chandras <hwoarang@gentoo.org> | 2010-06-18 13:47:49 +0000 |
commit | 2dcdc60a4396ba782fc72dd4e32d5a8ba41366bb (patch) | |
tree | 18b872f2797c393189b94633d1793d8d59167eee /media-video | |
parent | .orig shouldnt be in Manifest... (diff) | |
download | gentoo-2-2dcdc60a4396ba782fc72dd4e32d5a8ba41366bb.tar.gz gentoo-2-2dcdc60a4396ba782fc72dd4e32d5a8ba41366bb.tar.bz2 gentoo-2-2dcdc60a4396ba782fc72dd4e32d5a8ba41366bb.zip |
New patch for GCC-4.5. Thanks to Archlinux guys
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'media-video')
-rw-r--r-- | media-video/avidemux/ChangeLog | 9 | ||||
-rw-r--r-- | media-video/avidemux/avidemux-2.5.3-r1.ebuild (renamed from media-video/avidemux/avidemux-2.5.3.ebuild) | 4 | ||||
-rw-r--r-- | media-video/avidemux/files/2.5.3_field_asm_fix.diff | 135 | ||||
-rw-r--r-- | media-video/avidemux/files/avidemux-gcc-4.5.patch | 11 |
4 files changed, 145 insertions, 14 deletions
diff --git a/media-video/avidemux/ChangeLog b/media-video/avidemux/ChangeLog index 1dec346d9fef..2ae50dbfce88 100644 --- a/media-video/avidemux/ChangeLog +++ b/media-video/avidemux/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for media-video/avidemux # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/avidemux/ChangeLog,v 1.165 2010/06/13 17:16:05 hwoarang Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/avidemux/ChangeLog,v 1.166 2010/06/18 13:47:49 hwoarang Exp $ + +*avidemux-2.5.3-r1 (18 Jun 2010) + + 18 Jun 2010; Markos Chandras <hwoarang@gentoo.org> + +files/2.5.3_field_asm_fix.diff, -avidemux-2.5.3.ebuild, + +avidemux-2.5.3-r1.ebuild, -files/avidemux-gcc-4.5.patch: + New patch for GCC-4.5. Thanks to Archlinux guys *avidemux-2.5.3 (13 Jun 2010) diff --git a/media-video/avidemux/avidemux-2.5.3.ebuild b/media-video/avidemux/avidemux-2.5.3-r1.ebuild index 1d098f02c1a5..725dcc3bfcda 100644 --- a/media-video/avidemux/avidemux-2.5.3.ebuild +++ b/media-video/avidemux/avidemux-2.5.3-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/avidemux/avidemux-2.5.3.ebuild,v 1.1 2010/06/13 17:16:05 hwoarang Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/avidemux/avidemux-2.5.3-r1.ebuild,v 1.1 2010/06/18 13:47:49 hwoarang Exp $ EAPI="2" @@ -53,7 +53,7 @@ for L in ${AVIDEMUX_LANGS}; do done PATCHES=( - "${FILESDIR}/${PN}-gcc-4.5.patch" + "${FILESDIR}/${PV}_field_asm_fix.diff" "${FILESDIR}/${P}-build-plugins-fix.patch" ) diff --git a/media-video/avidemux/files/2.5.3_field_asm_fix.diff b/media-video/avidemux/files/2.5.3_field_asm_fix.diff new file mode 100644 index 000000000000..989559bf66f9 --- /dev/null +++ b/media-video/avidemux/files/2.5.3_field_asm_fix.diff @@ -0,0 +1,135 @@ +diff --git a/avidemux/ADM_coreImage/src/ADM_interlaceUtil.cpp b/avidemux/ADM_coreImage/src/ADM_interlaceUtil.cpp +index 33b2a7f..99f0664 100644 +--- a/avidemux/ADM_coreImage/src/ADM_interlaceUtil.cpp ++++ b/avidemux/ADM_coreImage/src/ADM_interlaceUtil.cpp +@@ -30,19 +30,8 @@ Skip factor=2 + ***************************************************************************/ + + #include "ADM_default.h" +- +-//#include "ADM_editor/ADM_edit.hxx" + #include "ADM_videoFilter.h" + +-//#define MMX_TRACE +-#warning remove mmxmacro and debug asm +-//#define ASM_ILACING +- +- +-#include "ADM_mmxMacros.h" +- +- +- + + #define SKIP_FACTOR 2 // 2^SKIPFACTOR=SKIP_LINEAR+1 + #define SKIP_LINEAR 3 +@@ -62,7 +51,7 @@ Skip factor=2 + */ + + #if defined(ADM_CPU_X86) && defined(ASM_ILACING) +- ++#warning REWRITE IN PLAIN ASM + static uint32_t ADMVideo_interlaceCount_MMX( uint8_t *src ,uint32_t w, uint32_t h); + static uint8_t * FUNNY_MANGLE(_l_p) =NULL; + static uint8_t * FUNNY_MANGLE(_l_c) =NULL; +diff --git a/avidemux/ADM_coreImage/src/ADM_vidFieldASM.cpp b/avidemux/ADM_coreImage/src/ADM_vidFieldASM.cpp +index 61d11d4..479731c 100644 +--- a/avidemux/ADM_coreImage/src/ADM_vidFieldASM.cpp ++++ b/avidemux/ADM_coreImage/src/ADM_vidFieldASM.cpp +@@ -20,15 +20,13 @@ + ***************************************************************************/ + + #include "ADM_default.h" +- + #include "ADM_videoFilter.h" +- + #include"ADM_vidField.h" + + #ifdef ADM_CPU_X86 + // #define DEBUG_DEINT 1 + // #define MMX_TRACE 1 +- #include "ADM_mmxMacros.h" ++// #include "ADM_mmxMacros.h" + + void myDeintASM(void); + +@@ -36,25 +34,27 @@ + static uint8_t * FUNNY_MANGLE(_l_p) , * FUNNY_MANGLE(_l_c) ,* FUNNY_MANGLE(_l_n); + static uint8_t * FUNNY_MANGLE(_l_e) , * FUNNY_MANGLE(_l_e2); + #define EXPAND(x) (x)+((x)<<16)+((x)<<32) +((x)<<48) +-static mmx_t _mmTHRESH1; +-static mmx_t _mmTHRESH2; ++static uint64_t __attribute__((used)) __attribute__ ((__aligned__ (8))) FUNNY_MANGLE(_mmTHRESH1) ; ++static uint64_t __attribute__((used)) __attribute__ ((__aligned__ (8))) FUNNY_MANGLE(_mmTHRESH2) ; + +-#define COMPUTE_MMX \ +-punpcklbw_r2r(mm5,mm0); /*c expand 4 bytes -> 4 word */ \ +-punpcklbw_r2r(mm5,mm1); /*p*/ \ +-punpcklbw_r2r(mm5,mm2); /* n*/ \ +-movq_r2r(mm0,mm3); /* mm3 also c*/ \ +-psubw_r2r(mm1,mm0) ; /* mm0=mm0-mm1 = c-p*/ \ +-psubw_r2r(mm2,mm3) ; /* mm3=mm3-mm2 = c-n*/ \ +-psraw_i2r(1,mm0); /* to protect from overflow*/ \ +-psraw_i2r(1,mm3);\ +-pmullw_r2r(mm0,mm3); /* mm3=(c-p)*(c-n) / 4;*/ \ +-movq_r2r(mm3,mm0) ; /* mm0 also c-p*c-n */ \ +-pcmpgtw_r2r(mm4,mm3); /* keep only > size*/ \ +-pcmpgtw_r2r(mm6,mm0); /* keep only > size*/ \ +-packsswb_r2r(mm5,mm0); \ +-packsswb_r2r(mm5,mm3); + ++#define COMPUTE_MMX \ ++__asm__ __volatile__(\ ++"punpcklbw %%mm5,%%mm0\n\t" \ ++"punpcklbw %%mm5,%%mm1\n\t" \ ++"punpcklbw %%mm5,%%mm2\n\t" \ ++"movq %%mm0,%%mm3\n\t" \ ++"psubw %%mm1,%%mm0\n\t" \ ++"psubw %%mm2,%%mm3\n\t" \ ++"psraw $1,%%mm0\n\t" \ ++"psraw $1,%%mm3\n\t" \ ++"pmullw %%mm0,%%mm3\n\t" \ ++"movq %%mm3,%%mm0\n\t" \ ++"pcmpgtw %%mm4,%%mm3\n\t" \ ++"pcmpgtw %%mm6,%%mm0\n\t" \ ++"packsswb %%mm5,%%mm0\n\t" \ ++"packsswb %%mm5,%%mm3\n\t" \ ++::) + #endif + + void ADMVideoFields::hasMotion_C(uint8_t *p,uint8_t *c, +@@ -90,8 +90,8 @@ void ADMVideoFields::hasMotion_MMX(uint8_t *p,uint8_t *c, + { + + +- _mmTHRESH1.uq=EXPAND((uint64_t ) ((_param->motion_trigger*_param->motion_trigger)>>2) ); +- _mmTHRESH2.uq=EXPAND((uint64_t ) ((_param->blend_trigger*_param->blend_trigger)>>2) ); ++ _mmTHRESH1=EXPAND((uint64_t ) ((_param->motion_trigger*_param->motion_trigger)>>2) ); ++ _mmTHRESH2=EXPAND((uint64_t ) ((_param->blend_trigger*_param->blend_trigger)>>2) ); + + _l_h=_info.height-2; + _l_w=_info.width>>2; +@@ -102,10 +102,11 @@ void ADMVideoFields::hasMotion_MMX(uint8_t *p,uint8_t *c, + _l_e=e; + _l_e2=e2; + // printf("\n MMX \n"); +- +- pxor_r2r(mm5,mm5); +- movq_m2r(_mmTHRESH1,mm4); +- movq_m2r(_mmTHRESH2,mm6); ++ __asm__ __volatile__ ( ++ "pxor %%mm5,%%mm5\n\t" ++ "movq "Mangle(_mmTHRESH1)",%%mm4\n\t" ++ "movq "Mangle(_mmTHRESH2)",%%mm6\n\t" ++ ::); + myDeintASM(); + } + #if !defined(DEBUG_DEINT) +@@ -149,7 +150,7 @@ void myDeintASM(void) + : + : "eax", "ecx","edx","esi" + ); +- emms(); ++ __asm__ __volatile__ ("emms"); + + } + #else diff --git a/media-video/avidemux/files/avidemux-gcc-4.5.patch b/media-video/avidemux/files/avidemux-gcc-4.5.patch deleted file mode 100644 index 56ea088e909b..000000000000 --- a/media-video/avidemux/files/avidemux-gcc-4.5.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- avidemux/ADM_coreImage/include/ADM_mmxMacros.h -+++ avidemux/ADM_coreImage/include/ADM_mmxMacros.h -@@ -353,7 +353,7 @@ - #define mmx_m2r(op, mem, reg) \ - __asm__ __volatile__ (#op " %0, %%" #reg \ - : /* nothing */ \ -- : "X" (mem)) -+ : "ym" (mem)) - - #define mmx_r2m(op, reg, mem) \ - __asm__ __volatile__ (#op " %%" #reg ", %0" \ |