This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new 4bbb7d9b99 avutil/x86/x86util: Force VEX encoding when using -mavx
4bbb7d9b99 is described below

commit 4bbb7d9b99b58ba6d2a320fe4c0d3c90b0958903
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Sun Jun 14 00:44:36 2026 +0200
Commit:     Andreas Rheinhardt <[email protected]>
CommitDate: Fri Jun 19 20:39:56 2026 +0200

    avutil/x86/x86util: Force VEX encoding when using -mavx
    
    This avoids reg-reg moves and saves 90112B of .text here.
    It also makes the code less reliant on a clean upper ymm state.
    
    Not all functions use VEX encoding yet; besides inline assembly
    functions which are not influenced by x86inc.asm there are also
    functions using a mixture of xmm and mmx registers (e.g.
    h264_intrapred.asm) using INIT_MMX where the automatic VEX translation
    is not active. This means that some parts of the code still rely
    on a clean upper ymm state.
    
    Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 configure                 | 4 ++++
 libavutil/x86/x86util.asm | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/configure b/configure
index 5149f3c217..db98f049ed 100755
--- a/configure
+++ b/configure
@@ -2445,6 +2445,7 @@ ARCH_FEATURES="
     simd_align_16
     simd_align_32
     simd_align_64
+    x86_sse2avx
 "
 
 BUILTIN_LIST="
@@ -6882,6 +6883,7 @@ EOF
         enabled avx2      && check_x86asm avx2_external      "vextracti128 
xmm0, ymm0, 0"
         enabled xop       && check_x86asm xop_external       "vpmacsdd xmm0, 
xmm1, xmm2, xmm3"
         enabled fma4      && check_x86asm fma4_external      "vfmaddps ymm0, 
ymm1, ymm2, ymm3"
+        enabled avx       && check_x86asm avx_external       "vpermilpd ymm0, 
ymm1, 0x72"
     fi
 
     case "$cpu" in
@@ -6892,6 +6894,8 @@ EOF
 
     check_cc intrinsics_sse2 emmintrin.h "__m128i test = _mm_setzero_si128()"
 
+    enabled avx_external && test_cpp_condition stddef.h "defined(__AVX__) && 
__AVX__" && enable x86_sse2avx
+
 elif enabled loongarch; then
     enabled lsx && check_inline_asm lsx '"vadd.b $vr0, $vr1, $vr2"' '-mlsx' && 
append LSXFLAGS '-mlsx'
     enabled lasx && check_inline_asm lasx '"xvadd.b $xr0, $xr1, $xr2"' 
'-mlasx' && append LASXFLAGS '-mlasx'
diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm
index da41e2e5ef..6632155c99 100644
--- a/libavutil/x86/x86util.asm
+++ b/libavutil/x86/x86util.asm
@@ -27,6 +27,10 @@
 %define public_prefix  avpriv
 %define cpuflags_mmxext cpuflags_mmx2
 
+%if HAVE_X86_SSE2AVX
+%define FORCE_VEX_ENCODING 1
+%endif
+
 %include "libavutil/x86/x86inc.asm"
 
 ; expands to [base],...,[base+7*stride]

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to