<div dir="ltr"><div class="im">>> If I compile with -mfpu=neon then FFmpeg blows up<br>>> with SIGILL (ILLOPTPC) when run on a non-Neon CPU. <br>>> If I compile with -mfpu=vfvp3 then FFmpeg runs fine,<br>
>> but presumably without the optimized code<br><br></div>> Did you test this? (with a debugger)<br>> I don't know but it seems very unlikely to me that a<br>> compiler option ("-mfpu=vfvp3") affects FFmpeg asm<br>
> optimizations.<br><div class="gmail_extra"><br></div><div class="gmail_extra">Not with a debugger - I'm not too handy with gdb - just by turning compiler options on and off in the hope of squeezing better performance from slower devices. I could be wrong but since -mfpu=neon always results in ILLOPTPC and other -mfpu options don't, it seemed logical to connect the two.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra" style>Here's my configuration and build output for Android's armeabi-v7a ABI ... perhaps I'm using a wrong combination of options?</div>
<div class="gmail_extra" style><br></div><div class="gmail_extra" style><br></div><div class="gmail_extra" style># ./configure --target-os=linux --arch=arm --cross-prefix=/Users/reuben/android/ndk/toolchains/arm-linux-androideabi-4.7/prebuilt/darwin-x86_64/bin/arm-linux-androideabi- --sysroot=/Users/reuben/android/ndk/platforms/android-8/arch-arm --disable-everything --enable-shared --disable-symver --enable-static --enable-gpl --enable-nonfree --disable-ffmpeg --disable-ffplay --disable-ffserver --disable-ffprobe --disable-encoders --disable-muxers --disable-devices --disable-protocols --enable-asm --arch=arm5te --enable-armv5te --enable-avfilter --enable-parser=mpeg4video --enable-parser=mpegaudio --enable-parser=mpegvideo --enable-demuxer=m4v --enable-parser=mov --enable-demuxer=avi --enable-demuxer=mov --enable-decoder=h264 --enable-parser=h264 --enable-demuxer=h264 --enable-decoder=aac --enable-parser=aac --enable-demuxer=aac --enable-decoder=mp3 --enable-demuxer=mp3 --enable-avresample --enable-filter=aconvert --enable-filter=atempo --enable-neon --prefix=/Users/reuben/work/pluralsight/android/app/jni/build/ffmpeg/armeabi-v7a --disable-doc --extra-cflags='-fPIC -DANDROID -DANDROID_NDK -std=c99 -march=armv7-a -mtune=cortex-a8 -mfpu=vfpv3 -O3 -Os -Wno-sign-compare -Wno-switch -Wno-pointer-sign' --extra-ldflags=<br>
</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style><br></div><div class="gmail_extra" style><div class="gmail_extra">C compiler /Users/reuben/android/ndk/toolchains/arm-linux-androideabi-4.7/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc</div>
<div class="gmail_extra">ARCH arm (armv7-a)</div><div class="gmail_extra">big-endian no</div><div class="gmail_extra">runtime cpu detection yes</div><div class="gmail_extra">ARMv5TE enabled yes</div>
<div class="gmail_extra">ARMv6 enabled yes</div><div class="gmail_extra">ARMv6T2 enabled yes</div><div class="gmail_extra">VFP enabled yes</div><div class="gmail_extra">NEON enabled yes</div>
<div class="gmail_extra">THUMB enabled no</div><div class="gmail_extra">debug symbols yes</div><div class="gmail_extra">strip symbols yes</div><div class="gmail_extra">optimize for size no</div>
<div class="gmail_extra">optimizations yes</div><div class="gmail_extra">static yes</div><div class="gmail_extra">shared yes</div><div class="gmail_extra">postprocessing support yes</div>
<div class="gmail_extra">new filter support yes</div><div class="gmail_extra">network support no</div><div class="gmail_extra">threading support pthreads</div><div class="gmail_extra">safe bitstream reader yes</div>
<div class="gmail_extra">SDL support no</div><div class="gmail_extra">texi2html enabled no</div><div class="gmail_extra">perl enabled yes</div><div class="gmail_extra">pod2man enabled yes</div>
<div class="gmail_extra">makeinfo enabled yes</div><div class="gmail_extra"><br></div><div class="gmail_extra">External libraries:</div><div class="gmail_extra">zlib</div><div class="gmail_extra"><br></div><div class="gmail_extra">
Enabled decoders:</div><div class="gmail_extra">aac<span class="" style="white-space:pre"> </span>h264<span class="" style="white-space:pre"> </span>mp3</div><div class="gmail_extra"><br></div><div class="gmail_extra">
Enabled encoders:</div><div class="gmail_extra"><br></div><div class="gmail_extra">Enabled hwaccels:</div><div class="gmail_extra"><br></div><div class="gmail_extra">Enabled parsers:</div><div class="gmail_extra">aac<span class="" style="white-space:pre"> </span>mpeg4video<span class="" style="white-space:pre"> </span>mpegvideo</div>
<div class="gmail_extra">h264<span class="" style="white-space:pre"> </span>mpegaudio</div><div class="gmail_extra"><br></div><div class="gmail_extra">Enabled demuxers:</div><div class="gmail_extra">aac<span class="" style="white-space:pre"> </span>h264<span class="" style="white-space:pre"> </span>mov</div>
<div class="gmail_extra">avi<span class="" style="white-space:pre"> </span>m4v<span class="" style="white-space:pre"> </span>mp3</div><div class="gmail_extra"><br></div><div class="gmail_extra">Enabled muxers:</div><div class="gmail_extra">
<br></div><div class="gmail_extra">Enabled protocols:</div><div class="gmail_extra"><br></div><div class="gmail_extra">Enabled filters:</div><div class="gmail_extra">aconvert<span class="" style="white-space:pre"> </span>atempo</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Enabled bsfs:</div><div class="gmail_extra"><br></div><div class="gmail_extra">Enabled indevs:</div><div class="gmail_extra"><br></div><div class="gmail_extra">Enabled outdevs:</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">License: nonfree and unredistributable</div><div class="gmail_extra">Creating config.mak and config.h...</div><div class="gmail_extra">libavutil/avconfig.h is unchanged</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">WARNING: /Users/reuben/android/ndk/toolchains/arm-linux-androideabi-4.7/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-pkg-config not found, library detection may fail.</div>
<div class="gmail_extra">CC<span class="" style="white-space:pre"> </span>libavdevice/alldevices.o</div><div class="gmail_extra"><br></div><div class="gmail_extra">...</div></div><div class="gmail_extra" style><br></div><div class="gmail_extra" style>
<br></div><div class="gmail_extra"> <br><br><div class="gmail_quote">On Thu, Apr 11, 2013 at 5:48 PM, Carl Eugen Hoyos <span dir="ltr"><<a href="mailto:cehoyos@ag.or.at" target="_blank">cehoyos@ag.or.at</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">Reuben Scratton <reuben.scratton@...> writes:<br>
<br>
> If I compile with -mfpu=neon then FFmpeg blows up<br>
> with SIGILL (ILLOPTPC) when run on a non-Neon CPU. <br>
<br>
> If I compile with -mfpu=vfvp3 then FFmpeg runs fine,<br>
> but presumably without the optimized code<br>
<br>
</div>Did you test this? (with a debugger)<br>
I don't know but it seems very unlikely to me that a<br>
compiler option ("-mfpu=vfvp3") affects FFmpeg asm<br>
optimizations.<br>
<br>
[...]<br>
<div class="im"><br>
> Would it be possible for FFmpeg to detect Neon at runtime?<br>
<br>
</div>Looking at ff_dsputil_init_arm() in<br>
libavcodec/arm/dsputil_init_arm.c, that is exactly what it<br>
currently does.<br>
<br>
Carl Eugen<br>
<br>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
</blockquote></div><br></div></div>