菜鸟教程小白 发表于 2022-12-12 20:36:42

ios - 无法为 armv7 和 armv7s 编译 FFMpeg


                                            <p><p>我已经尝试了几个最新的 FFMpeg 版本(2.1.4 和 2.2 rc2),但由于以下错误而无法编译:</p>

<pre><code>INSTALL libavformat/libavformat.a
ASlibavcodec/arm/vp8dsp_armv6.o
ARlibavresample/libavresample.a
CClibavcodec/ass_split.o
CClibavcodec/assdec.o
CClibavcodec/asv.o
CClibavcodec/asvdec.o
/Users/erikvillegas/Development/ffmpeg64/ffmpeg/libavcodec/arm/vp8dsp_armv6.S:2163:11: error: branch target out of range
      b vp8_put_epel_h6_armv6 + 4
          ^
/Users/erikvillegas/Development/ffmpeg64/ffmpeg/libavcodec/arm/vp8dsp_armv6.S:2181:11: error: branch target out of range
      b vp8_put_epel_v6_armv6 + 4
          ^
/Users/erikvillegas/Development/ffmpeg64/ffmpeg/libavcodec/arm/vp8dsp_armv6.S:2199:11: error: branch target out of range
      b vp8_put_epel_h6_armv6 + 4
          ^
/Users/erikvillegas/Development/ffmpeg64/ffmpeg/libavcodec/arm/vp8dsp_armv6.S:2217:11: error: branch target out of range
      b vp8_put_epel_v6_armv6 + 4
          ^
/Users/erikvillegas/Development/ffmpeg64/ffmpeg/libavcodec/arm/vp8dsp_armv6.S:2235:11: error: branch target out of range
      b vp8_put_epel_h4_armv6 + 4
          ^
/Users/erikvillegas/Development/ffmpeg64/ffmpeg/libavcodec/arm/vp8dsp_armv6.S:2253:11: error: branch target out of range
      b vp8_put_epel_v4_armv6 + 4
          ^
/Users/erikvillegas/Development/ffmpeg64/ffmpeg/libavcodec/arm/vp8dsp_armv6.S:2271:11: error: branch target out of range
      b vp8_put_epel_h6_armv6 + 4
          ^
/Users/erikvillegas/Development/ffmpeg64/ffmpeg/libavcodec/arm/vp8dsp_armv6.S:2289:11: error: branch target out of range
      b vp8_put_epel_v6_armv6 + 4
          ^
/Users/erikvillegas/Development/ffmpeg64/ffmpeg/libavcodec/arm/vp8dsp_armv6.S:2307:11: error: branch target out of range
      b vp8_put_epel_h4_armv6 + 4
          ^
/Users/erikvillegas/Development/ffmpeg64/ffmpeg/libavcodec/arm/vp8dsp_armv6.S:2325:11: error: branch target out of range
      b vp8_put_epel_v4_armv6 + 4
          ^
/Users/erikvillegas/Development/ffmpeg64/ffmpeg/libavcodec/arm/vp8dsp_armv6.S:2344:11: error: branch target out of range
      b vp8_put_bilin_h_armv6 + 4
          ^
/Users/erikvillegas/Development/ffmpeg64/ffmpeg/libavcodec/arm/vp8dsp_armv6.S:2362:11: error: branch target out of range
      b vp8_put_bilin_v_armv6 + 4
          ^
/Users/erikvillegas/Development/ffmpeg64/ffmpeg/libavcodec/arm/vp8dsp_armv6.S:2380:11: error: branch target out of range
      b vp8_put_bilin_h_armv6 + 4
          ^
/Users/erikvillegas/Development/ffmpeg64/ffmpeg/libavcodec/arm/vp8dsp_armv6.S:2398:11: error: branch target out of range
      b vp8_put_bilin_v_armv6 + 4
          ^
/Users/erikvillegas/Development/ffmpeg64/ffmpeg/libavcodec/arm/vp8dsp_armv6.S:2416:11: error: branch target out of range
      b vp8_put_bilin_h_armv6 + 4
          ^
/Users/erikvillegas/Development/ffmpeg64/ffmpeg/libavcodec/arm/vp8dsp_armv6.S:2434:11: error: branch target out of range
      b vp8_put_bilin_v_armv6 + 4
          ^
make: *** Error 1
</code></pre>

<p>问题在于 libavcodec 库。我可以为 arm64 和 x86_64 编译,但不能为 armv7 和 armv7s 编译。</p>

<p>我正在使用以下构建脚本:<a href="https://github.com/kewlbear/FFmpeg-iOS-build-script" rel="noreferrer noopener nofollow">https://github.com/kewlbear/FFmpeg-iOS-build-script</a> </p>

<p>有什么想法吗?</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p><code>./configure --disable-asm</code> 将摆脱这个错误。不过,它会全面禁用内联汇编代码,因此请注意性能/电池消耗。</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 无法为 armv7 和 armv7s 编译 FFMpeg,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/22487611/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/22487611/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 无法为 armv7 和 armv7s 编译 FFMpeg