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

Git pushed a commit to branch master
in repository ffmpeg.

commit 03b83f8feb1e8fc0d815ac6f0a31a1a63b5a2439
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Thu Mar 19 04:32:21 2026 +0100
Commit:     Andreas Rheinhardt <[email protected]>
CommitDate: Mon Mar 30 13:51:53 2026 +0200

    avcodec/x86/vvc/of: Remove redundant instructions
    
    m8 here (corresponding to a mix of sgx2 and sgy2 in derive_bdof_vx_vy
    in the C version) is always nonnegative, so the psignd boils down to
    a check for m8 being zero. But if an entry of m8 is zero, then
    the corresponding entry of m9 is automatically zero, too, as sgx2
    being zero implies sgxdi being zero and sgy2 implies sgxgy, sgydi
    being zero.* So just remove these redundant instructions.
    
    *: In other words, one could remove the sgx2,sgy2>0 checks from
    the end of derive_bdof_vx_vy() as long as av_log2(0) is defined.
    
    Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavcodec/x86/vvc/of.asm | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/libavcodec/x86/vvc/of.asm b/libavcodec/x86/vvc/of.asm
index eca52f244f..a3162a9ff5 100644
--- a/libavcodec/x86/vvc/of.asm
+++ b/libavcodec/x86/vvc/of.asm
@@ -289,14 +289,12 @@ INIT_YMM avx2
     LOG2                    10, 8                   ; 4 (log2(sgx2), 
log2(sgy2))
 
     ; Promote to dword since vpsrlvw is AVX-512 only
-    pmovsxwd                m8, xm8
     pmovsxwd                m9, xm9
     pmovsxwd               m10, xm10
 
     pslld                   m9, 2                   ; 4 (log2(sgx2) << 2, 
log2(sgy2) << 2)
 
-    psignd                 m11, m9, m8
-    vpsravd                m11, m11, m10
+    vpsravd                m11, m9, m10
     CLIPD                  m11, [pd_m15], [pd_15]   ; 4 (vx, junk)
 
     pshuflw                m%1, m11, q0000
@@ -309,7 +307,6 @@ INIT_YMM avx2
     psrad                  m%2, 1
     psubd                   m9, m%2                 ; 4 (junk, (sgydi << 2) - 
(vx * sgxgy >> 1))
 
-    psignd                  m9, m8
     vpsravd                m%2, m9, m10
     CLIPD                  m%2, [pd_m15], [pd_15]   ; 4 (junk, vy)
 

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

Reply via email to