[x264-devel] [PATCH] ppc: use correct return type for pixel_sad* altivec functions

BugMaster BugMaster at narod.ru
Tue Mar 12 22:29:51 UTC 2024


On Mon, 11 Mar 2024 11:17:44 +0100, Dominik 'Rathann' Mierzejewski wrote:
> Applies to both master and stable branch, so please backport.

> Fixes the following error when building with GCC 14:
> ```
> common/ppc/pixel.c: In function ‘x264_8_pixel_init_altivec’:
> common/ppc/pixel.c:1576:31: error: assignment to
> ‘x264_pixel_cmp_x3_t’ {aka ‘void (*)(unsigned char *, unsigned char
> *, unsigned char *, unsigned char *, long int,  int *)’} from
> incompatible pointer type ‘int (*)(uint8_t *, uint8_t *, uint8_t *,
> uint8_t *, intptr_t,  int *)’ {aka ‘int (*)(unsigned char *,
> unsigned char *, unsigned char *, unsigned char *, long int,  int
> *)’} [-Wincompatible-pointer-types]
>  1576 |     pixf->sad_x3[PIXEL_8x16]  = pixel_sad_x3_8x16_altivec;
>       |                               ^
> common/ppc/pixel.c:1578:31: error: assignment to
> ‘x264_pixel_cmp_x3_t’ {aka ‘void (*)(unsigned char *, unsigned char
> *, unsigned char *, unsigned char *, long int,  int *)’} from
> incompatible pointer type ‘int (*)(uint8_t *, uint8_t *, uint8_t *,
> uint8_t *, intptr_t,  int *)’ {aka ‘int (*)(unsigned char *,
> unsigned char *, unsigned char *, unsigned char *, long int,  int
> *)’} [-Wincompatible-pointer-types]
>  1578 |     pixf->sad_x3[PIXEL_8x8]   = pixel_sad_x3_8x8_altivec;
>       |                               ^
> common/ppc/pixel.c:1581:31: error: assignment to
> ‘x264_pixel_cmp_x4_t’ {aka ‘void (*)(unsigned char *, unsigned char
> *, unsigned char *, unsigned char *, unsigned char *, long int,  int
> *)’} from incompatible pointer type ‘int (*)(uint8_t *, uint8_t *,
> uint8_t *, uint8_t *, uint8_t *, intptr_t,  int *)’ {aka ‘int
> (*)(unsigned char *, unsigned char *, unsigned char *, unsigned char
> *, unsigned char *, long int,  int *)’} [-Wincompatible-pointer-types]
>  1581 |     pixf->sad_x4[PIXEL_8x16]  = pixel_sad_x4_8x16_altivec;
>       |                               ^
> common/ppc/pixel.c:1583:31: error: assignment to
> ‘x264_pixel_cmp_x4_t’ {aka ‘void (*)(unsigned char *, unsigned char
> *, unsigned char *, unsigned char *, unsigned char *, long int,  int
> *)’} from incompatible pointer type ‘int (*)(uint8_t *, uint8_t *,
> uint8_t *, uint8_t *, uint8_t *, intptr_t,  int *)’ {aka ‘int
> (*)(unsigned char *, unsigned char *, unsigned char *, unsigned char
> *, unsigned char *, long int,  int *)’} [-Wincompatible-pointer-types]
>  1583 |     pixf->sad_x4[PIXEL_8x8]   = pixel_sad_x4_8x8_altivec;
>       |                               ^
> make: *** [Makefile:284: common/ppc/pixel-8.o] Error 1
> ```

Hi. Pushed modified fix to master. As for backport to stable - no,
because the stable is not real branch but more like trailing tag of
master branch, so it would be updated when it would be decided that
all other previous changes are also stable.



More information about the x264-devel mailing list