r150 - in unstable/ffmpeg/debian: . patches

Samuel Hocevar sho at alioth.debian.org
Wed Mar 14 14:22:21 CET 2007


Author: sho
Date: 2007-01-28 12:49:33 +0000 (Sun, 28 Jan 2007)
New Revision: 150

Added:
   unstable/ffmpeg/debian/patches/040_early_altivec_detection.diff
Modified:
   unstable/ffmpeg/debian/changelog
   unstable/ffmpeg/debian/patches/series
Log:
  * debian/patches/040_early_altivec_detection.diff:
    + New patch, detect AltiVec earlier on and only once so that we don't
      risk using signal handlers in a multithreaded environment or when
      the caller already installed a SIGILL handler.


Modified: unstable/ffmpeg/debian/changelog
===================================================================
--- unstable/ffmpeg/debian/changelog	2007-01-28 11:55:01 UTC (rev 149)
+++ unstable/ffmpeg/debian/changelog	2007-01-28 12:49:33 UTC (rev 150)
@@ -16,6 +16,10 @@
   [ Sam Hocevar ]
   * debian/patches/020_mmx_optims.diff:
     + New patch, fix FTBFS with DEB_BUILD_OPTIONS=debug.
+  * debian/patches/040_early_altivec_detection.diff:
+    + New patch, detect AltiVec earlier on and only once so that we don't
+      risk using signal handlers in a multithreaded environment or when
+      the caller already installed a SIGILL handler.
 
  -- Loic Minier <lool at dooz.org>  Wed, 24 Jan 2007 12:01:12 +0100
 

Added: unstable/ffmpeg/debian/patches/040_early_altivec_detection.diff
===================================================================
--- unstable/ffmpeg/debian/patches/040_early_altivec_detection.diff	2007-01-28 11:55:01 UTC (rev 149)
+++ unstable/ffmpeg/debian/patches/040_early_altivec_detection.diff	2007-01-28 12:49:33 UTC (rev 150)
@@ -0,0 +1,55 @@
+Index: ffmpeg-0.cvs20060823/libavcodec/ppc/dsputil_altivec.c
+===================================================================
+--- ffmpeg-0.cvs20060823.orig/libavcodec/ppc/dsputil_altivec.c	2007-01-28 13:18:29.000000000 +0100
++++ ffmpeg-0.cvs20060823/libavcodec/ppc/dsputil_altivec.c	2007-01-28 13:40:40.000000000 +0100
+@@ -1654,7 +1654,7 @@
+     return score;
+ }
+ 
+-int has_altivec(void)
++static int has_altivec_inner(void)
+ {
+ #ifdef __AMIGAOS4__
+     ULONG result = 0;
+@@ -1698,6 +1698,15 @@
+ #endif /* __AMIGAOS4__ */
+ }
+ 
++int has_altivec(void)
++{
++    static int has_it = -1;
++    if (has_it < 0) {
++        has_it = has_altivec_inner();
++    }
++    return has_it;
++}
++
+ static void vorbis_inverse_coupling_altivec(float *mag, float *ang,
+                                             int blocksize)
+ {
+Index: ffmpeg-0.cvs20060823/libavcodec/dsputil.c
+===================================================================
+--- ffmpeg-0.cvs20060823.orig/libavcodec/dsputil.c	2007-01-28 13:36:58.000000000 +0100
++++ ffmpeg-0.cvs20060823/libavcodec/dsputil.c	2007-01-28 13:38:00.000000000 +0100
+@@ -32,6 +32,11 @@
+ #include "faandct.h"
+ #include "snow.h"
+ 
++/* For PPC Use */
++#if HAVE_ALTIVEC==1
++extern int has_altivec(void);
++#endif
++
+ /* snow.c */
+ void ff_spatial_dwt(int *buffer, int width, int height, int stride, int type, int decomposition_count);
+ 
+@@ -3841,6 +3846,9 @@
+ {
+     int i;
+ 
++#if HAVE_ALTIVEC==1
++    (void)has_altivec();
++#endif
+     for(i=0;i<256;i++) cropTbl[i + MAX_NEG_CROP] = i;
+     for(i=0;i<MAX_NEG_CROP;i++) {
+         cropTbl[i] = 0;

Modified: unstable/ffmpeg/debian/patches/series
===================================================================
--- unstable/ffmpeg/debian/patches/series	2007-01-28 11:55:01 UTC (rev 149)
+++ unstable/ffmpeg/debian/patches/series	2007-01-28 12:49:33 UTC (rev 150)
@@ -14,3 +14,4 @@
 030_arm_workaround.diff
 050_h264-misc-security-fixes.diff
 051_asf-misc-security-fixes.diff
+040_early_altivec_detection.diff




More information about the Pkg-multimedia-commits mailing list