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

Git pushed a commit to branch master
in repository ffmpeg.

commit 55afe49dd022ee391a7804793544d8617957fece
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Fri Feb 27 13:24:04 2026 +0100
Commit:     Andreas Rheinhardt <[email protected]>
CommitDate: Fri Feb 27 18:25:31 2026 +0100

    avcodec/x86/bswapdsp: combine shifting, avoid check for AVX2
    
    This avoids a check and a shift if >=8 elements are processed;
    it adds a check if < 8 elements are processed (which should
    be rare).
    No change in benchmarks here.
    
    Reviewed-by: Lynne <[email protected]>
    Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavcodec/x86/bswapdsp.asm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavcodec/x86/bswapdsp.asm b/libavcodec/x86/bswapdsp.asm
index 12fd494ffe..f89ca76cf1 100644
--- a/libavcodec/x86/bswapdsp.asm
+++ b/libavcodec/x86/bswapdsp.asm
@@ -33,11 +33,12 @@ SECTION .text
 ; %1 = aligned/unaligned
 %macro BSWAP_LOOPS  1
     mov      r3d, r2d
-    sar      r3d, 3
-    jz       .left4_%1
 %if cpuflag(avx2)
-    sar      r3d, 1
+    sar      r3d, 4
     jz       .left8_%1
+%else
+    sar      r3d, 3
+    jz       .left4_%1
 %endif
 .loop8_%1:
     mov%1    m0, [r1 +  0]

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

Reply via email to