From 1f8e43938bc2cc43ab1a875456aea373e0b587b9 Mon Sep 17 00:00:00 2001 From: Marton Balint Date: Fri, 6 Dec 2019 23:01:27 +0100 Subject: [PATCH] avfilter/x86/vf_interlace: always use unaligned movs Fixes crashes in command lines such as: ffmpeg -f lavfi -i testsrc2=704x576:r=50,interlace,pad=720:576:8 -f null none Related to ticket #6491. Signed-off-by: Marton Balint --- libavfilter/x86/vf_interlace.asm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavfilter/x86/vf_interlace.asm b/libavfilter/x86/vf_interlace.asm index a6c65b805d..f4a405c754 100644 --- a/libavfilter/x86/vf_interlace.asm +++ b/libavfilter/x86/vf_interlace.asm @@ -49,7 +49,7 @@ SECTION .text pxor m2, m6, [srcq+hq] pavg%1 m0, m2 pxor m0, m6 - mova [dstq+hq], m0 + movu [dstq+hq], m0 add hq, mmsize jge .end @@ -66,8 +66,8 @@ SECTION .text pavg%1 m1, m3 pxor m0, m6 pxor m1, m6 - mova [dstq+hq], m0 - mova [dstq+hq+mmsize], m1 + movu [dstq+hq], m0 + movu [dstq+hq+mmsize], m1 add hq, 2*mmsize jl .loop @@ -140,7 +140,7 @@ cglobal lowpass_line_complex, 5, 5, 8, dst, h, src, mref, pref pand m0, m6 pandn m6, m1 por m0, m6 - mova [dstq], m0 + movu [dstq], m0 add dstq, mmsize add srcq, mmsize @@ -201,8 +201,8 @@ cglobal lowpass_line_complex_12, 5, 5, 8, 16, dst, h, src, mref, pref, clip_max pandn m7, m3 por m0, m6 por m1, m7 - mova [dstq], m0 - mova [dstq+mmsize], m1 + movu [dstq], m0 + movu [dstq+mmsize], m1 add dstq, 2*mmsize add srcq, 2*mmsize