ffmpeg4.4.2 gcc 15.2.0 编译错误

编译环境

  • msys2 mingw64
  • gcc 15.2.0
  • ffmpeg 4.4.2

问题描述

复制代码
libavcodec/aacps.c:54:13: note: in a call to function 'hybrid2_re'
   54 | static void hybrid2_re(INTFLOAT (*in)[2], INTFLOAT (*out)[32][2], const INTFLOAT filter[8], int len, int reverse)
      |             ^~~~~~~~~~
CC      libavcodec/ac3_parser.o
C:\msys64\tmp\cc0klAyf.s: Assembler messages:
C:\msys64\tmp\cc0klAyf.s:326: Error: operand type mismatch for `shr'
C:\msys64\tmp\cc0klAyf.s:358: Error: operand type mismatch for `shr'
C:\msys64\tmp\cc0klAyf.s:620: Error: operand type mismatch for `shr'
C:\msys64\tmp\cc0klAyf.s:716: Error: operand type mismatch for `shr'
C:\msys64\tmp\cc0klAyf.s:860: Error: operand type mismatch for `shr'
C:\msys64\tmp\cc0klAyf.s:917: Error: operand type mismatch for `shr'
CC      libavcodec/ac3tab.o
make: *** [ffbuild/common.mak:67: libavcodec/aacps_common.o] Error 1
make: *** Waiting for unfinished jobs....
C:\msys64\tmp\ccJghkQE.s: Assembler messages:
C:\msys64\tmp\ccJghkQE.s:3336: Error: operand type mismatch for `shr'
C:\msys64\tmp\ccJghkQE.s:4412: Error: operand type mismatch for `shr'
C:\msys64\tmp\ccJghkQE.s:4569: Error: operand type mismatch for `shr'
C:\msys64\tmp\ccJghkQE.s:4674: Error: operand type mismatch for `shr'
C:\msys64\tmp\ccJghkQE.s:5080: Error: operand type mismatch for `shr'
C:\msys64\tmp\ccJghkQE.s:5165: Error: operand type mismatch for `shr'
C:\msys64\tmp\ccJghkQE.s:5283: Error: operand type mismatch for `shr'
C:\msys64\tmp\ccJghkQE.s:5356: Error: operand type mismatch for `shr'
C:\msys64\tmp\ccJghkQE.s:5459: Error: operand type mismatch for `shr'
C:\msys64\tmp\ccJghkQE.s:7660: Error: operand type mismatch for `shr'
C:\msys64\tmp\ccJghkQE.s:7805: Error: operand type mismatch for `shr'
make: *** [ffbuild/common.mak:67: libavcodec/aacdec.o] Error 1
C:\msys64\tmp\ccygYwPo.s: Assembler messages:
C:\msys64\tmp\ccygYwPo.s:1171: Error: operand type mismatch for `shr'
C:\msys64\tmp\ccygYwPo.s:1261: Error: operand type mismatch for `shr'
C:\msys64\tmp\ccygYwPo.s:1391: Error: operand type mismatch for `shr'
C:\msys64\tmp\ccygYwPo.s:1497: Error: operand type mismatch for `shr'
C:\msys64\tmp\ccygYwPo.s:1670: Error: operand type mismatch for `shr'
C:\msys64\tmp\ccygYwPo.s:1751: Error: operand type mismatch for `shr'
make: *** [ffbuild/common.mak:67: libavcodec/aacsbr.o] Error 1

解决方案

  • 方案一:禁用asm,但可能会影响性能

    ./configure --disable-asm --disable-inline-asm

  • 方案二:回退GCC版本(之前使用GCC 12.2.0编译成功过),但在msys2回退gcc太麻烦,依赖项很多,很容易把环境搞乱

  • 方案三:修改源码,官方有该问题的补丁,修改libavcodec/x86/mathops.h文件
    参考链接
    针对该问题的官方提交

  • 方案四:下载修复该问题的新版本,如ffmpeg 4.4.5\4.4.6等
    ffmpeg release版本下载地址

相关推荐
赖small强16 小时前
【音视频开发】CMOS Sensor图像采集原理及Linux主控ISP处理流程
linux·音视频·cmos·isp·v4l2
EasyCVR17 小时前
视频汇聚平台EasyCVR助力打造太阳能供电远程视频监控系统
音视频
北极光SD-WAN组网17 小时前
如何实现异地视频文件共享?组网技术的深度解析
开发语言·php·音视频
好游科技17 小时前
赋能私有化沟通:定制即时通讯与音视频系统助推企业数字化转型
音视频·社交软件·社交聊天软件开发·社交语音视频软件·私有化部署im即时通讯
萧鼎17 小时前
告别 PR!用 Python + MoviePy 自动化剪辑视频
python·自动化·音视频
rabbit_pro17 小时前
Java 执行FFmpeg命令
java·开发语言·ffmpeg
DO_Community18 小时前
碾压GPT-5,Qwen3-VL开源多模态新标杆:99.5%长视频定位准确率
人工智能·gpt·开源·llm·音视频
小白狮ww18 小时前
从几秒走向几分钟:长视频生成进入 LongCat 时刻
人工智能·深度学习·音视频·文生视频·图片处理·视频生成·图生视频
z***565618 小时前
从MySQL5.7平滑升级到MySQL8.0的最佳实践分享
ffmpeg
G311354227318 小时前
音视频互动 Demo、即时通信 IM 服务搭建
音视频