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 a48e31e501 avcodec/x86/pngdsp.asm: replace MMX with SSE2
a48e31e501 is described below

commit a48e31e501b950babcf7a47498ecf9e4e16cd7de
Author:     Zuxy Meng <[email protected]>
AuthorDate: Wed Aug 12 00:18:34 2026 -0700
Commit:     Zuxy Meng <[email protected]>
CommitDate: Sun Aug 16 16:10:09 2026 -0700

    avcodec/x86/pngdsp.asm: replace MMX with SSE2
    
    No more use of mm registers and emms. Performance identical.
    
    Signed-off-by: Zuxy Meng <[email protected]>
---
 libavcodec/x86/pngdsp.asm | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/libavcodec/x86/pngdsp.asm b/libavcodec/x86/pngdsp.asm
index e0a3b602de..c7dc27ad42 100644
--- a/libavcodec/x86/pngdsp.asm
+++ b/libavcodec/x86/pngdsp.asm
@@ -76,13 +76,13 @@ cglobal add_bytes_l2, 4, 6, 2, dst, src1, src2, wa, w, i
     jl .loop_s
     RET
 
-INIT_MMX ssse3
-cglobal png_add_paeth_prediction, 5, 7, 0, dst, src, top, w, bpp, end, cntr
+INIT_XMM ssse3
+cglobal png_add_paeth_prediction, 5, 7, 8, dst, src, top, w, bpp, end, cntr
 %if ARCH_X86_64
     movsxd            bppq, bppd
     movsxd              wq, wd
 %endif
-    lea               endq, [dstq+wq-(mmsize/2-1)]
+    lea               endq, [dstq+wq-(mmsize/4-1)]
     sub               topq, dstq
     sub               srcq, dstq
     sub               dstq, bppq
@@ -90,17 +90,17 @@ cglobal png_add_paeth_prediction, 5, 7, 0, dst, src, top, 
w, bpp, end, cntr
 
     PUSH              dstq
     lea              cntrq, [bppq-1]
-    shr              cntrq, 2 + mmsize/16
+    shr              cntrq, 2 + mmsize/32
 .bpp_loop:
-    lea               dstq, [dstq+cntrq*(mmsize/2)]
-    movh                m0, [dstq]
-    movh                m1, [topq+dstq]
+    lea               dstq, [dstq+cntrq*(mmsize/4)]
+    movd                m0, [dstq]
+    movd                m1, [topq+dstq]
     punpcklbw           m0, m7
     punpcklbw           m1, m7
     add               dstq, bppq
 .loop:
     mova                m2, m1
-    movh                m1, [topq+dstq]
+    movd                m1, [topq+dstq]
     mova                m3, m2
     punpcklbw           m1, m7
     mova                m4, m2
@@ -119,7 +119,7 @@ cglobal png_add_paeth_prediction, 5, 7, 0, dst, src, top, 
w, bpp, end, cntr
     pand                m4, m3
     pandn               m6, m3
     pandn               m3, m0
-    movh                m0, [srcq+dstq]
+    movd                m0, [srcq+dstq]
     pand                m6, m1
     pand                m2, m4
     punpcklbw           m0, m7
@@ -129,7 +129,7 @@ cglobal png_add_paeth_prediction, 5, 7, 0, dst, src, top, 
w, bpp, end, cntr
     pand                m0, [pw_255]
     mova                m3, m0
     packuswb            m3, m3
-    movh            [dstq], m3
+    movd            [dstq], m3
     add               dstq, bppq
     cmp               dstq, endq
     jl .loop
@@ -138,5 +138,4 @@ cglobal png_add_paeth_prediction, 5, 7, 0, dst, src, top, 
w, bpp, end, cntr
     dec              cntrq
     jge .bpp_loop
     POP               dstq
-    emms
     RET

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to