[Libav-user] Build tag n2.4 for armv7 with --disable-armv6 complaints link error

Zhang Rui bbcallen at gmail.com
Fri Sep 19 06:21:27 CEST 2014


Thank you for your reply, which is much more than I expected.


2014-09-19 5:31 GMT+08:00 Carl Eugen Hoyos <cehoyos at ag.or.at>:
> First and most important:
> Why are you using --enable-pic?
> I have heard different opinions, did you do any
> benchmarks? Is there anything that does not work
> without it?
> Should it be the default for iOS in your opinion?


I have no idea. I saw VLC and XBMC set it for ios, so I just follow them.
http://git.videolan.org/?p=vlc.git;a=blob;f=contrib/src/ffmpeg/rules.mak;hb=ffabc04f18611f362390b5acc95ee8a4bdcb3c23
https://github.com/xbmc/xbmc/blob/fb16fb8a8bef785409359148eab6d415f20d11db/tools/depends/target/ffmpeg/Makefile


>> --disable-gpl --disable-nonfree --enable-runtime-cpudetect
>> --disable-gray --enable-avcodec --enable-avformat
>> --enable-avutil --enable-swresample --enable-swscale
>> --disable-postproc --disable-avresample --enable-network
>> --enable-static --disable-shared --enable-optimizations
>> --enable-debug
> These are all default vales, your configure line gets
> easier to read if you remove them.


I'm not sure whether the default values could change in future,
I maintain some of them explicit in some kind of config file,
https://github.com/bbcallen/ijkplayer/blob/master/config/module-lite.sh,
and generate else from script for different arch.
That makes configure line overelaborate.


> (But see below for --disable-all, you will have to add
> all --enable options except avutil then.)


There is not ./configure --list-all to announce which options excatly
effected by --disable-all

I don't think I have enough knowledge to handle every options,
I only set what I expect and leave others as default value.
I thought --disable-all could disable some options I don't expect to
be disabled by chance.


>> --enable-version3
>
> I am nearly sure that this does something that you
> do not want.
> (The option does not change the binary but the license.)


Thank you, I thought it is something like --enable-gpl.


>> --disable-programs --disable-ffmpeg
>> --disable-ffplay --disable-ffprobe --disable-ffserver
>
> disable-programs implies the others, you can remove them.


Thanks, I didn't know that.


> But looking at the rest of you configure line, I suspect
> you actually want to start with --disable-all and enable
> the few features you want.
>
>> --disable-dxva2 --disable-vaapi --disable-vda
>> --disable-vdpau
>
> dxva2, vaapi and vdpau cannot be enabled for iOS, if vda
> would work, I suspect you would want it or not?


I'm afraid vda API only works on OS X, but not on iOS in normal way.
https://developer.apple.com/library/mac/technotes/tn2267/_index.html

FYI. There is a VideoToolBox api on iOS, which was private API,
and is released as public API on iOS8.
https://developer.apple.com/library/ios/releasenotes/General/iOS80APIDiffs/frameworks/VideoToolbox.html

There is also an implement in XBMC
https://github.com/xbmc/xbmc/blob/master/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp


>> --enable-decoder=aac --enable-decoder=aac_latm
>> --enable-decoder=ac3 --enable-decoder=flv ...
>
> You can use --enable-decoder=aac*,ac3,flv,...
> Similar for --enable-muxer=mpegts,mp4 and
> --enable-demuxer=aac,ac3,concat,... etc.


Thank you. I didn't know that kind of usage.


>> --disable-armv5te --disable-armv6
>> --disable-armv6t2 --arch=armv7 --enable-neon
>
> Can you explain this?
> Why are you disabling some optimizations for the
> arm target? I would have expected that the three
> disable options are not a good idea. What do I
> miss?
> (Removing them would also fix your linking issue
> I assume.)


I thought armv6 optimizations have nothing to do with armv7.
I've seen something in XBMC, like this:
ifeq ($(findstring arm, $(CPU)), arm)
ffmpg_config += --enable-pic --disable-armv5te --disable-armv6t2
endif
https://github.com/xbmc/xbmc/blob/fb16fb8a8bef785409359148eab6d415f20d11db/tools/depends/target/ffmpeg/Makefile

I'm not sure which arch/instruction optimizations depend on run time
detection while which are not.
Should I enable them all, or leave them as default.


>> --disable-symver
>
> Is this needed?
> If yes, it may indicate a bug.


Thanks, I must copied it from somewhere.


>> --cc='xcrun -sdk iphoneos clang' --extra-cflags=' -arch armv7
>> -miphoneos-version-min=5.1.1 ' --extra-cxxflags=' -arch armv7
>> -miphoneos-version-min=5.1.1 ' --extra-ldflags=' -arch armv7
>> -miphoneos-version-min=5.1.1 '"
>
> I believe the following is much simpler:
>
> --cc='xcrun -sdk iphoneos clang -arch armv7-miphoneos-version-min=5.1.1'
> Or does this not work? I usually test without xcrun.


Thanks. I think it would work.

Thanks again for your kindly, detailed reply.


More information about the Libav-user mailing list