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

相关推荐
气泡音人声分离9 小时前
音频 Key 和 BPM 识别原理:歌曲调性和速度是如何分析出来的?
音视频·升降调·音频变速
海带紫菜菠萝汤12 小时前
WebCodecs API 实战:浏览器原生视频编解码的原理与性能测试
前端·javascript·音视频·视频编解码
kriston202613 小时前
2026音频指纹识别方案准确率对比:主流厂商差距与选型指南
音视频
薛定谔的猫-菜鸟程序员14 小时前
基于 Electron 的本地短视频解析与下载工具:架构设计与工程实践
java·electron·音视频
程序员大辉15 小时前
seedance2.0做的视频太贵?开源免费最佳替代方案:bernini生视频,ltx2.3来配音
音视频·视频大模型·ltx2.3·bernini
勿忘初心122116 小时前
【Windows流媒体实战1】FFmpeg+Nginx-RTMP Windows详细搭建教程
ffmpeg·nginx-rtmp·windows流媒体搭建·rtmp直播
AI星桥小王子16 小时前
镜头、角色、剧情自由把控,可控式 AI 视频工作台横向测评
人工智能·音视频
EasyDSS17 小时前
巡逻调度、应急呼叫、多路同屏——企业级融媒体平台EasyDSS一站式搞定园区安保所有音视频需求
音视频·媒体
hz5678917 小时前
应急管理部门跨部门会商用什么系统?指挥调度视频会议方案解析
网络·安全·音视频·实时音视频·信息与通信
人工智能研究所19 小时前
ResearchStudio-Reel: 学术论文到海报、视频、博客的“最后一公里“
人工智能·microsoft·音视频·博客·ppt·学术论文·ai创作