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

Git pushed a commit to branch master
in repository ffmpeg.

commit 8a6027a54f3a60361a664acb5942d275ab4008a9
Author:     Niklas Haas <[email protected]>
AuthorDate: Tue Jun 2 12:27:21 2026 +0200
Commit:     Niklas Haas <[email protected]>
CommitDate: Tue Jun 2 15:37:54 2026 +0200

    swscale/x86/ops_int: fix write_bits over-write
    
    This writes 4 bytes but in SSE4 mode only produces 2 bytes per vector. We
    can avoid over-writing by using the appropriately sized register.
    
    Reproducible by:
      make libswscale/tests/swscale
      libswscale/tests/swscale -dst monob -unscaled 1 -flags unstable 
-align_src 1 -align_dst 1
    
    Signed-off-by: Niklas Haas <[email protected]>
---
 libswscale/x86/ops_int.asm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/libswscale/x86/ops_int.asm b/libswscale/x86/ops_int.asm
index 55534d4f4b..07ee13ecfe 100644
--- a/libswscale/x86/ops_int.asm
+++ b/libswscale/x86/ops_int.asm
@@ -495,8 +495,13 @@ IF V2,  psllw mx2, 7
 IF V2,  pshufb mx2, m8
         pmovmskb tmp0d, mx
 IF V2,  pmovmskb tmp1d, mx2
-        mov [out0q],     tmp0d
+%if mmsize >= 32
+        mov [out0q], tmp0d
 IF V2,  mov [out0q + (mmsize >> 3)], tmp1d
+%else
+        mov [out0q], tmp0w
+IF V2,  mov [out0q + (mmsize >> 3)], tmp1w
+%endif
         add out0q, (mmsize >> 3) * (1 + V2)
         RET
 %endmacro

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

Reply via email to