[FFmpeg-devel] [PATCH 1/2] lavu: add LOCAL_ALIGNED_32

James Almer jamrial at gmail.com
Thu Apr 24 04:53:36 CEST 2014


Signed-off-by: James Almer <jamrial at gmail.com>
---
Not sure if enabling this for ppc is correct. I don't have access to such 
hardware so i can't test.

 configure            | 5 +++--
 libavutil/internal.h | 6 ++++++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 413cf9a..8f69a3c 100755
--- a/configure
+++ b/configure
@@ -1558,6 +1558,7 @@ ARCH_FEATURES="
     fast_cmov
     local_aligned_8
     local_aligned_16
+    local_aligned_32
 "
 
 BUILTIN_LIST="
@@ -4297,7 +4298,7 @@ elif enabled parisc; then
 
 elif enabled ppc; then
 
-    enable local_aligned_8 local_aligned_16
+    enable local_aligned_8 local_aligned_16 local_aligned_32
 
     check_inline_asm dcbzl     '"dcbzl 0, %0" :: "r"(0)'
     check_inline_asm ibm_asm   '"add 0, 0, 0"'
@@ -4332,7 +4333,7 @@ elif enabled x86; then
     check_builtin rdtsc    intrin.h   "__rdtsc()"
     check_builtin mm_empty mmintrin.h "_mm_empty()"
 
-    enable local_aligned_8 local_aligned_16
+    enable local_aligned_8 local_aligned_16 local_aligned_32
 
     # check whether EBP is available on x86
     # As 'i' is stored on the stack, this program will crash
diff --git a/libavutil/internal.h b/libavutil/internal.h
index c6c0aa8..4165436 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -115,6 +115,12 @@
 #   define LOCAL_ALIGNED_16(t, v, ...) LOCAL_ALIGNED(16, t, v, __VA_ARGS__)
 #endif
 
+#if HAVE_LOCAL_ALIGNED_32
+#   define LOCAL_ALIGNED_32(t, v, ...) E1(LOCAL_ALIGNED_D(32, t, v, __VA_ARGS__,,))
+#else
+#   define LOCAL_ALIGNED_32(t, v, ...) LOCAL_ALIGNED(32, t, v, __VA_ARGS__)
+#endif
+
 #define FF_ALLOC_OR_GOTO(ctx, p, size, label)\
 {\
     p = av_malloc(size);\
-- 
1.8.3.2



More information about the ffmpeg-devel mailing list