[vlc-devel] [vlc-commits] Revert "contrib: ffmpeg: add some cflags for arm/neon"
Måns Rullgård
mans at mansr.com
Wed Mar 21 19:34:01 CET 2012
Jean-Baptiste Kempf <jb at videolan.org> writes:
> On Wed, Mar 21, 2012 at 06:00:07PM +0200, Rémi Denis-Courmont wrote :
>> I undid the revert because HAVE_NEON is Android-specific. But there is
>> something seriously wrong with the naming here.
>
> Indeed. NEON exists on so many OSes.
>
>> Also selecting a specific CPU in flags does not seem like a very good idea.
>
> -mtune should be more appropriate, IMVHO.
-mtune also selects a specific CPU.
>> And I see no reasons why this should be FFmpeg-specific either.
>
> Because, I think, that Mans did advise to use -mcpu when compiling
> FFmpeg. But this does not belong to contrib/src/ffmpeg/rules.mak, if I
> may say so.
If you want to build for a generic ARMv7 target, use -march=armv7-a (or
pass --cpu=armv7-a to libav's configure). This produces code that runs
well on both A8 and A9. Specifying a specific CPU may result in
constructs harmful to other CPUs.
Android uses the soft-float ABI, so adding -mfloat-abi=softfp there
makes sense. For generic Linux (or other OSes), this flag must be
supplied by the user if the compiler default is not correct.
--
Måns Rullgård
mans at mansr.com
More information about the vlc-devel
mailing list