[FFmpeg-devel,5/7] avcodec: add stride alignment needed for AVX-512

Submitted by James Darnley on Dec. 21, 2017, 1:41 p.m.

Details

Message ID 20171221134102.3959-6-jdarnley@obe.tv
State New
Headers show

Commit Message

James Darnley Dec. 21, 2017, 1:41 p.m.
---
 configure             | 2 ++
 libavcodec/internal.h | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/configure b/configure
index 07fb825f91..d3187d71ed 100755
--- a/configure
+++ b/configure
@@ -1892,6 +1892,7 @@  ARCH_FEATURES="
     local_aligned
     simd_align_16
     simd_align_32
+    simd_align_64
 "
 
 BUILTIN_LIST="
@@ -2394,6 +2395,7 @@  fast_clz_if_any="aarch64 alpha avr32 mips ppc x86"
 fast_unaligned_if_any="aarch64 ppc x86"
 simd_align_16_if_any="altivec neon sse"
 simd_align_32_if_any="avx"
+simd_align_64_if_any="avx512"
 
 # system capabilities
 symver_if_any="symver_asm_label symver_gnu_asm"
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index 30cb9a0de1..fcbdb6c04d 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -87,7 +87,9 @@ 
 
 #define FF_SIGNBIT(x) ((x) >> CHAR_BIT * sizeof(x) - 1)
 
-#if HAVE_SIMD_ALIGN_32
+#if HAVE_SIMD_ALIGN_64
+#   define STRIDE_ALIGN 64 /* AVX-512 */
+#elif HAVE_SIMD_ALIGN_32
 #   define STRIDE_ALIGN 32
 #elif HAVE_SIMD_ALIGN_16
 #   define STRIDE_ALIGN 16