--enable-gray enable full grayscale support (slower color)
--disable-swscale-alpha disable alpha channel support in swscale
--disable-all disable building components, libraries and programs
- --enable-raise-major increase major version numbers in sonames [no]
Program options:
--disable-programs do not build command line programs
--enable-libkvazaar enable HEVC encoding via libkvazaar [no]
--enable-libmodplug enable ModPlug via libmodplug [no]
--enable-libmp3lame enable MP3 encoding via libmp3lame [no]
- --enable-libnut enable NUT (de)muxing via libnut,
- native (de)muxer exists [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-libopenmpt enable decoding tracked files via libopenmpt [no]
--enable-libopus enable Opus de/encoding via libopus [no]
--enable-libpulse enable Pulseaudio input via libpulse [no]
+ --enable-librsvg enable SVG rasterization via librsvg [no]
--enable-librubberband enable rubberband needed for rubberband filter [no]
--enable-librtmp enable RTMP[E] support via librtmp [no]
- --enable-libschroedinger enable Dirac de/encoding via libschroedinger [no]
--enable-libshine enable fixed-point MP3 encoding via libshine [no]
--enable-libsmbclient enable Samba protocol via libsmbclient [no]
--enable-libsnappy enable Snappy compression, needed for hap encoding [no]
The following libraries provide various hardware acceleration features:
--disable-audiotoolbox disable Apple AudioToolbox code [autodetect]
--disable-cuda disable dynamically linked Nvidia CUDA code [autodetect]
+ --enable-cuda-sdk enable CUDA features that require the CUDA SDK [no]
--disable-cuvid disable Nvidia CUVID support [autodetect]
--disable-d3d11va disable Microsoft Direct3D 11 video acceleration code [autodetect]
--disable-dxva2 disable Microsoft DirectX 9 video acceleration code [autodetect]
--cxx=CXX use C compiler CXX [$cxx_default]
--objcc=OCC use ObjC compiler OCC [$cc_default]
--dep-cc=DEPCC use dependency generator DEPCC [$cc_default]
+ --nvcc=NVCC use Nvidia CUDA compiler NVCC [$nvcc_default]
--ld=LD use linker LD [$ld_default]
--pkg-config=PKGCONFIG use pkg-config tool PKGCONFIG [$pkg_config_default]
--pkg-config-flags=FLAGS pass additional flags to pkgconf []
--extra-libs=ELIBS add ELIBS [$ELIBS]
--extra-version=STRING version string suffix []
--optflags=OPTFLAGS override optimization-related compiler flags
+ --nvccflags=NVCCFLAGS override nvcc flags [$nvccflags_default]
--build-suffix=SUFFIX library name suffix []
--enable-pic build position-independent code
--enable-thumb compile for Thumb instruction set
libkvazaar
libmodplug
libmp3lame
- libnut
libopencv
libopenh264
libopenjpeg
libopenmpt
libopus
libpulse
+ librsvg
librtmp
- libschroedinger
libshine
libsmbclient
libsnappy
"
HWACCEL_LIBRARY_NONFREE_LIST="
+ cuda_sdk
libnpp
"
neon_clobber_test
ossfuzz
pic
- raise_major
thumb
valgrind_backtrace
xmm_clobber_test
asm_mod_q
attribute_may_alias
attribute_packed
+ blocks_extension
ebp_available
ebx_available
gnu_as
malloc_prefix
nm
optflags
+ nvccflags
pkg_config
pkg_config_flags
progs_suffix
mjpeg_encoder_select="aandcttables jpegtables mpegvideoenc"
mjpegb_decoder_select="mjpeg_decoder"
mlp_decoder_select="mlp_parser"
+mlp_encoder_select="lpc"
motionpixels_decoder_select="bswapdsp"
mp1_decoder_select="mpegaudio"
mp1float_decoder_select="mpegaudio"
tiff_decoder_suggest="zlib lzma"
tiff_encoder_suggest="zlib"
truehd_decoder_select="mlp_parser"
+truehd_encoder_select="lpc"
truemotion2_decoder_select="bswapdsp"
truespeech_decoder_select="bswapdsp"
tscc_decoder_select="zlib"
dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode"
dxva2_extralibs="-luser32"
dxva2_lib_deps="dxva2"
-vda_framework_deps="VideoDecodeAcceleration_VDADecoder_h"
+vda_framework_deps="VideoDecodeAcceleration_VDADecoder_h blocks_extension"
vda_framework_extralibs="-framework VideoDecodeAcceleration"
vda_deps="vda_framework pthreads"
vda_extralibs="-framework CoreFoundation -framework QuartzCore"
hwupload_cuda_filter_deps="cuda"
scale_npp_filter_deps="cuda libnpp"
+scale_cuda_filter_deps="cuda_sdk"
nvenc_deps="cuda"
nvenc_deps_any="dlopen LoadLibrary"
libopus_decoder_deps="libopus"
libopus_encoder_deps="libopus"
libopus_encoder_select="audio_frame_queue"
-libschroedinger_decoder_deps="libschroedinger"
-libschroedinger_encoder_deps="libschroedinger"
+librsvg_decoder_deps="librsvg"
libshine_encoder_deps="libshine"
libshine_encoder_select="audio_frame_queue"
libspeex_decoder_deps="libspeex"
image2_brender_pix_demuxer_select="image2_demuxer"
ipod_muxer_select="mov_muxer"
ismv_muxer_select="mov_muxer"
-libnut_demuxer_deps="libnut"
-libnut_muxer_deps="libnut"
matroska_audio_muxer_select="matroska_muxer"
matroska_demuxer_select="iso_media riffdec"
matroska_demuxer_suggest="bzlib lzo zlib"
# filters
afftfilt_filter_deps="avcodec"
afftfilt_filter_select="fft"
+afir_filter_deps="avcodec"
+afir_filter_select="fft"
amovie_filter_deps="avcodec avformat"
aresample_filter_deps="swresample"
ass_filter_deps="libass"
delogo_filter_deps="gpl"
deshake_filter_select="pixelutils"
drawtext_filter_deps="libfreetype"
+elbg_filter_deps="avcodec"
eq_filter_deps="gpl"
fftfilt_filter_deps="avcodec"
fftfilt_filter_select="rdft"
version_script='--version-script'
yasmexe_default="yasm"
windres_default="windres"
+nvcc_default="nvcc"
+nvccflags_default="-gencode arch=compute_30,code=sm_30 -O2"
# OS
target_os_default=$(tolower $(uname -s))
HOSTCC_E='-E -o $@'
HOSTCC_O='-o $@'
HOSTLD_O='-o $@'
+NVCC_C='-c'
+NVCC_O='-o $@'
host_extralibs='-lm'
host_cflags_filter=echo
sysinclude_default="${sysroot}/usr/include"
set_default arch cc cxx doxygen pkg_config ranlib strip sysinclude \
- target_exec target_os yasmexe
+ target_exec target_os yasmexe nvcc
enabled cross_compile || host_cc_default=$cc
set_default host_cc
if [ -n "$tempprefix" ] ; then
mktemp(){
- echo $tempprefix.${HOSTNAME}.${UID}
+ tmpname="$tempprefix.${HOSTNAME}.${UID}"
+ echo "$tmpname"
+ mkdir "$tmpname"
}
elif ! check_cmd mktemp -u XXXXXX; then
# simple replacement for missing mktemp
# NOT SAFE FOR GENERAL USE
mktemp(){
- echo "${2%%XXX*}.${HOSTNAME}.${UID}.$$"
+ tmpname="${2%%XXX*}.${HOSTNAME}.${UID}.$$"
+ echo "$tmpname"
+ mkdir "$tmpname"
}
fi
+FFTMPDIR=$(mktemp -d "${TMPDIR}/ffconf.XXXXXXXX" 2> /dev/null) ||
+ die "Unable to create temporary directory in $TMPDIR."
+
tmpfile(){
- tmp=$(mktemp -u "${TMPDIR}/ffconf.XXXXXXXX")$2 &&
- (set -C; exec > $tmp) 2>/dev/null ||
- die "Unable to create temporary file in $TMPDIR."
- append TMPFILES $tmp
+ tmp="${FFTMPDIR}/test"$2
+ (set -C; exec > $tmp) 2> /dev/null ||
+ die "Unable to create temporary file in $FFTMPDIR."
eval $1=$tmp
}
-trap 'rm -f -- $TMPFILES' EXIT
+trap 'rm -rf -- "$FFTMPDIR"' EXIT
+trap 'exit 2' INT
tmpfile TMPASM .asm
tmpfile TMPC .c
# specific filters, they must be specified here as well or else the
# generic catch all at the bottom will print the original flag.
-Wall) ;;
+ -Wextra) ;;
-std=c99) ;;
# Common flags
-fomit-frame-pointer) ;;
msvc_common_flags "$@"
for flag; do
case $flag in
- -Wall) echo -W4 -wd4244 -wd4127 -wd4018 -wd4389 \
+ -Wall) echo -W3 -wd4018 -wd4146 -wd4244 -wd4305 \
+ -wd4554 ;;
+ -Wextra) echo -W4 -wd4244 -wd4127 -wd4018 -wd4389 \
-wd4146 -wd4057 -wd4204 -wd4706 -wd4305 \
-wd4152 -wd4324 -we4013 -wd4100 -wd4214 \
-wd4307 \
probe_cc hostcc "$host_cc"
host_cflags_filter=$_flags_filter
+host_cflags_speed=$_cflags_speed
add_host_cflags $_flags $_cflags
set_ccvars HOSTCC
add_host_cppflags -D_ISOC99_SOURCE
check_host_cflags -std=c99
check_host_cflags -Wall
-check_host_cflags -O3
+check_host_cflags $host_cflags_speed
check_64bit(){
arch32=$1
else
target_os=mingw32
fi
- decklink_outdev_extralibs="$decklink_outdev_extralibs -lole32 -loleaut32"
- decklink_indev_extralibs="$decklink_indev_extralibs -lole32 -loleaut32"
LIBTARGET=i386
if enabled x86_64; then
LIBTARGET="i386:x86-64"
strip="lxlite -CS"
objformat="aout"
add_cppflags -D_GNU_SOURCE
- add_ldflags -Zomf -Zbin-files -Zargs-wild -Zmap
+ add_ldflags -Zomf -Zbin-files -Zargs-wild -Zhigh-mem -Zmap
SHFLAGS='$(SUBDIR)$(NAME).def -Zdll -Zomf'
LIBSUF="_s.a"
SLIBPREF=""
add_${pfx}cppflags -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1
check_${pfx}cpp_condition _mingw.h "defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0502" ||
add_${pfx}cppflags -D_WIN32_WINNT=0x0502
- check_${pfx}cpp_condition _mingw.h "__MSVCRT_VERSION__ < 0x0700__" &&
+ 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__
enabled avfoundation_indev && { check_header_objcc AVFoundation/AVFoundation.h || disable avfoundation_indev; }
enabled avfoundation_indev && { check_lib avfoundation_indev CoreGraphics/CoreGraphics.h CGGetActiveDisplayList -framework CoreGraphics ||
check_lib avfoundation_indev ApplicationServices/ApplicationServices.h CGGetActiveDisplayList -framework ApplicationServices; }
-enabled cuda && check_header cuda.h # this is not a dependency
+enabled cuda_sdk && require cuda_sdk cuda.h cuCtxCreate -lcuda
enabled cuvid && { enabled cuda ||
die "ERROR: CUVID requires CUDA"; }
enabled chromaprint && require chromaprint chromaprint.h chromaprint_get_version -lchromaprint
enabled frei0r && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; }
enabled gmp && require gmp gmp.h mpz_export -lgmp
enabled gnutls && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init
-enabled jni && { [ $target_os = "android" ] && check_header jni.h && enabled pthreads &&
- check_lib jni "dlfcn.h" dlopen -ldl || die "ERROR: jni not found"; }
+enabled jni && { [ $target_os = "android" ] && check_header jni.h && enabled pthreads || die "ERROR: jni not found"; }
enabled ladspa && { check_header ladspa.h || die "ERROR: ladspa.h header not found"; }
enabled libiec61883 && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
enabled libass && require_pkg_config libass ass/ass.h ass_library_init
done || die "ERROR: libgsm not found"; }
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
+# While it may appear that require is being used as a pkg-config
+# fallback for libmfx, it is actually being used to detect a different
+# installation route altogether. If libmfx is installed via the Intel
+# Media SDK or Intel Media Server Studio, these don't come with
+# pkg-config support. Instead, users should make sure that the build
+# can find the libraries and headers through other means.
+enabled libmfx && { use_pkg_config libmfx "mfx/mfxvideo.h" MFXInit ||
+ { require libmfx "mfx/mfxvideo.h" MFXInit -llibmfx && warn "using libmfx without pkg-config"; } }
enabled libmodplug && require_pkg_config libmodplug libmodplug/modplug.h ModPlug_Load
enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame
-enabled libnut && require libnut libnut.h nut_demuxer_init -lnut
enabled libnpp && require libnpp npp.h nppGetLibVersion -lnppi -lnppc
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 libpulse && require_pkg_config libpulse pulse/pulseaudio.h pa_context_new
+enabled librsvg && require_pkg_config librsvg-2.0 librsvg-2.0/librsvg/rsvg.h rsvg_handle_render_cairo
enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket
enabled librubberband && require_pkg_config "rubberband >= 1.8.1" rubberband/rubberband-c.h rubberband_new
-enabled libschroedinger && require_pkg_config schroedinger-1.0 schroedinger/schro.h schro_init
enabled libshine && require_pkg_config shine shine/layer3.h shine_encode_buffer
enabled libsmbclient && { use_pkg_config smbclient libsmbclient.h smbc_init ||
require smbclient libsmbclient.h smbc_init -lsmbclient; }
fi
enabled sdl2 && enable sdl && add_cflags $sdl2_cflags && add_extralibs $sdl2_extralibs
+if enabled decklink; then
+ case $target_os in
+ mingw32*|mingw64*|win32|win64)
+ decklink_outdev_extralibs="$decklink_outdev_extralibs -lole32 -loleaut32"
+ decklink_indev_extralibs="$decklink_indev_extralibs -lole32 -loleaut32"
+ ;;
+ esac
+fi
+
disabled securetransport || { check_func SecIdentityCreate "-Wl,-framework,CoreFoundation -Wl,-framework,Security" &&
check_lib securetransport "Security/SecureTransport.h Security/Security.h" "SSLCreateContext SecItemImport" "-Wl,-framework,CoreFoundation -Wl,-framework,Security"; }
check_disable_warning_headers -Wno-deprecated-declarations
check_disable_warning_headers -Wno-unused-variable
+check_cc <<EOF && enable blocks_extension
+void (^block)(void);
+EOF
+
# add some linker flags
check_ldflags -Wl,--warn-common
check_ldflags -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
fi
fi
+if [ -z "$nvccflags" ]; then
+ nvccflags=$nvccflags_default
+fi
+
+if enabled x86_64 || enabled ppc64 || enabled aarch64; then
+ nvccflags="$nvccflags -m64"
+else
+ nvccflags="$nvccflags -m32"
+fi
+
check_optflags(){
check_cflags "$@"
enabled lto && check_ldflags "$@"
}
+check_optflags $optflags
+check_optflags -fno-math-errno
+check_optflags -fno-signed-zeros
if enabled lto; then
test "$cc_type" != "$ld_type" && die "LTO requires same compiler and linker"
disable inline_asm_direct_symbol_refs
fi
-check_optflags $optflags
-check_optflags -fno-math-errno
-check_optflags -fno-signed-zeros
-
enabled ftrapv && check_cflags -ftrapv
check_cc -mno-red-zone <<EOF && noredzone_flags="-mno-red-zone"
for pfx in "" host_; do
varname=${pfx%_}cc_type
eval "type=\$$varname"
- if [ $type = "msvc" ]; then
+ if [ "$type" = "msvc" ]; then
check_${pfx}cc <<EOF || add_${pfx}cflags -Dinline=__inline
static inline int foo(int a) { return a; }
EOF
# conditional library dependencies, in linking order
enabled afftfilt_filter && prepend avfilter_deps "avcodec"
+enabled afir_filter && prepend avfilter_deps "avcodec"
enabled amovie_filter && prepend avfilter_deps "avformat avcodec"
enabled aresample_filter && prepend avfilter_deps "swresample"
enabled atempo_filter && prepend avfilter_deps "avcodec"
enabled elbg_filter && prepend avfilter_deps "avcodec"
enabled fftfilt_filter && prepend avfilter_deps "avcodec"
enabled find_rect_filter && prepend avfilter_deps "avformat avcodec"
+enabled firequalizer_filter && prepend avfilter_deps "avcodec"
enabled mcdeint_filter && prepend avfilter_deps "avcodec"
enabled movie_filter && prepend avfilter_deps "avformat avcodec"
enabled pan_filter && prepend avfilter_deps "swresample"
enabled showcqt_filter && prepend avfilter_deps "avformat avcodec swscale"
enabled showfreqs_filter && prepend avfilter_deps "avcodec"
enabled showspectrum_filter && prepend avfilter_deps "avcodec"
+enabled signature_filter && prepend avfilter_deps "avcodec avformat"
enabled smartblur_filter && prepend avfilter_deps "swscale"
enabled spectrumsynth_filter && prepend avfilter_deps "avcodec"
+enabled spp_filter && prepend avfilter_deps "avcodec"
enabled subtitles_filter && prepend avfilter_deps "avformat avcodec"
enabled uspp_filter && prepend avfilter_deps "avcodec"
+enabled zoompan_filter && prepend avfilter_deps "swscale"
enabled lavfi_indev && prepend avdevice_deps "avfilter"
AR_O=$ar_o
RANLIB=$ranlib
STRIP=$strip
+NVCC=$nvcc
CP=cp -p
LN_S=$ln_s
CPPFLAGS=$CPPFLAGS
CXXFLAGS=$CXXFLAGS
OBJCFLAGS=$OBJCFLAGS
ASFLAGS=$ASFLAGS
+NVCCFLAGS=$nvccflags
AS_C=$AS_C
AS_O=$AS_O
OBJCC_C=$OBJCC_C
CC_O=$CC_O
CXX_C=$CXX_C
CXX_O=$CXX_O
+NVCC_C=$NVCC_C
+NVCC_O=$NVCC_O
LD_O=$LD_O
LD_LIB=$LD_LIB
LD_PATH=$LD_PATH