--shlibdir=DIR install shared libs in DIR [PREFIX/lib]
--incdir=DIR install includes in DIR [PREFIX/include]
--mandir=DIR install man page in DIR [PREFIX/share/man]
+ --enable-rpath use rpath when linking programs [USE WITH CARE]
Licensing options:
--enable-gpl allow use of GPL code, the resulting libs
--disable-mdct disable MDCT code
--disable-rdft disable RDFT code
--disable-fft disable FFT code
+ --disable-faan disable floating point AAN (I)DCT code
Hardware accelerators:
+ --enable-d3d11va enable D3D11VA code
--enable-dxva2 enable DXVA2 code
--enable-vaapi enable VAAPI code
--enable-vda enable VDA code
--enable-libcdio enable audio CD grabbing with libcdio
--enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
and libraw1394 [no]
+ --enable-libdcadec enable DCA decoding via libdcadec [no]
--enable-libfaac enable AAC encoding via libfaac [no]
--enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
--enable-libfreetype enable libfreetype [no]
--enable-libgsm enable GSM de/encoding via libgsm [no]
--enable-libilbc enable iLBC de/encoding via libilbc [no]
+ --enable-libmfx enable HW acceleration through libmfx
--enable-libmp3lame enable MP3 encoding via libmp3lame [no]
--enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no]
--enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no]
--enable-libopencv enable video filtering via libopencv [no]
+ --enable-libopenh264 enable H.264 encoding via OpenH264 [no]
--enable-libopenjpeg enable JPEG 2000 de/encoding via OpenJPEG [no]
--enable-libopus enable Opus de/encoding via libopus [no]
--enable-libpulse enable Pulseaudio input via libpulse [no]
--enable-libx264 enable H.264 encoding via x264 [no]
--enable-libx265 enable HEVC encoding via x265 [no]
--enable-libxavs enable AVS encoding via xavs [no]
+ --enable-libxcb enable X11 grabbing using XCB [no]
+ --enable-libxcb-shm enable X11 grabbing shm communication [auto]
+ --enable-libxcb-xfixes enable X11 grabbing mouse rendering [auto]
--enable-libxvid enable Xvid encoding via xvidcore,
native MPEG-4/Xvid encoder exists [no]
+ --enable-mmal enable decoding via MMAL [no]
--enable-openssl enable openssl [no]
- --enable-x11grab enable X11 grabbing [no]
+ --enable-x11grab enable X11 grabbing (legacy) [no]
--enable-zlib enable zlib [autodetect]
Toolchain options:
(group) and PROB the probability associated with
NAME (default 0.5).
--random-seed=VALUE seed value for --enable/disable-random
+ --disable-valgrind-backtrace do not print a backtrace under Valgrind
+ (only applies to --disable-optimizations builds)
NOTE: Object files are built at the place where configure is launched.
EOF
log check_host_cpp "$@"
cat > $TMPC
log_file $TMPC
- check_cmd $host_cc $HOSTCPPFLAGS $HOSTCFLAGS "$@" $(hostcc_e $TMPO) $TMPC
+ check_cmd $host_cc $host_cppflags $host_cflags "$@" $(hostcc_e $TMPO) $TMPC
}
check_host_cppflags(){
filter_audio_example
metadata_example
output_example
+ qsvdec_example
transcode_aac_example
"
libbs2b
libcdio
libdc1394
+ libdcadec
libfaac
libfdk_aac
libfontconfig
libfreetype
libgsm
libilbc
+ libmfx
libmp3lame
libopencore_amrnb
libopencore_amrwb
libopencv
+ libopenh264
libopenjpeg
libopus
libpulse
libx264
libx265
libxavs
+ libxcb
+ libxcb_shm
+ libxcb_xfixes
libxvid
+ mmal
openssl
x11grab
zlib
"
HWACCEL_LIST="
+ d3d11va
dxva2
vaapi
vda
dct
doc
error_resilience
+ faan
fft
lsp
lzo
pod2man
texi2html
thumb
+ valgrind_backtrace
xmm_clobber_test
"
dev_video_meteor_ioctl_meteor_h
direct_h
dlfcn_h
+ d3d11_h
dxva_h
gsm_h
io_h
sys_un_h
sys_videoio_h
unistd_h
+ valgrind_valgrind_h
windows_h
winsock2_h
"
SYSTEM_FUNCS="
aligned_malloc
+ clock_gettime
closesocket
CommandLineToArgvW
CoTaskMemFree
getservbyport
GetSystemTimeAsFileTime
gettimeofday
+ gmtime_r
inet_aton
isatty
jack_port_get_latency_range
setrlimit
Sleep
strerror_r
- strptime
sysconf
sysctl
usleep
TOOLCHAIN_FEATURES="
as_dn_directive
as_func
+ as_object_arch
asm_mod_q
attribute_may_alias
attribute_packed
"
TYPES_LIST="
+ CONDITION_VARIABLE_Ptr
+ DXVA_PicParams_HEVC
socklen_t
struct_addrinfo
struct_group_source_req
$TYPES_LIST
atomics_native
dos_paths
+ d3d11_cobj
+ d3d11va_lib
dxva2_lib
libc_msvcrt
libdc1394_1
libdc1394_2
sdl
+ section_data_rel_ro
threads
+ vaapi_x11
vdpau_x11
xlib
"
bswapdsp
cabac
dvprofile
+ faandct
+ faanidct
fdctdsp
+ fmtconvert
gcrypt
golomb
gplv3
huffyuvencdsp
idctdsp
iirfilter
+ imdct15
intrax8
+ jpegtables
lgplv3
lpc
me_cmp
nettle
pixblockdsp
qpeldsp
+ qsv
+ qsvdec
+ qsvenc
rangecoder
riffdec
riffenc
tpeldsp
videodsp
vp3dsp
+ wma_freqs
"
CMDLINE_SELECT="
logging
lto
optimizations
+ rpath
"
PATHS_LIST="
simd_align_16_if_any="altivec neon sse"
# system capabilities
-log2_deps="!libc_msvcrt"
-
symver_if_any="symver_asm_label symver_gnu_asm"
+valgrind_backtrace_deps="!optimizations valgrind_valgrind_h"
# threading support
atomics_gcc_if="sync_val_compare_and_swap"
# subsystems
dct_select="rdft"
error_resilience_select="me_cmp"
+faandct_deps="faan fdctdsp"
+faanidct_deps="faan idctdsp"
intrax8_select="error_resilience"
mdct_select="fft"
rdft_select="fft"
mpegaudiodsp_select="dct"
mpegvideo_select="blockdsp hpeldsp idctdsp me_cmp videodsp"
mpegvideoenc_select="me_cmp mpegvideo pixblockdsp qpeldsp"
+qsvdec_select="qsv"
+qsvenc_select="qsv"
# decoders / encoders
-aac_decoder_select="mdct sinewin"
+aac_decoder_select="imdct15 mdct sinewin"
aac_encoder_select="audio_frame_queue iirfilter mdct sinewin"
aac_latm_decoder_select="aac_decoder aac_latm_parser"
-ac3_decoder_select="ac3_parser ac3dsp bswapdsp mdct"
+ac3_decoder_select="ac3_parser ac3dsp bswapdsp fmtconvert mdct"
ac3_encoder_select="ac3dsp audiodsp mdct me_cmp"
ac3_fixed_encoder_select="ac3dsp audiodsp mdct me_cmp"
aic_decoder_select="golomb idctdsp"
atrac3_decoder_select="mdct"
atrac3p_decoder_select="mdct sinewin"
bink_decoder_select="blockdsp hpeldsp"
-binkaudio_dct_decoder_select="mdct rdft dct sinewin"
-binkaudio_rdft_decoder_select="mdct rdft sinewin"
+binkaudio_dct_decoder_select="mdct rdft dct sinewin wma_freqs"
+binkaudio_rdft_decoder_select="mdct rdft sinewin wma_freqs"
cavs_decoder_select="blockdsp golomb h264chroma idctdsp qpeldsp videodsp"
cllc_decoder_select="bswapdsp"
comfortnoise_encoder_select="lpc"
cook_decoder_select="audiodsp mdct sinewin"
cscd_decoder_select="lzo"
cscd_decoder_suggest="zlib"
-dca_decoder_select="mdct"
+dca_decoder_select="fmtconvert mdct"
dnxhd_decoder_select="blockdsp idctdsp"
dnxhd_encoder_select="aandcttables blockdsp fdctdsp idctdsp mpegvideoenc pixblockdsp"
dvvideo_decoder_select="dvprofile idctdsp"
fourxm_decoder_select="blockdsp bswapdsp"
fraps_decoder_select="bswapdsp huffman"
g2m_decoder_deps="zlib"
-g2m_decoder_select="blockdsp idctdsp"
+g2m_decoder_select="blockdsp idctdsp jpegtables"
h261_decoder_select="mpeg_er mpegvideo"
h261_encoder_select="aandcttables mpegvideoenc"
h263_decoder_select="error_resilience h263_parser h263dsp mpeg_er mpegvideo qpeldsp"
h263p_encoder_select="h263_encoder"
h264_decoder_select="cabac golomb h264chroma h264dsp h264pred h264qpel startcode videodsp"
h264_decoder_suggest="error_resilience"
+h264_qsv_decoder_deps="libmfx"
+h264_qsv_decoder_select="h264_mp4toannexb_bsf h264_parser qsvdec h264_qsv_hwaccel"
+h264_qsv_encoder_deps="libmfx"
+h264_qsv_encoder_select="qsvenc"
hevc_decoder_select="bswapdsp cabac golomb videodsp"
huffyuv_decoder_select="bswapdsp huffyuvdsp"
huffyuv_encoder_select="bswapdsp huffman huffyuvencdsp"
jpegls_encoder_select="golomb"
jv_decoder_select="blockdsp"
lagarith_decoder_select="huffyuvdsp"
-ljpeg_encoder_select="aandcttables idctdsp"
+ljpeg_encoder_select="aandcttables idctdsp jpegtables"
loco_decoder_select="golomb"
mdec_decoder_select="blockdsp idctdsp mpegvideo"
metasound_decoder_select="lsp mdct sinewin"
mimic_decoder_select="blockdsp bswapdsp hpeldsp idctdsp"
-mjpeg_decoder_select="blockdsp hpeldsp idctdsp"
-mjpeg_encoder_select="aandcttables mpegvideoenc"
+mjpeg_decoder_select="blockdsp hpeldsp idctdsp jpegtables"
+mjpeg_encoder_select="aandcttables jpegtables mpegvideoenc"
mjpegb_decoder_select="mjpeg_decoder"
mlp_decoder_select="mlp_parser"
motionpixels_decoder_select="bswapdsp"
nuv_decoder_select="idctdsp lzo"
on2avc_decoder_select="mdct"
opus_decoder_deps="avresample"
+opus_decoder_select="imdct15"
png_decoder_deps="zlib"
png_encoder_deps="zlib"
png_encoder_select="huffyuvencdsp"
svq3_decoder_select="h264_decoder hpeldsp tpeldsp"
svq3_decoder_suggest="zlib"
tak_decoder_select="audiodsp"
+tdsc_decoder_deps="zlib"
+tdsc_decoder_select="mjpeg_decoder"
theora_decoder_select="vp3_decoder"
thp_decoder_select="mjpeg_decoder"
tiff_decoder_suggest="zlib"
vp8_decoder_select="h264pred videodsp"
vp9_decoder_select="videodsp"
webp_decoder_select="vp8_decoder"
-wmapro_decoder_select="mdct sinewin"
-wmav1_decoder_select="mdct sinewin"
-wmav1_encoder_select="mdct sinewin"
-wmav2_decoder_select="mdct sinewin"
-wmav2_encoder_select="mdct sinewin"
+wmapro_decoder_select="mdct sinewin wma_freqs"
+wmav1_decoder_select="mdct sinewin wma_freqs"
+wmav1_encoder_select="mdct sinewin wma_freqs"
+wmav2_decoder_select="mdct sinewin wma_freqs"
+wmav2_encoder_select="mdct sinewin wma_freqs"
wmavoice_decoder_select="lsp rdft dct mdct sinewin"
wmv1_decoder_select="h263_decoder"
wmv1_encoder_select="h263_encoder"
zmbv_encoder_deps="zlib"
# hardware accelerators
+d3d11va_deps="d3d11_h dxva_h"
dxva2_deps="dxva2api_h"
vaapi_deps="va_va_h"
vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads"
h263_vaapi_hwaccel_select="h263_decoder"
h263_vdpau_hwaccel_deps="vdpau"
h263_vdpau_hwaccel_select="h263_decoder"
+h264_d3d11va_hwaccel_deps="d3d11va"
+h264_d3d11va_hwaccel_select="h264_decoder"
h264_dxva2_hwaccel_deps="dxva2"
h264_dxva2_hwaccel_select="h264_decoder"
+h264_mmal_decoder_deps="mmal"
+h264_mmal_hwaccel_deps="mmal"
+h264_mmal_decoder_select="h264_decoder"
+h264_mmal_encoder_deps="mmal"
+h264_qsv_hwaccel_deps="libmfx"
h264_vaapi_hwaccel_deps="vaapi"
h264_vaapi_hwaccel_select="h264_decoder"
h264_vda_hwaccel_deps="vda"
h264_vda_old_hwaccel_select="h264_decoder"
h264_vdpau_hwaccel_deps="vdpau"
h264_vdpau_hwaccel_select="h264_decoder"
+hevc_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_HEVC"
+hevc_d3d11va_hwaccel_select="hevc_decoder"
+hevc_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_HEVC"
+hevc_dxva2_hwaccel_select="hevc_decoder"
mpeg1_vdpau_hwaccel_deps="vdpau"
mpeg1_vdpau_hwaccel_select="mpeg1video_decoder"
+mpeg2_d3d11va_hwaccel_deps="d3d11va"
+mpeg2_d3d11va_hwaccel_select="mpeg2video_decoder"
mpeg2_dxva2_hwaccel_deps="dxva2"
mpeg2_dxva2_hwaccel_select="mpeg2video_decoder"
mpeg2_vaapi_hwaccel_deps="vaapi"
mpeg4_vaapi_hwaccel_select="mpeg4_decoder"
mpeg4_vdpau_hwaccel_deps="vdpau"
mpeg4_vdpau_hwaccel_select="mpeg4_decoder"
+vc1_d3d11va_hwaccel_deps="d3d11va"
+vc1_d3d11va_hwaccel_select="vc1_decoder"
vc1_dxva2_hwaccel_deps="dxva2"
vc1_dxva2_hwaccel_select="vc1_decoder"
vc1_vaapi_hwaccel_deps="vaapi"
vc1_vaapi_hwaccel_select="vc1_decoder"
vc1_vdpau_hwaccel_deps="vdpau"
vc1_vdpau_hwaccel_select="vc1_decoder"
+wmv3_d3d11va_hwaccel_select="vc1_d3d11va_hwaccel"
wmv3_dxva2_hwaccel_select="vc1_dxva2_hwaccel"
wmv3_vaapi_hwaccel_select="vc1_vaapi_hwaccel"
wmv3_vdpau_hwaccel_select="vc1_vdpau_hwaccel"
h264_parser_select="h264_decoder"
mpegvideo_parser_select="mpegvideo"
mpeg4video_parser_select="error_resilience h263dsp mpeg_er mpegvideo qpeldsp"
-vc1_parser_select="mpegvideo startcode"
+vc1_parser_select="mpegvideo startcode vc1_decoder"
+
+# bitstream_filters
+mjpeg2jpeg_bsf_select="jpegtables"
# external libraries
+libdcadec_decoder_deps="libdcadec"
libfaac_encoder_deps="libfaac"
libfaac_encoder_select="audio_frame_queue"
libfdk_aac_decoder_deps="libfdk_aac"
libopencore_amrnb_encoder_deps="libopencore_amrnb"
libopencore_amrnb_encoder_select="audio_frame_queue"
libopencore_amrwb_decoder_deps="libopencore_amrwb"
+libopenh264_encoder_deps="libopenh264"
libopenjpeg_decoder_deps="libopenjpeg"
libopenjpeg_encoder_deps="libopenjpeg"
libopus_decoder_deps="libopus"
avisynth_demuxer_deps="avisynth"
avisynth_demuxer_select="riffdec"
caf_demuxer_select="riffdec"
+dash_muxer_select="mp4_muxer"
dirac_demuxer_select="dirac_parser"
dv_demuxer_select="dvprofile"
dv_muxer_select="dvprofile"
mxf_d10_muxer_select="mxf_muxer"
nut_muxer_select="riffenc"
nuv_demuxer_select="riffdec"
+oga_muxer_select="ogg_muxer"
ogg_demuxer_select="golomb"
+opus_muxer_select="ogg_muxer"
psp_muxer_select="mov_muxer"
rtp_demuxer_select="sdp_demuxer"
-rtpdec_select="asf_demuxer rm_demuxer rtp_protocol mpegts_demuxer mov_demuxer"
+rtpdec_select="asf_demuxer jpegtables mov_demuxer mpegts_demuxer rm_demuxer rtp_protocol"
rtsp_demuxer_select="http_protocol rtpdec"
rtsp_muxer_select="rtp_muxer http_protocol rtp_protocol rtpenc_chain"
sap_demuxer_select="sdp_demuxer"
sdp_demuxer_select="rtpdec"
smoothstreaming_muxer_select="ismv_muxer"
spdif_muxer_select="aac_parser"
+spx_muxer_select="ogg_muxer"
tak_demuxer_select="tak_parser"
tg2_muxer_select="mov_muxer"
tgp_muxer_select="mov_muxer"
v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h"
vfwcap_indev_deps="capCreateCaptureWindow vfwcap_defines"
vfwcap_indev_extralibs="-lavicap32"
-x11grab_indev_deps="x11grab XShmCreateImage"
+x11grab_indev_deps="x11grab"
+x11grab_xcb_indev_deps="libxcb"
# protocols
ffrtmpcrypt_protocol_deps="!librtmp_protocol"
sctp_protocol_select="network"
srtp_protocol_select="rtp_protocol"
tcp_protocol_select="network"
-tls_protocol_deps_any="openssl gnutls"
+tls_gnutls_protocol_deps="gnutls"
+tls_openssl_protocol_deps="openssl !tls_gnutls_protocol"
+tls_protocol_deps_any="tls_gnutls_protocol tls_openssl_protocol"
tls_protocol_select="tcp_protocol"
udp_protocol_select="network"
unix_protocol_deps="sys_un_h"
filter_audio_example_deps="avfilter avutil"
metadata_example_deps="avformat avutil"
output_example_deps="avcodec avformat avutil swscale"
+qsvdec_example_deps="avcodec avutil libmfx h264_qsv_decoder vaapi_x11"
transcode_aac_example_deps="avcodec avformat avresample"
# libraries, in linking order
setpts_filter trim_filter"
avplay_deps="avcodec avformat avresample swscale sdl"
avplay_libs='$sdl_libs'
-avplay_select="rdft"
+avplay_select="rdft transpose_filter hflip_filter vflip_filter"
avprobe_deps="avcodec avformat"
# documentation
strip="strip"
yasmexe="yasm"
-nogas=":"
-
# machine
arch_default=$(uname -m)
cpu="generic"
enable asm
enable debug
enable doc
+enable faan faandct faanidct
enable optimizations
enable safe_bitstream_reader
enable static
enable swscale_alpha
+enable valgrind_backtrace
# By default, enable only those hwaccels that have no external dependencies.
-enable dxva2 vdpau
+enable d3d11va dxva2 vda vdpau
# build settings
SHFLAGS='-shared -Wl,-soname,$$(@F)'
echo "# $0 $LIBAV_CONFIGURATION" > $logfile
set >> $logfile
-test -n "$cross_prefix" && enable cross_compile
-
-if enabled cross_compile; then
- test -n "$arch" && test -n "$target_os" ||
- die "Must specify target arch and OS when cross-compiling"
-fi
-
-ar_default="${cross_prefix}${ar_default}"
-cc_default="${cross_prefix}${cc_default}"
-nm_default="${cross_prefix}${nm_default}"
-pkg_config_default="${cross_prefix}${pkg_config_default}"
-ranlib="${cross_prefix}${ranlib}"
-strip="${cross_prefix}${strip}"
-
-sysinclude_default="${sysroot}/usr/include"
-
case "$toolchain" in
clang-asan)
cc_default="clang"
add_ldflags -fprofile-arcs -ftest-coverage
;;
hardened)
- add_cflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all
- add_ldflags -Wl,-z,relro -Wl,-z,now
+ add_cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
+ add_cflags -fno-strict-overflow -fstack-protector-all
+ add_ldflags -Wl,-z,relro -Wl,-z,now
;;
?*)
die "Unknown toolchain $toolchain"
;;
esac
+test -n "$cross_prefix" && enable cross_compile
+
+if enabled cross_compile; then
+ test -n "$arch" && test -n "$target_os" ||
+ die "Must specify target arch and OS when cross-compiling"
+fi
+
+ar_default="${cross_prefix}${ar_default}"
+cc_default="${cross_prefix}${cc_default}"
+nm_default="${cross_prefix}${nm_default}"
+pkg_config_default="${cross_prefix}${pkg_config_default}"
+ranlib="${cross_prefix}${ranlib}"
+strip="${cross_prefix}${strip}"
+
+sysinclude_default="${sysroot}/usr/include"
+
set_default arch cc pkg_config sysinclude target_exec target_os
enabled cross_compile || host_cc_default=$cc
set_default host_cc
die "Sanity test failed."
fi
+armasm_flags(){
+ for flag; do
+ case $flag in
+ # Filter out MSVC cl.exe options from cflags that shouldn't
+ # be passed to gas-preprocessor
+ -M[TD]*) ;;
+ *) echo $flag ;;
+ esac
+ done
+}
+
ccc_flags(){
for flag; do
case $flag in
-lavifil32) echo vfw32.lib ;;
-lavicap32) echo vfw32.lib user32.lib ;;
-l*) echo ${flag#-l}.lib ;;
+ -L*) echo -libpath:${flag#-L} ;;
*) echo $flag ;;
esac
done
-Wall) echo -W4 -wd4244 -wd4127 -wd4018 -wd4389 \
-wd4146 -wd4057 -wd4204 -wd4706 -wd4305 \
-wd4152 -wd4324 -we4013 -wd4100 -wd4214 \
- -wd4273 ;;
+ -wd4273 -wd4554 -wd4701 ;;
esac
done
}
_cflags_size="-O2 -Munroll=c:1 $opt_common"
_cflags_noopt="-O1"
_flags_filter=pgi_flags
+ elif $_cc 2>&1 | grep -q 'Microsoft.*ARM.*Assembler'; then
+ _type=armasm
+ _ident=$($_cc | head -n1)
+ # 4509: "This form of conditional instruction is deprecated"
+ _flags="-nologo -ignore 4509"
+ _flags_filter=armasm_flags
elif $_cc 2>&1 | grep -q Microsoft; then
_type=msvc
- _ident=$($cc 2>&1 | head -n1)
+ _ident=$($_cc 2>&1 | head -n1)
_DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>&1 | awk '\''/including/ { sub(/^.*file: */, ""); gsub(/\\/, "/"); if (!match($$0, / /)) print "$@:", $$0 }'\'' > $(@:.o=.d)'
_DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -showIncludes -Zs'
_cflags_speed="-O2"
fi
elif $_cc 2>&1 | grep -q Intel; then
_type=icl
- _ident=$($cc 2>&1 | head -n1)
+ _ident=$($_cc 2>&1 | head -n1)
_depflags='-QMMD -QMF$(@:.o=.d) -QMT$@'
# Not only is O3 broken on 13.x+ but it is slower on all previous
# versions (tested) as well.
elif check_arm_arch 6T2; then echo armv6t2;
elif check_arm_arch 7; then echo armv7;
elif check_arm_arch 7A 7_A; then echo armv7-a;
+ elif check_arm_arch 7S; then echo armv7-a;
elif check_arm_arch 7R 7_R; then echo armv7-r;
elif check_arm_arch 7M 7_M; then echo armv7-m;
elif check_arm_arch 7EM 7E_M; then echo armv7-m;
case $cpu in
i[345]86|pentium)
cpuflags="-march=$cpu"
+ disable i686
disable mmx
;;
# targets that do NOT support nopl and conditional mov (cmov)
;;
android)
disable symver
+ enable section_data_rel_ro
SLIB_INSTALL_NAME='$(SLIBNAME)'
SLIB_INSTALL_LINKS=
# soname not set on purpose
add_extralibs -lpoll -lgnugetopt
;;
darwin)
- gas="gas-preprocessor.pl $cc"
enabled ppc && add_asflags -force_cpusubtype_ALL
SHFLAGS='-dynamiclib -Wl,-single_module -Wl,-install_name,$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR),-current_version,$(LIBVERSION),-compatibility_version,$(LIBMAJOR)'
enabled x86_32 && append SHFLAGS -Wl,-read_only_relocs,suppress
;;
linux)
enable dv1394
+ enable section_data_rel_ro
;;
irix*)
target_os=irix
elif check_${pfx}cpp_condition sys/brand.h "defined LABELED_BRAND_NAME"; then
eval ${pfx}libc_type=solaris
add_${pfx}cppflags -D__EXTENSIONS__ -D_XOPEN_SOURCE=600
+ else
+ eval ${pfx}libc_type=default
+ add_${pfx}cppflags -D_DEFAULT_SOURCE
fi
}
return 0
}
-if enabled asm; then
- enabled arm aarch64 && nogas=die
+if enabled_any arm aarch64 || enabled_all ppc altivec && enabled asm; then
+ nogas=:
+ enabled_any arm aarch64 && nogas=die
enabled_all ppc altivec && nogas=warn
+ as_noop=-v
+
+ case $as_type in
+ arm*) gaspp_as_type=armasm; as_noop=-h ;;
+ gcc) gaspp_as_type=gas ;;
+ *) gaspp_as_type=$as_type ;;
+ esac
+
+ [ $target_os = "darwin" ] && gaspp_as_type="apple-$gaspp_as_type"
+
+ check_cmd gas-preprocessor.pl -arch $arch -as-type $gaspp_as_type -- $as $as_noop &&
+ gas="gas-preprocessor.pl -arch $arch -as-type $gaspp_as_type -- $as"
if ! check_gas ; then
as=${gas:=$as}
check_gas || \
- $nogas "GNU assembler not found, install gas-preprocessor"
+ $nogas "GNU assembler not found, install/update gas-preprocessor"
fi
check_as <<EOF && enable as_func
check_as <<EOF && enable as_dn_directive
ra .dn d0.i16
.unreq ra
+EOF
+
+ # llvm's integrated assembler supports .object_arch from llvm 3.5
+ [ "$objformat" = elf ] && check_as <<EOF && enable as_object_arch
+.object_arch armv4
EOF
[ $target_os != win32 ] && enabled_all armv6t2 shared !pic && enable_weak_pic
check_func ${malloc_prefix}memalign && enable memalign
check_func ${malloc_prefix}posix_memalign && enable posix_memalign
+check_cpp_condition unistd.h "defined(_POSIX_MONOTONIC_CLOCK)" &&
+ check_func_headers time.h clock_gettime || { check_func_headers time.h clock_gettime -lrt && add_extralibs -lrt && LIBRT="-lrt"; }
+
check_func fcntl
check_func fork
check_func gethrtime
check_func getopt
check_func getrusage
check_func gettimeofday
+check_func gmtime_r
check_func isatty
check_func localtime_r
check_func mach_absolute_time
check_func mmap
check_func mprotect
# Solaris has nanosleep in -lrt, OpenSolaris no longer needs that
-check_func nanosleep || { check_func nanosleep -lrt && add_extralibs -lrt; }
+check_func_headers time.h nanosleep || { check_func_headers time.h nanosleep -lrt && add_extralibs -lrt; }
check_func sched_getaffinity
check_func setrlimit
check_func strerror_r
-check_func strptime
check_func sysconf
check_func sysctl
check_func usleep
check_func_headers windows.h SetConsoleTextAttribute
check_func_headers windows.h Sleep
check_func_headers windows.h VirtualAlloc
+check_struct windows.h "CONDITION_VARIABLE" Ptr
check_header direct.h
check_header dlfcn.h
+check_header d3d11.h
check_header dxva.h
check_header dxva2api.h
check_header io.h
check_header sys/time.h
check_header sys/un.h
check_header unistd.h
+check_header valgrind/valgrind.h
check_header vdpau/vdpau.h
check_header vdpau/vdpau_x11.h
check_header VideoDecodeAcceleration/VDADecoder.h
check_struct "sys/time.h sys/resource.h" "struct rusage" ru_maxrss
+check_type "windows.h dxva.h" "DXVA_PicParams_HEVC"
+
if ! disabled w32threads && ! enabled pthreads; then
check_func_headers "windows.h process.h" _beginthreadex &&
enable w32threads || disable w32threads
done
# these are off by default, so fail if requested and not available
-enabled avisynth && { { check_header "avisynth/avisynth_c.h" && check_lib2 "windows.h" LoadLibrary; } ||
- { check_header "avxsynth/avxsynth_c.h" && check_lib2 "dlfcn.h" dlopen -ldl; } ||
+enabled avisynth && { check_lib2 "avisynth/avisynth_c.h windows.h" LoadLibrary ||
+ check_lib2 "avxsynth/avxsynth_c.h dlfcn.h" dlopen -ldl ||
die "ERROR: LoadLibrary/dlopen not found, or avisynth header not found"; }
enabled frei0r && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; }
enabled gnutls && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init
enabled libbs2b && require_pkg_config libbs2b bs2b.h bs2b_open
+enabled libdcadec && require libdcadec libdcadec/dca_context.h dcadec_context_create -ldcadec
enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
enabled libfdk_aac && require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac
enabled libfontconfig && require_pkg_config fontconfig "fontconfig/fontconfig.h" FcInit
check_lib "${gsm_hdr}" gsm_create -lgsm && break;
done || die "ERROR: libgsm not found"; }
enabled libilbc && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc
+enabled libmfx && require_pkg_config libmfx "mfx/mfxvideo.h" MFXInit
enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame
enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb
enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb
enabled libopencv && require_pkg_config opencv opencv/cv.h cvCreateImageHeader
+enabled libopenh264 && require_pkg_config openh264 wels/codec_api.h WelsGetCodecVersion
enabled libopenjpeg && { { check_header openjpeg.h && check_lib2 openjpeg.h opj_version -lopenjpeg -DOPJ_STATIC; } ||
{ require_pkg_config libopenjpeg1 openjpeg.h opj_version -DOPJ_STATIC; } }
enabled libopus && require_pkg_config opus opus_multistream.h opus_multistream_decoder_create
{ check_cpp_condition x264.h "X264_BUILD >= 118" ||
die "ERROR: libx264 version must be >= 0.118."; }
enabled libx265 && require_pkg_config x265 x265.h x265_encoder_encode &&
- { check_cpp_condition x265.h "X265_BUILD >= 17" ||
- die "ERROR: libx265 version must be >= 17."; }
+ { check_cpp_condition x265.h "X265_BUILD >= 57" ||
+ die "ERROR: libx265 version must be >= 57."; }
enabled libxavs && require libxavs xavs.h xavs_encoder_encode -lxavs
enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
+enabled mmal && { check_lib interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host ||
+ { ! enabled cross_compile && {
+ add_cflags -isystem/opt/vc/include/ -isystem/opt/vc/include/interface/vmcs_host/linux -isystem/opt/vc/include/interface/vcos/pthreads -fgnu89-inline ;
+ add_extralibs -L/opt/vc/lib/ -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host ;
+ check_lib interface/mmal/mmal.h mmal_port_connect ; }
+ check_lib interface/mmal/mmal.h mmal_port_connect ; } ||
+ die "ERROR: mmal not found"; }
enabled openssl && { check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto ||
check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
# libdc1394 check
if enabled libdc1394; then
- { check_lib dc1394/dc1394.h dc1394_new -ldc1394 -lraw1394 &&
+ { require_pkg_config libdc1394-2 dc1394/dc1394.h dc1394_new &&
enable libdc1394_2; } ||
{ check_lib libdc1394/dc1394_control.h dc1394_create_handle -ldc1394_control -lraw1394 &&
enable libdc1394_1; } ||
if enabled libcdio; then
check_lib2 "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio ||
- check_lib2 "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio
+ check_lib2 "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio ||
+ die "ERROR: No usable libcdio/cdparanoia found"
fi
check_lib X11/Xlib.h XOpenDisplay -lX11 && enable xlib
-enabled x11grab &&
-require Xext X11/extensions/XShm.h XShmCreateImage -lXext &&
-require Xfixes X11/extensions/Xfixes.h XFixesGetCursorImage -lXfixes &&
-{ enabled xlib || die "ERROR: Xlib not found"; }
+if enabled libxcb || enabled x11grab && ! disabled libxcb; then
+ check_pkg_config xcb-shape xcb/shape.h xcb_shape_rectangles || {
+ enabled libxcb && die "ERROR: libxcb not found";
+ } && disable x11grab && enable libxcb
+
+ disabled libxcb_shm ||
+ check_pkg_config xcb-shm xcb/shm.h xcb_shm_attach || {
+ enabled libxcb_shm && die "ERROR: libxcb_shm not found";
+ } && check_header sys/shm.h && enable libxcb_shm
+
+ disabled libxcb_xfixes ||
+ check_pkg_config xcb-xfixes xcb/xfixes.h xcb_xfixes_get_cursor_image || {
+ enabled libxcb_xfixes && die "ERROR: libxcb_xfixes not found";
+ } && enable libxcb_xfixes
+
+ add_cflags "$xcb_event_cflags $xcb_shm_cflags $xcb_xfixes_cflags"
+ add_extralibs "$xcb_event_libs $xcb_shm_libs $xcb_xfixes_libs"
+fi
+
+if enabled x11grab; then
+ enabled xlib || die "ERROR: Xlib not found"
+ require Xext X11/extensions/XShm.h XShmCreateImage -lXext
+ require Xfixes X11/extensions/Xfixes.h XFixesGetCursorImage -lXfixes
+fi
+
+enabled d3d11_h &&
+ check_cc <<EOF && enable d3d11_cobj
+#define _WIN32_WINNT 0x0600
+#define COBJMACROS
+#include <windows.h>
+#include <d3d11.h>
+int main(void) { ID3D11VideoDecoder *o = NULL; ID3D11VideoDecoder_Release(o); return 0; }
+EOF
+
+enabled vaapi && enabled xlib &&
+ check_lib2 "va/va.h va/va_x11.h" vaGetDisplay -lva -lva-x11 &&
+ enable vaapi_x11
enabled vdpau &&
check_cpp_condition vdpau/vdpau.h "defined VDP_DECODER_PROFILE_MPEG4_PART2_ASP" ||
# add some linker flags
check_ldflags -Wl,--warn-common
check_ldflags -Wl,-rpath-link=libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
+enabled rpath && add_ldexeflags -Wl,-rpath,$libdir
test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
# add some strip flags
check_cflags -Werror=return-type
check_cflags -Werror=declaration-after-statement
check_cflags -Werror=vla
+ check_cflags -Werror=format-security
+ check_cflags -fdiagnostics-color=auto
enabled extra_warnings || check_disable_warning -Wno-maybe-uninitialized
elif enabled llvm_gcc; then
check_cflags -mllvm -stack-alignment=16
# not supported (build will fail)
disable inline_asm
fi
+ # msvcrt10 x64 incorrectly enables log2, only msvcrt12 (MSVC 2013) onwards actually has log2.
+ check_cpp_condition crtversion.h "_VC_CRT_MAJOR_VERSION >= 12" || disable log2
fi
case $as_type in
$HAVE_LIST \
$ALL_COMPONENTS \
+enabled_all d3d11va d3d11_cobj CoTaskMemFree &&
+ prepend avconv_libs $($ldflags_filter "-lole32") &&
+ enable d3d11va_lib
+
enabled_all dxva2 CoTaskMemFree &&
prepend avconv_libs $($ldflags_filter "-lole32") &&
enable dxva2_lib
! enabled_any memalign posix_memalign aligned_malloc &&
- enabled $simd_align_16 && enable memalign_hack
+ enabled simd_align_16 && enable memalign_hack
map 'enabled $v && intrinsics=${v#intrinsics_}' $INTRINSICS_LIST
EOF
}
-pkgconfig_generate libavutil "Libav utility library" "$LIBAVUTIL_VERSION" "$LIBM"
+pkgconfig_generate libavutil "Libav utility library" "$LIBAVUTIL_VERSION" "$LIBRT $LIBM"
pkgconfig_generate libavcodec "Libav codec library" "$LIBAVCODEC_VERSION" "$extralibs"
pkgconfig_generate libavformat "Libav container format library" "$LIBAVFORMAT_VERSION" "$extralibs"
pkgconfig_generate libavdevice "Libav device handling library" "$LIBAVDEVICE_VERSION" "$extralibs"