Github messages for voidlinux
 help / color / mirror / Atom feed
From: mvf <mvf@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] ffmpeg: x86: fix crash with unaligned yuv2rgb output buffers
Date: Sun, 26 Jul 2020 00:20:25 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-23834@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 390 bytes --]

There is a new pull request by mvf against master on the void-packages repository

https://github.com/mvf/void-packages pr/ffmpeg
https://github.com/void-linux/void-packages/pull/23834

ffmpeg: x86: fix crash with unaligned yuv2rgb output buffers
https://trac.ffmpeg.org/ticket/8747

Fixes #23832

A patch file from https://github.com/void-linux/void-packages/pull/23834.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pr/ffmpeg-23834.patch --]
[-- Type: text/x-diff, Size: 3284 bytes --]

From 982b43bf04043dba035736eb8e552f2a0b2d13b8 Mon Sep 17 00:00:00 2001
From: Matthias von Faber <mvf@gmx.eu>
Date: Sun, 26 Jul 2020 00:01:04 +0200
Subject: [PATCH] ffmpeg: x86: fix crash with unaligned yuv2rgb output buffers

---
 .../patches/x86-yuv2rgb-crash-fix.patch       | 59 +++++++++++++++++++
 srcpkgs/ffmpeg/template                       |  2 +-
 2 files changed, 60 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/ffmpeg/patches/x86-yuv2rgb-crash-fix.patch

diff --git a/srcpkgs/ffmpeg/patches/x86-yuv2rgb-crash-fix.patch b/srcpkgs/ffmpeg/patches/x86-yuv2rgb-crash-fix.patch
new file mode 100644
index 00000000000..1438ac4ee26
--- /dev/null
+++ b/srcpkgs/ffmpeg/patches/x86-yuv2rgb-crash-fix.patch
@@ -0,0 +1,59 @@
+From ba3e771a42c29ee02c34e7769cfc1b2dbc5c760a Mon Sep 17 00:00:00 2001
+From: James Almer <jamrial@gmail.com>
+Date: Sun, 12 Jul 2020 21:32:01 -0300
+Subject: [PATCH] x86/yuv2rgb: fix crashes when storing data on unaligned
+ buffers
+
+Regression since fc6a5883d6af8cae0e96af84dda0ad74b360a084 on SSSE3 enabled
+CPUs.
+
+Fixes ticket #8747
+
+Signed-off-by: James Almer <jamrial@gmail.com>
+---
+ libswscale/x86/yuv_2_rgb.asm | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+diff --git libswscale/x86/yuv_2_rgb.asm b/libswscale/x86/yuv_2_rgb.asm
+index 575a84d921e9..003dff1f259c 100644
+--- libswscale/x86/yuv_2_rgb.asm
++++ libswscale/x86/yuv_2_rgb.asm
+@@ -268,9 +268,9 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
+     por    m2, m7
+     por    m1, m6          ; g5  b5  r6  g6  b6  r7  g7  b7  r8  g8  b8  r9  g9  b9  r10 g10
+     por    m2, m3          ; b10 r11 g11 b11 r12 g12 b12 r13 g13 b13 r14 g14 b14 r15 g15 b15
+-    mova [imageq], m0
+-    mova [imageq + 16], m1
+-    mova [imageq + 32], m2
++    movu [imageq], m0
++    movu [imageq + 16], m1
++    movu [imageq + 32], m2
+ %endif ; mmsize = 16
+ %else ; PACK RGB15/16/32
+     packuswb m0, m1
+@@ -300,10 +300,10 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
+     punpckhwd m_green, m_red
+     punpcklwd m5, m6
+     punpckhwd m_alpha, m6
+-    mova [imageq + 0], m_blue
+-    mova [imageq + 8  * time_num], m_green
+-    mova [imageq + 16 * time_num], m5
+-    mova [imageq + 24 * time_num], m_alpha
++    movu [imageq + 0], m_blue
++    movu [imageq + 8  * time_num], m_green
++    movu [imageq + 16 * time_num], m5
++    movu [imageq + 24 * time_num], m_alpha
+ %else ; PACK RGB15/16
+ %define depth 2
+ %if cpuflag(ssse3)
+@@ -342,8 +342,8 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
+     mova m2, m0
+     punpcklbw m0, m1
+     punpckhbw m2, m1
+-    mova [imageq], m0
+-    mova [imageq + 8 * time_num], m2
++    movu [imageq], m0
++    movu [imageq + 8 * time_num], m2
+ %endif ; PACK RGB15/16
+ %endif ; PACK RGB15/16/32
+ 
diff --git a/srcpkgs/ffmpeg/template b/srcpkgs/ffmpeg/template
index 1e66e654e49..94af48561be 100644
--- a/srcpkgs/ffmpeg/template
+++ b/srcpkgs/ffmpeg/template
@@ -2,7 +2,7 @@
 # audacity also needs to be bumped when a new ffmpeg version bumps libavformat's soname!
 pkgname=ffmpeg
 version=4.3.1
-revision=1
+revision=2
 short_desc="Decoding, encoding and streaming software"
 maintainer="Johannes <johannes.brechtmann@gmail.com>"
 license="GPL-3.0-or-later"

             reply	other threads:[~2020-07-25 22:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-25 22:20 mvf [this message]
2020-07-26 17:16 ` [PR PATCH] [Merged]: " jnbr

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=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-23834@inbox.vuxu.org \
    --to=mvf@users.noreply.github.com \
    --cc=ml@inbox.vuxu.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).