[FFmpeg-cvslog] lavc: align the linesize to 32 when AVX is enabled

Anton Khirnov git at videolan.org
Thu Mar 16 03:18:33 EET 2017


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sat Jul 30 20:54:42 2016 +0200| [89aebc5bcc6e23a0a79c3f51c3a55c3571692ba0] | committer: Anton Khirnov

lavc: align the linesize to 32 when AVX is enabled

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=89aebc5bcc6e23a0a79c3f51c3a55c3571692ba0
---

 configure          | 6 +++++-
 libavcodec/utils.c | 4 +++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 80aa09e..9f836b7 100755
--- a/configure
+++ b/configure
@@ -1469,7 +1469,9 @@ ARCH_FEATURES="
     local_aligned_8
     local_aligned_16
     local_aligned_32
+    simd_align
     simd_align_16
+    simd_align_32
 "
 
 BUILTIN_LIST="
@@ -1880,7 +1882,9 @@ aligned_stack_if_any="aarch64 ppc x86"
 fast_64bit_if_any="aarch64 alpha ia64 mips64 parisc64 ppc64 sparc64 x86_64"
 fast_clz_if_any="aarch64 alpha avr32 mips ppc x86"
 fast_unaligned_if_any="aarch64 ppc x86"
+simd_align_if_any="simd_align_16 simd_align_32"
 simd_align_16_if_any="altivec neon sse"
+simd_align_32_if_any="avx"
 
 # system capabilities
 symver_if_any="symver_asm_label symver_gnu_asm"
@@ -5032,7 +5036,7 @@ enabled_all dxva2 CoTaskMemFree &&
     enable dxva2_lib
 
 ! enabled_any memalign posix_memalign aligned_malloc &&
-    enabled simd_align_16 && enable memalign_hack
+    enabled simd_align && enable memalign_hack
 
 map 'enabled $v && intrinsics=${v#intrinsics_}' $INTRINSICS_LIST
 
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 4184b95..ce86bfa 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -178,7 +178,9 @@ int ff_side_data_update_matrix_encoding(AVFrame *frame,
     return 0;
 }
 
-#if HAVE_SIMD_ALIGN_16
+#if HAVE_SIMD_ALIGN_32
+#   define STRIDE_ALIGN 32
+#elif HAVE_SIMD_ALIGN_16
 #   define STRIDE_ALIGN 16
 #else
 #   define STRIDE_ALIGN 8



More information about the ffmpeg-cvslog mailing list