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