Commit b9d4bd7271 for ffmpeg
commit b9d4bd727165a882fe3aa8e37ecb7ad82b3ecbbc
Author: Niklas Haas <git@haasn.dev>
Date: Thu Oct 22 20:42:01 2026 +0200
swscale/x86/ops_int: fix over-write in SSE4 WRITE_NIBBLE
Without AVX2, a block only holds 8 bytes worth of nibbles, but the full
XMM register was stored, clobbering 8 bytes past the end of the block.
This corrupted the previous line for negative linesizes.
Signed-off-by: Niklas Haas <git@haasn.dev>
diff --git a/libswscale/x86/ops_int.asm b/libswscale/x86/ops_int.asm
index 6f49ffeafe..692a3627ac 100644
--- a/libswscale/x86/ops_int.asm
+++ b/libswscale/x86/ops_int.asm
@@ -134,9 +134,12 @@ assert COMPS == 1
%if cpuflag(avx2)
vpermq mx, mx, q3120
IF V2, vpermq mx2, mx2, q3120
-%endif
movu [out0q], xmx
IF V2, movu [out0q + (mmsize >> 1)], xmx2
+%else
+ movq [out0q], mx
+IF V2, movq [out0q + (mmsize >> 1)], mx2
+%endif
add out0q, BLOCK_WIDTH >> 1
RET
%endmacro