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版本下载地址

相关推荐
时空自由民.13 小时前
音视频图片压缩
音视频
日取其半万世不竭14 小时前
PeerTube 部署指南:自建视频托管平台
云原生·eureka·音视频
luoqice14 小时前
FLV文件解析
音视频
byte轻骑兵16 小时前
【AVRCP】规范精讲[10]:链路管理器LM互操作规则与场景落地
人工智能·音视频·蓝牙·avrcp·音视频控制
luoqice16 小时前
RTMP视频流的帧格式分析
网络·ffmpeg
JK Chen17 小时前
faster_whisper,视频转文字,并生成字幕文件
python·whisper·音视频
老姚---老姚1 天前
编译支持HEVC/H.265 over RTMP / Enhanced RTMP 的 ffmpeg
ffmpeg·h.265·hevc·rtmp·enhanced
Prannt2 天前
星朗智能语音——语音合成——上传文件配音
ai·音视频·语音识别
byte轻骑兵2 天前
【AVRCP】规范精讲[7]: 打通AVCTP互操作底层,吃透事务标签与分片规则
人工智能·音视频·avrcp·音视频控制
EasyGBS2 天前
国标GB28181视频平台EasyGBS即将重磅新增WHIP推流功能!低延迟直播体验再升级
音视频