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

Git pushed a commit to branch master
in repository ffmpeg.

commit 0654b34370cbdc1ec4f3768c235a8bf06bef5988
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Fri Aug 7 16:31:58 2026 +0200
Commit:     Andreas Rheinhardt <[email protected]>
CommitDate: Sun Aug 9 17:26:55 2026 +0200

    avcodec/x86/diracdsp: Fix clipping
    
    packusdw saturates to uint16_t, yet CLIPW is designed for signed values.
    If any of the saturated unsigned values were >= 2^16*, the macro would
    return 0. Anyway, given that packusdw already saturates below,
    clipping from both sides again is simply wasteful.
    
    *: I don't know whether this can happen at all.
    
    Reviewed-by: Lynne <[email protected]>
    Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavcodec/x86/diracdsp.asm | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/x86/diracdsp.asm b/libavcodec/x86/diracdsp.asm
index 69cdf0f8a5..7cb6ee0664 100644
--- a/libavcodec/x86/diracdsp.asm
+++ b/libavcodec/x86/diracdsp.asm
@@ -327,7 +327,6 @@ cglobal put_signed_rect_clamped_10, 5, 7, 5, dst, 
dst_stride, src, src_stride, w
     neg      wq
     mov     t2q, dstq
     mov     t1q, wq
-    pxor     m2, m2
     mova     m3, [clip_10bit]
     mova     m4, [convert_to_unsigned_10bit]
 
@@ -342,7 +341,7 @@ cglobal put_signed_rect_clamped_10, 5, 7, 5, dst, 
dst_stride, src, src_stride, w
     paddd    m0, m4
     paddd    m1, m4
     packusdw m0, m0, m1
-    CLIPW    m0, m2, m3 ; packusdw saturates so it's fine
+    pminuw   m0, m3
 
     movu     [dstq], m0
 

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

Reply via email to