[SCM] libav/experimental: sfence

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:30:21 UTC 2013


The following commit has been merged in the experimental branch:
commit 79811694c509d11d4a547afb8286267d0e39b1e8
Author: Nick Kurshev <nickols_k at mail.ru>
Date:   Sun Oct 28 13:59:57 2001 +0000

    sfence
    
    Originally committed as revision 2514 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc

diff --git a/postproc/rgb2rgb.c b/postproc/rgb2rgb.c
index 6ba4911..4ddb7d7 100644
--- a/postproc/rgb2rgb.c
+++ b/postproc/rgb2rgb.c
@@ -23,6 +23,10 @@
 #define MOVNTQ "movq"
 #endif
 
+#ifdef HAVE_MMX2
+#define SFENCE "sfence"
+#endif
+
 void rgb24to32(uint8_t *src,uint8_t *dst,uint32_t src_size)
 {
   uint8_t *dest = dst;
@@ -65,6 +69,9 @@ void rgb24to32(uint8_t *src,uint8_t *dst,uint32_t src_size)
     dest += 16;
     s += 12;
   }
+#ifdef SFENCE
+  __asm __volatile(SFENCE:::"memory");
+#endif
   __asm __volatile(EMMS:::"memory");
 #endif
   while(s < end)
diff --git a/postproc/rgb2rgb_template.c b/postproc/rgb2rgb_template.c
index 6ba4911..4ddb7d7 100644
--- a/postproc/rgb2rgb_template.c
+++ b/postproc/rgb2rgb_template.c
@@ -23,6 +23,10 @@
 #define MOVNTQ "movq"
 #endif
 
+#ifdef HAVE_MMX2
+#define SFENCE "sfence"
+#endif
+
 void rgb24to32(uint8_t *src,uint8_t *dst,uint32_t src_size)
 {
   uint8_t *dest = dst;
@@ -65,6 +69,9 @@ void rgb24to32(uint8_t *src,uint8_t *dst,uint32_t src_size)
     dest += 16;
     s += 12;
   }
+#ifdef SFENCE
+  __asm __volatile(SFENCE:::"memory");
+#endif
   __asm __volatile(EMMS:::"memory");
 #endif
   while(s < end)

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list