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

Git pushed a commit to branch master
in repository ffmpeg.

commit 5ccfaa872ae46115510fa258c83c14fe528cd222
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Tue Aug 4 18:12:12 2026 +0200
Commit:     James Almer <[email protected]>
CommitDate: Thu Aug 6 19:59:16 2026 +0000

    avfilter/x86/vf_atadenoise: Avoid shifting unnecessarily
    
    For a word mask register (where all the values are either
    0x0 or 0xFFFF) a right logical shift by 15 is equivalent
    to negating, so instead of negating the mask and then adding
    it to another register one can simply subtract the mask from
    the other register.
    
    Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavfilter/x86/vf_atadenoise.asm | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/libavfilter/x86/vf_atadenoise.asm 
b/libavfilter/x86/vf_atadenoise.asm
index 9726084f31..c1217d38ce 100644
--- a/libavfilter/x86/vf_atadenoise.asm
+++ b/libavfilter/x86/vf_atadenoise.asm
@@ -85,8 +85,7 @@ cglobal atadenoise_filter_row8, 6,10,13, src, dst, srcf, w, 
mid, size, i, j, src
             mova            m12, m6
             pand             m9, m6
             paddw            m7, m9
-            psrlw            m6, 15
-            paddw            m8, m6
+            psubw            m8, m6
 
             mov          srcfxq, [srcfq + iq * 8]
             add          srcfxq, wq
@@ -105,8 +104,7 @@ cglobal atadenoise_filter_row8, 6,10,13, src, dst, srcf, w, 
mid, size, i, j, src
             mova            m12, m6
             pand             m9, m6
             paddw            m7, m9
-            psrlw            m6, 15
-            paddw            m8, m6
+            psubw            m8, m6
 
             ptest           m12, m12
             jz .finish
@@ -190,8 +188,7 @@ cglobal atadenoise_filter_row8_serial, 6,10,12, src, dst, 
srcf, w, mid, size, i,
             mova            m11, m6
             pand             m9, m6
             paddw            m7, m9
-            psrlw            m6, 15
-            paddw            m8, m6
+            psubw            m8, m6
 
             ptest           m11, m11
             jz .end_loop0
@@ -223,8 +220,7 @@ cglobal atadenoise_filter_row8_serial, 6,10,12, src, dst, 
srcf, w, mid, size, i,
             mova            m11, m6
             pand             m9, m6
             paddw            m7, m9
-            psrlw            m6, 15
-            paddw            m8, m6
+            psubw            m8, m6
 
             ptest           m11, m11
             jz .finish

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

Reply via email to