changeset 10303:2c0b6ec77d39

sync with libmpeg2 cvs
author alex
date Tue, 17 Jun 2003 22:54:45 +0000
parents f8b0d1d14d39
children 0adc47bc98aa
files libmpeg2/alloc.c libmpeg2/cpu_accel.c libmpeg2/idct_mlib.c libmpeg2/idct_mmx.c libmpeg2/motion_comp.c libmpeg2/motion_comp_mlib.c libmpeg2/motion_comp_mmx.c
diffstat 7 files changed, 18 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/libmpeg2/alloc.c	Tue Jun 17 22:52:57 2003 +0000
+++ b/libmpeg2/alloc.c	Tue Jun 17 22:54:45 2003 +0000
@@ -1,6 +1,6 @@
 /*
  * alloc.c
- * Copyright (C) 2000-2002 Michel Lespinasse <walken@zoy.org>
+ * Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org>
  * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *
  * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
--- a/libmpeg2/cpu_accel.c	Tue Jun 17 22:52:57 2003 +0000
+++ b/libmpeg2/cpu_accel.c	Tue Jun 17 22:54:45 2003 +0000
@@ -1,6 +1,6 @@
 /*
  * cpu_accel.c
- * Copyright (C) 2000-2002 Michel Lespinasse <walken@zoy.org>
+ * Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org>
  * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *
  * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
@@ -126,20 +126,27 @@
 
 static inline uint32_t arch_accel (void)
 {
-    signal (SIGILL, sigill_handler);
+    static RETSIGTYPE (* oldsig) (int);
+
+    oldsig = signal (SIGILL, sigill_handler);
     if (sigsetjmp (jmpbuf, 1)) {
-	signal (SIGILL, SIG_DFL);
+	signal (SIGILL, oldsig);
 	return 0;
     }
 
     canjump = 1;
 
+#ifdef HAVE_ALTIVEC_H	/* gnu */
+#define VAND(a,b,c) "vand " #a "," #b "," #c "\n\t"
+#else			/* apple */
+#define VAND(a,b,c) "vand v" #a ",v" #b ",v" #c "\n\t"
+#endif
     asm volatile ("mtspr 256, %0\n\t"
-		  "vand %%v0, %%v0, %%v0"
+		  VAND (0, 0, 0)
 		  :
 		  : "r" (-1));
 
-    signal (SIGILL, SIG_DFL);
+    signal (SIGILL, oldsig);
     return MPEG2_ACCEL_PPC_ALTIVEC;
 }
 #endif /* ARCH_PPC */
--- a/libmpeg2/idct_mlib.c	Tue Jun 17 22:52:57 2003 +0000
+++ b/libmpeg2/idct_mlib.c	Tue Jun 17 22:54:45 2003 +0000
@@ -1,6 +1,6 @@
 /*
  * idct_mlib.c
- * Copyright (C) 1999-2002 Håkan Hjort <d95hjort@dtek.chalmers.se>
+ * Copyright (C) 1999-2003 Håkan Hjort <d95hjort@dtek.chalmers.se>
  *
  * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
  * See http://libmpeg2.sourceforge.net/ for updates.
--- a/libmpeg2/idct_mmx.c	Tue Jun 17 22:52:57 2003 +0000
+++ b/libmpeg2/idct_mmx.c	Tue Jun 17 22:54:45 2003 +0000
@@ -1,6 +1,6 @@
 /*
  * idct_mmx.c
- * Copyright (C) 2000-2002 Michel Lespinasse <walken@zoy.org>
+ * Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org>
  * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *
  * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
--- a/libmpeg2/motion_comp.c	Tue Jun 17 22:52:57 2003 +0000
+++ b/libmpeg2/motion_comp.c	Tue Jun 17 22:54:45 2003 +0000
@@ -1,6 +1,6 @@
 /*
  * motion_comp.c
- * Copyright (C) 2000-2002 Michel Lespinasse <walken@zoy.org>
+ * Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org>
  * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *
  * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
--- a/libmpeg2/motion_comp_mlib.c	Tue Jun 17 22:52:57 2003 +0000
+++ b/libmpeg2/motion_comp_mlib.c	Tue Jun 17 22:54:45 2003 +0000
@@ -1,6 +1,6 @@
 /*
  * motion_comp_mlib.c
- * Copyright (C) 2000-2002 Håkan Hjort <d95hjort@dtek.chalmers.se>
+ * Copyright (C) 2000-2003 Håkan Hjort <d95hjort@dtek.chalmers.se>
  *
  * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
  * See http://libmpeg2.sourceforge.net/ for updates.
--- a/libmpeg2/motion_comp_mmx.c	Tue Jun 17 22:52:57 2003 +0000
+++ b/libmpeg2/motion_comp_mmx.c	Tue Jun 17 22:54:45 2003 +0000
@@ -1,6 +1,6 @@
 /*
  * motion_comp_mmx.c
- * Copyright (C) 2000-2002 Michel Lespinasse <walken@zoy.org>
+ * Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org>
  * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *
  * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.