Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Marton Balint <cus@passwd.hu>
To: ffmpeg-devel@ffmpeg.org
Cc: Marton Balint <cus@passwd.hu>
Subject: [FFmpeg-devel] [PATCH 1/4] avfilter/x86/vf_blend: use unaligned movs for output
Date: Mon, 14 Mar 2022 22:06:00 +0100
Message-ID: <20220314210603.23870-1-cus@passwd.hu> (raw)

Fixes crashes with:

ffmpeg -f lavfi -i allyuv=d=1 -vf tblend=difference128,pad=5000:ih:1 -f null x

Signed-off-by: Marton Balint <cus@passwd.hu>
---
 libavfilter/x86/vf_blend.asm | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/libavfilter/x86/vf_blend.asm b/libavfilter/x86/vf_blend.asm
index 766e5b7bc1..277b100e4d 100644
--- a/libavfilter/x86/vf_blend.asm
+++ b/libavfilter/x86/vf_blend.asm
@@ -75,7 +75,7 @@ BLEND_INIT %1, 2, %3
         movu            m0, [topq + xq]
         movu            m1, [bottomq + xq]
         p%2             m0, m1
-        mova   [dstq + xq], m0
+        movu   [dstq + xq], m0
         add             xq, mmsize
     jl .loop
 BLEND_END
@@ -108,7 +108,7 @@ BLEND_INIT %1, 6, %4
 
         packus%3%2       m0, m1
 
-        mova  [dstq + xq], m0
+        movu  [dstq + xq], m0
         add            xq, mmsize
     jl .loop
 BLEND_END
@@ -148,7 +148,7 @@ BLEND_INIT multiply, 6
         MULTIPLY        m1, m3, m5
 
         packuswb       m0, m1
-        mova  [dstq + xq], m0
+        movu  [dstq + xq], m0
         add            xq, mmsize
     jl .loop
 BLEND_END
@@ -175,7 +175,7 @@ BLEND_INIT screen, 7
         SCREEN          m1, m3, m5, m6
 
         packuswb       m0, m1
-        mova  [dstq + xq], m0
+        movu  [dstq + xq], m0
         add            xq, mmsize
     jl .loop
 BLEND_END
@@ -196,7 +196,7 @@ BLEND_INIT %1, 3, %3
     pxor           m1, m2
     pavg%2         m0, m1
     pxor           m0, m2
-    mova  [dstq + xq], m0
+    movu  [dstq + xq], m0
     add            xq, mmsize
     jl .loop
 BLEND_END
@@ -230,7 +230,7 @@ BLEND_INIT %1, 6, %4
 
         packus%3%2     m0, m1
 
-        mova  [dstq + xq], m0
+        movu  [dstq + xq], m0
         add            xq, mmsize
     jl .loop
 BLEND_END
@@ -251,7 +251,7 @@ BLEND_INIT hardmix, 5
         pxor            m0, m3
         pcmpgtb         m1, m0
         pxor            m1, m2
-        mova   [dstq + xq], m1
+        movu   [dstq + xq], m1
         add             xq, mmsize
     jl .loop
 BLEND_END
@@ -304,7 +304,7 @@ BLEND_INIT %1, 4, %3
         mova            m2, m3
         psubus%2        m2, m1
         paddus%2        m2, m0
-        mova   [dstq + xq], m2
+        movu   [dstq + xq], m2
         add             xq, mmsize
     jl .loop
 BLEND_END
@@ -333,7 +333,7 @@ BLEND_INIT %1, 5, %4
         ABS2            m0, m3, m1, m4
 %endif
         packus%3%2      m0, m3
-        mova   [dstq + xq], m0
+        movu   [dstq + xq], m0
         add             xq, mmsize
     jl .loop
 BLEND_END
@@ -369,7 +369,7 @@ BLEND_INIT %1, 8, %4
         ABS2            m3, m7, m1, m6
 %endif
         packus%3%2      m3, m7
-        mova   [dstq + xq], m3
+        movu   [dstq + xq], m3
         add             xq, mmsize
     jl .loop
 BLEND_END
@@ -406,7 +406,7 @@ BLEND_INIT %1, 8, %4
         psub%3          m0, m4, m3
         psub%3          m1, m4, m7
         packus%3%2      m0, m1
-        mova   [dstq + xq], m0
+        movu   [dstq + xq], m0
         add             xq, mmsize
     jl .loop
 BLEND_END
-- 
2.31.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

             reply	other threads:[~2022-03-14 21:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-14 21:06 Marton Balint [this message]
2022-03-14 21:06 ` [FFmpeg-devel] [PATCH 2/4] avfilter/vf_zscale: fix number of threads Marton Balint
2022-03-14 21:58   ` Paul B Mahol
2022-03-16 11:33     ` Victoria Zhislina
2022-03-16 19:26       ` Marton Balint
2022-03-14 21:06 ` [FFmpeg-devel] [PATCH 3/4] avfilter/vf_zscale: properly check return value of slice threads Marton Balint
2022-03-14 21:59   ` Paul B Mahol
2022-03-14 21:06 ` [FFmpeg-devel] [PATCH 4/4] avfilter/vf_zscale: realign output buffer if needed Marton Balint
2022-03-14 21:59   ` Paul B Mahol
2022-03-16 20:52   ` James Almer
2022-03-16 20:58     ` James Almer
2022-03-16 22:01     ` Marton Balint
2022-03-18 10:40 ` [FFmpeg-devel] [PATCH 1/4] avfilter/x86/vf_blend: use unaligned movs for output Paul B Mahol
2022-03-20 23:56   ` Marton Balint

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220314210603.23870-1-cus@passwd.hu \
    --to=cus@passwd.hu \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git