1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

swscale: Fix aarch64 and i386 compilation failures

This unbreaks builds after c1a0e65763,
which broke with errors like

src/libswscale/aarch64/rgb2rgb.c:66:25: error: incompatible function pointer types assigning to 'void (*)(const uint8_t *, uint8_t *, uint8_t *, uint8_t *, int, int, int, int, int, const int32_t *)' (aka 'void (*)(const unsigned char *, unsigned char *, unsigned char *, unsigned char *, int, int, int, int, int, const int *)') from 'void (const uint8_t *, uint8_t *, uint8_t *, uint8_t *, int, int, int, int, int, int32_t *)' (aka 'void (const unsigned char *, unsigned char *, unsigned char *, unsigned char *, int, int, int, int, int, int *)') [-Wincompatible-function-pointer-types]
   66 |         ff_rgb24toyv12  = rgb24toyv12;
      |                         ^ ~~~~~~~~~~~

and

src/libswscale/aarch64/swscale_unscaled.c:213:29: error: incompatible function pointer types assigning to 'SwsFunc' (aka 'int (*)(struct SwsContext *, const unsigned char *const *, const int *, int, int, unsigned char *const *, const int *)') from 'int (SwsContext *, const uint8_t *const *, const int *, int, int, const uint8_t **, const int *)' (aka 'int (struct SwsContext *, const unsigned char *const *, const int *, int, int, const unsigned char **, const int *)') [-Wincompatible-function-pointer-types]
  213 |         c->convert_unscaled = nv24_to_yuv420p_neon_wrapper;
      |                             ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö 2024-10-08 09:27:17 +03:00
parent 73b3344edd
commit b9145fcab2
3 changed files with 4 additions and 4 deletions

View File

@ -30,11 +30,11 @@
// Only handle width aligned to 16
void ff_rgb24toyv12_neon(const uint8_t *src, uint8_t *ydst, uint8_t *udst,
uint8_t *vdst, int width, int height, int lumStride,
int chromStride, int srcStride, int32_t *rgb2yuv);
int chromStride, int srcStride, const int32_t *rgb2yuv);
static void rgb24toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst,
uint8_t *vdst, int width, int height, int lumStride,
int chromStride, int srcStride, int32_t *rgb2yuv)
int chromStride, int srcStride, const int32_t *rgb2yuv)
{
int width_align = width & (~15);

View File

@ -150,7 +150,7 @@ void ff_nv24_to_yuv420p_chroma_neon(uint8_t *dst1, int dstStride1,
static int nv24_to_yuv420p_neon_wrapper(SwsContext *c, const uint8_t *const src[],
const int srcStride[], int srcSliceY, int srcSliceH,
const uint8_t *dst[], const int dstStride[])
uint8_t *const dst[], const int dstStride[])
{
uint8_t *dst1 = dst[1] + dstStride[1] * srcSliceY / 2;
uint8_t *dst2 = dst[2] + dstStride[2] * srcSliceY / 2;

View File

@ -1484,7 +1484,7 @@ static inline void planar2x_mmxext(const uint8_t *src, uint8_t *dst, int srcWidt
static inline void rgb24toyv12_mmxext(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
int width, int height,
int lumStride, int chromStride, int srcStride,
int32_t *rgb2yuv)
const int32_t *rgb2yuv)
{
#define BGR2Y_IDX "16*4+16*32"
#define BGR2U_IDX "16*4+16*33"