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

相关推荐
Black蜡笔小新22 分钟前
国密GB35114平台EasyGBS筑牢安防安全防线,GB28181/GB35114无缝接入
网络·安全·音视频·gb35114
川西胖墩墩3 小时前
文生视频AI工具深度评测:2024年主流视频生成模型的技术对比与创作指南
人工智能·数据挖掘·音视频
TSINGSEE4 小时前
国标GB28181视频质量诊断:EasyGBS服务插件EasyVQD快速识别花屏、蓝屏、画面冻结抖动
人工智能·音视频·实时音视频·视频编解码·视频质量诊断·花屏检测·画面抖动
XHW___0014 小时前
webrtc中音频3A处理开关配置
音视频·webrtc
愚公搬代码4 小时前
【愚公系列】《AI短视频创作一本通》012-AI 短视频分镜头设计(AI绘画提示词入门)
人工智能·ai作画·音视频
来鸟 鸣间5 小时前
linux下ffmpeg源码编译
linux·运维·ffmpeg
咸鱼永不翻身5 小时前
Unity视频资源压缩详解
unity·游戏引擎·音视频
Echo_NGC22375 小时前
【FFmpeg使用指南】Part 2:滤镜图架构与信号处理
架构·ffmpeg·音视频·信号处理
枫叶丹46 小时前
【Qt开发】Qt系统(十二)-> Qt视频
c语言·开发语言·c++·qt·音视频
Echo_NGC22376 小时前
【FFmpeg使用指南】Part 1:核心架构与媒体流处理
ffmpeg·音视频·媒体·视频