r192 - in unstable/x264/debian: . patches
Samuel Hocevar
sho at alioth.debian.org
Fri Mar 16 23:51:30 CET 2007
Author: sho
Date: 2007-03-14 18:22:42 +0000 (Wed, 14 Mar 2007)
New Revision: 192
Added:
unstable/x264/debian/patches/010_altivec_crash.diff
Modified:
unstable/x264/debian/changelog
unstable/x264/debian/patches/series
Log:
x264 (0.svn20070309-3) unstable; urgency=low
* debian/patches/010_altivec_crash.diff:
+ New patch from upstream: runtime AltiVec detection and workaround
for gcc generating AltiVec code here and there with -maltivec.
-- Sam Hocevar (Debian packages) <sam+deb at zoy.org> Wed, 14 Mar 2007 19:20:43 +0100
Modified: unstable/x264/debian/changelog
===================================================================
--- unstable/x264/debian/changelog 2007-03-13 17:33:23 UTC (rev 191)
+++ unstable/x264/debian/changelog 2007-03-14 18:22:42 UTC (rev 192)
@@ -1,3 +1,11 @@
+x264 (0.svn20070309-3) unstable; urgency=low
+
+ * debian/patches/010_altivec_crash.diff:
+ + New patch from upstream: runtime AltiVec detection and workaround
+ for gcc generating AltiVec code here and there with -maltivec.
+
+ -- Sam Hocevar (Debian packages) <sam+deb at zoy.org> Wed, 14 Mar 2007 19:20:43 +0100
+
x264 (0.svn20070309-2) unstable; urgency=low
* debian/rules:
Added: unstable/x264/debian/patches/010_altivec_crash.diff
===================================================================
--- unstable/x264/debian/patches/010_altivec_crash.diff 2007-03-13 17:33:23 UTC (rev 191)
+++ unstable/x264/debian/patches/010_altivec_crash.diff 2007-03-14 18:22:42 UTC (rev 192)
@@ -0,0 +1,90 @@
+Index: configure
+===================================================================
+--- configure (revision 628)
++++ configure (working copy)
+@@ -161,9 +161,9 @@
+ ARCH="PPC"
+ if [ $SYS = MACOSX ]
+ then
+- CFLAGS="$CFLAGS -faltivec -fastf -mcpu=G4"
++ ALTIVECFLAGS="$ALTIVECFLAGS -faltivec -fastf -mcpu=G4"
+ else
+- CFLAGS="$CFLAGS -maltivec -mabi=altivec"
++ ALTIVECFLAGS="$ALTIVECFLAGS -maltivec -mabi=altivec"
+ fi
+ ;;
+ sparc)
+@@ -385,6 +385,7 @@
+ SYS=$SYS
+ CC=$CC
+ CFLAGS=$CFLAGS
++ALTIVECFLAGS=$ALTIVECFLAGS
+ LDFLAGS=$LDFLAGS
+ AS=$AS
+ ASFLAGS=$ASFLAGS
+Index: common/cpu.c
+===================================================================
+--- common/cpu.c (revision 628)
++++ common/cpu.c (working copy)
+@@ -132,9 +132,43 @@
+ }
+
+ #elif defined( SYS_LINUX )
++#include <signal.h>
++#include <setjmp.h>
++static sigjmp_buf jmpbuf;
++static volatile sig_atomic_t canjump = 0;
++
++static void sigill_handler( int sig )
++{
++ if( !canjump )
++ {
++ signal( sig, SIG_DFL );
++ raise( sig );
++ }
++
++ canjump = 0;
++ siglongjmp( jmpbuf, 1 );
++}
++
+ uint32_t x264_cpu_detect( void )
+ {
+- /* FIXME (Linux PPC) */
++ static void (* oldsig)( int );
++
++ oldsig = signal( SIGILL, sigill_handler );
++ if( sigsetjmp( jmpbuf, 1 ) )
++ {
++ signal( SIGILL, oldsig );
++ return 0;
++ }
++
++ canjump = 1;
++ asm volatile( "mtspr 256, %0\n\t"
++ "vand 0, 0, 0\n\t"
++ :
++ : "r"(-1) );
++ canjump = 0;
++
++ signal( SIGILL, oldsig );
++
+ return X264_CPU_ALTIVEC;
+ }
+ #endif
+Index: Makefile
+===================================================================
+--- Makefile (revision 628)
++++ Makefile (working copy)
+@@ -43,8 +43,10 @@
+
+ # AltiVec optims
+ ifeq ($(ARCH),PPC)
+-SRCS += common/ppc/mc.c common/ppc/pixel.c common/ppc/dct.c \
+- common/ppc/quant.c
++ALTIVECSRC += common/ppc/mc.c common/ppc/pixel.c common/ppc/dct.c \
++ common/ppc/quant.c
++SRCS += $(ALTIVECSRC)
++$(ALTIVECSRC:%.c=%.o): CFLAGS += $(ALTIVECFLAGS)
+ endif
+
+ # VIS optims
Modified: unstable/x264/debian/patches/series
===================================================================
--- unstable/x264/debian/patches/series 2007-03-13 17:33:23 UTC (rev 191)
+++ unstable/x264/debian/patches/series 2007-03-14 18:22:42 UTC (rev 192)
@@ -1 +1,2 @@
005_link_with_shared_lib.diff
+010_altivec_crash.diff
More information about the Pkg-multimedia-commits
mailing list