From 4a0c85f14283cddd5eb81b6b45a4f13694086839342a7661fe92750c8b3a1564 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 27 Jul 2020 14:02:29 +0000 Subject: [PATCH] Accepting request 823002 from home:frispete:RemoteDesktop - Apply upstream fix to avoid segfaults in x86/yuv2rgb conversion ffmpeg.git-ba3e771a42c29ee02c34e7769cfc1b2dbc5c760a.patch OBS-URL: https://build.opensuse.org/request/show/823002 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=137 --- ffmpeg-4.changes | 6 ++ ffmpeg-4.spec | 1 + ...771a42c29ee02c34e7769cfc1b2dbc5c760a.patch | 58 +++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 ffmpeg.git-ba3e771a42c29ee02c34e7769cfc1b2dbc5c760a.patch diff --git a/ffmpeg-4.changes b/ffmpeg-4.changes index f52b8b5..ef7d4df 100644 --- a/ffmpeg-4.changes +++ b/ffmpeg-4.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jul 27 13:39:27 UTC 2020 - Hans-Peter Jansen + +- Apply upstream fix to avoid segfaults in x86/yuv2rgb conversion + ffmpeg.git-ba3e771a42c29ee02c34e7769cfc1b2dbc5c760a.patch + ------------------------------------------------------------------- Thu Jul 16 10:49:02 UTC 2020 - Alexander Reimelt diff --git a/ffmpeg-4.spec b/ffmpeg-4.spec index c3705a2..3d3450b 100644 --- a/ffmpeg-4.spec +++ b/ffmpeg-4.spec @@ -114,6 +114,7 @@ Patch2: ffmpeg-new-coder-errors.diff Patch3: ffmpeg-codec-choice.diff Patch4: ffmpeg-4.2-dlopen-fdk_aac.patch Patch5: soversion.patch +Patch6: ffmpeg.git-ba3e771a42c29ee02c34e7769cfc1b2dbc5c760a.patch BuildRequires: ladspa-devel BuildRequires: libgsm-devel BuildRequires: libmp3lame-devel diff --git a/ffmpeg.git-ba3e771a42c29ee02c34e7769cfc1b2dbc5c760a.patch b/ffmpeg.git-ba3e771a42c29ee02c34e7769cfc1b2dbc5c760a.patch new file mode 100644 index 0000000..c1ad28e --- /dev/null +++ b/ffmpeg.git-ba3e771a42c29ee02c34e7769cfc1b2dbc5c760a.patch @@ -0,0 +1,58 @@ +From: James Almer +Date: Mon, 13 Jul 2020 00:32:01 +0000 (-0300) +Subject: x86/yuv2rgb: fix crashes when storing data on unaligned buffers +X-Git-Url: http://git.videolan.org/?p=ffmpeg.git;a=commitdiff_plain;h=ba3e771a42c29ee02c34e7769cfc1b2dbc5c760a + +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 +--- + +diff --git a/libswscale/x86/yuv_2_rgb.asm b/libswscale/x86/yuv_2_rgb.asm +index 575a84d921..003dff1f25 100644 +--- a/libswscale/x86/yuv_2_rgb.asm ++++ b/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 +