--disable-sdl2 disable sdl2 [autodetect]
--disable-securetransport disable Secure Transport, needed for TLS support
on OSX if openssl and gnutls are not used [autodetect]
- --enable-x11grab enable X11 grabbing (legacy) [no]
--disable-xlib disable xlib [autodetect]
--disable-zlib disable zlib [autodetect]
zlib
"
+EXTERNAL_LIBRARY_GPL_LIST="
+ frei0r
+ libcdio
+ librubberband
+ libvidstab
+ libx264
+ libx265
+ libxavs
+ libxvid
+"
+
+EXTERNAL_LIBRARY_NONFREE_LIST="
+ libfdk_aac
+ openssl
+"
+
+EXTERNAL_LIBRARY_VERSION3_LIST="
+ gmp
+ libopencore_amrnb
+ libopencore_amrwb
+ libvo_amrwbenc
+"
+
+EXTERNAL_LIBRARY_GPLV3_LIST="
+ libsmbclient
+"
+
EXTERNAL_LIBRARY_LIST="
$EXTERNAL_AUTODETECT_LIBRARY_LIST
+ $EXTERNAL_LIBRARY_GPL_LIST
+ $EXTERNAL_LIBRARY_NONFREE_LIST
+ $EXTERNAL_LIBRARY_VERSION3_LIST
+ $EXTERNAL_LIBRARY_GPLV3_LIST
avisynth
chromaprint
crystalhd
decklink
- frei0r
gcrypt
- gmp
gnutls
jni
ladspa
libbluray
libbs2b
libcaca
- libcdio
libcelt
libdc1394
- libfdk_aac
libflite
libfontconfig
libfreetype
libmodplug
libmp3lame
libnut
- libopencore_amrnb
- libopencore_amrwb
libopencv
libopenh264
libopenjpeg
libopus
libpulse
librtmp
- librubberband
libschroedinger
libshine
libsmbclient
libtheora
libtwolame
libv4l2
- libvidstab
- libvo_amrwbenc
libvorbis
libvpx
libwavpack
libwebp
- libx264
- libx265
- libxavs
- libxvid
libzimg
libzmq
libzvbi
openal
opencl
opengl
- openssl
videotoolbox
- x11grab
"
HWACCEL_AUTODETECT_LIBRARY_LIST="
audiotoolbox
xvmc
"
+HWACCEL_LIBRARY_NONFREE_LIST="
+ libnpp
+"
+
HWACCEL_LIBRARY_LIST="
$HWACCEL_AUTODETECT_LIBRARY_LIST
+ $HWACCEL_LIBRARY_NONFREE_LIST
libmfx
- libnpp
mmal
omx
"
local_aligned_8
local_aligned_16
local_aligned_32
+ simd_align
simd_align_16
+ simd_align_32
"
BUILTIN_LIST="
atomic_cas_ptr
- atomic_compare_exchange
machine_rw_barrier
MemoryBarrier
mm_empty
TOOLCHAIN_FEATURES="
as_dn_directive
+ as_fpu_directive
as_func
as_object_arch
asm_mod_q
huffyuvencdsp
idctdsp
iirfilter
- imdct15
+ mdct15
intrax8
iso_media
ividsp
fast_64bit_if_any="aarch64 alpha ia64 mips64 parisc64 ppc64 sparc64 x86_64"
fast_clz_if_any="aarch64 alpha avr32 mips ppc x86"
fast_unaligned_if_any="aarch64 ppc x86"
+simd_align_if_any="simd_align_16 simd_align_32"
simd_align_16_if_any="altivec neon sse"
+simd_align_32_if_any="avx"
# system capabilities
symver_if_any="symver_asm_label symver_gnu_asm"
valgrind_backtrace_deps="!optimizations valgrind_valgrind_h"
# threading support
-atomics_gcc_if_any="sync_val_compare_and_swap atomic_compare_exchange"
+atomics_gcc_if="sync_val_compare_and_swap"
atomics_suncc_if="atomic_cas_ptr machine_rw_barrier"
atomics_win32_if="MemoryBarrier"
atomics_native_if_any="$ATOMICS_LIST"
frame_thread_encoder_deps="encoders threads"
intrax8_select="blockdsp idctdsp"
mdct_select="fft"
+mdct15_select="fft"
me_cmp_select="fdctdsp idctdsp pixblockdsp"
mpeg_er_select="error_resilience"
mpegaudio_select="mpegaudiodsp"
rdft_select="fft"
# decoders / encoders
-aac_decoder_select="imdct15 mdct sinewin"
+aac_decoder_select="mdct15 mdct sinewin"
aac_fixed_decoder_select="mdct sinewin"
aac_encoder_select="audio_frame_queue iirfilter lpc mdct sinewin"
aac_latm_decoder_select="aac_decoder aac_latm_parser"
nuv_decoder_select="idctdsp lzo"
on2avc_decoder_select="mdct"
opus_decoder_deps="swresample"
-opus_decoder_select="imdct15"
+opus_decoder_select="mdct15"
+opus_encoder_select="audio_frame_queue mdct15"
png_decoder_select="zlib"
png_encoder_select="llvidencdsp zlib"
prores_decoder_select="blockdsp idctdsp"
rv30_decoder_select="golomb h264pred h264qpel mpegvideo rv34dsp"
rv40_decoder_select="golomb h264pred h264qpel mpegvideo rv34dsp"
screenpresso_decoder_select="zlib"
-shorten_decoder_select="golomb"
+shorten_decoder_select="golomb bswapdsp"
sipr_decoder_select="lsp"
snow_decoder_select="dwt h264qpel hpeldsp me_cmp rangecoder videodsp"
snow_encoder_select="aandcttables dwt h264qpel hpeldsp me_cmp mpegvideoenc rangecoder"
mpeg2_qsv_decoder_select="qsvdec mpeg2_qsv_hwaccel"
mpeg2_qsv_encoder_deps="libmfx"
mpeg2_qsv_encoder_select="qsvenc"
+mpeg2_vaapi_encoder_deps="VAEncPictureParameterBufferMPEG2"
+mpeg2_vaapi_encoder_select="vaapi_encode"
mpeg4_cuvid_decoder_deps="cuda cuvid"
mpeg4_cuvid_decoder_select="mpeg4_cuvid_hwaccel"
nvenc_h264_encoder_deps="nvenc"
vc1_cuvid_decoder_select="vc1_cuvid_hwaccel"
vp8_cuvid_decoder_deps="cuda cuvid"
vp8_cuvid_decoder_select="vp8_cuvid_hwaccel"
+vp8_vaapi_encoder_deps="VAEncPictureParameterBufferVP8"
+vp8_vaapi_encoder_select="vaapi_encode"
vp9_cuvid_decoder_deps="cuda cuvid"
vp9_cuvid_decoder_select="vp9_cuvid_hwaccel"
v4l2_outdev_deps_any="linux_videodev2_h sys_videoio_h"
vfwcap_indev_deps="capCreateCaptureWindow vfwcap_defines"
vfwcap_indev_extralibs="-lavicap32"
-x11grab_indev_deps="x11grab"
-x11grab_xcb_indev_deps="libxcb"
+xcbgrab_indev_deps="libxcb"
xv_outdev_deps="X11_extensions_Xvlib_h XvGetPortAttribute"
xv_outdev_extralibs="-lXv -lX11 -lXext"
colormatrix_filter_deps="gpl"
cover_rect_filter_deps="avcodec avformat gpl"
cropdetect_filter_deps="gpl"
+deinterlace_qsv_filter_deps="libmfx"
+deinterlace_vaapi_filter_deps="vaapi"
delogo_filter_deps="gpl"
deshake_filter_select="pixelutils"
drawtext_filter_deps="libfreetype"
sab_filter_deps="gpl swscale"
scale2ref_filter_deps="swscale"
scale_filter_deps="swscale"
+scale_qsv_filter_deps="libmfx"
select_filter_select="pixelutils"
showcqt_filter_deps="avcodec avformat swscale"
showcqt_filter_select="fft"
ffmpeg_deps="avcodec avfilter avformat swresample"
ffmpeg_select="aformat_filter anull_filter atrim_filter format_filter
null_filter
- setpts_filter trim_filter"
+ trim_filter"
ffplay_deps="avcodec avformat swscale swresample sdl2"
ffplay_libs='$sdl2_libs'
ffplay_select="rdft crop_filter transpose_filter hflip_filter vflip_filter rotate_filter"
_flags='-nologo -Qdiag-error:4044,10157'
# -Qvec- -Qsimd- to prevent miscompilation, -GS, fp:precise for consistency
# with MSVC which enables it by default.
- _cflags='-D_USE_MATH_DEFINES -Qms0 -Qvec- -Qsimd- -GS -fp:precise'
+ _cflags='-Qms0 -Qvec- -Qsimd- -GS -fp:precise'
disable stripping
+ elif $_cc -? 2>/dev/null | grep -q 'LLVM.*Linker'; then
+ # lld can emulate multiple different linkers; in ms link.exe mode,
+ # the -? parameter gives the help output which contains an identifyable
+ # string, while it gives an error in other modes.
+ _type=lld-link
+ # The link.exe mode doesn't have a switch for getting the version,
+ # but we can force it back to gnu mode and get the version from there.
+ _ident=$($_cc -flavor gnu --version)
+ _ld_o='-out:$@'
+ _flags_filter=msvc_flags
+ _ld_lib='lib%.a'
+ _ld_path='-libpath:'
elif $_cc -nologo- 2>&1 | grep -q Microsoft; then
_type=msvc
_ident=$($_cc 2>&1 | head -n1)
_ld_lib='lib%.a'
_ld_path='-libpath:'
_flags='-nologo'
- _cflags='-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS'
disable stripping
elif $_cc --version 2>/dev/null | grep -q ^cparser; then
_type=cparser
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
dlltool="${cross_prefix}dlltool"
if check_cmd lib.exe -list; then
- SLIB_EXTRA_CMD=-'sed -e "s/ @[^ ]*//" $$(@:$(SLIBSUF)=.orig.def) > $$(@:$(SLIBSUF)=.def); lib.exe /machine:$(LIBTARGET) /def:$$(@:$(SLIBSUF)=.def) /out:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)'
+ SLIB_EXTRA_CMD=-'sed -e "s/ @[^ ]*//" $$(@:$(SLIBSUF)=.orig.def) > $$(@:$(SLIBSUF)=.def); lib.exe -nologo -machine:$(LIBTARGET) -def:$$(@:$(SLIBSUF)=.def) -out:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)'
if enabled x86_64; then
LIBTARGET=x64
fi
vsnprintf=avpriv_vsnprintf
fi
fi
+ add_${pfx}cppflags -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS
# The MSVC 2010 headers (Win 7.0 SDK) set _WIN32_WINNT to
# 0x601 by default unless something else is set by the user.
# This can easily lead to us detecting functions only present
#endif
#endif
EOF
+ if [ "$pfx" = "" ]; then
+ check_func strtoll || add_cflags -Dstrtoll=_strtoi64
+ check_func strtoull || add_cflags -Dstrtoull=_strtoui64
+ fi
elif check_${pfx}cpp_condition stddef.h "defined __KLIBC__"; then
eval ${pfx}libc_type=klibc
elif check_${pfx}cpp_condition sys/cdefs.h "defined __BIONIC__"; then
fi
die_license_disabled() {
- enabled $1 || { enabled $2 && die "$2 is $1 and --enable-$1 is not specified."; }
+ enabled $1 || { enabled $v && die "$v is $1 and --enable-$1 is not specified."; }
}
die_license_disabled_gpl() {
- enabled $1 || { enabled $2 && die "$2 is incompatible with the gpl and --enable-$1 is not specified."; }
-}
-
-die_license_disabled gpl frei0r
-die_license_disabled gpl libcdio
-die_license_disabled gpl librubberband
-die_license_disabled gpl libsmbclient
-die_license_disabled gpl libvidstab
-die_license_disabled gpl libx264
-die_license_disabled gpl libx265
-die_license_disabled gpl libxavs
-die_license_disabled gpl libxvid
-die_license_disabled gpl x11grab
-
-die_license_disabled nonfree libnpp
-enabled gpl && die_license_disabled_gpl nonfree libfdk_aac
-enabled gpl && die_license_disabled_gpl nonfree openssl
-
-die_license_disabled version3 gmp
-die_license_disabled version3 libopencore_amrnb
-die_license_disabled version3 libopencore_amrwb
-die_license_disabled version3 libsmbclient
-die_license_disabled version3 libvo_amrwbenc
+ enabled $1 || { enabled $v && die "$v is incompatible with the gpl and --enable-$1 is not specified."; }
+}
+
+map "die_license_disabled gpl" $EXTERNAL_LIBRARY_GPL_LIST $EXTERNAL_LIBRARY_GPLV3_LIST
+map "die_license_disabled version3" $EXTERNAL_LIBRARY_VERSION3_LIST $EXTERNAL_LIBRARY_GPLV3_LIST
+
+enabled gpl && map "die_license_disabled_gpl nonfree" $EXTERNAL_LIBRARY_NONFREE_LIST
+map "die_license_disabled nonfree" $HWACCEL_LIBRARY_NONFREE_LIST
enabled version3 && { enabled gpl && enable gplv3 || enable lgplv3; }
check_as <<EOF && enable as_dn_directive
ra .dn d0.i16
.unreq ra
+EOF
+ check_as <<EOF && enable as_fpu_directive
+.fpu neon
EOF
# llvm's integrated assembler supports .object_arch from llvm 3.5
fi
check_builtin atomic_cas_ptr atomic.h "void **ptr; void *oldval, *newval; atomic_cas_ptr(ptr, oldval, newval)"
-check_builtin atomic_compare_exchange "" "int *ptr, *oldval; int newval; __atomic_compare_exchange_n(ptr, oldval, newval, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)"
check_builtin machine_rw_barrier mbarrier.h "__machine_rw_barrier()"
check_builtin MemoryBarrier windows.h "MemoryBarrier()"
check_builtin sarestart signal.h "SA_RESTART"
check_type "va/va.h va/va_enc_h264.h" "VAEncPictureParameterBufferH264"
check_type "va/va.h va/va_enc_hevc.h" "VAEncPictureParameterBufferHEVC"
check_type "va/va.h va/va_enc_jpeg.h" "VAEncPictureParameterBufferJPEG"
+check_type "va/va.h va/va_enc_mpeg2.h" "VAEncPictureParameterBufferMPEG2"
+check_type "va/va.h va/va_enc_vp8.h" "VAEncPictureParameterBufferVP8"
check_type "vdpau/vdpau.h" "VdpPictureInfoHEVC"
if ! disabled libxcb; then
check_pkg_config "xcb >= 1.4" xcb/xcb.h xcb_connect || {
enabled libxcb && die "ERROR: libxcb >= 1.4 not found";
- } && disable x11grab && enable libxcb
+ } && enable libxcb
if enabled libxcb; then
disabled libxcb_shm || {
fi
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
-
check_func_headers "windows.h" CreateDIBSection "$gdigrab_indev_extralibs"
enabled dxva2api_h &&
__declspec($_restrict) void* foo(int);
EOF
fi
- check_func strtoll || add_cflags -Dstrtoll=_strtoi64
- check_func strtoull || add_cflags -Dstrtoull=_strtoui64
# the new SSA optimzer in VS2015 U3 is mis-optimizing some parts of the code
# Issue has been fixed in MSVC v19.00.24218.
check_cpp_condition windows.h "_MSC_FULL_VER >= 190024218" ||
check_cflags -d2SSAOptimizer-
+ # enable utf-8 source processing on VS2015 U2 and newer
+ check_cpp_condition windows.h "_MSC_FULL_VER >= 190023918" &&
+ add_cflags -utf-8
fi
for pfx in "" host_; do
enable dxva2_lib
! enabled_any memalign posix_memalign aligned_malloc &&
- enabled simd_align_16 && enable memalign_hack
+ enabled simd_align && enable memalign_hack
# add_dep lib dep
# -> enable ${lib}_deps_${dep}