Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译项目时 ffmpeg_arm64 指针类型报错 #5589

Open
whhwhhwhh opened this issue Apr 18, 2024 · 4 comments
Open

编译项目时 ffmpeg_arm64 指针类型报错 #5589

whhwhhwhh opened this issue Apr 18, 2024 · 4 comments

Comments

@whhwhhwhh
Copy link

CC libavcodec/aarch64/h264dsp_init_aarch64.o

libavcodec/aarch64/h264dsp_init_aarch64.c:84:38: error: incompatible function pointer types assigning to 'h264_weight_func' (aka 'void (*)(unsigned char *, long, int, int, int, int)') from 'void (uint8_t *, int, int, int, int, int)' (aka 'void (unsigned char *, int, int, int, int, int)') [-Wincompatible-function-pointer-types]

        c->weight_h264_pixels_tab[0] = ff_weight_h264_pixels_16_neon;

                                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

libavcodec/aarch64/h264dsp_init_aarch64.c:85:38: error: incompatible function pointer types assigning to 'h264_weight_func' (aka 'void (*)(unsigned char *, long, int, int, int, int)') from 'void (uint8_t *, int, int, int, int, int)' (aka 'void (unsigned char *, int, int, int, int, int)') [-Wincompatible-function-pointer-types]

        c->weight_h264_pixels_tab[1] = ff_weight_h264_pixels_8_neon;

                                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

libavcodec/aarch64/h264dsp_init_aarch64.c:86:38: error: incompatible function pointer types assigning to 'h264_weight_func' (aka 'void (*)(unsigned char *, long, int, int, int, int)') from 'void (uint8_t *, int, int, int, int, int)' (aka 'void (unsigned char *, int, int, int, int, int)') [-Wincompatible-function-pointer-types]

        c->weight_h264_pixels_tab[2] = ff_weight_h264_pixels_4_neon;

                                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

libavcodec/aarch64/h264dsp_init_aarch64.c:88:40: error: incompatible function pointer types assigning to 'h264_biweight_func' (aka 'void (*)(unsigned char *, unsigned char *, long, int, int, int, int, int)') from 'void (uint8_t *, uint8_t *, int, int, int, int, int, int)' (aka 'void (unsigned char *, unsigned char *, int, int, int, int, int, int)') [-Wincompatible-function-pointer-types]

        c->biweight_h264_pixels_tab[0] = ff_biweight_h264_pixels_16_neon;

                                       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

libavcodec/aarch64/h264dsp_init_aarch64.c:89:40: error: incompatible function pointer types assigning to 'h264_biweight_func' (aka 'void (*)(unsigned char *, unsigned char *, long, int, int, int, int, int)') from 'void (uint8_t *, uint8_t *, int, int, int, int, int, int)' (aka 'void (unsigned char *, unsigned char *, int, int, int, int, int, int)') [-Wincompatible-function-pointer-types]

        c->biweight_h264_pixels_tab[1] = ff_biweight_h264_pixels_8_neon;

                                       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

libavcodec/aarch64/h264dsp_init_aarch64.c:90:40: error: incompatible function pointer types assigning to 'h264_biweight_func' (aka 'void (*)(unsigned char *, unsigned char *, long, int, int, int, int, int)') from 'void (uint8_t *, uint8_t *, int, int, int, int, int, int)' (aka 'void (unsigned char *, unsigned char *, int, int, int, int, int, int)') [-Wincompatible-function-pointer-types]

        c->biweight_h264_pixels_tab[2] = ff_biweight_h264_pixels_4_neon;

                                       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

6 errors generated.
Screenshot 2024-04-16 at 17 12 07

@whhwhhwhh
Copy link
Author

请大佬帮忙看一下,这是我的电脑环境没配对,还是需要手动改一下指针类型?

@xo1988
Copy link

xo1988 commented Apr 24, 2024

找到do-compile-ffmpeg.sh 这个文件,

FFMPEG_CFLAGS=
FFMPEG_CFLAGS="$FFMPEG_CFLAGS -arch $FF_ARCH"
FFMPEG_CFLAGS="$FFMPEG_CFLAGS $FF_XCRUN_OSVERSION"
FFMPEG_CFLAGS="$FFMPEG_CFLAGS $FFMPEG_EXTRA_CFLAGS"
FFMPEG_CFLAGS="$FFMPEG_CFLAGS $FF_XCODE_BITCODE"
FFMPEG_CFLAGS="$FFMPEG_CFLAGS -Wno-error=incompatible-function-pointer-types" # 加上这个就能编译过了

我试了一下是可以的

@liuqianteng
Copy link

找到do-compile-ffmpeg.sh 这个文件,

FFMPEG_CFLAGS=
FFMPEG_CFLAGS="$FFMPEG_CFLAGS -arch $FF_ARCH"
FFMPEG_CFLAGS="$FFMPEG_CFLAGS $FF_XCRUN_OSVERSION"
FFMPEG_CFLAGS="$FFMPEG_CFLAGS $FFMPEG_EXTRA_CFLAGS"
FFMPEG_CFLAGS="$FFMPEG_CFLAGS $FF_XCODE_BITCODE"
FFMPEG_CFLAGS="$FFMPEG_CFLAGS -Wno-error=incompatible-function-pointer-types" # 加上这个就能编译过了

我加了之后,也没有用,还是报错。

@acruis
Copy link

acruis commented May 2, 2024

To add on, after adding -Wno-error=incompatible-function-pointer-types, I also faced some more errors related to int-conversion.

So you might also want to add -Wno-int-conversion:

FFMPEG_CFLAGS="$FFMPEG_CFLAGS -Wno-error=incompatible-function-pointer-types -Wno-int-conversion"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants