1From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> 2Date: Tue, 19 Jan 2021 20:35:29 +0100 3Subject: Fix build on powerpc and ppc64 4 5Upstream-Status: Inappropriate 6 7RPI-Distro repo clones original ffmpeg and applies patches to enable 8raspiberry pi support. 9 10--- 11 libswscale/ppc/yuv2rgb_altivec.c | 10 ++++++++++ 12 1 file changed, 10 insertions(+) 13 14diff --git a/libswscale/ppc/yuv2rgb_altivec.c b/libswscale/ppc/yuv2rgb_altivec.c 15index 5365452..930ef6b 100644 16--- a/libswscale/ppc/yuv2rgb_altivec.c 17+++ b/libswscale/ppc/yuv2rgb_altivec.c 18@@ -283,6 +283,16 @@ static inline void cvtyuvtoRGB(SwsContext *c, vector signed short Y, 19 * ------------------------------------------------------------------------------ 20 */ 21 22+#if !HAVE_VSX 23+static inline vector unsigned char vec_xl(signed long long offset, const ubyte *addr) 24+{ 25+ const vector unsigned char *v_addr = (const vector unsigned char *) (addr + offset); 26+ vector unsigned char align_perm = vec_lvsl(offset, addr); 27+ 28+ return (vector unsigned char) vec_perm(v_addr[0], v_addr[1], align_perm); 29+} 30+#endif /* !HAVE_VSX */ 31+ 32 #define DEFCSP420_CVT(name, out_pixels) \ 33 static int altivec_ ## name(SwsContext *c, const unsigned char **in, \ 34 int *instrides, int srcSliceY, int srcSliceH, \ 35