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

Git pushed a commit to branch master
in repository ffmpeg.

commit f30ef7eec41dce9ff0f134dcd579b5ade95b5b1b
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Thu Jul 23 01:19:49 2026 +0200
Commit:     Andreas Rheinhardt <[email protected]>
CommitDate: Sat Aug 1 16:50:06 2026 +0200

    avcodec/x86/vc1dsp_loopfilter: Avoid imul
    
    Multipliying a GPR by 0x01010101 splats a byte to a dword;
    the intention was to avoid vector shuffles lateron, yet
    this is not true because the byte splat necessitates
    a byte->word conversion lateron.
    
    Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavcodec/x86/vc1dsp_loopfilter.asm | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/libavcodec/x86/vc1dsp_loopfilter.asm 
b/libavcodec/x86/vc1dsp_loopfilter.asm
index f1367da5fa..373608588f 100644
--- a/libavcodec/x86/vc1dsp_loopfilter.asm
+++ b/libavcodec/x86/vc1dsp_loopfilter.asm
@@ -89,9 +89,10 @@ SECTION .text
     pxor    m5, m5
     movd    m3, r2d
 %if %1 > 4
-    punpcklbw m3, m3
+    SPLATW  m3, m3
+%else
+    pshufw  m3, m3, 0
 %endif
-    punpcklbw m3, m5
     pcmpgtw m3, m4  ; if (a0 < pq)
     pand    m6, m3
 
@@ -217,7 +218,6 @@ SECTION .text
     lea  r3, [4*r1]
     sub  r4, r3
     lea  r3, [r1+2*r1]
-    imul r2, 0x01010101
 %endmacro
 
 %macro START_H_FILTER 1
@@ -225,7 +225,6 @@ SECTION .text
 %if %1 > 4
     lea  r4, [r0+4*r1]
 %endif
-    imul r2, 0x01010101
 %endmacro
 
 INIT_XMM sse2

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

Reply via email to