--enable-libfontconfig font configuration and management
--enable-libfreetype font rendering
--enable-libgsm GSM audio encoding/decoding
+ --enable-libhdcd HDCD decoding filter
--enable-libilbc ILBC audio encoding/decoding
--enable-libkvazaar HEVC video encoding
--enable-libmp3lame MP3 audio encoding
--enable-libxcb-xfixes X11 mouse rendering [auto]
--enable-libxvid MPEG-4 ASP video encoding
--enable-openssl crypto
- --enable-x11grab X11 grabbing through xlib (legacy, use xcb instead)
--enable-zlib compression [autodetect]
The following libraries provide various hardware acceleration features:
transcode_aac_example
"
-HWACCEL_LIBRARY_LIST="
+HWACCEL_LIBRARY_NONFREE_LIST="
cuda
+ libnpp
+"
+HWACCEL_LIBRARY_LIST="
+ $HWACCEL_LIBRARY_NONFREE_LIST
d3d11va
dxva2
libmfx
- libnpp
mmal
nvenc
omx
vdpau
"
+EXTERNAL_LIBRARY_GPL_LIST="
+ libcdio
+ libx264
+ libx265
+ libxavs
+ libxvid
+"
+
+EXTERNAL_LIBRARY_NONFREE_LIST="
+ libfaac
+ libfdk_aac
+ openssl
+"
+
+EXTERNAL_LIBRARY_VERSION3_LIST="
+ libopencore_amrnb
+ libopencore_amrwb
+ libvo_aacenc
+ libvo_amrwbenc
+"
+
EXTERNAL_LIBRARY_LIST="
+ $EXTERNAL_LIBRARY_GPL_LIST
+ $EXTERNAL_LIBRARY_NONFREE_LIST
+ $EXTERNAL_LIBRARY_VERSION3_LIST
avisynth
bzlib
frei0r
gnutls
libbs2b
- libcdio
libdc1394
libdcadec
- libfaac
- libfdk_aac
libfontconfig
libfreetype
libgsm
+ libhdcd
libilbc
libkvazaar
libmp3lame
- libopencore_amrnb
- libopencore_amrwb
libopencv
libopenh264
libopenjpeg
libspeex
libtheora
libtwolame
- libvo_aacenc
- libvo_amrwbenc
libvorbis
libvpx
libwavpack
libwebp
- libx264
- libx265
- libxavs
libxcb
libxcb_shm
libxcb_xfixes
- libxvid
- openssl
- x11grab
zlib
"
fast_cmov
local_aligned_8
local_aligned_16
+ local_aligned_32
+ simd_align
simd_align_16
+ simd_align_32
"
BUILTIN_LIST="
TOOLCHAIN_FEATURES="
as_dn_directive
+ as_fpu_directive
as_func
as_object_arch
asm_mod_q
h263dsp
h264chroma
h264dsp
+ h264parse
h264pred
h264qpel
hpeldsp
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"
h263_encoder_select="aandcttables h263dsp mpegvideoenc"
h263i_decoder_select="h263_decoder"
h263p_encoder_select="h263_encoder"
-h264_decoder_select="cabac golomb h264chroma h264dsp h264pred h264qpel videodsp"
+h264_decoder_select="cabac golomb h264chroma h264dsp h264parse h264pred h264qpel videodsp"
h264_decoder_suggest="error_resilience"
hap_decoder_select="snappy texturedsp"
hap_encoder_deps="libsnappy"
lagarith_decoder_select="huffyuvdsp"
ljpeg_encoder_select="aandcttables idctdsp jpegtables"
loco_decoder_select="golomb"
+magicyuv_decoder_select="huffyuvdsp"
mdec_decoder_select="blockdsp idctdsp mpegvideo"
metasound_decoder_select="lsp mdct sinewin"
mimic_decoder_select="blockdsp bswapdsp hpeldsp idctdsp"
sp5x_decoder_select="mjpeg_decoder"
svq1_decoder_select="hpeldsp"
svq1_encoder_select="aandcttables hpeldsp me_cmp mpegvideoenc"
-svq3_decoder_select="golomb h264dsp h264pred hpeldsp tpeldsp videodsp"
+svq3_decoder_select="golomb h264dsp h264parse h264pred hpeldsp tpeldsp videodsp"
svq3_decoder_suggest="zlib"
tak_decoder_select="audiodsp"
tdsc_decoder_deps="zlib"
nvenc_hevc_encoder_deps="nvenc"
# parsers
-h264_parser_select="golomb h264dsp"
+h264_parser_select="golomb h264dsp h264parse"
hevc_parser_select="golomb"
mpegvideo_parser_select="mpegvideo"
mpeg4video_parser_select="error_resilience h263dsp mpegvideo qpeldsp"
libopencore_amrnb_encoder_deps="libopencore_amrnb"
libopencore_amrnb_encoder_select="audio_frame_queue"
libopencore_amrwb_decoder_deps="libopencore_amrwb"
+libopenh264_decoder_deps="libopenh264"
+libopenh264_decoder_select="h264_mp4toannexb_bsf"
libopenh264_encoder_deps="libopenh264"
libopenjpeg_decoder_deps="libopenjpeg"
libopenjpeg_encoder_deps="libopenjpeg"
v4l2_indev_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"
# protocols
ffrtmpcrypt_protocol_deps="!librtmp_protocol"
boxblur_filter_deps="gpl"
bs2b_filter_deps="libbs2b"
cropdetect_filter_deps="gpl"
+deinterlace_qsv_filter_deps="libmfx"
delogo_filter_deps="gpl"
drawtext_filter_deps="libfreetype"
frei0r_filter_deps="frei0r dlopen"
frei0r_filter_extralibs='$ldl'
frei0r_src_filter_deps="frei0r dlopen"
frei0r_src_filter_extralibs='$ldl'
+hdcd_filter_deps="libhdcd"
hqdn3d_filter_deps="gpl"
interlace_filter_deps="gpl"
ocv_filter_deps="libopencv"
resample_filter_deps="avresample"
scale_filter_deps="swscale"
+scale_qsv_filter_deps="libmfx"
scale_vaapi_filter_deps="vaapi VAProcPipelineParameterBuffer"
# examples
avconv_deps="avcodec avfilter avformat avresample swscale"
avconv_select="aformat_filter anull_filter asyncts_filter atrim_filter format_filter
fps_filter null_filter resample_filter scale_filter
- setpts_filter trim_filter"
+ trim_filter"
avplay_deps="avcodec avfilter avformat avresample sdl"
avplay_libs='$sdl_libs'
avplay_select="rdft format_filter transpose_filter hflip_filter vflip_filter"
pkg_config_default=pkg-config
ranlib="ranlib"
strip="strip"
+version_script='--version-script'
yasmexe="yasm"
# machine
LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
SLIB_INSTALL_NAME='$(SLIBNAME_WITH_VERSION)'
SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)'
+VERSION_SCRIPT_POSTPROCESS_CMD="cat"
asflags_filter=echo
cflags_filter=echo
_ld_lib='lib%.a'
_ld_path='-libpath:'
_flags='-nologo'
- _cflags='-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS'
elif $_cc 2>&1 | grep -q Intel; then
_type=icl
_ident=$($_cc 2>&1 | head -n1)
_flags='-nologo -Qdiag-error:4044,10157'
# -Qvec- -Qsimd- to prevent miscompilation, -GS for consistency
# with MSVC which enables it by default.
- _cflags='-D_USE_MATH_DEFINES -Qms0 -Qvec- -Qsimd- -GS'
+ _cflags='-Qms0 -Qvec- -Qsimd- -GS'
+ 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 --version 2>/dev/null | grep -q ^cparser; then
_type=cparser
_ident=$($_cc --version | head -n1)
echo "hwcap_1 = OVERRIDE;" > mapfile &&
add_ldflags -Wl,-M,mapfile
nm_default='nm -P -g'
- SLIB_CREATE_DEF_CMD='$(Q)perl $(SRC_PATH)/compat/solaris/make_sunver.pl $$(filter %.ver,$$^) $(OBJS) | grep -v @ > $(SUBDIR)lib$(NAME).ver-sol2'
+ version_script='-M'
+ VERSION_SCRIPT_POSTPROCESS_CMD='perl $(SRC_PATH)/compat/solaris/make_sunver.pl - $(OBJS)'
;;
netbsd)
disable symver
(__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" ||
die "ERROR: MinGW32 runtime version must be >= 3.15."
add_${pfx}cppflags -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1
+ check_${pfx}cpp_condition _mingw.h "__MSVCRT_VERSION__ < 0x0700__" &&
+ add_${pfx}cppflags -D__MSVCRT_VERSION__=0x0700
eval test \$${pfx_no_}cc_type = "gcc" &&
add_${pfx}cppflags -D__printf__=__gnu_printf__
elif check_${pfx}cpp_condition crtversion.h "defined _VC_CRT_MAJOR_VERSION"; then
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
+ 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 libcdio
-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 cuda
-die_license_disabled nonfree libfaac
-die_license_disabled nonfree libfdk_aac
-die_license_disabled nonfree libnpp
-die_license_disabled nonfree openssl
-
-die_license_disabled version3 libopencore_amrnb
-die_license_disabled version3 libopencore_amrwb
-die_license_disabled version3 libvo_aacenc
-die_license_disabled version3 libvo_amrwbenc
+map "die_license_disabled gpl" $EXTERNAL_LIBRARY_GPL_LIST
+map "die_license_disabled nonfree" $EXTERNAL_LIBRARY_NONFREE_LIST $HWACCEL_LIBRARY_NONFREE_LIST
+map "die_license_disabled version3" $EXTERNAL_LIBRARY_VERSION3_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
elif enabled ppc; then
- enable local_aligned_8 local_aligned_16
+ enable local_aligned_8 local_aligned_16 local_aligned_32
check_inline_asm dcbzl '"dcbzl 0, %0" :: "r"(0)'
check_inline_asm ibm_asm '"add 0, 0, 0"'
check_builtin rdtsc intrin.h "__rdtsc()"
check_builtin mm_empty mmintrin.h "_mm_empty()"
- enable local_aligned_8 local_aligned_16
+ enable local_aligned_8 local_aligned_16 local_aligned_32
# check whether EBP is available on x86
# As 'i' is stored on the stack, this program will crash
enabled libgsm && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do
check_lib "${gsm_hdr}" gsm_create -lgsm && break;
done || die "ERROR: libgsm not found"; }
+enabled libhdcd && require_pkg_config libhdcd "hdcd/hdcd_simple.h" hdcd_new
enabled libilbc && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc
enabled libkvazaar && require_pkg_config "kvazaar >= 0.8.1" kvazaar.h kvz_api_get
enabled libmfx && require_pkg_config libmfx "mfx/mfxvideo.h" MFXInit
check_lib X11/Xlib.h XOpenDisplay -lX11 && enable xlib
-if enabled libxcb || enabled x11grab && ! disabled libxcb; then
+if enabled libxcb; then
check_pkg_config xcb-shape xcb/shape.h xcb_shape_rectangles || {
enabled libxcb && die "ERROR: libxcb not found";
- } && disable x11grab && enable libxcb
+ } && enable libxcb
disabled libxcb_shm ||
check_pkg_config xcb-shm xcb/shm.h xcb_shm_attach || {
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 vaapi &&
check_code cc "va/va.h" "vaCreateSurfaces(0, 0, 0, 0, 0, 0, 0, 0)" ||
disable vaapi
disable vdpau
enabled vdpau && enabled xlib &&
- check_func_headers "vdpau/vdpau.h vdpau/vdpau_x11.h" vdp_device_create_x11 -lvdpau &&
- prepend avconv_libs $($ldflags_filter "-lvdpau") &&
+ check_lib2 "vdpau/vdpau.h vdpau/vdpau_x11.h" vdp_device_create_x11 -lvdpau &&
enable vdpau_x11
enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel"
-Wl,--wrap,sws_scale ||
disable xmm_clobber_test
-echo "X { local: *; };" > $TMPV
-if test_ldflags -Wl,--version-script,$TMPV; then
- append SHFLAGS '-Wl,--version-script,\$(SUBDIR)lib\$(NAME).ver'
-elif test_ldflags -Wl,-M,$TMPV; then
- append SHFLAGS '-Wl,-M,\$(SUBDIR)lib\$(NAME).ver-sol2'
-fi
+check_ld <<EOF && enable proper_dce
+extern const int array[512];
+static inline int func(void) { return array[0]; }
+int main(void) { return 0; }
+EOF
-check_cc <<EOF && enable symver_asm_label
+if enabled proper_dce; then
+ echo "X { local: *; };" > $TMPV
+ if test_ldflags -Wl,${version_script},$TMPV; then
+ append SHFLAGS '-Wl,${version_script},\$(SUBDIR)lib\$(NAME).ver'
+ check_cc <<EOF && enable symver_asm_label
void ff_foo(void) __asm__ ("av_foo@VERSION");
void ff_foo(void) { ${inline_asm+__asm__($quotes);} }
EOF
- check_cc <<EOF && enable symver_gnu_asm
+ check_cc <<EOF && enable symver_gnu_asm
__asm__(".symver ff_foo,av_foo@VERSION");
void ff_foo(void) {}
EOF
+ fi
+fi
if [ -z "$optflags" ]; then
if enabled small; then
__declspec($_restrict) void* foo(int);
EOF
fi
- check_func strtoll || add_cflags -Dstrtoll=_strtoi64
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
map 'enabled $v && intrinsics=${v#intrinsics_}' $INTRINSICS_LIST
SLIB_INSTALL_LINKS=${SLIB_INSTALL_LINKS}
SLIB_INSTALL_EXTRA_LIB=${SLIB_INSTALL_EXTRA_LIB}
SLIB_INSTALL_EXTRA_SHLIB=${SLIB_INSTALL_EXTRA_SHLIB}
+VERSION_SCRIPT_POSTPROCESS_CMD=${VERSION_SCRIPT_POSTPROCESS_CMD}
SAMPLES:=${samples:-\$(LIBAV_SAMPLES)}
EOF