[FFmpeg-trac] #9077(swscale:open): Transparency wrong for yuv420 -> rgba on altivec

FFmpeg trac at avcodec.org
Sat Jan 23 18:32:27 EET 2021


#9077: Transparency wrong for yuv420 -> rgba on altivec
-------------------------------------+-----------------------------------
             Reporter:  pocock       |                    Owner:
                 Type:  defect       |                   Status:  open
             Priority:  normal       |                Component:  swscale
              Version:  git-master   |               Resolution:
             Keywords:  ppc altivec  |               Blocked By:
             Blocking:               |  Reproduced by developer:  1
Analyzed by developer:  0            |
-------------------------------------+-----------------------------------

Comment (by cehoyos):

 Feel free to test this change:
 {{{
 diff --git a/libswscale/ppc/yuv2rgb_altivec.c
 b/libswscale/ppc/yuv2rgb_altivec.c
 index 58e480d..eb6b3d7 100644
 --- a/libswscale/ppc/yuv2rgb_altivec.c
 +++ b/libswscale/ppc/yuv2rgb_altivec.c
 @@ -425,13 +425,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)) { 255, 255, 255, 255,
 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }), 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)) { 255, 255,
 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }),
 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)) { 255, 255,
 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }),
 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)) { 255, 255, 255, 255,
 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }), 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)

 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/9077#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list