[SCM] libav/experimental: ppc: Move vec_unaligned_load macro to util_altivec

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Aug 10 16:03:18 UTC 2014


The following commit has been merged in the experimental branch:
commit b5aa48551300eed678aaea86ced7086758598a35
Author: Diego Biurrun <diego at biurrun.de>
Date:   Wed May 28 03:29:33 2014 -0700

    ppc: Move vec_unaligned_load macro to util_altivec
    
    This allows reusing it from multiple files.

diff --git a/libavcodec/ppc/int_altivec.c b/libavcodec/ppc/int_altivec.c
index 42c396c..cd1984a 100644
--- a/libavcodec/ppc/int_altivec.c
+++ b/libavcodec/ppc/int_altivec.c
@@ -30,6 +30,7 @@
 
 #include "libavutil/attributes.h"
 #include "libavutil/ppc/types_altivec.h"
+#include "libavutil/ppc/util_altivec.h"
 #include "libavcodec/dsputil.h"
 #include "dsputil_altivec.h"
 
@@ -46,9 +47,6 @@ static int ssd_int8_vs_int16_altivec(const int8_t *pix1, const int16_t *pix2,
 
 // XXX lazy way, fix it later
 
-#define vec_unaligned_load(b)                                   \
-    vec_perm(vec_ld(0, b), vec_ld(15, b), vec_lvsl(0, b));
-
     while (size16) {
         // score += (pix1[i] - pix2[i]) * (pix1[i] - pix2[i]);
         // load pix1 and the first batch of pix2
diff --git a/libavutil/ppc/util_altivec.h b/libavutil/ppc/util_altivec.h
index 4b94b04..5624ac5 100644
--- a/libavutil/ppc/util_altivec.h
+++ b/libavutil/ppc/util_altivec.h
@@ -106,6 +106,9 @@ static inline vec_u8 load_with_perm_vec(int offset, uint8_t *src, vec_u8 perm_ve
     return vec_perm(a, b, perm_vec);
 }
 
+#define vec_unaligned_load(b)                                   \
+    vec_perm(vec_ld(0, b), vec_ld(15, b), vec_lvsl(0, b));
+
 #endif /* HAVE_ALTIVEC */
 
 #endif /* AVUTIL_PPC_UTIL_ALTIVEC_H */

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list