Am Sa., 23. Jan. 2021 um 19:16 Uhr schrieb Reimar Döffinger <reimar.doeffin...@gmx.de>: > > Hi! > > > On 23 Jan 2021, at 17:31, Carl Eugen Hoyos <ceffm...@gmail.com> wrote: > > Attached patch fixes ticket #9077 for me. > > > > Please comment, Carl Eugen > > <0001-lsws-ppc-yuv2rgb-Fix-transparency-converting-from-yu.patch> > > Unfortunately I can’t test anything myself anymore since > I don’t have any devices with VGA input anymore (and connecting > the PPC MacMini via HDMI never worked reliably). > But checking the surrounding code it might make sense to check > if vec_splat(…{255}, 0) also works, or maybe even generates > better code. > The other cases where a non-0 constant (128) is needed in the > whole vector use vec_splat instead of duplicating the value, > so I assume there is a reason. > In this case actually even more, since the code is generic and > we might not actually know just how many 255s exactly we need > to put into that array?
New patch attached, thank you! Please comment, Carl Eugen
From 43859bd0eb325c35082b33eca89866116bf7a5e8 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos <ceffm...@gmail.com> Date: Sat, 23 Jan 2021 19:33:13 +0100 Subject: [PATCH] lsws/ppc/yuv2rgb: Fix transparency converting from yuv->rgb32. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Based on 68363b69 by Reimar Döffinger. Fixes ticket #9077. --- libswscale/ppc/yuv2rgb_altivec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libswscale/ppc/yuv2rgb_altivec.c b/libswscale/ppc/yuv2rgb_altivec.c index 536545293d..d55cf99521 100644 --- a/libswscale/ppc/yuv2rgb_altivec.c +++ b/libswscale/ppc/yuv2rgb_altivec.c @@ -424,13 +424,13 @@ static int altivec_ ## name(SwsContext *c, const unsigned char **in, \ } #define out_abgr(a, b, c, ptr) \ - vec_mstrgb32(__typeof__(a), ((__typeof__(a)) { 255 }), c, b, a, ptr) + vec_mstrgb32(__typeof__(a), ((__typeof__(a)) vec_splat((__typeof__(a)){ 255 }, 0)), c, b, a, ptr) #define out_bgra(a, b, c, ptr) \ - vec_mstrgb32(__typeof__(a), c, b, a, ((__typeof__(a)) { 255 }), ptr) + vec_mstrgb32(__typeof__(a), c, b, a, ((__typeof__(a)) vec_splat((__typeof__(a)){ 255 }, 0)), ptr) #define out_rgba(a, b, c, ptr) \ - vec_mstrgb32(__typeof__(a), a, b, c, ((__typeof__(a)) { 255 }), ptr) + vec_mstrgb32(__typeof__(a), a, b, c, ((__typeof__(a)) vec_splat((__typeof__(a)){ 255 }, 0)), ptr) #define out_argb(a, b, c, ptr) \ - vec_mstrgb32(__typeof__(a), ((__typeof__(a)) { 255 }), a, b, c, ptr) + vec_mstrgb32(__typeof__(a), ((__typeof__(a)) vec_splat((__typeof__(a)){ 255 }, 0)), a, b, c, ptr) #define out_rgb24(a, b, c, ptr) vec_mstrgb24(a, b, c, ptr) #define out_bgr24(a, b, c, ptr) vec_mstbgr24(a, b, c, ptr) -- 2.29.2
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".