From 1ff483fbf575500bd6a979e4a9d9a72e08e75e3636b6b2666d6cbf68ddc9ac2c Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 27 Nov 2020 16:18:44 +0000 Subject: [PATCH] Accepting request 851363 from home:michel_mno:branches:multimedia:libs - Add ffmpeg_altivec_yuv2rgb_novsx.patch for ppc64 (BE) boo#1179332 https://trac.ffmpeg.org/ticket/8750 https://bugzilla.opensuse.org/show_bug.cgi?id=1179332 OBS-URL: https://build.opensuse.org/request/show/851363 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=146 --- ffmpeg-4.changes | 7 +++++++ ffmpeg-4.spec | 1 + ffmpeg_altivec_yuv2rgb_novsx.patch | 30 ++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 ffmpeg_altivec_yuv2rgb_novsx.patch diff --git a/ffmpeg-4.changes b/ffmpeg-4.changes index 345e78f..44e5520 100644 --- a/ffmpeg-4.changes +++ b/ffmpeg-4.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Nov 27 15:03:17 UTC 2020 - Michel Normand + +- Add ffmpeg_altivec_yuv2rgb_novsx.patch for ppc64 (BE) as per + https://trac.ffmpeg.org/ticket/8750 + https://bugzilla.opensuse.org/show_bug.cgi?id=1179332 + ------------------------------------------------------------------- Mon Oct 19 06:42:32 UTC 2020 - Jan Engelhardt diff --git a/ffmpeg-4.spec b/ffmpeg-4.spec index d4dda3f..5461a16 100644 --- a/ffmpeg-4.spec +++ b/ffmpeg-4.spec @@ -117,6 +117,7 @@ Patch5: soversion.patch Patch6: ffmpeg.git-ba3e771a42c29ee02c34e7769cfc1b2dbc5c760a.patch Patch7: 0001-lavf-srt-fix-build-fail-when-used-the-libsrt-1.4.1.patch Patch8: vmaf-trim-usr-local.patch +Patch9: ffmpeg_altivec_yuv2rgb_novsx.patch BuildRequires: ladspa-devel BuildRequires: libgsm-devel BuildRequires: libmp3lame-devel diff --git a/ffmpeg_altivec_yuv2rgb_novsx.patch b/ffmpeg_altivec_yuv2rgb_novsx.patch new file mode 100644 index 0000000..0fffdc7 --- /dev/null +++ b/ffmpeg_altivec_yuv2rgb_novsx.patch @@ -0,0 +1,30 @@ +From: Michel Normand +Subject: ffmpeg altivec yuv2rgb novsx +Date: Fri, 27 Nov 2020 15:56:55 +0100 + +ffmpeg altivec yuv2rgb novsx + +Retrieved from +https://trac.ffmpeg.org/ticket/8750#comment:7 + +diff --git a/libswscale/ppc/yuv2rgb_altivec.c b/libswscale/ppc/yuv2rgb_altivec.c +index 536545293d..930ef6b98f 100644 +--- a/libswscale/ppc/yuv2rgb_altivec.c ++++ b/libswscale/ppc/yuv2rgb_altivec.c +@@ -283,6 +283,16 @@ static inline void cvtyuvtoRGB(SwsContext *c, vector signed short Y, + * ------------------------------------------------------------------------------ + */ + ++#if !HAVE_VSX ++static inline vector unsigned char vec_xl(signed long long offset, const ubyte *addr) ++{ ++ const vector unsigned char *v_addr = (const vector unsigned char *) (addr + offset); ++ vector unsigned char align_perm = vec_lvsl(offset, addr); ++ ++ return (vector unsigned char) vec_perm(v_addr[0], v_addr[1], align_perm); ++} ++#endif /* !HAVE_VSX */ ++ + #define DEFCSP420_CVT(name, out_pixels) \ + static int altivec_ ## name(SwsContext *c, const unsigned char **in, \ + int *instrides, int srcSliceY, int srcSliceH, \