[FFmpeg-devel] [PATCH 09/12] swscale/internal: constify SwsFunc

Sean McGovern gseanmcg at gmail.com
Mon Oct 7 23:53:41 EEST 2024


Hi,

On Sun, Oct 6, 2024 at 6:31 PM Michael Niedermayer
<michael at niedermayer.cc> wrote:
>
> On Sat, Oct 05, 2024 at 09:24:00PM +0200, Niklas Haas wrote:
> > From: Niklas Haas <git at haasn.dev>
> >
> > I want to move away from having random leaf processing functions mutate
> > plane pointers, and while we're at it, we might as well make the strides
> > and tables const as well.
> >
> > Sponsored-by: Sovereign Tech Fund
> > Signed-off-by: Niklas Haas <git at haasn.dev>
> > ---
> >  libswscale/aarch64/swscale_unscaled.c |  34 ++--
> >  libswscale/alphablend.c               |   6 +-
> >  libswscale/arm/swscale_unscaled.c     |  26 +--
> >  libswscale/bayer_template.c           |   4 +-
> >  libswscale/loongarch/yuv2rgb_lasx.c   |  12 +-
> >  libswscale/loongarch/yuv2rgb_lsx.c    |  12 +-
> >  libswscale/ppc/yuv2rgb_altivec.c      |  12 +-
> >  libswscale/rgb2rgb.c                  |   2 +-
> >  libswscale/rgb2rgb.h                  |   4 +-
> >  libswscale/rgb2rgb_template.c         |   2 +-
> >  libswscale/swscale_internal.h         |  12 +-
> >  libswscale/swscale_unscaled.c         | 242 +++++++++++++-------------
> >  libswscale/x86/yuv2rgb.c              |  54 +++---
> >  libswscale/yuv2rgb.c                  |   6 +-
> >  14 files changed, 220 insertions(+), 208 deletions(-)
>
> should be ok

Sorry for not checking this earlier, but PowerPC 32- and 64-bit builds
with AltiVec enabled now fail with:

src/libswscale/ppc/yuv2yuv_altivec.c: In function ‘ff_get_unscaled_swscale_ppc’:
src/libswscale/ppc/yuv2yuv_altivec.c:199:33: error: assignment to
‘SwsFunc’ {aka ‘int (*)(SwsContext *, const unsigned char * const*,
const int *, int,  int,  unsigned char * const*, const int *)’} from
incompatible pointer type ‘int (*)(SwsContext *, const uint8_t **, int
*, int,  int,  uint8_t **, int *)’ {aka ‘int (*)(SwsContext *, const
unsigned char **, int *, int,  int,  unsigned char **, int *)’}
[-Wincompatible-pointer-types]
  199 |             c->convert_unscaled = yv12toyuy2_unscaled_altivec;
      |                                 ^
src/libswscale/ppc/yuv2yuv_altivec.c:201:33: error: assignment to
‘SwsFunc’ {aka ‘int (*)(SwsContext *, const unsigned char * const*,
const int *, int,  int,  unsigned char * const*, const int *)’} from
incompatible pointer type ‘int (*)(SwsContext *, const uint8_t **, int
*, int,  int,  uint8_t **, int *)’ {aka ‘int (*)(SwsContext *, const
unsigned char **, int *, int,  int,  unsigned char **, int *)’}
[-Wincompatible-pointer-types]
  201 |             c->convert_unscaled = yv12touyvy_unscaled_altivec;
      |                                 ^
make: *** [src/ffbuild/common.mak:81: libswscale/ppc/yuv2yuv_altivec.o] Error 1

>
>
> thx
>
> [...]
>
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Modern terrorism, a quick summary: Need oil, start war with country that
> has oil, kill hundread thousand in war. Let country fall into chaos,
> be surprised about raise of fundamantalists. Drop more bombs, kill more
> people, be surprised about them taking revenge and drop even more bombs
> and strip your own citizens of their rights and freedoms. to be continued
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list